deep-chat-dev 9.0.152 → 9.0.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/deepChat.js CHANGED
@@ -455,7 +455,7 @@ var xn = "Make sure the events are using {text: string} or {html: string} format
455
455
  return mi;
456
456
  }();
457
457
  mi.CODE_SNIPPET_GENERATION_JUMP = 0.5;
458
- var j = mi;
458
+ var B = mi;
459
459
  var gi = /*#__PURE__*/function () {
460
460
  function gi() {
461
461
  _classCallCheck(this, gi);
@@ -561,15 +561,15 @@ var ue = /*#__PURE__*/function () {
561
561
  }();
562
562
  var gs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20xml:space='preserve'%3e%3cpath%20d='M23,30.36H9c-2.404,0-4.36-1.956-4.36-4.36V15c0-2.404,1.956-4.36,4.36-4.36h3.659%20c0.167-1.566,1.415-2.813,2.981-2.981V5.333c-1.131-0.174-2-1.154-2-2.333c0-1.301,1.059-2.36,2.36-2.36%20c1.302,0,2.36,1.059,2.36,2.36c0,1.179-0.869,2.159-2,2.333V7.66c1.566,0.167,2.814,1.415,2.981,2.981H23%20c2.404,0,4.36,1.956,4.36,4.36v11C27.36,28.404,25.404,30.36,23,30.36z%20M9,11.36c-2.007,0-3.64,1.633-3.64,3.64v11%20c0,2.007,1.633,3.64,3.64,3.64h14c2.007,0,3.64-1.633,3.64-3.64V15c0-2.007-1.633-3.64-3.64-3.64H9z%20M13.384,10.64h5.231%20C18.439,9.354,17.334,8.36,16,8.36C14.667,8.36,13.561,9.354,13.384,10.64z%20M16,1.36c-0.904,0-1.64,0.736-1.64,1.64%20S15.096,4.64,16,4.64c0.904,0,1.64-0.736,1.64-1.64S16.904,1.36,16,1.36z%20M20,27.36h-8c-1.301,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36h8c1.302,0,2.36,1.059,2.36,2.36S21.302,27.36,20,27.36z%20M12,23.36c-0.904,0-1.64,0.735-1.64,1.64%20s0.736,1.64,1.64,1.64h8c0.904,0,1.64-0.735,1.64-1.64s-0.735-1.64-1.64-1.64H12z%20M31,23.86h-2c-0.199,0-0.36-0.161-0.36-0.36V15%20c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5C31.36,23.699,31.199,23.86,31,23.86z%20M29.36,23.14h1.279v-7.78%20H29.36V23.14z%20M3,23.86H1c-0.199,0-0.36-0.161-0.36-0.36V15c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5%20C3.36,23.699,3.199,23.86,3,23.86z%20M1.36,23.14h1.28v-7.78H1.36V23.14z%20M20,20.36c-1.302,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36s2.36,1.059,2.36,2.36C22.36,19.302,21.302,20.36,20,20.36z%20M20,16.36c-0.904,0-1.64,0.736-1.64,1.64%20s0.735,1.64,1.64,1.64s1.64-0.735,1.64-1.64S20.904,16.36,20,16.36z%20M12,20.36c-1.301,0-2.36-1.059-2.36-2.36s1.059-2.36,2.36-2.36%20s2.36,1.059,2.36,2.36C14.36,19.302,13.301,20.36,12,20.36z%20M12,16.36c-0.904,0-1.64,0.736-1.64,1.64s0.736,1.64,1.64,1.64%20s1.64-0.735,1.64-1.64S12.904,16.36,12,16.36z'/%3e%3crect%20style='fill:none;'%20width='32'%20height='32'/%3e%3c/svg%3e",
563
563
  bs = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////9vX18vLy/Pz86enp4+Li2tnZ1tbWzczM+fn57Ozs4N/f09LS0M/P5uXl7+/v3dzcwtncCAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAZNSURBVHja7d3bdtsqEABQYABZSLH9/3+ZpnUsIcF5iOM6PfElNoMHMfPQdq3GmL0GkLhEUqLaUExnOtOZznSmM53pTGc605nOdKYznelMZzrTmV4LXSqllKyJDkob26xWq8Zae/iH0QoWTm9d1xur4WuypQJtTd+5dqn0VjcxzNO5/57mEBvdLo8Oron6aseWOjYOFkVvjQs3DmgyONMuht52EfztP+4hdu0i6LCO808/M8c1lE/fuPGej41uUzgdtoO/75N+2ELJ9I3b3//hPXbiMenm3pR/Jt4USgcLBIp4Bh10gqKVhvLo0klCxeSky96nKcj3siw6pJIL4XsoiQ7apyvMY/V3HHrSRioLopvEhSpTCn2TPEuwKYMOIX0tAxRBf/Hpa+lfSqBv9gi1FPsNfTrMAiVmIE/vJhz61FGnQxRIEYE4vfNYdN8Rp6MlHaHotHTn8ejekaZPAjEmyvQWdZFTtYTpXqCGJ0zvcek9Yfoel76nS0ffv1NMp1ca+pkgyfRCGind4L7OWWc605l+cxjsyhqy9AGbPpClc1/nvl5VX0c/3Alk6RU3+Am7shNZ+h6bvidLr7jBB+zKBrL0irOOudmIUDzTmf5gIP+iEuXtRuTVaEmY/oZLfyNMrzjryPc0gerMTdpVg0tvjJUU6bLPcGOoUv46SLL6Wi8yhLf06C7TUyekI0efRaaYqdFltkeNpPumRPSMDxgBYvSM035FrKAmH72hRW99PrpvSdEHkTEGUvSsK3yKVDkuJ92RohcZaehzzirPpOg+J92Tolfc4Cumx5xVXpGiZ34+ICX6W84qv5GiR5NPbiIpOv6BCoSvSkTX+eiaGP092zINvBOj4x8mSf9FqejvNo/cvpOji19ZbmviL0GPLsYMFzgzCor0+Bv/ePDvSJKOb9dJ5UlnbnEHiHgzv6cdTpJOWuc/u3FEucLDOL75xGtBiefrcwgoC9NDSH/jkH6pAuXmBqPQ9HSUPVdZBH1GGOrMXAQdYxcKZfxAoK+KKBKFLosoEoX+u4giUehz8jlcnAuhp78I46yDYNAd+QLR6K+pr+yvxdBTHyVDubQh0UfSxaHSd0lbvNkVRE87JGOtc+PQd2QLQ6fHhJkKsSh6yg13tO08JPprsgrrXWH0dJd2vH1MLPprot4eXoujpzrdhngiD40ek2y92lggPcnWa8qN1Yz0BFuvZhRl0uOfR0v4Ewuli/Bg4Qr3lArqGdndQ3UPO1EunXYwnelMZzrTmc50pjOd6UxnOtOZznSmM53pTGf6kuj6oedFKV0s3fX6sX1S3bsi6a4PD7+/YAqYeBw6pIB/4qEgOqxdSPbGiim4NRRCbzs3Jj0L4UfXtQXQVRfn5IdA/Bw7RZzurEV6EtdsLeGXkIPuA+K1UoVeA0l62zmN/LqfSSft9KkepmoRuvi3nd5uKNFB9zbbXEANqdr941XO0NJx2v2jdJenpf+/3bvn0ts16ph+sd6hX7dPo2+2cZzE02Ia43bzDHqr+2Evnhz74ZHU30ffbKOeng1/NPV30Ns1gYQnSP2P6e65Pfxc6h02XZqXQCjhJ6kPL6bFo4NrGvAU4UII4SE2P1vQuZkuOxckVfehisF1MjUddN/MZBN+kvq5uf0O/xa66gyNS9ktMWlz44rO1Z8C19i5FPdHzPamXn+F3hryPfxMr78+4F+kq22kO6Rf6fUQt+puuustyWv4rbG3l/duztFB96GYoe1cTBdXMr+nw9qVM6ZfxOvzezff0nXi/ZOndvrR6Zvpm0c3h6nhdb+5iS7tsIim/qXZD9+97/Jf+rpZ5BET1ayv0GUzLhEuhBBjIy/RdVPgndutIRt9nt7p5cKFEEJ3Z+jQFDZL+XnMDXxHB73gxn5s9Kc3d3/pFciFkN/QTSXHJpX5l66gDrkQoP6hL3xsPw39la4qOiV8tH78XeSbue6N9mvWa6J/ybpc1CT1Wnh5Qq9meP8IOKH3ddH7E/ri1iYux/SXDrXR4UiPdck/wUpU+FtPf6/orja6O9KL3l56LOvVxe5Ib2qjN0d6Vbex4ghWlU3bPqI90If66MNng680FNpbJijH6kCvaF3uMzQ3+IrpFerV4Y9dffQdN3im10ivbuImhD3Qq5u4HdZkua8znelMZ/pS4z9CPVKkxowNxgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wMy0yN1QxNTo0NToxNSswMDowMN1xSg4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDMtMjdUMTU6NDU6MTUrMDA6MDCsLPKyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==",
564
- Q = /*#__PURE__*/function () {
565
- function Q() {
566
- _classCallCheck(this, Q);
564
+ Y = /*#__PURE__*/function () {
565
+ function Y() {
566
+ _classCallCheck(this, Y);
567
567
  }
568
- _createClass(Q, null, [{
568
+ _createClass(Y, null, [{
569
569
  key: "hide",
570
570
  value: function hide(e) {
571
571
  var t;
572
- (t = e.getElementsByClassName(Q.CONTAINER_CLASS)[0].style).visibility || (t.visibility = "hidden");
572
+ (t = e.getElementsByClassName(Y.CONTAINER_CLASS)[0].style).visibility || (t.visibility = "hidden");
573
573
  }
574
574
  }, {
575
575
  key: "applyCustomStylesToElements",
@@ -580,10 +580,10 @@ var gs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
580
580
  key: "applyCustomStyles",
581
581
  value: function applyCustomStyles(e, t, i, n) {
582
582
  var r, o, a, l;
583
- if ((r = i["default"]) != null && r.styles && Q.applyCustomStylesToElements(e, t, i["default"].styles), n === b.USER_ROLE) (o = i.user) != null && o.styles && Q.applyCustomStylesToElements(e, t, i.user.styles);else {
584
- (a = i.ai) != null && a.styles && Q.applyCustomStylesToElements(e, t, i.ai.styles);
583
+ if ((r = i["default"]) != null && r.styles && Y.applyCustomStylesToElements(e, t, i["default"].styles), n === b.USER_ROLE) (o = i.user) != null && o.styles && Y.applyCustomStylesToElements(e, t, i.user.styles);else {
584
+ (a = i.ai) != null && a.styles && Y.applyCustomStylesToElements(e, t, i.ai.styles);
585
585
  var c = (l = i[n]) == null ? void 0 : l.styles;
586
- c && Q.applyCustomStylesToElements(e, t, c);
586
+ c && Y.applyCustomStylesToElements(e, t, c);
587
587
  }
588
588
  }
589
589
  }, {
@@ -593,7 +593,7 @@ var gs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
593
593
  var i = document.createElement("img");
594
594
  e === b.USER_ROLE ? i.src = ((r = t == null ? void 0 : t.user) == null ? void 0 : r.src) || ((o = t == null ? void 0 : t["default"]) == null ? void 0 : o.src) || bs : i.src = ((a = t == null ? void 0 : t[e]) == null ? void 0 : a.src) || ((l = t == null ? void 0 : t.ai) == null ? void 0 : l.src) || ((c = t == null ? void 0 : t["default"]) == null ? void 0 : c.src) || gs, i.classList.add("avatar");
595
595
  var n = document.createElement("div");
596
- return n.classList.add(Q.CONTAINER_CLASS), n.appendChild(i), t && Q.applyCustomStyles(n, i, t, e), n;
596
+ return n.classList.add(Y.CONTAINER_CLASS), n.appendChild(i), t && Y.applyCustomStyles(n, i, t, e), n;
597
597
  }
598
598
  }, {
599
599
  key: "getPosition",
@@ -607,15 +607,15 @@ var gs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
607
607
  key: "add",
608
608
  value: function add(e, t, i) {
609
609
  var n = typeof i == "boolean" ? void 0 : i,
610
- r = Q.createAvatar(t, n),
611
- o = Q.getPosition(t, n);
610
+ r = Y.createAvatar(t, n),
611
+ o = Y.getPosition(t, n);
612
612
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
613
613
  }
614
614
  }]);
615
- return Q;
615
+ return Y;
616
616
  }();
617
- Q.CONTAINER_CLASS = "avatar-container";
618
- var Xt = Q;
617
+ Y.CONTAINER_CLASS = "avatar-container";
618
+ var Xt = Y;
619
619
  var be = /*#__PURE__*/function () {
620
620
  function be() {
621
621
  _classCallCheck(this, be);
@@ -1023,7 +1023,7 @@ var Cs = /[&<>"]/,
1023
1023
  function Ms(s) {
1024
1024
  return As[s];
1025
1025
  }
1026
- function W(s) {
1026
+ function G(s) {
1027
1027
  return Cs.test(s) ? s.replace(ks, Ms) : s;
1028
1028
  }
1029
1029
  var g = {};
@@ -1034,7 +1034,7 @@ g.blockquote_close = function (s, e) {
1034
1034
  return "</blockquote>" + We(s, e);
1035
1035
  };
1036
1036
  g.code = function (s, e) {
1037
- return s[e].block ? "<pre><code>" + W(s[e].content) + "</code></pre>" + We(s, e) : "<code>" + W(s[e].content) + "</code>";
1037
+ return s[e].block ? "<pre><code>" + G(s[e].content) + "</code></pre>" + We(s, e) : "<code>" + G(s[e].content) + "</code>";
1038
1038
  };
1039
1039
  g.fence = function (s, e, t, i, n) {
1040
1040
  var r = s[e],
@@ -1046,9 +1046,9 @@ g.fence = function (s, e, t, i, n) {
1046
1046
  h;
1047
1047
  if (r.params) {
1048
1048
  if (c = r.params.split(/\s+/g), d = c.join(" "), Es(n.rules.fence_custom, c[0])) return n.rules.fence_custom[c[0]](s, e, t, i, n);
1049
- l = W(Ve(Tt(d))), o = ' class="' + a + l + '"';
1049
+ l = G(Ve(Tt(d))), o = ' class="' + a + l + '"';
1050
1050
  }
1051
- return t.highlight ? h = t.highlight.apply(t.highlight, [r.content].concat(c)) || W(r.content) : h = W(r.content), "<pre><code" + o + ">" + h + "</code></pre>" + We(s, e);
1051
+ return t.highlight ? h = t.highlight.apply(t.highlight, [r.content].concat(c)) || G(r.content) : h = G(r.content), "<pre><code" + o + ">" + h + "</code></pre>" + We(s, e);
1052
1052
  };
1053
1053
  g.fence_custom = {};
1054
1054
  g.heading_open = function (s, e) {
@@ -1088,17 +1088,17 @@ g.paragraph_close = function (s, e) {
1088
1088
  return (s[e].tight ? "" : "</p>") + (t ? We(s, e) : "");
1089
1089
  };
1090
1090
  g.link_open = function (s, e, t) {
1091
- var i = s[e].title ? ' title="' + W(Ve(s[e].title)) + '"' : "",
1091
+ var i = s[e].title ? ' title="' + G(Ve(s[e].title)) + '"' : "",
1092
1092
  n = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
1093
- return '<a href="' + W(s[e].href) + '"' + i + n + ">";
1093
+ return '<a href="' + G(s[e].href) + '"' + i + n + ">";
1094
1094
  };
1095
1095
  g.link_close = function () {
1096
1096
  return "</a>";
1097
1097
  };
1098
1098
  g.image = function (s, e, t) {
1099
- var i = ' src="' + W(s[e].src) + '"',
1100
- n = s[e].title ? ' title="' + W(Ve(s[e].title)) + '"' : "",
1101
- r = ' alt="' + (s[e].alt ? W(Ve(Tt(s[e].alt))) : "") + '"',
1099
+ var i = ' src="' + G(s[e].src) + '"',
1100
+ n = s[e].title ? ' title="' + G(Ve(s[e].title)) + '"' : "",
1101
+ r = ' alt="' + (s[e].alt ? G(Ve(Tt(s[e].alt))) : "") + '"',
1102
1102
  o = t.xhtmlOut ? " /" : "";
1103
1103
  return "<img" + i + r + n + o + ">";
1104
1104
  };
@@ -1171,10 +1171,10 @@ g.mark_close = function () {
1171
1171
  return "</mark>";
1172
1172
  };
1173
1173
  g.sub = function (s, e) {
1174
- return "<sub>" + W(s[e].content) + "</sub>";
1174
+ return "<sub>" + G(s[e].content) + "</sub>";
1175
1175
  };
1176
1176
  g.sup = function (s, e) {
1177
- return "<sup>" + W(s[e].content) + "</sup>";
1177
+ return "<sup>" + G(s[e].content) + "</sup>";
1178
1178
  };
1179
1179
  g.hardbreak = function (s, e, t) {
1180
1180
  return t.xhtmlOut ? "<br />\n" : "<br>\n";
@@ -1183,7 +1183,7 @@ g.softbreak = function (s, e, t) {
1183
1183
  return t.breaks ? t.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
1184
1184
  };
1185
1185
  g.text = function (s, e) {
1186
- return W(s[e].content);
1186
+ return G(s[e].content);
1187
1187
  };
1188
1188
  g.htmlblock = function (s, e) {
1189
1189
  return s[e].content;
@@ -1192,7 +1192,7 @@ g.htmltag = function (s, e) {
1192
1192
  return s[e].content;
1193
1193
  };
1194
1194
  g.abbr_open = function (s, e) {
1195
- return '<abbr title="' + W(Ve(s[e].title)) + '">';
1195
+ return '<abbr title="' + G(Ve(s[e].title)) + '">';
1196
1196
  };
1197
1197
  g.abbr_close = function () {
1198
1198
  return "</abbr>";
@@ -1256,14 +1256,14 @@ ln.prototype.render = function (s, e, t) {
1256
1256
  for (var i = this.rules, n = s.length, r = -1, o = ""; ++r < n;) s[r].type === "inline" ? o += this.renderInline(s[r].children, e, t) : o += i[s[r].type](s, r, e, t, this);
1257
1257
  return o;
1258
1258
  };
1259
- function X() {
1259
+ function J() {
1260
1260
  this.__rules__ = [], this.__cache__ = null;
1261
1261
  }
1262
- X.prototype.__find__ = function (s) {
1262
+ J.prototype.__find__ = function (s) {
1263
1263
  for (var e = this.__rules__.length, t = -1; e--;) if (this.__rules__[++t].name === s) return t;
1264
1264
  return -1;
1265
1265
  };
1266
- X.prototype.__compile__ = function () {
1266
+ J.prototype.__compile__ = function () {
1267
1267
  var s = this,
1268
1268
  e = [""];
1269
1269
  s.__rules__.forEach(function (t) {
@@ -1276,13 +1276,13 @@ X.prototype.__compile__ = function () {
1276
1276
  });
1277
1277
  });
1278
1278
  };
1279
- X.prototype.at = function (s, e, t) {
1279
+ J.prototype.at = function (s, e, t) {
1280
1280
  var i = this.__find__(s),
1281
1281
  n = t || {};
1282
1282
  if (i === -1) throw new Error("Parser rule not found: " + s);
1283
1283
  this.__rules__[i].fn = e, this.__rules__[i].alt = n.alt || [], this.__cache__ = null;
1284
1284
  };
1285
- X.prototype.before = function (s, e, t, i) {
1285
+ J.prototype.before = function (s, e, t, i) {
1286
1286
  var n = this.__find__(s),
1287
1287
  r = i || {};
1288
1288
  if (n === -1) throw new Error("Parser rule not found: " + s);
@@ -1293,7 +1293,7 @@ X.prototype.before = function (s, e, t, i) {
1293
1293
  alt: r.alt || []
1294
1294
  }), this.__cache__ = null;
1295
1295
  };
1296
- X.prototype.after = function (s, e, t, i) {
1296
+ J.prototype.after = function (s, e, t, i) {
1297
1297
  var n = this.__find__(s),
1298
1298
  r = i || {};
1299
1299
  if (n === -1) throw new Error("Parser rule not found: " + s);
@@ -1304,7 +1304,7 @@ X.prototype.after = function (s, e, t, i) {
1304
1304
  alt: r.alt || []
1305
1305
  }), this.__cache__ = null;
1306
1306
  };
1307
- X.prototype.push = function (s, e, t) {
1307
+ J.prototype.push = function (s, e, t) {
1308
1308
  var i = t || {};
1309
1309
  this.__rules__.push({
1310
1310
  name: s,
@@ -1313,7 +1313,7 @@ X.prototype.push = function (s, e, t) {
1313
1313
  alt: i.alt || []
1314
1314
  }), this.__cache__ = null;
1315
1315
  };
1316
- X.prototype.enable = function (s, e) {
1316
+ J.prototype.enable = function (s, e) {
1317
1317
  s = Array.isArray(s) ? s : [s], e && this.__rules__.forEach(function (t) {
1318
1318
  t.enabled = !1;
1319
1319
  }), s.forEach(function (t) {
@@ -1322,14 +1322,14 @@ X.prototype.enable = function (s, e) {
1322
1322
  this.__rules__[i].enabled = !0;
1323
1323
  }, this), this.__cache__ = null;
1324
1324
  };
1325
- X.prototype.disable = function (s) {
1325
+ J.prototype.disable = function (s) {
1326
1326
  s = Array.isArray(s) ? s : [s], s.forEach(function (e) {
1327
1327
  var t = this.__find__(e);
1328
1328
  if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
1329
1329
  this.__rules__[t].enabled = !1;
1330
1330
  }, this), this.__cache__ = null;
1331
1331
  };
1332
- X.prototype.getRules = function (s) {
1332
+ J.prototype.getRules = function (s) {
1333
1333
  return this.__cache__ === null && this.__compile__(), this.__cache__[s] || [];
1334
1334
  };
1335
1335
  function Rs(s) {
@@ -1649,7 +1649,7 @@ function Gs(s) {
1649
1649
  }
1650
1650
  var Di = [["block", Rs], ["abbr", Ls], ["references", Os], ["inline", Ns], ["footnote_tail", Ds], ["abbr2", Fs], ["replacements", qs], ["smartquotes", Gs]];
1651
1651
  function ss() {
1652
- this.options = {}, this.ruler = new X();
1652
+ this.options = {}, this.ruler = new J();
1653
1653
  for (var s = 0; s < Di.length; s++) this.ruler.push(Di[s][0], Di[s][1]);
1654
1654
  }
1655
1655
  ss.prototype.process = function (s) {
@@ -1839,10 +1839,10 @@ function Zs(s, e, t, i) {
1839
1839
  p,
1840
1840
  x,
1841
1841
  S,
1842
- Z,
1842
+ X,
1843
1843
  ie,
1844
1844
  N,
1845
- $,
1845
+ W,
1846
1846
  ne = !0,
1847
1847
  se,
1848
1848
  R,
@@ -1851,7 +1851,7 @@ function Zs(s, e, t, i) {
1851
1851
  if ((h = kn(s, e)) >= 0) x = !0;else if ((h = Cn(s, e)) >= 0) x = !1;else return !1;
1852
1852
  if (s.level >= s.options.maxNesting) return !1;
1853
1853
  if (p = s.src.charCodeAt(h - 1), i) return !0;
1854
- for (Z = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, h - d - 1)), s.tokens.push({
1854
+ for (X = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, h - d - 1)), s.tokens.push({
1855
1855
  type: "ordered_list_open",
1856
1856
  order: m,
1857
1857
  lines: N = [e, 0],
@@ -1862,12 +1862,12 @@ function Zs(s, e, t, i) {
1862
1862
  level: s.level++
1863
1863
  }), n = e, ie = !1, se = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(h), u = s.eMarks[n], S >= u ? f = 1 : f = S - h, f > 4 && (f = 1), f < 1 && (f = 1), r = h - s.bMarks[n] + f, s.tokens.push({
1864
1864
  type: "list_item_open",
1865
- lines: $ = [e, 0],
1865
+ lines: W = [e, 0],
1866
1866
  level: s.level++
1867
1867
  }), a = s.blkIndent, l = s.tight, o = s.tShift[e], c = s.parentType, s.tShift[e] = S - s.bMarks[e], s.blkIndent = r, s.tight = !0, s.parentType = "list", s.parser.tokenize(s, e, t, !0), (!s.tight || ie) && (ne = !1), ie = s.line - e > 1 && s.isEmpty(s.line - 1), s.blkIndent = a, s.tShift[e] = o, s.tight = l, s.parentType = c, s.tokens.push({
1868
1868
  type: "list_item_close",
1869
1869
  level: --s.level
1870
- }), n = e = s.line, $[1] = n, S = s.bMarks[e], !(n >= t || s.isEmpty(n) || s.tShift[n] < s.blkIndent));) {
1870
+ }), n = e = s.line, W[1] = n, S = s.bMarks[e], !(n >= t || s.isEmpty(n) || s.tShift[n] < s.blkIndent));) {
1871
1871
  for (re = !1, R = 0, qt = se.length; R < qt; R++) if (se[R](s, n, t, !0)) {
1872
1872
  re = !0;
1873
1873
  break;
@@ -1881,7 +1881,7 @@ function Zs(s, e, t, i) {
1881
1881
  return s.tokens.push({
1882
1882
  type: x ? "ordered_list_close" : "bullet_list_close",
1883
1883
  level: --s.level
1884
- }), N[1] = n, s.line = n, ne && Xs(s, Z), !0;
1884
+ }), N[1] = n, s.line = n, ne && Xs(s, X), !0;
1885
1885
  }
1886
1886
  function Ys(s, e, t, i) {
1887
1887
  var n,
@@ -2163,7 +2163,7 @@ function lr(s, e) {
2163
2163
  }
2164
2164
  var Gt = [["code", Ws], ["fences", $s, ["paragraph", "blockquote", "list"]], ["blockquote", Ks, ["paragraph", "blockquote", "list"]], ["hr", Js, ["paragraph", "blockquote", "list"]], ["list", Zs, ["paragraph", "blockquote"]], ["footnote", Ys, ["paragraph"]], ["heading", Qs, ["paragraph", "blockquote"]], ["lheading", er], ["htmlblock", sr, ["paragraph", "blockquote"]], ["table", rr, ["paragraph"]], ["deflist", ar, ["paragraph"]], ["paragraph", lr]];
2165
2165
  function cn() {
2166
- this.ruler = new X();
2166
+ this.ruler = new J();
2167
2167
  for (var s = 0; s < Gt.length; s++) this.ruler.push(Gt[s][0], Gt[s][1], {
2168
2168
  alt: (Gt[s][2] || []).slice()
2169
2169
  });
@@ -2648,7 +2648,7 @@ function Jr(s, e) {
2648
2648
  }
2649
2649
  var Bi = [["text", fr], ["newline", pr], ["escape", mr], ["backticks", gr], ["del", br], ["ins", vr], ["mark", yr], ["emphasis", xr], ["sub", _r], ["sup", wr], ["links", Tr], ["footnote_inline", Cr], ["footnote_ref", kr], ["autolink", Ir], ["htmltag", Wr], ["entity", Jr]];
2650
2650
  function xi() {
2651
- this.ruler = new X();
2651
+ this.ruler = new J();
2652
2652
  for (var s = 0; s < Bi.length; s++) this.ruler.push(Bi[s][0], Bi[s][1]);
2653
2653
  this.validateLink = Xr;
2654
2654
  }
@@ -2806,7 +2806,7 @@ function os(s, e, t) {
2806
2806
  this.src = e, this.env = t, this.options = s.options, this.tokens = [], this.inlineMode = !1, this.inline = s.inline, this.block = s.block, this.renderer = s.renderer, this.typographer = s.typographer;
2807
2807
  }
2808
2808
  function Se(s, e) {
2809
- typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new xi(), this.block = new cn(), this.core = new ss(), this.renderer = new ln(), this.ruler = new X(), this.options = {}, this.configure(eo[s]), this.set(e || {});
2809
+ typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new xi(), this.block = new cn(), this.core = new ss(), this.renderer = new ln(), this.ruler = new J(), this.options = {}, this.configure(eo[s]), this.set(e || {});
2810
2810
  }
2811
2811
  Se.prototype.set = function (s) {
2812
2812
  Yn(this.options, s);
@@ -2970,7 +2970,7 @@ var Me = /*#__PURE__*/function () {
2970
2970
  return Me;
2971
2971
  }();
2972
2972
  Me.DEFAULT_FILE_NAME = "file";
2973
- var z = Me;
2973
+ var q = Me;
2974
2974
  var Yt = /*#__PURE__*/function () {
2975
2975
  function Yt() {
2976
2976
  _classCallCheck(this, Yt);
@@ -2984,7 +2984,7 @@ var Yt = /*#__PURE__*/function () {
2984
2984
  isHistory: i,
2985
2985
  isInitial: i
2986
2986
  }));
2987
- z.reAddFileRefToObject(t, n), (r = e.onMessage) == null || r.call(e, n), e.dispatchEvent(new CustomEvent("message", {
2987
+ q.reAddFileRefToObject(t, n), (r = e.onMessage) == null || r.call(e, n), e.dispatchEvent(new CustomEvent("message", {
2988
2988
  detail: n
2989
2989
  })), ue.fireOnNewMessage(e, n);
2990
2990
  }
@@ -3099,7 +3099,7 @@ var rt = /*#__PURE__*/function () {
3099
3099
  var _this4 = this;
3100
3100
  var i = this.createNewMessageElement(e, t);
3101
3101
  return this.elementRef.appendChild(i.outerContainer), setTimeout(function () {
3102
- return j.scrollToBottom(_this4.elementRef);
3102
+ return B.scrollToBottom(_this4.elementRef);
3103
3103
  }), i;
3104
3104
  }
3105
3105
  }, {
@@ -3220,13 +3220,13 @@ var Re = /*#__PURE__*/function () {
3220
3220
  if (this._hasStreamEnded) return;
3221
3221
  if ((e == null ? void 0 : e.text) === void 0 && (e == null ? void 0 : e.html) === void 0) return console.error(A.INVALID_STREAM_EVENT);
3222
3222
  var t = (e == null ? void 0 : e.text) || (e == null ? void 0 : e.html) || "",
3223
- i = j.isScrollbarAtBottomOfElement(this._messages.elementRef),
3223
+ i = B.isScrollbarAtBottomOfElement(this._messages.elementRef),
3224
3224
  n = (e == null ? void 0 : e.text) !== void 0 ? "text" : "html";
3225
3225
  if (!this._elements && this._streamedContent === "") this.setInitialState(n, t, e == null ? void 0 : e.role);else {
3226
3226
  if (this._streamType !== n) return console.error(A.INVALID_STREAM_EVENT_MIX);
3227
3227
  this.updateBasedOnType(t, n, (r = this._elements) == null ? void 0 : r.bubbleElement, e == null ? void 0 : e.overwrite);
3228
3228
  }
3229
- i && j.scrollToBottom(this._messages.elementRef);
3229
+ i && B.scrollToBottom(this._messages.elementRef);
3230
3230
  }
3231
3231
  }, {
3232
3232
  key: "setInitialState",
@@ -3525,24 +3525,24 @@ function ao(s, e) {
3525
3525
  f.accept || (f.accept = Ki);
3526
3526
  var m;
3527
3527
  function p() {
3528
- m.abort(), document.hidden || $();
3528
+ m.abort(), document.hidden || W();
3529
3529
  }
3530
3530
  l || document.addEventListener("visibilitychange", p);
3531
3531
  var x = oo,
3532
3532
  S = 0;
3533
- function Z() {
3533
+ function X() {
3534
3534
  document.removeEventListener("visibilitychange", p), window.clearTimeout(S), m.abort();
3535
3535
  }
3536
3536
  t == null || t.addEventListener("abort", function () {
3537
- Z(), h();
3537
+ X(), h();
3538
3538
  });
3539
3539
  var ie = c !== null && c !== void 0 ? c : window.fetch,
3540
3540
  N = n !== null && n !== void 0 ? n : lo;
3541
- function $() {
3542
- return _$.apply(this, arguments);
3541
+ function W() {
3542
+ return _W.apply(this, arguments);
3543
3543
  }
3544
- function _$() {
3545
- _$ = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3544
+ function _W() {
3545
+ _W = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3546
3546
  var ne, se, R;
3547
3547
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3548
3548
  while (1) switch (_context3.prev = _context3.next) {
@@ -3567,7 +3567,7 @@ function ao(s, e) {
3567
3567
  }, r)));
3568
3568
  case 9:
3569
3569
  o == null || o();
3570
- Z();
3570
+ X();
3571
3571
  h();
3572
3572
  _context3.next = 17;
3573
3573
  break;
@@ -3576,9 +3576,9 @@ function ao(s, e) {
3576
3576
  _context3.t0 = _context3["catch"](1);
3577
3577
  if (!m.signal.aborted) try {
3578
3578
  R = (ne = a == null ? void 0 : a(_context3.t0)) !== null && ne !== void 0 ? ne : x;
3579
- window.clearTimeout(S), S = window.setTimeout($, R);
3579
+ window.clearTimeout(S), S = window.setTimeout(W, R);
3580
3580
  } catch (R) {
3581
- Z(), u(R);
3581
+ X(), u(R);
3582
3582
  }
3583
3583
  case 17:
3584
3584
  case "end":
@@ -3586,9 +3586,9 @@ function ao(s, e) {
3586
3586
  }
3587
3587
  }, _callee3, null, [[1, 14]]);
3588
3588
  }));
3589
- return _$.apply(this, arguments);
3589
+ return _W.apply(this, arguments);
3590
3590
  }
3591
- $();
3591
+ W();
3592
3592
  });
3593
3593
  }
3594
3594
  function lo(s) {
@@ -3609,7 +3609,7 @@ var C = /*#__PURE__*/function () {
3609
3609
  p,
3610
3610
  x,
3611
3611
  S,
3612
- Z,
3612
+ X,
3613
3613
  ie,
3614
3614
  r,
3615
3615
  _yield$v$processReque,
@@ -3662,7 +3662,7 @@ var C = /*#__PURE__*/function () {
3662
3662
  case 18:
3663
3663
  u = new we(i), f = v.fetch.bind(this, e, a, n);
3664
3664
  ao(((S = e.connectSettings) == null ? void 0 : S.url) || e.url || "", {
3665
- method: ((Z = e.connectSettings) == null ? void 0 : Z.method) || "POST",
3665
+ method: ((X = e.connectSettings) == null ? void 0 : X.method) || "POST",
3666
3666
  headers: a,
3667
3667
  credentials: (ie = e.connectSettings) == null ? void 0 : ie.credentials,
3668
3668
  body: n ? JSON.stringify(o) : o,
@@ -3692,7 +3692,7 @@ var C = /*#__PURE__*/function () {
3692
3692
  },
3693
3693
  onmessage: function onmessage(N) {
3694
3694
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
3695
- var $, ne, se, R, qt;
3695
+ var W, ne, se, R, qt;
3696
3696
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3697
3697
  while (1) switch (_context5.prev = _context5.next) {
3698
3698
  case 0:
@@ -3706,7 +3706,7 @@ var C = /*#__PURE__*/function () {
3706
3706
  R = {};
3707
3707
  }
3708
3708
  _context5.next = 4;
3709
- return (ne = ($ = e.deepChat).responseInterceptor) == null ? void 0 : ne.call($, R);
3709
+ return (ne = (W = e.deepChat).responseInterceptor) == null ? void 0 : ne.call(W, R);
3710
3710
  case 4:
3711
3711
  _context5.t0 = _context5.sent;
3712
3712
  if (_context5.t0) {
@@ -3736,8 +3736,8 @@ var C = /*#__PURE__*/function () {
3736
3736
  },
3737
3737
  signal: h.signal
3738
3738
  })["catch"](function (N) {
3739
- var $;
3740
- i.isLastMessageError() || ($ = e.extractResultData) == null || $.call(e, N).then(function () {
3739
+ var W;
3740
+ i.isLastMessageError() || (W = e.extractResultData) == null || W.call(e, N).then(function () {
3741
3741
  v.displayError(i, N);
3742
3742
  })["catch"](function (ne) {
3743
3743
  v.displayError(i, ne);
@@ -3888,11 +3888,11 @@ var Ue = /*#__PURE__*/function () {
3888
3888
  }();
3889
3889
  Ue.URL = "deep-chat-demo";
3890
3890
  var me = Ue;
3891
- var V = /*#__PURE__*/function () {
3892
- function V() {
3893
- _classCallCheck(this, V);
3891
+ var z = /*#__PURE__*/function () {
3892
+ function z() {
3893
+ _classCallCheck(this, z);
3894
3894
  }
3895
- _createClass(V, null, [{
3895
+ _createClass(z, null, [{
3896
3896
  key: "setup",
3897
3897
  value: function setup(e) {
3898
3898
  e.connectSettings.url !== me.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
@@ -3909,12 +3909,12 @@ var V = /*#__PURE__*/function () {
3909
3909
  r = new WebSocket(e.connectSettings.url || "", n);
3910
3910
  e.websocket = r, e.websocket.onopen = function () {
3911
3911
  var o, a;
3912
- t.removeError(), e.websocket && _typeof(e.websocket) == "object" && V.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
3912
+ t.removeError(), e.websocket && _typeof(e.websocket) == "object" && z.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
3913
3913
  }, e.websocket.onerror = function (o) {
3914
- console.error(o), V.retryConnection(e, t);
3914
+ console.error(o), z.retryConnection(e, t);
3915
3915
  };
3916
3916
  } catch (n) {
3917
- console.error(n), V.retryConnection(e, t);
3917
+ console.error(n), z.retryConnection(e, t);
3918
3918
  }
3919
3919
  }
3920
3920
  }
@@ -3923,7 +3923,7 @@ var V = /*#__PURE__*/function () {
3923
3923
  value: function retryConnection(e, t) {
3924
3924
  var i, n;
3925
3925
  (n = (i = e.deepChat)._validationHandler) == null || n.call(i), document.body.contains(e.deepChat) && (e.websocket = "pending", t.isLastMessageError() || t.addNewErrorMessage("service", "Connection error"), setTimeout(function () {
3926
- V.createConnection(e, t);
3926
+ z.createConnection(e, t);
3927
3927
  }, 5e3));
3928
3928
  }
3929
3929
  }, {
@@ -3965,7 +3965,7 @@ var V = /*#__PURE__*/function () {
3965
3965
  throw Error(A.INVALID_RESPONSE(l, "server", !!e.deepChat.responseInterceptor, c));
3966
3966
  case 14:
3967
3967
  if (C.isSimulation(e.stream)) {
3968
- h = V.stream.bind(_this6, e, i, n), u = n[l.role || b.AI_ROLE];
3968
+ h = z.stream.bind(_this6, e, i, n), u = n[l.role || b.AI_ROLE];
3969
3969
  C.upsertWFiles(i, h, u, d);
3970
3970
  } else i.addNewMessage(d);
3971
3971
  _context8.next = 20;
@@ -3984,7 +3984,7 @@ var V = /*#__PURE__*/function () {
3984
3984
  return _ref2.apply(this, arguments);
3985
3985
  };
3986
3986
  }(), t.onclose = function () {
3987
- console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), V.createConnection(e, i);
3987
+ console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), z.createConnection(e, i);
3988
3988
  };
3989
3989
  }
3990
3990
  }, {
@@ -4028,7 +4028,7 @@ var V = /*#__PURE__*/function () {
4028
4028
  }
4029
4029
  return _context9.abrupt("return", i.addNewErrorMessage("service", l));
4030
4030
  case 12:
4031
- if (V.isWebSocket(r)) {
4031
+ if (z.isWebSocket(r)) {
4032
4032
  _context9.next = 14;
4033
4033
  break;
4034
4034
  }
@@ -4056,7 +4056,7 @@ var V = /*#__PURE__*/function () {
4056
4056
  }, {
4057
4057
  key: "canSendMessage",
4058
4058
  value: function canSendMessage(e) {
4059
- return e ? e === "pending" ? !1 : V.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4059
+ return e ? e === "pending" ? !1 : z.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4060
4060
  }
4061
4061
  // if false then it is the internal websocket handler
4062
4062
  }, {
@@ -4077,7 +4077,7 @@ var V = /*#__PURE__*/function () {
4077
4077
  } else C.simulate(t, e.streamHandlers, n);
4078
4078
  }
4079
4079
  }]);
4080
- return V;
4080
+ return z;
4081
4081
  }();
4082
4082
  var Ee = /*#__PURE__*/function () {
4083
4083
  function Ee() {
@@ -4253,7 +4253,7 @@ var Ee = /*#__PURE__*/function () {
4253
4253
  case 7:
4254
4254
  h = _context13.t0;
4255
4255
  if (!v.validateResponseFormat(h)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, h)), t.addNewErrorMessage("service", "Error in server message");else if (typeof h.error == "string") console.error(h.error), t.isLastMessageError() || t.addNewErrorMessage("service", h.error);else if (C.isSimulation(e.stream)) {
4256
- m = V.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4256
+ m = z.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4257
4257
  C.upsertWFiles(t, m, p, d);
4258
4258
  } else t.addNewMessage(h);
4259
4259
  case 9:
@@ -4355,7 +4355,7 @@ var T = /*#__PURE__*/function () {
4355
4355
  return v.processResponseByType(p);
4356
4356
  }).then( /*#__PURE__*/function () {
4357
4357
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(p) {
4358
- var Z, ie, x, S;
4358
+ var X, ie, x, S;
4359
4359
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4360
4360
  while (1) switch (_context14.prev = _context14.next) {
4361
4361
  case 0:
@@ -4366,7 +4366,7 @@ var T = /*#__PURE__*/function () {
4366
4366
  return _context14.abrupt("return");
4367
4367
  case 2:
4368
4368
  _context14.next = 4;
4369
- return (ie = (Z = e.deepChat).responseInterceptor) == null ? void 0 : ie.call(Z, p);
4369
+ return (ie = (X = e.deepChat).responseInterceptor) == null ? void 0 : ie.call(X, p);
4370
4370
  case 4:
4371
4371
  _context14.t0 = _context14.sent;
4372
4372
  if (_context14.t0) {
@@ -4692,7 +4692,7 @@ var Ge = /*#__PURE__*/function () {
4692
4692
  var _a$url;
4693
4693
  _classCallCheck(this, Ge);
4694
4694
  var n, r, o, a, l;
4695
- this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = Ge.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.connect) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, I.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = me.URL), this.connectSettings.websocket && V.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ue.checkForStream(this.deepChat);
4695
+ this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = Ge.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.connect) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, I.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = me.URL), this.connectSettings.websocket && z.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ue.checkForStream(this.deepChat);
4696
4696
  }
4697
4697
  _createClass(Ge, [{
4698
4698
  key: "verifyKey",
@@ -4822,7 +4822,7 @@ var Ge = /*#__PURE__*/function () {
4822
4822
  n = _objectSpread({
4823
4823
  messages: i
4824
4824
  }, this.rawBody);
4825
- V.sendWebsocket(this, n, t, !1);
4825
+ z.sendWebsocket(this, n, t, !1);
4826
4826
  } else this.callServiceAPI(t, i, e.files);
4827
4827
  case 4:
4828
4828
  case "end":
@@ -4904,17 +4904,17 @@ var Ge = /*#__PURE__*/function () {
4904
4904
  }]);
4905
4905
  return Ge;
4906
4906
  }();
4907
- var U = /*#__PURE__*/function (_Ge) {
4908
- _inherits(U, _Ge);
4907
+ var j = /*#__PURE__*/function (_Ge) {
4908
+ _inherits(j, _Ge);
4909
4909
  // prettier-ignore
4910
- function U(e, t, i, n, r) {
4910
+ function j(e, t, i, n, r) {
4911
4911
  var _this8;
4912
- _classCallCheck(this, U);
4912
+ _classCallCheck(this, j);
4913
4913
  var o;
4914
- _this8 = _callSuper(this, U, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.connectSettings = _this8.buildConnectSettings(_this8.key || "", e.connect);
4914
+ _this8 = _callSuper(this, j, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.connectSettings = _this8.buildConnectSettings(_this8.key || "", e.connect);
4915
4915
  return _this8;
4916
4916
  }
4917
- _createClass(U, [{
4917
+ _createClass(j, [{
4918
4918
  key: "setApiKeyProperties",
4919
4919
  value: function setApiKeyProperties(e) {
4920
4920
  this.key = e.key, e.validateKeyProperty && (this.validateKeyProperty = e.validateKeyProperty);
@@ -4950,7 +4950,7 @@ var U = /*#__PURE__*/function (_Ge) {
4950
4950
  return !0;
4951
4951
  }
4952
4952
  }]);
4953
- return U;
4953
+ return j;
4954
4954
  }(Ge);
4955
4955
  var Qt = /*#__PURE__*/function () {
4956
4956
  function Qt() {
@@ -5021,17 +5021,17 @@ ve._attributes_ = {}, ve._attributeToProperty_ = {};
5021
5021
  var Ji = ve;
5022
5022
  var co = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n",
5023
5023
  ho = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n";
5024
- var J = /*#__PURE__*/function () {
5025
- function J() {
5026
- _classCallCheck(this, J);
5024
+ var K = /*#__PURE__*/function () {
5025
+ function K() {
5026
+ _classCallCheck(this, K);
5027
5027
  }
5028
- _createClass(J, null, [{
5028
+ _createClass(K, null, [{
5029
5029
  key: "createSVGElement",
5030
5030
  value: function createSVGElement(e) {
5031
5031
  return new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
5032
5032
  }
5033
5033
  }]);
5034
- return J;
5034
+ return K;
5035
5035
  }();
5036
5036
  var Ie = /*#__PURE__*/function () {
5037
5037
  function Ie() {
@@ -5047,7 +5047,7 @@ var Ie = /*#__PURE__*/function () {
5047
5047
  }, {
5048
5048
  key: "createIconElement",
5049
5049
  value: function createIconElement(e, t) {
5050
- var i = J.createSVGElement(e);
5050
+ var i = K.createSVGElement(e);
5051
5051
  return i.id = t, i.classList.add("visibility-icon"), i;
5052
5052
  }
5053
5053
  // prettier-ignore
@@ -5194,25 +5194,25 @@ var D = /*#__PURE__*/function () {
5194
5194
  }]);
5195
5195
  return D;
5196
5196
  }();
5197
- var K = /*#__PURE__*/function () {
5198
- function K() {
5199
- _classCallCheck(this, K);
5197
+ var $ = /*#__PURE__*/function () {
5198
+ function $() {
5199
+ _classCallCheck(this, $);
5200
5200
  }
5201
- _createClass(K, null, [{
5201
+ _createClass($, null, [{
5202
5202
  key: "enableButtons",
5203
5203
  value: function enableButtons(e, t) {
5204
5204
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
5205
5205
  window.webLLM ? (e && (e.disabled = !1), t && (t.disabled = !1)) : i < At.MODULE_SEARCH_LIMIT_S * 4 && setTimeout(function () {
5206
- return K.enableButtons(e, t, i + 1);
5206
+ return $.enableButtons(e, t, i + 1);
5207
5207
  }, 250);
5208
5208
  }
5209
5209
  // prettier-ignore
5210
5210
  }, {
5211
5211
  key: "setUpInitial",
5212
5212
  value: function setUpInitial(e, t, i, n) {
5213
- var r = (t == null ? void 0 : t.downloadClass) || K.DOWNLOAD_BUTTON_CLASS,
5214
- o = (t == null ? void 0 : t.uploadClass) || K.UPLOAD_BUTTON_CLASS,
5215
- a = (t == null ? void 0 : t.fileInputClass) || K.FILE_INPUT_CLASS;
5213
+ var r = (t == null ? void 0 : t.downloadClass) || $.DOWNLOAD_BUTTON_CLASS,
5214
+ o = (t == null ? void 0 : t.uploadClass) || $.UPLOAD_BUTTON_CLASS,
5215
+ a = (t == null ? void 0 : t.fileInputClass) || $.FILE_INPUT_CLASS;
5216
5216
  return setTimeout(function () {
5217
5217
  var l = i == null ? void 0 : i.getElementsByClassName(r)[0],
5218
5218
  c = i == null ? void 0 : i.getElementsByClassName(a)[0],
@@ -5223,7 +5223,7 @@ var K = /*#__PURE__*/function () {
5223
5223
  c.files && c.files.length > 0 && e(c.files);
5224
5224
  }), d && (d.onclick = function () {
5225
5225
  return c.click();
5226
- }), (l || d) && K.enableButtons(l, d);
5226
+ }), (l || d) && $.enableButtons(l, d);
5227
5227
  }), (t == null ? void 0 : t.initialHtml) || "<div>\n Download or upload a web model that will run entirely on your browser: <br/> \n <button disabled class=\"".concat(r, " deep-chat-button deep-chat-web-model-button\">Download</button>\n ").concat(n ? "" : "<input type=\"file\" class=\"".concat(a, "\" hidden multiple />\n <button disabled class=\"").concat(o, " deep-chat-button deep-chat-web-model-button\">Upload</button>"), "\n </div>");
5228
5228
  }
5229
5229
  }, {
@@ -5248,19 +5248,19 @@ var K = /*#__PURE__*/function () {
5248
5248
  }, {
5249
5249
  key: "setUpAfterLoad",
5250
5250
  value: function setUpAfterLoad(e, t, i, n) {
5251
- var r = (t == null ? void 0 : t.exportFilesClass) || K.EXPORT_BUTTON_CLASS;
5251
+ var r = (t == null ? void 0 : t.exportFilesClass) || $.EXPORT_BUTTON_CLASS;
5252
5252
  return setTimeout(function () {
5253
5253
  var o = i == null ? void 0 : i.getElementsByClassName(r)[0];
5254
5254
  o && (o.onclick = function () {
5255
- return K.exportFile(e);
5255
+ return $.exportFile(e);
5256
5256
  });
5257
5257
  }), (t == null ? void 0 : t.afterLoadHtml) || "<div>\n Model loaded successfully and has been cached for future requests.\n ".concat(n ? "" : "<br/> <button style=\"margin-top: 5px\" class=\"".concat(r, " deep-chat-button\">Export</button>"), "\n </div>");
5258
5258
  }
5259
5259
  }]);
5260
- return K;
5260
+ return $;
5261
5261
  }();
5262
- K.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button", K.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button", K.FILE_INPUT_CLASS = "deep-chat-file-input", K.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
5263
- var ei = K;
5262
+ $.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button", $.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button", $.FILE_INPUT_CLASS = "deep-chat-file-input", $.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
5263
+ var ei = $;
5264
5264
  var Pn = {
5265
5265
  model_list: [
5266
5266
  // Llama-2
@@ -5428,7 +5428,7 @@ var Pn = {
5428
5428
  var t;
5429
5429
  ((t = this._webModel.introMessage) == null ? void 0 : t.autoScroll) !== !1 && setTimeout(function () {
5430
5430
  var i, n;
5431
- (i = _this13._messages) != null && i.elementRef && j.scrollToTop((n = _this13._messages) == null ? void 0 : n.elementRef);
5431
+ (i = _this13._messages) != null && i.elementRef && B.scrollToTop((n = _this13._messages) == null ? void 0 : n.elementRef);
5432
5432
  }, e);
5433
5433
  }
5434
5434
  // prettier-ignore
@@ -5560,7 +5560,7 @@ var Pn = {
5560
5560
  sendUpdate: !1
5561
5561
  }), i && (setTimeout(function () {
5562
5562
  var p;
5563
- return j.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
5563
+ return B.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
5564
5564
  }), i = !1);
5565
5565
  };
5566
5566
  w.chat.setInitProgressCallback(n);
@@ -5955,8 +5955,8 @@ var ti = /*#__PURE__*/function () {
5955
5955
  }]);
5956
5956
  return ti;
5957
5957
  }();
5958
- var Et = /*#__PURE__*/function (_U) {
5959
- _inherits(Et, _U);
5958
+ var Et = /*#__PURE__*/function (_j) {
5959
+ _inherits(Et, _j);
5960
5960
  // prettier-ignore
5961
5961
  function Et(e, t, i, n, r, o) {
5962
5962
  var _this16;
@@ -6004,7 +6004,7 @@ var Et = /*#__PURE__*/function (_U) {
6004
6004
  }()
6005
6005
  }]);
6006
6006
  return Et;
6007
- }(U);
6007
+ }(j);
6008
6008
  Et.URL_PREFIX = "https://api-inference.huggingface.co/models/";
6009
6009
  var Te = Et;
6010
6010
  var Ot = /*#__PURE__*/function (_Te) {
@@ -6193,8 +6193,8 @@ var ge = /*#__PURE__*/function () {
6193
6193
  }]);
6194
6194
  return ge;
6195
6195
  }();
6196
- var Ei = /*#__PURE__*/function (_U2) {
6197
- _inherits(Ei, _U2);
6196
+ var Ei = /*#__PURE__*/function (_j2) {
6197
+ _inherits(Ei, _j2);
6198
6198
  // prettier-ignore
6199
6199
  function Ei(e, t, i, n, r) {
6200
6200
  var _this18;
@@ -6203,7 +6203,7 @@ var Ei = /*#__PURE__*/function (_U2) {
6203
6203
  return _this18;
6204
6204
  }
6205
6205
  return _createClass(Ei);
6206
- }(U);
6206
+ }(j);
6207
6207
  var ii = /*#__PURE__*/function (_Ei) {
6208
6208
  _inherits(ii, _Ei);
6209
6209
  function ii(e) {
@@ -7006,8 +7006,8 @@ var oi = /*#__PURE__*/function () {
7006
7006
  }]);
7007
7007
  return oi;
7008
7008
  }();
7009
- var hn = /*#__PURE__*/function (_U3) {
7010
- _inherits(hn, _U3);
7009
+ var hn = /*#__PURE__*/function (_j3) {
7010
+ _inherits(hn, _j3);
7011
7011
  function hn(e, t, i, n, r) {
7012
7012
  var _this26;
7013
7013
  _classCallCheck(this, hn);
@@ -7015,7 +7015,7 @@ var hn = /*#__PURE__*/function (_U3) {
7015
7015
  return _this26;
7016
7016
  }
7017
7017
  return _createClass(hn);
7018
- }(U);
7018
+ }(j);
7019
7019
  var Eo = /*#__PURE__*/function (_hn) {
7020
7020
  _inherits(Eo, _hn);
7021
7021
  function Eo(e) {
@@ -7235,8 +7235,8 @@ var P = /*#__PURE__*/function () {
7235
7235
  }]);
7236
7236
  return P;
7237
7237
  }();
7238
- var it = /*#__PURE__*/function (_U4) {
7239
- _inherits(it, _U4);
7238
+ var it = /*#__PURE__*/function (_j4) {
7239
+ _inherits(it, _j4);
7240
7240
  function it(e) {
7241
7241
  var _o$model, _a$voice;
7242
7242
  var _this27;
@@ -7330,11 +7330,11 @@ var it = /*#__PURE__*/function (_U4) {
7330
7330
  }()
7331
7331
  }]);
7332
7332
  return it;
7333
- }(U);
7333
+ }(j);
7334
7334
  it.DEFAULT_MODEL = "tts-1", it.DEFAULT_VOIDE = "alloy";
7335
7335
  var Zi = it;
7336
- var le = /*#__PURE__*/function (_U5) {
7337
- _inherits(le, _U5);
7336
+ var le = /*#__PURE__*/function (_j5) {
7337
+ _inherits(le, _j5);
7338
7338
  function le(e) {
7339
7339
  var _o$model2;
7340
7340
  var _this28;
@@ -7444,7 +7444,7 @@ var le = /*#__PURE__*/function (_U5) {
7444
7444
  }
7445
7445
  }]);
7446
7446
  return le;
7447
- }(U);
7447
+ }(j);
7448
7448
  le.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", le.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", le.DEFAULT_MODEL = "whisper-1";
7449
7449
  var Yi = le;
7450
7450
  var te = /*#__PURE__*/function () {
@@ -7549,8 +7549,8 @@ var te = /*#__PURE__*/function () {
7549
7549
  }]);
7550
7550
  return te;
7551
7551
  }();
7552
- var So = /*#__PURE__*/function (_U6) {
7553
- _inherits(So, _U6);
7552
+ var So = /*#__PURE__*/function (_j6) {
7553
+ _inherits(So, _j6);
7554
7554
  // prettier-ignore
7555
7555
  function So(e, t, i, n, r) {
7556
7556
  var _this29;
@@ -7561,7 +7561,7 @@ var So = /*#__PURE__*/function (_U6) {
7561
7561
  return _this29;
7562
7562
  }
7563
7563
  return _createClass(So);
7564
- }(U);
7564
+ }(j);
7565
7565
  var wo = /*#__PURE__*/function (_So) {
7566
7566
  _inherits(wo, _So);
7567
7567
  function wo(e) {
@@ -7822,8 +7822,8 @@ var gt = /*#__PURE__*/function () {
7822
7822
  }]);
7823
7823
  return gt;
7824
7824
  }();
7825
- var un = /*#__PURE__*/function (_U7) {
7826
- _inherits(un, _U7);
7825
+ var un = /*#__PURE__*/function (_j7) {
7826
+ _inherits(un, _j7);
7827
7827
  function un(e) {
7828
7828
  var _this31;
7829
7829
  _classCallCheck(this, un);
@@ -7906,9 +7906,9 @@ var un = /*#__PURE__*/function (_U7) {
7906
7906
  }
7907
7907
  }]);
7908
7908
  return un;
7909
- }(U);
7910
- var as = /*#__PURE__*/function (_U8) {
7911
- _inherits(as, _U8);
7909
+ }(j);
7910
+ var as = /*#__PURE__*/function (_j8) {
7911
+ _inherits(as, _j8);
7912
7912
  // prettier-ignore
7913
7913
  function as(e, t, i, n, r) {
7914
7914
  var _this32;
@@ -7919,7 +7919,7 @@ var as = /*#__PURE__*/function (_U8) {
7919
7919
  return _this32;
7920
7920
  }
7921
7921
  return _createClass(as);
7922
- }(U);
7922
+ }(j);
7923
7923
  var bi = /*#__PURE__*/function (_as) {
7924
7924
  _inherits(bi, _as);
7925
7925
  // prettier-ignore
@@ -8093,8 +8093,8 @@ _t.HELP_LINK =
8093
8093
  // eslint-disable-next-line max-len
8094
8094
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
8095
8095
  var en = _t;
8096
- var To = /*#__PURE__*/function (_U9) {
8097
- _inherits(To, _U9);
8096
+ var To = /*#__PURE__*/function (_j9) {
8097
+ _inherits(To, _j9);
8098
8098
  // prettier-ignore
8099
8099
  function To(e) {
8100
8100
  var _this35;
@@ -8172,7 +8172,7 @@ var To = /*#__PURE__*/function (_U9) {
8172
8172
  }()
8173
8173
  }]);
8174
8174
  return To;
8175
- }(U);
8175
+ }(j);
8176
8176
  var Le = /*#__PURE__*/function () {
8177
8177
  function Le() {
8178
8178
  _classCallCheck(this, Le);
@@ -8381,16 +8381,16 @@ var Le = /*#__PURE__*/function () {
8381
8381
  }]);
8382
8382
  return Le;
8383
8383
  }();
8384
- var q = /*#__PURE__*/function (_U10) {
8385
- _inherits(q, _U10);
8386
- function q(e) {
8384
+ var H = /*#__PURE__*/function (_j10) {
8385
+ _inherits(H, _j10);
8386
+ function H(e) {
8387
8387
  var _c$headers, _d$OpenAIBeta;
8388
8388
  var _this36;
8389
- _classCallCheck(this, q);
8389
+ _classCallCheck(this, H);
8390
8390
  var r, o, a, l, c, d;
8391
8391
  var t = JSON.parse(JSON.stringify(e.directConnection)),
8392
8392
  i = t.openAI;
8393
- _this36 = _callSuper(this, q, [e, P.buildKeyVerificationDetails(), P.buildHeaders, i]), _this36.insertKeyPlaceholderText = "OpenAI API Key", _this36.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this36.url = "", _this36.permittedErrorPrefixes = ["Incorrect"], _this36.searchedForThreadId = !1, _this36.config = {}, _this36.newAssistantDetails = {
8393
+ _this36 = _callSuper(this, H, [e, P.buildKeyVerificationDetails(), P.buildHeaders, i]), _this36.insertKeyPlaceholderText = "OpenAI API Key", _this36.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this36.url = "", _this36.permittedErrorPrefixes = ["Incorrect"], _this36.searchedForThreadId = !1, _this36.config = {}, _this36.newAssistantDetails = {
8394
8394
  model: "gpt-4"
8395
8395
  }, _this36.shouldFetchHistory = !1;
8396
8396
  var n = (r = t.openAI) == null ? void 0 : r.assistant;
@@ -8408,7 +8408,7 @@ var q = /*#__PURE__*/function (_U10) {
8408
8408
  (_c$headers = (c = _this36.connectSettings).headers) !== null && _c$headers !== void 0 ? _c$headers : c.headers = {}, (_d$OpenAIBeta = (d = _this36.connectSettings.headers)["OpenAI-Beta"]) !== null && _d$OpenAIBeta !== void 0 ? _d$OpenAIBeta : d["OpenAI-Beta"] = "assistants=v1", _this36.maxMessages = 1, _this36.shouldFetchHistory && _this36.sessionId && (_this36.fetchHistory = _this36.fetchHistoryFunc.bind(_assertThisInitialized(_this36)));
8409
8409
  return _this36;
8410
8410
  }
8411
- _createClass(q, [{
8411
+ _createClass(H, [{
8412
8412
  key: "fetchHistoryFunc",
8413
8413
  value: function () {
8414
8414
  var _fetchHistoryFunc = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80() {
@@ -8466,11 +8466,11 @@ var q = /*#__PURE__*/function (_U10) {
8466
8466
  key: "callService",
8467
8467
  value: function callService(e, t, i) {
8468
8468
  if (this.sessionId) {
8469
- this.url = "".concat(q.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
8469
+ this.url = "".concat(H.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
8470
8470
  var n = this.processMessage(t, i);
8471
8471
  T.request(this, n, e);
8472
8472
  } else {
8473
- this.url = "".concat(q.THREAD_PREFIX, "/runs");
8473
+ this.url = "".concat(H.THREAD_PREFIX, "/runs");
8474
8474
  var _n2 = this.createNewThreadMessages(this.rawBody, t, i);
8475
8475
  T.request(this, _n2, e);
8476
8476
  }
@@ -8547,7 +8547,7 @@ var q = /*#__PURE__*/function (_U10) {
8547
8547
  while (1) switch (_context82.prev = _context82.next) {
8548
8548
  case 0:
8549
8549
  _context82.prev = 0;
8550
- this.url = q.NEW_ASSISTANT_URL;
8550
+ this.url = H.NEW_ASSISTANT_URL;
8551
8551
  _context82.next = 4;
8552
8552
  return P.directFetch(this, JSON.parse(JSON.stringify(this.newAssistantDetails)), "POST");
8553
8553
  case 4:
@@ -8593,7 +8593,7 @@ var q = /*#__PURE__*/function (_U10) {
8593
8593
  _context83.next = 4;
8594
8594
  return this.assignThreadAndRun(e);
8595
8595
  case 4:
8596
- t = "".concat(q.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
8596
+ t = "".concat(H.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
8597
8597
  method: "GET",
8598
8598
  headers: (n = this.connectSettings) == null ? void 0 : n.headers
8599
8599
  };
@@ -8623,7 +8623,7 @@ var q = /*#__PURE__*/function (_U10) {
8623
8623
  _context84.next = 8;
8624
8624
  break;
8625
8625
  }
8626
- this.url = "".concat(q.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8626
+ this.url = "".concat(H.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8627
8627
  _context84.next = 4;
8628
8628
  return P.directFetch(this, JSON.parse(JSON.stringify(this.rawBody)), "POST");
8629
8629
  case 4:
@@ -8659,7 +8659,7 @@ var q = /*#__PURE__*/function (_U10) {
8659
8659
  while (1) switch (_context86.prev = _context86.next) {
8660
8660
  case 0:
8661
8661
  t = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : !1;
8662
- this.url = "".concat(q.THREAD_PREFIX, "/").concat(e, "/messages");
8662
+ this.url = "".concat(H.THREAD_PREFIX, "/").concat(e, "/messages");
8663
8663
  _context86.next = 4;
8664
8664
  return P.directFetch(this, {}, "GET");
8665
8665
  case 4:
@@ -8723,7 +8723,7 @@ var q = /*#__PURE__*/function (_U10) {
8723
8723
  break;
8724
8724
  }
8725
8725
  return _context87.abrupt("return", {
8726
- timeoutMS: q.POLLING_TIMEOUT_MS
8726
+ timeoutMS: H.POLLING_TIMEOUT_MS
8727
8727
  });
8728
8728
  case 3:
8729
8729
  if (!(t === "completed" && this.messages)) {
@@ -8814,14 +8814,14 @@ var q = /*#__PURE__*/function (_U10) {
8814
8814
  output: r
8815
8815
  };
8816
8816
  });
8817
- this.url = "".concat(q.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
8817
+ this.url = "".concat(H.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
8818
8818
  _context88.next = 12;
8819
8819
  return P.directFetch(this, {
8820
8820
  tool_outputs: n
8821
8821
  }, "POST");
8822
8822
  case 12:
8823
8823
  return _context88.abrupt("return", {
8824
- timeoutMS: q.POLLING_TIMEOUT_MS
8824
+ timeoutMS: H.POLLING_TIMEOUT_MS
8825
8825
  });
8826
8826
  case 13:
8827
8827
  case "end":
@@ -8835,12 +8835,12 @@ var q = /*#__PURE__*/function (_U10) {
8835
8835
  return handleTools;
8836
8836
  }()
8837
8837
  }]);
8838
- return q;
8839
- }(U);
8840
- q.THREAD_PREFIX = "https://api.openai.com/v1/threads", q.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants", q.POLLING_TIMEOUT_MS = 800;
8841
- var tn = q;
8842
- var ce = /*#__PURE__*/function (_U11) {
8843
- _inherits(ce, _U11);
8838
+ return H;
8839
+ }(j);
8840
+ H.THREAD_PREFIX = "https://api.openai.com/v1/threads", H.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants", H.POLLING_TIMEOUT_MS = 800;
8841
+ var tn = H;
8842
+ var ce = /*#__PURE__*/function (_j11) {
8843
+ _inherits(ce, _j11);
8844
8844
  function ce(e) {
8845
8845
  var _this39;
8846
8846
  _classCallCheck(this, ce);
@@ -8989,11 +8989,11 @@ var ce = /*#__PURE__*/function (_U11) {
8989
8989
  }
8990
8990
  }]);
8991
8991
  return ce;
8992
- }(U);
8992
+ }(j);
8993
8993
  ce.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", ce.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", ce.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
8994
8994
  var nn = ce;
8995
- var bt = /*#__PURE__*/function (_U12) {
8996
- _inherits(bt, _U12);
8995
+ var bt = /*#__PURE__*/function (_j12) {
8996
+ _inherits(bt, _j12);
8997
8997
  function bt(e) {
8998
8998
  var _this40$maxMessages, _l$model;
8999
8999
  var _this40;
@@ -9266,7 +9266,7 @@ var bt = /*#__PURE__*/function (_U12) {
9266
9266
  }
9267
9267
  }]);
9268
9268
  return bt;
9269
- }(U);
9269
+ }(j);
9270
9270
  var Co = /*#__PURE__*/function (_hn3) {
9271
9271
  _inherits(Co, _hn3);
9272
9272
  function Co(e) {
@@ -9383,8 +9383,8 @@ var ai = /*#__PURE__*/function () {
9383
9383
  }]);
9384
9384
  return ai;
9385
9385
  }();
9386
- var ko = /*#__PURE__*/function (_U13) {
9387
- _inherits(ko, _U13);
9386
+ var ko = /*#__PURE__*/function (_j13) {
9387
+ _inherits(ko, _j13);
9388
9388
  function ko(e) {
9389
9389
  var _this43$maxMessages, _n$model;
9390
9390
  var _this43;
@@ -9470,7 +9470,7 @@ var ko = /*#__PURE__*/function (_U13) {
9470
9470
  }()
9471
9471
  }]);
9472
9472
  return ko;
9473
- }(U);
9473
+ }(j);
9474
9474
  var Ao = /*#__PURE__*/function () {
9475
9475
  function Ao() {
9476
9476
  _classCallCheck(this, Ao);
@@ -9624,7 +9624,7 @@ var Ce = /*#__PURE__*/function () {
9624
9624
  key: "createImage",
9625
9625
  value: function createImage(e, t) {
9626
9626
  var i = new Image();
9627
- return i.src = e.src, z.scrollDownOnImageLoad(i.src, t), z.processContent("image", i, i.src, e.name);
9627
+ return i.src = e.src, q.scrollDownOnImageLoad(i.src, t), q.processContent("image", i, i.src, e.name);
9628
9628
  }
9629
9629
  // WORK - image still does not scroll down when loaded
9630
9630
  }, {
@@ -9636,7 +9636,7 @@ var Ce = /*#__PURE__*/function () {
9636
9636
  while (1) switch (_context99.prev = _context99.next) {
9637
9637
  case 0:
9638
9638
  n = Ce.createImage(t, e.elementRef), r = e.createNewMessageElement("", i);
9639
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), z.addMessage(e, r, "image", i);
9639
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), q.addMessage(e, r, "image", i);
9640
9640
  case 2:
9641
9641
  case "end":
9642
9642
  return _context99.stop();
@@ -9659,7 +9659,7 @@ var Ce = /*#__PURE__*/function () {
9659
9659
  value: function addNewAudioMessage(e, t, i) {
9660
9660
  var n = Ce.createAudioElement(t, i),
9661
9661
  r = e.createNewMessageElement("", i);
9662
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), z.addMessage(e, r, "audio", i);
9662
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), q.addMessage(e, r, "audio", i);
9663
9663
  }
9664
9664
  }, {
9665
9665
  key: "createAnyFile",
@@ -9668,24 +9668,24 @@ var Ce = /*#__PURE__*/function () {
9668
9668
  t.classList.add("any-file-message-contents");
9669
9669
  var i = document.createElement("div");
9670
9670
  i.classList.add("any-file-message-icon-container");
9671
- var n = J.createSVGElement(Ro);
9671
+ var n = K.createSVGElement(Ro);
9672
9672
  n.classList.add("any-file-message-icon"), i.appendChild(n);
9673
9673
  var r = document.createElement("div");
9674
- return r.classList.add("any-file-message-text"), r.textContent = e.name || z.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), z.processContent("any", t, e.src, r.textContent);
9674
+ return r.classList.add("any-file-message-text"), r.textContent = e.name || q.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), q.processContent("any", t, e.src, r.textContent);
9675
9675
  }
9676
9676
  }, {
9677
9677
  key: "addNewAnyFileMessage",
9678
9678
  value: function addNewAnyFileMessage(e, t, i) {
9679
9679
  var n = e.createNewMessageElement("", i),
9680
9680
  r = Ce.createAnyFile(t);
9681
- n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), z.addMessage(e, n, "file", i);
9681
+ n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), q.addMessage(e, n, "file", i);
9682
9682
  }
9683
9683
  // no overwrite previous message logic as it is complex to track which files are to be overwritten
9684
9684
  }, {
9685
9685
  key: "addMessages",
9686
9686
  value: function addMessages(e, t, i) {
9687
9687
  t.forEach(function (n) {
9688
- n.ref && (n = z.removeFileRef(n)), z.isAudioFile(n) ? Ce.addNewAudioMessage(e, n, i) : z.isImageFile(n) ? Ce.addNewImageMessage(e, n, i) : Ce.addNewAnyFileMessage(e, n, i);
9688
+ n.ref && (n = q.removeFileRef(n)), q.isAudioFile(n) ? Ce.addNewAudioMessage(e, n, i) : q.isImageFile(n) ? Ce.addNewImageMessage(e, n, i) : Ce.addNewAnyFileMessage(e, n, i);
9689
9689
  });
9690
9690
  }
9691
9691
  }]);
@@ -9703,7 +9703,7 @@ var ke = /*#__PURE__*/function (_rt) {
9703
9703
  o = t.demo;
9704
9704
  _this44._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this44._onClearMessages = Yt.onClearMessages.bind(_assertThisInitialized(_this44), e), _this44._onError = Yt.onError.bind(_assertThisInitialized(_this44), e), _this44._displayLoadingMessage = ke.getDisplayLoadingMessage(e, t), _this44._permittedErrorPrefixes = n, _this44.addSetupMessageIfNeeded(e, t) || _this44.populateIntroPanel(i, r, e.introPanelStyle), _this44.addIntroductoryMessage(e, t), _this44.populateHistory(e), _this44._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
9705
9705
  return JSON.parse(JSON.stringify(_this44.messages));
9706
- }, e.clearMessages = _this44.clearMessages.bind(_assertThisInitialized(_this44), t), e.refreshMessages = _this44.refreshTextMessages.bind(_assertThisInitialized(_this44)), e.scrollToBottom = j.scrollToBottom.bind(_assertThisInitialized(_this44), _this44.elementRef), e.addMessage = function (c, d) {
9706
+ }, e.clearMessages = _this44.clearMessages.bind(_assertThisInitialized(_this44), t), e.refreshMessages = _this44.refreshTextMessages.bind(_assertThisInitialized(_this44)), e.scrollToBottom = B.scrollToBottom.bind(_assertThisInitialized(_this44), _this44.elementRef), e.addMessage = function (c, d) {
9707
9707
  _this44.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
9708
9708
  sendUpdate: !!d
9709
9709
  }), !d);
@@ -9754,7 +9754,7 @@ var ke = /*#__PURE__*/function (_rt) {
9754
9754
  t && (t.forEach(function (i) {
9755
9755
  ue.processHistoryFile(i), _this45.addNewMessage(i, !0);
9756
9756
  }), setTimeout(function () {
9757
- return j.scrollToBottom(_this45.elementRef);
9757
+ return B.scrollToBottom(_this45.elementRef);
9758
9758
  }, 0));
9759
9759
  }
9760
9760
  }, {
@@ -9772,7 +9772,7 @@ var ke = /*#__PURE__*/function (_rt) {
9772
9772
  return _this46.addAnyMessage(i, !0);
9773
9773
  });
9774
9774
  setTimeout(function () {
9775
- return j.scrollToBottom(_this46.elementRef);
9775
+ return B.scrollToBottom(_this46.elementRef);
9776
9776
  }, 0);
9777
9777
  case 4:
9778
9778
  case "end":
@@ -9839,7 +9839,7 @@ var ke = /*#__PURE__*/function (_rt) {
9839
9839
  var o = this.getPermittedMessage(t) || ((l = this._errorMessageOverrides) == null ? void 0 : l[e]) || ((c = this._errorMessageOverrides) == null ? void 0 : c["default"]) || "Error, please try again.";
9840
9840
  this.renderText(r, o);
9841
9841
  var a = F.extractParticularSharedStyles(["fontSize", "fontFamily"], (d = this.messageStyles) == null ? void 0 : d["default"]);
9842
- F.applyCustomStylesToElements(i, !1, a), F.applyCustomStylesToElements(i, !1, (h = this.messageStyles) == null ? void 0 : h.error), this.elementRef.appendChild(n), j.scrollToBottom(this.elementRef), this.textToSpeech && st.speak(o, this.textToSpeech), (u = this._onError) == null || u.call(this, o);
9842
+ F.applyCustomStylesToElements(i, !1, a), F.applyCustomStylesToElements(i, !1, (h = this.messageStyles) == null ? void 0 : h.error), this.elementRef.appendChild(n), B.scrollToBottom(this.elementRef), this.textToSpeech && st.speak(o, this.textToSpeech), (u = this._onError) == null || u.call(this, o);
9843
9843
  }
9844
9844
  }, {
9845
9845
  key: "getPermittedMessage",
@@ -9870,7 +9870,7 @@ var ke = /*#__PURE__*/function (_rt) {
9870
9870
  i = e.bubbleElement;
9871
9871
  i.classList.add("loading-message-text");
9872
9872
  var n = document.createElement("div");
9873
- n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, b.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), fn.set(i, this.messageStyles), this.elementRef.appendChild(t), j.scrollToBottom(this.elementRef);
9873
+ n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, b.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), fn.set(i, this.messageStyles), this.elementRef.appendChild(t), B.scrollToBottom(this.elementRef);
9874
9874
  }
9875
9875
  }, {
9876
9876
  key: "populateIntroPanel",
@@ -9887,7 +9887,7 @@ var ke = /*#__PURE__*/function (_rt) {
9887
9887
  return _context101.abrupt("return", Promise.all((e || []).map(function (t) {
9888
9888
  return new Promise(function (i) {
9889
9889
  if (!t.type || t.type === "any") {
9890
- var n = t.file.name || z.DEFAULT_FILE_NAME;
9890
+ var n = t.file.name || q.DEFAULT_FILE_NAME;
9891
9891
  i({
9892
9892
  name: n,
9893
9893
  type: "any",
@@ -10017,11 +10017,11 @@ var dt = /*#__PURE__*/function () {
10017
10017
  return dt;
10018
10018
  }();
10019
10019
  var On = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"];
10020
- var B = /*#__PURE__*/function () {
10021
- function B() {
10022
- _classCallCheck(this, B);
10020
+ var ee = /*#__PURE__*/function () {
10021
+ function ee() {
10022
+ _classCallCheck(this, ee);
10023
10023
  }
10024
- _createClass(B, null, [{
10024
+ _createClass(ee, null, [{
10025
10025
  key: "createTextElement",
10026
10026
  value: function createTextElement(e) {
10027
10027
  var t = document.createElement("div");
@@ -10030,15 +10030,15 @@ var B = /*#__PURE__*/function () {
10030
10030
  }, {
10031
10031
  key: "createElement",
10032
10032
  value: function createElement(e, t) {
10033
- return t ? B.createTextElement(e) : J.createSVGElement(e);
10033
+ return t ? ee.createTextElement(e) : K.createSVGElement(e);
10034
10034
  }
10035
10035
  }, {
10036
10036
  key: "createCustomElement",
10037
10037
  value: function createCustomElement(e, t) {
10038
10038
  var n, r, o, a;
10039
10039
  var i = t == null ? void 0 : t[e];
10040
- if ((n = i == null ? void 0 : i.text) != null && n.content) return B.createElement((r = i == null ? void 0 : i.text) == null ? void 0 : r.content, !0);
10041
- if ((o = i == null ? void 0 : i.svg) != null && o.content) return B.createElement((a = i == null ? void 0 : i.svg) == null ? void 0 : a.content, !1);
10040
+ if ((n = i == null ? void 0 : i.text) != null && n.content) return ee.createElement((r = i == null ? void 0 : i.text) == null ? void 0 : r.content, !0);
10041
+ if ((o = i == null ? void 0 : i.svg) != null && o.content) return ee.createElement((a = i == null ? void 0 : i.svg) == null ? void 0 : a.content, !1);
10042
10042
  }
10043
10043
  }, {
10044
10044
  key: "processElement",
@@ -10051,24 +10051,10 @@ var B = /*#__PURE__*/function () {
10051
10051
  key: "createSpecificStateElement",
10052
10052
  value: function createSpecificStateElement(e, t, i) {
10053
10053
  var n;
10054
- return i && (n = B.createCustomElement(t, i)), B.processElement(e, n), n;
10055
- }
10056
- // used for creating elements that change state in a sequence
10057
- // prettier-ignore
10058
- }, {
10059
- key: "create",
10060
- value: function create(e, t, i) {
10061
- var n = {};
10062
- if (!i) return B.processElement(e), n;
10063
- var r = B.createSpecificStateElement(e, t[0], i);
10064
- n[t[0]] = r;
10065
- var o = r;
10066
- return t.slice(1).forEach(function (a) {
10067
- o = B.createCustomElement(a, i) || o, n[a] = o;
10068
- }), n;
10054
+ return i && (n = ee.createCustomElement(t, i)), ee.processElement(e, n), n;
10069
10055
  }
10070
10056
  }]);
10071
- return B;
10057
+ return ee;
10072
10058
  }();
10073
10059
  var Io = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>";
10074
10060
  var he = /*#__PURE__*/function () {
@@ -10309,7 +10295,7 @@ var ot = /*#__PURE__*/function (_Dt) {
10309
10295
  }, {
10310
10296
  key: "createInnerElement",
10311
10297
  value: function createInnerElement(e, t, i) {
10312
- return B.createSpecificStateElement(this.elementRef, t, i) || e;
10298
+ return ee.createSpecificStateElement(this.elementRef, t, i) || e;
10313
10299
  }
10314
10300
  }, {
10315
10301
  key: "addClickEvent",
@@ -10338,7 +10324,7 @@ var ot = /*#__PURE__*/function (_Dt) {
10338
10324
  }, {
10339
10325
  key: "createSVGIconElement",
10340
10326
  value: function createSVGIconElement() {
10341
- return J.createSVGElement(Io);
10327
+ return K.createSVGElement(Io);
10342
10328
  }
10343
10329
  }, {
10344
10330
  key: "createButtonContainer",
@@ -10355,11 +10341,11 @@ var ot = /*#__PURE__*/function (_Dt) {
10355
10341
  }]);
10356
10342
  return ot;
10357
10343
  }(Dt);
10358
- var H = /*#__PURE__*/function () {
10359
- function H() {
10360
- _classCallCheck(this, H);
10344
+ var U = /*#__PURE__*/function () {
10345
+ function U() {
10346
+ _classCallCheck(this, U);
10361
10347
  }
10362
- _createClass(H, null, [{
10348
+ _createClass(U, null, [{
10363
10349
  key: "addToDropup",
10364
10350
  value:
10365
10351
  // prettier-ignore
@@ -10408,28 +10394,28 @@ var H = /*#__PURE__*/function () {
10408
10394
  }, {
10409
10395
  key: "generatePositions",
10410
10396
  value: function generatePositions(e) {
10411
- var t = H.createPositionsObj();
10397
+ var t = U.createPositionsObj();
10412
10398
  Object.keys(e).forEach(function (n) {
10413
10399
  var o;
10414
10400
  var r = (o = e[n]) == null ? void 0 : o.button.position;
10415
- r && H.setPosition(e, n, t[r]);
10416
- }), t["inside-right"].length === 0 && e.submit && H.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? H.setPosition(e, "submit", t["outside-right"]) : e.microphone ? H.setPosition(e, "microphone", t["outside-right"]) : e.camera && H.setPosition(e, "camera", t["outside-right"])), e.submit && H.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && H.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
10401
+ r && U.setPosition(e, n, t[r]);
10402
+ }), t["inside-right"].length === 0 && e.submit && U.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? U.setPosition(e, "submit", t["outside-right"]) : e.microphone ? U.setPosition(e, "microphone", t["outside-right"]) : e.camera && U.setPosition(e, "camera", t["outside-right"])), e.submit && U.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && U.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
10417
10403
  var i = Object.keys(e);
10418
10404
  return i.length > 1 || t["dropup-menu"].length > 0 ? On.forEach(function (n) {
10419
10405
  e[n] && t["dropup-menu"].push(_objectSpread(_objectSpread({}, e[n]), {}, {
10420
10406
  buttonType: n
10421
10407
  }));
10422
- }) : i.length === 1 && H.setPosition(e, i[0], t["outside-right"].length === 0 ? t["outside-right"] : t["outside-left"]), t;
10408
+ }) : i.length === 1 && U.setPosition(e, i[0], t["outside-right"].length === 0 ? t["outside-right"] : t["outside-left"]), t;
10423
10409
  }
10424
10410
  // prettier-ignore
10425
10411
  }, {
10426
10412
  key: "addButtons",
10427
10413
  value: function addButtons(e, t, i, n) {
10428
- var r = H.generatePositions(t);
10429
- return H.addToSideContainer(e, r), r["dropup-menu"].length > 0 && H.addToDropup(e, r, i, n), r;
10414
+ var r = U.generatePositions(t);
10415
+ return U.addToSideContainer(e, r), r["dropup-menu"].length > 0 && U.addToDropup(e, r, i, n), r;
10430
10416
  }
10431
10417
  }]);
10432
- return H;
10418
+ return U;
10433
10419
  }();
10434
10420
  var Lo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>file</title>\n<path d=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>",
10435
10421
  Po = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n",
@@ -10481,7 +10467,7 @@ var Rt = /*#__PURE__*/function (_Dt2) {
10481
10467
  }, {
10482
10468
  key: "createInnerElement",
10483
10469
  value: function createInnerElement(e, t, i) {
10484
- return B.createSpecificStateElement(this.elementRef, t, i) || e;
10470
+ return ee.createSpecificStateElement(this.elementRef, t, i) || e;
10485
10471
  }
10486
10472
  }, {
10487
10473
  key: "changeToActive",
@@ -10528,7 +10514,7 @@ var Rt = /*#__PURE__*/function (_Dt2) {
10528
10514
  }, {
10529
10515
  key: "createSVGIconElement",
10530
10516
  value: function createSVGIconElement() {
10531
- var e = J.createSVGElement(Fo);
10517
+ var e = K.createSVGElement(Fo);
10532
10518
  return e.id = "microphone-icon", e;
10533
10519
  }
10534
10520
  }]);
@@ -10657,11 +10643,11 @@ Object.defineProperty(wi, "__esModule", {
10657
10643
  value: !0
10658
10644
  });
10659
10645
  wi.EventListeners = void 0;
10660
- var ee = /*#__PURE__*/function () {
10661
- function ee() {
10662
- _classCallCheck(this, ee);
10646
+ var Q = /*#__PURE__*/function () {
10647
+ function Q() {
10648
+ _classCallCheck(this, Q);
10663
10649
  }
10664
- _createClass(ee, null, [{
10650
+ _createClass(Q, null, [{
10665
10651
  key: "getElementIfFocusedOnAvailable",
10666
10652
  value: function getElementIfFocusedOnAvailable(e, t) {
10667
10653
  return Array.isArray(e) ? e.find(function (i) {
@@ -10672,14 +10658,14 @@ var ee = /*#__PURE__*/function () {
10672
10658
  key: "keyDownWindow",
10673
10659
  value: function keyDownWindow(e) {
10674
10660
  var _this51 = this;
10675
- e.element && ee.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (ee.KEY_DOWN_TIMEOUT !== null && clearTimeout(ee.KEY_DOWN_TIMEOUT), ee.KEY_DOWN_TIMEOUT = setTimeout(function () {
10676
- ee.KEY_DOWN_TIMEOUT = null, _this51.resetRecording(e);
10661
+ e.element && Q.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (Q.KEY_DOWN_TIMEOUT !== null && clearTimeout(Q.KEY_DOWN_TIMEOUT), Q.KEY_DOWN_TIMEOUT = setTimeout(function () {
10662
+ Q.KEY_DOWN_TIMEOUT = null, _this51.resetRecording(e);
10677
10663
  }, 500));
10678
10664
  }
10679
10665
  }, {
10680
10666
  key: "mouseDownWindow",
10681
10667
  value: function mouseDownWindow(e, t) {
10682
- this.mouseDownElement = ee.getElementIfFocusedOnAvailable(e, t.target);
10668
+ this.mouseDownElement = Q.getElementIfFocusedOnAvailable(e, t.target);
10683
10669
  }
10684
10670
  }, {
10685
10671
  key: "mouseUpWindow",
@@ -10690,7 +10676,7 @@ var ee = /*#__PURE__*/function () {
10690
10676
  key: "add",
10691
10677
  value: function add(e, t) {
10692
10678
  var i = (t == null ? void 0 : t.insertInCursorLocation) === void 0 || (t == null ? void 0 : t.insertInCursorLocation);
10693
- t != null && t.element && i && (e.mouseDownEvent = ee.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = ee.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = ee.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
10679
+ t != null && t.element && i && (e.mouseDownEvent = Q.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = Q.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = Q.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
10694
10680
  }
10695
10681
  }, {
10696
10682
  key: "remove",
@@ -10698,10 +10684,10 @@ var ee = /*#__PURE__*/function () {
10698
10684
  document.removeEventListener("mousedown", e.mouseDownEvent), document.removeEventListener("mouseup", e.mouseUpEvent), document.removeEventListener("keydown", e.keyDownEvent);
10699
10685
  }
10700
10686
  }]);
10701
- return ee;
10687
+ return Q;
10702
10688
  }();
10703
- wi.EventListeners = ee;
10704
- ee.KEY_DOWN_TIMEOUT = null;
10689
+ wi.EventListeners = Q;
10690
+ Q.KEY_DOWN_TIMEOUT = null;
10705
10691
  var Ti = {};
10706
10692
  Object.defineProperty(Ti, "__esModule", {
10707
10693
  value: !0
@@ -10915,11 +10901,11 @@ var Dn = Ut,
10915
10901
  Vo = ut,
10916
10902
  Fn = Ze,
10917
10903
  Bn = Je;
10918
- var Y = /*#__PURE__*/function () {
10919
- function Y() {
10920
- _classCallCheck(this, Y);
10904
+ var Z = /*#__PURE__*/function () {
10905
+ function Z() {
10906
+ _classCallCheck(this, Z);
10921
10907
  }
10922
- _createClass(Y, null, [{
10908
+ _createClass(Z, null, [{
10923
10909
  key: "processCommand",
10924
10910
  value: function processCommand(e, t) {
10925
10911
  return (!t || !t.caseSensitive) && (e = e.toLowerCase()), (t == null ? void 0 : t.substrings) === !1 ? Bn.Text.breakupIntoWordsArr(e) : e;
@@ -10930,7 +10916,7 @@ var Y = /*#__PURE__*/function () {
10930
10916
  var t;
10931
10917
  return ((t = e.settings) === null || t === void 0 ? void 0 : t.caseSensitive) === !0 ? e : Object.keys(e).reduce(function (n, r) {
10932
10918
  var o = e[r];
10933
- return n[r] = typeof o == "string" ? Y.processCommand(o, e.settings) : o, n;
10919
+ return n[r] = typeof o == "string" ? Z.processCommand(o, e.settings) : o, n;
10934
10920
  }, {});
10935
10921
  }
10936
10922
  }, {
@@ -10948,7 +10934,7 @@ var Y = /*#__PURE__*/function () {
10948
10934
  }, {
10949
10935
  key: "setText",
10950
10936
  value: function setText(e, t, i, n) {
10951
- Y.toggleCommandModeOff(e), zo.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || Fn.Cursor.setOffsetForPrimitive(n, i.length, !0), Vo.Browser.IS_SAFARI() && e.autoScroll && Dn.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || Fn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
10937
+ Z.toggleCommandModeOff(e), zo.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || Fn.Cursor.setOffsetForPrimitive(n, i.length, !0), Vo.Browser.IS_SAFARI() && e.autoScroll && Dn.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || Fn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
10952
10938
  return Dn.AutoScroll.scrollGeneric(e, n);
10953
10939
  })), e.resetRecording(t);
10954
10940
  }
@@ -10978,39 +10964,39 @@ var Y = /*#__PURE__*/function () {
10978
10964
  if (!c || !n || !i) return;
10979
10965
  var d = ((o = c.settings) === null || o === void 0 ? void 0 : o.caseSensitive) === !0 ? t : t.toLowerCase(),
10980
10966
  h = Bn.Text.breakupIntoWordsArr(d),
10981
- u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? Y.checkIfMatchesWord : Y.checkIfMatchesSubstring;
10967
+ u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? Z.checkIfMatchesWord : Z.checkIfMatchesSubstring;
10982
10968
  if (c.commandMode && u(c.commandMode, d, h)) return e.setInterimColorToFinal(), setTimeout(function () {
10983
- return Y.toggleCommandModeOn(e);
10969
+ return Z.toggleCommandModeOn(e);
10984
10970
  }), {
10985
10971
  doNotProcessTranscription: !1
10986
10972
  };
10987
10973
  if (!(c.commandMode && !e.isWaitingForCommand)) {
10988
- if (c.stop && u(c.stop, d, h)) return Y.toggleCommandModeOff(e), setTimeout(function () {
10974
+ if (c.stop && u(c.stop, d, h)) return Z.toggleCommandModeOff(e), setTimeout(function () {
10989
10975
  return e.stop();
10990
10976
  }), {
10991
10977
  doNotProcessTranscription: !1
10992
10978
  };
10993
- if (c.pause && u(c.pause, d, h)) return Y.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
10979
+ if (c.pause && u(c.pause, d, h)) return Z.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
10994
10980
  var f;
10995
10981
  e.isPaused = !0, (f = e.onPauseTrigger) === null || f === void 0 || f.call(e, !0);
10996
10982
  }), {
10997
10983
  doNotProcessTranscription: !1
10998
10984
  };
10999
- if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), Y.toggleCommandModeOff(e), e.resetRecording(i), {
10985
+ if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), Z.toggleCommandModeOff(e), e.resetRecording(i), {
11000
10986
  doNotProcessTranscription: !0
11001
10987
  };
11002
- if (c.reset && u(c.reset, d, h)) return r !== void 0 && Y.setText(e, i, r, n), {
10988
+ if (c.reset && u(c.reset, d, h)) return r !== void 0 && Z.setText(e, i, r, n), {
11003
10989
  doNotProcessTranscription: !0
11004
10990
  };
11005
- if (c.removeAllText && u(c.removeAllText, d, h)) return Y.setText(e, i, "", n), {
10991
+ if (c.removeAllText && u(c.removeAllText, d, h)) return Z.setText(e, i, "", n), {
11006
10992
  doNotProcessTranscription: !0
11007
10993
  };
11008
10994
  }
11009
10995
  }
11010
10996
  }]);
11011
- return Y;
10997
+ return Z;
11012
10998
  }();
11013
- jt.CommandUtils = Y;
10999
+ jt.CommandUtils = Z;
11014
11000
  var Ci = {};
11015
11001
  Object.defineProperty(Ci, "__esModule", {
11016
11002
  value: !0
@@ -12041,7 +12027,7 @@ var na = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12041
12027
  i.classList.add("audio-placeholder-text-3-digits");
12042
12028
  var n = document.createElement("div");
12043
12029
  n.classList.add("file-attachment-text-container", "audio-placeholder-text-3-digits-container"), n.appendChild(i);
12044
- var r = J.createSVGElement(Xn);
12030
+ var r = K.createSVGElement(Xn);
12045
12031
  return r.classList.add("attachment-icon", "stop-icon", "not-removable-attachment-icon"), i.textContent = "0:00", this._activePlaceholderTimer = this.createTimer(i, e), t.appendChild(n), this.addPlaceholderAudioAttachmentEvents(t, r, n), t;
12046
12032
  }
12047
12033
  }, {
@@ -12094,12 +12080,12 @@ var na = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12094
12080
  }, {
12095
12081
  key: "addAudioElements",
12096
12082
  value: function addAudioElements(e, t) {
12097
- var i = e.parentElement ? j.cloneElement(e) : e,
12083
+ var i = e.parentElement ? B.cloneElement(e) : e,
12098
12084
  n = document.createElement("audio");
12099
12085
  n.src = t;
12100
- var r = J.createSVGElement(na);
12086
+ var r = K.createSVGElement(na);
12101
12087
  r.classList.add("attachment-icon", "play-icon");
12102
- var o = J.createSVGElement(Xn);
12088
+ var o = K.createSVGElement(Xn);
12103
12089
  o.classList.add("attachment-icon", "stop-icon"), i.replaceChildren(r), n.onplay = function () {
12104
12090
  i.replaceChildren(o);
12105
12091
  }, n.onpause = function () {
@@ -12337,7 +12323,7 @@ var de = /*#__PURE__*/function () {
12337
12323
  value: function createSVGButton(e) {
12338
12324
  var t = document.createElement("div");
12339
12325
  t.classList.add("modal-button", "modal-svg-button");
12340
- var i = J.createSVGElement(e);
12326
+ var i = K.createSVGElement(e);
12341
12327
  return i.classList.add("modal-svg-button-icon"), t.appendChild(i), t;
12342
12328
  }
12343
12329
  }, {
@@ -12387,7 +12373,7 @@ var yt = /*#__PURE__*/function (_Dt3) {
12387
12373
  }, {
12388
12374
  key: "createInnerElement",
12389
12375
  value: function createInnerElement(e, t, i) {
12390
- return B.createSpecificStateElement(this.elementRef, t, i) || e;
12376
+ return ee.createSpecificStateElement(this.elementRef, t, i) || e;
12391
12377
  }
12392
12378
  }, {
12393
12379
  key: "addClickEvent",
@@ -12416,7 +12402,7 @@ var yt = /*#__PURE__*/function (_Dt3) {
12416
12402
  }, {
12417
12403
  key: "createSVGIconElement",
12418
12404
  value: function createSVGIconElement(e, t) {
12419
- var i = J.createSVGElement(t);
12405
+ var i = K.createSVGElement(t);
12420
12406
  return i.id = e, i;
12421
12407
  }
12422
12408
  }]);
@@ -12542,7 +12528,7 @@ var De = /*#__PURE__*/function () {
12542
12528
  }, {
12543
12529
  key: "validateWebsocket",
12544
12530
  value: function validateWebsocket(e, t) {
12545
- return e.websocket && !V.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
12531
+ return e.websocket && !z.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
12546
12532
  }
12547
12533
  // prettier-ignore
12548
12534
  }, {
@@ -12656,42 +12642,42 @@ var ra = /*#__PURE__*/function (_Rt2) {
12656
12642
  return ra;
12657
12643
  }(Rt);
12658
12644
  var oa = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";
12659
- var G = /*#__PURE__*/function () {
12660
- function G() {
12661
- _classCallCheck(this, G);
12645
+ var V = /*#__PURE__*/function () {
12646
+ function V() {
12647
+ _classCallCheck(this, V);
12662
12648
  }
12663
- _createClass(G, null, [{
12649
+ _createClass(V, null, [{
12664
12650
  key: "setPropertyValueIfDoesNotExist",
12665
12651
  value: function setPropertyValueIfDoesNotExist(e, t, i) {
12666
12652
  var _e$n, _e$n2;
12667
12653
  var n = t[0];
12668
- t.length === 1 ? (_e$n = e[n]) !== null && _e$n !== void 0 ? _e$n : e[n] = i : ((_e$n2 = e[n]) !== null && _e$n2 !== void 0 ? _e$n2 : e[n] = {}, t.shift(), G.setPropertyValueIfDoesNotExist(e[n], t, i));
12654
+ t.length === 1 ? (_e$n = e[n]) !== null && _e$n !== void 0 ? _e$n : e[n] = i : ((_e$n2 = e[n]) !== null && _e$n2 !== void 0 ? _e$n2 : e[n] = {}, t.shift(), V.setPropertyValueIfDoesNotExist(e[n], t, i));
12669
12655
  }
12670
12656
  }, {
12671
12657
  key: "setPropertyValue",
12672
12658
  value: function setPropertyValue(e, t, i) {
12673
12659
  var _e$n3;
12674
12660
  var n = t[0];
12675
- t.length === 1 ? e[n] = i : ((_e$n3 = e[n]) !== null && _e$n3 !== void 0 ? _e$n3 : e[n] = {}, t.shift(), G.setPropertyValue(e[n], t, i));
12661
+ t.length === 1 ? e[n] = i : ((_e$n3 = e[n]) !== null && _e$n3 !== void 0 ? _e$n3 : e[n] = {}, t.shift(), V.setPropertyValue(e[n], t, i));
12676
12662
  }
12677
12663
  }, {
12678
12664
  key: "getObjectValue",
12679
12665
  value: function getObjectValue(e, t) {
12680
12666
  var i = t[0],
12681
12667
  n = e[i];
12682
- return n === void 0 || t.length === 1 ? n : G.getObjectValue(n, t.slice(1));
12668
+ return n === void 0 || t.length === 1 ? n : V.getObjectValue(n, t.slice(1));
12683
12669
  }
12684
12670
  }, {
12685
12671
  key: "overwritePropertyObjectFromAnother",
12686
12672
  value: function overwritePropertyObjectFromAnother(e, t, i) {
12687
- var n = G.getObjectValue(t, i);
12673
+ var n = V.getObjectValue(t, i);
12688
12674
  if (n) {
12689
- var r = _objectSpread(_objectSpread({}, n), G.getObjectValue(e, i) || {});
12690
- G.setPropertyValue(e, i, r);
12675
+ var r = _objectSpread(_objectSpread({}, n), V.getObjectValue(e, i) || {});
12676
+ V.setPropertyValue(e, i, r);
12691
12677
  }
12692
12678
  }
12693
12679
  }]);
12694
- return G;
12680
+ return V;
12695
12681
  }();
12696
12682
  var ze = /*#__PURE__*/function () {
12697
12683
  function ze() {
@@ -12707,13 +12693,13 @@ var ze = /*#__PURE__*/function () {
12707
12693
  value: function overwriteDefaultStyleWithSubmit(e, t) {
12708
12694
  if (!e.submit) return;
12709
12695
  var i = JSON.parse(JSON.stringify(e[t] || {}));
12710
- G.overwritePropertyObjectFromAnother(i, e.submit, ["container", "default"]), G.overwritePropertyObjectFromAnother(i, e.submit, ["text", "styles", "default"]), G.overwritePropertyObjectFromAnother(i, e.submit, ["svg", "styles", "default"]), e[t] = i;
12696
+ V.overwritePropertyObjectFromAnother(i, e.submit, ["container", "default"]), V.overwritePropertyObjectFromAnother(i, e.submit, ["text", "styles", "default"]), V.overwritePropertyObjectFromAnother(i, e.submit, ["svg", "styles", "default"]), e[t] = i;
12711
12697
  }
12712
12698
  // prettier-ignore
12713
12699
  }, {
12714
12700
  key: "setUpDisabledButton",
12715
12701
  value: function setUpDisabledButton(e) {
12716
- G.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), G.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), G.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), G.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), ze.overwriteDefaultStyleWithSubmit(e, "disabled");
12702
+ V.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), V.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), V.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), V.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), ze.overwriteDefaultStyleWithSubmit(e, "disabled");
12717
12703
  }
12718
12704
  }, {
12719
12705
  key: "process",
@@ -12767,15 +12753,19 @@ var k = /*#__PURE__*/function (_Dt4) {
12767
12753
  stop: void 0
12768
12754
  };
12769
12755
  return Object.keys(e).forEach(function (t) {
12756
+ var r, o, a;
12770
12757
  var i = t,
12771
- n = B.createSpecificStateElement(_this70.elementRef, i, _this70._customStyles);
12772
- n && (e[i] = n);
12758
+ n = (r = _this70._customStyles) == null ? void 0 : r[i];
12759
+ if ((o = n == null ? void 0 : n.text) != null && o.content || (a = n == null ? void 0 : n.svg) != null && a.content) {
12760
+ var l = ee.createSpecificStateElement(_this70.elementRef, i, _this70._customStyles);
12761
+ l && (e[i] = l);
12762
+ }
12773
12763
  }), e;
12774
12764
  }
12775
12765
  }, {
12776
12766
  key: "createDisabledIconElement",
12777
12767
  value: function createDisabledIconElement(e) {
12778
- return B.createCustomElement("disabled", this._customStyles) || e.cloneNode(!0);
12768
+ return ee.createCustomElement("disabled", this._customStyles) || e.cloneNode(!0);
12779
12769
  }
12780
12770
  // prettier-ignore
12781
12771
  }, {
@@ -13013,7 +13003,7 @@ var k = /*#__PURE__*/function (_Dt4) {
13013
13003
  }, {
13014
13004
  key: "createSubmitIconElement",
13015
13005
  value: function createSubmitIconElement() {
13016
- var e = J.createSVGElement(oa);
13006
+ var e = K.createSVGElement(oa);
13017
13007
  return e.id = "submit-icon", e;
13018
13008
  }
13019
13009
  }, {
@@ -13047,7 +13037,7 @@ var gn = /*#__PURE__*/function (_qe) {
13047
13037
  var _this73$addButtonsAnd = _this73.addButtonsAndTheirEvents(t),
13048
13038
  r = _this73$addButtonsAnd.captureButton,
13049
13039
  o = _this73$addButtonsAnd.submitButton;
13050
- _this73._captureButton = r, _this73._submitButton = o, _this73._captureIcon = _this73._captureButton.children[0], _this73._refreshIcon = J.createSVGElement(aa), _this73._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (n == null ? void 0 : n.format) === "jpeg" && (_this73._format = "image/jpeg"), n != null && n.dimensions && (_this73._dimensions = n.dimensions), _this73._contentRef.appendChild(_this73._canvas), _this73.extensionCloseCallback = _this73.stop;
13040
+ _this73._captureButton = r, _this73._submitButton = o, _this73._captureIcon = _this73._captureButton.children[0], _this73._refreshIcon = K.createSVGElement(aa), _this73._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (n == null ? void 0 : n.format) === "jpeg" && (_this73._format = "image/jpeg"), n != null && n.dimensions && (_this73._dimensions = n.dimensions), _this73._contentRef.appendChild(_this73._canvas), _this73.extensionCloseCallback = _this73.stop;
13051
13041
  return _this73;
13052
13042
  }
13053
13043
  _createClass(gn, [{
@@ -13173,7 +13163,7 @@ var pi = /*#__PURE__*/function (_Dt5) {
13173
13163
  }, {
13174
13164
  key: "createInnerElement",
13175
13165
  value: function createInnerElement(e, t, i) {
13176
- return B.createSpecificStateElement(this.elementRef, t, i) || e;
13166
+ return ee.createSpecificStateElement(this.elementRef, t, i) || e;
13177
13167
  }
13178
13168
  }, {
13179
13169
  key: "addClickEvent",
@@ -13192,7 +13182,7 @@ var pi = /*#__PURE__*/function (_Dt5) {
13192
13182
  }, {
13193
13183
  key: "createSVGIconElement",
13194
13184
  value: function createSVGIconElement() {
13195
- var e = J.createSVGElement(ha);
13185
+ var e = K.createSVGElement(ha);
13196
13186
  return e.id = "camera-icon", e;
13197
13187
  }
13198
13188
  }]);
@@ -13265,9 +13255,9 @@ var xt = /*#__PURE__*/function () {
13265
13255
  }, {
13266
13256
  key: "addElements",
13267
13257
  value: function addElements(e, t, i, n, r, o) {
13268
- j.addElements(e, t.elementRef);
13258
+ B.addElements(e, t.elementRef);
13269
13259
  var a = dt.create(),
13270
- l = H.addButtons(a, i, n, o);
13260
+ l = U.addButtons(a, i, n, o);
13271
13261
  rn.set(t.inputElementRef, a, r.elementRef, l), dt.add(e, a);
13272
13262
  }
13273
13263
  }]);
@@ -13283,9 +13273,9 @@ var bn = /*#__PURE__*/function () {
13283
13273
  var n = document.createElement("div");
13284
13274
  n.id = "chat-view";
13285
13275
  var r = new ke(e, t, i);
13286
- t.websocket && V.createConnection(t, r);
13276
+ t.websocket && z.createConnection(t, r);
13287
13277
  var o = new xt(e, r, t, n);
13288
- return j.addElements(n, r.elementRef, o.elementRef), n;
13278
+ return B.addElements(n, r.elementRef, o.elementRef), n;
13289
13279
  }
13290
13280
  }, {
13291
13281
  key: "render",
@@ -13333,7 +13323,7 @@ var y = /*#__PURE__*/function (_Ji) {
13333
13323
  key: "onRender",
13334
13324
  value: function onRender() {
13335
13325
  var _this$_childElement;
13336
- Jt.attemptAppendStyleSheetToHead(this.style), ue.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = Ao.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (mt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), mt.applyDefaultStyleToComponent(this.style, this.chatStyle), ue.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? Kt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof U) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], bn.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof U && D.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Yt.onRender(this);
13326
+ Jt.attemptAppendStyleSheetToHead(this.style), ue.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = Ao.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (mt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), mt.applyDefaultStyleToComponent(this.style, this.chatStyle), ue.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? Kt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof j) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], bn.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof j && D.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Yt.onRender(this);
13337
13327
  }
13338
13328
  }, {
13339
13329
  key: "disconnectedCallback",