@pagelines/sdk 1.0.912 → 1.0.914

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/BotWrap.js CHANGED
@@ -417,14 +417,14 @@ var BotChatController = class extends i {
417
417
  sender: t,
418
418
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
419
419
  attachments: n,
420
- ...r ? { issue: r } : {}
420
+ ...r
421
421
  }]);
422
422
  }
423
423
  nextLocalMessageId() {
424
424
  return `${Date.now()}-${++this.localMessageSeq}`;
425
425
  }
426
- notify(e) {
427
- e && this.addMessage(e, "system");
426
+ notify(e, t) {
427
+ e && this.addMessage(e, "system", void 0, t);
428
428
  }
429
429
  get canReportMessages() {
430
430
  return !!this.settings.reportMessageFn;
@@ -786,11 +786,11 @@ var BotChatController = class extends i {
786
786
  ...m ? { actionUrl: m } : {},
787
787
  ...g ? { help: g } : {}
788
788
  }, v = o === "account" ? "account" : a === "BOT_DELETED" ? "bot_deleted" : void 0;
789
- v ? (this.addMessage(c, "system", void 0, {
789
+ v ? (this.addMessage(c, "system", void 0, { issue: {
790
790
  code: a,
791
791
  bucket: o,
792
792
  ..._
793
- }), this.updateState(this.textState, {
793
+ } }), this.updateState(this.textState, {
794
794
  isThinking: !1,
795
795
  sendBlockedReason: v
796
796
  })) : this.updateState(this.textState, {
@@ -1323,7 +1323,7 @@ Y || (Y = function freeze(e) {
1323
1323
  }), ct || (ct = function construct(e) {
1324
1324
  return new e(...[...arguments].slice(1));
1325
1325
  });
1326
- var lt = unapply(Array.prototype.forEach), Z = unapply(Array.prototype.lastIndexOf), ut = unapply(Array.prototype.pop), dt = unapply(Array.prototype.push), ft = unapply(Array.prototype.splice), pt = Array.isArray, mt = unapply(String.prototype.toLowerCase), ht = unapply(String.prototype.toString), gt = unapply(String.prototype.match), _t = unapply(String.prototype.replace), vt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Q = unapply(Object.prototype.hasOwnProperty), Tt = unapply(Object.prototype.toString), Et = unapply(RegExp.prototype.test), Dt = unconstruct(TypeError);
1326
+ var lt = unapply(Array.prototype.forEach), Z = unapply(Array.prototype.lastIndexOf), ut = unapply(Array.prototype.pop), dt = unapply(Array.prototype.push), ft = unapply(Array.prototype.splice), pt = Array.isArray, mt = unapply(String.prototype.toLowerCase), ht = unapply(String.prototype.toString), gt = unapply(String.prototype.match), _t = unapply(String.prototype.replace), vt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Tt = unapply(Object.prototype.hasOwnProperty), Et = unapply(Object.prototype.toString), Dt = unapply(RegExp.prototype.test), Ot = unconstruct(TypeError);
1327
1327
  function unapply(e) {
1328
1328
  return function(t) {
1329
1329
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1351,7 +1351,7 @@ function addToSet(e, t) {
1351
1351
  return e;
1352
1352
  }
1353
1353
  function cleanArray(e) {
1354
- for (let t = 0; t < e.length; t++) Q(e, t) || (e[t] = null);
1354
+ for (let t = 0; t < e.length; t++) Tt(e, t) || (e[t] = null);
1355
1355
  return e;
1356
1356
  }
1357
1357
  function clone(e) {
@@ -1359,7 +1359,7 @@ function clone(e) {
1359
1359
  for (let r of tt(e)) {
1360
1360
  var n = _slicedToArray(r, 2);
1361
1361
  let i = n[0], a = n[1];
1362
- Q(e, i) && (t[i] = pt(a) ? cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? clone(a) : a);
1362
+ Tt(e, i) && (t[i] = pt(a) ? cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? clone(a) : a);
1363
1363
  }
1364
1364
  return t;
1365
1365
  }
@@ -1370,18 +1370,18 @@ function stringifyValue(e) {
1370
1370
  case "boolean": return St(e);
1371
1371
  case "bigint": return Ct ? Ct(e) : "0";
1372
1372
  case "symbol": return wt ? wt(e) : "Symbol()";
1373
- case "undefined": return Tt(e);
1373
+ case "undefined": return Et(e);
1374
1374
  case "function":
1375
1375
  case "object": {
1376
- if (e === null) return Tt(e);
1376
+ if (e === null) return Et(e);
1377
1377
  let t = e, n = lookupGetter(t, "toString");
1378
1378
  if (typeof n == "function") {
1379
1379
  let e = n(t);
1380
- return typeof e == "string" ? e : Tt(e);
1380
+ return typeof e == "string" ? e : Et(e);
1381
1381
  }
1382
- return Tt(e);
1382
+ return Et(e);
1383
1383
  }
1384
- default: return Tt(e);
1384
+ default: return Et(e);
1385
1385
  }
1386
1386
  }
1387
1387
  function lookupGetter(e, t) {
@@ -1400,12 +1400,12 @@ function lookupGetter(e, t) {
1400
1400
  }
1401
1401
  function isRegex(e) {
1402
1402
  try {
1403
- return Et(e, ""), !0;
1403
+ return Dt(e, ""), !0;
1404
1404
  } catch {
1405
1405
  return !1;
1406
1406
  }
1407
1407
  }
1408
- var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), kt = Y(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), At = Y([
1408
+ var kt = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), At = Y(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), jt = Y([
1409
1409
  "feBlend",
1410
1410
  "feColorMatrix",
1411
1411
  "feComponentTransfer",
@@ -1431,7 +1431,7 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1431
1431
  "feSpotLight",
1432
1432
  "feTile",
1433
1433
  "feTurbulence"
1434
- ]), jt = Y([
1434
+ ]), Mt = Y([
1435
1435
  "animate",
1436
1436
  "color-profile",
1437
1437
  "cursor",
@@ -1454,7 +1454,7 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1454
1454
  "solidcolor",
1455
1455
  "unknown",
1456
1456
  "use"
1457
- ]), Mt = Y(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Nt = Y([
1457
+ ]), Nt = Y(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ft = Y([
1458
1458
  "maction",
1459
1459
  "maligngroup",
1460
1460
  "malignmark",
@@ -1470,13 +1470,13 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1470
1470
  "annotation-xml",
1471
1471
  "mprescripts",
1472
1472
  "none"
1473
- ]), Ft = Y(["#text"]), It = Y(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Lt = Y(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Rt = Y(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), zt = Y([
1473
+ ]), It = Y(["#text"]), Lt = Y(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Rt = Y(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), zt = Y(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Bt = Y([
1474
1474
  "xlink:href",
1475
1475
  "xml:id",
1476
1476
  "xlink:title",
1477
1477
  "xml:space",
1478
1478
  "xmlns:xlink"
1479
- ]), Bt = X(/{{[\w\W]*|^[\w\W]*}}/g), Vt = X(/<%[\w\W]*|^[\w\W]*%>/g), Ht = X(/\${[\w\W]*/g), Ut = X(/^data-[\-\w.\u00B7-\uFFFF]+$/), Wt = X(/^aria-[\-\w]+$/), Gt = X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Kt = X(/^(?:\w+script|data):/i), qt = X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Jt = X(/^html$/i), Yt = X(/^[a-z][.\w]*(-[.\w]+)+$/i), Xt = X(/<[/\w!]/g), Zt = X(/<[/\w]/g), Qt = X(/<\/no(script|embed|frames)/i), $t = X(/\/>/i), en = {
1479
+ ]), Vt = X(/{{[\w\W]*|^[\w\W]*}}/g), Ht = X(/<%[\w\W]*|^[\w\W]*%>/g), Ut = X(/\${[\w\W]*/g), Wt = X(/^data-[\-\w.\u00B7-\uFFFF]+$/), Gt = X(/^aria-[\-\w]+$/), Kt = X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), qt = X(/^(?:\w+script|data):/i), Jt = X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yt = X(/^html$/i), Xt = X(/^[a-z][.\w]*(-[.\w]+)+$/i), Zt = X(/<[/\w!]/g), Qt = X(/<[/\w]/g), $t = X(/<\/no(script|embed|frames)/i), en = X(/\/>/i), tn = {
1480
1480
  element: 1,
1481
1481
  attribute: 2,
1482
1482
  text: 3,
@@ -1489,9 +1489,9 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1489
1489
  documentType: 10,
1490
1490
  documentFragment: 11,
1491
1491
  notation: 12
1492
- }, tn = function getGlobal() {
1492
+ }, nn = function getGlobal() {
1493
1493
  return typeof window > "u" ? null : window;
1494
- }, nn = function _createTrustedTypesPolicy(e, t) {
1494
+ }, rn = function _createTrustedTypesPolicy(e, t) {
1495
1495
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
1496
1496
  let n = null, r = "data-tt-policy-suffix";
1497
1497
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -1508,7 +1508,7 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1508
1508
  } catch {
1509
1509
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
1510
1510
  }
1511
- }, rn = function _createHooksMap() {
1511
+ }, an = function _createHooksMap() {
1512
1512
  return {
1513
1513
  afterSanitizeAttributes: [],
1514
1514
  afterSanitizeElements: [],
@@ -1520,12 +1520,12 @@ var Ot = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1520
1520
  uponSanitizeElement: [],
1521
1521
  uponSanitizeShadowNode: []
1522
1522
  };
1523
- }, an = function _resolveSetOption(e, t, n, r) {
1524
- return Q(e, t) && pt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1523
+ }, on = function _resolveSetOption(e, t, n, r) {
1524
+ return Tt(e, t) && pt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1525
1525
  };
1526
1526
  function createDOMPurify() {
1527
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : tn(), DOMPurify = (e) => createDOMPurify(e);
1528
- if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== en.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1527
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : nn(), DOMPurify = (e) => createDOMPurify(e);
1528
+ if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== tn.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1529
1529
  let t = e.document, n = t, r = n.currentScript;
1530
1530
  e.DocumentFragment;
1531
1531
  let i = e.HTMLTemplateElement, a = e.Node, o = e.Element, s = e.NodeFilter;
@@ -1536,7 +1536,7 @@ function createDOMPurify() {
1536
1536
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1537
1537
  }
1538
1538
  let T, E = "", ee, D = !1, A = 0, te = function _assertNotInTrustedTypesPolicy() {
1539
- if (A > 0) throw Dt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1539
+ if (A > 0) throw Ot("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1540
1540
  }, ne = function _createTrustedHTML(e) {
1541
1541
  te(), A++;
1542
1542
  try {
@@ -1552,20 +1552,20 @@ function createDOMPurify() {
1552
1552
  A--;
1553
1553
  }
1554
1554
  }, j = function _getDefaultTrustedTypesPolicy() {
1555
- return D || (ee = nn(d, r), D = !0), ee;
1556
- }, M = t, N = M.implementation, ce = M.createNodeIterator, le = M.createDocumentFragment, R = M.getElementsByTagName, B = n.importNode, V = rn();
1555
+ return D || (ee = rn(d, r), D = !0), ee;
1556
+ }, M = t, N = M.implementation, ce = M.createNodeIterator, le = M.createDocumentFragment, R = M.getElementsByTagName, B = n.importNode, V = an();
1557
1557
  DOMPurify.isSupported = typeof tt == "function" && typeof v == "function" && N && N.createHTMLDocument !== void 0;
1558
- let ue = Bt, fe = Vt, pe = Ht, me = Ut, he = Wt, ge = Kt, _e = qt, ve = Yt, ye = Gt, H = null, xe = addToSet({}, [
1559
- ...Ot,
1558
+ let ue = Vt, fe = Ht, pe = Ut, me = Wt, he = Gt, ge = qt, _e = Jt, ve = Xt, ye = Kt, H = null, xe = addToSet({}, [
1560
1559
  ...kt,
1561
1560
  ...At,
1562
- ...Mt,
1563
- ...Ft
1561
+ ...jt,
1562
+ ...Nt,
1563
+ ...It
1564
1564
  ]), U = null, G = addToSet({}, [
1565
- ...It,
1566
1565
  ...Lt,
1567
1566
  ...Rt,
1568
- ...zt
1567
+ ...zt,
1568
+ ...Bt
1569
1569
  ]), K = Object.seal(at(null, {
1570
1570
  tagNameCheck: {
1571
1571
  writable: !0,
@@ -1630,32 +1630,32 @@ function createDOMPurify() {
1630
1630
  "mn",
1631
1631
  "ms",
1632
1632
  "mtext"
1633
- ]), St = addToSet({}, xt), Ct = Y(["annotation-xml"]), wt = addToSet({}, Ct), Tt = addToSet({}, [
1633
+ ]), St = addToSet({}, xt), Ct = Y(["annotation-xml"]), wt = addToSet({}, Ct), Et = addToSet({}, [
1634
1634
  "title",
1635
1635
  "style",
1636
1636
  "font",
1637
1637
  "a",
1638
1638
  "script"
1639
- ]), on = null, sn = ["application/xhtml+xml", "text/html"], $ = null, cn = null, ln = t.createElement("form"), un = function isRegexOrFunction(e) {
1639
+ ]), sn = null, cn = ["application/xhtml+xml", "text/html"], Q = null, ln = null, $ = t.createElement("form"), un = function isRegexOrFunction(e) {
1640
1640
  return e instanceof RegExp || e instanceof Function;
1641
1641
  }, dn = function _parseConfig() {
1642
1642
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1643
- if (cn && cn === e) return;
1644
- (!e || typeof e != "object") && (e = {}), e = clone(e), on = sn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, $ = on === "application/xhtml+xml" ? ht : mt, H = an(e, "ALLOWED_TAGS", xe, { transform: $ }), U = an(e, "ALLOWED_ATTR", G, { transform: $ }), st = an(e, "ALLOWED_NAMESPACES", ct, { transform: ht }), $e = an(e, "ADD_URI_SAFE_ATTR", et, {
1645
- transform: $,
1643
+ if (ln && ln === e) return;
1644
+ (!e || typeof e != "object") && (e = {}), e = clone(e), sn = cn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = sn === "application/xhtml+xml" ? ht : mt, H = on(e, "ALLOWED_TAGS", xe, { transform: Q }), U = on(e, "ALLOWED_ATTR", G, { transform: Q }), st = on(e, "ALLOWED_NAMESPACES", ct, { transform: ht }), $e = on(e, "ADD_URI_SAFE_ATTR", et, {
1645
+ transform: Q,
1646
1646
  base: et
1647
- }), Ze = an(e, "ADD_DATA_URI_TAGS", Qe, {
1648
- transform: $,
1647
+ }), Ze = on(e, "ADD_DATA_URI_TAGS", Qe, {
1648
+ transform: Q,
1649
1649
  base: Qe
1650
- }), Ye = an(e, "FORBID_CONTENTS", Xe, { transform: $ }), Se = an(e, "FORBID_TAGS", clone({}), { transform: $ }), Ce = an(e, "FORBID_ATTR", clone({}), { transform: $ }), Je = Q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, De = e.ALLOW_ARIA_ATTR !== !1, ke = e.ALLOW_DATA_ATTR !== !1, Ae = e.ALLOW_UNKNOWN_PROTOCOLS || !1, je = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Me = e.SAFE_FOR_TEMPLATES || !1, Ne = e.SAFE_FOR_XML !== !1, Pe = e.WHOLE_DOCUMENT || !1, Be = e.RETURN_DOM || !1, Ve = e.RETURN_DOM_FRAGMENT || !1, He = e.RETURN_TRUSTED_TYPE || !1, ze = e.FORCE_BODY || !1, Ue = e.SANITIZE_DOM !== !1, We = e.SANITIZE_NAMED_PROPS || !1, Ke = e.KEEP_CONTENT !== !1, qe = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Gt, it = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, St = Q(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, xt), wt = Q(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Ct);
1651
- let t = Q(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : at(null);
1652
- if (K = at(null), Q(t, "tagNameCheck") && un(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), Q(t, "attributeNameCheck") && un(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), Q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), X(K), Me && (ke = !1), Ve && (Be = !0), Je && (H = addToSet({}, Ft), U = at(null), Je.html === !0 && (addToSet(H, Ot), addToSet(U, It)), Je.svg === !0 && (addToSet(H, kt), addToSet(U, Lt), addToSet(U, zt)), Je.svgFilters === !0 && (addToSet(H, At), addToSet(U, Lt), addToSet(U, zt)), Je.mathMl === !0 && (addToSet(H, Mt), addToSet(U, Rt), addToSet(U, zt))), Ee.tagCheck = null, Ee.attributeCheck = null, Q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ee.tagCheck = e.ADD_TAGS : pt(e.ADD_TAGS) && (H === xe && (H = clone(H)), addToSet(H, e.ADD_TAGS, $))), Q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ee.attributeCheck = e.ADD_ATTR : pt(e.ADD_ATTR) && (U === G && (U = clone(U)), addToSet(U, e.ADD_ATTR, $))), Q(e, "ADD_URI_SAFE_ATTR") && pt(e.ADD_URI_SAFE_ATTR) && addToSet($e, e.ADD_URI_SAFE_ATTR, $), Q(e, "FORBID_CONTENTS") && pt(e.FORBID_CONTENTS) && (Ye === Xe && (Ye = clone(Ye)), addToSet(Ye, e.FORBID_CONTENTS, $)), Q(e, "ADD_FORBID_CONTENTS") && pt(e.ADD_FORBID_CONTENTS) && (Ye === Xe && (Ye = clone(Ye)), addToSet(Ye, e.ADD_FORBID_CONTENTS, $)), Ke && (H["#text"] = !0), Pe && addToSet(H, [
1650
+ }), Ye = on(e, "FORBID_CONTENTS", Xe, { transform: Q }), Se = on(e, "FORBID_TAGS", clone({}), { transform: Q }), Ce = on(e, "FORBID_ATTR", clone({}), { transform: Q }), Je = Tt(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, De = e.ALLOW_ARIA_ATTR !== !1, ke = e.ALLOW_DATA_ATTR !== !1, Ae = e.ALLOW_UNKNOWN_PROTOCOLS || !1, je = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Me = e.SAFE_FOR_TEMPLATES || !1, Ne = e.SAFE_FOR_XML !== !1, Pe = e.WHOLE_DOCUMENT || !1, Be = e.RETURN_DOM || !1, Ve = e.RETURN_DOM_FRAGMENT || !1, He = e.RETURN_TRUSTED_TYPE || !1, ze = e.FORCE_BODY || !1, Ue = e.SANITIZE_DOM !== !1, We = e.SANITIZE_NAMED_PROPS || !1, Ke = e.KEEP_CONTENT !== !1, qe = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Kt, it = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, St = Tt(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, xt), wt = Tt(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Ct);
1651
+ let t = Tt(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : at(null);
1652
+ if (K = at(null), Tt(t, "tagNameCheck") && un(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), Tt(t, "attributeNameCheck") && un(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), Tt(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), X(K), Me && (ke = !1), Ve && (Be = !0), Je && (H = addToSet({}, It), U = at(null), Je.html === !0 && (addToSet(H, kt), addToSet(U, Lt)), Je.svg === !0 && (addToSet(H, At), addToSet(U, Rt), addToSet(U, Bt)), Je.svgFilters === !0 && (addToSet(H, jt), addToSet(U, Rt), addToSet(U, Bt)), Je.mathMl === !0 && (addToSet(H, Nt), addToSet(U, zt), addToSet(U, Bt))), Ee.tagCheck = null, Ee.attributeCheck = null, Tt(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ee.tagCheck = e.ADD_TAGS : pt(e.ADD_TAGS) && (H === xe && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), Tt(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ee.attributeCheck = e.ADD_ATTR : pt(e.ADD_ATTR) && (U === G && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), Tt(e, "ADD_URI_SAFE_ATTR") && pt(e.ADD_URI_SAFE_ATTR) && addToSet($e, e.ADD_URI_SAFE_ATTR, Q), Tt(e, "FORBID_CONTENTS") && pt(e.FORBID_CONTENTS) && (Ye === Xe && (Ye = clone(Ye)), addToSet(Ye, e.FORBID_CONTENTS, Q)), Tt(e, "ADD_FORBID_CONTENTS") && pt(e.ADD_FORBID_CONTENTS) && (Ye === Xe && (Ye = clone(Ye)), addToSet(Ye, e.ADD_FORBID_CONTENTS, Q)), Ke && (H["#text"] = !0), Pe && addToSet(H, [
1653
1653
  "html",
1654
1654
  "head",
1655
1655
  "body"
1656
1656
  ]), H.table && (addToSet(H, ["tbody"]), delete Se.tbody), e.TRUSTED_TYPES_POLICY) {
1657
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Dt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1658
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Dt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1657
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Ot("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1658
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Ot("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1659
1659
  let t = T;
1660
1660
  T = e.TRUSTED_TYPES_POLICY;
1661
1661
  try {
@@ -1664,17 +1664,17 @@ function createDOMPurify() {
1664
1664
  throw T = t, e;
1665
1665
  }
1666
1666
  } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, E = "") : (T === void 0 && (T = j()), T && typeof E == "string" && (E = ne("")));
1667
- Y && Y(e), cn = e;
1667
+ Y && Y(e), ln = e;
1668
1668
  }, fn = addToSet({}, [
1669
- ...kt,
1670
1669
  ...At,
1671
- ...jt
1672
- ]), pn = addToSet({}, [...Mt, ...Nt]), mn = function _checkSvgNamespace(e, t, n) {
1670
+ ...jt,
1671
+ ...Mt
1672
+ ]), pn = addToSet({}, [...Nt, ...Ft]), mn = function _checkSvgNamespace(e, t, n) {
1673
1673
  return t.namespaceURI === J ? e === "svg" : t.namespaceURI === nt ? e === "svg" && (n === "annotation-xml" || St[n]) : !!fn[e];
1674
1674
  }, hn = function _checkMathMlNamespace(e, t, n) {
1675
1675
  return t.namespaceURI === J ? e === "math" : t.namespaceURI === rt ? e === "math" && wt[n] : !!pn[e];
1676
1676
  }, gn = function _checkHtmlNamespace(e, t, n) {
1677
- return t.namespaceURI === rt && !wt[n] || t.namespaceURI === nt && !St[n] ? !1 : !pn[e] && (Tt[e] || !fn[e]);
1677
+ return t.namespaceURI === rt && !wt[n] || t.namespaceURI === nt && !St[n] ? !1 : !pn[e] && (Et[e] || !fn[e]);
1678
1678
  }, _n = function _checkValidNamespace(e) {
1679
1679
  let t = v(e);
1680
1680
  (!t || !t.tagName) && (t = {
@@ -1682,13 +1682,13 @@ function createDOMPurify() {
1682
1682
  tagName: "template"
1683
1683
  });
1684
1684
  let n = mt(e.tagName), r = mt(t.tagName);
1685
- return st[e.namespaceURI] ? e.namespaceURI === rt ? mn(n, t, r) : e.namespaceURI === nt ? hn(n, t, r) : e.namespaceURI === J ? gn(n, t, r) : !!(on === "application/xhtml+xml" && st[e.namespaceURI]) : !1;
1685
+ return st[e.namespaceURI] ? e.namespaceURI === rt ? mn(n, t, r) : e.namespaceURI === nt ? hn(n, t, r) : e.namespaceURI === J ? gn(n, t, r) : !!(sn === "application/xhtml+xml" && st[e.namespaceURI]) : !1;
1686
1686
  }, vn = function _forceRemove(e) {
1687
1687
  dt(DOMPurify.removed, { element: e });
1688
1688
  try {
1689
1689
  v(e).removeChild(e);
1690
1690
  } catch {
1691
- if (m(e), !v(e)) throw Dt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1691
+ if (m(e), !v(e)) throw Ot("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1692
1692
  }
1693
1693
  }, yn = function _neutralizeRoot(e) {
1694
1694
  Sn(e);
@@ -1734,7 +1734,7 @@ function createDOMPurify() {
1734
1734
  let t = b(e);
1735
1735
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1736
1736
  let r = t[n], i = r && r.name;
1737
- if (!(typeof i != "string" || U[$(i)])) try {
1737
+ if (!(typeof i != "string" || U[Q(i)])) try {
1738
1738
  e.removeAttribute(i);
1739
1739
  } catch {}
1740
1740
  }
@@ -1742,7 +1742,7 @@ function createDOMPurify() {
1742
1742
  let t = [e];
1743
1743
  for (; t.length > 0;) {
1744
1744
  let e = t.pop();
1745
- (x ? x(e) : e.nodeType) === en.element && xn(e);
1745
+ (x ? x(e) : e.nodeType) === tn.element && xn(e);
1746
1746
  let n = _(e);
1747
1747
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1748
1748
  }
@@ -1751,14 +1751,14 @@ function createDOMPurify() {
1751
1751
  let t = [e];
1752
1752
  for (; t.length > 0;) {
1753
1753
  let e = t.pop(), n = x ? x(e) : e.nodeType;
1754
- if (n === en.processingInstruction || n === en.comment && Et(Zt, e.data)) {
1754
+ if (n === tn.processingInstruction || n === tn.comment && Dt(Qt, e.data)) {
1755
1755
  try {
1756
1756
  m(e);
1757
1757
  } catch {}
1758
1758
  continue;
1759
1759
  }
1760
- if (n === en.element) {
1761
- let t = e, n = $(w ? w(e) : e.nodeName);
1760
+ if (n === tn.element) {
1761
+ let t = e, n = Q(w ? w(e) : e.nodeName);
1762
1762
  try {
1763
1763
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
1764
1764
  } catch {}
@@ -1773,10 +1773,10 @@ function createDOMPurify() {
1773
1773
  let t = gt(e, /^[\r\n\t ]+/);
1774
1774
  r = t && t[0];
1775
1775
  }
1776
- on === "application/xhtml+xml" && it === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1776
+ sn === "application/xhtml+xml" && it === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1777
1777
  let i = T ? ne(e) : e;
1778
1778
  if (it === J) try {
1779
- n = new c().parseFromString(i, on);
1779
+ n = new c().parseFromString(i, sn);
1780
1780
  } catch {}
1781
1781
  if (!n || !n.documentElement) {
1782
1782
  n = N.createDocument(it, "template", null);
@@ -1800,11 +1800,11 @@ function createDOMPurify() {
1800
1800
  });
1801
1801
  }, On = function _isClobbered(e) {
1802
1802
  let t = w ? w(e) : null;
1803
- return typeof t != "string" || $(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1803
+ return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1804
1804
  }, kn = function _isDocumentFragment(e) {
1805
1805
  if (!x || typeof e != "object" || !e) return !1;
1806
1806
  try {
1807
- return x(e) === en.documentFragment;
1807
+ return x(e) === tn.documentFragment;
1808
1808
  } catch {
1809
1809
  return !1;
1810
1810
  }
@@ -1818,13 +1818,13 @@ function createDOMPurify() {
1818
1818
  };
1819
1819
  function _executeHooks(e, t, n) {
1820
1820
  e.length !== 0 && lt(e, (e) => {
1821
- e.call(DOMPurify, t, n, cn);
1821
+ e.call(DOMPurify, t, n, ln);
1822
1822
  });
1823
1823
  }
1824
1824
  let jn = function _isUnsafeNode(e, t) {
1825
- return !!(Ne && e.hasChildNodes() && !An(e.firstElementChild) && Et(Xt, e.textContent) && Et(Xt, e.innerHTML) || Ne && e.namespaceURI === J && t === "style" && An(e.firstElementChild) || e.nodeType === en.processingInstruction || Ne && e.nodeType === en.comment && Et(Zt, e.data));
1825
+ return !!(Ne && e.hasChildNodes() && !An(e.firstElementChild) && Dt(Zt, e.textContent) && Dt(Zt, e.innerHTML) || Ne && e.namespaceURI === J && t === "style" && An(e.firstElementChild) || e.nodeType === tn.processingInstruction || Ne && e.nodeType === tn.comment && Dt(Qt, e.data));
1826
1826
  }, Mn = function _sanitizeDisallowedNode(e, t) {
1827
- if (!Se[t] && In(t) && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1827
+ if (!Se[t] && In(t) && (K.tagNameCheck instanceof RegExp && Dt(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1828
1828
  if (Ke && !Ye[t]) {
1829
1829
  let t = v(e), n = _(e);
1830
1830
  if (n && t) {
@@ -1839,7 +1839,7 @@ function createDOMPurify() {
1839
1839
  }, Nn = function _sanitizeElements(e, t) {
1840
1840
  if (_executeHooks(V.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1841
1841
  if (On(e)) return vn(e), !0;
1842
- let n = $(w ? w(e) : e.nodeName);
1842
+ let n = Q(w ? w(e) : e.nodeName);
1843
1843
  if (_executeHooks(V.uponSanitizeElement, e, {
1844
1844
  tagName: n,
1845
1845
  allowedTags: H
@@ -1849,19 +1849,19 @@ function createDOMPurify() {
1849
1849
  let t = Mn(e, n);
1850
1850
  return t === !1 && _executeHooks(V.afterSanitizeElements, e, null), t;
1851
1851
  }
1852
- if ((x ? x(e) : e.nodeType) === en.element && !_n(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Et(Qt, e.innerHTML)) return vn(e), !0;
1853
- if (Me && e.nodeType === en.text) {
1852
+ if ((x ? x(e) : e.nodeType) === tn.element && !_n(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Dt($t, e.innerHTML)) return vn(e), !0;
1853
+ if (Me && e.nodeType === tn.text) {
1854
1854
  let t = En(e.textContent);
1855
1855
  e.textContent !== t && (dt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1856
1856
  }
1857
1857
  return _executeHooks(V.afterSanitizeElements, e, null), !1;
1858
1858
  }, Pn = function _isValidAttribute(e, n, r) {
1859
- if (Ce[n] || Ne && n === "patchsrc" || Ne && n === "for" && e !== "label" && e !== "output" || Ue && (n === "id" || n === "name") && (r in t || r in ln)) return !1;
1859
+ if (Ce[n] || Ne && n === "patchsrc" || Ne && n === "for" && e !== "label" && e !== "output" || Ue && (n === "id" || n === "name") && (r in t || r in $)) return !1;
1860
1860
  let i = U[n] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(n, e);
1861
- if (!(ke && Et(me, n)) && !(De && Et(he, n))) {
1861
+ if (!(ke && Dt(me, n)) && !(De && Dt(he, n))) {
1862
1862
  if (!i) {
1863
- if (!(In(e) && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Et(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1864
- } else if (!$e[n] && !Et(ye, _t(r, _e, "")) && (n !== "src" && n !== "xlink:href" && n !== "href" || e === "script" || vt(r, "data:") !== 0 || !Ze[e]) && (!Ae || Et(ge, _t(r, _e, ""))) && r) return !1;
1863
+ if (!(In(e) && (K.tagNameCheck instanceof RegExp && Dt(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Dt(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Dt(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1864
+ } else if (!$e[n] && !Dt(ye, _t(r, _e, "")) && (n !== "src" && n !== "xlink:href" && n !== "href" || e === "script" || vt(r, "data:") !== 0 || !Ze[e]) && (!Ae || Dt(ge, _t(r, _e, ""))) && r) return !1;
1865
1865
  }
1866
1866
  return !0;
1867
1867
  }, Fn = addToSet({}, [
@@ -1874,7 +1874,7 @@ function createDOMPurify() {
1874
1874
  "font-face-uri",
1875
1875
  "missing-glyph"
1876
1876
  ]), In = function _isBasicCustomElement(e) {
1877
- return !Fn[mt(e)] && Et(ve, e);
1877
+ return !Fn[mt(e)] && Dt(ve, e);
1878
1878
  }, Ln = function _applyTrustedTypesToAttribute(e, t, n, r) {
1879
1879
  if (T && typeof d == "object" && typeof d.getAttributeType == "function" && !n) switch (d.getAttributeType(e, t)) {
1880
1880
  case "TrustedHTML": return ne(r);
@@ -1897,10 +1897,10 @@ function createDOMPurify() {
1897
1897
  keepAttr: !0,
1898
1898
  allowedAttributes: U,
1899
1899
  forceKeepAttr: void 0
1900
- }, r = t.length, i = $(e.nodeName);
1900
+ }, r = t.length, i = Q(e.nodeName);
1901
1901
  for (; r--;) {
1902
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, d = $(o), f = c, p = o === "value" ? f : bt(f);
1903
- if (n.attrName = d, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(V.uponSanitizeAttribute, e, n), p = n.attrValue, We && (d === "id" || d === "name") && vt(p, Ge) !== 0 && (bn(o, e), p = Ge + p), Ne && Et(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1902
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, d = Q(o), f = c, p = o === "value" ? f : bt(f);
1903
+ if (n.attrName = d, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(V.uponSanitizeAttribute, e, n), p = n.attrValue, We && (d === "id" || d === "name") && vt(p, Ge) !== 0 && (bn(o, e), p = Ge + p), Ne && Dt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1904
1904
  bn(o, e);
1905
1905
  continue;
1906
1906
  }
@@ -1913,7 +1913,7 @@ function createDOMPurify() {
1913
1913
  bn(o, e);
1914
1914
  continue;
1915
1915
  }
1916
- if (!je && Et($t, p)) {
1916
+ if (!je && Dt(en, p)) {
1917
1917
  bn(o, e);
1918
1918
  continue;
1919
1919
  }
@@ -1927,7 +1927,7 @@ function createDOMPurify() {
1927
1927
  _executeHooks(V.afterSanitizeAttributes, e, null);
1928
1928
  }, Bn = function _sanitizeShadowDOM(e) {
1929
1929
  let t = null, n = Tn(e);
1930
- for (_executeHooks(V.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(V.uponSanitizeShadowNode, t, null), Nn(t, e), zn(t), kn(t.content) && Bn(t.content), (x ? x(t) : t.nodeType) === en.element) {
1930
+ for (_executeHooks(V.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(V.uponSanitizeShadowNode, t, null), Nn(t, e), zn(t), kn(t.content) && Bn(t.content), (x ? x(t) : t.nodeType) === tn.element) {
1931
1931
  let e = y(t);
1932
1932
  kn(e) && (Vn(e), Bn(e));
1933
1933
  }
@@ -1943,14 +1943,14 @@ function createDOMPurify() {
1943
1943
  Bn(e.shadow);
1944
1944
  continue;
1945
1945
  }
1946
- let n = e.node, r = (x ? x(n) : n.nodeType) === en.element, i = _(n);
1946
+ let n = e.node, r = (x ? x(n) : n.nodeType) === tn.element, i = _(n);
1947
1947
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
1948
1948
  node: i[e],
1949
1949
  shadow: null
1950
1950
  });
1951
1951
  if (r) {
1952
1952
  let e = w ? w(n) : null;
1953
- if (typeof e == "string" && $(e) === "template") {
1953
+ if (typeof e == "string" && Q(e) === "template") {
1954
1954
  let e = n.content;
1955
1955
  kn(e) && t.push({
1956
1956
  node: e,
@@ -1972,7 +1972,7 @@ function createDOMPurify() {
1972
1972
  };
1973
1973
  return DOMPurify.sanitize = function(e) {
1974
1974
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
1975
- if (ot = !e, ot && (e = "<!-->"), typeof e != "string" && !An(e) && (e = stringifyValue(e), typeof e != "string")) throw Dt("dirty is not a string, aborting");
1975
+ if (ot = !e, ot && (e = "<!-->"), typeof e != "string" && !An(e) && (e = stringifyValue(e), typeof e != "string")) throw Ot("dirty is not a string, aborting");
1976
1976
  if (!DOMPurify.isSupported) return e;
1977
1977
  Fe ? (H = Ie, U = Le) : dn(t), (V.uponSanitizeElement.length > 0 || V.uponSanitizeAttribute.length > 0) && (H = clone(H)), V.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1978
1978
  let s = qe && typeof e != "string" && An(e);
@@ -1980,16 +1980,16 @@ function createDOMPurify() {
1980
1980
  Cn(e);
1981
1981
  let t = w ? w(e) : e.nodeName;
1982
1982
  if (typeof t == "string") {
1983
- let n = $(t);
1984
- if (!H[n] || Se[n]) throw yn(e), Dt("root node is forbidden and cannot be sanitized in-place");
1983
+ let n = Q(t);
1984
+ if (!H[n] || Se[n]) throw yn(e), Ot("root node is forbidden and cannot be sanitized in-place");
1985
1985
  }
1986
- if (On(e)) throw yn(e), Dt("root node is clobbered and cannot be sanitized in-place");
1986
+ if (On(e)) throw yn(e), Ot("root node is clobbered and cannot be sanitized in-place");
1987
1987
  try {
1988
1988
  Vn(e);
1989
1989
  } catch (t) {
1990
1990
  throw yn(e), t;
1991
1991
  }
1992
- } else if (An(e)) r = wn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === en.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), Vn(i);
1992
+ } else if (An(e)) r = wn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === tn.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), Vn(i);
1993
1993
  else {
1994
1994
  if (!Be && !Me && !Pe && e.indexOf("<") === -1) return T && He ? ne(e) : e;
1995
1995
  if (r = wn(e), !r) return Be ? null : He ? E : "";
@@ -2012,20 +2012,20 @@ function createDOMPurify() {
2012
2012
  return (U.shadowroot || U.shadowrootmode) && (o = B.call(n, o, !0)), o;
2013
2013
  }
2014
2014
  let f = Pe ? r.outerHTML : r.innerHTML;
2015
- return Pe && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Et(Jt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Me && (f = En(f)), T && He ? ne(f) : f;
2015
+ return Pe && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Dt(Yt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Me && (f = En(f)), T && He ? ne(f) : f;
2016
2016
  }, DOMPurify.setConfig = function() {
2017
2017
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2018
2018
  dn(e), Fe = !0, Ie = H, Le = U;
2019
2019
  }, DOMPurify.clearConfig = function() {
2020
- cn = null, Fe = !1, Ie = null, Le = null, T = ee, E = "";
2020
+ ln = null, Fe = !1, Ie = null, Le = null, T = ee, E = "";
2021
2021
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2022
- cn || dn({});
2023
- let r = $(e), i = $(t);
2022
+ ln || dn({});
2023
+ let r = Q(e), i = Q(t);
2024
2024
  return Pn(r, i, n);
2025
2025
  }, DOMPurify.addHook = function(e, t) {
2026
- typeof t == "function" && Q(V, e) && dt(V[e], t);
2026
+ typeof t == "function" && Tt(V, e) && dt(V[e], t);
2027
2027
  }, DOMPurify.removeHook = function(e, t) {
2028
- if (Q(V, e)) {
2028
+ if (Tt(V, e)) {
2029
2029
  if (t !== void 0) {
2030
2030
  let n = Z(V[e], t);
2031
2031
  return n === -1 ? void 0 : ft(V[e], n, 1)[0];
@@ -2033,12 +2033,12 @@ function createDOMPurify() {
2033
2033
  return ut(V[e]);
2034
2034
  }
2035
2035
  }, DOMPurify.removeHooks = function(e) {
2036
- Q(V, e) && (V[e] = []);
2036
+ Tt(V, e) && (V[e] = []);
2037
2037
  }, DOMPurify.removeAllHooks = function() {
2038
- V = rn();
2038
+ V = an();
2039
2039
  }, DOMPurify;
2040
2040
  }
2041
- var on = createDOMPurify(), _Class;
2041
+ var sn = createDOMPurify(), _Class;
2042
2042
  function I() {
2043
2043
  return {
2044
2044
  async: !1,
@@ -2053,11 +2053,11 @@ function I() {
2053
2053
  walkTokens: null
2054
2054
  };
2055
2055
  }
2056
- var sn = I();
2056
+ var cn = I();
2057
2057
  function W(e) {
2058
- sn = e;
2058
+ cn = e;
2059
2059
  }
2060
- var $ = { exec: () => null };
2060
+ var Q = { exec: () => null };
2061
2061
  function C(e) {
2062
2062
  let t = [];
2063
2063
  return (n) => {
@@ -2069,19 +2069,19 @@ function h(e, t = "") {
2069
2069
  let n = typeof e == "string" ? e : e.source, r = {
2070
2070
  replace: (e, t) => {
2071
2071
  let i = typeof t == "string" ? t : t.source;
2072
- return i = i.replace(ln.caret, "$1"), n = n.replace(e, i), r;
2072
+ return i = i.replace($.caret, "$1"), n = n.replace(e, i), r;
2073
2073
  },
2074
2074
  getRegex: () => new RegExp(n, t)
2075
2075
  };
2076
2076
  return r;
2077
2077
  }
2078
- var cn = ((e = "") => {
2078
+ var ln = ((e = "") => {
2079
2079
  try {
2080
2080
  return !!RegExp("(?<=1)(?<!1)" + e);
2081
2081
  } catch {
2082
2082
  return !1;
2083
2083
  }
2084
- })(), ln = {
2084
+ })(), $ = {
2085
2085
  codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm,
2086
2086
  outputLinkReplace: /\\([\[\]])/g,
2087
2087
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2153,7 +2153,7 @@ var cn = ((e = "") => {
2153
2153
  list: Cn,
2154
2154
  newline: un,
2155
2155
  paragraph: Dn,
2156
- table: $,
2156
+ table: Q,
2157
2157
  text: bn
2158
2158
  }, An = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), jn = {
2159
2159
  ...kn,
@@ -2165,19 +2165,19 @@ var cn = ((e = "") => {
2165
2165
  html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Tn).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(),
2166
2166
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2167
2167
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2168
- fences: $,
2168
+ fences: Q,
2169
2169
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2170
2170
  paragraph: h(yn).replace("hr", pn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", _n).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2171
- }, Nn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, In = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ln = /[\p{P}\p{S}]/u, Rn = /[\s\p{P}\p{S}]/u, zn = /[^\s\p{P}\p{S}]/u, Bn = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Rn).getRegex(), Vn = /[\p{Pi}\p{Ps}"']/u, Hn = /(?!~)[\p{P}\p{S}]/u, Un = /(?!~)[\s\p{P}\p{S}]/u, Wn = /(?:[^\s\p{P}\p{S}]|~)/u, Gn = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", cn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Kn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, qn = h(Kn, "u").replace(/punct/g, Ln).getRegex(), Jn = h(Kn, "u").replace(/punct/g, Hn).getRegex(), Yn = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Vn).replace(/punct/g, Ln).getRegex(), Xn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Zn = h(Xn, "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), Qn = h(Xn, "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Un).replace(/punct/g, Hn).getRegex(), $n = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), er = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), tr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), nr = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ln).getRegex(), rr = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), ir = h(/\\(punct)/, "gu").replace(/punct/g, Ln).getRegex(), ar = h(/^<(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(), or = h(Tn).replace("(?:-->|$)", "-->").getRegex(), sr = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", or).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), cr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, lr = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", cr).getRegex(), ur = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", lr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), dr = h(/^!?\[(label)\]\[(ref)\]/).replace("label", lr).replace("ref", xn).getRegex(), fr = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", xn).getRegex(), pr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, mr = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", cr).getRegex(), hr = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", mr).replace("ref", pr).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", pr).getRegex()).getRegex(), gr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, _r = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), vr = {
2172
- _backpedal: $,
2171
+ }, Nn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, In = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ln = /[\p{P}\p{S}]/u, Rn = /[\s\p{P}\p{S}]/u, zn = /[^\s\p{P}\p{S}]/u, Bn = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Rn).getRegex(), Vn = /[\p{Pi}\p{Ps}"']/u, Hn = /(?!~)[\p{P}\p{S}]/u, Un = /(?!~)[\s\p{P}\p{S}]/u, Wn = /(?:[^\s\p{P}\p{S}]|~)/u, Gn = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ln ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Kn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, qn = h(Kn, "u").replace(/punct/g, Ln).getRegex(), Jn = h(Kn, "u").replace(/punct/g, Hn).getRegex(), Yn = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Vn).replace(/punct/g, Ln).getRegex(), Xn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Zn = h(Xn, "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), Qn = h(Xn, "gu").replace(/notPunctSpace/g, Wn).replace(/punctSpace/g, Un).replace(/punct/g, Hn).getRegex(), $n = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), er = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), tr = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), nr = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ln).getRegex(), rr = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), ir = h(/\\(punct)/, "gu").replace(/punct/g, Ln).getRegex(), ar = h(/^<(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(), or = h(Tn).replace("(?:-->|$)", "-->").getRegex(), sr = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", or).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), cr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, lr = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", cr).getRegex(), ur = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", lr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), dr = h(/^!?\[(label)\]\[(ref)\]/).replace("label", lr).replace("ref", xn).getRegex(), fr = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", xn).getRegex(), pr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, mr = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", cr).getRegex(), hr = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", mr).replace("ref", pr).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", pr).getRegex()).getRegex(), gr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, _r = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), vr = {
2172
+ _backpedal: Q,
2173
2173
  anyPunctuation: ir,
2174
2174
  autolink: ar,
2175
2175
  blockSkip: Gn,
2176
2176
  br: Fn,
2177
2177
  code: Pn,
2178
- del: $,
2179
- delLDelim: $,
2180
- delRDelim: $,
2178
+ del: Q,
2179
+ delLDelim: Q,
2180
+ delRDelim: Q,
2181
2181
  emStrongLDelim: qn,
2182
2182
  emStrongRDelimAst: Zn,
2183
2183
  emStrongRDelimUnd: er,
@@ -2189,7 +2189,7 @@ var cn = ((e = "") => {
2189
2189
  reflinkSearch: hr,
2190
2190
  tag: sr,
2191
2191
  text: In,
2192
- url: $
2192
+ url: Q
2193
2193
  }, yr = {
2194
2194
  ...vr,
2195
2195
  emStrongLDelim: Yn,
@@ -2229,35 +2229,35 @@ var cn = ((e = "") => {
2229
2229
  }, be = (e) => wr[e];
2230
2230
  function O(e, t) {
2231
2231
  if (t) {
2232
- if (ln.escapeTest.test(e)) return e.replace(ln.escapeReplace, be);
2233
- } else if (ln.escapeTestNoEncode.test(e)) return e.replace(ln.escapeReplaceNoEncode, be);
2232
+ if ($.escapeTest.test(e)) return e.replace($.escapeReplace, be);
2233
+ } else if ($.escapeTestNoEncode.test(e)) return e.replace($.escapeReplaceNoEncode, be);
2234
2234
  return e;
2235
2235
  }
2236
2236
  function Re(e) {
2237
- return e.replace(ln.numericCharacterReference, (e, t, n) => {
2237
+ return e.replace($.numericCharacterReference, (e, t, n) => {
2238
2238
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
2239
2239
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : String.fromCodePoint(r);
2240
2240
  });
2241
2241
  }
2242
2242
  function re(e) {
2243
2243
  try {
2244
- e = encodeURI(e).replace(ln.percentDecode, "%");
2244
+ e = encodeURI(e).replace($.percentDecode, "%");
2245
2245
  } catch {
2246
2246
  return null;
2247
2247
  }
2248
2248
  return e;
2249
2249
  }
2250
2250
  function se(e, t) {
2251
- let n = e.replace(ln.findPipe, (e, t, n) => {
2251
+ let n = e.replace($.findPipe, (e, t, n) => {
2252
2252
  let r = !1, i = t;
2253
2253
  for (; --i >= 0 && n[i] === "\\";) r = !r;
2254
2254
  return r ? "|" : " |";
2255
- }).split(ln.splitPipe), r = 0;
2255
+ }).split($.splitPipe), r = 0;
2256
2256
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
2257
2257
  if (n.length > t) n.splice(t);
2258
2258
  else for (; n.length < t;) n.push("");
2259
2259
  }
2260
- for (; r < n.length; r++) n[r] = n[r].trim().replace(ln.slashPipe, "|");
2260
+ for (; r < n.length; r++) n[r] = n[r].trim().replace($.slashPipe, "|");
2261
2261
  return n;
2262
2262
  }
2263
2263
  function L(e, t, n) {
@@ -2274,7 +2274,7 @@ function L(e, t, n) {
2274
2274
  }
2275
2275
  function ie(e) {
2276
2276
  let t = e.split("\n"), n = t.length - 1;
2277
- for (; n >= 0 && ln.blankLine.test(t[n]);) n--;
2277
+ for (; n >= 0 && $.blankLine.test(t[n]);) n--;
2278
2278
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2279
2279
  }
2280
2280
  function q(e) {
@@ -2354,7 +2354,7 @@ function we(e, t, n, r) {
2354
2354
  }
2355
2355
  var P = class {
2356
2356
  constructor(e) {
2357
- t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || sn;
2357
+ t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || cn;
2358
2358
  }
2359
2359
  space(e) {
2360
2360
  let t = this.rules.block.newline.exec(e);
@@ -2819,14 +2819,14 @@ ${p.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
2819
2819
  }
2820
2820
  }, Tr = class l {
2821
2821
  constructor(e) {
2822
- t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || sn, this.options.tokenizer = this.options.tokenizer || new P(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2822
+ t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || cn, this.options.tokenizer = this.options.tokenizer || new P(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2823
2823
  inLink: !1,
2824
2824
  inRawBlock: !1,
2825
2825
  linkEmitted: !1,
2826
2826
  top: !0
2827
2827
  };
2828
2828
  let n = {
2829
- other: ln,
2829
+ other: $,
2830
2830
  block: Sr.normal,
2831
2831
  inline: Cr.normal
2832
2832
  };
@@ -2845,7 +2845,7 @@ ${p.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
2845
2845
  return new l(t).inlineTokens(e);
2846
2846
  }
2847
2847
  lex(e) {
2848
- e = e.replace(ln.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2848
+ e = e.replace($.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2849
2849
  for (let e = 0; e < this.inlineQueue.length; e++) {
2850
2850
  let t = this.inlineQueue[e];
2851
2851
  this.inlineTokens(t.src, t.tokens);
@@ -2853,7 +2853,7 @@ ${p.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
2853
2853
  return this.inlineQueue = [], this.tokens;
2854
2854
  }
2855
2855
  blockTokens(e, t = [], n = !1) {
2856
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(ln.tabCharGlobal, " ").replace(ln.spaceLine, ""));
2856
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace($.tabCharGlobal, " ").replace($.spaceLine, ""));
2857
2857
  let r = 1 / 0;
2858
2858
  for (; e;) {
2859
2859
  if (e.length < r) r = e.length;
@@ -3055,13 +3055,13 @@ ${p.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
3055
3055
  }
3056
3056
  }, S = class {
3057
3057
  constructor(e) {
3058
- t(this, "options", void 0), t(this, "parser", void 0), this.options = e || sn;
3058
+ t(this, "options", void 0), t(this, "parser", void 0), this.options = e || cn;
3059
3059
  }
3060
3060
  space(e) {
3061
3061
  return "";
3062
3062
  }
3063
3063
  code({ text: e, lang: t, escaped: n }) {
3064
- let r = (t || "").match(ln.notSpaceStart)?.[0], i = e ? e.replace(ln.endingNewline, "") + "\n" : "";
3064
+ let r = (t || "").match($.notSpaceStart)?.[0], i = e ? e.replace($.endingNewline, "") + "\n" : "";
3065
3065
  return r ? "<pre><code class=\"language-" + O(r) + "\">" + (n ? i : O(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : O(i, !0)) + "</code></pre>\n";
3066
3066
  }
3067
3067
  blockquote({ tokens: e }) {
@@ -3191,7 +3191,7 @@ ${e}</tr>
3191
3191
  }
3192
3192
  }, Er = class l {
3193
3193
  constructor(e) {
3194
- t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || sn, this.options.renderer = this.options.renderer || new S(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z();
3194
+ t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || cn, this.options.renderer = this.options.renderer || new S(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z();
3195
3195
  }
3196
3196
  static parse(e, t) {
3197
3197
  return new l(t).parse(e);
@@ -3341,7 +3341,7 @@ ${e}</tr>
3341
3341
  }
3342
3342
  }, Dr = (_Class = class {
3343
3343
  constructor(e) {
3344
- t(this, "options", void 0), t(this, "block", void 0), this.options = e || sn;
3344
+ t(this, "options", void 0), t(this, "block", void 0), this.options = e || cn;
3345
3345
  }
3346
3346
  preprocess(e) {
3347
3347
  return e;
@@ -3541,7 +3541,7 @@ function k(e, t) {
3541
3541
  }
3542
3542
  k.options = k.setOptions = function(e) {
3543
3543
  return Or.setOptions(e), k.defaults = Or.defaults, W(k.defaults), k;
3544
- }, k.getDefaults = I, k.defaults = sn;
3544
+ }, k.getDefaults = I, k.defaults = cn;
3545
3545
  function Pt(...e) {
3546
3546
  return Or.use(...e), k.defaults = Or.defaults, W(k.defaults), k;
3547
3547
  }
@@ -3561,7 +3561,7 @@ var kr = ["aria-label"], Ar = { class: "px-4 pb-2 pt-4" }, jr = ["innerHTML"], M
3561
3561
  let n = e, r = t, i = _(() => {
3562
3562
  if (!n.spec.body) return "";
3563
3563
  let e = k.parse(n.spec.body, { async: !1 });
3564
- return on.sanitize(e, { ADD_ATTR: ["target"] });
3564
+ return sn.sanitize(e, { ADD_ATTR: ["target"] });
3565
3565
  }), a = _(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = _(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = _(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = _(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), d = _(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), f = _(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3566
3566
  function actionStyle(e) {
3567
3567
  return e === "primary" || e === "destructive" ? {
@@ -4421,7 +4421,7 @@ var Wr = [
4421
4421
  function renderMarkdown(e) {
4422
4422
  if (!e) return "";
4423
4423
  let t = k.parse(e, { async: !1 });
4424
- return on.sanitize(t, {
4424
+ return sn.sanitize(t, {
4425
4425
  ADD_ATTR: ["target"],
4426
4426
  ADD_DATA_URI_TAGS: ["img"]
4427
4427
  });
@@ -4786,7 +4786,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4786
4786
  let r = n, i = R(!1), a = R(!1), o = R({
4787
4787
  user: !1,
4788
4788
  bot: !1
4789
- }), s = R({ active: !1 }), c = R(!1), d = R(!1), f = R(), p = _(() => f.value?.state.value ?? "idle"), g = _(() => f.value?.isMuted.value ?? !1), v = new VoiceHistogramController(), y = v.heights, w = ue("endButton"), E = ue("muteButton"), ee = !1, te, M, ce = _(() => deriveVoiceModePresentation({
4789
+ }), s = R({ active: !1 }), c = R(!1), d = R(!1), f = R(), p = _(() => f.value?.state.value ?? "idle"), g = _(() => f.value?.isMuted.value ?? !1), v = new VoiceHistogramController(), y = v.heights, w = ue("endButton"), E = ue("muteButton"), ee = !1, te, M, ce, le = _(() => deriveVoiceModePresentation({
4790
4790
  sessionState: p.value,
4791
4791
  hadError: i.value,
4792
4792
  providerThinking: a.value,
@@ -4794,21 +4794,21 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4794
4794
  work: s.value,
4795
4795
  isMuted: g.value,
4796
4796
  takingLonger: c.value
4797
- })), le = _(() => {
4798
- if (ce.value.activity === "thinking") return "thinking";
4799
- if (ce.value.activity === "working") return `working:${s.value.description ?? ""}`;
4797
+ })), fe = _(() => {
4798
+ if (le.value.activity === "thinking") return "thinking";
4799
+ if (le.value.activity === "working") return `working:${s.value.description ?? ""}`;
4800
4800
  });
4801
- pe(() => ce.value.usesIdleWave, (e) => v.setIdleWave(e), { immediate: !0 }), pe(g, (e) => v.setMuted(e), { immediate: !0 }), pe(le, (e) => {
4802
- M && clearTimeout(M), c.value = !1, e && (M = setTimeout(() => {
4803
- M = void 0, c.value = !0;
4804
- }, K), M.unref?.());
4801
+ pe(() => le.value.usesIdleWave, (e) => v.setIdleWave(e), { immediate: !0 }), pe(g, (e) => v.setMuted(e), { immediate: !0 }), pe(fe, (e) => {
4802
+ ce && clearTimeout(ce), c.value = !1, e && (ce = setTimeout(() => {
4803
+ ce = void 0, c.value = !0;
4804
+ }, K), ce.unref?.());
4805
4805
  }, { immediate: !0 });
4806
4806
  async function end() {
4807
4807
  ee = !0, await f.value?.end();
4808
4808
  }
4809
4809
  t({ end });
4810
4810
  function emitEnd() {
4811
- ee || (ee = !0, r("end"));
4811
+ ee || (ee = !0, r("end", te));
4812
4812
  }
4813
4813
  function trapFocus(e) {
4814
4814
  e.shiftKey && document.activeElement === w.value ? (e.preventDefault(), E.value?.focus()) : !e.shiftKey && document.activeElement === E.value && (e.preventDefault(), w.value?.focus());
@@ -4821,8 +4821,11 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4821
4821
  w.value?.focus({ preventScroll: !0 });
4822
4822
  let t = e.chatController?.createVoiceClient({
4823
4823
  onLevel: (e) => v.updateLevel(e),
4824
+ onEnded: (e) => {
4825
+ te = e;
4826
+ },
4824
4827
  onStateChange: (e) => {
4825
- e === "ended" && (i.value ? te = setTimeout(emitEnd, 1600) : emitEnd());
4828
+ e === "ended" && (i.value ? M = setTimeout(emitEnd, 1600) : emitEnd());
4826
4829
  },
4827
4830
  onThinkingChange: (e) => {
4828
4831
  a.value = e;
@@ -4849,11 +4852,11 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4849
4852
  }
4850
4853
  f.value = t, await t.start();
4851
4854
  }), ae(() => {
4852
- ee = !0, te && clearTimeout(te), M && clearTimeout(M), v.stop(), f.value?.end();
4855
+ ee = !0, M && clearTimeout(M), ce && clearTimeout(ce), v.stop(), f.value?.end();
4853
4856
  }), (t, n) => (j(), b("div", {
4854
4857
  "data-test": "voice-mode",
4855
4858
  "data-voice-state": p.value,
4856
- "data-voice-activity": ce.value.activity,
4859
+ "data-voice-activity": le.value.activity,
4857
4860
  class: "relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",
4858
4861
  onKeydown: ge(trapFocus, ["tab"])
4859
4862
  }, [
@@ -4888,16 +4891,16 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4888
4891
  x("div", Ki, [(j(!0), b(m, null, N(V(y), (e, t) => (j(), b("span", {
4889
4892
  key: t,
4890
4893
  "data-test": "voice-histogram-bar",
4891
- class: D(["w-[5px] rounded-full transition-colors duration-150", ce.value.tone]),
4894
+ class: D(["w-[5px] rounded-full transition-colors duration-150", le.value.tone]),
4892
4895
  style: A({ height: `${e}px` })
4893
4896
  }, null, 6))), 128))]),
4894
- x("div", qi, B(ce.value.label), 1),
4897
+ x("div", qi, B(le.value.label), 1),
4895
4898
  x("p", {
4896
4899
  "data-test": "voice-visible-status",
4897
- "data-taking-longer": ce.value.takingLonger || void 0,
4900
+ "data-taking-longer": le.value.takingLonger || void 0,
4898
4901
  "aria-hidden": "true",
4899
4902
  class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
4900
- }, B(ce.value.visibleStatus), 9, Ji)
4903
+ }, B(le.value.visibleStatus), 9, Ji)
4901
4904
  ])
4902
4905
  ]),
4903
4906
  x("div", Yi, [x("button", {
@@ -4959,10 +4962,12 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
4959
4962
  "data-issue-action-url",
4960
4963
  "data-streaming"
4961
4964
  ], ua = { class: "flex items-center gap-3" }, da = ["href"], fa = [
4965
+ "data-test",
4962
4966
  "data-message-id",
4963
4967
  "data-message-sender",
4964
4968
  "data-conversation-id",
4965
4969
  "data-message-sequence",
4970
+ "data-system-kind",
4966
4971
  "data-routine-run-id"
4967
4972
  ], pa = [
4968
4973
  "data-message-id",
@@ -5216,10 +5221,10 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5216
5221
  function startVoiceConversation() {
5217
5222
  st.value && !ct.value && (Y.value = X.value, J.value = !0);
5218
5223
  }
5219
- async function endVoiceConversation() {
5224
+ async function endVoiceConversation(t) {
5220
5225
  if (!J.value) return;
5221
- let t = it.value;
5222
- J.value = !1, Y.value = void 0, await ee(), await t?.end(), window.matchMedia("(pointer: coarse)").matches || a.value?.focus(), await e.chatController?.refreshMessages();
5226
+ let n = it.value;
5227
+ J.value = !1, Y.value = void 0, await ee(), await n?.end(), window.matchMedia("(pointer: coarse)").matches || a.value?.focus(), await e.chatController?.refreshMessages(), t === "idle-timeout" && e.chatController?.notify("Call ended after 30 seconds of silence.", { systemKind: "voice_ended" });
5223
5228
  }
5224
5229
  let Z = _(() => e.variant === "light"), ut = _(() => Z.value ? "bg-theme-200/70" : "bg-white/15"), dt = _(() => Z.value ? "text-theme-300" : "text-white/30");
5225
5230
  ne(async () => {
@@ -5447,19 +5452,20 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5447
5452
  "aria-hidden": "true",
5448
5453
  class: D(["hidden h-px flex-1 opacity-60 @md/chat:block", ut.value])
5449
5454
  }, null, 2)
5450
- ])], 8, la)) : t.sender === "system" && t.systemKind === "routine_completed" ? (j(), b("div", {
5455
+ ])], 8, la)) : t.sender === "system" && (t.systemKind === "routine_completed" || t.systemKind === "voice_ended") ? (j(), b("div", {
5451
5456
  key: 3,
5452
- "data-test": "messaging-routine-receipt",
5457
+ "data-test": t.systemKind === "routine_completed" ? "messaging-routine-receipt" : "messaging-voice-receipt",
5453
5458
  "data-message-id": t.id,
5454
5459
  "data-message-sender": t.sender,
5455
5460
  "data-conversation-id": t.conversationId,
5456
5461
  "data-message-sequence": t.sequence,
5462
+ "data-system-kind": t.systemKind,
5457
5463
  "data-routine-run-id": t.routine?.run.routineRunId,
5458
5464
  class: D(["mb-6 flex items-center justify-center gap-2 text-[12px] leading-relaxed", Z.value ? "text-theme-400" : "text-white/50"])
5459
- }, [r[16] || (r[16] = x("i", {
5460
- class: "i-tabler-clock size-3.5 shrink-0",
5465
+ }, [x("i", {
5466
+ class: D(["size-3.5 shrink-0", t.systemKind === "voice_ended" ? "i-tabler-phone-off" : "i-tabler-clock"]),
5461
5467
  "aria-hidden": "true"
5462
- }, null, -1)), x("span", null, B(t.text), 1)], 10, fa)) : t.sender === "system" ? (j(), b("div", {
5468
+ }, null, 2), x("span", null, B(t.text), 1)], 10, fa)) : t.sender === "system" ? (j(), b("div", {
5463
5469
  key: 4,
5464
5470
  "data-test": "messaging-system-status-msg",
5465
5471
  "data-message-id": t.id,
@@ -5471,7 +5477,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5471
5477
  "data-issue-bucket": t.issue?.bucket,
5472
5478
  "data-streaming": t.id === G.value ? "true" : void 0,
5473
5479
  class: D(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", Z.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5474
- }, [r[17] || (r[17] = x("i", {
5480
+ }, [r[16] || (r[16] = x("i", {
5475
5481
  class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
5476
5482
  "aria-hidden": "true"
5477
5483
  }, null, -1)), T(bi, {
@@ -5504,7 +5510,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5504
5510
  "data-test": "messaging-routine-label",
5505
5511
  "data-routine-run-id": t.routine.run.routineRunId,
5506
5512
  class: D(["mb-2 flex items-start gap-2 text-[12px] leading-relaxed", Z.value ? "text-theme-400" : "text-white/50"])
5507
- }, [r[18] || (r[18] = x("i", {
5513
+ }, [r[17] || (r[17] = x("i", {
5508
5514
  class: "i-tabler-clock size-3.5 mt-0.5 shrink-0",
5509
5515
  "aria-hidden": "true"
5510
5516
  }, null, -1)), x("span", null, "Ran " + B(t.routine.run.name || t.routine.run.sourceLabel || "a routine"), 1)], 10, ha)) : y("", !0),
@@ -5533,7 +5539,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5533
5539
  "data-test": "messaging-attachment",
5534
5540
  "data-attachment-placement": "block",
5535
5541
  class: D(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5536
- }, [r[19] || (r[19] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), w(" " + B(e.filename), 1)], 10, va))], 64))), 128))], 2)) : y("", !0),
5542
+ }, [r[18] || (r[18] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), w(" " + B(e.filename), 1)], 10, va))], 64))), 128))], 2)) : y("", !0),
5537
5543
  messageRenderParts(t).length ? (j(), b("div", {
5538
5544
  key: 2,
5539
5545
  "data-test": "messaging-message-content",
@@ -5570,7 +5576,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5570
5576
  "data-test": "messaging-attachment",
5571
5577
  "data-attachment-placement": e.placement,
5572
5578
  class: D(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5573
- }, [r[20] || (r[20] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), w(" " + B(e.attachment.filename), 1)], 10, Sa)) : y("", !0)], 64))), 128))], 2)) : y("", !0),
5579
+ }, [r[19] || (r[19] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), w(" " + B(e.attachment.filename), 1)], 10, Sa)) : y("", !0)], 64))), 128))], 2)) : y("", !0),
5574
5580
  canCopyMessage(t) ? (j(), b("div", {
5575
5581
  key: 3,
5576
5582
  "data-test": "messaging-message-actions",
@@ -5595,7 +5601,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5595
5601
  "aria-label": "Report",
5596
5602
  class: D(["grid size-6 cursor-pointer place-items-center transition-colors", Z.value ? "hover:text-theme-800" : "hover:text-white"]),
5597
5603
  onClick: _e((n) => e.chatController?.reportMessage(t.id), ["stop"])
5598
- }, [...r[21] || (r[21] = [x("i", {
5604
+ }, [...r[20] || (r[20] = [x("i", {
5599
5605
  class: "i-tabler-flag size-3.5",
5600
5606
  "aria-hidden": "true"
5601
5607
  }, null, -1)])], 10, Ta)) : y("", !0)], 10, Ca)) : y("", !0)
@@ -5627,7 +5633,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5627
5633
  "data-test": "messaging-tool-activity-tail",
5628
5634
  "aria-label": "Assistant is still working",
5629
5635
  class: D(["chat-live-enter mb-4 grid h-[17px] w-5 place-items-center", Z.value ? "text-theme-500" : "text-white/70"])
5630
- }, [...r[22] || (r[22] = [x("span", {
5636
+ }, [...r[21] || (r[21] = [x("span", {
5631
5637
  class: "chat-dots chat-dots--mini",
5632
5638
  "aria-hidden": "true"
5633
5639
  }, [
@@ -5651,7 +5657,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5651
5657
  role: "status",
5652
5658
  "aria-live": "polite",
5653
5659
  class: D(["chat-live-enter relative mb-4 flex h-[17px] items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", Z.value ? "text-theme-500" : "text-white/50"])
5654
- }, [r[23] || (r[23] = x("span", {
5660
+ }, [r[22] || (r[22] = x("span", {
5655
5661
  "data-test": "messaging-thinking-dots",
5656
5662
  class: "chat-dots shrink-0",
5657
5663
  "aria-hidden": "true"
@@ -5667,11 +5673,11 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5667
5673
  role: "alert",
5668
5674
  class: D(["chat-live-enter mb-4 flex items-start gap-2 px-2 text-[13px] leading-snug", Z.value ? "text-theme-600" : "text-white/60"])
5669
5675
  }, [
5670
- r[25] || (r[25] = x("i", {
5676
+ r[24] || (r[24] = x("i", {
5671
5677
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5672
5678
  "aria-hidden": "true"
5673
5679
  }, null, -1)),
5674
- x("span", Ma, [x("span", Na, [w(B(U.value.message), 1), U.value.help ? (j(), b(m, { key: 0 }, [w(":")], 64)) : y("", !0)]), U.value.help ? (j(), b(m, { key: 0 }, [r[24] || (r[24] = w(B(" "), -1)), x("span", Pa, B(U.value.help), 1)], 64)) : y("", !0)]),
5680
+ x("span", Ma, [x("span", Na, [w(B(U.value.message), 1), U.value.help ? (j(), b(m, { key: 0 }, [w(":")], 64)) : y("", !0)]), U.value.help ? (j(), b(m, { key: 0 }, [r[23] || (r[23] = w(B(" "), -1)), x("span", Pa, B(U.value.help), 1)], 64)) : y("", !0)]),
5675
5681
  U.value.actionUrl && U.value.actionLabel ? (j(), b("a", {
5676
5682
  key: 0,
5677
5683
  href: U.value.actionUrl,
@@ -5717,10 +5723,10 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5717
5723
  }, null, 10, Ra)) : (j(), b("div", {
5718
5724
  key: 1,
5719
5725
  class: D(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", Z.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5720
- }, [r[26] || (r[26] = x("i", { class: "i-tabler-file size-4" }, null, -1)), x("span", za, B(e.filename), 1)], 2)), x("button", {
5726
+ }, [r[25] || (r[25] = x("i", { class: "i-tabler-file size-4" }, null, -1)), x("span", za, B(e.filename), 1)], 2)), x("button", {
5721
5727
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] cursor-pointer",
5722
5728
  onClick: (e) => removeAttachment(t)
5723
- }, [...r[27] || (r[27] = [x("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Ba)]))), 128)), Pe.value ? (j(), b("div", Va, [T(xe, { class: "size-5" })])) : y("", !0)], 2)) : y("", !0),
5729
+ }, [...r[26] || (r[26] = [x("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Ba)]))), 128)), Pe.value ? (j(), b("div", Va, [T(xe, { class: "size-5" })])) : y("", !0)], 2)) : y("", !0),
5724
5730
  Le.value ? (j(), b("input", {
5725
5731
  key: 1,
5726
5732
  ref_key: "fileInput",
@@ -5740,7 +5746,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5740
5746
  "data-test": "messaging-recording-state",
5741
5747
  class: D(["flex min-w-0 items-center gap-2 py-1", Z.value ? "text-theme-700" : "text-white/80"])
5742
5748
  }, [
5743
- r[28] || (r[28] = x("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5749
+ r[27] || (r[27] = x("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5744
5750
  x("span", Wa, B(tt.value), 1),
5745
5751
  x("span", { class: D(["min-w-0 truncate text-sm", Z.value ? "text-theme-400" : "text-white/45"]) }, B(nt.value), 3)
5746
5752
  ], 2)) : he((j(), b("textarea", {
@@ -5776,7 +5782,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5776
5782
  title: Le.value ? "Attach file" : "File attachments unavailable",
5777
5783
  onClick: r[8] || (r[8] = (e) => Le.value && triggerFileInput())
5778
5784
  }, [Pe.value ? (j(), b("i", qa)) : (j(), b("i", Ja)), x("span", Ya, B(Le.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Ka),
5779
- r[32] || (r[32] = x("div", { class: "flex-1" }, null, -1)),
5785
+ r[31] || (r[31] = x("div", { class: "flex-1" }, null, -1)),
5780
5786
  x("div", Xa, [
5781
5787
  Qe.value && !$e.value && !J.value ? (j(), b("button", {
5782
5788
  key: 0,
@@ -5785,7 +5791,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5785
5791
  "aria-label": "Discard recording",
5786
5792
  title: "Discard recording",
5787
5793
  onClick: r[9] || (r[9] = (e) => finishRecording({ cancelled: !0 }))
5788
- }, [...r[29] || (r[29] = [x("i", {
5794
+ }, [...r[28] || (r[28] = [x("i", {
5789
5795
  class: "i-tabler-x size-[18px]",
5790
5796
  "aria-hidden": "true"
5791
5797
  }, null, -1)])], 2)) : y("", !0),
@@ -5819,14 +5825,14 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5819
5825
  key: e,
5820
5826
  class: "w-[2px] rounded-full bg-current",
5821
5827
  style: A({ height: `${e}px` })
5822
- }, null, 4)), 64))]), r[30] || (r[30] = x("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, $a)) : Qe.value ? y("", !0) : (j(), b(m, { key: 3 }, [Ue.value ? (j(), b("button", {
5828
+ }, null, 4)), 64))]), r[29] || (r[29] = x("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, $a)) : Qe.value ? y("", !0) : (j(), b(m, { key: 3 }, [Ue.value ? (j(), b("button", {
5823
5829
  key: 0,
5824
5830
  "data-test": "messaging-secondary-stop-btn",
5825
5831
  class: D(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Z.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5826
5832
  "aria-label": "Stop work",
5827
5833
  title: "Stop work",
5828
5834
  onClick: r[12] || (r[12] = (t) => e.chatController?.stopChatTurn())
5829
- }, [...r[31] || (r[31] = [x("i", {
5835
+ }, [...r[30] || (r[30] = [x("i", {
5830
5836
  class: "i-tabler-player-stop-filled size-3.5",
5831
5837
  "aria-hidden": "true"
5832
5838
  }, null, -1), x("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : y("", !0), x("button", {
@@ -5844,7 +5850,7 @@ var Bi = ["data-voice-state", "data-voice-activity"], Vi = ["src"], Hi = {
5844
5850
  ], 64))], !0)], 10, Ia)
5845
5851
  ], 2));
5846
5852
  }
5847
- }), [["__scopeId", "data-v-6717f6d3"]]), so = { class: "bot-wrap" }, co = {
5853
+ }), [["__scopeId", "data-v-6c76d386"]]), so = { class: "bot-wrap" }, co = {
5848
5854
  key: 0,
5849
5855
  class: "flex items-center justify-center h-full"
5850
5856
  }, lo = {