@bcc-code/vue-bcc-chat-ui 7.0.31 → 7.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var Ri = Object.defineProperty;
2
2
  var qi = (e, t, u) => t in e ? Ri(e, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[t] = u;
3
3
  var ca = (e, t, u) => qi(e, typeof t != "symbol" ? t + "" : t, u);
4
- import { ref as z, computed as U, toValue as Oi, shallowRef as Li, isRef as Pi, watch as Xe, provide as tn, inject as un, onUnmounted as Ba, onMounted as Zn, nextTick as Xt, openBlock as k, createElementBlock as F, createElementVNode as T, onBeforeUnmount as nn, defineComponent as ye, withDirectives as Yu, Fragment as He, renderList as ht, createBlock as ae, resolveDynamicComponent as nt, toDisplayString as j, unref as _, vShow as $i, normalizeClass as Ce, createVNode as ie, normalizeStyle as gu, withModifiers as Wu, createCommentVNode as ne, withCtx as Ve, vModelText as qn, renderSlot as Jt, createTextVNode as fo, Teleport as Bi, useTemplateRef as On, createSlots as Ni, normalizeProps as Ui, guardReactiveProps as zi } from "vue";
4
+ import { ref as z, computed as U, toValue as Oi, shallowRef as Li, isRef as Pi, watch as Xe, provide as tn, inject as un, onUnmounted as Ba, onMounted as Zn, nextTick as Qt, openBlock as k, createElementBlock as F, createElementVNode as T, onBeforeUnmount as nn, defineComponent as ye, withDirectives as Yu, Fragment as He, renderList as ht, createBlock as ae, resolveDynamicComponent as nt, toDisplayString as j, unref as _, vShow as $i, normalizeClass as Ce, createVNode as ie, normalizeStyle as pu, withModifiers as Wu, createCommentVNode as ne, withCtx as Ve, vModelText as qn, renderSlot as Xt, createTextVNode as fo, Teleport as Bi, useTemplateRef as On, createSlots as Ni, normalizeProps as Ui, guardReactiveProps as zi } from "vue";
5
5
  import { BccButton as at, BccDialog as Na, BccInputText as xr, BccTag as Dt, BccAvatar as Ua, BccProgressSpinner as ho, BccMessage as Hi } from "@bcc-code/component-library-vue";
6
6
  import { CometChat as V } from "@cometchat/chat-sdk-javascript";
7
7
  const ji = {
@@ -55,7 +55,7 @@ function Vi(e) {
55
55
  function go() {
56
56
  localStorage.removeItem(an(Ha));
57
57
  }
58
- function eu(e) {
58
+ function Jt(e) {
59
59
  const t = mo(e);
60
60
  if (!t)
61
61
  return;
@@ -71,7 +71,7 @@ function eu(e) {
71
71
  }
72
72
  }
73
73
  function Wi(e) {
74
- return eu(e) ?? e;
74
+ return Jt(e) ?? e;
75
75
  }
76
76
  function mo(e) {
77
77
  if (typeof e == "string")
@@ -386,7 +386,7 @@ const {
386
386
  let {
387
387
  freeze: Je,
388
388
  seal: pt,
389
- create: du
389
+ create: cu
390
390
  } = Object, {
391
391
  apply: Sa,
392
392
  construct: Ia
@@ -407,7 +407,7 @@ Ia || (Ia = function(t) {
407
407
  n[a - 1] = arguments[a];
408
408
  return new t(...n);
409
409
  });
410
- const $u = qe(Array.prototype.forEach), ns = qe(Array.prototype.lastIndexOf), Tr = qe(Array.prototype.pop), Bu = qe(Array.prototype.push), as = qe(Array.prototype.splice), Qe = Array.isArray, Zu = qe(String.prototype.toLowerCase), da = qe(String.prototype.toString), kr = qe(String.prototype.match), lu = qe(String.prototype.replace), Mr = qe(String.prototype.indexOf), rs = qe(String.prototype.trim), os = qe(Number.prototype.toString), is = qe(Boolean.prototype.toString), wr = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Ar = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Nu = qe(Object.prototype.toString), Ze = qe(RegExp.prototype.test), Cn = ss(TypeError);
410
+ const $u = qe(Array.prototype.forEach), ns = qe(Array.prototype.lastIndexOf), Tr = qe(Array.prototype.pop), Bu = qe(Array.prototype.push), as = qe(Array.prototype.splice), Qe = Array.isArray, Zu = qe(String.prototype.toLowerCase), da = qe(String.prototype.toString), kr = qe(String.prototype.match), su = qe(String.prototype.replace), Mr = qe(String.prototype.indexOf), rs = qe(String.prototype.trim), os = qe(Number.prototype.toString), is = qe(Boolean.prototype.toString), wr = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Ar = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Nu = qe(Object.prototype.toString), Ze = qe(RegExp.prototype.test), Cn = ss(TypeError);
411
411
  function qe(e) {
412
412
  return function(t) {
413
413
  t instanceof RegExp && (t.lastIndex = 0);
@@ -444,7 +444,7 @@ function ls(e) {
444
444
  return e;
445
445
  }
446
446
  function ut(e) {
447
- const t = du(null);
447
+ const t = cu(null);
448
448
  for (const [u, n] of yo(e))
449
449
  Se(e, u) && (Qe(n) ? t[u] = ls(n) : n && typeof n == "object" && n.constructor === Object ? t[u] = ut(n) : t[u] = n);
450
450
  return t;
@@ -467,7 +467,7 @@ function cs(e) {
467
467
  case "object": {
468
468
  if (e === null)
469
469
  return Nu(e);
470
- const t = e, u = fu(t, "toString");
470
+ const t = e, u = du(t, "toString");
471
471
  if (typeof u == "function") {
472
472
  const n = u(t);
473
473
  return typeof n == "string" ? n : Nu(n);
@@ -478,7 +478,7 @@ function cs(e) {
478
478
  return Nu(e);
479
479
  }
480
480
  }
481
- function fu(e, t) {
481
+ function du(e, t) {
482
482
  for (; e !== null; ) {
483
483
  const n = us(e, t);
484
484
  if (n) {
@@ -580,7 +580,7 @@ function To() {
580
580
  HTMLFormElement: f,
581
581
  DOMParser: m,
582
582
  trustedTypes: g
583
- } = e, h = s.prototype, w = fu(h, "cloneNode"), p = fu(h, "remove"), M = fu(h, "nextSibling"), y = fu(h, "childNodes"), A = fu(h, "parentNode");
583
+ } = e, h = s.prototype, M = du(h, "cloneNode"), p = du(h, "remove"), w = du(h, "nextSibling"), y = du(h, "childNodes"), A = du(h, "parentNode");
584
584
  if (typeof o == "function") {
585
585
  const ee = u.createElement("template");
586
586
  ee.content && ee.content.ownerDocument && (u = ee.content.ownerDocument);
@@ -612,7 +612,7 @@ function To() {
612
612
  const ot = le({}, [...Er, ...fa, ...ha, ...pa, ...Dr]);
613
613
  let _e = null;
614
614
  const G = le({}, [...Sr, ...ga, ...Ir, ...Tn]);
615
- let J = Object.seal(du(null, {
615
+ let J = Object.seal(cu(null, {
616
616
  tagNameCheck: {
617
617
  writable: !0,
618
618
  configurable: !1,
@@ -632,7 +632,7 @@ function To() {
632
632
  value: !1
633
633
  }
634
634
  })), q = null, We = null;
635
- const ve = Object.seal(du(null, {
635
+ const ve = Object.seal(cu(null, {
636
636
  tagCheck: {
637
637
  writable: !0,
638
638
  configurable: !1,
@@ -646,31 +646,31 @@ function To() {
646
646
  value: null
647
647
  }
648
648
  }));
649
- let je = !0, Ne = !0, it = !1, St = !0, xe = !1, ce = !0, be = !1, _u = !1, Cu = !1, It = !1, uu = !1, bt = !1, Tu = !0, Wt = !1;
650
- const nu = "user-content-";
649
+ let je = !0, Ne = !0, it = !1, St = !0, xe = !1, ce = !0, be = !1, yu = !1, _u = !1, It = !1, tu = !1, bt = !1, Cu = !0, Vt = !1;
650
+ const uu = "user-content-";
651
651
  let Ft = !0, Rt = !1, kt = {}, et = null;
652
- const ku = le({}, ["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"]);
652
+ const Tu = le({}, ["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"]);
653
653
  let dn = null;
654
- const Gt = le({}, ["audio", "video", "img", "source", "image", "track"]);
655
- let qt = null;
656
- const fn = le({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), au = "http://www.w3.org/1998/Math/MathML", ru = "http://www.w3.org/2000/svg", ct = "http://www.w3.org/1999/xhtml";
657
- let Ot = ct, Mu = !1, wu = null;
658
- const na = le({}, [au, ru, ct], da);
654
+ const Wt = le({}, ["audio", "video", "img", "source", "image", "track"]);
655
+ let ku = null;
656
+ const fn = le({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), nu = "http://www.w3.org/1998/Math/MathML", au = "http://www.w3.org/2000/svg", ct = "http://www.w3.org/1999/xhtml";
657
+ let qt = ct, Mu = !1, wu = null;
658
+ const na = le({}, [nu, au, ct], da);
659
659
  let Au = le({}, ["mi", "mo", "mn", "ms", "mtext"]), Eu = le({}, ["annotation-xml"]);
660
660
  const aa = le({}, ["title", "style", "font", "a", "script"]);
661
- let Yt = null;
661
+ let Gt = null;
662
662
  const ra = ["application/xhtml+xml", "text/html"], Du = "text/html";
663
- let Ie = null, Lt = null;
664
- const ou = u.createElement("form"), hn = function(v) {
663
+ let Ie = null, Ot = null;
664
+ const ru = u.createElement("form"), hn = function(v) {
665
665
  return v instanceof RegExp || v instanceof Function;
666
666
  }, Su = function() {
667
667
  let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
668
- if (Lt && Lt === v)
668
+ if (Ot && Ot === v)
669
669
  return;
670
- (!v || typeof v != "object") && (v = {}), v = ut(v), Yt = // eslint-disable-next-line unicorn/prefer-includes
671
- ra.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Du : v.PARSER_MEDIA_TYPE, Ie = Yt === "application/xhtml+xml" ? da : Zu, de = Se(v, "ALLOWED_TAGS") && Qe(v.ALLOWED_TAGS) ? le({}, v.ALLOWED_TAGS, Ie) : ot, _e = Se(v, "ALLOWED_ATTR") && Qe(v.ALLOWED_ATTR) ? le({}, v.ALLOWED_ATTR, Ie) : G, wu = Se(v, "ALLOWED_NAMESPACES") && Qe(v.ALLOWED_NAMESPACES) ? le({}, v.ALLOWED_NAMESPACES, da) : na, qt = Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) ? le(ut(fn), v.ADD_URI_SAFE_ATTR, Ie) : fn, dn = Se(v, "ADD_DATA_URI_TAGS") && Qe(v.ADD_DATA_URI_TAGS) ? le(ut(Gt), v.ADD_DATA_URI_TAGS, Ie) : Gt, et = Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) ? le({}, v.FORBID_CONTENTS, Ie) : ku, q = Se(v, "FORBID_TAGS") && Qe(v.FORBID_TAGS) ? le({}, v.FORBID_TAGS, Ie) : ut({}), We = Se(v, "FORBID_ATTR") && Qe(v.FORBID_ATTR) ? le({}, v.FORBID_ATTR, Ie) : ut({}), kt = Se(v, "USE_PROFILES") ? v.USE_PROFILES && typeof v.USE_PROFILES == "object" ? ut(v.USE_PROFILES) : v.USE_PROFILES : !1, je = v.ALLOW_ARIA_ATTR !== !1, Ne = v.ALLOW_DATA_ATTR !== !1, it = v.ALLOW_UNKNOWN_PROTOCOLS || !1, St = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, xe = v.SAFE_FOR_TEMPLATES || !1, ce = v.SAFE_FOR_XML !== !1, be = v.WHOLE_DOCUMENT || !1, It = v.RETURN_DOM || !1, uu = v.RETURN_DOM_FRAGMENT || !1, bt = v.RETURN_TRUSTED_TYPE || !1, Cu = v.FORCE_BODY || !1, Tu = v.SANITIZE_DOM !== !1, Wt = v.SANITIZE_NAMED_PROPS || !1, Ft = v.KEEP_CONTENT !== !1, Rt = v.IN_PLACE || !1, De = ds(v.ALLOWED_URI_REGEXP) ? v.ALLOWED_URI_REGEXP : _o, Ot = typeof v.NAMESPACE == "string" ? v.NAMESPACE : ct, Au = Se(v, "MATHML_TEXT_INTEGRATION_POINTS") && v.MATHML_TEXT_INTEGRATION_POINTS && typeof v.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ut(v.MATHML_TEXT_INTEGRATION_POINTS) : le({}, ["mi", "mo", "mn", "ms", "mtext"]), Eu = Se(v, "HTML_INTEGRATION_POINTS") && v.HTML_INTEGRATION_POINTS && typeof v.HTML_INTEGRATION_POINTS == "object" ? ut(v.HTML_INTEGRATION_POINTS) : le({}, ["annotation-xml"]);
672
- const P = Se(v, "CUSTOM_ELEMENT_HANDLING") && v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING == "object" ? ut(v.CUSTOM_ELEMENT_HANDLING) : du(null);
673
- if (J = du(null), Se(P, "tagNameCheck") && hn(P.tagNameCheck) && (J.tagNameCheck = P.tagNameCheck), Se(P, "attributeNameCheck") && hn(P.attributeNameCheck) && (J.attributeNameCheck = P.attributeNameCheck), Se(P, "allowCustomizedBuiltInElements") && typeof P.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = P.allowCustomizedBuiltInElements), xe && (Ne = !1), uu && (It = !0), kt && (de = le({}, Dr), _e = du(null), kt.html === !0 && (le(de, Er), le(_e, Sr)), kt.svg === !0 && (le(de, fa), le(_e, ga), le(_e, Tn)), kt.svgFilters === !0 && (le(de, ha), le(_e, ga), le(_e, Tn)), kt.mathMl === !0 && (le(de, pa), le(_e, Ir), le(_e, Tn))), ve.tagCheck = null, ve.attributeCheck = null, Se(v, "ADD_TAGS") && (typeof v.ADD_TAGS == "function" ? ve.tagCheck = v.ADD_TAGS : Qe(v.ADD_TAGS) && (de === ot && (de = ut(de)), le(de, v.ADD_TAGS, Ie))), Se(v, "ADD_ATTR") && (typeof v.ADD_ATTR == "function" ? ve.attributeCheck = v.ADD_ATTR : Qe(v.ADD_ATTR) && (_e === G && (_e = ut(_e)), le(_e, v.ADD_ATTR, Ie))), Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) && le(qt, v.ADD_URI_SAFE_ATTR, Ie), Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) && (et === ku && (et = ut(et)), le(et, v.FORBID_CONTENTS, Ie)), Se(v, "ADD_FORBID_CONTENTS") && Qe(v.ADD_FORBID_CONTENTS) && (et === ku && (et = ut(et)), le(et, v.ADD_FORBID_CONTENTS, Ie)), Ft && (de["#text"] = !0), be && le(de, ["html", "head", "body"]), de.table && (le(de, ["tbody"]), delete q.tbody), v.TRUSTED_TYPES_POLICY) {
670
+ (!v || typeof v != "object") && (v = {}), v = ut(v), Gt = // eslint-disable-next-line unicorn/prefer-includes
671
+ ra.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Du : v.PARSER_MEDIA_TYPE, Ie = Gt === "application/xhtml+xml" ? da : Zu, de = Se(v, "ALLOWED_TAGS") && Qe(v.ALLOWED_TAGS) ? le({}, v.ALLOWED_TAGS, Ie) : ot, _e = Se(v, "ALLOWED_ATTR") && Qe(v.ALLOWED_ATTR) ? le({}, v.ALLOWED_ATTR, Ie) : G, wu = Se(v, "ALLOWED_NAMESPACES") && Qe(v.ALLOWED_NAMESPACES) ? le({}, v.ALLOWED_NAMESPACES, da) : na, ku = Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) ? le(ut(fn), v.ADD_URI_SAFE_ATTR, Ie) : fn, dn = Se(v, "ADD_DATA_URI_TAGS") && Qe(v.ADD_DATA_URI_TAGS) ? le(ut(Wt), v.ADD_DATA_URI_TAGS, Ie) : Wt, et = Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) ? le({}, v.FORBID_CONTENTS, Ie) : Tu, q = Se(v, "FORBID_TAGS") && Qe(v.FORBID_TAGS) ? le({}, v.FORBID_TAGS, Ie) : ut({}), We = Se(v, "FORBID_ATTR") && Qe(v.FORBID_ATTR) ? le({}, v.FORBID_ATTR, Ie) : ut({}), kt = Se(v, "USE_PROFILES") ? v.USE_PROFILES && typeof v.USE_PROFILES == "object" ? ut(v.USE_PROFILES) : v.USE_PROFILES : !1, je = v.ALLOW_ARIA_ATTR !== !1, Ne = v.ALLOW_DATA_ATTR !== !1, it = v.ALLOW_UNKNOWN_PROTOCOLS || !1, St = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, xe = v.SAFE_FOR_TEMPLATES || !1, ce = v.SAFE_FOR_XML !== !1, be = v.WHOLE_DOCUMENT || !1, It = v.RETURN_DOM || !1, tu = v.RETURN_DOM_FRAGMENT || !1, bt = v.RETURN_TRUSTED_TYPE || !1, _u = v.FORCE_BODY || !1, Cu = v.SANITIZE_DOM !== !1, Vt = v.SANITIZE_NAMED_PROPS || !1, Ft = v.KEEP_CONTENT !== !1, Rt = v.IN_PLACE || !1, De = ds(v.ALLOWED_URI_REGEXP) ? v.ALLOWED_URI_REGEXP : _o, qt = typeof v.NAMESPACE == "string" ? v.NAMESPACE : ct, Au = Se(v, "MATHML_TEXT_INTEGRATION_POINTS") && v.MATHML_TEXT_INTEGRATION_POINTS && typeof v.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ut(v.MATHML_TEXT_INTEGRATION_POINTS) : le({}, ["mi", "mo", "mn", "ms", "mtext"]), Eu = Se(v, "HTML_INTEGRATION_POINTS") && v.HTML_INTEGRATION_POINTS && typeof v.HTML_INTEGRATION_POINTS == "object" ? ut(v.HTML_INTEGRATION_POINTS) : le({}, ["annotation-xml"]);
672
+ const P = Se(v, "CUSTOM_ELEMENT_HANDLING") && v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING == "object" ? ut(v.CUSTOM_ELEMENT_HANDLING) : cu(null);
673
+ if (J = cu(null), Se(P, "tagNameCheck") && hn(P.tagNameCheck) && (J.tagNameCheck = P.tagNameCheck), Se(P, "attributeNameCheck") && hn(P.attributeNameCheck) && (J.attributeNameCheck = P.attributeNameCheck), Se(P, "allowCustomizedBuiltInElements") && typeof P.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = P.allowCustomizedBuiltInElements), xe && (Ne = !1), tu && (It = !0), kt && (de = le({}, Dr), _e = cu(null), kt.html === !0 && (le(de, Er), le(_e, Sr)), kt.svg === !0 && (le(de, fa), le(_e, ga), le(_e, Tn)), kt.svgFilters === !0 && (le(de, ha), le(_e, ga), le(_e, Tn)), kt.mathMl === !0 && (le(de, pa), le(_e, Ir), le(_e, Tn))), ve.tagCheck = null, ve.attributeCheck = null, Se(v, "ADD_TAGS") && (typeof v.ADD_TAGS == "function" ? ve.tagCheck = v.ADD_TAGS : Qe(v.ADD_TAGS) && (de === ot && (de = ut(de)), le(de, v.ADD_TAGS, Ie))), Se(v, "ADD_ATTR") && (typeof v.ADD_ATTR == "function" ? ve.attributeCheck = v.ADD_ATTR : Qe(v.ADD_ATTR) && (_e === G && (_e = ut(_e)), le(_e, v.ADD_ATTR, Ie))), Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) && le(ku, v.ADD_URI_SAFE_ATTR, Ie), Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) && (et === Tu && (et = ut(et)), le(et, v.FORBID_CONTENTS, Ie)), Se(v, "ADD_FORBID_CONTENTS") && Qe(v.ADD_FORBID_CONTENTS) && (et === Tu && (et = ut(et)), le(et, v.ADD_FORBID_CONTENTS, Ie)), Ft && (de["#text"] = !0), be && le(de, ["html", "head", "body"]), de.table && (le(de, ["tbody"]), delete q.tbody), v.TRUSTED_TYPES_POLICY) {
674
674
  if (typeof v.TRUSTED_TYPES_POLICY.createHTML != "function")
675
675
  throw Cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
676
676
  if (typeof v.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -678,15 +678,15 @@ function To() {
678
678
  C = v.TRUSTED_TYPES_POLICY, S = C.createHTML("");
679
679
  } else
680
680
  C === void 0 && (C = Ts(g, a)), C !== null && typeof S == "string" && (S = C.createHTML(""));
681
- Je && Je(v), Lt = v;
682
- }, Iu = le({}, [...fa, ...ha, ...fs]), Kt = le({}, [...pa, ...hs]), pn = function(v) {
681
+ Je && Je(v), Ot = v;
682
+ }, Iu = le({}, [...fa, ...ha, ...fs]), Yt = le({}, [...pa, ...hs]), pn = function(v) {
683
683
  let P = A(v);
684
684
  (!P || !P.tagName) && (P = {
685
- namespaceURI: Ot,
685
+ namespaceURI: qt,
686
686
  tagName: "template"
687
687
  });
688
688
  const W = Zu(v.tagName), he = Zu(P.tagName);
689
- return wu[v.namespaceURI] ? v.namespaceURI === ru ? P.namespaceURI === ct ? W === "svg" : P.namespaceURI === au ? W === "svg" && (he === "annotation-xml" || Au[he]) : !!Iu[W] : v.namespaceURI === au ? P.namespaceURI === ct ? W === "math" : P.namespaceURI === ru ? W === "math" && Eu[he] : !!Kt[W] : v.namespaceURI === ct ? P.namespaceURI === ru && !Eu[he] || P.namespaceURI === au && !Au[he] ? !1 : !Kt[W] && (aa[W] || !Iu[W]) : !!(Yt === "application/xhtml+xml" && wu[v.namespaceURI]) : !1;
689
+ return wu[v.namespaceURI] ? v.namespaceURI === au ? P.namespaceURI === ct ? W === "svg" : P.namespaceURI === nu ? W === "svg" && (he === "annotation-xml" || Au[he]) : !!Iu[W] : v.namespaceURI === nu ? P.namespaceURI === ct ? W === "math" : P.namespaceURI === au ? W === "math" && Eu[he] : !!Yt[W] : v.namespaceURI === ct ? P.namespaceURI === au && !Eu[he] || P.namespaceURI === nu && !Au[he] ? !1 : !Yt[W] && (aa[W] || !Iu[W]) : !!(Gt === "application/xhtml+xml" && wu[v.namespaceURI]) : !1;
690
690
  }, tt = function(v) {
691
691
  Bu(t.removed, {
692
692
  element: v
@@ -709,7 +709,7 @@ function To() {
709
709
  });
710
710
  }
711
711
  if (P.removeAttribute(v), v === "is")
712
- if (It || uu)
712
+ if (It || tu)
713
713
  try {
714
714
  tt(P);
715
715
  } catch {
@@ -721,28 +721,28 @@ function To() {
721
721
  }
722
722
  }, Fu = function(v) {
723
723
  let P = null, W = null;
724
- if (Cu)
724
+ if (_u)
725
725
  v = "<remove></remove>" + v;
726
726
  else {
727
727
  const Ae = kr(v, /^[\r\n\t ]+/);
728
728
  W = Ae && Ae[0];
729
729
  }
730
- Yt === "application/xhtml+xml" && Ot === ct && (v = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + v + "</body></html>");
730
+ Gt === "application/xhtml+xml" && qt === ct && (v = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + v + "</body></html>");
731
731
  const he = C ? C.createHTML(v) : v;
732
- if (Ot === ct)
732
+ if (qt === ct)
733
733
  try {
734
- P = new m().parseFromString(he, Yt);
734
+ P = new m().parseFromString(he, Gt);
735
735
  } catch {
736
736
  }
737
737
  if (!P || !P.documentElement) {
738
- P = D.createDocument(Ot, "template", null);
738
+ P = D.createDocument(qt, "template", null);
739
739
  try {
740
740
  P.documentElement.innerHTML = Mu ? S : he;
741
741
  } catch {
742
742
  }
743
743
  }
744
744
  const Le = P.body || P.documentElement;
745
- return v && W && Le.insertBefore(u.createTextNode(W), Le.childNodes[0] || null), Ot === ct ? Z.call(P, be ? "html" : "body")[0] : be ? P.documentElement : Le;
745
+ return v && W && Le.insertBefore(u.createTextNode(W), Le.childNodes[0] || null), qt === ct ? Z.call(P, be ? "html" : "body")[0] : be ? P.documentElement : Le;
746
746
  }, gn = function(v) {
747
747
  return I.call(
748
748
  v.ownerDocument || v,
@@ -758,7 +758,7 @@ function To() {
758
758
  };
759
759
  function st(ee, v, P) {
760
760
  $u(ee, (W) => {
761
- W.call(t, v, P, Lt);
761
+ W.call(t, v, P, Ot);
762
762
  });
763
763
  }
764
764
  const mn = function(v) {
@@ -779,20 +779,20 @@ function To() {
779
779
  if (Le && he) {
780
780
  const Ae = Le.length;
781
781
  for (let Ge = Ae - 1; Ge >= 0; --Ge) {
782
- const Ye = w(Le[Ge], !0);
783
- he.insertBefore(Ye, M(v));
782
+ const Ye = M(Le[Ge], !0);
783
+ he.insertBefore(Ye, w(v));
784
784
  }
785
785
  }
786
786
  }
787
787
  return tt(v), !0;
788
788
  }
789
789
  return v instanceof s && !pn(v) || (W === "noscript" || W === "noembed" || W === "noframes") && Ze(/<\/no(script|embed|frames)/i, v.innerHTML) ? (tt(v), !0) : (xe && v.nodeType === Uu.text && (P = v.textContent, $u([K, O, N], (he) => {
790
- P = lu(P, he, " ");
790
+ P = su(P, he, " ");
791
791
  }), v.textContent !== P && (Bu(t.removed, {
792
792
  element: v.cloneNode()
793
793
  }), v.textContent = P)), st(L.afterSanitizeElements, v, null), !1);
794
794
  }, bn = function(v, P, W) {
795
- if (We[P] || Tu && (P === "id" || P === "name") && (W in u || W in ou))
795
+ if (We[P] || Cu && (P === "id" || P === "name") && (W in u || W in ru))
796
796
  return !1;
797
797
  const he = _e[P] || ve.attributeCheck instanceof Function && ve.attributeCheck(P, v);
798
798
  if (!(Ne && !We[P] && Ze(Q, P))) {
@@ -806,10 +806,10 @@ function To() {
806
806
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
807
807
  P === "is" && J.allowCustomizedBuiltInElements && (J.tagNameCheck instanceof RegExp && Ze(J.tagNameCheck, W) || J.tagNameCheck instanceof Function && J.tagNameCheck(W)))
808
808
  ) return !1;
809
- } else if (!qt[P]) {
810
- if (!Ze(De, lu(W, pe, ""))) {
809
+ } else if (!ku[P]) {
810
+ if (!Ze(De, su(W, pe, ""))) {
811
811
  if (!((P === "src" || P === "xlink:href" || P === "href") && v !== "script" && Mr(W, "data:") === 0 && dn[v])) {
812
- if (!(it && !Ze(se, lu(W, pe, "")))) {
812
+ if (!(it && !Ze(se, su(W, pe, "")))) {
813
813
  if (W)
814
814
  return !1;
815
815
  }
@@ -819,8 +819,8 @@ function To() {
819
819
  }
820
820
  }
821
821
  return !0;
822
- }, Pt = le({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Ou = function(v) {
823
- return !Pt[Zu(v)] && Ze(Me, v);
822
+ }, Lt = le({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Ou = function(v) {
823
+ return !Lt[Zu(v)] && Ze(Me, v);
824
824
  }, vn = function(v) {
825
825
  st(L.beforeSanitizeAttributes, v, null);
826
826
  const {
@@ -843,7 +843,7 @@ function To() {
843
843
  value: Ye
844
844
  } = Le, Pe = Ie(Ae), wt = Ye;
845
845
  let Fe = Ae === "value" ? wt : rs(wt);
846
- if (W.attrName = Pe, W.attrValue = Fe, W.keepAttr = !0, W.forceKeepAttr = void 0, st(L.uponSanitizeAttribute, v, W), Fe = W.attrValue, Wt && (Pe === "id" || Pe === "name") && Mr(Fe, nu) !== 0 && (vt(Ae, v), Fe = nu + Fe), ce && Ze(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Fe)) {
846
+ if (W.attrName = Pe, W.attrValue = Fe, W.keepAttr = !0, W.forceKeepAttr = void 0, st(L.uponSanitizeAttribute, v, W), Fe = W.attrValue, Vt && (Pe === "id" || Pe === "name") && Mr(Fe, uu) !== 0 && (vt(Ae, v), Fe = uu + Fe), ce && Ze(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Fe)) {
847
847
  vt(Ae, v);
848
848
  continue;
849
849
  }
@@ -862,7 +862,7 @@ function To() {
862
862
  continue;
863
863
  }
864
864
  xe && $u([K, O, N], (yn) => {
865
- Fe = lu(Fe, yn, " ");
865
+ Fe = su(Fe, yn, " ");
866
866
  });
867
867
  const xn = Ie(v.nodeName);
868
868
  if (!bn(xn, Pe, Fe)) {
@@ -901,7 +901,7 @@ function To() {
901
901
  throw Cn("dirty is not a string, aborting");
902
902
  if (!t.isSupported)
903
903
  return ee;
904
- if (_u || Su(v), t.removed = [], typeof ee == "string" && (Rt = !1), Rt) {
904
+ if (yu || Su(v), t.removed = [], typeof ee == "string" && (Rt = !1), Rt) {
905
905
  const Ye = ee.nodeName;
906
906
  if (typeof Ye == "string") {
907
907
  const Pe = Ie(Ye);
@@ -917,7 +917,7 @@ function To() {
917
917
  if (P = Fu(ee), !P)
918
918
  return It ? null : bt ? S : "";
919
919
  }
920
- P && Cu && tt(P.firstChild);
920
+ P && _u && tt(P.firstChild);
921
921
  const Ae = gn(Rt ? ee : P);
922
922
  for (; he = Ae.nextNode(); )
923
923
  mn(he), vn(he), he.content instanceof r && Mt(he.content);
@@ -928,10 +928,10 @@ function To() {
928
928
  P.normalize();
929
929
  let Ye = P.innerHTML;
930
930
  $u([K, O, N], (Pe) => {
931
- Ye = lu(Ye, Pe, " ");
931
+ Ye = su(Ye, Pe, " ");
932
932
  }), P.innerHTML = Ye;
933
933
  }
934
- if (uu)
934
+ if (tu)
935
935
  for (Le = B.call(P.ownerDocument); P.firstChild; )
936
936
  Le.appendChild(P.firstChild);
937
937
  else
@@ -941,15 +941,15 @@ function To() {
941
941
  let Ge = be ? P.outerHTML : P.innerHTML;
942
942
  return be && de["!doctype"] && P.ownerDocument && P.ownerDocument.doctype && P.ownerDocument.doctype.name && Ze(Co, P.ownerDocument.doctype.name) && (Ge = "<!DOCTYPE " + P.ownerDocument.doctype.name + `>
943
943
  ` + Ge), xe && $u([K, O, N], (Ye) => {
944
- Ge = lu(Ge, Ye, " ");
944
+ Ge = su(Ge, Ye, " ");
945
945
  }), C && bt ? C.createHTML(Ge) : Ge;
946
946
  }, t.setConfig = function() {
947
947
  let ee = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
948
- Su(ee), _u = !0;
948
+ Su(ee), yu = !0;
949
949
  }, t.clearConfig = function() {
950
- Lt = null, _u = !1;
950
+ Ot = null, yu = !1;
951
951
  }, t.isValidAttribute = function(ee, v, P) {
952
- Lt || Su({});
952
+ Ot || Su({});
953
953
  const W = Ie(ee), he = Ie(v);
954
954
  return bn(W, he, P);
955
955
  }, t.addHook = function(ee, v) {
@@ -983,8 +983,8 @@ function ks(e) {
983
983
  }
984
984
  return t;
985
985
  }
986
- function mu(e, t) {
987
- typeof t != "string" && (t = mu.defaultChars);
986
+ function gu(e, t) {
987
+ typeof t != "string" && (t = gu.defaultChars);
988
988
  const u = ks(t);
989
989
  return e.replace(/(%[a-f0-9]{2})+/gi, function(n) {
990
990
  let a = "";
@@ -1023,8 +1023,8 @@ function mu(e, t) {
1023
1023
  return a;
1024
1024
  });
1025
1025
  }
1026
- mu.defaultChars = ";/?:@&=+$,#";
1027
- mu.componentChars = "";
1026
+ gu.defaultChars = ";/?:@&=+$,#";
1027
+ gu.componentChars = "";
1028
1028
  const Or = {};
1029
1029
  function Ms(e) {
1030
1030
  let t = Or[e];
@@ -1120,14 +1120,14 @@ Pn.prototype.parse = function(e, t) {
1120
1120
  const g = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
1121
1121
  if (!g) {
1122
1122
  const h = this.hostname.split(/\./);
1123
- for (let w = 0, p = h.length; w < p; w++) {
1124
- const M = h[w];
1125
- if (M && !M.match($r)) {
1123
+ for (let M = 0, p = h.length; M < p; M++) {
1124
+ const w = h[M];
1125
+ if (w && !w.match($r)) {
1126
1126
  let y = "";
1127
- for (let A = 0, C = M.length; A < C; A++)
1128
- M.charCodeAt(A) > 127 ? y += "x" : y += M[A];
1127
+ for (let A = 0, C = w.length; A < C; A++)
1128
+ w.charCodeAt(A) > 127 ? y += "x" : y += w[A];
1129
1129
  if (!y.match($r)) {
1130
- const A = h.slice(0, w), C = h.slice(w + 1), S = M.match(Rs);
1130
+ const A = h.slice(0, M), C = h.slice(M + 1), S = w.match(Rs);
1131
1131
  S && (A.push(S[1]), C.unshift(S[2])), C.length && (r = C.join(".") + r), this.hostname = A.join(".");
1132
1132
  break;
1133
1133
  }
@@ -1147,7 +1147,7 @@ Pn.prototype.parseHost = function(e) {
1147
1147
  };
1148
1148
  const qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1149
1149
  __proto__: null,
1150
- decode: mu,
1150
+ decode: gu,
1151
1151
  encode: on,
1152
1152
  format: Ga,
1153
1153
  parse: Ya
@@ -1213,10 +1213,10 @@ var ze;
1213
1213
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
1214
1214
  })(ze || (ze = {}));
1215
1215
  const zs = 32;
1216
- var jt;
1216
+ var Ht;
1217
1217
  (function(e) {
1218
1218
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
1219
- })(jt || (jt = {}));
1219
+ })(Ht || (Ht = {}));
1220
1220
  function Fa(e) {
1221
1221
  return e >= ze.ZERO && e <= ze.NINE;
1222
1222
  }
@@ -1233,13 +1233,13 @@ var Ue;
1233
1233
  (function(e) {
1234
1234
  e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
1235
1235
  })(Ue || (Ue = {}));
1236
- var Ht;
1236
+ var zt;
1237
1237
  (function(e) {
1238
1238
  e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
1239
- })(Ht || (Ht = {}));
1239
+ })(zt || (zt = {}));
1240
1240
  class Vs {
1241
1241
  constructor(t, u, n) {
1242
- this.decodeTree = t, this.emitCodePoint = u, this.errors = n, this.state = Ue.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Ht.Strict;
1242
+ this.decodeTree = t, this.emitCodePoint = u, this.errors = n, this.state = Ue.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = zt.Strict;
1243
1243
  }
1244
1244
  /** Resets the instance to make it reusable. */
1245
1245
  startEntity(t) {
@@ -1347,7 +1347,7 @@ class Vs {
1347
1347
  return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
1348
1348
  if (t === ze.SEMI)
1349
1349
  this.consumed += 1;
1350
- else if (this.decodeMode === Ht.Strict)
1350
+ else if (this.decodeMode === zt.Strict)
1351
1351
  return 0;
1352
1352
  return this.emitCodePoint(Us(this.result), this.consumed), this.errors && (t !== ze.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
1353
1353
  }
@@ -1362,18 +1362,18 @@ class Vs {
1362
1362
  */
1363
1363
  stateNamedEntity(t, u) {
1364
1364
  const { decodeTree: n } = this;
1365
- let a = n[this.treeIndex], r = (a & jt.VALUE_LENGTH) >> 14;
1365
+ let a = n[this.treeIndex], r = (a & Ht.VALUE_LENGTH) >> 14;
1366
1366
  for (; u < t.length; u++, this.excess++) {
1367
1367
  const o = t.charCodeAt(u);
1368
1368
  if (this.treeIndex = Ws(n, a, this.treeIndex + Math.max(1, r), o), this.treeIndex < 0)
1369
1369
  return this.result === 0 || // If we are parsing an attribute
1370
- this.decodeMode === Ht.Attribute && // We shouldn't have consumed any characters after the entity,
1370
+ this.decodeMode === zt.Attribute && // We shouldn't have consumed any characters after the entity,
1371
1371
  (r === 0 || // And there should be no invalid characters.
1372
1372
  Zs(o)) ? 0 : this.emitNotTerminatedNamedEntity();
1373
- if (a = n[this.treeIndex], r = (a & jt.VALUE_LENGTH) >> 14, r !== 0) {
1373
+ if (a = n[this.treeIndex], r = (a & Ht.VALUE_LENGTH) >> 14, r !== 0) {
1374
1374
  if (o === ze.SEMI)
1375
1375
  return this.emitNamedEntityData(this.treeIndex, r, this.consumed + this.excess);
1376
- this.decodeMode !== Ht.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
1376
+ this.decodeMode !== zt.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
1377
1377
  }
1378
1378
  }
1379
1379
  return -1;
@@ -1385,7 +1385,7 @@ class Vs {
1385
1385
  */
1386
1386
  emitNotTerminatedNamedEntity() {
1387
1387
  var t;
1388
- const { result: u, decodeTree: n } = this, a = (n[u] & jt.VALUE_LENGTH) >> 14;
1388
+ const { result: u, decodeTree: n } = this, a = (n[u] & Ht.VALUE_LENGTH) >> 14;
1389
1389
  return this.emitNamedEntityData(u, a, this.consumed), (t = this.errors) === null || t === void 0 || t.missingSemicolonAfterCharacterReference(), this.consumed;
1390
1390
  }
1391
1391
  /**
@@ -1399,7 +1399,7 @@ class Vs {
1399
1399
  */
1400
1400
  emitNamedEntityData(t, u, n) {
1401
1401
  const { decodeTree: a } = this;
1402
- return this.emitCodePoint(u === 1 ? a[t] & ~jt.VALUE_LENGTH : a[t + 1], n), u === 3 && this.emitCodePoint(a[t + 2], n), n;
1402
+ return this.emitCodePoint(u === 1 ? a[t] & ~Ht.VALUE_LENGTH : a[t + 1], n), u === 3 && this.emitCodePoint(a[t + 2], n), n;
1403
1403
  }
1404
1404
  /**
1405
1405
  * Signal to the parser that the end of the input was reached.
@@ -1412,7 +1412,7 @@ class Vs {
1412
1412
  var t;
1413
1413
  switch (this.state) {
1414
1414
  case Ue.NamedEntity:
1415
- return this.result !== 0 && (this.decodeMode !== Ht.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
1415
+ return this.result !== 0 && (this.decodeMode !== zt.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
1416
1416
  case Ue.NumericDecimal:
1417
1417
  return this.emitNumericEntity(0, 2);
1418
1418
  case Ue.NumericHex:
@@ -1447,7 +1447,7 @@ function Do(e) {
1447
1447
  };
1448
1448
  }
1449
1449
  function Ws(e, t, u, n) {
1450
- const a = (t & jt.BRANCH_LENGTH) >> 7, r = t & jt.JUMP_TABLE;
1450
+ const a = (t & Ht.BRANCH_LENGTH) >> 7, r = t & Ht.JUMP_TABLE;
1451
1451
  if (a === 0)
1452
1452
  return r !== 0 && n === r ? u : -1;
1453
1453
  if (r) {
@@ -1468,7 +1468,7 @@ function Ws(e, t, u, n) {
1468
1468
  }
1469
1469
  const Gs = Do(Ps);
1470
1470
  Do($s);
1471
- function So(e, t = Ht.Legacy) {
1471
+ function So(e, t = zt.Legacy) {
1472
1472
  return Gs(e, t);
1473
1473
  }
1474
1474
  function Ys(e) {
@@ -1518,7 +1518,7 @@ function tl(e, t) {
1518
1518
  function ul(e) {
1519
1519
  return e.indexOf("\\") < 0 ? e : e.replace(Fo, "$1");
1520
1520
  }
1521
- function bu(e) {
1521
+ function mu(e) {
1522
1522
  return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(Js, function(t, u, n) {
1523
1523
  return u || tl(t, n);
1524
1524
  });
@@ -1532,7 +1532,7 @@ const nl = /[&<>"]/, al = /[&<>"]/g, rl = {
1532
1532
  function ol(e) {
1533
1533
  return rl[e];
1534
1534
  }
1535
- function Vt(e) {
1535
+ function Zt(e) {
1536
1536
  return nl.test(e) ? e.replace(al, ol) : e;
1537
1537
  }
1538
1538
  const il = /[.?*+^$[\]\\(){}|-]/g;
@@ -1615,7 +1615,7 @@ const ll = { mdurl: qs, ucmicro: Ls }, cl = /* @__PURE__ */ Object.freeze(/* @__
1615
1615
  __proto__: null,
1616
1616
  arrayReplaceAt: Io,
1617
1617
  assign: Vn,
1618
- escapeHtml: Vt,
1618
+ escapeHtml: Zt,
1619
1619
  escapeRE: sl,
1620
1620
  fromCodePoint: $n,
1621
1621
  has: Qs,
@@ -1627,7 +1627,7 @@ const ll = { mdurl: qs, ucmicro: Ls }, cl = /* @__PURE__ */ Object.freeze(/* @__
1627
1627
  isWhiteSpace: Ku,
1628
1628
  lib: ll,
1629
1629
  normalizeReference: Wn,
1630
- unescapeAll: bu,
1630
+ unescapeAll: mu,
1631
1631
  unescapeMd: ul
1632
1632
  }, Symbol.toStringTag, { value: "Module" }));
1633
1633
  function dl(e, t, u) {
@@ -1660,7 +1660,7 @@ function fl(e, t, u) {
1660
1660
  if (n = e.charCodeAt(a), n === 10 || n === 60)
1661
1661
  return r;
1662
1662
  if (n === 62)
1663
- return r.pos = a + 1, r.str = bu(e.slice(t + 1, a)), r.ok = !0, r;
1663
+ return r.pos = a + 1, r.str = mu(e.slice(t + 1, a)), r.ok = !0, r;
1664
1664
  if (n === 92 && a + 1 < u) {
1665
1665
  a += 2;
1666
1666
  continue;
@@ -1686,7 +1686,7 @@ function fl(e, t, u) {
1686
1686
  }
1687
1687
  a++;
1688
1688
  }
1689
- return t === a || o !== 0 || (r.str = bu(e.slice(t, a)), r.pos = a, r.ok = !0), r;
1689
+ return t === a || o !== 0 || (r.str = mu(e.slice(t, a)), r.pos = a, r.ok = !0), r;
1690
1690
  }
1691
1691
  function hl(e, t, u, n) {
1692
1692
  let a, r = t;
@@ -1714,12 +1714,12 @@ function hl(e, t, u, n) {
1714
1714
  }
1715
1715
  for (; r < u; ) {
1716
1716
  if (a = e.charCodeAt(r), a === o.marker)
1717
- return o.pos = r + 1, o.str += bu(e.slice(t, r)), o.ok = !0, o;
1717
+ return o.pos = r + 1, o.str += mu(e.slice(t, r)), o.ok = !0, o;
1718
1718
  if (a === 40 && o.marker === 41)
1719
1719
  return o;
1720
1720
  a === 92 && r + 1 < u && r++, r++;
1721
1721
  }
1722
- return o.can_continue = !0, o.str += bu(e.slice(t, r)), o;
1722
+ return o.can_continue = !0, o.str += mu(e.slice(t, r)), o;
1723
1723
  }
1724
1724
  const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1725
1725
  __proto__: null,
@@ -1729,22 +1729,22 @@ const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1729
1729
  }, Symbol.toStringTag, { value: "Module" })), Ct = {};
1730
1730
  Ct.code_inline = function(e, t, u, n, a) {
1731
1731
  const r = e[t];
1732
- return "<code" + a.renderAttrs(r) + ">" + Vt(r.content) + "</code>";
1732
+ return "<code" + a.renderAttrs(r) + ">" + Zt(r.content) + "</code>";
1733
1733
  };
1734
1734
  Ct.code_block = function(e, t, u, n, a) {
1735
1735
  const r = e[t];
1736
- return "<pre" + a.renderAttrs(r) + "><code>" + Vt(e[t].content) + `</code></pre>
1736
+ return "<pre" + a.renderAttrs(r) + "><code>" + Zt(e[t].content) + `</code></pre>
1737
1737
  `;
1738
1738
  };
1739
1739
  Ct.fence = function(e, t, u, n, a) {
1740
- const r = e[t], o = r.info ? bu(r.info).trim() : "";
1740
+ const r = e[t], o = r.info ? mu(r.info).trim() : "";
1741
1741
  let i = "", s = "";
1742
1742
  if (o) {
1743
1743
  const d = o.split(/(\s+)/g);
1744
1744
  i = d[0], s = d.slice(2).join("");
1745
1745
  }
1746
1746
  let l;
1747
- if (u.highlight ? l = u.highlight(r.content, i, s) || Vt(r.content) : l = Vt(r.content), l.indexOf("<pre") === 0)
1747
+ if (u.highlight ? l = u.highlight(r.content, i, s) || Zt(r.content) : l = Zt(r.content), l.indexOf("<pre") === 0)
1748
1748
  return l + `
1749
1749
  `;
1750
1750
  if (o) {
@@ -1775,7 +1775,7 @@ Ct.softbreak = function(e, t, u) {
1775
1775
  `;
1776
1776
  };
1777
1777
  Ct.text = function(e, t) {
1778
- return Vt(e[t].content);
1778
+ return Zt(e[t].content);
1779
1779
  };
1780
1780
  Ct.html_block = function(e, t) {
1781
1781
  return e[t].content;
@@ -1783,18 +1783,18 @@ Ct.html_block = function(e, t) {
1783
1783
  Ct.html_inline = function(e, t) {
1784
1784
  return e[t].content;
1785
1785
  };
1786
- function vu() {
1786
+ function bu() {
1787
1787
  this.rules = Vn({}, Ct);
1788
1788
  }
1789
- vu.prototype.renderAttrs = function(t) {
1789
+ bu.prototype.renderAttrs = function(t) {
1790
1790
  let u, n, a;
1791
1791
  if (!t.attrs)
1792
1792
  return "";
1793
1793
  for (a = "", u = 0, n = t.attrs.length; u < n; u++)
1794
- a += " " + Vt(t.attrs[u][0]) + '="' + Vt(t.attrs[u][1]) + '"';
1794
+ a += " " + Zt(t.attrs[u][0]) + '="' + Zt(t.attrs[u][1]) + '"';
1795
1795
  return a;
1796
1796
  };
1797
- vu.prototype.renderToken = function(t, u, n) {
1797
+ bu.prototype.renderToken = function(t, u, n) {
1798
1798
  const a = t[u];
1799
1799
  let r = "";
1800
1800
  if (a.hidden)
@@ -1809,7 +1809,7 @@ vu.prototype.renderToken = function(t, u, n) {
1809
1809
  return r += o ? `>
1810
1810
  ` : ">", r;
1811
1811
  };
1812
- vu.prototype.renderInline = function(e, t, u) {
1812
+ bu.prototype.renderInline = function(e, t, u) {
1813
1813
  let n = "";
1814
1814
  const a = this.rules;
1815
1815
  for (let r = 0, o = e.length; r < o; r++) {
@@ -1818,7 +1818,7 @@ vu.prototype.renderInline = function(e, t, u) {
1818
1818
  }
1819
1819
  return n;
1820
1820
  };
1821
- vu.prototype.renderInlineAsText = function(e, t, u) {
1821
+ bu.prototype.renderInlineAsText = function(e, t, u) {
1822
1822
  let n = "";
1823
1823
  for (let a = 0, r = e.length; a < r; a++)
1824
1824
  switch (e[a].type) {
@@ -1840,7 +1840,7 @@ vu.prototype.renderInlineAsText = function(e, t, u) {
1840
1840
  }
1841
1841
  return n;
1842
1842
  };
1843
- vu.prototype.render = function(e, t, u) {
1843
+ bu.prototype.render = function(e, t, u) {
1844
1844
  let n = "";
1845
1845
  const a = this.rules;
1846
1846
  for (let r = 0, o = e.length; r < o; r++) {
@@ -2017,18 +2017,18 @@ function Cl(e) {
2017
2017
  let f = i.level, m = 0;
2018
2018
  l.length > 0 && l[0].index === 0 && o > 0 && a[o - 1].type === "text_special" && (l = l.slice(1));
2019
2019
  for (let g = 0; g < l.length; g++) {
2020
- const h = l[g].url, w = e.md.normalizeLink(h);
2021
- if (!e.md.validateLink(w))
2020
+ const h = l[g].url, M = e.md.normalizeLink(h);
2021
+ if (!e.md.validateLink(M))
2022
2022
  continue;
2023
2023
  let p = l[g].text;
2024
2024
  l[g].schema ? l[g].schema === "mailto:" && !/^mailto:/i.test(p) ? p = e.md.normalizeLinkText("mailto:" + p).replace(/^mailto:/, "") : p = e.md.normalizeLinkText(p) : p = e.md.normalizeLinkText("http://" + p).replace(/^http:\/\//, "");
2025
- const M = l[g].index;
2026
- if (M > m) {
2025
+ const w = l[g].index;
2026
+ if (w > m) {
2027
2027
  const S = new e.Token("text", "", 0);
2028
- S.content = s.slice(m, M), S.level = f, d.push(S);
2028
+ S.content = s.slice(m, w), S.level = f, d.push(S);
2029
2029
  }
2030
2030
  const y = new e.Token("link_open", "a", 1);
2031
- y.attrs = [["href", w]], y.level = f++, y.markup = "linkify", y.info = "auto", d.push(y);
2031
+ y.attrs = [["href", M]], y.level = f++, y.markup = "linkify", y.info = "auto", d.push(y);
2032
2032
  const A = new e.Token("text", "", 0);
2033
2033
  A.content = p, A.level = f, d.push(A);
2034
2034
  const C = new e.Token("link_close", "a", -1);
@@ -2103,17 +2103,17 @@ function Il(e, t) {
2103
2103
  h = e[u].content.charCodeAt(e[u].content.length - 1);
2104
2104
  break;
2105
2105
  }
2106
- let w = 32;
2106
+ let M = 32;
2107
2107
  if (s < l)
2108
- w = i.charCodeAt(s);
2108
+ M = i.charCodeAt(s);
2109
2109
  else
2110
2110
  for (u = a + 1; u < e.length && !(e[u].type === "softbreak" || e[u].type === "hardbreak"); u++)
2111
2111
  if (e[u].content) {
2112
- w = e[u].content.charCodeAt(0);
2112
+ M = e[u].content.charCodeAt(0);
2113
2113
  break;
2114
2114
  }
2115
- const p = Xu(h) || Qu(String.fromCharCode(h)), M = Xu(w) || Qu(String.fromCharCode(w)), y = Ku(h), A = Ku(w);
2116
- if (A ? f = !1 : M && (y || p || (f = !1)), y ? m = !1 : p && (A || M || (m = !1)), w === 34 && d[0] === '"' && h >= 48 && h <= 57 && (m = f = !1), f && m && (f = p, m = M), !f && !m) {
2115
+ const p = Xu(h) || Qu(String.fromCharCode(h)), w = Xu(M) || Qu(String.fromCharCode(M)), y = Ku(h), A = Ku(M);
2116
+ if (A ? f = !1 : w && (y || p || (f = !1)), y ? m = !1 : p && (A || w || (m = !1)), M === 34 && d[0] === '"' && h >= 48 && h <= 57 && (m = f = !1), f && m && (f = p, m = w), !f && !m) {
2117
2117
  g && (r.content = kn(r.content, d.index, zr));
2118
2118
  continue;
2119
2119
  }
@@ -2317,12 +2317,12 @@ function Ol(e, t, u, n) {
2317
2317
  return !0;
2318
2318
  const m = e.parentType;
2319
2319
  e.parentType = "table";
2320
- const g = e.md.block.ruler.getRules("blockquote"), h = e.push("table_open", "table", 1), w = [t, 0];
2321
- h.map = w;
2320
+ const g = e.md.block.ruler.getRules("blockquote"), h = e.push("table_open", "table", 1), M = [t, 0];
2321
+ h.map = M;
2322
2322
  const p = e.push("thead_open", "thead", 1);
2323
2323
  p.map = [t, t + 1];
2324
- const M = e.push("tr_open", "tr", 1);
2325
- M.map = [t, t + 1];
2324
+ const w = e.push("tr_open", "tr", 1);
2325
+ w.map = [t, t + 1];
2326
2326
  for (let C = 0; C < l.length; C++) {
2327
2327
  const S = e.push("th_open", "th", 1);
2328
2328
  d[C] && (S.attrs = [["style", "text-align:" + d[C]]]);
@@ -2354,7 +2354,7 @@ function Ol(e, t, u, n) {
2354
2354
  }
2355
2355
  e.push("tr_close", "tr", -1);
2356
2356
  }
2357
- return y && (e.push("tbody_close", "tbody", -1), y[1] = a), e.push("table_close", "table", -1), w[1] = a, e.parentType = m, e.line = a, !0;
2357
+ return y && (e.push("tbody_close", "tbody", -1), y[1] = a), e.push("table_close", "table", -1), M[1] = a, e.parentType = m, e.line = a, !0;
2358
2358
  }
2359
2359
  function Ll(e, t, u) {
2360
2360
  if (e.sCount[t] - e.blkIndent < 4)
@@ -2446,17 +2446,17 @@ function $l(e, t, u, n) {
2446
2446
  }
2447
2447
  i.push(e.bMarks[h]), s.push(e.bsCount[h]), d.push(e.tShift[h]), l.push(e.sCount[h]), e.sCount[h] = -1;
2448
2448
  }
2449
- const w = e.blkIndent;
2449
+ const M = e.blkIndent;
2450
2450
  e.blkIndent = 0;
2451
2451
  const p = e.push("blockquote_open", "blockquote", 1);
2452
2452
  p.markup = ">";
2453
- const M = [t, 0];
2454
- p.map = M, e.md.block.tokenize(e, t, h);
2453
+ const w = [t, 0];
2454
+ p.map = w, e.md.block.tokenize(e, t, h);
2455
2455
  const y = e.push("blockquote_close", "blockquote", -1);
2456
- y.markup = ">", e.lineMax = o, e.parentType = m, M[1] = e.line;
2456
+ y.markup = ">", e.lineMax = o, e.parentType = m, w[1] = e.line;
2457
2457
  for (let A = 0; A < d.length; A++)
2458
2458
  e.bMarks[A + t] = i[A], e.tShift[A + t] = d[A], e.sCount[A + t] = l[A], e.bsCount[A + t] = s[A];
2459
- return e.blkIndent = w, !0;
2459
+ return e.blkIndent = M, !0;
2460
2460
  }
2461
2461
  function Bl(e, t, u, n) {
2462
2462
  const a = e.eMarks[t];
@@ -2538,11 +2538,11 @@ function Ul(e, t, u, n) {
2538
2538
  return !1;
2539
2539
  if (n)
2540
2540
  return !0;
2541
- const h = e.src.charCodeAt(g - 1), w = e.tokens.length;
2541
+ const h = e.src.charCodeAt(g - 1), M = e.tokens.length;
2542
2542
  f ? (i = e.push("ordered_list_open", "ol", 1), m !== 1 && (i.attrs = [["start", m]])) : i = e.push("bullet_list_open", "ul", 1);
2543
2543
  const p = [s, 0];
2544
2544
  i.map = p, i.markup = String.fromCharCode(h);
2545
- let M = !1;
2545
+ let w = !1;
2546
2546
  const y = e.md.block.ruler.getRules("list"), A = e.parentType;
2547
2547
  for (e.parentType = "list"; s < u; ) {
2548
2548
  r = g, a = e.eMarks[s];
@@ -2566,7 +2566,7 @@ function Ul(e, t, u, n) {
2566
2566
  const Z = [s, 0];
2567
2567
  i.map = Z, f && (i.info = e.src.slice(o, g - 1));
2568
2568
  const Y = e.tight, L = e.tShift[s], K = e.sCount[s], O = e.listIndent;
2569
- if (e.listIndent = e.blkIndent, e.blkIndent = B, e.tight = !0, e.tShift[s] = D - e.bMarks[s], e.sCount[s] = S, D >= a && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, u) : e.md.block.tokenize(e, s, u, !0), (!e.tight || M) && (l = !1), M = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = O, e.tShift[s] = L, e.sCount[s] = K, e.tight = Y, i = e.push("list_item_close", "li", -1), i.markup = String.fromCharCode(h), s = e.line, Z[1] = s, s >= u || e.sCount[s] < e.blkIndent || e.sCount[s] - e.blkIndent >= 4)
2569
+ if (e.listIndent = e.blkIndent, e.blkIndent = B, e.tight = !0, e.tShift[s] = D - e.bMarks[s], e.sCount[s] = S, D >= a && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, u) : e.md.block.tokenize(e, s, u, !0), (!e.tight || w) && (l = !1), w = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = O, e.tShift[s] = L, e.sCount[s] = K, e.tight = Y, i = e.push("list_item_close", "li", -1), i.markup = String.fromCharCode(h), s = e.line, Z[1] = s, s >= u || e.sCount[s] < e.blkIndent || e.sCount[s] - e.blkIndent >= 4)
2570
2570
  break;
2571
2571
  let N = !1;
2572
2572
  for (let Q = 0, te = y.length; Q < te; Q++)
@@ -2585,7 +2585,7 @@ function Ul(e, t, u, n) {
2585
2585
  if (h !== e.src.charCodeAt(g - 1))
2586
2586
  break;
2587
2587
  }
2588
- return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(h), p[1] = s, e.line = s, e.parentType = A, l && Nl(e, w), !0;
2588
+ return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(h), p[1] = s, e.line = s, e.parentType = A, l && Nl(e, M), !0;
2589
2589
  }
2590
2590
  function zl(e, t, u, n) {
2591
2591
  let a = e.bMarks[t] + e.tShift[t], r = e.eMarks[t], o = t + 1;
@@ -2653,14 +2653,14 @@ function zl(e, t, u, n) {
2653
2653
  A !== null && (s += A, r = s.length, o++);
2654
2654
  } else if (!ke(y)) break;
2655
2655
  }
2656
- let w = e.md.helpers.parseLinkTitle(s, a, r);
2657
- for (; w.can_continue; ) {
2656
+ let M = e.md.helpers.parseLinkTitle(s, a, r);
2657
+ for (; M.can_continue; ) {
2658
2658
  const y = i(o);
2659
2659
  if (y === null) break;
2660
- s += y, a = r, r = s.length, o++, w = e.md.helpers.parseLinkTitle(s, a, r, w);
2660
+ s += y, a = r, r = s.length, o++, M = e.md.helpers.parseLinkTitle(s, a, r, M);
2661
2661
  }
2662
2662
  let p;
2663
- for (a < r && h !== a && w.ok ? (p = w.str, a = w.pos) : (p = "", a = m, o = g); a < r; ) {
2663
+ for (a < r && h !== a && M.ok ? (p = M.str, a = M.pos) : (p = "", a = m, o = g); a < r; ) {
2664
2664
  const y = s.charCodeAt(a);
2665
2665
  if (!ke(y))
2666
2666
  break;
@@ -2675,8 +2675,8 @@ function zl(e, t, u, n) {
2675
2675
  }
2676
2676
  if (a < r && s.charCodeAt(a) !== 10)
2677
2677
  return !1;
2678
- const M = Wn(s.slice(1, l));
2679
- return M ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[M] > "u" && (e.env.references[M] = { title: p, href: f }), e.line = o), !0) : !1;
2678
+ const w = Wn(s.slice(1, l));
2679
+ return w ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[w] > "u" && (e.env.references[w] = { title: p, href: f }), e.line = o), !0) : !1;
2680
2680
  }
2681
2681
  const Hl = [
2682
2682
  "address",
@@ -2741,7 +2741,7 @@ const Hl = [
2741
2741
  "tr",
2742
2742
  "track",
2743
2743
  "ul"
2744
- ], jl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Zl = "[^\"'=<>`\\x00-\\x20]+", Vl = "'[^']*'", Wl = '"[^"]*"', Gl = "(?:" + Zl + "|" + Vl + "|" + Wl + ")", Yl = "(?:\\s+" + jl + "(?:\\s*=\\s*" + Gl + ")?)", Oo = "<[A-Za-z][A-Za-z0-9\\-]*" + Yl + "*\\s*\\/?>", Lo = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", Kl = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Ql = "<[?][\\s\\S]*?[?]>", Xl = "<![A-Za-z][^>]*>", Jl = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", ec = new RegExp("^(?:" + Oo + "|" + Lo + "|" + Kl + "|" + Ql + "|" + Xl + "|" + Jl + ")"), tc = new RegExp("^(?:" + Oo + "|" + Lo + ")"), cu = [
2744
+ ], jl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Zl = "[^\"'=<>`\\x00-\\x20]+", Vl = "'[^']*'", Wl = '"[^"]*"', Gl = "(?:" + Zl + "|" + Vl + "|" + Wl + ")", Yl = "(?:\\s+" + jl + "(?:\\s*=\\s*" + Gl + ")?)", Oo = "<[A-Za-z][A-Za-z0-9\\-]*" + Yl + "*\\s*\\/?>", Lo = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", Kl = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Ql = "<[?][\\s\\S]*?[?]>", Xl = "<![A-Za-z][^>]*>", Jl = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", ec = new RegExp("^(?:" + Oo + "|" + Lo + "|" + Kl + "|" + Ql + "|" + Xl + "|" + Jl + ")"), tc = new RegExp("^(?:" + Oo + "|" + Lo + ")"), lu = [
2745
2745
  [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
2746
2746
  [/^<!--/, /-->/, !0],
2747
2747
  [/^<\?/, /\?>/, !0],
@@ -2755,16 +2755,16 @@ function uc(e, t, u, n) {
2755
2755
  if (e.sCount[t] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(a) !== 60)
2756
2756
  return !1;
2757
2757
  let o = e.src.slice(a, r), i = 0;
2758
- for (; i < cu.length && !cu[i][0].test(o); i++)
2758
+ for (; i < lu.length && !lu[i][0].test(o); i++)
2759
2759
  ;
2760
- if (i === cu.length)
2760
+ if (i === lu.length)
2761
2761
  return !1;
2762
2762
  if (n)
2763
- return cu[i][2];
2763
+ return lu[i][2];
2764
2764
  let s = t + 1;
2765
- if (!cu[i][1].test(o)) {
2765
+ if (!lu[i][1].test(o)) {
2766
2766
  for (; s < u && !(e.sCount[s] < e.blkIndent); s++)
2767
- if (a = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], o = e.src.slice(a, r), cu[i][1].test(o)) {
2767
+ if (a = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], o = e.src.slice(a, r), lu[i][1].test(o)) {
2768
2768
  o.length !== 0 && s++;
2769
2769
  break;
2770
2770
  }
@@ -3203,8 +3203,8 @@ function bc(e, t) {
3203
3203
  }
3204
3204
  if (!t) {
3205
3205
  e.pos = m, e.posMax = g;
3206
- const w = e.push("link_open", "a", 1), p = [["href", o]];
3207
- w.attrs = p, i && p.push(["title", i]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
3206
+ const M = e.push("link_open", "a", 1), p = [["href", o]];
3207
+ M.attrs = p, i && p.push(["title", i]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
3208
3208
  }
3209
3209
  return e.pos = h, e.posMax = f, !0;
3210
3210
  }
@@ -3240,15 +3240,15 @@ function vc(e, t) {
3240
3240
  }
3241
3241
  if (!t) {
3242
3242
  n = e.src.slice(g, h);
3243
- const w = [];
3243
+ const M = [];
3244
3244
  e.md.inline.parse(
3245
3245
  n,
3246
3246
  e.md,
3247
3247
  e.env,
3248
- w
3248
+ M
3249
3249
  );
3250
- const p = e.push("image", "img", 0), M = [["src", d], ["alt", ""]];
3251
- p.attrs = M, p.children = w, p.content = n, s && M.push(["title", s]);
3250
+ const p = e.push("image", "img", 0), w = [["src", d], ["alt", ""]];
3251
+ p.attrs = w, p.children = M, p.content = n, s && w.push(["title", s]);
3252
3252
  }
3253
3253
  return e.pos = r, e.posMax = m, !0;
3254
3254
  }
@@ -3661,12 +3661,12 @@ lt.prototype.normalize = function(t) {
3661
3661
  };
3662
3662
  lt.prototype.onCompile = function() {
3663
3663
  };
3664
- const pu = 2147483647, yt = 36, tr = 1, Ju = 26, Hc = 38, jc = 700, No = 72, Uo = 128, zo = "-", Zc = /^xn--/, Vc = /[^\0-\x7F]/, Wc = /[\x2E\u3002\uFF0E\uFF61]/g, Gc = {
3664
+ const hu = 2147483647, yt = 36, tr = 1, Ju = 26, Hc = 38, jc = 700, No = 72, Uo = 128, zo = "-", Zc = /^xn--/, Vc = /[^\0-\x7F]/, Wc = /[\x2E\u3002\uFF0E\uFF61]/g, Gc = {
3665
3665
  overflow: "Overflow: input needs wider integers to process",
3666
3666
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
3667
3667
  "invalid-input": "Invalid input"
3668
3668
  }, _a = yt - tr, _t = Math.floor, Ca = String.fromCharCode;
3669
- function Nt(e) {
3669
+ function Bt(e) {
3670
3670
  throw new RangeError(Gc[e]);
3671
3671
  }
3672
3672
  function Yc(e, t) {
@@ -3711,21 +3711,21 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
3711
3711
  let n = 0, a = Uo, r = No, o = e.lastIndexOf(zo);
3712
3712
  o < 0 && (o = 0);
3713
3713
  for (let i = 0; i < o; ++i)
3714
- e.charCodeAt(i) >= 128 && Nt("not-basic"), t.push(e.charCodeAt(i));
3714
+ e.charCodeAt(i) >= 128 && Bt("not-basic"), t.push(e.charCodeAt(i));
3715
3715
  for (let i = o > 0 ? o + 1 : 0; i < u; ) {
3716
3716
  const s = n;
3717
3717
  for (let d = 1, f = yt; ; f += yt) {
3718
- i >= u && Nt("invalid-input");
3718
+ i >= u && Bt("invalid-input");
3719
3719
  const m = Qc(e.charCodeAt(i++));
3720
- m >= yt && Nt("invalid-input"), m > _t((pu - n) / d) && Nt("overflow"), n += m * d;
3720
+ m >= yt && Bt("invalid-input"), m > _t((hu - n) / d) && Bt("overflow"), n += m * d;
3721
3721
  const g = f <= r ? tr : f >= r + Ju ? Ju : f - r;
3722
3722
  if (m < g)
3723
3723
  break;
3724
3724
  const h = yt - g;
3725
- d > _t(pu / h) && Nt("overflow"), d *= h;
3725
+ d > _t(hu / h) && Bt("overflow"), d *= h;
3726
3726
  }
3727
3727
  const l = t.length + 1;
3728
- r = Zo(n - s, l, s == 0), _t(n / l) > pu - a && Nt("overflow"), a += _t(n / l), n %= l, t.splice(n++, 0, a);
3728
+ r = Zo(n - s, l, s == 0), _t(n / l) > hu - a && Bt("overflow"), a += _t(n / l), n %= l, t.splice(n++, 0, a);
3729
3729
  }
3730
3730
  return String.fromCodePoint(...t);
3731
3731
  }, Wo = function(e) {
@@ -3738,22 +3738,22 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
3738
3738
  const o = t.length;
3739
3739
  let i = o;
3740
3740
  for (o && t.push(zo); i < u; ) {
3741
- let s = pu;
3741
+ let s = hu;
3742
3742
  for (const d of e)
3743
3743
  d >= n && d < s && (s = d);
3744
3744
  const l = i + 1;
3745
- s - n > _t((pu - a) / l) && Nt("overflow"), a += (s - n) * l, n = s;
3745
+ s - n > _t((hu - a) / l) && Bt("overflow"), a += (s - n) * l, n = s;
3746
3746
  for (const d of e)
3747
- if (d < n && ++a > pu && Nt("overflow"), d === n) {
3747
+ if (d < n && ++a > hu && Bt("overflow"), d === n) {
3748
3748
  let f = a;
3749
3749
  for (let m = yt; ; m += yt) {
3750
3750
  const g = m <= r ? tr : m >= r + Ju ? Ju : m - r;
3751
3751
  if (f < g)
3752
3752
  break;
3753
- const h = f - g, w = yt - g;
3753
+ const h = f - g, M = yt - g;
3754
3754
  t.push(
3755
- Ca(Qr(g + h % w, 0))
3756
- ), f = _t(h / w);
3755
+ Ca(Qr(g + h % M, 0))
3756
+ ), f = _t(h / M);
3757
3757
  }
3758
3758
  t.push(Ca(Qr(f, 0))), r = Zo(a, l, i === o), a = 0, ++i;
3759
3759
  }
@@ -3981,12 +3981,12 @@ function s0(e) {
3981
3981
  t.hostname = Go.toUnicode(t.hostname);
3982
3982
  } catch {
3983
3983
  }
3984
- return mu(Ga(t), mu.defaultChars + "%");
3984
+ return gu(Ga(t), gu.defaultChars + "%");
3985
3985
  }
3986
3986
  function gt(e, t) {
3987
3987
  if (!(this instanceof gt))
3988
3988
  return new gt(e, t);
3989
- t || Qa(e) || (t = e || {}, e = "default"), this.inline = new ln(), this.block = new Gn(), this.core = new Ja(), this.renderer = new vu(), this.linkify = new lt(), this.validateLink = o0, this.normalizeLink = i0, this.normalizeLinkText = s0, this.utils = cl, this.helpers = Vn({}, pl), this.options = {}, this.configure(e), t && this.set(t);
3989
+ t || Qa(e) || (t = e || {}, e = "default"), this.inline = new ln(), this.block = new Gn(), this.core = new Ja(), this.renderer = new bu(), this.linkify = new lt(), this.validateLink = o0, this.normalizeLink = i0, this.normalizeLinkText = s0, this.utils = cl, this.helpers = Vn({}, pl), this.options = {}, this.configure(e), t && this.set(t);
3990
3990
  }
3991
3991
  gt.prototype.set = function(e) {
3992
3992
  return Vn(this.options, e), this;
@@ -4068,7 +4068,7 @@ const l0 = new gt({
4068
4068
  "code",
4069
4069
  "pre"
4070
4070
  ], Ko = ["href", "target", "rel"], d0 = /<(?:\/)?(?:div|p|li|h[1-6]|blockquote|pre)[^>]*>/gi, f0 = /<\/(?:div|p|li|h[1-6]|blockquote|pre)>/gi, h0 = /<(?:div|p|li|h[1-6]|blockquote|pre)[^>]*>/gi, p0 = /&nbsp;/gi, g0 = /https?:\/\/[^\s<>()]+[^\s<>().,!?;:]/i, Oa = /(^|[\s([{"'`])((?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/[^\s<]*)?)/gi, m0 = /[),.!?;:]+$/;
4071
- function Ut(e) {
4071
+ function Nt(e) {
4072
4072
  if (!e)
4073
4073
  return "";
4074
4074
  const t = e.replace(/\r\n?/g, `
@@ -4090,7 +4090,7 @@ function ur(e) {
4090
4090
  `).trim();
4091
4091
  }
4092
4092
  function Qo(e) {
4093
- const t = Ut(e);
4093
+ const t = Nt(e);
4094
4094
  if (!t)
4095
4095
  return "";
4096
4096
  const u = l0.render(C0(t));
@@ -4199,29 +4199,29 @@ function k0(e, t) {
4199
4199
  function nr(e, t = Be("attachment")) {
4200
4200
  return k0(e[0], t);
4201
4201
  }
4202
- function Qt(e) {
4203
- return Ut(e);
4202
+ function Kt(e) {
4203
+ return Nt(e);
4204
4204
  }
4205
- function Zt(e) {
4205
+ function jt(e) {
4206
4206
  return ur(e).length > 0;
4207
4207
  }
4208
- function xu(e) {
4208
+ function vu(e) {
4209
4209
  return ur(e);
4210
4210
  }
4211
- function yu(e, t = Be("message")) {
4211
+ function xu(e, t = Be("message")) {
4212
4212
  if (e.kind === "poll" && e.poll)
4213
4213
  return e.poll.question;
4214
- const u = xu(e.text);
4214
+ const u = vu(e.text);
4215
4215
  return e.attachments.length > 0 ? u || nr(e.attachments, t) : u || t;
4216
4216
  }
4217
4217
  function M0(e) {
4218
- return yu(
4218
+ return xu(
4219
4219
  e,
4220
4220
  e.attachments.length > 0 ? Be("attachment") : Be("message")
4221
4221
  );
4222
4222
  }
4223
4223
  function w0(e, t = !1, u = !0) {
4224
- var n, a, r, o, i, s, l, d, f, m, g, h, w, p, M, y, A, C;
4224
+ var n, a, r, o, i, s, l, d, f, m, g, h, M, p, w, y, A, C;
4225
4225
  if (!e)
4226
4226
  return "";
4227
4227
  if (((n = e.getDeletedAt) == null ? void 0 : n.call(e)) != null)
@@ -4233,7 +4233,7 @@ function w0(e, t = !1, u = !0) {
4233
4233
  return I === "image" ? `${t ? "🖼️ " : ""}${D || "Photo"}` : I === "video" ? `${t ? "🎥 " : ""}${D || S || "Video"}` : I === "audio" ? `${t ? "🎤 " : ""}${S || "Audio message"}` : I === "file" ? `${t ? "📄 " : ""}${D || S || "File"}` : `${t ? "🖼️ " : ""}${D || S || "Media message"}`;
4234
4234
  }
4235
4235
  if (e instanceof V.Action) {
4236
- const D = (((h = (g = (m = e.getActionFor) == null ? void 0 : m.call(e)) == null ? void 0 : g.getMetadata) == null ? void 0 : h.call(g)) ?? ((M = (p = (w = e.getReceiver) == null ? void 0 : w.call(e)) == null ? void 0 : p.getMetadata) == null ? void 0 : M.call(p)) ?? {}).systemDisplayName, I = (y = e.getActionBy) == null ? void 0 : y.call(e), B = ((A = I == null ? void 0 : I.getName) == null ? void 0 : A.call(I)) ?? "", Z = ((C = e.getMessage) == null ? void 0 : C.call(e)) ?? "";
4236
+ const D = (((h = (g = (m = e.getActionFor) == null ? void 0 : m.call(e)) == null ? void 0 : g.getMetadata) == null ? void 0 : h.call(g)) ?? ((w = (p = (M = e.getReceiver) == null ? void 0 : M.call(e)) == null ? void 0 : p.getMetadata) == null ? void 0 : w.call(p)) ?? {}).systemDisplayName, I = (y = e.getActionBy) == null ? void 0 : y.call(e), B = ((A = I == null ? void 0 : I.getName) == null ? void 0 : A.call(I)) ?? "", Z = ((C = e.getMessage) == null ? void 0 : C.call(e)) ?? "";
4237
4237
  return typeof D == "string" && D.trim() && B ? Z.replace(B, D.trim()) : Z;
4238
4238
  }
4239
4239
  return "Custom message";
@@ -4247,7 +4247,7 @@ function A0(e) {
4247
4247
  };
4248
4248
  }
4249
4249
  function E0(e) {
4250
- const t = [], u = xu(e.text);
4250
+ const t = [], u = vu(e.text);
4251
4251
  u && t.push(u);
4252
4252
  for (const n of e.attachments) {
4253
4253
  if (n.url) {
@@ -4263,7 +4263,7 @@ function D0(e) {
4263
4263
  `).trim();
4264
4264
  }
4265
4265
  function ei(e) {
4266
- return e.kind === "poll" && e.poll ? Be("pollPrefix", { question: e.poll.question }) : yu(
4266
+ return e.kind === "poll" && e.poll ? Be("pollPrefix", { question: e.poll.question }) : xu(
4267
4267
  e,
4268
4268
  e.attachments.length > 0 ? Be("sentAnAttachment") : Be("youSentAMessage")
4269
4269
  );
@@ -4527,29 +4527,29 @@ function Ma(e) {
4527
4527
  let Jr = null, wn = null;
4528
4528
  function R0({ environment: e }) {
4529
4529
  za(e);
4530
- const t = z(!1), u = z(!1), n = z(!1), a = z(!1), r = z(!1), o = z(!1), i = z(!1), s = z(!1), l = z(!1), d = z(!1), f = z(!1), m = z(!1), g = z(typeof navigator < "u" ? !navigator.onLine : !1), h = z(!1), w = z(null), p = z(null), M = z([]), y = z([]), A = z([]), C = z([]), S = z(!1), D = z(!1), I = z(null), B = z(null), Z = z(null), Y = z(null), L = z([]), K = U(() => L.value.length), O = U(() => M.value.find((c) => c.id === I.value) ?? null), N = `bcc-ui-connection-${crypto.randomUUID()}`, Q = `bcc-ui-message-${crypto.randomUUID()}`;
4530
+ const t = z(!1), u = z(!1), n = z(!1), a = z(!1), r = z(!1), o = z(!1), i = z(!1), s = z(!1), l = z(!1), d = z(!1), f = z(!1), m = z(!1), g = z(typeof navigator < "u" ? !navigator.onLine : !1), h = z(!1), M = z(null), p = z(null), w = z([]), y = z([]), A = z([]), C = z([]), S = z(!1), D = z(!1), I = z(null), B = z(null), Z = z(null), Y = z(null), L = z([]), K = U(() => L.value.length), O = U(() => w.value.find((c) => c.id === I.value) ?? null), N = `bcc-ui-connection-${crypto.randomUUID()}`, Q = `bcc-ui-message-${crypto.randomUUID()}`;
4531
4531
  let te = !1, se = !1, pe = null, Me = null, De = null, de = null, ot = 0, _e = 0, G = !1, J = !1, q = null;
4532
4532
  const We = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Set();
4533
4533
  let je = null, Ne = null, it = 0;
4534
4534
  async function St() {
4535
- await q0(e), !t.value && (Cu(), qu(), t.value = !0, await Ru(), p.value && (yr(p.value.uid), be(), kt(), !g.value && !J && Ft()));
4535
+ await q0(e), !t.value && (_u(), qu(), t.value = !0, await Ru(), p.value && (yr(p.value.uid), be(), kt(), !g.value && !J && Ft()));
4536
4536
  }
4537
4537
  async function xe(c) {
4538
- w.value = null, u.value = !0;
4538
+ M.value = null, u.value = !0;
4539
4539
  try {
4540
4540
  await St();
4541
4541
  const b = Gu();
4542
4542
  await V.getLoggedinUser() && b !== c && await V.logout(), Da(c);
4543
4543
  const E = await eo(c), R = await V.login(E);
4544
- p.value = Sn(R), yr(p.value.uid), h.value = !0, g.value = typeof navigator < "u" ? !navigator.onLine : !1, be(), kt(), J || await Ft(), await Gt(), la();
4544
+ p.value = Sn(R), yr(p.value.uid), h.value = !0, g.value = typeof navigator < "u" ? !navigator.onLine : !1, be(), kt(), J || await Ft(), await Wt(), la();
4545
4545
  } catch (b) {
4546
- throw P(), w.value = Re(b, "Unable to sign in to chat."), b;
4546
+ throw P(), M.value = Re(b, "Unable to sign in to chat."), b;
4547
4547
  } finally {
4548
4548
  u.value = !1;
4549
4549
  }
4550
4550
  }
4551
4551
  async function ce() {
4552
- w.value = null;
4552
+ M.value = null;
4553
4553
  try {
4554
4554
  Da(null), go(), await V.getLoggedinUser() && await V.logout();
4555
4555
  } finally {
@@ -4563,9 +4563,9 @@ function R0({ environment: e }) {
4563
4563
  return;
4564
4564
  }
4565
4565
  const b = `bcc-chat:${$e().appId}:${c}`;
4566
- _u(b), q = new ar(b), L.value = q.getQueue();
4566
+ yu(b), q = new ar(b), L.value = q.getQueue();
4567
4567
  }
4568
- function _u(c) {
4568
+ function yu(c) {
4569
4569
  if (typeof window > "u")
4570
4570
  return;
4571
4571
  const b = `bcc-chat:${$e().appId}:`, x = [];
@@ -4575,25 +4575,25 @@ function R0({ environment: e }) {
4575
4575
  }
4576
4576
  x.forEach((E) => window.localStorage.removeItem(E));
4577
4577
  }
4578
- function Cu() {
4579
- se || typeof window > "u" || (window.addEventListener("online", It), window.addEventListener("offline", uu), se = !0);
4578
+ function _u() {
4579
+ se || typeof window > "u" || (window.addEventListener("online", It), window.addEventListener("offline", tu), se = !0);
4580
4580
  }
4581
4581
  function It() {
4582
- g.value = !1, G = !0, J || nu(!0);
4582
+ g.value = !1, G = !0, J || uu(!0);
4583
4583
  }
4584
- function uu() {
4584
+ function tu() {
4585
4585
  g.value = !0, m.value = !1, bt();
4586
4586
  }
4587
4587
  function bt() {
4588
4588
  pe !== null && (clearTimeout(pe), pe = null);
4589
4589
  }
4590
- function Tu() {
4590
+ function Cu() {
4591
4591
  ot = Date.now() + 1500;
4592
4592
  }
4593
- function Wt() {
4593
+ function Vt() {
4594
4594
  return Date.now() < ot;
4595
4595
  }
4596
- function nu(c = !1) {
4596
+ function uu(c = !1) {
4597
4597
  if (pe !== null || Me || g.value || !h.value || J)
4598
4598
  return;
4599
4599
  const b = c ? 0 : Math.min(3e4, 1e3 * 2 ** Math.min(_e, 4));
@@ -4618,7 +4618,7 @@ function R0({ environment: e }) {
4618
4618
  const b = V.connect;
4619
4619
  typeof b == "function" && (await b.call(V), m.value = !0), _e = 0, G && await Rt();
4620
4620
  } catch (c) {
4621
- m.value = !1, _e += 1, Lu(c) || (w.value = Re(c, "Unable to reconnect to chat.")), nu();
4621
+ m.value = !1, _e += 1, Lu(c) || (M.value = Re(c, "Unable to reconnect to chat.")), uu();
4622
4622
  } finally {
4623
4623
  Me = null;
4624
4624
  }
@@ -4626,27 +4626,27 @@ function R0({ environment: e }) {
4626
4626
  }
4627
4627
  async function Rt() {
4628
4628
  return De || g.value || !h.value || J || (De = (async () => {
4629
- G = !1, w.value = null;
4629
+ G = !1, M.value = null;
4630
4630
  try {
4631
- await Gt(), la();
4631
+ await Wt(), la();
4632
4632
  } finally {
4633
4633
  De = null;
4634
4634
  }
4635
4635
  })()), De;
4636
4636
  }
4637
4637
  function kt() {
4638
- if (!q || M.value.length > 0)
4638
+ if (!q || w.value.length > 0)
4639
4639
  return;
4640
4640
  const c = q.getConversations();
4641
- c.length !== 0 && (M.value = $t(c), !I.value && M.value.length > 0 && (I.value = M.value[0].id, et(I.value)));
4641
+ c.length !== 0 && (w.value = Pt(c), !I.value && w.value.length > 0 && (I.value = w.value[0].id, et(I.value)));
4642
4642
  }
4643
4643
  function et(c) {
4644
4644
  if (!q || !c)
4645
4645
  return y.value = [], !1;
4646
- const b = q.getMessages(c).sort(zt);
4646
+ const b = q.getMessages(c).sort(Ut);
4647
4647
  return y.value = b, b.length > 0;
4648
4648
  }
4649
- async function ku() {
4649
+ async function Tu() {
4650
4650
  J = !1, G = !0, await Ft();
4651
4651
  }
4652
4652
  async function dn() {
@@ -4654,10 +4654,10 @@ function R0({ environment: e }) {
4654
4654
  const c = V.disconnect;
4655
4655
  typeof c == "function" && await c.call(V), m.value = !1;
4656
4656
  }
4657
- async function Gt() {
4658
- if (await St(), n.value = !0, w.value = null, g.value && q) {
4657
+ async function Wt() {
4658
+ if (await St(), n.value = !0, M.value = null, g.value && q) {
4659
4659
  const c = q.getConversations();
4660
- M.value = $t(c), !I.value && M.value.length > 0 ? await qt(M.value[0].id) : O.value && await Kt(), n.value = !1;
4660
+ w.value = Pt(c), O.value && await Yt(), n.value = !1;
4661
4661
  return;
4662
4662
  }
4663
4663
  try {
@@ -4671,61 +4671,61 @@ function R0({ environment: e }) {
4671
4671
  })
4672
4672
  );
4673
4673
  while (x.length === 50);
4674
- const E = new Map(M.value.map((R) => [R.id, R]));
4674
+ const E = new Map(w.value.map((R) => [R.id, R]));
4675
4675
  for (const R of b) {
4676
4676
  const $ = E.get(R.id);
4677
4677
  $ && (R.subtitle === "No messages yet" && $.subtitle && $.subtitle !== "No messages yet" && (R.subtitle = $.subtitle), !R.lastMessageAt && $.lastMessageAt && (R.lastMessageAt = $.lastMessageAt));
4678
4678
  }
4679
- M.value = $t(await mn(b)), q == null || q.setConversations(M.value), !I.value && M.value.length > 0 ? await qt(M.value[0].id) : O.value && await Kt();
4679
+ w.value = Pt(await mn(b)), q == null || q.setConversations(w.value), O.value && await Yt();
4680
4680
  } catch (c) {
4681
4681
  const b = (q == null ? void 0 : q.getConversations()) ?? [];
4682
4682
  if (b.length > 0) {
4683
- M.value = $t(b), !I.value && M.value.length > 0 && await qt(M.value[0].id);
4683
+ w.value = Pt(b);
4684
4684
  return;
4685
4685
  }
4686
- throw w.value = Re(c, "Unable to load conversations."), c;
4686
+ throw M.value = Re(c, "Unable to load conversations."), c;
4687
4687
  } finally {
4688
4688
  n.value = !1;
4689
4689
  }
4690
4690
  }
4691
- async function qt(c) {
4692
- I.value = c, B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null, et(c), await Kt();
4691
+ async function ku(c) {
4692
+ I.value = c, B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null, et(c), await Yt();
4693
4693
  }
4694
4694
  function fn(c) {
4695
4695
  c && (Y.value = null), Z.value = c;
4696
4696
  }
4697
- function au(c) {
4697
+ function nu(c) {
4698
4698
  c && (Z.value = null), Y.value = c;
4699
4699
  }
4700
- async function ru(c) {
4700
+ async function au(c) {
4701
4701
  B.value = c, Ne = null, D.value = !1, Z.value = null, Y.value = null, await tt(c.id);
4702
4702
  }
4703
4703
  function ct() {
4704
4704
  B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null;
4705
4705
  }
4706
- async function Ot(c, b) {
4706
+ async function qt(c, b) {
4707
4707
  var ue, oe, X, fe, ge, re;
4708
4708
  if (l.value)
4709
4709
  return;
4710
4710
  const x = O.value;
4711
4711
  if (!x)
4712
4712
  return;
4713
- const E = Qt(c);
4714
- if (!Zt(E))
4713
+ const E = Kt(c);
4714
+ if (!jt(E))
4715
4715
  return;
4716
4716
  if (Y.value) {
4717
4717
  await Mu(Y.value, E);
4718
4718
  return;
4719
4719
  }
4720
4720
  const R = (ue = B.value) == null ? void 0 : ue.id, $ = crypto.randomUUID(), H = wa(oa(Z.value, b), $);
4721
- l.value = !0, w.value = null;
4721
+ l.value = !0, M.value = null;
4722
4722
  try {
4723
4723
  if (g.value) {
4724
4724
  gr(x, E, H, R, $), Z.value = null;
4725
4725
  return;
4726
4726
  }
4727
4727
  _n(
4728
- iu({
4728
+ ou({
4729
4729
  conversation: x,
4730
4730
  kind: "text",
4731
4731
  text: E,
@@ -4738,13 +4738,13 @@ function R0({ environment: e }) {
4738
4738
  const Te = new V.TextMessage(x.targetId, E, Vu(x));
4739
4739
  (oe = Te.setMuid) == null || oe.call(Te, $), Object.keys(H).length > 0 && ((X = Te.setMetadata) == null || X.call(Te, H)), R && ((fe = Te.setParentMessageId) == null || fe.call(Te, Number(R)));
4740
4740
  const dt = await V.sendMessage(Te);
4741
- he(Ke(dt, (ge = p.value) == null ? void 0 : ge.uid)), Pt(dt), await Mt(dt), Z.value = null;
4741
+ he(Ke(dt, (ge = p.value) == null ? void 0 : ge.uid)), Lt(dt), await Mt(dt), Z.value = null;
4742
4742
  } catch (Te) {
4743
4743
  if (Lu(Te)) {
4744
- su("queued", $), gr(x, E, H, (re = B.value) == null ? void 0 : re.id, $), Z.value = null;
4744
+ iu("queued", $), gr(x, E, H, (re = B.value) == null ? void 0 : re.id, $), Z.value = null;
4745
4745
  return;
4746
4746
  }
4747
- throw su("failed", $), w.value = Re(Te, "Unable to send the message."), Te;
4747
+ throw iu("failed", $), M.value = Re(Te, "Unable to send the message."), Te;
4748
4748
  } finally {
4749
4749
  l.value = !1;
4750
4750
  }
@@ -4754,9 +4754,9 @@ function R0({ environment: e }) {
4754
4754
  const x = O.value;
4755
4755
  if (!x || g.value)
4756
4756
  return;
4757
- const E = Qt(b);
4758
- if (Zt(E)) {
4759
- l.value = !0, w.value = null;
4757
+ const E = Kt(b);
4758
+ if (jt(E)) {
4759
+ l.value = !0, M.value = null;
4760
4760
  try {
4761
4761
  let ft;
4762
4762
  c.kind === "text" ? ft = new V.TextMessage(x.targetId, E, Vu(x)) : (ft = new V.MediaMessage(
@@ -4766,9 +4766,9 @@ function R0({ environment: e }) {
4766
4766
  Vu(x)
4767
4767
  ), (Ee = ft.setCaption) == null || Ee.call(ft, E)), (At = ft.setId) == null || At.call(ft, Number(c.id));
4768
4768
  const vr = await V.editMessage(ft);
4769
- he(Ke(vr, (Pu = p.value) == null ? void 0 : Pu.uid)), Pt(vr), Y.value = null;
4769
+ he(Ke(vr, (Pu = p.value) == null ? void 0 : Pu.uid)), Lt(vr), Y.value = null;
4770
4770
  } catch (ft) {
4771
- throw w.value = Re(ft, "Unable to edit the message."), ft;
4771
+ throw M.value = Re(ft, "Unable to edit the message."), ft;
4772
4772
  } finally {
4773
4773
  l.value = !1;
4774
4774
  }
@@ -4782,14 +4782,14 @@ function R0({ environment: e }) {
4782
4782
  if (!x)
4783
4783
  return;
4784
4784
  const E = (ue = B.value) == null ? void 0 : ue.id, R = crypto.randomUUID(), $ = wa(oa(Z.value, b), R), H = La(c.file);
4785
- l.value = !0, w.value = null;
4785
+ l.value = !0, M.value = null;
4786
4786
  try {
4787
4787
  if (g.value) {
4788
4788
  await br(x, c, $, E, R), Z.value = null;
4789
4789
  return;
4790
4790
  }
4791
4791
  _n(
4792
- iu({
4792
+ ou({
4793
4793
  conversation: x,
4794
4794
  kind: H,
4795
4795
  text: ((oe = c.caption) == null ? void 0 : oe.trim()) ?? "",
@@ -4815,13 +4815,13 @@ function R0({ environment: e }) {
4815
4815
  );
4816
4816
  (X = Ee.setMuid) == null || X.call(Ee, R), Object.keys($).length > 0 && ((fe = Ee.setMetadata) == null || fe.call(Ee, $)), E && ((ge = Ee.setParentMessageId) == null || ge.call(Ee, Number(E))), (re = c.caption) != null && re.trim() && ((Te = Ee.setCaption) == null || Te.call(Ee, c.caption.trim()));
4817
4817
  const At = await V.sendMediaMessage(Ee);
4818
- he(Ke(At, (dt = p.value) == null ? void 0 : dt.uid)), Pt(At), await Mt(At), Z.value = null;
4818
+ he(Ke(At, (dt = p.value) == null ? void 0 : dt.uid)), Lt(At), await Mt(At), Z.value = null;
4819
4819
  } catch (Ee) {
4820
4820
  if (Lu(Ee)) {
4821
- su("queued", R), await br(x, c, $, E, R), Z.value = null;
4821
+ iu("queued", R), await br(x, c, $, E, R), Z.value = null;
4822
4822
  return;
4823
4823
  }
4824
- throw su("failed", R), w.value = Re(Ee, "Unable to send the attachment."), Ee;
4824
+ throw iu("failed", R), M.value = Re(Ee, "Unable to send the attachment."), Ee;
4825
4825
  } finally {
4826
4826
  l.value = !1;
4827
4827
  }
@@ -4837,7 +4837,7 @@ function R0({ environment: e }) {
4837
4837
  if (!E || R.length < 2)
4838
4838
  return;
4839
4839
  const $ = (oe = B.value) == null ? void 0 : oe.id, H = crypto.randomUUID(), ue = wa(oa(Z.value, b), H);
4840
- l.value = !0, w.value = null;
4840
+ l.value = !0, M.value = null;
4841
4841
  try {
4842
4842
  if (g.value) {
4843
4843
  mr(
@@ -4853,7 +4853,7 @@ function R0({ environment: e }) {
4853
4853
  return;
4854
4854
  }
4855
4855
  _n(
4856
- iu({
4856
+ ou({
4857
4857
  conversation: x,
4858
4858
  kind: "poll",
4859
4859
  text: `Poll: ${E}`,
@@ -4880,10 +4880,10 @@ function R0({ environment: e }) {
4880
4880
  "v2/create",
4881
4881
  ge
4882
4882
  ), Te = (re == null ? void 0 : re.message) ?? (re == null ? void 0 : re.custom_message) ?? ((X = re == null ? void 0 : re.data) == null ? void 0 : X.message) ?? null;
4883
- Te ? (sa(H), he(Ke(Te, (fe = p.value) == null ? void 0 : fe.uid)), Pt(Te), await Mt(Te)) : (sa(H), await W()), Z.value = null;
4883
+ Te ? (sa(H), he(Ke(Te, (fe = p.value) == null ? void 0 : fe.uid)), Lt(Te), await Mt(Te)) : (sa(H), await W()), Z.value = null;
4884
4884
  } catch (ge) {
4885
4885
  if (Lu(ge)) {
4886
- su("queued", H), mr(
4886
+ iu("queued", H), mr(
4887
4887
  x,
4888
4888
  {
4889
4889
  question: E,
@@ -4895,7 +4895,7 @@ function R0({ environment: e }) {
4895
4895
  ), Z.value = null;
4896
4896
  return;
4897
4897
  }
4898
- throw su("failed", H), w.value = Re(ge, "Unable to send the poll."), ge;
4898
+ throw iu("failed", H), M.value = Re(ge, "Unable to send the poll."), ge;
4899
4899
  } finally {
4900
4900
  l.value = !1;
4901
4901
  }
@@ -4909,14 +4909,14 @@ function R0({ environment: e }) {
4909
4909
  if (!(!R.poll || R.poll.options.some(
4910
4910
  (oe) => oe.id === b && oe.voters.includes(E ?? "")
4911
4911
  ))) {
4912
- w.value = null, E && he(Eu(R, b, E));
4912
+ M.value = null, E && he(Eu(R, b, E));
4913
4913
  try {
4914
4914
  await V.callExtension("polls", "POST", "v2/vote", {
4915
4915
  id: x,
4916
4916
  vote: b
4917
4917
  });
4918
4918
  } catch (oe) {
4919
- throw he(R), w.value = Re(oe, "Unable to cast the vote."), oe;
4919
+ throw he(R), M.value = Re(oe, "Unable to cast the vote."), oe;
4920
4920
  }
4921
4921
  }
4922
4922
  }
@@ -4943,19 +4943,19 @@ function R0({ environment: e }) {
4943
4943
  }
4944
4944
  async function aa(c, b) {
4945
4945
  var R;
4946
- w.value = null;
4946
+ M.value = null;
4947
4947
  const x = Ae(c.id, c.parentMessageId) ?? c, E = x.reactions.find(($) => $.emoji === b && $.reactedByMe);
4948
4948
  he(Ge(x, b));
4949
4949
  try {
4950
4950
  const $ = E ? await V.removeReaction(Number(c.id), b) : await V.addReaction(Number(c.id), b);
4951
4951
  he(Ke($, (R = p.value) == null ? void 0 : R.uid));
4952
4952
  } catch ($) {
4953
- throw he(x), w.value = Re($, "Unable to update the reaction."), $;
4953
+ throw he(x), M.value = Re($, "Unable to update the reaction."), $;
4954
4954
  }
4955
4955
  }
4956
- async function Yt(c) {
4956
+ async function Gt(c) {
4957
4957
  var b;
4958
- if (w.value = null, c.deliveryState === "queued" || c.deliveryState === "failed") {
4958
+ if (M.value = null, c.deliveryState === "queued" || c.deliveryState === "failed") {
4959
4959
  wt(c);
4960
4960
  return;
4961
4961
  }
@@ -4964,14 +4964,14 @@ function R0({ environment: e }) {
4964
4964
  const x = await V.deleteMessage(String(c.id)), E = Ke(x, (b = p.value) == null ? void 0 : b.uid);
4965
4965
  wt(E), Fe(E);
4966
4966
  } catch (x) {
4967
- throw w.value = Re(x, "Unable to delete the message."), x;
4967
+ throw M.value = Re(x, "Unable to delete the message."), x;
4968
4968
  }
4969
4969
  }
4970
4970
  async function ra(c) {
4971
4971
  var x, E, R, $, H;
4972
4972
  const b = ((E = (x = c.source) == null ? void 0 : x.getText) == null ? void 0 : E.call(x)) ?? c.text;
4973
- if (Zt(b)) {
4974
- w.value = null;
4973
+ if (jt(b)) {
4974
+ M.value = null;
4975
4975
  try {
4976
4976
  const oe = (H = ($ = (R = (await V.callExtension("message-translation", "POST", "v2/translate", {
4977
4977
  msgId: Number(c.id),
@@ -4990,7 +4990,7 @@ function R0({ environment: e }) {
4990
4990
  };
4991
4991
  Le(X), Pe();
4992
4992
  } catch (ue) {
4993
- throw w.value = Re(ue, "Unable to translate the message."), ue;
4993
+ throw M.value = Re(ue, "Unable to translate the message."), ue;
4994
4994
  }
4995
4995
  }
4996
4996
  }
@@ -5001,7 +5001,7 @@ function R0({ environment: e }) {
5001
5001
  E === it && (C.value = []);
5002
5002
  return;
5003
5003
  }
5004
- s.value = !0, w.value = null;
5004
+ s.value = !0, M.value = null;
5005
5005
  try {
5006
5006
  const H = new V.MessagesRequestBuilder().setLimit(50).setGUID(x).withTags(!0).setTags([b]).build(), ue = [];
5007
5007
  let oe = [];
@@ -5025,7 +5025,7 @@ function R0({ environment: e }) {
5025
5025
  } catch (H) {
5026
5026
  if (E !== it)
5027
5027
  return;
5028
- throw w.value = Re(H, Be("loadScheduledMessagesError")), H;
5028
+ throw M.value = Re(H, Be("loadScheduledMessagesError")), H;
5029
5029
  } finally {
5030
5030
  E === it && (s.value = !1);
5031
5031
  }
@@ -5033,18 +5033,18 @@ function R0({ environment: e }) {
5033
5033
  async function Ie(c, b) {
5034
5034
  const x = O.value;
5035
5035
  if (x) {
5036
- d.value = !0, w.value = null;
5036
+ d.value = !0, M.value = null;
5037
5037
  try {
5038
5038
  c.file ? await z0(x, c, b) : await U0(x, c, b), await Du(x.targetId);
5039
5039
  } catch (E) {
5040
- throw w.value = Re(E, "Unable to schedule the message."), E;
5040
+ throw M.value = Re(E, "Unable to schedule the message."), E;
5041
5041
  } finally {
5042
5042
  d.value = !1;
5043
5043
  }
5044
5044
  }
5045
5045
  }
5046
- async function Lt(c) {
5047
- d.value = !0, w.value = null;
5046
+ async function Ot(c) {
5047
+ d.value = !0, M.value = null;
5048
5048
  try {
5049
5049
  const b = rr(), x = await fetch(`${$e().chatApiBaseUrl}/chats/rescheduleMessage`, {
5050
5050
  method: "POST",
@@ -5063,18 +5063,18 @@ function R0({ environment: e }) {
5063
5063
  throw new Error(`Reschedule failed with status ${x.status}.`);
5064
5064
  await Du(c.originalChatUid);
5065
5065
  } catch (b) {
5066
- throw w.value = Re(b, "Unable to reschedule the message."), b;
5066
+ throw M.value = Re(b, "Unable to reschedule the message."), b;
5067
5067
  } finally {
5068
5068
  d.value = !1;
5069
5069
  }
5070
5070
  }
5071
- const ou = 50;
5071
+ const ru = 50;
5072
5072
  function hn(c) {
5073
- const b = new V.MessagesRequestBuilder().setLimit(ou).hideReplies(!0).hideDeletedMessages(!0);
5073
+ const b = new V.MessagesRequestBuilder().setLimit(ru).hideReplies(!0).hideDeletedMessages(!0);
5074
5074
  return c.type === "group" ? b.setGUID(c.targetId) : b.setUID(c.targetId), b.build();
5075
5075
  }
5076
5076
  function Su(c) {
5077
- return new V.MessagesRequestBuilder().setLimit(ou).setParentMessageId(Number(c)).hideDeletedMessages(!0).build();
5077
+ return new V.MessagesRequestBuilder().setLimit(ru).setParentMessageId(Number(c)).hideDeletedMessages(!0).build();
5078
5078
  }
5079
5079
  async function Iu(c) {
5080
5080
  const b = O.value;
@@ -5088,17 +5088,17 @@ function R0({ environment: e }) {
5088
5088
  const x = await je.request.fetchPrevious(), E = x.map(($) => {
5089
5089
  var H;
5090
5090
  return Ke($, (H = p.value) == null ? void 0 : H.uid);
5091
- }).filter(Et).sort(zt);
5091
+ }).filter(Et).sort(Ut);
5092
5092
  y.value = c != null && c.reset ? An(
5093
5093
  y.value.filter(
5094
5094
  ($) => $.conversationId === b.id && to($)
5095
5095
  ),
5096
5096
  E
5097
- ) : An(y.value, E), S.value = x.length === ou, q == null || q.setMessages(b.id, y.value);
5097
+ ) : An(y.value, E), S.value = x.length === ru, q == null || q.setMessages(b.id, y.value);
5098
5098
  const R = x[x.length - 1];
5099
5099
  return R && (await ee(R), await Mt(R)), x.length > 0;
5100
5100
  }
5101
- async function Kt() {
5101
+ async function Yt() {
5102
5102
  const c = O.value;
5103
5103
  if (!c) {
5104
5104
  y.value = [], S.value = !1, je = null;
@@ -5110,17 +5110,17 @@ function R0({ environment: e }) {
5110
5110
  return;
5111
5111
  }
5112
5112
  try {
5113
- await Iu({ reset: !0 }), M.value = M.value.map((x) => x.id !== c.id ? x : {
5113
+ await Iu({ reset: !0 }), w.value = w.value.map((x) => x.id !== c.id ? x : {
5114
5114
  ...x,
5115
5115
  unreadCount: 0
5116
- }), q == null || q.setConversations(M.value);
5116
+ }), q == null || q.setConversations(w.value);
5117
5117
  } catch (x) {
5118
5118
  const E = (q == null ? void 0 : q.getMessages(c.id)) ?? [];
5119
5119
  if (E.length > 0) {
5120
- b || (y.value = E.sort(zt));
5120
+ b || (y.value = E.sort(Ut));
5121
5121
  return;
5122
5122
  }
5123
- throw w.value = Re(x, "Unable to load messages."), x;
5123
+ throw M.value = Re(x, "Unable to load messages."), x;
5124
5124
  } finally {
5125
5125
  a.value = !1;
5126
5126
  }
@@ -5138,19 +5138,19 @@ function R0({ environment: e }) {
5138
5138
  const x = await Ne.request.fetchPrevious(), E = x.map((H) => {
5139
5139
  var ue;
5140
5140
  return Ke(H, (ue = p.value) == null ? void 0 : ue.uid);
5141
- }).filter(Et).sort(zt);
5141
+ }).filter(Et).sort(Ut);
5142
5142
  A.value = c != null && c.reset ? An(
5143
5143
  A.value.filter(
5144
5144
  (H) => H.parentMessageId === b && to(H)
5145
5145
  ),
5146
5146
  E
5147
- ) : An(A.value, E), D.value = x.length === ou, q == null || q.setThreadMessages(b, A.value);
5147
+ ) : An(A.value, E), D.value = x.length === ru, q == null || q.setThreadMessages(b, A.value);
5148
5148
  const R = x[x.length - 1];
5149
5149
  return R && (await ee(R), await Mt(R)), x.length > 0;
5150
5150
  }
5151
5151
  async function tt(c) {
5152
5152
  if (r.value = !0, g.value && q) {
5153
- A.value = q.getThreadMessages(c).sort(zt), D.value = !1, Ne = null, r.value = !1;
5153
+ A.value = q.getThreadMessages(c).sort(Ut), D.value = !1, Ne = null, r.value = !1;
5154
5154
  return;
5155
5155
  }
5156
5156
  try {
@@ -5158,10 +5158,10 @@ function R0({ environment: e }) {
5158
5158
  } catch (b) {
5159
5159
  const x = (q == null ? void 0 : q.getThreadMessages(c)) ?? [];
5160
5160
  if (x.length > 0) {
5161
- A.value = x.sort(zt);
5161
+ A.value = x.sort(Ut);
5162
5162
  return;
5163
5163
  }
5164
- throw w.value = Re(b, "Unable to load thread."), b;
5164
+ throw M.value = Re(b, "Unable to load thread."), b;
5165
5165
  } finally {
5166
5166
  r.value = !1;
5167
5167
  }
@@ -5169,11 +5169,11 @@ function R0({ environment: e }) {
5169
5169
  async function vt() {
5170
5170
  if (a.value || o.value || !S.value)
5171
5171
  return !1;
5172
- o.value = !0, w.value = null;
5172
+ o.value = !0, M.value = null;
5173
5173
  try {
5174
5174
  return await Iu();
5175
5175
  } catch (c) {
5176
- throw w.value = Re(c, "Unable to load messages."), c;
5176
+ throw M.value = Re(c, "Unable to load messages."), c;
5177
5177
  } finally {
5178
5178
  o.value = !1;
5179
5179
  }
@@ -5181,11 +5181,11 @@ function R0({ environment: e }) {
5181
5181
  async function Fu() {
5182
5182
  if (r.value || i.value || !D.value)
5183
5183
  return !1;
5184
- i.value = !0, w.value = null;
5184
+ i.value = !0, M.value = null;
5185
5185
  try {
5186
5186
  return await pn();
5187
5187
  } catch (c) {
5188
- throw w.value = Re(c, "Unable to load thread."), c;
5188
+ throw M.value = Re(c, "Unable to load thread."), c;
5189
5189
  } finally {
5190
5190
  i.value = !1;
5191
5191
  }
@@ -5235,7 +5235,7 @@ function R0({ environment: e }) {
5235
5235
  la();
5236
5236
  },
5237
5237
  onDisconnected: () => {
5238
- m.value = !1, !g.value && h.value && !J && (G = !0, nu(!0));
5238
+ m.value = !1, !g.value && h.value && !J && (G = !0, uu(!0));
5239
5239
  }
5240
5240
  })
5241
5241
  ), V.addMessageListener(
@@ -5251,15 +5251,15 @@ function R0({ environment: e }) {
5251
5251
  st(c);
5252
5252
  },
5253
5253
  onMessagesDelivered: () => {
5254
- Wt() || W({ includeThread: !1 });
5254
+ Vt() || W({ includeThread: !1 });
5255
5255
  },
5256
5256
  onMessagesRead: () => {
5257
- Wt() || W({ includeThread: !1 });
5257
+ Vt() || W({ includeThread: !1 });
5258
5258
  },
5259
5259
  onMessageEdited: (c) => {
5260
5260
  var x;
5261
5261
  const b = Ke(c, (x = p.value) == null ? void 0 : x.uid);
5262
- Et(b) && (Ou(b), Pt(c));
5262
+ Et(b) && (Ou(b), Lt(c));
5263
5263
  },
5264
5264
  onMessageDeleted: (c) => {
5265
5265
  var x;
@@ -5273,10 +5273,10 @@ function R0({ environment: e }) {
5273
5273
  W();
5274
5274
  },
5275
5275
  onMessagesDeliveredToAll: () => {
5276
- Wt() || W({ includeThread: !1 });
5276
+ Vt() || W({ includeThread: !1 });
5277
5277
  },
5278
5278
  onMessagesReadByAll: () => {
5279
- Wt() || W({ includeThread: !1 });
5279
+ Vt() || W({ includeThread: !1 });
5280
5280
  }
5281
5281
  })
5282
5282
  ), te = !0);
@@ -5285,7 +5285,7 @@ function R0({ environment: e }) {
5285
5285
  var x;
5286
5286
  const b = Ke(c, (x = p.value) == null ? void 0 : x.uid);
5287
5287
  if (Et(b)) {
5288
- if (Pt(c), await ee(c), b.parentMessageId) {
5288
+ if (Lt(c), await ee(c), b.parentMessageId) {
5289
5289
  vn(b), Ye(b.parentMessageId), Pe();
5290
5290
  return;
5291
5291
  }
@@ -5336,14 +5336,14 @@ function R0({ environment: e }) {
5336
5336
  return (b == null ? void 0 : b.mutedUntil) ?? null;
5337
5337
  }
5338
5338
  }
5339
- function Pt(c) {
5339
+ function Lt(c) {
5340
5340
  var $, H;
5341
5341
  const b = Ke(c, ($ = p.value) == null ? void 0 : $.uid);
5342
5342
  if (!Et(b) || b.isDeleted)
5343
5343
  return;
5344
- const x = c.getConversationId(), E = M.value.find((ue) => ue.id === x);
5344
+ const x = c.getConversationId(), E = w.value.find((ue) => ue.id === x);
5345
5345
  if (!E) {
5346
- Gt();
5346
+ Wt();
5347
5347
  return;
5348
5348
  }
5349
5349
  const R = {
@@ -5352,30 +5352,30 @@ function R0({ environment: e }) {
5352
5352
  lastMessageAt: new Date((((H = c.getSentAt) == null ? void 0 : H.call(c)) ?? 0) * 1e3),
5353
5353
  unreadCount: x === I.value ? 0 : E.unreadCount + 1
5354
5354
  };
5355
- M.value = $t(
5356
- M.value.map((ue) => ue.id === x ? R : ue)
5357
- ), q == null || q.setConversations(M.value);
5355
+ w.value = Pt(
5356
+ w.value.map((ue) => ue.id === x ? R : ue)
5357
+ ), q == null || q.setConversations(w.value);
5358
5358
  }
5359
5359
  function Ou(c) {
5360
- y.value = Bt(y.value, c), I.value && (q == null || q.setMessages(I.value, y.value));
5360
+ y.value = $t(y.value, c), I.value && (q == null || q.setMessages(I.value, y.value));
5361
5361
  }
5362
5362
  function vn(c) {
5363
5363
  var b;
5364
- c.parentMessageId === ((b = B.value) == null ? void 0 : b.id) && (A.value = Bt(A.value, c), c.parentMessageId && (q == null || q.setThreadMessages(c.parentMessageId, A.value)));
5364
+ c.parentMessageId === ((b = B.value) == null ? void 0 : b.id) && (A.value = $t(A.value, c), c.parentMessageId && (q == null || q.setThreadMessages(c.parentMessageId, A.value)));
5365
5365
  }
5366
5366
  async function Mt(c) {
5367
5367
  var x, E, R, $, H;
5368
5368
  if (g.value)
5369
5369
  return;
5370
5370
  const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
5371
- !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getReadByMeAt) != null && H.call(c) || (Tu(), await V.markAsRead(c));
5371
+ !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getReadByMeAt) != null && H.call(c) || (Cu(), await V.markAsRead(c));
5372
5372
  }
5373
5373
  async function ee(c) {
5374
5374
  var x, E, R, $, H;
5375
5375
  if (g.value)
5376
5376
  return;
5377
5377
  const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
5378
- !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getDeliveredToMeAt) != null && H.call(c) || (Tu(), await V.markAsDelivered(c));
5378
+ !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getDeliveredToMeAt) != null && H.call(c) || (Cu(), await V.markAsDelivered(c));
5379
5379
  }
5380
5380
  async function v(c) {
5381
5381
  if (g.value)
@@ -5384,14 +5384,14 @@ function R0({ environment: e }) {
5384
5384
  return L0(b);
5385
5385
  }
5386
5386
  function P() {
5387
- u.value = !1, n.value = !1, a.value = !1, r.value = !1, o.value = !1, i.value = !1, s.value = !1, l.value = !1, d.value = !1, f.value = !1, m.value = !1, bt(), _e = 0, G = !1, J = !1, h.value = !1, p.value = null, M.value = [], y.value = [], A.value = [], C.value = [], B.value = null, Z.value = null, Y.value = null, L.value = [], I.value = null, S.value = !1, D.value = !1, je = null, Ne = null, ve.clear();
5387
+ u.value = !1, n.value = !1, a.value = !1, r.value = !1, o.value = !1, i.value = !1, s.value = !1, l.value = !1, d.value = !1, f.value = !1, m.value = !1, bt(), _e = 0, G = !1, J = !1, h.value = !1, p.value = null, w.value = [], y.value = [], A.value = [], C.value = [], B.value = null, Z.value = null, Y.value = null, L.value = [], I.value = null, S.value = !1, D.value = !1, je = null, Ne = null, ve.clear();
5388
5388
  }
5389
5389
  async function W(c) {
5390
5390
  if (de)
5391
5391
  return de;
5392
5392
  const b = (c == null ? void 0 : c.includeThread) ?? !0;
5393
5393
  de = (async () => {
5394
- O.value && await Kt(), b && B.value && await tt(B.value.id);
5394
+ O.value && await Yt(), b && B.value && await tt(B.value.id);
5395
5395
  })();
5396
5396
  try {
5397
5397
  await de;
@@ -5405,10 +5405,10 @@ function R0({ environment: e }) {
5405
5405
  function Le(c) {
5406
5406
  var b, x;
5407
5407
  if (c.parentMessageId) {
5408
- ((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = Bt(A.value, c));
5408
+ ((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = $t(A.value, c));
5409
5409
  return;
5410
5410
  }
5411
- y.value = Bt(y.value, c), ((x = B.value) == null ? void 0 : x.id) === c.id && (B.value = c);
5411
+ y.value = $t(y.value, c), ((x = B.value) == null ? void 0 : x.id) === c.id && (B.value = c);
5412
5412
  }
5413
5413
  function Ae(c, b) {
5414
5414
  var x;
@@ -5440,7 +5440,7 @@ function R0({ environment: e }) {
5440
5440
  ...x,
5441
5441
  replyCount: typeof b == "number" ? b : Math.max(x.replyCount + 1, 1)
5442
5442
  };
5443
- y.value = Bt(y.value, E), ((R = B.value) == null ? void 0 : R.id) === c && (B.value = E);
5443
+ y.value = $t(y.value, E), ((R = B.value) == null ? void 0 : R.id) === c && (B.value = E);
5444
5444
  }
5445
5445
  function Pe() {
5446
5446
  I.value && (q == null || q.setMessages(I.value, y.value)), B.value && (q == null || q.setThreadMessages(B.value.id, A.value));
@@ -5458,7 +5458,7 @@ function R0({ environment: e }) {
5458
5458
  var ue, oe;
5459
5459
  if (c.parentMessageId)
5460
5460
  return;
5461
- const b = c.conversationId, x = M.value.find((X) => X.id === b);
5461
+ const b = c.conversationId, x = w.value.find((X) => X.id === b);
5462
5462
  if (!x)
5463
5463
  return;
5464
5464
  const E = (ue = x.lastMessageAt) == null ? void 0 : ue.getTime(), R = (oe = c.sentAt) == null ? void 0 : oe.getTime();
@@ -5474,8 +5474,8 @@ function R0({ environment: e }) {
5474
5474
  break;
5475
5475
  }
5476
5476
  }
5477
- M.value = $t(
5478
- M.value.map((X) => X.id !== b ? X : H ? {
5477
+ w.value = Pt(
5478
+ w.value.map((X) => X.id !== b ? X : H ? {
5479
5479
  ...X,
5480
5480
  subtitle: In(H),
5481
5481
  lastMessageAt: H.sentAt
@@ -5484,29 +5484,29 @@ function R0({ environment: e }) {
5484
5484
  subtitle: "No messages yet",
5485
5485
  lastMessageAt: void 0
5486
5486
  } : X)
5487
- ), q == null || q.setConversations(M.value);
5487
+ ), q == null || q.setConversations(w.value);
5488
5488
  }
5489
5489
  function xn(c, b) {
5490
5490
  const E = y.value.length > 0 ? y.value[y.value.length - 1] : null;
5491
- M.value = $t(
5492
- M.value.map((R) => R.id !== c ? R : {
5491
+ w.value = Pt(
5492
+ w.value.map((R) => R.id !== c ? R : {
5493
5493
  ...R,
5494
5494
  subtitle: E ? In(E) : "No messages yet",
5495
5495
  lastMessageAt: E == null ? void 0 : E.sentAt
5496
5496
  })
5497
- ), q == null || q.setConversations(M.value);
5497
+ ), q == null || q.setConversations(w.value);
5498
5498
  }
5499
5499
  function yn(c) {
5500
- M.value = $t(
5501
- M.value.map((b) => b.id !== c.conversationId ? b : {
5500
+ w.value = Pt(
5501
+ w.value.map((b) => b.id !== c.conversationId ? b : {
5502
5502
  ...b,
5503
5503
  subtitle: In(c),
5504
5504
  lastMessageAt: c.sentAt,
5505
5505
  unreadCount: 0
5506
5506
  })
5507
- ), q == null || q.setConversations(M.value);
5507
+ ), q == null || q.setConversations(w.value);
5508
5508
  }
5509
- function iu(c) {
5509
+ function ou(c) {
5510
5510
  var E, R;
5511
5511
  const b = /* @__PURE__ */ new Date(), x = Si(c.metadata);
5512
5512
  return {
@@ -5571,7 +5571,7 @@ function R0({ environment: e }) {
5571
5571
  return b.includes("network") || b.includes("failed to fetch") || b.includes("socket") || b.includes("offline");
5572
5572
  }
5573
5573
  function gr(c, b, x, E, R) {
5574
- const $ = iu({
5574
+ const $ = ou({
5575
5575
  conversation: c,
5576
5576
  kind: "text",
5577
5577
  text: b,
@@ -5596,7 +5596,7 @@ function R0({ environment: e }) {
5596
5596
  function mr(c, b, x, E, R) {
5597
5597
  if (Ii(c, b, E))
5598
5598
  return;
5599
- const $ = iu({
5599
+ const $ = ou({
5600
5600
  conversation: c,
5601
5601
  kind: "poll",
5602
5602
  text: `Poll: ${b.question}`,
@@ -5630,7 +5630,7 @@ function R0({ environment: e }) {
5630
5630
  }
5631
5631
  async function br(c, b, x, E, R) {
5632
5632
  var oe, X;
5633
- const $ = La(b.file), H = iu({
5633
+ const $ = La(b.file), H = ou({
5634
5634
  conversation: c,
5635
5635
  kind: $,
5636
5636
  text: ((oe = b.caption) == null ? void 0 : oe.trim()) ?? "",
@@ -5676,9 +5676,9 @@ function R0({ environment: e }) {
5676
5676
  }
5677
5677
  function _n(c) {
5678
5678
  var b;
5679
- c.parentMessageId ? (((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = Bt(A.value, c)), Ye(c.parentMessageId)) : y.value = Bt(y.value, c), yn(c), Pe();
5679
+ c.parentMessageId ? (((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = $t(A.value, c)), Ye(c.parentMessageId)) : y.value = $t(y.value, c), yn(c), Pe();
5680
5680
  }
5681
- function su(c, b) {
5681
+ function iu(c, b) {
5682
5682
  const x = (E) => E.map((R) => {
5683
5683
  const $ = Nn(R);
5684
5684
  return R.muid !== b && $ !== b ? R : {
@@ -5717,7 +5717,7 @@ function R0({ environment: e }) {
5717
5717
  }
5718
5718
  }
5719
5719
  } catch (b) {
5720
- Lu(b) || (w.value = Re(b, "Unable to sync queued messages."));
5720
+ Lu(b) || (M.value = Re(b, "Unable to sync queued messages."));
5721
5721
  } finally {
5722
5722
  f.value = !1;
5723
5723
  }
@@ -5767,9 +5767,9 @@ function R0({ environment: e }) {
5767
5767
  connected: m,
5768
5768
  offlineMode: g,
5769
5769
  loggedIn: h,
5770
- error: w,
5770
+ error: M,
5771
5771
  currentUser: p,
5772
- conversations: M,
5772
+ conversations: w,
5773
5773
  messages: y,
5774
5774
  threadMessages: A,
5775
5775
  scheduledMessages: C,
@@ -5782,13 +5782,13 @@ function R0({ environment: e }) {
5782
5782
  replyToMessage: Z,
5783
5783
  editingMessage: Y,
5784
5784
  init: St,
5785
- connectRealtime: ku,
5785
+ connectRealtime: Tu,
5786
5786
  disconnectRealtime: dn,
5787
5787
  login: xe,
5788
5788
  logout: ce,
5789
- fetchConversations: Gt,
5790
- selectConversation: qt,
5791
- sendTextMessage: Ot,
5789
+ fetchConversations: Wt,
5790
+ selectConversation: ku,
5791
+ sendTextMessage: qt,
5792
5792
  sendAttachmentMessage: wu,
5793
5793
  sendPollMessage: na,
5794
5794
  fetchScheduledMessages: Du,
@@ -5796,13 +5796,13 @@ function R0({ environment: e }) {
5796
5796
  loadOlderThreadMessages: Fu,
5797
5797
  ensureMessageLoaded: gn,
5798
5798
  scheduleMessage: Ie,
5799
- rescheduleMessage: Lt,
5799
+ rescheduleMessage: Ot,
5800
5800
  setReplyToMessage: fn,
5801
- setEditingMessage: au,
5802
- openThread: ru,
5801
+ setEditingMessage: nu,
5802
+ openThread: au,
5803
5803
  closeThread: ct,
5804
5804
  fetchMessageReceipts: v,
5805
- deleteMessage: Yt,
5805
+ deleteMessage: Gt,
5806
5806
  votePoll: Au,
5807
5807
  toggleReaction: aa,
5808
5808
  translateMessage: ra
@@ -5856,7 +5856,7 @@ function O0(e, t) {
5856
5856
  type: n,
5857
5857
  title: u.getName() ?? o,
5858
5858
  subtitle: l && Et(l) && !l.isDeleted ? In(l) : "No messages yet",
5859
- avatar: a ? eu(a.getAvatar()) : void 0,
5859
+ avatar: a ? Jt(a.getAvatar()) : void 0,
5860
5860
  unreadCount: Number.isFinite(d) ? d : 0,
5861
5861
  lastMessageAt: i && !(l != null && l.isDeleted) ? new Date((((f = i.getSentAt) == null ? void 0 : f.call(i)) ?? 0) * 1e3) : void 0,
5862
5862
  tags: (e.getTags() ?? []).map((m) => String(m)),
@@ -5868,10 +5868,10 @@ function O0(e, t) {
5868
5868
  };
5869
5869
  }
5870
5870
  function Ke(e, t) {
5871
- var f, m, g, h, w, p, M, y, A, C, S, D, I;
5872
- const u = (f = e.getSender) == null ? void 0 : f.call(e), n = ((m = u == null ? void 0 : u.getUid) == null ? void 0 : m.call(u)) ?? "system", a = !!((g = e.getDeletedAt) != null && g.call(e)), r = Kn(e), o = td(e), i = a ? [] : ir(e, r), s = a ? void 0 : Qn(e), l = sr(e), d = ((h = e.getQuotedMessage) == null ? void 0 : h.call(e)) ?? ((w = e.getReplyMessage) == null ? void 0 : w.call(e)) ?? ((p = e.getParentMessage) == null ? void 0 : p.call(e));
5871
+ var f, m, g, h, M, p, w, y, A, C, S, D, I;
5872
+ const u = (f = e.getSender) == null ? void 0 : f.call(e), n = ((m = u == null ? void 0 : u.getUid) == null ? void 0 : m.call(u)) ?? "system", a = !!((g = e.getDeletedAt) != null && g.call(e)), r = Kn(e), o = td(e), i = a ? [] : ir(e, r), s = a ? void 0 : Qn(e), l = sr(e), d = ((h = e.getQuotedMessage) == null ? void 0 : h.call(e)) ?? ((M = e.getReplyMessage) == null ? void 0 : M.call(e)) ?? ((p = e.getParentMessage) == null ? void 0 : p.call(e));
5873
5873
  return {
5874
- id: String(((M = e.getId) == null ? void 0 : M.call(e)) ?? `${((y = e.getMuid) == null ? void 0 : y.call(e)) ?? crypto.randomUUID()}`),
5874
+ id: String(((w = e.getId) == null ? void 0 : w.call(e)) ?? `${((y = e.getMuid) == null ? void 0 : y.call(e)) ?? crypto.randomUUID()}`),
5875
5875
  muid: (A = e.getMuid) != null && A.call(e) ? String(e.getMuid()) : void 0,
5876
5876
  conversationId: e.getConversationId(),
5877
5877
  senderId: n,
@@ -5911,7 +5911,7 @@ function P0(e) {
5911
5911
  const t = (o = e == null ? void 0 : e.getSender) == null ? void 0 : o.call(e);
5912
5912
  if (!((i = t == null ? void 0 : t.getUid) == null ? void 0 : i.call(t)))
5913
5913
  return null;
5914
- const n = hu((s = e.getReadAt) == null ? void 0 : s.call(e)), a = hu((l = e.getDeliveredAt) == null ? void 0 : l.call(e)), r = n ? "read" : a ? "delivered" : null;
5914
+ const n = fu((s = e.getReadAt) == null ? void 0 : s.call(e)), a = fu((l = e.getDeliveredAt) == null ? void 0 : l.call(e)), r = n ? "read" : a ? "delivered" : null;
5915
5915
  return r ? {
5916
5916
  kind: r,
5917
5917
  user: Sn(t),
@@ -5923,20 +5923,20 @@ function Sn(e) {
5923
5923
  return {
5924
5924
  uid: e.getUid(),
5925
5925
  name: ((t = e.getName) == null ? void 0 : t.call(e)) ?? e.getUid(),
5926
- avatar: eu((u = e.getAvatar) == null ? void 0 : u.call(e)),
5926
+ avatar: Jt((u = e.getAvatar) == null ? void 0 : u.call(e)),
5927
5927
  status: ((n = e.getStatus) == null ? void 0 : n.call(e)) ?? void 0
5928
5928
  };
5929
5929
  }
5930
5930
  function $0(e) {
5931
5931
  var t, u, n, a;
5932
5932
  return {
5933
- deliveredAt: hu((t = e.getDeliveredAt) == null ? void 0 : t.call(e)),
5934
- deliveredToMeAt: hu((u = e.getDeliveredToMeAt) == null ? void 0 : u.call(e)),
5935
- readAt: hu((n = e.getReadAt) == null ? void 0 : n.call(e)),
5936
- readByMeAt: hu((a = e.getReadByMeAt) == null ? void 0 : a.call(e))
5933
+ deliveredAt: fu((t = e.getDeliveredAt) == null ? void 0 : t.call(e)),
5934
+ deliveredToMeAt: fu((u = e.getDeliveredToMeAt) == null ? void 0 : u.call(e)),
5935
+ readAt: fu((n = e.getReadAt) == null ? void 0 : n.call(e)),
5936
+ readByMeAt: fu((a = e.getReadByMeAt) == null ? void 0 : a.call(e))
5937
5937
  };
5938
5938
  }
5939
- function hu(e) {
5939
+ function fu(e) {
5940
5940
  if (!(!e || Number.isNaN(e)))
5941
5941
  return new Date(e * 1e3);
5942
5942
  }
@@ -5950,13 +5950,13 @@ function B0(e, t) {
5950
5950
  if (a)
5951
5951
  return `Poll: ${a.question}`;
5952
5952
  if (u === V.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
5953
- const w = xu((s = e.getText) == null ? void 0 : s.call(e));
5954
- if (w)
5955
- return w;
5953
+ const M = vu((s = e.getText) == null ? void 0 : s.call(e));
5954
+ if (M)
5955
+ return M;
5956
5956
  }
5957
5957
  if (String(n).toLowerCase() === "message" && or(u)) {
5958
- const w = ir(e, Kn(e))[0];
5959
- return ((f = (d = (l = e.getCaption) == null ? void 0 : l.call(e)) == null ? void 0 : d.trim) == null ? void 0 : f.call(d)) || nr(w ? [w] : [], "Sent an attachment");
5958
+ const M = ir(e, Kn(e))[0];
5959
+ return ((f = (d = (l = e.getCaption) == null ? void 0 : l.call(e)) == null ? void 0 : d.trim) == null ? void 0 : f.call(d)) || nr(M ? [M] : [], "Sent an attachment");
5960
5960
  }
5961
5961
  return ((h = (g = (m = e.getSender) == null ? void 0 : m.call(e)) == null ? void 0 : g.getUid) == null ? void 0 : h.call(g)) === t ? Be("youSentAMessage") : Be("unsupportedMessageType");
5962
5962
  }
@@ -5970,38 +5970,38 @@ function N0(e, t) {
5970
5970
  if (a)
5971
5971
  return `Poll: ${a.question}`;
5972
5972
  if (u === V.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
5973
- const g = Qt((s = e.getText) == null ? void 0 : s.call(e));
5974
- if (Zt(g))
5973
+ const g = Kt((s = e.getText) == null ? void 0 : s.call(e));
5974
+ if (jt(g))
5975
5975
  return g;
5976
5976
  }
5977
5977
  if (String(n).toLowerCase() === "message" && or(u)) {
5978
- const g = Qt((l = e.getCaption) == null ? void 0 : l.call(e));
5979
- if (Zt(g))
5978
+ const g = Kt((l = e.getCaption) == null ? void 0 : l.call(e));
5979
+ if (jt(g))
5980
5980
  return g;
5981
5981
  const h = ir(e, Kn(e))[0];
5982
5982
  return nr(h ? [h] : [], "Sent an attachment");
5983
5983
  }
5984
5984
  return ((m = (f = (d = e.getSender) == null ? void 0 : d.call(e)) == null ? void 0 : f.getUid) == null ? void 0 : m.call(f)) === t ? Be("youSentAMessage") : Be("unsupportedMessageType");
5985
5985
  }
5986
- function $t(e) {
5986
+ function Pt(e) {
5987
5987
  return [...e].filter((t) => t.title !== Be("scheduledMessages")).sort((t, u) => {
5988
5988
  var r, o;
5989
5989
  const n = ((r = t.lastMessageAt) == null ? void 0 : r.getTime()) ?? 0;
5990
5990
  return (((o = u.lastMessageAt) == null ? void 0 : o.getTime()) ?? 0) - n;
5991
5991
  });
5992
5992
  }
5993
- function zt(e, t) {
5993
+ function Ut(e, t) {
5994
5994
  return e.sentAt.getTime() - t.sentAt.getTime();
5995
5995
  }
5996
- function Bt(e, t) {
5996
+ function $t(e, t) {
5997
5997
  if (!Et(t))
5998
- return e.filter(Et).sort(zt);
5998
+ return e.filter(Et).sort(Ut);
5999
5999
  const u = Nn(t), n = e.findIndex((r) => r.id === t.id || !!(r.muid && t.muid && r.muid === t.muid) || !!(u && Nn(r) === u)), a = [...e];
6000
- return n >= 0 ? a[n] = t : a.push(t), a.sort(zt);
6000
+ return n >= 0 ? a[n] = t : a.push(t), a.sort(Ut);
6001
6001
  }
6002
6002
  function An(e, t) {
6003
6003
  return t.reduce(
6004
- (u, n) => Bt(u, n),
6004
+ (u, n) => $t(u, n),
6005
6005
  e.filter(Et)
6006
6006
  );
6007
6007
  }
@@ -6009,7 +6009,7 @@ function to(e) {
6009
6009
  return e.id.startsWith("local-") || e.deliveryState !== "sent";
6010
6010
  }
6011
6011
  function Et(e) {
6012
- return e.kind !== "unsupported" && (e.kind !== "action" || Zt(e.text));
6012
+ return e.kind !== "unsupported" && (e.kind !== "action" || jt(e.text));
6013
6013
  }
6014
6014
  function Nn(e) {
6015
6015
  const t = e.metadata, u = t == null ? void 0 : t.clientMuid;
@@ -6138,13 +6138,13 @@ function W0(e, t) {
6138
6138
  return typeof u == "string" && u.trim() ? u.trim() : ((n = e == null ? void 0 : e.getName) == null ? void 0 : n.call(e)) ?? "System";
6139
6139
  }
6140
6140
  function G0(e, t) {
6141
- const u = eu(ti(t));
6141
+ const u = Jt(ti(t));
6142
6142
  return u || (Y0(e, "sender") ?? void 0);
6143
6143
  }
6144
6144
  function Y0(e, t) {
6145
6145
  var n, a, r;
6146
6146
  const u = (r = (a = (n = ai(e)) == null ? void 0 : n.entities) == null ? void 0 : a[t]) == null ? void 0 : r.entity;
6147
- return eu(ti(u));
6147
+ return Jt(ti(u));
6148
6148
  }
6149
6149
  function ti(e) {
6150
6150
  var a, r;
@@ -6238,7 +6238,7 @@ function ni(e) {
6238
6238
  return String(t).startsWith("image/") ? "image" : String(t).startsWith("video/") ? "video" : String(t).startsWith("audio/") ? "audio" : "file";
6239
6239
  }
6240
6240
  function ir(e, t) {
6241
- var o, i, s, l, d, f, m, g, h, w;
6241
+ var o, i, s, l, d, f, m, g, h, M;
6242
6242
  const u = (o = e.getAttachment) == null ? void 0 : o.call(e), n = ((l = (s = (i = e.getData) == null ? void 0 : i.call(e)) == null ? void 0 : s.attachments) == null ? void 0 : l[0]) ?? null;
6243
6243
  if (!u && !n)
6244
6244
  return [];
@@ -6250,7 +6250,7 @@ function ir(e, t) {
6250
6250
  url: ((f = u == null ? void 0 : u.getUrl) == null ? void 0 : f.call(u)) ?? ((m = u == null ? void 0 : u.getFileUrl) == null ? void 0 : m.call(u)) ?? (n == null ? void 0 : n.url) ?? (n == null ? void 0 : n.fileUrl) ?? void 0,
6251
6251
  mimeType: ((g = u == null ? void 0 : u.getMimeType) == null ? void 0 : g.call(u)) ?? (n == null ? void 0 : n.mimeType) ?? void 0,
6252
6252
  extension: ((h = u == null ? void 0 : u.getExtension) == null ? void 0 : h.call(u)) ?? (n == null ? void 0 : n.extension) ?? void 0,
6253
- size: ((w = u == null ? void 0 : u.getSize) == null ? void 0 : w.call(u)) ?? (n == null ? void 0 : n.size) ?? void 0,
6253
+ size: ((M = u == null ? void 0 : u.getSize) == null ? void 0 : M.call(u)) ?? (n == null ? void 0 : n.size) ?? void 0,
6254
6254
  width: r == null ? void 0 : r.width,
6255
6255
  height: r == null ? void 0 : r.height
6256
6256
  }
@@ -6272,8 +6272,8 @@ function X0(e, t, u) {
6272
6272
  (g = (m = e.getData) == null ? void 0 : m.call(e)) == null ? void 0 : g.metadata,
6273
6273
  (h = e.getMetadata) == null ? void 0 : h.call(e)
6274
6274
  ];
6275
- for (const w of a) {
6276
- const p = J0(w);
6275
+ for (const M of a) {
6276
+ const p = J0(M);
6277
6277
  if (p)
6278
6278
  return p;
6279
6279
  }
@@ -6314,17 +6314,17 @@ function Qn(e) {
6314
6314
  if (t !== "poll" && !n)
6315
6315
  return;
6316
6316
  if (n) {
6317
- const m = String(n.question ?? "").trim(), g = n.options && typeof n.options == "object" ? n.options : {}, h = (d = n.results) != null && d.options && typeof n.results.options == "object" ? n.results.options : {}, w = Array.from(/* @__PURE__ */ new Set([...Object.keys(g), ...Object.keys(h)])).sort(
6318
- (p, M) => Number(p) - Number(M)
6317
+ const m = String(n.question ?? "").trim(), g = n.options && typeof n.options == "object" ? n.options : {}, h = (d = n.results) != null && d.options && typeof n.results.options == "object" ? n.results.options : {}, M = Array.from(/* @__PURE__ */ new Set([...Object.keys(g), ...Object.keys(h)])).sort(
6318
+ (p, w) => Number(p) - Number(w)
6319
6319
  );
6320
- return !m || w.length === 0 ? void 0 : {
6320
+ return !m || M.length === 0 ? void 0 : {
6321
6321
  id: n.id ? String(n.id) : void 0,
6322
6322
  question: m,
6323
- options: w.map((p, M) => {
6323
+ options: M.map((p, w) => {
6324
6324
  const y = h[p] ?? {}, A = y.voters && typeof y.voters == "object" ? Object.keys(y.voters) : [];
6325
6325
  return {
6326
- id: String(p || M + 1),
6327
- text: String(y.text ?? g[p] ?? `Option ${M + 1}`),
6326
+ id: String(p || w + 1),
6327
+ text: String(y.text ?? g[p] ?? `Option ${w + 1}`),
6328
6328
  voteCount: Number(y.count ?? 0),
6329
6329
  voters: A
6330
6330
  };
@@ -6440,13 +6440,13 @@ function sr(e) {
6440
6440
  return t;
6441
6441
  }
6442
6442
  function od(e, t) {
6443
- var o, i, s, l, d, f, m, g, h, w, p, M, y, A, C, S, D, I, B, Z;
6443
+ var o, i, s, l, d, f, m, g, h, M, p, w, y, A, C, S, D, I, B, Z;
6444
6444
  const u = ((i = (o = t == null ? void 0 : t.value) == null ? void 0 : o.getMetadata) == null ? void 0 : i.call(o)) ?? {};
6445
6445
  if (!((s = e == null ? void 0 : e.getSender) != null && s.call(e)) || u.isChannel)
6446
6446
  return "";
6447
6447
  const n = (g = (m = (f = (d = (l = e == null ? void 0 : e.getData) == null ? void 0 : l.call(e)) == null ? void 0 : d.entities) == null ? void 0 : f.receiver) == null ? void 0 : m.entity) == null ? void 0 : g.scope;
6448
- let a = ((p = (w = (h = e == null ? void 0 : e.getReceiver) == null ? void 0 : h.call(e)) == null ? void 0 : w.getMetadata) == null ? void 0 : p.call(w)) ?? {};
6449
- e instanceof V.Action && (a = ((A = (y = (M = e == null ? void 0 : e.getActionFor) == null ? void 0 : M.call(e)) == null ? void 0 : y.getMetadata) == null ? void 0 : A.call(y)) ?? {});
6448
+ let a = ((p = (M = (h = e == null ? void 0 : e.getReceiver) == null ? void 0 : h.call(e)) == null ? void 0 : M.getMetadata) == null ? void 0 : p.call(M)) ?? {};
6449
+ e instanceof V.Action && (a = ((A = (y = (w = e == null ? void 0 : e.getActionFor) == null ? void 0 : w.call(e)) == null ? void 0 : y.getMetadata) == null ? void 0 : A.call(y)) ?? {});
6450
6450
  const r = a.systemDisplayName;
6451
6451
  return (D = (S = (C = e == null ? void 0 : e.getData) == null ? void 0 : C.call(e)) == null ? void 0 : S.metadata) != null && D.senderDisplayName && (n == "moderator" || n === void 0) ? e.getData().metadata.senderDisplayName : r && (e instanceof V.Action || n == "admin") ? r : (Z = (B = (I = e == null ? void 0 : e.getSender) == null ? void 0 : I.call(e)) == null ? void 0 : B.getName) == null ? void 0 : Z.call(B);
6452
6452
  }
@@ -6838,7 +6838,7 @@ function fr(e) {
6838
6838
  var t, u;
6839
6839
  return (u = (t = e == null ? void 0 : e.source) == null ? void 0 : t.getConversationWith) == null ? void 0 : u.call(t);
6840
6840
  }
6841
- function tu(e) {
6841
+ function eu(e) {
6842
6842
  var u, n;
6843
6843
  const t = (n = (u = fr(e)) == null ? void 0 : u.getMetadata) == null ? void 0 : n.call(u);
6844
6844
  return !!(t != null && t.isChannel);
@@ -6853,22 +6853,22 @@ function hr(e) {
6853
6853
  return typeof t == "string" ? t : void 0;
6854
6854
  }
6855
6855
  function Fd(e) {
6856
- return tu(e) && (!cn(e) || hr(e) === "participant");
6856
+ return eu(e) && (!cn(e) || hr(e) === "participant");
6857
6857
  }
6858
6858
  function Rd(e) {
6859
- return tu(e) ? cn(e) : !0;
6859
+ return eu(e) ? cn(e) : !0;
6860
6860
  }
6861
6861
  function qd(e) {
6862
- return tu(e) ? cn(e) : !0;
6862
+ return eu(e) ? cn(e) : !0;
6863
6863
  }
6864
6864
  function Od(e) {
6865
- return tu(e) ? cn(e) && hr(e) !== "participant" : !0;
6865
+ return eu(e) ? cn(e) && hr(e) !== "participant" : !0;
6866
6866
  }
6867
6867
  function Ld(e) {
6868
- return !tu(e);
6868
+ return !eu(e);
6869
6869
  }
6870
6870
  function Pd(e) {
6871
- return (e == null ? void 0 : e.type) === "user" ? !0 : tu(e) ? !1 : cn(e);
6871
+ return (e == null ? void 0 : e.type) === "user" ? !0 : eu(e) ? !1 : cn(e);
6872
6872
  }
6873
6873
  function $d(e, t) {
6874
6874
  const u = t == null ? void 0 : t.trim();
@@ -6884,7 +6884,7 @@ function Bd(e) {
6884
6884
  }), a = U(() => Rd(u.value)), r = U(() => qd(u.value)), o = U(() => Od(u.value)), i = U(() => Ld(u.value)), s = U(() => {
6885
6885
  const f = e.getPropIsReadOnly();
6886
6886
  return f !== void 0 ? f : Fd(u.value);
6887
- }), l = U(() => tu(u.value)), d = U(
6887
+ }), l = U(() => eu(u.value)), d = U(
6888
6888
  () => e.getPropSendOptions() ?? $d(u.value, e.getSenderDisplayName())
6889
6889
  );
6890
6890
  return {
@@ -6912,8 +6912,8 @@ function xi() {
6912
6912
  }
6913
6913
  function Ud(e) {
6914
6914
  const { chatClient: t, selectedConversation: u, usesPublicContract: n, loadingChat: a } = e, r = U(() => {
6915
- var M;
6916
- const p = e.getPropMessages() ?? ((M = t.value) == null ? void 0 : M.messages.value) ?? [];
6915
+ var w;
6916
+ const p = e.getPropMessages() ?? ((w = t.value) == null ? void 0 : w.messages.value) ?? [];
6917
6917
  return e.getHideDeletedMessages() ? p.filter((y) => !y.isDeleted) : p;
6918
6918
  }), o = U(() => {
6919
6919
  const p = e.getPropLoadingMessages();
@@ -6925,13 +6925,13 @@ function Ud(e) {
6925
6925
  var p;
6926
6926
  return ((p = t.value) == null ? void 0 : p.loadingOlderMessages.value) ?? !1;
6927
6927
  }), l = U(() => {
6928
- var M;
6929
- const p = e.getPropThreadMessages() ?? ((M = t.value) == null ? void 0 : M.threadMessages.value) ?? [];
6928
+ var w;
6929
+ const p = e.getPropThreadMessages() ?? ((w = t.value) == null ? void 0 : w.threadMessages.value) ?? [];
6930
6930
  return e.getHideDeletedMessages() ? p.filter((y) => !y.isDeleted) : p;
6931
6931
  }), d = U(() => {
6932
- var M;
6932
+ var w;
6933
6933
  const p = e.getPropLoadingThreadMessages();
6934
- return p !== void 0 ? p : ((M = t.value) == null ? void 0 : M.loadingThreadMessages.value) ?? !1;
6934
+ return p !== void 0 ? p : ((w = t.value) == null ? void 0 : w.loadingThreadMessages.value) ?? !1;
6935
6935
  }), f = U(() => {
6936
6936
  var p;
6937
6937
  return ((p = t.value) == null ? void 0 : p.activeThreadParentMessage.value) ?? null;
@@ -6944,7 +6944,7 @@ function Ud(e) {
6944
6944
  }), h = U(() => {
6945
6945
  const p = e.getPropShowDefaultEmptyState();
6946
6946
  return p !== void 0 ? p : !n.value;
6947
- }), w = U(
6947
+ }), M = U(
6948
6948
  () => !!u.value && !o.value && r.value.length === 0
6949
6949
  );
6950
6950
  return {
@@ -6958,7 +6958,7 @@ function Ud(e) {
6958
6958
  hasOlderThreadMessages: m,
6959
6959
  loadingOlderThreadMessages: g,
6960
6960
  showDefaultEmptyState: h,
6961
- isChatEmpty: w
6961
+ isChatEmpty: M
6962
6962
  };
6963
6963
  }
6964
6964
  const yi = Symbol("messagesCtx");
@@ -7003,7 +7003,7 @@ function Hd(e) {
7003
7003
  function h(D) {
7004
7004
  u.value = m(D);
7005
7005
  }
7006
- async function w() {
7006
+ async function M() {
7007
7007
  const D = e.getClient();
7008
7008
  if (!D) return;
7009
7009
  const I = t.value;
@@ -7013,7 +7013,7 @@ function Hd(e) {
7013
7013
  const I = e.getClient();
7014
7014
  I && (i(), await I.sendAttachmentMessage(D, e.getSendOptions()));
7015
7015
  }
7016
- async function M(D) {
7016
+ async function w(D) {
7017
7017
  const I = e.getClient();
7018
7018
  I && (i(), await I.sendPollMessage(D, e.getSendOptions()));
7019
7019
  }
@@ -7048,9 +7048,9 @@ function Hd(e) {
7048
7048
  getEditableMessageText: m,
7049
7049
  loadMainDraft: g,
7050
7050
  loadThreadDraft: h,
7051
- sendMessage: w,
7051
+ sendMessage: M,
7052
7052
  sendAttachment: p,
7053
- sendPoll: M,
7053
+ sendPoll: w,
7054
7054
  scheduleMessage: y,
7055
7055
  sendThreadMessage: A,
7056
7056
  sendThreadAttachment: C,
@@ -7329,7 +7329,7 @@ function tf(e) {
7329
7329
  return {
7330
7330
  uid: s.getUid(),
7331
7331
  displayName: s.getName(),
7332
- avatar: eu((l = s.getAvatar) == null ? void 0 : l.call(s)) ?? "",
7332
+ avatar: Jt((l = s.getAvatar) == null ? void 0 : l.call(s)) ?? "",
7333
7333
  role: s.getScope()
7334
7334
  };
7335
7335
  }), e.onMembersChanged(t.value);
@@ -7345,11 +7345,11 @@ function tf(e) {
7345
7345
  const f = {
7346
7346
  uid: o.getUid(),
7347
7347
  displayName: o.getName(),
7348
- avatar: eu((g = o.getAvatar) == null ? void 0 : g.call(o)) ?? "",
7348
+ avatar: Jt((g = o.getAvatar) == null ? void 0 : g.call(o)) ?? "",
7349
7349
  role: s ?? ((h = o.getScope) == null ? void 0 : h.call(o)) ?? V.GROUP_MEMBER_SCOPE.PARTICIPANT
7350
7350
  };
7351
- i === "add" ? t.value.some((w) => w.uid === f.uid) || (t.value = [...t.value, f]) : i === "remove" ? t.value = t.value.filter((w) => w.uid !== f.uid) : t.value = t.value.map(
7352
- (w) => w.uid === f.uid ? { ...w, ...f } : w
7351
+ i === "add" ? t.value.some((M) => M.uid === f.uid) || (t.value = [...t.value, f]) : i === "remove" ? t.value = t.value.filter((M) => M.uid !== f.uid) : t.value = t.value.map(
7352
+ (M) => M.uid === f.uid ? { ...M, ...f } : M
7353
7353
  ), e.onMembersChanged(t.value);
7354
7354
  }
7355
7355
  return Zn(() => {
@@ -7393,7 +7393,7 @@ function uf(e) {
7393
7393
  xt.scrollToMessageId.value === r && (xt.scrollToMessageId.value = void 0);
7394
7394
  return;
7395
7395
  }
7396
- await Xt();
7396
+ await Qt();
7397
7397
  const i = (g = e.chatRootRef.value) == null ? void 0 : g.querySelector(`[data-message-id="${r}"]`);
7398
7398
  if (!i)
7399
7399
  return a < 5 ? (await new Promise((h) => setTimeout(h, 50)), t(r, a + 1)) : void 0;
@@ -7705,18 +7705,18 @@ function Af(e, t) {
7705
7705
  ]);
7706
7706
  }
7707
7707
  function Ef(e) {
7708
- const t = z(null), u = z(null), n = z(null), a = z(0), r = z(!1), o = z({ x: 0, y: 0 }), i = z(Ut(e.getModelValue()));
7708
+ const t = z(null), u = z(null), n = z(null), a = z(0), r = z(!1), o = z({ x: 0, y: 0 }), i = z(Nt(e.getModelValue()));
7709
7709
  Xe(
7710
7710
  () => e.getModelValue(),
7711
7711
  (C) => {
7712
- const S = u.value, D = Ut(C);
7712
+ const S = u.value, D = Nt(C);
7713
7713
  if (D === i.value)
7714
7714
  return;
7715
7715
  if (!S) {
7716
7716
  i.value = D;
7717
7717
  return;
7718
7718
  }
7719
- const I = Ut(S.innerHTML);
7719
+ const I = Nt(S.innerHTML);
7720
7720
  D !== I && (S.innerHTML = D), D ? delete S.dataset.empty : S.dataset.empty = "true", i.value = D;
7721
7721
  },
7722
7722
  { flush: "post" }
@@ -7725,7 +7725,7 @@ function Ef(e) {
7725
7725
  const C = u.value;
7726
7726
  if (!C)
7727
7727
  return;
7728
- const S = Ut(C.innerHTML);
7728
+ const S = Nt(C.innerHTML);
7729
7729
  S ? delete C.dataset.empty : (C.innerHTML = "", C.dataset.empty = "true"), i.value = S, e.updateModelValue(S);
7730
7730
  }
7731
7731
  function l() {
@@ -7770,12 +7770,12 @@ function Ef(e) {
7770
7770
  }
7771
7771
  C.key === "Escape" && d();
7772
7772
  }
7773
- function w(C) {
7773
+ function M(C) {
7774
7774
  var I, B;
7775
7775
  C.preventDefault();
7776
7776
  const S = ((I = C.clipboardData) == null ? void 0 : I.getData("text/html")) ?? "", D = ((B = C.clipboardData) == null ? void 0 : B.getData("text/plain")) ?? "";
7777
7777
  if (document.execCommand("styleWithCSS", !1, "false"), S) {
7778
- const Z = Ut(S);
7778
+ const Z = Nt(S);
7779
7779
  if (Z) {
7780
7780
  document.execCommand("insertHTML", !1, Z), s();
7781
7781
  return;
@@ -7790,7 +7790,7 @@ function Ef(e) {
7790
7790
  }
7791
7791
  C.preventDefault(), o.value = { x: C.clientX, y: C.clientY }, r.value = !0;
7792
7792
  }
7793
- function M(C) {
7793
+ function w(C) {
7794
7794
  var D, I;
7795
7795
  const S = C.target;
7796
7796
  S && ((D = n.value) != null && D.contains(S) || (I = t.value) != null && I.contains(S)) || d();
@@ -7802,14 +7802,14 @@ function Ef(e) {
7802
7802
  a.value += 1, d(), i.value = "", e.updateModelValue("");
7803
7803
  }
7804
7804
  return Zn(() => {
7805
- document.addEventListener("pointerdown", M), document.addEventListener("selectionchange", y), Xt(() => {
7805
+ document.addEventListener("pointerdown", w), document.addEventListener("selectionchange", y), Qt(() => {
7806
7806
  if (u.value) {
7807
- const C = Ut(e.getModelValue());
7807
+ const C = Nt(e.getModelValue());
7808
7808
  u.value.innerHTML = C, C ? delete u.value.dataset.empty : u.value.dataset.empty = "true", i.value = C;
7809
7809
  }
7810
7810
  });
7811
7811
  }), nn(() => {
7812
- document.removeEventListener("pointerdown", M), document.removeEventListener("selectionchange", y);
7812
+ document.removeEventListener("pointerdown", w), document.removeEventListener("selectionchange", y);
7813
7813
  }), {
7814
7814
  applyFormat: m,
7815
7815
  composerEditorRef: u,
@@ -7821,7 +7821,7 @@ function Ef(e) {
7821
7821
  handleContextMenu: p,
7822
7822
  handleInput: g,
7823
7823
  handleKeydown: h,
7824
- handlePaste: w,
7824
+ handlePaste: M,
7825
7825
  hideFormatMenu: d,
7826
7826
  resetEditor: A,
7827
7827
  showFormatMenu: r
@@ -7854,8 +7854,8 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
7854
7854
  if (!a.value) return;
7855
7855
  const h = g.target;
7856
7856
  if (!(h instanceof Node) || (p = r.value) != null && p.contains(h)) return;
7857
- const w = h instanceof Element ? h : h.parentElement;
7858
- w != null && w.closest('[data-testid="composer-actions-button"]') || l();
7857
+ const M = h instanceof Element ? h : h.parentElement;
7858
+ M != null && M.closest('[data-testid="composer-actions-button"]') || l();
7859
7859
  }
7860
7860
  return Zn(() => {
7861
7861
  document.addEventListener("pointerdown", m, !0);
@@ -7867,17 +7867,17 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
7867
7867
  class: "composer-actions-menu",
7868
7868
  "data-testid": "composer-actions-popover"
7869
7869
  }, [
7870
- (k(), F(He, null, ht(i, (w) => T("button", {
7871
- key: w.kind,
7870
+ (k(), F(He, null, ht(i, (M) => T("button", {
7871
+ key: M.kind,
7872
7872
  type: "button",
7873
7873
  class: "composer-actions-menu__item",
7874
- "data-testid": w.testId,
7875
- onClick: (p) => d(w.kind)
7874
+ "data-testid": M.testId,
7875
+ onClick: (p) => d(M.kind)
7876
7876
  }, [
7877
7877
  T("span", Sf, [
7878
- (k(), ae(nt(w.icon), { class: "size-5" }))
7878
+ (k(), ae(nt(M.icon), { class: "size-5" }))
7879
7879
  ]),
7880
- T("span", null, j(_(o)(w.label)), 1)
7880
+ T("span", null, j(_(o)(M.label)), 1)
7881
7881
  ], 8, Df)), 64)),
7882
7882
  T("button", {
7883
7883
  type: "button",
@@ -7915,7 +7915,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
7915
7915
  T("div", qf, [
7916
7916
  T("p", Of, j(e.variant === "editing" ? _(n)("editingInContext", { context: e.contextLabel }) : _(n)("replyingInContext", { context: e.contextLabel })), 1),
7917
7917
  T("p", Lf, j(e.message.senderName), 1),
7918
- T("p", Pf, j(_(yu)(e.message)), 1)
7918
+ T("p", Pf, j(_(xu)(e.message)), 1)
7919
7919
  ]),
7920
7920
  ie(_(at), {
7921
7921
  icon: _(pr),
@@ -7938,7 +7938,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
7938
7938
  return (a, r) => e.visible ? (k(), F("div", {
7939
7939
  key: 0,
7940
7940
  class: "format-menu",
7941
- style: gu({ left: `${e.position.x}px`, top: `${e.position.y}px` })
7941
+ style: pu({ left: `${e.position.x}px`, top: `${e.position.y}px` })
7942
7942
  }, [
7943
7943
  T("button", {
7944
7944
  type: "button",
@@ -7981,14 +7981,14 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
7981
7981
  emits: ["update:visible", "send"],
7982
7982
  setup(e, { expose: t, emit: u }) {
7983
7983
  const n = e, a = u, { t: r } = Oe(), o = z(""), i = z(["", ""]), s = U(() => {
7984
- const h = o.value.trim(), w = i.value.map((p) => p.trim()).filter(Boolean);
7985
- return !!h && w.length >= 2;
7984
+ const h = o.value.trim(), M = i.value.map((p) => p.trim()).filter(Boolean);
7985
+ return !!h && M.length >= 2;
7986
7986
  });
7987
7987
  function l() {
7988
7988
  i.value = [...i.value, ""];
7989
7989
  }
7990
7990
  function d(h) {
7991
- i.value.length <= 2 || (i.value = i.value.filter((w, p) => p !== h));
7991
+ i.value.length <= 2 || (i.value = i.value.filter((M, p) => p !== h));
7992
7992
  }
7993
7993
  function f() {
7994
7994
  o.value = "", i.value = ["", ""];
@@ -8002,7 +8002,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8002
8002
  function g() {
8003
8003
  a("update:visible", !1), f();
8004
8004
  }
8005
- return t({ reset: f }), (h, w) => (k(), ae(_(Na), {
8005
+ return t({ reset: f }), (h, M) => (k(), ae(_(Na), {
8006
8006
  visible: e.visible,
8007
8007
  modal: "",
8008
8008
  header: _(r)("createPollTitle"),
@@ -8017,7 +8017,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8017
8017
  T("div", jf, [
8018
8018
  ie(_(xr), {
8019
8019
  modelValue: o.value,
8020
- "onUpdate:modelValue": w[0] || (w[0] = (p) => o.value = p),
8020
+ "onUpdate:modelValue": M[0] || (M[0] = (p) => o.value = p),
8021
8021
  class: "poll-dialog-input w-full",
8022
8022
  placeholder: _(r)("pollQuestionPlaceholder")
8023
8023
  }, null, 8, ["modelValue", "placeholder"])
@@ -8025,16 +8025,16 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8025
8025
  ]),
8026
8026
  T("div", Zf, [
8027
8027
  T("label", Vf, j(_(r)("options")), 1),
8028
- (k(!0), F(He, null, ht(i.value, (p, M) => (k(), F("div", {
8029
- key: M,
8028
+ (k(!0), F(He, null, ht(i.value, (p, w) => (k(), F("div", {
8029
+ key: w,
8030
8030
  class: "poll-dialog-option-row"
8031
8031
  }, [
8032
8032
  T("div", Wf, [
8033
8033
  ie(_(xr), {
8034
8034
  "model-value": p,
8035
8035
  class: "poll-dialog-input w-full",
8036
- placeholder: _(r)("option", { index: M + 1 }),
8037
- "onUpdate:modelValue": (y) => i.value[M] = String(y)
8036
+ placeholder: _(r)("option", { index: w + 1 }),
8037
+ "onUpdate:modelValue": (y) => i.value[w] = String(y)
8038
8038
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
8039
8039
  ]),
8040
8040
  ie(_(at), {
@@ -8043,7 +8043,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8043
8043
  rounded: "",
8044
8044
  severity: "secondary",
8045
8045
  disabled: i.value.length <= 2,
8046
- onClick: (y) => d(M)
8046
+ onClick: (y) => d(w)
8047
8047
  }, null, 8, ["icon", "disabled", "onClick"])
8048
8048
  ]))), 128)),
8049
8049
  ie(_(at), {
@@ -8086,28 +8086,28 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8086
8086
  return new Date(Date.now() + 60 * 60 * 1e3);
8087
8087
  }
8088
8088
  function l() {
8089
- const M = s(), y = M.getFullYear(), A = String(M.getMonth() + 1).padStart(2, "0"), C = String(M.getDate()).padStart(2, "0");
8089
+ const w = s(), y = w.getFullYear(), A = String(w.getMonth() + 1).padStart(2, "0"), C = String(w.getDate()).padStart(2, "0");
8090
8090
  return `${y}-${A}-${C}`;
8091
8091
  }
8092
8092
  function d() {
8093
- const M = s(), y = String(M.getHours()).padStart(2, "0"), A = String(M.getMinutes()).padStart(2, "0");
8093
+ const w = s(), y = String(w.getHours()).padStart(2, "0"), A = String(w.getMinutes()).padStart(2, "0");
8094
8094
  return `${y}:${A}`;
8095
8095
  }
8096
8096
  const f = U(() => /^([01]\d|2[0-3]):([0-5]\d)$/.test(i.value)), m = U(() => !!o.value && f.value && n.canSchedule);
8097
8097
  function g() {
8098
- const [M, y, A] = o.value.split("-").map(Number), [C, S] = i.value.split(":").map(Number);
8099
- return new Date(M, y - 1, A, C, S, 0, 0).toISOString();
8098
+ const [w, y, A] = o.value.split("-").map(Number), [C, S] = i.value.split(":").map(Number);
8099
+ return new Date(w, y - 1, A, C, S, 0, 0).toISOString();
8100
8100
  }
8101
8101
  function h() {
8102
8102
  o.value = l(), i.value = d();
8103
8103
  }
8104
- function w() {
8104
+ function M() {
8105
8105
  m.value && (a("schedule", { scheduleDate: g() }), a("update:visible", !1), h());
8106
8106
  }
8107
8107
  function p() {
8108
8108
  a("update:visible", !1), h();
8109
8109
  }
8110
- return t({ reset: h }), (M, y) => (k(), ae(_(Na), {
8110
+ return t({ reset: h }), (w, y) => (k(), ae(_(Na), {
8111
8111
  visible: e.visible,
8112
8112
  modal: "",
8113
8113
  header: _(r)("scheduleMessage"),
@@ -8151,7 +8151,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8151
8151
  label: _(r)("schedule"),
8152
8152
  icon: _(Ai),
8153
8153
  disabled: n.disabled || !m.value,
8154
- onClick: w
8154
+ onClick: M
8155
8155
  }, null, 8, ["label", "icon", "disabled"])
8156
8156
  ])
8157
8157
  ])
@@ -8201,9 +8201,9 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8201
8201
  }, a = e, r = u, o = z(null), i = z(null), s = z(null), l = z("file"), d = z(!1), f = z(!1), m = z(!1), { t: g } = Oe();
8202
8202
  let h = null;
8203
8203
  const {
8204
- applyFormat: w,
8204
+ applyFormat: M,
8205
8205
  composerEditorRef: p,
8206
- composerShellRef: M,
8206
+ composerShellRef: w,
8207
8207
  editorKey: y,
8208
8208
  formatMenuPosition: A,
8209
8209
  focusEditor: C,
@@ -8235,7 +8235,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8235
8235
  default:
8236
8236
  return g("attachment");
8237
8237
  }
8238
- }), Q = U(() => !a.editingMessage && !a.replyToMessage ? "" : a.compact ? "pt-1" : "pt-1.5"), te = U(() => Zt(a.modelValue) || !!s.value), se = U(() => te.value && O.value !== "file"), pe = U(() => s.value ? g("attachmentSummary", { name: s.value.name }) : xu(a.modelValue) || g("currentDraftWillBeScheduled"));
8238
+ }), Q = U(() => !a.editingMessage && !a.replyToMessage ? "" : a.compact ? "pt-1" : "pt-1.5"), te = U(() => jt(a.modelValue) || !!s.value), se = U(() => te.value && O.value !== "file"), pe = U(() => s.value ? g("attachmentSummary", { name: s.value.name }) : vu(a.modelValue) || g("currentDraftWillBeScheduled"));
8239
8239
  Xe(
8240
8240
  () => a.resetSignal,
8241
8241
  () => {
@@ -8243,7 +8243,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8243
8243
  }
8244
8244
  );
8245
8245
  async function Me() {
8246
- await Xt(), C();
8246
+ await Qt(), C();
8247
8247
  }
8248
8248
  function De() {
8249
8249
  var xe;
@@ -8274,7 +8274,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8274
8274
  if (s.value) {
8275
8275
  r("sendAttachment", {
8276
8276
  file: s.value,
8277
- caption: Qt(a.modelValue)
8277
+ caption: Kt(a.modelValue)
8278
8278
  });
8279
8279
  return;
8280
8280
  }
@@ -8287,9 +8287,9 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8287
8287
  function We(xe) {
8288
8288
  r("scheduleMessage", {
8289
8289
  ...xe,
8290
- text: s.value ? void 0 : Qt(a.modelValue),
8290
+ text: s.value ? void 0 : Kt(a.modelValue),
8291
8291
  file: s.value ?? void 0,
8292
- caption: s.value ? Qt(a.modelValue) : void 0
8292
+ caption: s.value ? Kt(a.modelValue) : void 0
8293
8293
  });
8294
8294
  }
8295
8295
  function ve() {
@@ -8357,7 +8357,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8357
8357
  ])) : ne("", !0),
8358
8358
  T("div", {
8359
8359
  ref_key: "composerShellRef",
8360
- ref: M,
8360
+ ref: w,
8361
8361
  class: Ce(["composer-shell w-full", a.compact ? "composer-shell--compact" : "composer-shell--default"])
8362
8362
  }, [
8363
8363
  ie(Rf, {
@@ -8472,7 +8472,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8472
8472
  ie(Nf, {
8473
8473
  visible: _(L),
8474
8474
  position: _(A),
8475
- onFormat: ce[9] || (ce[9] = (be) => _(w)(be))
8475
+ onFormat: ce[9] || (ce[9] = (be) => _(M)(be))
8476
8476
  }, null, 8, ["visible", "position"]),
8477
8477
  ie(Kf, {
8478
8478
  visible: d.value,
@@ -8511,8 +8511,8 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8511
8511
  ), g = U(() => l.value), h = U(() => {
8512
8512
  const Y = l.value ? r.loadingThreadMessages.value : r.loadingMessages.value;
8513
8513
  return o.isSendingMessage.value || Y || o.isSchedulingMessage.value;
8514
- }), w = U(() => l.value ? m.value && a.canOpenThread.value : m.value && !a.isReadOnly.value), p = U(() => l.value ? m.value && !a.canOpenThread.value : m.value && a.isReadOnly.value);
8515
- function M() {
8514
+ }), M = U(() => l.value ? m.value && a.canOpenThread.value : m.value && !a.isReadOnly.value), p = U(() => l.value ? m.value && !a.canOpenThread.value : m.value && a.isReadOnly.value);
8515
+ function w() {
8516
8516
  s.emit("composer:send", { target: u.target });
8517
8517
  }
8518
8518
  function y(Y) {
@@ -8542,7 +8542,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8542
8542
  var Y;
8543
8543
  await ((Y = B.value) == null ? void 0 : Y.focusEditor());
8544
8544
  }
8545
- return t({ focusEditor: Z }), (Y, L) => w.value ? (k(), ae(v1, {
8545
+ return t({ focusEditor: Z }), (Y, L) => M.value ? (k(), ae(v1, {
8546
8546
  key: 0,
8547
8547
  ref_key: "composerRef",
8548
8548
  ref: B,
@@ -8556,7 +8556,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
8556
8556
  "offline-mode": _(o).offlineMode.value,
8557
8557
  "pending-queue-count": _(o).pendingQueueCount.value,
8558
8558
  "onUpdate:modelValue": L[0] || (L[0] = (K) => d.value = K),
8559
- onSendText: M,
8559
+ onSendText: w,
8560
8560
  onSendAttachment: y,
8561
8561
  onSendPoll: A,
8562
8562
  onScheduleMessage: C,
@@ -8570,7 +8570,7 @@ function C1(e) {
8570
8570
  const t = e.actionMenuRef, u = z(null), n = z(null), a = typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches;
8571
8571
  let r = null;
8572
8572
  function o(O) {
8573
- return O.kind === "text" && Zt(O.text);
8573
+ return O.kind === "text" && jt(O.text);
8574
8574
  }
8575
8575
  function i(O) {
8576
8576
  return O.isOwn && ["text", "image", "video", "audio", "file"].includes(O.kind) && !O.isDeleted && O.deliveryState === "sent";
@@ -8621,19 +8621,19 @@ function C1(e) {
8621
8621
  return;
8622
8622
  N.preventDefault(), N.stopPropagation(), (se = e.onMenuOpen) == null || se.call(e), u.value = O;
8623
8623
  const te = g(N);
8624
- await Xt(), (pe = t.value) == null || pe.show(N, { x: te.x + 2, y: te.y + 2 });
8624
+ await Qt(), (pe = t.value) == null || pe.show(N, { x: te.x + 2, y: te.y + 2 });
8625
8625
  }
8626
- function w(O, N) {
8626
+ function M(O, N) {
8627
8627
  h(O, N, "contextmenu");
8628
8628
  }
8629
8629
  function p(O, N) {
8630
8630
  if (u.value) {
8631
- N.preventDefault(), N.stopPropagation(), M();
8631
+ N.preventDefault(), N.stopPropagation(), w();
8632
8632
  return;
8633
8633
  }
8634
8634
  h(O, N, "tap");
8635
8635
  }
8636
- function M() {
8636
+ function w() {
8637
8637
  var O;
8638
8638
  y(), (O = t.value) == null || O.hide();
8639
8639
  }
@@ -8641,7 +8641,7 @@ function C1(e) {
8641
8641
  u.value = null;
8642
8642
  }
8643
8643
  function A(O, N) {
8644
- e.canReact() && (e.emit.toggleReaction(O, N), M());
8644
+ e.canReact() && (e.emit.toggleReaction(O, N), w());
8645
8645
  }
8646
8646
  function C(O, N) {
8647
8647
  e.canReact() && e.emit.toggleReaction(O, N);
@@ -8664,25 +8664,25 @@ function C1(e) {
8664
8664
  }
8665
8665
  n.value = O.id, r && clearTimeout(r), r = setTimeout(() => {
8666
8666
  n.value = null;
8667
- }, _1), M();
8667
+ }, _1), w();
8668
8668
  }
8669
8669
  function D(O) {
8670
- e.canReply() && (e.emit.reply(O), M());
8670
+ e.canReply() && (e.emit.reply(O), w());
8671
8671
  }
8672
8672
  function I(O) {
8673
- e.emit.edit(O), M();
8673
+ e.emit.edit(O), w();
8674
8674
  }
8675
8675
  function B(O) {
8676
- e.canOpenThread() && (e.emit.openThread(O), M());
8676
+ e.canOpenThread() && (e.emit.openThread(O), w());
8677
8677
  }
8678
8678
  function Z(O) {
8679
- e.emit.translate(O), M();
8679
+ e.emit.translate(O), w();
8680
8680
  }
8681
8681
  function Y(O) {
8682
- e.emit.info(O), M();
8682
+ e.emit.info(O), w();
8683
8683
  }
8684
8684
  function L(O) {
8685
- e.emit.delete(O), M();
8685
+ e.emit.delete(O), w();
8686
8686
  }
8687
8687
  function K(O) {
8688
8688
  return [
@@ -8742,9 +8742,9 @@ function C1(e) {
8742
8742
  activeActionMessage: u,
8743
8743
  copiedMessageId: n,
8744
8744
  supportsDesktopContextMenu: a,
8745
- handleMessageContextMenu: w,
8745
+ handleMessageContextMenu: M,
8746
8746
  handleMessageTap: p,
8747
- closeActionMenu: M,
8747
+ closeActionMenu: w,
8748
8748
  resetActionMenuState: y,
8749
8749
  reactToMessage: A,
8750
8750
  toggleInlineReaction: C,
@@ -8775,7 +8775,7 @@ function E1(e) {
8775
8775
  function m() {
8776
8776
  a && (a.resizeObserver.disconnect(), clearTimeout(a.timeoutId), a = null);
8777
8777
  }
8778
- function g(p, M, y) {
8778
+ function g(p, w, y) {
8779
8779
  m();
8780
8780
  const A = () => {
8781
8781
  if (!a || a.el !== p)
@@ -8792,7 +8792,7 @@ function E1(e) {
8792
8792
  a = {
8793
8793
  el: p,
8794
8794
  lastScrollHeight: y,
8795
- expectedScrollTop: M,
8795
+ expectedScrollTop: w,
8796
8796
  resizeObserver: C,
8797
8797
  timeoutId: setTimeout(() => {
8798
8798
  m();
@@ -8803,20 +8803,20 @@ function E1(e) {
8803
8803
  const p = t.value;
8804
8804
  p && (p.scrollTop = p.scrollHeight, n = p.scrollTop);
8805
8805
  }
8806
- function w() {
8806
+ function M() {
8807
8807
  const p = t.value;
8808
8808
  if (!p) return;
8809
- const M = p.scrollTop;
8810
- (a == null ? void 0 : a.el) === p && Math.abs(M - a.expectedScrollTop) > A1 && m();
8811
- const y = M < n, A = Math.max(0, p.scrollHeight - M - p.clientHeight);
8812
- y && A > T1 ? u = !1 : A <= k1 && (u = !0), n = M, p.scrollTop <= M1 && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
8809
+ const w = p.scrollTop;
8810
+ (a == null ? void 0 : a.el) === p && Math.abs(w - a.expectedScrollTop) > A1 && m();
8811
+ const y = w < n, A = Math.max(0, p.scrollHeight - w - p.clientHeight);
8812
+ y && A > T1 ? u = !1 : A <= k1 && (u = !0), n = w, p.scrollTop <= M1 && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
8813
8813
  }
8814
8814
  return Xe(
8815
8815
  () => {
8816
- var M, y, A, C;
8816
+ var w, y, A, C;
8817
8817
  const p = e.getMessages();
8818
8818
  return {
8819
- conversationId: ((M = e.getConversation()) == null ? void 0 : M.id) ?? null,
8819
+ conversationId: ((w = e.getConversation()) == null ? void 0 : w.id) ?? null,
8820
8820
  parentMessageId: ((y = e.getParentMessage()) == null ? void 0 : y.id) ?? null,
8821
8821
  loading: e.isLoading(),
8822
8822
  messageCount: p.length,
@@ -8824,45 +8824,45 @@ function E1(e) {
8824
8824
  lastMessageId: ((C = p[p.length - 1]) == null ? void 0 : C.id) ?? null
8825
8825
  };
8826
8826
  },
8827
- async (p, M) => {
8828
- const y = !M || p.conversationId !== M.conversationId || p.parentMessageId !== M.parentMessageId;
8829
- if (y && m(), f(), !y && !!M && !u && p.messageCount > M.messageCount && p.firstMessageId !== M.firstMessageId && p.lastMessageId === M.lastMessageId) {
8827
+ async (p, w) => {
8828
+ const y = !w || p.conversationId !== w.conversationId || p.parentMessageId !== w.parentMessageId;
8829
+ if (y && m(), f(), !y && !!w && !u && p.messageCount > w.messageCount && p.firstMessageId !== w.firstMessageId && p.lastMessageId === w.lastMessageId) {
8830
8830
  const C = t.value;
8831
8831
  if (!C)
8832
8832
  return;
8833
8833
  const S = C.scrollTop, D = C.scrollHeight;
8834
- await Xt(), g(C, S, D);
8834
+ await Qt(), g(C, S, D);
8835
8835
  return;
8836
8836
  }
8837
- y && (u = !0), !p.loading && u && (await Xt(), h());
8837
+ y && (u = !0), !p.loading && u && (await Qt(), h());
8838
8838
  },
8839
8839
  { immediate: !0 }
8840
8840
  ), nn(() => {
8841
8841
  m(), l();
8842
8842
  }), {
8843
- handleThreadScroll: w
8843
+ handleThreadScroll: M
8844
8844
  };
8845
8845
  }
8846
8846
  const D1 = 1, S1 = 4;
8847
8847
  function I1(e) {
8848
8848
  const t = z(1), u = z(0), n = z(0), a = z(!1), r = /* @__PURE__ */ new Map();
8849
8849
  let o = null, i = 0, s = 0, l = 0, d = 0, f = 0, m = 1, g = 0, h = 0;
8850
- function w(N, Q, te) {
8850
+ function M(N, Q, te) {
8851
8851
  return Math.min(Math.max(N, Q), te);
8852
8852
  }
8853
8853
  function p(N) {
8854
- return w(N, D1, S1);
8854
+ return M(N, D1, S1);
8855
8855
  }
8856
- function M(N, Q, te = t.value) {
8856
+ function w(N, Q, te = t.value) {
8857
8857
  var J, q, We, ve;
8858
8858
  const se = ((J = e.viewportRef.value) == null ? void 0 : J.clientWidth) ?? 0, pe = ((q = e.viewportRef.value) == null ? void 0 : q.clientHeight) ?? 0, Me = ((We = e.imageRef.value) == null ? void 0 : We.clientWidth) ?? se, De = ((ve = e.imageRef.value) == null ? void 0 : ve.clientHeight) ?? pe, de = Me * te, ot = De * te, _e = Math.max(0, (de - se) / 2), G = Math.max(0, (ot - pe) / 2);
8859
8859
  return {
8860
- x: w(N, -_e, _e),
8861
- y: w(Q, -G, G)
8860
+ x: M(N, -_e, _e),
8861
+ y: M(Q, -G, G)
8862
8862
  };
8863
8863
  }
8864
8864
  function y(N, Q = u.value, te = n.value) {
8865
- const se = p(N), pe = M(Q, te, se);
8865
+ const se = p(N), pe = w(Q, te, se);
8866
8866
  t.value = se, u.value = pe.x, n.value = pe.y, se === 1 && (u.value = 0, n.value = 0);
8867
8867
  }
8868
8868
  function A() {
@@ -8973,10 +8973,10 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
8973
8973
  }, {
8974
8974
  default: Ve(() => [
8975
8975
  T("div", F1, [
8976
- Jt(a.$slots, "default")
8976
+ Xt(a.$slots, "default")
8977
8977
  ]),
8978
8978
  a.$slots.footer ? (k(), F("div", R1, [
8979
- Jt(a.$slots, "footer")
8979
+ Xt(a.$slots, "footer")
8980
8980
  ])) : ne("", !0)
8981
8981
  ]),
8982
8982
  _: 3
@@ -9024,9 +9024,9 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9024
9024
  translateX: m,
9025
9025
  translateY: g,
9026
9026
  isDragging: h,
9027
- resetTransform: w,
9027
+ resetTransform: M,
9028
9028
  handlePointerDown: p,
9029
- handlePointerMove: M,
9029
+ handlePointerMove: w,
9030
9030
  handlePointerUp: y,
9031
9031
  handlePointerCancel: A,
9032
9032
  handleWheel: C,
@@ -9042,7 +9042,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9042
9042
  return (I = u.attachment) == null ? void 0 : I.url;
9043
9043
  },
9044
9044
  () => {
9045
- w();
9045
+ M();
9046
9046
  }
9047
9047
  );
9048
9048
  function D() {
@@ -9097,7 +9097,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9097
9097
  onPointerdown: B[0] || (B[0] = //@ts-ignore
9098
9098
  (...K) => _(p) && _(p)(...K)),
9099
9099
  onPointermove: B[1] || (B[1] = //@ts-ignore
9100
- (...K) => _(M) && _(M)(...K)),
9100
+ (...K) => _(w) && _(w)(...K)),
9101
9101
  onPointerup: B[2] || (B[2] = //@ts-ignore
9102
9102
  (...K) => _(y) && _(y)(...K)),
9103
9103
  onPointercancel: B[3] || (B[3] = //@ts-ignore
@@ -9116,7 +9116,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9116
9116
  alt: e.attachment.name,
9117
9117
  draggable: "false",
9118
9118
  class: Ce(["media-viewer-image max-h-full max-w-full object-contain will-change-transform select-none", _(f) > 1 ? _(h) ? "cursor-grabbing" : "cursor-grab" : "cursor-zoom-in"]),
9119
- style: gu({
9119
+ style: pu({
9120
9120
  transform: `translate3d(${_(m)}px, ${_(g)}px, 0) scale(${_(f)})`,
9121
9121
  transformOrigin: "center center"
9122
9122
  })
@@ -9226,7 +9226,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9226
9226
  }), h = g.headers.get("content-type") ?? "";
9227
9227
  if (!g.ok || !h.includes("text/html"))
9228
9228
  return;
9229
- const w = await g.text(), p = new DOMParser().parseFromString(w, "text/html"), M = {
9229
+ const M = await g.text(), p = new DOMParser().parseFromString(M, "text/html"), w = {
9230
9230
  title: i(p, 'meta[property="og:title"]') || i(p, 'meta[name="twitter:title"]') || ((m = (f = p.querySelector("title")) == null ? void 0 : f.textContent) == null ? void 0 : m.trim()) || r.value,
9231
9231
  description: i(p, 'meta[property="og:description"]') || i(p, 'meta[name="description"]') || i(p, 'meta[name="twitter:description"]') || o.value,
9232
9232
  imageUrl: s(
@@ -9235,7 +9235,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9235
9235
  ),
9236
9236
  siteName: i(p, 'meta[property="og:site_name"]') || r.value
9237
9237
  };
9238
- u.value = M;
9238
+ u.value = w;
9239
9239
  } catch {
9240
9240
  u.value = null;
9241
9241
  } finally {
@@ -9261,7 +9261,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9261
9261
  return /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(d);
9262
9262
  }
9263
9263
  return (d, f) => {
9264
- var m, g, h, w;
9264
+ var m, g, h, M;
9265
9265
  return k(), F("a", {
9266
9266
  href: e.url,
9267
9267
  target: "_blank",
@@ -9278,7 +9278,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9278
9278
  T("div", r2, [
9279
9279
  T("p", o2, j(((g = u.value) == null ? void 0 : g.siteName) || r.value), 1),
9280
9280
  T("p", i2, j(((h = u.value) == null ? void 0 : h.title) || r.value), 1),
9281
- T("p", s2, j(((w = u.value) == null ? void 0 : w.description) || o.value), 1),
9281
+ T("p", s2, j(((M = u.value) == null ? void 0 : M.description) || o.value), 1),
9282
9282
  n.value && !u.value ? (k(), F("p", l2, j(_(a)("loadingPreview")), 1)) : ne("", !0)
9283
9283
  ])
9284
9284
  ], 10, u2);
@@ -9342,7 +9342,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9342
9342
  }
9343
9343
  function i(d) {
9344
9344
  var g, h;
9345
- const f = xu(d.text).trim();
9345
+ const f = vu(d.text).trim();
9346
9346
  if (!f)
9347
9347
  return !1;
9348
9348
  if (d.attachments.length !== 1)
@@ -9367,7 +9367,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9367
9367
  key: 0,
9368
9368
  type: "button",
9369
9369
  class: "attachment-image-button attachment-media-bleed media-surface attachment-media-frame group relative block text-left",
9370
- style: gu(l(m)),
9370
+ style: pu(l(m)),
9371
9371
  onClick: (g) => u("openMedia", m)
9372
9372
  }, [
9373
9373
  T("img", {
@@ -9378,7 +9378,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9378
9378
  ], 12, g2)) : m.kind === "video" && m.url ? (k(), F("div", {
9379
9379
  key: 1,
9380
9380
  class: "attachment-media-bleed media-surface attachment-media-frame group relative rounded-2xl",
9381
- style: gu(l(m))
9381
+ style: pu(l(m))
9382
9382
  }, [
9383
9383
  T("video", b2, [
9384
9384
  T("source", {
@@ -9656,7 +9656,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9656
9656
  T("div", uh, [
9657
9657
  T("div", {
9658
9658
  class: Ce(["h-full rounded-full transition-all", r(l.id) ? "poll-fill-active" : "poll-fill-default"]),
9659
- style: gu({ width: `${e.message.poll.totalVotes ? l.voteCount / e.message.poll.totalVotes * 100 : 0}%` })
9659
+ style: pu({ width: `${e.message.poll.totalVotes ? l.voteCount / e.message.poll.totalVotes * 100 : 0}%` })
9660
9660
  }, null, 6)
9661
9661
  ])
9662
9662
  ], 8, J2)
@@ -9678,7 +9678,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9678
9678
  onClick: a[0] || (a[0] = (r) => u("open"))
9679
9679
  }, [
9680
9680
  T("p", rh, j(e.message.replyTo.senderName), 1),
9681
- T("p", oh, j(_(xu)(e.message.replyTo.text)), 1)
9681
+ T("p", oh, j(_(vu)(e.message.replyTo.text)), 1)
9682
9682
  ], 2));
9683
9683
  }
9684
9684
  }), sh = /* @__PURE__ */ we(ih, [["__scopeId", "data-v-3c042537"]]), lh = { class: "space-y-2.5" }, ch = /* @__PURE__ */ ye({
@@ -9783,7 +9783,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9783
9783
  }, null, 8, ["message"])) : (k(), ae(ch, {
9784
9784
  key: 3,
9785
9785
  message: e.message,
9786
- onAnchorclick: f[2] || (f[2] = (h, w) => d.$emit("anchorclick", h, w))
9786
+ onAnchorclick: f[2] || (f[2] = (h, M) => d.$emit("anchorclick", h, M))
9787
9787
  }, null, 8, ["message"])),
9788
9788
  T("div", hh, [
9789
9789
  ie(G2, {
@@ -9903,13 +9903,13 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9903
9903
  const n = u, a = z(null), r = z(!1), o = z({ left: 0, top: 0 });
9904
9904
  let i = null, s = null;
9905
9905
  function l(p) {
9906
- const M = p.currentTarget ?? p.target;
9907
- return M instanceof HTMLElement ? M : null;
9906
+ const w = p.currentTarget ?? p.target;
9907
+ return w instanceof HTMLElement ? w : null;
9908
9908
  }
9909
9909
  async function d() {
9910
9910
  if (typeof window > "u" || !a.value)
9911
9911
  return;
9912
- const p = window.visualViewport, M = (p == null ? void 0 : p.offsetLeft) ?? 0, y = (p == null ? void 0 : p.offsetTop) ?? 0, A = (p == null ? void 0 : p.width) ?? window.innerWidth, C = (p == null ? void 0 : p.height) ?? window.innerHeight, S = a.value.getBoundingClientRect(), D = 12, I = 10, B = M + D, Z = M + A - S.width - D, Y = y + D, L = y + C - S.height - D, K = Math.max(B, Z);
9912
+ const p = window.visualViewport, w = (p == null ? void 0 : p.offsetLeft) ?? 0, y = (p == null ? void 0 : p.offsetTop) ?? 0, A = (p == null ? void 0 : p.width) ?? window.innerWidth, C = (p == null ? void 0 : p.height) ?? window.innerHeight, S = a.value.getBoundingClientRect(), D = 12, I = 10, B = w + D, Z = w + A - S.width - D, Y = y + D, L = y + C - S.height - D, K = Math.max(B, Z);
9913
9913
  let O = B, N = Y;
9914
9914
  if (s) {
9915
9915
  const Q = s.y + I + S.height <= y + C - D;
@@ -9920,8 +9920,8 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9920
9920
  }
9921
9921
  o.value = { left: O, top: N };
9922
9922
  }
9923
- async function f(p, M) {
9924
- i = l(p), s = M ?? null, !(!i && !s) && (r.value = !0, await Xt(), await d());
9923
+ async function f(p, w) {
9924
+ i = l(p), s = w ?? null, !(!i && !s) && (r.value = !0, await Qt(), await d());
9925
9925
  }
9926
9926
  function m() {
9927
9927
  r.value && (r.value = !1, i = null, s = null, n("hide"));
@@ -9930,33 +9930,33 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
9930
9930
  var y;
9931
9931
  if (!r.value)
9932
9932
  return;
9933
- const M = p.target;
9934
- (y = a.value) != null && y.contains(M) || i != null && i.contains(M) || m();
9933
+ const w = p.target;
9934
+ (y = a.value) != null && y.contains(w) || i != null && i.contains(w) || m();
9935
9935
  }
9936
9936
  function h(p) {
9937
9937
  p.key === "Escape" && m();
9938
9938
  }
9939
- function w() {
9939
+ function M() {
9940
9940
  m();
9941
9941
  }
9942
- return typeof window < "u" && (document.addEventListener("pointerdown", g, !0), document.addEventListener("keydown", h), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0)), nn(() => {
9943
- typeof window > "u" || (document.removeEventListener("pointerdown", g, !0), document.removeEventListener("keydown", h), window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0));
9942
+ return typeof window < "u" && (document.addEventListener("pointerdown", g, !0), document.addEventListener("keydown", h), window.addEventListener("resize", M), window.addEventListener("scroll", M, !0)), nn(() => {
9943
+ typeof window > "u" || (document.removeEventListener("pointerdown", g, !0), document.removeEventListener("keydown", h), window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0));
9944
9944
  }), t({
9945
9945
  show: f,
9946
9946
  hide: m
9947
- }), (p, M) => (k(), ae(Bi, { to: "body" }, [
9947
+ }), (p, w) => (k(), ae(Bi, { to: "body" }, [
9948
9948
  r.value && e.message ? (k(), F("div", {
9949
9949
  key: 0,
9950
9950
  ref_key: "panelRef",
9951
9951
  ref: a,
9952
9952
  class: "message-action-menu max-w-62 min-w-54",
9953
- style: gu({ left: `${o.value.left}px`, top: `${o.value.top}px` }),
9953
+ style: pu({ left: `${o.value.left}px`, top: `${o.value.top}px` }),
9954
9954
  "data-testid": "message-action-popover-shell"
9955
9955
  }, [
9956
9956
  ie(kh, {
9957
9957
  message: e.message,
9958
9958
  "can-react": e.canReact,
9959
- onReact: M[0] || (M[0] = (y) => n("react", y))
9959
+ onReact: w[0] || (w[0] = (y) => n("react", y))
9960
9960
  }, null, 8, ["message", "can-react"]),
9961
9961
  T("div", Mh, [
9962
9962
  (k(!0), F(He, null, ht(e.actionItems, (y) => (k(), F("button", {
@@ -10043,13 +10043,13 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10043
10043
  () => o.value ? a.hasOlderThreadMessages.value : a.hasOlderMessages.value
10044
10044
  ), g = U(
10045
10045
  () => o.value ? a.loadingOlderThreadMessages.value : a.loadingOlderMessages.value
10046
- ), h = U(() => o.value ? !0 : a.showDefaultEmptyState.value), w = U(() => {
10046
+ ), h = U(() => o.value ? !0 : a.showDefaultEmptyState.value), M = U(() => {
10047
10047
  const G = n.conversation.value;
10048
10048
  return G ? l.value ? u("thread") : G.title : "";
10049
10049
  }), p = U(() => {
10050
10050
  const G = n.conversation.value;
10051
10051
  return G ? l.value ? l.value.senderName : G.memberCount ? u("members", { count: G.memberCount }) : u("groupChat") : "";
10052
- }), M = U(() => {
10052
+ }), w = U(() => {
10053
10053
  var G;
10054
10054
  return ((G = n.conversation.value) == null ? void 0 : G.memberCount) ?? 0;
10055
10055
  }), y = z(null), A = z(null), C = U(() => !!l.value), S = U(() => C.value && !f.value), D = U(() => Pd(n.conversation.value)), I = On("threadRef"), { handleThreadScroll: B } = E1({
@@ -10124,14 +10124,14 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10124
10124
  S.value ? "message-list--embedded-thread" : C.value ? "message-list--thread" : "message-list--main"
10125
10125
  ]])
10126
10126
  }, [
10127
- f.value ? Jt(G.$slots, "header", {
10127
+ f.value ? Xt(G.$slots, "header", {
10128
10128
  key: 0,
10129
10129
  conversation: _(n).conversation.value,
10130
10130
  parentMessage: l.value,
10131
10131
  target: t.target,
10132
- title: w.value,
10132
+ title: M.value,
10133
10133
  subtitle: p.value,
10134
- memberCount: M.value
10134
+ memberCount: w.value
10135
10135
  }, () => [
10136
10136
  ie(Nh, {
10137
10137
  conversation: _(n).conversation.value,
@@ -10155,7 +10155,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10155
10155
  T("div", zh, [
10156
10156
  l.value ? (k(), F("div", Hh, [
10157
10157
  T("p", jh, j(l.value.senderName), 1),
10158
- T("p", Zh, j(_(yu)(l.value)), 1)
10158
+ T("p", Zh, j(_(xu)(l.value)), 1)
10159
10159
  ])) : ne("", !0),
10160
10160
  (k(!0), F(He, null, ht(i.value, (q, We) => (k(), F(He, {
10161
10161
  key: q.id
@@ -10192,7 +10192,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10192
10192
  C.value ? S.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"
10193
10193
  ])
10194
10194
  }, [
10195
- Jt(G.$slots, "composer", {}, void 0, !0)
10195
+ Xt(G.$slots, "composer", {}, void 0, !0)
10196
10196
  ], 2)
10197
10197
  ], 2)) : (k(), F("div", Uh, j(_(u)("selectConversationToStart")), 1))
10198
10198
  ], 2),
@@ -10297,7 +10297,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10297
10297
  default: Ve(() => [
10298
10298
  e.message ? (k(), F("div", op, [
10299
10299
  T("div", ip, [
10300
- T("p", sp, j(_(yu)(e.message)), 1),
10300
+ T("p", sp, j(_(xu)(e.message)), 1),
10301
10301
  T("div", lp, [
10302
10302
  T("div", cp, [
10303
10303
  T("p", dp, j(_(r)("sent")), 1),
@@ -10409,14 +10409,14 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10409
10409
  function h(y) {
10410
10410
  return s(y === "image" ? "image" : y === "video" ? "video" : y === "audio" ? "audio" : y === "file" ? "file" : "attachment");
10411
10411
  }
10412
- function w(y) {
10412
+ function M(y) {
10413
10413
  var A, C;
10414
10414
  a.value = y.id, r.value = m((A = y.scheduled) == null ? void 0 : A.scheduleDate), o.value = g((C = y.scheduled) == null ? void 0 : C.scheduleDate);
10415
10415
  }
10416
10416
  function p() {
10417
10417
  a.value = null, r.value = "", o.value = "";
10418
10418
  }
10419
- function M(y) {
10419
+ function w(y) {
10420
10420
  var Z, Y, L;
10421
10421
  if (!((Z = y.scheduled) != null && Z.messageId) || !((Y = y.scheduled) != null && Y.muid) || !((L = y.scheduled) != null && L.originalChatUid) || !r.value || !d.value)
10422
10422
  return;
@@ -10472,7 +10472,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10472
10472
  ]),
10473
10473
  T("div", Rp, [
10474
10474
  T("p", qp, j(f((S = C.scheduled) == null ? void 0 : S.scheduleDate)), 1),
10475
- C.kind === "poll" && C.poll ? (k(), F("p", Op, j(C.poll.question), 1)) : (k(), F("p", Lp, j(_(yu)(C, _(s)("attachment"))), 1))
10475
+ C.kind === "poll" && C.poll ? (k(), F("p", Op, j(C.poll.question), 1)) : (k(), F("p", Lp, j(_(xu)(C, _(s)("attachment"))), 1))
10476
10476
  ])
10477
10477
  ]),
10478
10478
  (D = C.scheduled) != null && D.messageId && ((I = C.scheduled) != null && I.muid) && ((B = C.scheduled) != null && B.originalChatUid) ? (k(), ae(_(at), {
@@ -10481,7 +10481,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10481
10481
  icon: _(Ai),
10482
10482
  text: "",
10483
10483
  size: "small",
10484
- onClick: (Z) => w(C)
10484
+ onClick: (Z) => M(C)
10485
10485
  }, null, 8, ["label", "icon", "onClick"])) : ne("", !0)
10486
10486
  ]),
10487
10487
  a.value === C.id ? (k(), F("div", Pp, [
@@ -10510,7 +10510,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10510
10510
  label: _(s)("save"),
10511
10511
  size: "small",
10512
10512
  disabled: !r.value || !d.value,
10513
- onClick: (Z) => M(C)
10513
+ onClick: (Z) => w(C)
10514
10514
  }, null, 8, ["label", "disabled", "onClick"]),
10515
10515
  ie(_(at), {
10516
10516
  label: _(s)("cancel"),
@@ -10546,7 +10546,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10546
10546
  setup(e) {
10547
10547
  return (t, u) => e.visible ? (k(), F("div", zp, [
10548
10548
  T("div", Hp, [
10549
- e.offlineMode ? (k(), F("span", jp, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Vp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span", Wp, j(e.messages.notFound), 1)) : e.isEmpty && e.showEmptySlot ? Jt(t.$slots, "no-messages", { key: 4 }, () => [
10549
+ e.offlineMode ? (k(), F("span", jp, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Vp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span", Wp, j(e.messages.notFound), 1)) : e.isEmpty && e.showEmptySlot ? Xt(t.$slots, "no-messages", { key: 4 }, () => [
10550
10550
  T("span", null, j(e.messages.noMessages), 1)
10551
10551
  ], !0) : ne("", !0) : (k(), F("span", Zp, j(e.messages.connecting), 1))
10552
10552
  ])
@@ -10604,18 +10604,18 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10604
10604
  getHideDeletedMessages: () => n.hideDeletedMessages
10605
10605
  });
10606
10606
  zd(g);
10607
- const h = U(() => g.messages.value.length > 0), w = U(() => n.showHeader ?? n.showMessageHeader), p = Gd({
10607
+ const h = U(() => g.messages.value.length > 0), M = U(() => n.showHeader ?? n.showMessageHeader), p = Gd({
10608
10608
  chatClient: l,
10609
10609
  selectedConversation: f,
10610
10610
  getInitialScheduledMessagesOpen: () => !!n.initialScheduledMessagesOpen,
10611
10611
  fetchErrorFallback: r("loadMessageReceiptsError")
10612
10612
  });
10613
10613
  Yd(p);
10614
- const M = On("mainComposerRef"), y = On("threadComposerRef"), A = jd({
10614
+ const w = On("mainComposerRef"), y = On("threadComposerRef"), A = jd({
10615
10615
  chatClient: l,
10616
10616
  sendOptions: m.sendOptions,
10617
10617
  afterSchedule: () => p.openScheduledMessages(),
10618
- mainComposerRef: M,
10618
+ mainComposerRef: w,
10619
10619
  threadComposerRef: y
10620
10620
  });
10621
10621
  Zd(A);
@@ -10748,7 +10748,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10748
10748
  ie(so, {
10749
10749
  target: "main",
10750
10750
  class: Ce(["h-full", e.containerClass]),
10751
- "show-header": w.value,
10751
+ "show-header": M.value,
10752
10752
  "action-message-class": e.actionMessageClass,
10753
10753
  "action-message-row-class": e.actionMessageRowClass,
10754
10754
  onAnchorclick: B
@@ -10756,7 +10756,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10756
10756
  composer: Ve(() => [
10757
10757
  ie(io, {
10758
10758
  ref_key: "mainComposerRef",
10759
- ref: M,
10759
+ ref: w,
10760
10760
  target: "main"
10761
10761
  }, null, 512)
10762
10762
  ]),
@@ -10765,7 +10765,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10765
10765
  L.$slots["message-header"] ? {
10766
10766
  name: "header",
10767
10767
  fn: Ve((de) => [
10768
- Jt(L.$slots, "message-header", Ui(zi(de)), void 0, !0)
10768
+ Xt(L.$slots, "message-header", Ui(zi(de)), void 0, !0)
10769
10769
  ]),
10770
10770
  key: "0"
10771
10771
  } : void 0
@@ -10831,7 +10831,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
10831
10831
  }
10832
10832
  }, {
10833
10833
  "no-messages": Ve(() => [
10834
- Jt(L.$slots, "no-messages", {}, void 0, !0)
10834
+ Xt(L.$slots, "no-messages", {}, void 0, !0)
10835
10835
  ]),
10836
10836
  _: 3
10837
10837
  }, 8, ["visible", "offline-mode", "connected", "loading", "not-found", "is-empty", "show-empty-slot", "messages"])