deep-chat-dev 9.0.241 → 9.0.243

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
@@ -93,16 +93,17 @@ var O = /*#__PURE__*/function () {
93
93
  value: function unsetAllCSSMouseStates(e, t) {
94
94
  O.unsetActivityCSSMouseStates(e, t), t["default"] && O.unsetStyle(e, t["default"]);
95
95
  }
96
+ // if you want to asdd default styling - use pure css classes
96
97
  }, {
97
98
  key: "processStateful",
98
- value: function processStateful(e, t, i) {
99
- var s = e["default"] || {},
100
- r = Object.assign(JSON.parse(JSON.stringify(_objectSpread(_objectSpread({}, s), t))), e == null ? void 0 : e.hover),
101
- o = Object.assign(JSON.parse(JSON.stringify(_objectSpread(_objectSpread({}, r), i))), e == null ? void 0 : e.click);
99
+ value: function processStateful(e) {
100
+ var t = e["default"] || {},
101
+ i = Object.assign(JSON.parse(JSON.stringify(t)), e == null ? void 0 : e.hover),
102
+ s = Object.assign(JSON.parse(JSON.stringify(i)), e == null ? void 0 : e.click);
102
103
  return {
103
- "default": s,
104
- hover: r,
105
- click: o
104
+ "default": t,
105
+ hover: i,
106
+ click: s
106
107
  };
107
108
  }
108
109
  }, {
@@ -543,30 +544,30 @@ var ut = /*#__PURE__*/function () {
543
544
  }]);
544
545
  }();
545
546
  ut.BUBBLE_CLASS = "deep-chat-loading-message-bubble", ut.DOTS_CONTAINER_CLASS = "deep-chat-loading-message-dots-container";
546
- var Pe = ut;
547
- var he = /*#__PURE__*/function () {
548
- function he() {
549
- _classCallCheck(this, he);
547
+ var Ne = ut;
548
+ var ue = /*#__PURE__*/function () {
549
+ function ue() {
550
+ _classCallCheck(this, ue);
550
551
  }
551
- return _createClass(he, null, [{
552
+ return _createClass(ue, null, [{
552
553
  key: "setElementProps",
553
554
  value:
554
555
  // prettier-ignore
555
556
  function setElementProps(e, t, i, s) {
556
557
  var r;
557
- i !== "loading" && (e.applyCustomStyles(t, s, !0, (r = e.messageStyles) == null ? void 0 : r[i]), t.bubbleElement.classList.add(he.FILE_BUBBLE_CLASS));
558
+ i !== "loading" && (e.applyCustomStyles(t, s, !0, (r = e.messageStyles) == null ? void 0 : r[i]), t.bubbleElement.classList.add(ue.FILE_BUBBLE_CLASS));
558
559
  }
559
560
  // prettier-ignore
560
561
  }, {
561
562
  key: "addMessage",
562
563
  value: function addMessage(e, t, i, s, r) {
563
- he.setElementProps(e, t, i, s), r || (e.appendOuterContainerElemet(t.outerContainer), e.focusMode || (e.elementRef.scrollTop = e.elementRef.scrollHeight));
564
+ ue.setElementProps(e, t, i, s), r || (e.appendOuterContainerElemet(t.outerContainer), e.focusMode || (e.elementRef.scrollTop = e.elementRef.scrollHeight));
564
565
  }
565
566
  }, {
566
567
  key: "wrapInLink",
567
568
  value: function wrapInLink(e, t, i) {
568
569
  var s = document.createElement("a");
569
- return s.href = t, s.download = i || he.DEFAULT_FILE_NAME, s.target = "_blank", s.appendChild(e), s;
570
+ return s.href = t, s.download = i || ue.DEFAULT_FILE_NAME, s.target = "_blank", s.appendChild(e), s;
570
571
  }
571
572
  }, {
572
573
  key: "isNonLinkableDataUrl",
@@ -576,7 +577,7 @@ var he = /*#__PURE__*/function () {
576
577
  }, {
577
578
  key: "processContent",
578
579
  value: function processContent(e, t, i, s) {
579
- return !i || he.isNonLinkableDataUrl(e, i) ? t : he.wrapInLink(t, i, s);
580
+ return !i || ue.isNonLinkableDataUrl(e, i) ? t : ue.wrapInLink(t, i, s);
580
581
  }
581
582
  }, {
582
583
  key: "waitToLoadThenScroll",
@@ -588,11 +589,11 @@ var he = /*#__PURE__*/function () {
588
589
  }, {
589
590
  key: "scrollDownOnImageLoad",
590
591
  value: function scrollDownOnImageLoad(e, t) {
591
- if (e.startsWith("data")) he.waitToLoadThenScroll(t);else try {
592
+ if (e.startsWith("data")) ue.waitToLoadThenScroll(t);else try {
592
593
  fetch(e, {
593
594
  mode: "no-cors"
594
595
  })["catch"](function () {})["finally"](function () {
595
- he.waitToLoadThenScroll(t);
596
+ ue.waitToLoadThenScroll(t);
596
597
  });
597
598
  } catch (_unused2) {
598
599
  t.scrollTop = t.scrollHeight;
@@ -630,7 +631,7 @@ var he = /*#__PURE__*/function () {
630
631
  value: function isImageFile(e) {
631
632
  var t = e.type,
632
633
  i = e.src;
633
- return t === "image" || (i == null ? void 0 : i.startsWith("data:image")) || i && he.isImageFileExtension(i);
634
+ return t === "image" || (i == null ? void 0 : i.startsWith("data:image")) || i && ue.isImageFileExtension(i);
634
635
  }
635
636
  }, {
636
637
  key: "isImageFileExtension",
@@ -639,8 +640,8 @@ var he = /*#__PURE__*/function () {
639
640
  }
640
641
  }]);
641
642
  }();
642
- he.DEFAULT_FILE_NAME = "file", he.FILE_BUBBLE_CLASS = "file-message";
643
- var V = he;
643
+ ue.DEFAULT_FILE_NAME = "file", ue.FILE_BUBBLE_CLASS = "file-message";
644
+ var V = ue;
644
645
  var ne = /*#__PURE__*/function () {
645
646
  function ne() {
646
647
  _classCallCheck(this, ne);
@@ -736,11 +737,11 @@ var ne = /*#__PURE__*/function () {
736
737
  }
737
738
  }]);
738
739
  }();
739
- var Ge = /*#__PURE__*/function () {
740
- function Ge() {
741
- _classCallCheck(this, Ge);
740
+ var Ve = /*#__PURE__*/function () {
741
+ function Ve() {
742
+ _classCallCheck(this, Ve);
742
743
  }
743
- return _createClass(Ge, null, [{
744
+ return _createClass(Ve, null, [{
744
745
  key: "mouseUp",
745
746
  value: function mouseUp(e, t) {
746
747
  O.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
@@ -763,7 +764,7 @@ var Ge = /*#__PURE__*/function () {
763
764
  }, {
764
765
  key: "add",
765
766
  value: function add(e, t) {
766
- e.addEventListener("mouseenter", Ge.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Ge.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Ge.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Ge.mouseUp.bind(this, e, t));
767
+ e.addEventListener("mouseenter", Ve.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Ve.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Ve.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Ve.mouseUp.bind(this, e, t));
767
768
  }
768
769
  }]);
769
770
  }();
@@ -791,11 +792,11 @@ var $n = "deep-chat-temporary-message",
791
792
  }
792
793
  },
793
794
  Bs = Object.keys(ts);
794
- var Ne = /*#__PURE__*/function () {
795
- function Ne() {
796
- _classCallCheck(this, Ne);
795
+ var De = /*#__PURE__*/function () {
796
+ function De() {
797
+ _classCallCheck(this, De);
797
798
  }
798
- return _createClass(Ne, null, [{
799
+ return _createClass(De, null, [{
799
800
  key: "applySuggestionEvent",
800
801
  value: function applySuggestionEvent(e, t) {
801
802
  setTimeout(function () {
@@ -842,7 +843,7 @@ var Ne = /*#__PURE__*/function () {
842
843
  a["default"] && O.overwriteDefaultWithAlreadyApplied(a, t), s.unshift(a);
843
844
  }
844
845
  var o = O.mergeStatefulStyles(s);
845
- return O.processStateful(o, {}, {});
846
+ return O.processStateful(o);
846
847
  }
847
848
  }, {
848
849
  key: "applyDeepChatUtilities",
@@ -850,13 +851,13 @@ var Ne = /*#__PURE__*/function () {
850
851
  Bs.forEach(function (r) {
851
852
  var o = i.getElementsByClassName(r);
852
853
  Array.from(o || []).forEach(function (a) {
853
- var l = Ne.getProcessedStyles(t, a, r);
854
- ie.applyStylesToElement(a, l), Ne.applyEvents(a, r);
854
+ var l = De.getProcessedStyles(t, a, r);
855
+ ie.applyStylesToElement(a, l), De.applyEvents(a, r);
855
856
  });
856
857
  });
857
858
  var s = i.getElementsByClassName(Wn);
858
859
  Array.from(s).forEach(function (r) {
859
- return Ne.applySuggestionEvent(e, r);
860
+ return De.applySuggestionEvent(e, r);
860
861
  });
861
862
  }
862
863
  }]);
@@ -868,8 +869,8 @@ var ie = /*#__PURE__*/function () {
868
869
  return _createClass(ie, null, [{
869
870
  key: "applyStylesToElement",
870
871
  value: function applyStylesToElement(e, t) {
871
- var i = O.processStateful(t, {}, {});
872
- Ge.add(e, i), Object.assign(e.style, i["default"]);
872
+ var i = O.processStateful(t);
873
+ Ve.add(e, i), Object.assign(e.style, i["default"]);
873
874
  }
874
875
  }, {
875
876
  key: "applyEventsToElement",
@@ -884,7 +885,7 @@ var ie = /*#__PURE__*/function () {
884
885
  value: function applyClassUtilitiesToElement(e, t) {
885
886
  var i = t.events,
886
887
  s = t.styles;
887
- i && ie.applyEventsToElement(e, i), s && !Ne.doesElementContainDeepChatClass(e) && ie.applyStylesToElement(e, s);
888
+ i && ie.applyEventsToElement(e, i), s && !De.doesElementContainDeepChatClass(e) && ie.applyStylesToElement(e, s);
888
889
  }
889
890
  }, {
890
891
  key: "applyCustomClassUtilities",
@@ -899,7 +900,7 @@ var ie = /*#__PURE__*/function () {
899
900
  }, {
900
901
  key: "apply",
901
902
  value: function apply(e, t) {
902
- Ne.applyDeepChatUtilities(e, e.htmlClassUtilities, t), ie.applyCustomClassUtilities(e.htmlClassUtilities, t);
903
+ De.applyDeepChatUtilities(e, e.htmlClassUtilities, t), ie.applyCustomClassUtilities(e.htmlClassUtilities, t);
903
904
  }
904
905
  }, {
905
906
  key: "traverseNodes",
@@ -927,11 +928,11 @@ var ie = /*#__PURE__*/function () {
927
928
  }
928
929
  }]);
929
930
  }();
930
- var Me = /*#__PURE__*/function () {
931
- function Me() {
932
- _classCallCheck(this, Me);
931
+ var ke = /*#__PURE__*/function () {
932
+ function ke() {
933
+ _classCallCheck(this, ke);
933
934
  }
934
- return _createClass(Me, null, [{
935
+ return _createClass(ke, null, [{
935
936
  key: "addElement",
936
937
  value: function addElement(e, t) {
937
938
  e.appendOuterContainerElemet(t), e.focusMode || (e.elementRef.scrollTop = e.elementRef.scrollHeight);
@@ -940,7 +941,7 @@ var Me = /*#__PURE__*/function () {
940
941
  key: "createElements",
941
942
  value: function createElements(e, t, i, s) {
942
943
  var r = e.createMessageElementsOnOrientation("", i, s);
943
- return r.bubbleElement.classList.add(Me.HTML_BUBBLE_CLASS), r.bubbleElement.innerHTML = t, r;
944
+ return r.bubbleElement.classList.add(ke.HTML_BUBBLE_CLASS), r.bubbleElement.innerHTML = t, r;
944
945
  }
945
946
  }, {
946
947
  key: "overwriteElements",
@@ -952,15 +953,15 @@ var Me = /*#__PURE__*/function () {
952
953
  key: "overwrite",
953
954
  value: function overwrite(e, t, i, s) {
954
955
  var r = e.messageToElements,
955
- o = v.overwriteMessage(r, s, t, i, "html", Me.HTML_BUBBLE_CLASS);
956
- return o && Me.overwriteElements(e, t, o), o;
956
+ o = v.overwriteMessage(r, s, t, i, "html", ke.HTML_BUBBLE_CLASS);
957
+ return o && ke.overwriteElements(e, t, o), o;
957
958
  }
958
959
  }, {
959
960
  key: "create",
960
961
  value: function create(e, t, i) {
961
962
  var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
962
963
  var o;
963
- var r = Me.createElements(e, t, i, s);
964
+ var r = ke.createElements(e, t, i, s);
964
965
  return v.fillEmptyMessageElement(r.bubbleElement, t), ie.apply(e, r.outerContainer), ne.flagHTMLUpdateClass(r.bubbleElement), e.applyCustomStyles(r, i, !1, (o = e.messageStyles) == null ? void 0 : o.html), r;
965
966
  }
966
967
  // prettier-ignore
@@ -973,13 +974,13 @@ var Me = /*#__PURE__*/function () {
973
974
  if (l) return l;
974
975
  r.status = !1;
975
976
  }
976
- var a = Me.create(e, t, i, o);
977
- return o || Me.addElement(e, a.outerContainer), a;
977
+ var a = ke.create(e, t, i, o);
978
+ return o || ke.addElement(e, a.outerContainer), a;
978
979
  }
979
980
  }]);
980
981
  }();
981
- Me.HTML_BUBBLE_CLASS = "html-message";
982
- var xe = Me;
982
+ ke.HTML_BUBBLE_CLASS = "html-message";
983
+ var we = ke;
983
984
  var mi;
984
985
  function _n(n) {
985
986
  return mi = mi || document.createElement("textarea"), mi.innerHTML = "&" + n + ";", mi.value;
@@ -1269,14 +1270,14 @@ Ss.prototype.render = function (n, e, t) {
1269
1270
  for (var i = this.rules, s = n.length, r = -1, o = ""; ++r < s;) n[r].type === "inline" ? o += this.renderInline(n[r].children, e, t) : o += i[n[r].type](n, r, e, t, this);
1270
1271
  return o;
1271
1272
  };
1272
- function ce() {
1273
+ function de() {
1273
1274
  this.__rules__ = [], this.__cache__ = null;
1274
1275
  }
1275
- ce.prototype.__find__ = function (n) {
1276
+ de.prototype.__find__ = function (n) {
1276
1277
  for (var e = this.__rules__.length, t = -1; e--;) if (this.__rules__[++t].name === n) return t;
1277
1278
  return -1;
1278
1279
  };
1279
- ce.prototype.__compile__ = function () {
1280
+ de.prototype.__compile__ = function () {
1280
1281
  var n = this,
1281
1282
  e = [""];
1282
1283
  n.__rules__.forEach(function (t) {
@@ -1289,13 +1290,13 @@ ce.prototype.__compile__ = function () {
1289
1290
  });
1290
1291
  });
1291
1292
  };
1292
- ce.prototype.at = function (n, e, t) {
1293
+ de.prototype.at = function (n, e, t) {
1293
1294
  var i = this.__find__(n),
1294
1295
  s = t || {};
1295
1296
  if (i === -1) throw new Error("Parser rule not found: " + n);
1296
1297
  this.__rules__[i].fn = e, this.__rules__[i].alt = s.alt || [], this.__cache__ = null;
1297
1298
  };
1298
- ce.prototype.before = function (n, e, t, i) {
1299
+ de.prototype.before = function (n, e, t, i) {
1299
1300
  var s = this.__find__(n),
1300
1301
  r = i || {};
1301
1302
  if (s === -1) throw new Error("Parser rule not found: " + n);
@@ -1306,7 +1307,7 @@ ce.prototype.before = function (n, e, t, i) {
1306
1307
  alt: r.alt || []
1307
1308
  }), this.__cache__ = null;
1308
1309
  };
1309
- ce.prototype.after = function (n, e, t, i) {
1310
+ de.prototype.after = function (n, e, t, i) {
1310
1311
  var s = this.__find__(n),
1311
1312
  r = i || {};
1312
1313
  if (s === -1) throw new Error("Parser rule not found: " + n);
@@ -1317,7 +1318,7 @@ ce.prototype.after = function (n, e, t, i) {
1317
1318
  alt: r.alt || []
1318
1319
  }), this.__cache__ = null;
1319
1320
  };
1320
- ce.prototype.push = function (n, e, t) {
1321
+ de.prototype.push = function (n, e, t) {
1321
1322
  var i = t || {};
1322
1323
  this.__rules__.push({
1323
1324
  name: n,
@@ -1326,7 +1327,7 @@ ce.prototype.push = function (n, e, t) {
1326
1327
  alt: i.alt || []
1327
1328
  }), this.__cache__ = null;
1328
1329
  };
1329
- ce.prototype.enable = function (n, e) {
1330
+ de.prototype.enable = function (n, e) {
1330
1331
  n = Array.isArray(n) ? n : [n], e && this.__rules__.forEach(function (t) {
1331
1332
  t.enabled = !1;
1332
1333
  }), n.forEach(function (t) {
@@ -1335,14 +1336,14 @@ ce.prototype.enable = function (n, e) {
1335
1336
  this.__rules__[i].enabled = !0;
1336
1337
  }, this), this.__cache__ = null;
1337
1338
  };
1338
- ce.prototype.disable = function (n) {
1339
+ de.prototype.disable = function (n) {
1339
1340
  n = Array.isArray(n) ? n : [n], n.forEach(function (e) {
1340
1341
  var t = this.__find__(e);
1341
1342
  if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
1342
1343
  this.__rules__[t].enabled = !1;
1343
1344
  }, this), this.__cache__ = null;
1344
1345
  };
1345
- ce.prototype.getRules = function (n) {
1346
+ de.prototype.getRules = function (n) {
1346
1347
  return this.__cache__ === null && this.__compile__(), this.__cache__[n] || [];
1347
1348
  };
1348
1349
  function rr(n) {
@@ -1662,7 +1663,7 @@ function Er(n) {
1662
1663
  }
1663
1664
  var Yi = [["block", rr], ["abbr", ar], ["references", cr], ["inline", dr], ["footnote_tail", hr], ["abbr2", ur], ["replacements", br], ["smartquotes", Er]];
1664
1665
  function Mn() {
1665
- this.options = {}, this.ruler = new ce();
1666
+ this.options = {}, this.ruler = new de();
1666
1667
  for (var n = 0; n < Yi.length; n++) this.ruler.push(Yi[n][0], Yi[n][1]);
1667
1668
  }
1668
1669
  Mn.prototype.process = function (n) {
@@ -1854,7 +1855,7 @@ function Cr(n, e, t, i) {
1854
1855
  y,
1855
1856
  R,
1856
1857
  B,
1857
- Te,
1858
+ Re,
1858
1859
  N,
1859
1860
  re = !0,
1860
1861
  oe,
@@ -1867,11 +1868,11 @@ function Cr(n, e, t, i) {
1867
1868
  for (R = n.tokens.length, g ? (d = n.bMarks[e] + n.tShift[e], m = Number(n.src.substr(d, u - d - 1)), n.tokens.push({
1868
1869
  type: "ordered_list_open",
1869
1870
  order: m,
1870
- lines: Te = [e, 0],
1871
+ lines: Re = [e, 0],
1871
1872
  level: n.level++
1872
1873
  })) : n.tokens.push({
1873
1874
  type: "bullet_list_open",
1874
- lines: Te = [e, 0],
1875
+ lines: Re = [e, 0],
1875
1876
  level: n.level++
1876
1877
  }), s = e, B = !1, oe = n.parser.ruler.getRules("list"); s < t && (y = n.skipSpaces(u), h = n.eMarks[s], y >= h ? f = 1 : f = y - u, f > 4 && (f = 1), f < 1 && (f = 1), r = u - n.bMarks[s] + f, n.tokens.push({
1877
1878
  type: "list_item_open",
@@ -1894,7 +1895,7 @@ function Cr(n, e, t, i) {
1894
1895
  return n.tokens.push({
1895
1896
  type: g ? "ordered_list_close" : "bullet_list_close",
1896
1897
  level: --n.level
1897
- }), Te[1] = s, n.line = s, re && Ar(n, R), !0;
1898
+ }), Re[1] = s, n.line = s, re && Ar(n, R), !0;
1898
1899
  }
1899
1900
  function Tr(n, e, t, i) {
1900
1901
  var s,
@@ -2176,7 +2177,7 @@ function Br(n, e) {
2176
2177
  }
2177
2178
  var bi = [["code", Sr], ["fences", _r, ["paragraph", "blockquote", "list"]], ["blockquote", xr, ["paragraph", "blockquote", "list"]], ["hr", wr, ["paragraph", "blockquote", "list"]], ["list", Cr, ["paragraph", "blockquote"]], ["footnote", Tr, ["paragraph"]], ["heading", Rr, ["paragraph", "blockquote"]], ["lheading", Mr], ["htmlblock", Or, ["paragraph", "blockquote"]], ["table", Pr, ["paragraph"]], ["deflist", Dr, ["paragraph"]], ["paragraph", Br]];
2178
2179
  function _s() {
2179
- this.ruler = new ce();
2180
+ this.ruler = new de();
2180
2181
  for (var n = 0; n < bi.length; n++) this.ruler.push(bi[n][0], bi[n][1], {
2181
2182
  alt: (bi[n][2] || []).slice()
2182
2183
  });
@@ -2661,7 +2662,7 @@ function Ao(n, e) {
2661
2662
  }
2662
2663
  var Qi = [["text", Hr], ["newline", zr], ["escape", Gr], ["backticks", Vr], ["del", Kr], ["ins", $r], ["mark", Wr], ["emphasis", Jr], ["sub", Yr], ["sup", Qr], ["links", eo], ["footnote_inline", to], ["footnote_ref", io], ["autolink", oo], ["htmltag", _o], ["entity", Ao]];
2663
2664
  function Vi() {
2664
- this.ruler = new ce();
2665
+ this.ruler = new de();
2665
2666
  for (var n = 0; n < Qi.length; n++) this.ruler.push(Qi[n][0], Qi[n][1]);
2666
2667
  this.validateLink = Co;
2667
2668
  }
@@ -2818,34 +2819,34 @@ var To = {
2818
2819
  function Ln(n, e, t) {
2819
2820
  this.src = e, this.env = t, this.options = n.options, this.tokens = [], this.inlineMode = !1, this.inline = n.inline, this.block = n.block, this.renderer = n.renderer, this.typographer = n.typographer;
2820
2821
  }
2821
- function we(n, e) {
2822
- typeof n != "string" && (e = n, n = "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 Vi(), this.block = new _s(), this.core = new Mn(), this.renderer = new Ss(), this.ruler = new ce(), this.options = {}, this.configure(ko[n]), this.set(e || {});
2822
+ function Ae(n, e) {
2823
+ typeof n != "string" && (e = n, n = "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 Vi(), this.block = new _s(), this.core = new Mn(), this.renderer = new Ss(), this.ruler = new de(), this.options = {}, this.configure(ko[n]), this.set(e || {});
2823
2824
  }
2824
- we.prototype.set = function (n) {
2825
+ Ae.prototype.set = function (n) {
2825
2826
  xn(this.options, n);
2826
2827
  };
2827
- we.prototype.configure = function (n) {
2828
+ Ae.prototype.configure = function (n) {
2828
2829
  var e = this;
2829
2830
  if (!n) throw new Error("Wrong `remarkable` preset, check name/content");
2830
2831
  n.options && e.set(n.options), n.components && Object.keys(n.components).forEach(function (t) {
2831
2832
  n.components[t].rules && e[t].ruler.enable(n.components[t].rules, !0);
2832
2833
  });
2833
2834
  };
2834
- we.prototype.use = function (n, e) {
2835
+ Ae.prototype.use = function (n, e) {
2835
2836
  return n(this, e), this;
2836
2837
  };
2837
- we.prototype.parse = function (n, e) {
2838
+ Ae.prototype.parse = function (n, e) {
2838
2839
  var t = new Ln(this, n, e);
2839
2840
  return this.core.process(t), t.tokens;
2840
2841
  };
2841
- we.prototype.render = function (n, e) {
2842
+ Ae.prototype.render = function (n, e) {
2842
2843
  return e = e || {}, this.renderer.render(this.parse(n, e), this.options, e);
2843
2844
  };
2844
- we.prototype.parseInline = function (n, e) {
2845
+ Ae.prototype.parseInline = function (n, e) {
2845
2846
  var t = new Ln(this, n, e);
2846
2847
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2847
2848
  };
2848
- we.prototype.renderInline = function (n, e) {
2849
+ Ae.prototype.renderInline = function (n, e) {
2849
2850
  return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
2850
2851
  };
2851
2852
  var ft = /*#__PURE__*/function () {
@@ -2855,10 +2856,10 @@ var ft = /*#__PURE__*/function () {
2855
2856
  return _createClass(ft, null, [{
2856
2857
  key: "instantiate",
2857
2858
  value: function instantiate(e) {
2858
- if (e) return new we(_objectSpread(_objectSpread({}, ft.DEFAULT_PROPERTIES), e));
2859
+ if (e) return new Ae(_objectSpread(_objectSpread({}, ft.DEFAULT_PROPERTIES), e));
2859
2860
  if (window.hljs) {
2860
2861
  var t = window.hljs;
2861
- return new we({
2862
+ return new Ae({
2862
2863
  highlight: function highlight(i, s) {
2863
2864
  if (s && t.getLanguage(s)) try {
2864
2865
  return t.highlight(i, {
@@ -2887,7 +2888,7 @@ var ft = /*#__PURE__*/function () {
2887
2888
  typographer: !0
2888
2889
  // Enable smartypants and other sweet transforms
2889
2890
  });
2890
- } else return new we(ft.DEFAULT_PROPERTIES);
2891
+ } else return new Ae(ft.DEFAULT_PROPERTIES);
2891
2892
  }
2892
2893
  }, {
2893
2894
  key: "createNew",
@@ -3008,7 +3009,7 @@ var U = /*#__PURE__*/function () {
3008
3009
  }, {
3009
3010
  key: "apply",
3010
3011
  value: function apply(e, t, i) {
3011
- Pe.setRing(t.bubbleElement, i == null ? void 0 : i.bubble), i != null && i.bubble && (i = JSON.parse(JSON.stringify(i)), delete i.bubble), e.applyCustomStyles(t, "history", !1, i);
3012
+ Ne.setRing(t.bubbleElement, i == null ? void 0 : i.bubble), i != null && i.bubble && (i = JSON.parse(JSON.stringify(i)), delete i.bubble), e.applyCustomStyles(t, "history", !1, i);
3012
3013
  }
3013
3014
  }, {
3014
3015
  key: "addLoadHistoryMessage",
@@ -3035,7 +3036,7 @@ var U = /*#__PURE__*/function () {
3035
3036
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
3036
3037
  var r, o, a, l;
3037
3038
  var i = (l = (a = (o = (r = e.messageStyles) == null ? void 0 : r.loading) == null ? void 0 : o.history) == null ? void 0 : a.full) == null ? void 0 : l.html,
3038
- s = i ? xe.createElements(e, i, v.AI_ROLE, !0) : U.createDefaultElements(e);
3039
+ s = i ? we.createElements(e, i, v.AI_ROLE, !0) : U.createDefaultElements(e);
3039
3040
  return U.addLoadHistoryMessage(s, e, t), s;
3040
3041
  }
3041
3042
  }, {
@@ -3060,7 +3061,7 @@ var U = /*#__PURE__*/function () {
3060
3061
  }]);
3061
3062
  }();
3062
3063
  U.CLASS = "loading-history-message", U.FULL_VIEW_CLASS = "loading-history-message-full-view", U.SMALL_CLASS = "loading-history-message-small";
3063
- var De = U;
3064
+ var Be = U;
3064
3065
  var Yt = /*#__PURE__*/function () {
3065
3066
  function Yt() {
3066
3067
  _classCallCheck(this, Yt);
@@ -3197,7 +3198,7 @@ var te = /*#__PURE__*/function () {
3197
3198
  var r;
3198
3199
  (r = this._introPanel) == null || r.hide();
3199
3200
  var s = this.messageElementRefs[this.messageElementRefs.length - 1];
3200
- return De.changeFullViewToSmall(this), te.isTemporaryElement(s) && (this.revealRoleElementsIfTempRemoved(s, t), this.removeLastMessage()), this.createMessageElements(e, t, i);
3201
+ return Be.changeFullViewToSmall(this), te.isTemporaryElement(s) && (this.revealRoleElementsIfTempRemoved(s, t), this.removeLastMessage()), this.createMessageElements(e, t, i);
3201
3202
  }
3202
3203
  // this can be tested by having an ai message, then a temp ai message with html that submits new user message:
3203
3204
  // https://github.com/OvidijusParsiunas/deep-chat/issues/258
@@ -3205,7 +3206,7 @@ var te = /*#__PURE__*/function () {
3205
3206
  }, {
3206
3207
  key: "revealRoleElementsIfTempRemoved",
3207
3208
  value: function revealRoleElementsIfTempRemoved(e, t) {
3208
- if ((this.avatars || this.names) && Ne.isElementTemporary(e)) {
3209
+ if ((this.avatars || this.names) && De.isElementTemporary(e)) {
3209
3210
  var i = this.messageElementRefs[this.messageElementRefs.length - 2];
3210
3211
  i && this.messageToElements.length > 0 && !e.bubbleElement.classList.contains(v.getRoleClass(t)) && v.revealRoleElements(i.innerContainer, !!this.avatars, !!this.names);
3211
3212
  }
@@ -3292,7 +3293,7 @@ var te = /*#__PURE__*/function () {
3292
3293
  }, {
3293
3294
  key: "isTemporaryElement",
3294
3295
  value: function isTemporaryElement(e) {
3295
- return te.isLoadingMessage(e) || Ne.isElementTemporary(e);
3296
+ return te.isLoadingMessage(e) || De.isElementTemporary(e);
3296
3297
  }
3297
3298
  }, {
3298
3299
  key: "createBaseElements",
@@ -3313,23 +3314,23 @@ var te = /*#__PURE__*/function () {
3313
3314
  var t = e.text,
3314
3315
  i = e.files,
3315
3316
  s = e.html,
3316
- r = e._sessionId,
3317
- o = e.role,
3318
- a = e.custom,
3317
+ r = e.custom,
3318
+ o = e._sessionId,
3319
+ a = e.role,
3319
3320
  l = {
3320
- role: o || v.AI_ROLE
3321
+ role: a || v.AI_ROLE
3321
3322
  };
3322
- return t && (l.text = t), i && (l.files = i), s && (l.html = s), !t && !i && !s && (l.text = ""), a && (l.custom = a), r && (l._sessionId = r), l;
3323
+ return t && (l.text = t), i && (l.files = i), s && (l.html = s), !t && !i && !s && (l.text = ""), r && (l.custom = r), o && (l._sessionId = o), l;
3323
3324
  }
3324
3325
  }, {
3325
3326
  key: "isLoadingMessage",
3326
3327
  value: function isLoadingMessage(e) {
3327
- return e == null ? void 0 : e.bubbleElement.classList.contains(Pe.BUBBLE_CLASS);
3328
+ return e == null ? void 0 : e.bubbleElement.classList.contains(Ne.BUBBLE_CLASS);
3328
3329
  }
3329
3330
  }]);
3330
3331
  }();
3331
3332
  te.TEXT_BUBBLE_CLASS = "text-message", te.INTRO_CLASS = "deep-chat-intro", te.LAST_GROUP_MESSAGES_ACTIVE = "deep-chat-last-group-messages-active";
3332
- var fe = te;
3333
+ var pe = te;
3333
3334
  var $s = "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",
3334
3335
  ns = "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==",
3335
3336
  Y = /*#__PURE__*/function () {
@@ -3396,20 +3397,20 @@ var $s = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
3396
3397
  }();
3397
3398
  Y.CONTAINER_CLASS = "avatar-container";
3398
3399
  var Kt = Y;
3399
- var Se = /*#__PURE__*/function () {
3400
- function Se() {
3401
- _classCallCheck(this, Se);
3400
+ var xe = /*#__PURE__*/function () {
3401
+ function xe() {
3402
+ _classCallCheck(this, xe);
3402
3403
  }
3403
- return _createClass(Se, null, [{
3404
+ return _createClass(xe, null, [{
3404
3405
  key: "hide",
3405
3406
  value: function hide(e) {
3406
3407
  var t;
3407
- (t = e.getElementsByClassName(Se.NAME_CLASS)[0].style).visibility || (t.visibility = "hidden");
3408
+ (t = e.getElementsByClassName(xe.NAME_CLASS)[0].style).visibility || (t.visibility = "hidden");
3408
3409
  }
3409
3410
  }, {
3410
3411
  key: "reveal",
3411
3412
  value: function reveal(e) {
3412
- e.getElementsByClassName(Se.NAME_CLASS)[0].style.visibility = "";
3413
+ e.getElementsByClassName(xe.NAME_CLASS)[0].style.visibility = "";
3413
3414
  }
3414
3415
  }, {
3415
3416
  key: "getPosition",
@@ -3434,20 +3435,20 @@ var Se = /*#__PURE__*/function () {
3434
3435
  key: "createName",
3435
3436
  value: function createName(e, t) {
3436
3437
  var i = document.createElement("div");
3437
- return i.classList.add(Se.NAME_CLASS), i.textContent = Se.getNameText(e, t), Se.applyStyle(i, e, t), i;
3438
+ return i.classList.add(xe.NAME_CLASS), i.textContent = xe.getNameText(e, t), xe.applyStyle(i, e, t), i;
3438
3439
  }
3439
3440
  }, {
3440
3441
  key: "add",
3441
3442
  value: function add(e, t, i) {
3442
3443
  var s = typeof i == "boolean" ? {} : i,
3443
- r = Se.createName(t, s),
3444
- o = Se.getPosition(t, s);
3444
+ r = xe.createName(t, s),
3445
+ o = xe.getPosition(t, s);
3445
3446
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
3446
3447
  }
3447
3448
  }]);
3448
3449
  }();
3449
- Se.NAME_CLASS = "name";
3450
- var $t = Se;
3450
+ xe.NAME_CLASS = "name";
3451
+ var $t = xe;
3451
3452
  var _ = /*#__PURE__*/function () {
3452
3453
  function _() {
3453
3454
  _classCallCheck(this, _);
@@ -3493,7 +3494,7 @@ var _ = /*#__PURE__*/function () {
3493
3494
  }, {
3494
3495
  key: "overwriteMessage",
3495
3496
  value: function overwriteMessage(e, t, i, s, r, o) {
3496
- var a = _.getLastElementsByClass(t, [_.getRoleClass(s), o], [Pe.BUBBLE_CLASS]),
3497
+ var a = _.getLastElementsByClass(t, [_.getRoleClass(s), o], [Ne.BUBBLE_CLASS]),
3497
3498
  l = _.getLastMessage(e, s, r);
3498
3499
  return l && (l[r] = i), a;
3499
3500
  }
@@ -3581,16 +3582,17 @@ var _ = /*#__PURE__*/function () {
3581
3582
  key: "generateMessageBodyElements",
3582
3583
  value: function generateMessageBodyElements(e, t) {
3583
3584
  var i = {};
3584
- return e.text && (i.text = _.findMessageElements(t, fe.TEXT_BUBBLE_CLASS)), e.html && (i.html = _.findMessageElements(t, xe.HTML_BUBBLE_CLASS)), e.files && (i.files = _.filterdMessageElements(t, V.FILE_BUBBLE_CLASS)), i;
3585
+ return e.text && (i.text = _.findMessageElements(t, pe.TEXT_BUBBLE_CLASS)), e.html && (i.html = _.findMessageElements(t, we.HTML_BUBBLE_CLASS)), e.files && (i.files = _.filterdMessageElements(t, V.FILE_BUBBLE_CLASS)), i;
3585
3586
  }
3586
3587
  }, {
3587
3588
  key: "generateMessageBody",
3588
3589
  value: function generateMessageBody(e, t) {
3589
- var i = _.getNumberOfElements(e),
3590
- s = t.slice(t.length - i);
3591
- return _.generateMessageBodyElements(e, s);
3590
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
3591
+ var s = _.getNumberOfElements(e),
3592
+ r = i ? t.slice(0, s) : t.slice(t.length - s);
3593
+ return _.generateMessageBodyElements(e, r);
3592
3594
  }
3593
- // if role not present - traverse all
3595
+ // if role not present - traverse all, if present - traverse last messages
3594
3596
  }, {
3595
3597
  key: "classifyRoleMessages",
3596
3598
  value: function classifyRoleMessages(e, t) {
@@ -3655,7 +3657,7 @@ var pt = /*#__PURE__*/function () {
3655
3657
  }, {
3656
3658
  key: "setInitialState",
3657
3659
  value: function setInitialState(e, t, i) {
3658
- this._streamType = e, i !== null && i !== void 0 ? i : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : xe.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(pt.MESSAGE_CLASS), this._activeMessageRole = i, this._message = _defineProperty({
3660
+ this._streamType = e, i !== null && i !== void 0 ? i : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : we.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(pt.MESSAGE_CLASS), this._activeMessageRole = i, this._message = _defineProperty({
3659
3661
  role: this._activeMessageRole
3660
3662
  }, e, t), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]);
3661
3663
  }
@@ -3684,7 +3686,7 @@ var pt = /*#__PURE__*/function () {
3684
3686
  var e;
3685
3687
  if (!(this._endStreamAfterOperation || !this._message) && !(this._fileAdded && !this._elements)) {
3686
3688
  if (!this._elements) throw Error(k.NO_VALID_STREAM_EVENTS_SENT);
3687
- (e = this._elements.bubbleElement) != null && e.classList.contains(pt.MESSAGE_CLASS) && (this._streamType === "text" ? this._messages.textToSpeech && vt.speak(this._message.text || "", this._messages.textToSpeech) : this._streamType === "html" && this._elements && ie.apply(this._messages, this._elements.outerContainer), this._elements.bubbleElement.classList.remove(pt.MESSAGE_CLASS), this._message && this._messages.sendClientUpdate(fe.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3689
+ (e = this._elements.bubbleElement) != null && e.classList.contains(pt.MESSAGE_CLASS) && (this._streamType === "text" ? this._messages.textToSpeech && vt.speak(this._message.text || "", this._messages.textToSpeech) : this._streamType === "html" && this._elements && ie.apply(this._messages, this._elements.outerContainer), this._elements.bubbleElement.classList.remove(pt.MESSAGE_CLASS), this._message && this._messages.sendClientUpdate(pe.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3688
3690
  }
3689
3691
  }
3690
3692
  }, {
@@ -3730,12 +3732,12 @@ var pt = /*#__PURE__*/function () {
3730
3732
  }]);
3731
3733
  }();
3732
3734
  pt.MESSAGE_CLASS = "streamed-message";
3733
- var Ae = pt;
3734
- var Fe = /*#__PURE__*/function () {
3735
- function Fe() {
3736
- _classCallCheck(this, Fe);
3735
+ var Ce = pt;
3736
+ var Ue = /*#__PURE__*/function () {
3737
+ function Ue() {
3738
+ _classCallCheck(this, Ue);
3737
3739
  }
3738
- return _createClass(Fe, null, [{
3740
+ return _createClass(Ue, null, [{
3739
3741
  key: "tempRemoveContentHeader",
3740
3742
  value: // need to pass stringifyBody boolean separately as binding is throwing an error for some reason
3741
3743
  // prettier-ignore
@@ -3751,8 +3753,8 @@ var Fe = /*#__PURE__*/function () {
3751
3753
  }
3752
3754
  throw new Error("Request settings have not been set up");
3753
3755
  case 2:
3754
- s = e.headers[Fe.CONTENT_TYPE];
3755
- delete e.headers[Fe.CONTENT_TYPE];
3756
+ s = e.headers[Ue.CONTENT_TYPE];
3757
+ delete e.headers[Ue.CONTENT_TYPE];
3756
3758
  _context3.prev = 4;
3757
3759
  _context3.next = 7;
3758
3760
  return t(i);
@@ -3763,9 +3765,9 @@ var Fe = /*#__PURE__*/function () {
3763
3765
  case 10:
3764
3766
  _context3.prev = 10;
3765
3767
  _context3.t0 = _context3["catch"](4);
3766
- throw e.headers[Fe.CONTENT_TYPE] = s, _context3.t0;
3768
+ throw e.headers[Ue.CONTENT_TYPE] = s, _context3.t0;
3767
3769
  case 13:
3768
- return _context3.abrupt("return", (e.headers[Fe.CONTENT_TYPE] = s, r));
3770
+ return _context3.abrupt("return", (e.headers[Ue.CONTENT_TYPE] = s, r));
3769
3771
  case 14:
3770
3772
  case "end":
3771
3773
  return _context3.stop();
@@ -3909,7 +3911,7 @@ var Fe = /*#__PURE__*/function () {
3909
3911
  }
3910
3912
  if (r) {
3911
3913
  d = k.INVALID_RESPONSE(t, "response", !!a, l);
3912
- Fe.displayError(e, d);
3914
+ Ue.displayError(e, d);
3913
3915
  }
3914
3916
  return _context5.abrupt("return");
3915
3917
  case 17:
@@ -3927,8 +3929,8 @@ var Fe = /*#__PURE__*/function () {
3927
3929
  }()
3928
3930
  }]);
3929
3931
  }();
3930
- Fe.CONTENT_TYPE = "Content-Type";
3931
- var E = Fe;
3932
+ Ue.CONTENT_TYPE = "Content-Type";
3933
+ var E = Ue;
3932
3934
  function Lo(_x16, _x17) {
3933
3935
  return _Lo.apply(this, arguments);
3934
3936
  }
@@ -4061,7 +4063,7 @@ function Bo(n, e) {
4061
4063
  R(), u();
4062
4064
  });
4063
4065
  var B = c !== null && c !== void 0 ? c : window.fetch,
4064
- Te = s !== null && s !== void 0 ? s : Fo;
4066
+ Re = s !== null && s !== void 0 ? s : Fo;
4065
4067
  function N() {
4066
4068
  return _N.apply(this, arguments);
4067
4069
  }
@@ -4081,7 +4083,7 @@ function Bo(n, e) {
4081
4083
  case 4:
4082
4084
  oe = _context6.sent;
4083
4085
  _context6.next = 7;
4084
- return Te(oe);
4086
+ return Re(oe);
4085
4087
  case 7:
4086
4088
  _context6.next = 9;
4087
4089
  return Lo(oe.body, Io(Oo(function (z) {
@@ -4135,7 +4137,7 @@ var M = /*#__PURE__*/function () {
4135
4137
  y,
4136
4138
  R,
4137
4139
  B,
4138
- Te,
4140
+ Re,
4139
4141
  o,
4140
4142
  _yield$E$processReque,
4141
4143
  a,
@@ -4178,19 +4180,19 @@ var M = /*#__PURE__*/function () {
4178
4180
  _context9.next = 17;
4179
4181
  break;
4180
4182
  }
4181
- return _context9.abrupt("return", ye.stream(e, a, i));
4183
+ return _context9.abrupt("return", Se.stream(e, a, i));
4182
4184
  case 17:
4183
- if (!(((y = e.connectSettings) == null ? void 0 : y.url) === Ee.URL)) {
4185
+ if (!(((y = e.connectSettings) == null ? void 0 : y.url) === _e.URL)) {
4184
4186
  _context9.next = 19;
4185
4187
  break;
4186
4188
  }
4187
- return _context9.abrupt("return", Ee.requestStream(i, e));
4189
+ return _context9.abrupt("return", _e.requestStream(i, e));
4188
4190
  case 19:
4189
- f = new Ae(i), m = E.fetch.bind(this, e, l, s);
4191
+ f = new Ce(i), m = E.fetch.bind(this, e, l, s);
4190
4192
  return _context9.abrupt("return", (Bo(((R = e.connectSettings) == null ? void 0 : R.url) || e.url || "", {
4191
4193
  method: ((B = e.connectSettings) == null ? void 0 : B.method) || "POST",
4192
4194
  headers: l,
4193
- credentials: (Te = e.connectSettings) == null ? void 0 : Te.credentials,
4195
+ credentials: (Re = e.connectSettings) == null ? void 0 : Re.credentials,
4194
4196
  body: s ? JSON.stringify(a) : a,
4195
4197
  openWhenHidden: !0,
4196
4198
  // keep stream open when browser tab not open
@@ -4325,12 +4327,12 @@ var M = /*#__PURE__*/function () {
4325
4327
  if (i.text) {
4326
4328
  t.onOpen();
4327
4329
  _o2 = i.text.split("");
4328
- M.populateMessages(e, _o2, new Ae(e), r, "text", 0, s);
4330
+ M.populateMessages(e, _o2, new Ce(e), r, "text", 0, s);
4329
4331
  }
4330
4332
  if (i.html) {
4331
4333
  t.onOpen();
4332
4334
  _o3 = ie.splitHTML(i.html);
4333
- _o3.length === 0 && (_o3 = i.html.split("")), M.populateMessages(e, _o3, new Ae(e), r, "html", 0, s);
4335
+ _o3.length === 0 && (_o3 = i.html.split("")), M.populateMessages(e, _o3, new Ce(e), r, "html", 0, s);
4334
4336
  }
4335
4337
  case 12:
4336
4338
  case "end":
@@ -4493,7 +4495,7 @@ var et = /*#__PURE__*/function () {
4493
4495
  }]);
4494
4496
  }();
4495
4497
  et.URL = "deep-chat-demo";
4496
- var Ee = et;
4498
+ var _e = et;
4497
4499
  var G = /*#__PURE__*/function () {
4498
4500
  function G() {
4499
4501
  _classCallCheck(this, G);
@@ -4516,7 +4518,7 @@ var G = /*#__PURE__*/function () {
4516
4518
  if (!G.isElementPresentInDOM(e.deepChat)) return;
4517
4519
  var i = e.connectSettings.websocket;
4518
4520
  if (i) {
4519
- if (e.connectSettings.handler) return ye.websocket(e, t);
4521
+ if (e.connectSettings.handler) return Se.websocket(e, t);
4520
4522
  try {
4521
4523
  var s = typeof i != "boolean" ? i : void 0,
4522
4524
  r = new WebSocket(e.connectSettings.url || "", s);
@@ -4612,11 +4614,11 @@ var G = /*#__PURE__*/function () {
4612
4614
  while (1) switch (_context14.prev = _context14.next) {
4613
4615
  case 0:
4614
4616
  s = _args14.length > 3 && _args14[3] !== undefined ? _args14[3] : !0;
4615
- if (!(((d = e.connectSettings) == null ? void 0 : d.url) === Ee.URL)) {
4617
+ if (!(((d = e.connectSettings) == null ? void 0 : d.url) === _e.URL)) {
4616
4618
  _context14.next = 3;
4617
4619
  break;
4618
4620
  }
4619
- return _context14.abrupt("return", Ee.request(e, i));
4621
+ return _context14.abrupt("return", _e.request(e, i));
4620
4622
  case 3:
4621
4623
  r = e.websocket;
4622
4624
  if (!(!r || r === "pending")) {
@@ -4680,16 +4682,16 @@ var G = /*#__PURE__*/function () {
4680
4682
  var _i$o;
4681
4683
  var o = s.role || v.AI_ROLE,
4682
4684
  a = i[o];
4683
- s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new Ae(t), i[o].upsertStreamedMessage(s));
4685
+ s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new Ce(t), i[o].upsertStreamedMessage(s));
4684
4686
  } else M.simulate(t, e.streamHandlers, s);
4685
4687
  }
4686
4688
  }]);
4687
4689
  }();
4688
- var ye = /*#__PURE__*/function () {
4689
- function ye() {
4690
- _classCallCheck(this, ye);
4690
+ var Se = /*#__PURE__*/function () {
4691
+ function Se() {
4692
+ _classCallCheck(this, Se);
4691
4693
  }
4692
- return _createClass(ye, null, [{
4694
+ return _createClass(Se, null, [{
4693
4695
  key: "request",
4694
4696
  value: function () {
4695
4697
  var _request2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(e, t, i) {
@@ -4735,7 +4737,7 @@ var ye = /*#__PURE__*/function () {
4735
4737
  return function r(_x39) {
4736
4738
  return _ref6.apply(this, arguments);
4737
4739
  };
4738
- }(), o = ye.generateOptionalSignals();
4740
+ }(), o = Se.generateOptionalSignals();
4739
4741
  (l = (a = e.connectSettings).handler) == null || l.call(a, t, _objectSpread(_objectSpread({}, o), {}, {
4740
4742
  onResponse: r
4741
4743
  }));
@@ -4755,7 +4757,7 @@ var ye = /*#__PURE__*/function () {
4755
4757
  value: function attemptToFinaliseStream(e, t) {
4756
4758
  try {
4757
4759
  var i = t.messageElementRefs[t.messageElementRefs.length - 1];
4758
- fe.isLoadingMessage(i) ? t.removeLastMessage() : e.finaliseStreamedMessage();
4760
+ pe.isLoadingMessage(i) ? t.removeLastMessage() : e.finaliseStreamedMessage();
4759
4761
  } catch (i) {
4760
4762
  console.error(i), t.addNewErrorMessage("service", i);
4761
4763
  }
@@ -4767,12 +4769,12 @@ var ye = /*#__PURE__*/function () {
4767
4769
  var u, h;
4768
4770
  var s = !0,
4769
4771
  r = !1;
4770
- var o = new Ae(i),
4772
+ var o = new Ce(i),
4771
4773
  a = function a() {
4772
4774
  r || !s || (e.streamHandlers.onOpen(), r = !0);
4773
4775
  },
4774
4776
  l = function l() {
4775
- s && (ye.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
4777
+ s && (Se.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
4776
4778
  },
4777
4779
  c = /*#__PURE__*/function () {
4778
4780
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(f) {
@@ -4793,9 +4795,9 @@ var ye = /*#__PURE__*/function () {
4793
4795
  });
4794
4796
  case 4:
4795
4797
  m = _context17.sent;
4796
- if (m) m.error ? (ye.streamError(m.error, o, e, i), s = !1) : M.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m);else {
4798
+ if (m) m.error ? (Se.streamError(m.error, o, e, i), s = !1) : M.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m);else {
4797
4799
  p = k.INVALID_RESPONSE(f, "server", !!e.deepChat.responseInterceptor, m);
4798
- ye.streamError(p, o, e, i), s = !1;
4800
+ Se.streamError(p, o, e, i), s = !1;
4799
4801
  }
4800
4802
  case 6:
4801
4803
  case "end":
@@ -4808,9 +4810,9 @@ var ye = /*#__PURE__*/function () {
4808
4810
  };
4809
4811
  }();
4810
4812
  e.streamHandlers.abortStream.abort = function () {
4811
- ye.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1;
4813
+ Se.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1;
4812
4814
  };
4813
- var d = ye.generateOptionalSignals();
4815
+ var d = Se.generateOptionalSignals();
4814
4816
  (h = (u = e.connectSettings).handler) == null || h.call(u, t, _objectSpread(_objectSpread({}, d), {}, {
4815
4817
  onOpen: a,
4816
4818
  onResponse: c,
@@ -4883,7 +4885,7 @@ var ye = /*#__PURE__*/function () {
4883
4885
  return _ref8.apply(this, arguments);
4884
4886
  };
4885
4887
  }(),
4886
- a = ye.generateOptionalSignals();
4888
+ a = Se.generateOptionalSignals();
4887
4889
  (c = (l = e.connectSettings).handler) == null || c.call(l, void 0, _objectSpread(_objectSpread({}, a), {}, {
4888
4890
  onOpen: s,
4889
4891
  onResponse: o,
@@ -4955,13 +4957,13 @@ var T = /*#__PURE__*/function () {
4955
4957
  _context20.next = 13;
4956
4958
  break;
4957
4959
  }
4958
- return _context20.abrupt("return", ye.request(e, o, i));
4960
+ return _context20.abrupt("return", Se.request(e, o, i));
4959
4961
  case 13:
4960
- if (!(((m = e.connectSettings) == null ? void 0 : m.url) === Ee.URL)) {
4962
+ if (!(((m = e.connectSettings) == null ? void 0 : m.url) === _e.URL)) {
4961
4963
  _context20.next = 15;
4962
4964
  break;
4963
4965
  }
4964
- return _context20.abrupt("return", Ee.request(e, i));
4966
+ return _context20.abrupt("return", _e.request(e, i));
4965
4967
  case 15:
4966
4968
  d = !0;
4967
4969
  u = E.fetch.bind(this, e, a, s);
@@ -5159,12 +5161,12 @@ var T = /*#__PURE__*/function () {
5159
5161
  }
5160
5162
  }]);
5161
5163
  }();
5162
- var Ue = /*#__PURE__*/function () {
5163
- function Ue(e, t, i) {
5164
- _classCallCheck(this, Ue);
5164
+ var je = /*#__PURE__*/function () {
5165
+ function je(e, t, i) {
5166
+ _classCallCheck(this, je);
5165
5167
  this._isLoading = !1, this._isPaginationComplete = !1, this._index = 0, this._messages = t, i.fetchHistory && this.fetchHistory(i.fetchHistory), e.loadHistory && this.setupLoadHistoryOnScroll(e.loadHistory), this.setupInitialHistory(e);
5166
5168
  }
5167
- return _createClass(Ue, [{
5169
+ return _createClass(je, [{
5168
5170
  key: "fetchHistory",
5169
5171
  value: function () {
5170
5172
  var _fetchHistory = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(e) {
@@ -5173,12 +5175,12 @@ var Ue = /*#__PURE__*/function () {
5173
5175
  return _regeneratorRuntime().wrap(function _callee23$(_context23) {
5174
5176
  while (1) switch (_context23.prev = _context23.next) {
5175
5177
  case 0:
5176
- t = De.addMessage(this._messages);
5178
+ t = Be.addMessage(this._messages);
5177
5179
  _context23.next = 3;
5178
5180
  return e();
5179
5181
  case 3:
5180
5182
  i = _context23.sent;
5181
- this._messages.removeMessage(t), Ue.displayIntroMessages(this._messages.messageElementRefs), i.forEach(function (s) {
5183
+ this._messages.removeMessage(t), je.displayIntroMessages(this._messages.messageElementRefs), i.forEach(function (s) {
5182
5184
  return _this9._messages.addAnyMessage(s, !0);
5183
5185
  }), setTimeout(function () {
5184
5186
  return ee.scrollToBottom(_this9._messages.elementRef);
@@ -5204,7 +5206,7 @@ var Ue = /*#__PURE__*/function () {
5204
5206
  i = _this$_messages.messageToElements,
5205
5207
  s = _this$_messages.elementRef,
5206
5208
  r = (a = t.find(function (l) {
5207
- return !l.outerContainer.classList.contains(fe.INTRO_CLASS);
5209
+ return !l.outerContainer.classList.contains(pe.INTRO_CLASS);
5208
5210
  })) == null ? void 0 : a.outerContainer,
5209
5211
  o = s.scrollTop;
5210
5212
  e == null || e.reverse().map(function (l) {
@@ -5212,7 +5214,7 @@ var Ue = /*#__PURE__*/function () {
5212
5214
  sendUpdate: !0
5213
5215
  }), !0, !0);
5214
5216
  if (c) {
5215
- var d = v.generateMessageBody(c, t);
5217
+ var d = v.generateMessageBody(c, t, !0);
5216
5218
  i.unshift([c, d]);
5217
5219
  }
5218
5220
  return c;
@@ -5256,7 +5258,7 @@ var Ue = /*#__PURE__*/function () {
5256
5258
  break;
5257
5259
  }
5258
5260
  _this11._isLoading = !0;
5259
- t = De.addMessage(_this11._messages, !1);
5261
+ t = Be.addMessage(_this11._messages, !1);
5260
5262
  _context24.prev = 3;
5261
5263
  _context24.next = 6;
5262
5264
  return e(_this11._index++);
@@ -5268,7 +5270,7 @@ var Ue = /*#__PURE__*/function () {
5268
5270
  case 10:
5269
5271
  _context24.prev = 10;
5270
5272
  _context24.t0 = _context24["catch"](3);
5271
- _this11._messages.removeMessage(t), _this11._isPaginationComplete = !0, _this11._messages.addNewErrorMessage("service", Ue.FAILED_ERROR_MESSAGE, !0), console.error(_context24.t0);
5273
+ _this11._messages.removeMessage(t), _this11._isPaginationComplete = !0, _this11._messages.addNewErrorMessage("service", je.FAILED_ERROR_MESSAGE, !0), console.error(_context24.t0);
5272
5274
  case 13:
5273
5275
  case "end":
5274
5276
  return _context24.stop();
@@ -5304,7 +5306,7 @@ var Ue = /*#__PURE__*/function () {
5304
5306
  while (1) switch (_context26.prev = _context26.next) {
5305
5307
  case 0:
5306
5308
  this._isLoading = !0;
5307
- t = De.addMessage(this._messages);
5309
+ t = Be.addMessage(this._messages);
5308
5310
  _context26.prev = 2;
5309
5311
  _context26.next = 5;
5310
5312
  return e(this._index++);
@@ -5319,9 +5321,9 @@ var Ue = /*#__PURE__*/function () {
5319
5321
  case 10:
5320
5322
  _context26.prev = 10;
5321
5323
  _context26.t0 = _context26["catch"](2);
5322
- this._messages.removeMessage(t), this._isPaginationComplete = !0, this._messages.addNewErrorMessage("service", Ue.FAILED_ERROR_MESSAGE, !0), console.error(_context26.t0);
5324
+ this._messages.removeMessage(t), this._isPaginationComplete = !0, this._messages.addNewErrorMessage("service", je.FAILED_ERROR_MESSAGE, !0), console.error(_context26.t0);
5323
5325
  case 13:
5324
- Ue.displayIntroMessages(this._messages.messageElementRefs), this._isLoading = !1;
5326
+ je.displayIntroMessages(this._messages.messageElementRefs), this._isLoading = !1;
5325
5327
  case 14:
5326
5328
  case "end":
5327
5329
  return _context26.stop();
@@ -5359,20 +5361,20 @@ var Ue = /*#__PURE__*/function () {
5359
5361
  key: "addErrorPrefix",
5360
5362
  value: function addErrorPrefix(e) {
5361
5363
  var _e$permittedErrorPref;
5362
- (_e$permittedErrorPref = e.permittedErrorPrefixes) !== null && _e$permittedErrorPref !== void 0 ? _e$permittedErrorPref : e.permittedErrorPrefixes = [], e.permittedErrorPrefixes.push(Ue.FAILED_ERROR_MESSAGE);
5364
+ (_e$permittedErrorPref = e.permittedErrorPrefixes) !== null && _e$permittedErrorPref !== void 0 ? _e$permittedErrorPref : e.permittedErrorPrefixes = [], e.permittedErrorPrefixes.push(je.FAILED_ERROR_MESSAGE);
5363
5365
  }
5364
5366
  }, {
5365
5367
  key: "displayIntroMessages",
5366
5368
  value: function displayIntroMessages(e) {
5367
5369
  for (var t = 0; t < e.length; t += 1) {
5368
5370
  var i = e[0];
5369
- if (i.outerContainer.classList.contains(fe.INTRO_CLASS)) i.outerContainer.style.display = "";else break;
5371
+ if (i.outerContainer.classList.contains(pe.INTRO_CLASS)) i.outerContainer.style.display = "";else break;
5370
5372
  }
5371
5373
  }
5372
5374
  }]);
5373
5375
  }();
5374
- Ue.FAILED_ERROR_MESSAGE = "Failed to load history";
5375
- var ri = Ue;
5376
+ je.FAILED_ERROR_MESSAGE = "Failed to load history";
5377
+ var ri = je;
5376
5378
  var Et = /*#__PURE__*/function () {
5377
5379
  function Et() {
5378
5380
  _classCallCheck(this, Et);
@@ -5521,7 +5523,7 @@ var rt = /*#__PURE__*/function () {
5521
5523
  var _a$url;
5522
5524
  _classCallCheck(this, rt);
5523
5525
  var s, r, o, a, l;
5524
- this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = rt.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (s = e.connect) == null ? void 0 : s.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, F.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 = Ee.URL), this.connectSettings.websocket && G.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ne.checkForStream(this.deepChat), e.loadHistory && ri.addErrorPrefix(this);
5526
+ this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = rt.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (s = e.connect) == null ? void 0 : s.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, F.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 = _e.URL), this.connectSettings.websocket && G.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ne.checkForStream(this.deepChat), e.loadHistory && ri.addErrorPrefix(this);
5525
5527
  }
5526
5528
  return _createClass(rt, [{
5527
5529
  key: "verifyKey",
@@ -5651,7 +5653,7 @@ var rt = /*#__PURE__*/function () {
5651
5653
  s = _ref13[0];
5652
5654
  return s;
5653
5655
  }), this.maxMessages, this.totalMessagesMaxCharLength);
5654
- if (this.connectSettings.websocket && (!this.connectSettings.handler || this.connectSettings.url !== Ee.URL)) {
5656
+ if (this.connectSettings.websocket && (!this.connectSettings.handler || this.connectSettings.url !== _e.URL)) {
5655
5657
  s = _objectSpread({
5656
5658
  messages: i
5657
5659
  }, this.rawBody);
@@ -5806,19 +5808,19 @@ var Ai = /*#__PURE__*/function () {
5806
5808
  }
5807
5809
  }]);
5808
5810
  }();
5809
- var ke = /*#__PURE__*/function (_HTMLElement) {
5811
+ var Le = /*#__PURE__*/function (_HTMLElement) {
5810
5812
  // If this is not working, try using propertyName directly
5811
- function ke() {
5813
+ function Le() {
5812
5814
  var _this15;
5813
- _classCallCheck(this, ke);
5814
- _this15 = _callSuper(this, ke), _this15._waitingToRender_ = !1, _this15._propUpdated_ = !1, Object.keys(ke._attributeToProperty_).forEach(function (e) {
5815
- var t = ke._attributeToProperty_[e];
5815
+ _classCallCheck(this, Le);
5816
+ _this15 = _callSuper(this, Le), _this15._waitingToRender_ = !1, _this15._propUpdated_ = !1, Object.keys(Le._attributeToProperty_).forEach(function (e) {
5817
+ var t = Le._attributeToProperty_[e];
5816
5818
  _this15.constructPropertyAccessors(t), _this15.hasOwnProperty(e) || _this15.constructPropertyAccessors(t, e);
5817
5819
  });
5818
5820
  return _this15;
5819
5821
  }
5820
- _inherits(ke, _HTMLElement);
5821
- return _createClass(ke, [{
5822
+ _inherits(Le, _HTMLElement);
5823
+ return _createClass(Le, [{
5822
5824
  key: "constructPropertyAccessors",
5823
5825
  value:
5824
5826
  // need to be called here as accessors need to be set for the class instance
@@ -5837,8 +5839,8 @@ var ke = /*#__PURE__*/function (_HTMLElement) {
5837
5839
  key: "attributeChangedCallback",
5838
5840
  value: function attributeChangedCallback(e, t, i) {
5839
5841
  if (t === i) return;
5840
- var s = ke._attributes_[e](i),
5841
- r = ke._attributeToProperty_[e];
5842
+ var s = Le._attributes_[e](i),
5843
+ r = Le._attributeToProperty_[e];
5842
5844
  this[r] = s;
5843
5845
  }
5844
5846
  }, {
@@ -5847,12 +5849,12 @@ var ke = /*#__PURE__*/function (_HTMLElement) {
5847
5849
  }], [{
5848
5850
  key: "observedAttributes",
5849
5851
  get: function get() {
5850
- return Object.keys(ke._attributes_) || [];
5852
+ return Object.keys(Le._attributes_) || [];
5851
5853
  }
5852
5854
  }]);
5853
5855
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
5854
- ke._attributes_ = {}, ke._attributeToProperty_ = {};
5855
- var os = ke;
5856
+ Le._attributes_ = {}, Le._attributeToProperty_ = {};
5857
+ var os = Le;
5856
5858
  var Uo = "<?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",
5857
5859
  jo = "<?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";
5858
5860
  var $ = /*#__PURE__*/function () {
@@ -5866,16 +5868,16 @@ var $ = /*#__PURE__*/function () {
5866
5868
  }
5867
5869
  }]);
5868
5870
  }();
5869
- var je = /*#__PURE__*/function () {
5870
- function je() {
5871
- _classCallCheck(this, je);
5871
+ var qe = /*#__PURE__*/function () {
5872
+ function qe() {
5873
+ _classCallCheck(this, qe);
5872
5874
  }
5873
- return _createClass(je, null, [{
5875
+ return _createClass(qe, null, [{
5874
5876
  key: "changeVisibility",
5875
5877
  value:
5876
5878
  // prettier-ignore
5877
5879
  function changeVisibility(e, t, i, s) {
5878
- s.target.id === je.VISIBLE_ICON_ID ? (t.style.display = "none", i.style.display = "block", e.type = "password") : (t.style.display = "block", i.style.display = "none", e.type = "text");
5880
+ s.target.id === qe.VISIBLE_ICON_ID ? (t.style.display = "none", i.style.display = "block", e.type = "password") : (t.style.display = "block", i.style.display = "none", e.type = "text");
5879
5881
  }
5880
5882
  }, {
5881
5883
  key: "createIconElement",
@@ -5889,15 +5891,15 @@ var je = /*#__PURE__*/function () {
5889
5891
  value: function create(e) {
5890
5892
  var t = document.createElement("div");
5891
5893
  t.id = "visibility-icon-container";
5892
- var i = je.createIconElement(jo, je.VISIBLE_ICON_ID);
5894
+ var i = qe.createIconElement(jo, qe.VISIBLE_ICON_ID);
5893
5895
  i.style.display = "none", t.appendChild(i);
5894
- var s = je.createIconElement(Uo, "not-visible-icon");
5895
- return t.appendChild(s), t.onclick = je.changeVisibility.bind(this, e, i, s), t;
5896
+ var s = qe.createIconElement(Uo, "not-visible-icon");
5897
+ return t.appendChild(s), t.onclick = qe.changeVisibility.bind(this, e, i, s), t;
5896
5898
  }
5897
5899
  }]);
5898
5900
  }();
5899
- je.VISIBLE_ICON_ID = "visible-icon";
5900
- var as = je;
5901
+ qe.VISIBLE_ICON_ID = "visible-icon";
5902
+ var as = qe;
5901
5903
  var J = /*#__PURE__*/function () {
5902
5904
  function J() {
5903
5905
  _classCallCheck(this, J);
@@ -6508,7 +6510,7 @@ var Xs = {
6508
6510
  this.streamHandlers.abortStream.abort = function () {
6509
6511
  i.interruptGenerate();
6510
6512
  }, this.streamHandlers.onOpen();
6511
- s = new Ae(e);
6513
+ s = new Ce(e);
6512
6514
  _context40.next = 4;
6513
6515
  return i.generate(t, /*#__PURE__*/function () {
6514
6516
  var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee39(r, o) {
@@ -6847,8 +6849,8 @@ var Zt = /*#__PURE__*/function (_W) {
6847
6849
  }]);
6848
6850
  }(W);
6849
6851
  Zt.URL_PREFIX = "https://api-inference.huggingface.co/models/";
6850
- var Be = Zt;
6851
- var ui = /*#__PURE__*/function (_Be) {
6852
+ var Fe = Zt;
6853
+ var ui = /*#__PURE__*/function (_Fe) {
6852
6854
  // prettier-ignore
6853
6855
  function ui(e, t, i, s, r, o) {
6854
6856
  var _this23;
@@ -6856,7 +6858,7 @@ var ui = /*#__PURE__*/function (_Be) {
6856
6858
  _this23 = _callSuper(this, ui, [e, t, i, s, r, o]), _this23.isTextInputDisabled = !0, _this23.canSendMessage = ui.canSendFile;
6857
6859
  return _this23;
6858
6860
  }
6859
- _inherits(ui, _Be);
6861
+ _inherits(ui, _Fe);
6860
6862
  return _createClass(ui, [{
6861
6863
  key: "preprocessBody",
6862
6864
  value: function preprocessBody(e, t, i) {
@@ -6900,7 +6902,7 @@ var ui = /*#__PURE__*/function (_Be) {
6900
6902
  return !!(t != null && t[0]);
6901
6903
  }
6902
6904
  }]);
6903
- }(Be);
6905
+ }(Fe);
6904
6906
  var qo = /*#__PURE__*/function (_ui) {
6905
6907
  // prettier-ignore
6906
6908
  function qo(e) {
@@ -7001,11 +7003,11 @@ var Ho = /*#__PURE__*/function (_ui2) {
7001
7003
  }]);
7002
7004
  }(ui);
7003
7005
  var fi = "data:image/png;base64,";
7004
- var Ce = /*#__PURE__*/function () {
7005
- function Ce() {
7006
- _classCallCheck(this, Ce);
7006
+ var Te = /*#__PURE__*/function () {
7007
+ function Te() {
7008
+ _classCallCheck(this, Te);
7007
7009
  }
7008
- return _createClass(Ce, null, [{
7010
+ return _createClass(Te, null, [{
7009
7011
  key: "buildHeaders",
7010
7012
  value: function buildHeaders(e) {
7011
7013
  return {
@@ -7025,7 +7027,7 @@ var Ce = /*#__PURE__*/function () {
7025
7027
  return {
7026
7028
  url: "https://api.stability.ai/v1/engines/list",
7027
7029
  method: "GET",
7028
- handleVerificationResult: Ce.handleVerificationResult
7030
+ handleVerificationResult: Te.handleVerificationResult
7029
7031
  };
7030
7032
  }
7031
7033
  }]);
@@ -7056,7 +7058,7 @@ var Ri = /*#__PURE__*/function (_Ki) {
7056
7058
  }
7057
7059
  }
7058
7060
  };
7059
- _this25 = _callSuper(this, Ri, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i, s]), _this25.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this25.textInputPlaceholderText = "Describe image changes", _this25.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7061
+ _this25 = _callSuper(this, Ri, [e, Te.buildKeyVerificationDetails(), Te.buildHeaders, i, s]), _this25.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this25.textInputPlaceholderText = "Describe image changes", _this25.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7060
7062
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
7061
7063
  _typeof(r) == "object" && (r.engine_id && (_this25.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), Ri.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = Ri.canSendFileMessage;
7062
7064
  return _this25;
@@ -7163,7 +7165,7 @@ var Mi = /*#__PURE__*/function (_Ki2) {
7163
7165
  }
7164
7166
  }
7165
7167
  };
7166
- _this26 = _callSuper(this, Mi, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i, s]), _this26.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this26._maskSource = "MASK_IMAGE_WHITE", _this26.textInputPlaceholderText = "Describe image changes", _this26.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7168
+ _this26 = _callSuper(this, Mi, [e, Te.buildKeyVerificationDetails(), Te.buildHeaders, i, s]), _this26.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this26._maskSource = "MASK_IMAGE_WHITE", _this26.textInputPlaceholderText = "Describe image changes", _this26.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7167
7169
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
7168
7170
  _typeof(r) == "object" && (r.engine_id && (_this26.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/masking")), r.weight !== void 0 && r.weight !== null && (_this26._imageWeight = r.weight), r.mask_source !== void 0 && r.mask_source !== null && (_this26._maskSource = r.mask_source), Mi.cleanConfig(r), Object.assign(_this26.rawBody, r)), _this26.canSendMessage = Mi.canSendFileTextMessage;
7169
7171
  return _this26;
@@ -7303,7 +7305,7 @@ var zo = /*#__PURE__*/function (_ui3) {
7303
7305
  }()
7304
7306
  }]);
7305
7307
  }(ui);
7306
- var Go = /*#__PURE__*/function (_Be2) {
7308
+ var Go = /*#__PURE__*/function (_Fe2) {
7307
7309
  function Go(e) {
7308
7310
  _classCallCheck(this, Go);
7309
7311
  var s, r, o;
@@ -7311,7 +7313,7 @@ var Go = /*#__PURE__*/function (_Be2) {
7311
7313
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7312
7314
  return _callSuper(this, Go, [e, "Once upon a time", "gpt2", t, i]);
7313
7315
  }
7314
- _inherits(Go, _Be2);
7316
+ _inherits(Go, _Fe2);
7315
7317
  return _createClass(Go, [{
7316
7318
  key: "extractResultData",
7317
7319
  value: function () {
@@ -7341,8 +7343,8 @@ var Go = /*#__PURE__*/function (_Be2) {
7341
7343
  return extractResultData;
7342
7344
  }()
7343
7345
  }]);
7344
- }(Be);
7345
- var Vo = /*#__PURE__*/function (_Be3) {
7346
+ }(Fe);
7347
+ var Vo = /*#__PURE__*/function (_Fe3) {
7346
7348
  function Vo(e) {
7347
7349
  var _this27;
7348
7350
  _classCallCheck(this, Vo);
@@ -7352,7 +7354,7 @@ var Vo = /*#__PURE__*/function (_Be3) {
7352
7354
  _this27 = _callSuper(this, Vo, [e, "Ask a question", "bert-large-uncased-whole-word-masking-finetuned-squad", t, i]), _this27.permittedErrorPrefixes = ["Authorization header", "Error in"], _this27.context = t.context;
7353
7355
  return _this27;
7354
7356
  }
7355
- _inherits(Vo, _Be3);
7357
+ _inherits(Vo, _Fe3);
7356
7358
  return _createClass(Vo, [{
7357
7359
  key: "preprocessBody",
7358
7360
  value: function preprocessBody(e, t) {
@@ -7395,8 +7397,8 @@ var Vo = /*#__PURE__*/function (_Be3) {
7395
7397
  return extractResultData;
7396
7398
  }()
7397
7399
  }]);
7398
- }(Be);
7399
- var Ko = /*#__PURE__*/function (_Be4) {
7400
+ }(Fe);
7401
+ var Ko = /*#__PURE__*/function (_Fe4) {
7400
7402
  function Ko(e) {
7401
7403
  _classCallCheck(this, Ko);
7402
7404
  var s, r, o;
@@ -7404,7 +7406,7 @@ var Ko = /*#__PURE__*/function (_Be4) {
7404
7406
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7405
7407
  return _callSuper(this, Ko, [e, "Insert text to summarize", "facebook/bart-large-cnn", t, i]);
7406
7408
  }
7407
- _inherits(Ko, _Be4);
7409
+ _inherits(Ko, _Fe4);
7408
7410
  return _createClass(Ko, [{
7409
7411
  key: "extractResultData",
7410
7412
  value: function () {
@@ -7434,8 +7436,8 @@ var Ko = /*#__PURE__*/function (_Be4) {
7434
7436
  return extractResultData;
7435
7437
  }()
7436
7438
  }]);
7437
- }(Be);
7438
- var $o = /*#__PURE__*/function (_Be5) {
7439
+ }(Fe);
7440
+ var $o = /*#__PURE__*/function (_Fe5) {
7439
7441
  function $o(e) {
7440
7442
  var _this28$maxMessages;
7441
7443
  var _this28;
@@ -7447,7 +7449,7 @@ var $o = /*#__PURE__*/function (_Be5) {
7447
7449
  return _this28;
7448
7450
  }
7449
7451
  // prettier-ignore
7450
- _inherits($o, _Be5);
7452
+ _inherits($o, _Fe5);
7451
7453
  return _createClass($o, [{
7452
7454
  key: "processMessages",
7453
7455
  value: function processMessages(e) {
@@ -7516,7 +7518,7 @@ var $o = /*#__PURE__*/function (_Be5) {
7516
7518
  return extractResultData;
7517
7519
  }()
7518
7520
  }]);
7519
- }(Be);
7521
+ }(Fe);
7520
7522
  var ki = /*#__PURE__*/function (_Ki3) {
7521
7523
  function ki(e) {
7522
7524
  var _this29;
@@ -7532,7 +7534,7 @@ var ki = /*#__PURE__*/function (_Ki3) {
7532
7534
  }
7533
7535
  }
7534
7536
  };
7535
- _this29 = _callSuper(this, ki, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i, s]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this29.textInputPlaceholderText = "Describe image changes", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7537
+ _this29 = _callSuper(this, ki, [e, Te.buildKeyVerificationDetails(), Te.buildHeaders, i, s]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this29.textInputPlaceholderText = "Describe image changes", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7536
7538
  var r = (o = t.stabilityAI) == null ? void 0 : o.imageToImage;
7537
7539
  _typeof(r) == "object" && (r.engine_id && (_this29.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/text-to-image")), r.weight !== void 0 && r.weight !== null && (_this29._imageWeight = r.weight), ki.cleanConfig(r), Object.assign(_this29.rawBody, r)), _this29.canSendMessage = ki.canSendFileTextMessage;
7538
7540
  return _this29;
@@ -7624,7 +7626,7 @@ var ki = /*#__PURE__*/function (_Ki3) {
7624
7626
  }
7625
7627
  }]);
7626
7628
  }(Ki);
7627
- var Wo = /*#__PURE__*/function (_Be6) {
7629
+ var Wo = /*#__PURE__*/function (_Fe6) {
7628
7630
  function Wo(e) {
7629
7631
  _classCallCheck(this, Wo);
7630
7632
  var s, r, o;
@@ -7632,7 +7634,7 @@ var Wo = /*#__PURE__*/function (_Be6) {
7632
7634
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7633
7635
  return _callSuper(this, Wo, [e, "Insert text to translate", "Helsinki-NLP/opus-tatoeba-en-ja", t, i]);
7634
7636
  }
7635
- _inherits(Wo, _Be6);
7637
+ _inherits(Wo, _Fe6);
7636
7638
  return _createClass(Wo, [{
7637
7639
  key: "extractResultData",
7638
7640
  value: function () {
@@ -7662,7 +7664,7 @@ var Wo = /*#__PURE__*/function (_Be6) {
7662
7664
  return extractResultData;
7663
7665
  }()
7664
7666
  }]);
7665
- }(Be);
7667
+ }(Fe);
7666
7668
  var Li = /*#__PURE__*/function (_Ki4) {
7667
7669
  function Li(e) {
7668
7670
  var _this30;
@@ -7670,7 +7672,7 @@ var Li = /*#__PURE__*/function (_Ki4) {
7670
7672
  var r;
7671
7673
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7672
7674
  i = t.stabilityAI;
7673
- _this30 = _callSuper(this, Li, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i]), _this30.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this30.textInputPlaceholderText = "Describe an image", _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7675
+ _this30 = _callSuper(this, Li, [e, Te.buildKeyVerificationDetails(), Te.buildHeaders, i]), _this30.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this30.textInputPlaceholderText = "Describe an image", _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7674
7676
  var s = (r = t.stabilityAI) == null ? void 0 : r.textToImage;
7675
7677
  _typeof(s) == "object" && (s.engine_id && (_this30.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/text-to-image")), s.weight !== void 0 && s.weight !== null && (_this30._imageWeight = s.weight), Li.cleanConfig(s), Object.assign(_this30.rawBody, s)), _this30.canSendMessage = Li.canSendTextMessage;
7676
7678
  return _this30;
@@ -7756,7 +7758,7 @@ var Li = /*#__PURE__*/function (_Ki4) {
7756
7758
  }
7757
7759
  }]);
7758
7760
  }(Ki);
7759
- var Jo = /*#__PURE__*/function (_Be7) {
7761
+ var Jo = /*#__PURE__*/function (_Fe7) {
7760
7762
  function Jo(e) {
7761
7763
  var _this31;
7762
7764
  _classCallCheck(this, Jo);
@@ -7766,7 +7768,7 @@ var Jo = /*#__PURE__*/function (_Be7) {
7766
7768
  _this31 = _callSuper(this, Jo, [e, "The goal of life is [MASK].", "bert-base-uncased", t, i]), _this31.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this31.permittedErrorPrefixes = ["Authorization header", "No mask_token"];
7767
7769
  return _this31;
7768
7770
  }
7769
- _inherits(Jo, _Be7);
7771
+ _inherits(Jo, _Fe7);
7770
7772
  return _createClass(Jo, [{
7771
7773
  key: "extractResultData",
7772
7774
  value: function () {
@@ -7796,7 +7798,7 @@ var Jo = /*#__PURE__*/function (_Be7) {
7796
7798
  return extractResultData;
7797
7799
  }()
7798
7800
  }]);
7799
- }(Be);
7801
+ }(Fe);
7800
7802
  var Qt = /*#__PURE__*/function () {
7801
7803
  function Qt() {
7802
7804
  _classCallCheck(this, Qt);
@@ -8180,13 +8182,13 @@ var le = /*#__PURE__*/function () {
8180
8182
  }]);
8181
8183
  }();
8182
8184
  le.FILES_WITH_TEXT_ERROR = "content with type `text` must have `text` values", le.FUNCTION_TOOL_RESP_ERROR = "Response must contain an array of strings for each individual function/tool_call, see https://deepchat.dev/docs/directConnection/OpenAI/#assistant-functions.";
8183
- var Re = le;
8184
- var qe = /*#__PURE__*/function (_W3) {
8185
+ var Me = le;
8186
+ var He = /*#__PURE__*/function (_W3) {
8185
8187
  // prettier-ignore
8186
- function qe(e, t, i, s, r, o) {
8188
+ function He(e, t, i, s, r, o) {
8187
8189
  var _this32;
8188
- _classCallCheck(this, qe);
8189
- if (_this32 = _callSuper(this, qe, [e, s, r, o]), _this32.insertKeyPlaceholderText = "OpenAI API Key", _this32.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this32.url = "", _this32.permittedErrorPrefixes = ["Incorrect", "Please send text", ri.FAILED_ERROR_MESSAGE], _this32.shouldFetchHistory = !1, _this32.searchedForThreadId = !1, _this32.config = {}, _this32.newAssistantDetails = {
8190
+ _classCallCheck(this, He);
8191
+ if (_this32 = _callSuper(this, He, [e, s, r, o]), _this32.insertKeyPlaceholderText = "OpenAI API Key", _this32.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this32.url = "", _this32.permittedErrorPrefixes = ["Incorrect", "Please send text", ri.FAILED_ERROR_MESSAGE], _this32.shouldFetchHistory = !1, _this32.searchedForThreadId = !1, _this32.config = {}, _this32.newAssistantDetails = {
8190
8192
  model: "gpt-4"
8191
8193
  }, _this32.waitingForStreamResponse = !1, _this32.isSSEStream = !1, _this32.urlSegments = i, _typeof(t) == "object") {
8192
8194
  _this32.config = t;
@@ -8199,8 +8201,8 @@ var qe = /*#__PURE__*/function (_W3) {
8199
8201
  _this32.maxMessages = 1, _this32.isSSEStream = !!(_this32.stream && (_typeof(_this32.stream) != "object" || !_this32.stream.simulation));
8200
8202
  return _this32;
8201
8203
  }
8202
- _inherits(qe, _W3);
8203
- return _createClass(qe, [{
8204
+ _inherits(He, _W3);
8205
+ return _createClass(He, [{
8204
8206
  key: "fetchHistoryFunc",
8205
8207
  value: function () {
8206
8208
  var _fetchHistoryFunc = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee74() {
@@ -8249,13 +8251,13 @@ var qe = /*#__PURE__*/function (_W3) {
8249
8251
  }));
8250
8252
  a === "code_interpreter" || a === "file_search" || a === "images" ? r = a : (console.error("Tool type \"".concat(a, "\" is not valid")), console.error('Expected "code_interpreter" or "file_search" or "images". Going to default to "images"'));
8251
8253
  }
8252
- if (r === "file_search") return qe.processAttachmentsMessage(s, t, "file_search");
8253
- if (r === "code_interpreter") return qe.processAttachmentsMessage(s, t, "code_interpreter");
8254
+ if (r === "file_search") return He.processAttachmentsMessage(s, t, "file_search");
8255
+ if (r === "code_interpreter") return He.processAttachmentsMessage(s, t, "code_interpreter");
8254
8256
  if (t.find(function (_ref20) {
8255
8257
  var a = _ref20.name;
8256
8258
  return !V.isImageFileExtension(a);
8257
8259
  })) console.error("The uploaded files contained a non-image file"), console.error('Make sure only images can be uploaded or define a "code_interpreter" or "file_search" value in the "files_tool_type" property'), console.warn('Make sure your existing assistant supports these "tools" or specify them in the "new_assistant" property');else {
8258
- var _a2 = qe.processImageMessage(s, t);
8260
+ var _a2 = He.processImageMessage(s, t);
8259
8261
  if (_a2) return _a2;
8260
8262
  }
8261
8263
  }
@@ -8327,7 +8329,7 @@ var qe = /*#__PURE__*/function (_W3) {
8327
8329
  break;
8328
8330
  }
8329
8331
  _context75.next = 16;
8330
- return Re.storeFiles(this, e, i, this.urlSegments.storeFiles);
8332
+ return Me.storeFiles(this, e, i, this.urlSegments.storeFiles);
8331
8333
  case 16:
8332
8334
  _context75.t1 = _context75.sent;
8333
8335
  _context75.next = 20;
@@ -8410,7 +8412,7 @@ var qe = /*#__PURE__*/function (_W3) {
8410
8412
  _context77.next = 6;
8411
8413
  break;
8412
8414
  }
8413
- throw e.error.message.startsWith(Re.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8415
+ throw e.error.message.startsWith(Me.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8414
8416
  case 6:
8415
8417
  _context77.next = 8;
8416
8418
  return this.assignThreadAndRun(e);
@@ -8494,7 +8496,7 @@ var qe = /*#__PURE__*/function (_W3) {
8494
8496
  case 9:
8495
8497
  i = _context79.sent;
8496
8498
  case 10:
8497
- return _context79.abrupt("return", Re.processAPIMessages(this, i, t, this.urlSegments));
8499
+ return _context79.abrupt("return", Me.processAPIMessages(this, i, t, this.urlSegments));
8498
8500
  case 11:
8499
8501
  case "end":
8500
8502
  return _context79.stop();
@@ -8521,7 +8523,7 @@ var qe = /*#__PURE__*/function (_W3) {
8521
8523
  break;
8522
8524
  }
8523
8525
  return _context80.abrupt("return", {
8524
- timeoutMS: qe.POLLING_TIMEOUT_MS
8526
+ timeoutMS: He.POLLING_TIMEOUT_MS
8525
8527
  });
8526
8528
  case 3:
8527
8529
  if (!(t === "completed" && this.messages)) {
@@ -8595,7 +8597,7 @@ var qe = /*#__PURE__*/function (_W3) {
8595
8597
  _context81.next = 8;
8596
8598
  break;
8597
8599
  }
8598
- throw Error(Re.FUNCTION_TOOL_RESP_ERROR);
8600
+ throw Error(Me.FUNCTION_TOOL_RESP_ERROR);
8599
8601
  case 8:
8600
8602
  _context81.next = 10;
8601
8603
  return Promise.all(i);
@@ -8607,7 +8609,7 @@ var qe = /*#__PURE__*/function (_W3) {
8607
8609
  _context81.next = 13;
8608
8610
  break;
8609
8611
  }
8610
- throw Error(Re.FUNCTION_TOOL_RESP_ERROR);
8612
+ throw Error(Me.FUNCTION_TOOL_RESP_ERROR);
8611
8613
  case 13:
8612
8614
  r = s.map(function (l, c) {
8613
8615
  return {
@@ -8634,7 +8636,7 @@ var qe = /*#__PURE__*/function (_W3) {
8634
8636
  }, "POST");
8635
8637
  case 22:
8636
8638
  return _context81.abrupt("return", {
8637
- timeoutMS: qe.POLLING_TIMEOUT_MS
8639
+ timeoutMS: He.POLLING_TIMEOUT_MS
8638
8640
  });
8639
8641
  case 23:
8640
8642
  case "end":
@@ -8712,7 +8714,7 @@ var qe = /*#__PURE__*/function (_W3) {
8712
8714
  }
8713
8715
  l = e.content.find(function (d) {
8714
8716
  return !!d.text;
8715
- }) || e.content[0], c = Re.getFilesAndText.bind(this, this, {
8717
+ }) || e.content[0], c = Me.getFilesAndText.bind(this, this, {
8716
8718
  role: "assistant",
8717
8719
  content: e.content
8718
8720
  }, this.urlSegments, l);
@@ -8736,7 +8738,7 @@ var qe = /*#__PURE__*/function (_W3) {
8736
8738
  break;
8737
8739
  }
8738
8740
  _context83.next = 11;
8739
- return Re.processStreamMessages(this, e.delta.content, this.urlSegments);
8741
+ return Me.processStreamMessages(this, e.delta.content, this.urlSegments);
8740
8742
  case 11:
8741
8743
  _l = _context83.sent;
8742
8744
  return _context83.abrupt("return", {
@@ -8829,8 +8831,8 @@ var qe = /*#__PURE__*/function (_W3) {
8829
8831
  }
8830
8832
  }]);
8831
8833
  }(W);
8832
- qe.POLLING_TIMEOUT_MS = 500;
8833
- var Ii = qe;
8834
+ He.POLLING_TIMEOUT_MS = 500;
8835
+ var Ii = He;
8834
8836
  var ws = /*#__PURE__*/function (_Ii) {
8835
8837
  function ws(e) {
8836
8838
  var _a$headers, _l$OpenAIBeta;
@@ -9018,7 +9020,7 @@ var Os = /*#__PURE__*/function () {
9018
9020
  }]);
9019
9021
  }();
9020
9022
  Os.URL_DETAILS_ERROR_MESSAGE = "Please define the Azure URL Details. [More Information](https://deepchat.dev/docs/directConnection/Azure)";
9021
- var pe = Os;
9023
+ var me = Os;
9022
9024
  var mt = /*#__PURE__*/function (_Ii2) {
9023
9025
  function mt(e) {
9024
9026
  var _g$headers;
@@ -9041,17 +9043,17 @@ var mt = /*#__PURE__*/function (_Ii2) {
9041
9043
  getFilesPrefix: "".concat(o, "files/"),
9042
9044
  getFilesPostfix: "/content".concat(a)
9043
9045
  };
9044
- if (_this37 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, pe.buildKeyVerificationDetails(r), pe.buildHeaders, i]), _this37.permittedErrorPrefixes = [pe.URL_DETAILS_ERROR_MESSAGE], _this37.insertKeyPlaceholderText = "Azure OpenAI API Key", _this37.keyHelpUrl = "https://learn.microsoft.com/en-us/answers/questions/1193991/how-to-get-the-value-of-openai-api-key", _this37.isTextInputDisabled = !1, _typeof(s == null ? void 0 : s.assistant) == "object") {
9046
+ if (_this37 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, me.buildKeyVerificationDetails(r), me.buildHeaders, i]), _this37.permittedErrorPrefixes = [me.URL_DETAILS_ERROR_MESSAGE], _this37.insertKeyPlaceholderText = "Azure OpenAI API Key", _this37.keyHelpUrl = "https://learn.microsoft.com/en-us/answers/questions/1193991/how-to-get-the-value-of-openai-api-key", _this37.isTextInputDisabled = !1, _typeof(s == null ? void 0 : s.assistant) == "object") {
9045
9047
  var _ref24 = (p = (m = (f = e.directConnection) == null ? void 0 : f.azure) == null ? void 0 : m.openAI) == null ? void 0 : p.assistant,
9046
9048
  y = _ref24.function_handler,
9047
9049
  R = _ref24.files_tool_type;
9048
9050
  y && (_this37.functionHandler = y), R && (_this37.filesToolType = R);
9049
9051
  }
9050
- pe.validateURLDetails(r) ? (_g$headers = (g = _this37.connectSettings).headers) !== null && _g$headers !== void 0 ? _g$headers : g.headers = {} : (_this37.isTextInputDisabled = !0, _this37.canSendMessage = function () {
9052
+ me.validateURLDetails(r) ? (_g$headers = (g = _this37.connectSettings).headers) !== null && _g$headers !== void 0 ? _g$headers : g.headers = {} : (_this37.isTextInputDisabled = !0, _this37.canSendMessage = function () {
9051
9053
  return !1;
9052
9054
  }, setTimeout(function () {
9053
9055
  e.addMessage({
9054
- error: pe.URL_DETAILS_ERROR_MESSAGE
9056
+ error: me.URL_DETAILS_ERROR_MESSAGE
9055
9057
  });
9056
9058
  }));
9057
9059
  return _this37;
@@ -10180,26 +10182,26 @@ var gt = /*#__PURE__*/function (_W6) {
10180
10182
  }(W);
10181
10183
  gt.DEFAULT_MODEL = "tts-1", gt.DEFAULT_VOIDE = "alloy";
10182
10184
  var hs = gt;
10183
- var ge = /*#__PURE__*/function (_W7) {
10184
- function ge(e) {
10185
+ var be = /*#__PURE__*/function (_W7) {
10186
+ function be(e) {
10185
10187
  var _o$model2;
10186
10188
  var _this45;
10187
- _classCallCheck(this, ge);
10189
+ _classCallCheck(this, be);
10188
10190
  var r, o;
10189
10191
  var t = JSON.parse(JSON.stringify(e.directConnection)),
10190
10192
  i = t == null ? void 0 : t.openAI;
10191
- _this45 = _callSuper(this, ge, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, {
10193
+ _this45 = _callSuper(this, be, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, {
10192
10194
  audio: {}
10193
- }]), _this45.insertKeyPlaceholderText = "OpenAI API Key", _this45.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this45.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this45.url = "", _this45.permittedErrorPrefixes = ["Invalid"], _this45.textInputPlaceholderText = "Upload an audio file", _this45._service_url = ge.AUDIO_TRANSCRIPTIONS_URL;
10195
+ }]), _this45.insertKeyPlaceholderText = "OpenAI API Key", _this45.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this45.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this45.url = "", _this45.permittedErrorPrefixes = ["Invalid"], _this45.textInputPlaceholderText = "Upload an audio file", _this45._service_url = be.AUDIO_TRANSCRIPTIONS_URL;
10194
10196
  var s = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
10195
- _typeof(s) == "object" && (_this45.processConfig(s), ge.cleanConfig(s), Object.assign(_this45.rawBody, s)), (_o$model2 = (o = _this45.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = ge.DEFAULT_MODEL, _this45.rawBody.response_format = "json", _this45.canSendMessage = ge.canSendFileMessage;
10197
+ _typeof(s) == "object" && (_this45.processConfig(s), be.cleanConfig(s), Object.assign(_this45.rawBody, s)), (_o$model2 = (o = _this45.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = be.DEFAULT_MODEL, _this45.rawBody.response_format = "json", _this45.canSendMessage = be.canSendFileMessage;
10196
10198
  return _this45;
10197
10199
  }
10198
- _inherits(ge, _W7);
10199
- return _createClass(ge, [{
10200
+ _inherits(be, _W7);
10201
+ return _createClass(be, [{
10200
10202
  key: "processConfig",
10201
10203
  value: function processConfig(e) {
10202
- e != null && e.type && e.type === "translation" && (this._service_url = ge.AUDIO_TRANSLATIONS_URL, delete e.language);
10204
+ e != null && e.type && e.type === "translation" && (this._service_url = be.AUDIO_TRANSLATIONS_URL, delete e.language);
10203
10205
  }
10204
10206
  }, {
10205
10207
  key: "preprocessBody",
@@ -10231,7 +10233,7 @@ var ge = /*#__PURE__*/function (_W7) {
10231
10233
  throw new Error("No file was added");
10232
10234
  case 4:
10233
10235
  this.url = this.connectSettings.url || this._service_url;
10234
- s = this.preprocessBody(this.rawBody, t), r = ge.createFormDataBody(s, i[0]);
10236
+ s = this.preprocessBody(this.rawBody, t), r = be.createFormDataBody(s, i[0]);
10235
10237
  E.tempRemoveContentHeader(this.connectSettings, T.request.bind(this, this, r, e), !1);
10236
10238
  case 7:
10237
10239
  case "end":
@@ -10291,13 +10293,13 @@ var ge = /*#__PURE__*/function (_W7) {
10291
10293
  }
10292
10294
  }]);
10293
10295
  }(W);
10294
- ge.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", ge.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", ge.DEFAULT_MODEL = "whisper-1";
10295
- var us = ge;
10296
- var me = /*#__PURE__*/function () {
10297
- function me() {
10298
- _classCallCheck(this, me);
10296
+ be.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", be.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", be.DEFAULT_MODEL = "whisper-1";
10297
+ var us = be;
10298
+ var ge = /*#__PURE__*/function () {
10299
+ function ge() {
10300
+ _classCallCheck(this, ge);
10299
10301
  }
10300
- return _createClass(me, null, [{
10302
+ return _createClass(ge, null, [{
10301
10303
  key: "buildTextToSpeechHeaders",
10302
10304
  value: function buildTextToSpeechHeaders(e, t) {
10303
10305
  return {
@@ -10331,7 +10333,7 @@ var me = /*#__PURE__*/function () {
10331
10333
  "Ocp-Apim-Subscription-Key": "".concat(t)
10332
10334
  };
10333
10335
  },
10334
- handleVerificationResult: me.handleSpeechVerificationResult
10336
+ handleVerificationResult: ge.handleSpeechVerificationResult
10335
10337
  };
10336
10338
  }
10337
10339
  }, {
@@ -10360,7 +10362,7 @@ var me = /*#__PURE__*/function () {
10360
10362
  "Ocp-Apim-Subscription-Key": "".concat(t)
10361
10363
  };
10362
10364
  },
10363
- handleVerificationResult: me.handleLanguageVerificationResult
10365
+ handleVerificationResult: ge.handleLanguageVerificationResult
10364
10366
  };
10365
10367
  }
10366
10368
  // prettier-ignore
@@ -10378,9 +10380,9 @@ var me = /*#__PURE__*/function () {
10378
10380
  url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es",
10379
10381
  method: "POST",
10380
10382
  createHeaders: function createHeaders(t) {
10381
- return me.buildTranslationHeaders(e, t);
10383
+ return ge.buildTranslationHeaders(e, t);
10382
10384
  },
10383
- handleVerificationResult: me.handleTranslationVerificationResult
10385
+ handleVerificationResult: ge.handleTranslationVerificationResult
10384
10386
  };
10385
10387
  }
10386
10388
  }, {
@@ -10399,7 +10401,7 @@ var Zo = /*#__PURE__*/function (_W8) {
10399
10401
  function Zo(e, t, i, s, r) {
10400
10402
  var _this46;
10401
10403
  _classCallCheck(this, Zo);
10402
- _this46 = _callSuper(this, Zo, [e, me.buildLanguageKeyVerificationDetails(i), t, s, r]), _this46.insertKeyPlaceholderText = "Azure Language Subscription Key", _this46.keyHelpUrl =
10404
+ _this46 = _callSuper(this, Zo, [e, ge.buildLanguageKeyVerificationDetails(i), t, s, r]), _this46.insertKeyPlaceholderText = "Azure Language Subscription Key", _this46.keyHelpUrl =
10403
10405
  // eslint-disable-next-line max-len
10404
10406
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this46.permittedErrorPrefixes = ["Access"];
10405
10407
  return _this46;
@@ -10415,7 +10417,7 @@ var ei = /*#__PURE__*/function (_Zo) {
10415
10417
  var s, r, o, a;
10416
10418
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.summarization,
10417
10419
  i = (o = e.directConnection) == null ? void 0 : o.azure;
10418
- _this47 = _callSuper(this, ei, [e, me.buildSummarizationHeader, t.endpoint, i]), _this47.permittedErrorPrefixes = [ei.ENDPOINT_ERROR_MESSAGE], _this47.url = "", _this47.textInputPlaceholderText = "Insert text to summarize", _this47.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this47.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this47.rawBody, t), _this47.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this47.isTextInputDisabled = !0, _this47.canSendMessage = function () {
10420
+ _this47 = _callSuper(this, ei, [e, ge.buildSummarizationHeader, t.endpoint, i]), _this47.permittedErrorPrefixes = [ei.ENDPOINT_ERROR_MESSAGE], _this47.url = "", _this47.textInputPlaceholderText = "Insert text to summarize", _this47.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this47.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this47.rawBody, t), _this47.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this47.isTextInputDisabled = !0, _this47.canSendMessage = function () {
10419
10421
  return !1;
10420
10422
  }, setTimeout(function () {
10421
10423
  e.addMessage({
@@ -10764,7 +10766,7 @@ var Pn = /*#__PURE__*/function (_W10) {
10764
10766
  function Pn(e, t, i, s, r) {
10765
10767
  var _this49;
10766
10768
  _classCallCheck(this, Pn);
10767
- _this49 = _callSuper(this, Pn, [e, me.buildSpeechKeyVerificationDetails(i), t, s, r]), _this49.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this49.keyHelpUrl =
10769
+ _this49 = _callSuper(this, Pn, [e, ge.buildSpeechKeyVerificationDetails(i), t, s, r]), _this49.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this49.keyHelpUrl =
10768
10770
  // eslint-disable-next-line max-len
10769
10771
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal";
10770
10772
  return _this49;
@@ -10781,7 +10783,7 @@ var tt = /*#__PURE__*/function (_Pn) {
10781
10783
  var s, r, o, a, l, c;
10782
10784
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.textToSpeech,
10783
10785
  i = (o = e.directConnection) == null ? void 0 : o.azure;
10784
- _this50 = _callSuper(this, tt, [e, me.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this50.permittedErrorPrefixes = [tt.REGION_ERROR_MESSAGE], _this50.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(tt.HELP_LINK, "\">here</a> for more info.\n </p>"), _this50.isTextInputDisabled = !1, _this50.url = "", t.region ? (Object.assign(_this50.rawBody, t), (_a$lang = (a = _this50.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this50.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this50.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this50.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this50.isTextInputDisabled = !0, _this50.canSendMessage = function () {
10786
+ _this50 = _callSuper(this, tt, [e, ge.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this50.permittedErrorPrefixes = [tt.REGION_ERROR_MESSAGE], _this50.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(tt.HELP_LINK, "\">here</a> for more info.\n </p>"), _this50.isTextInputDisabled = !1, _this50.url = "", t.region ? (Object.assign(_this50.rawBody, t), (_a$lang = (a = _this50.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this50.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this50.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this50.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this50.isTextInputDisabled = !0, _this50.canSendMessage = function () {
10785
10787
  return !1;
10786
10788
  }, setTimeout(function () {
10787
10789
  e.addMessage({
@@ -10861,10 +10863,10 @@ tt.HELP_LINK =
10861
10863
  // eslint-disable-next-line max-len
10862
10864
  "Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#TextToSpeech)";
10863
10865
  var ps = tt;
10864
- var He = /*#__PURE__*/function (_Pn2) {
10865
- function He(e) {
10866
+ var ze = /*#__PURE__*/function (_Pn2) {
10867
+ function ze(e) {
10866
10868
  var _this51;
10867
- _classCallCheck(this, He);
10869
+ _classCallCheck(this, ze);
10868
10870
  var r, o, a;
10869
10871
  var t = (o = (r = e.directConnection) == null ? void 0 : r.azure) == null ? void 0 : o.speechToText,
10870
10872
  i = (a = e.directConnection) == null ? void 0 : a.azure,
@@ -10875,21 +10877,21 @@ var He = /*#__PURE__*/function (_Pn2) {
10875
10877
  }
10876
10878
  }
10877
10879
  };
10878
- if (_this51 = _callSuper(this, He, [e, me.buildSpeechToTextHeaders, t.region, i, s]), _this51.permittedErrorPrefixes = [He.REGION_ERROR_MESSAGE], _this51.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(He.HELP_LINK, "\">here</a> for more info.\n </p>"), _this51.url = "", _this51.isTextInputDisabled = !0, _this51.textInputPlaceholderText = "Upload an audio file", !t.region) _this51.isTextInputDisabled = !0, _this51.canSendMessage = function () {
10880
+ if (_this51 = _callSuper(this, ze, [e, ge.buildSpeechToTextHeaders, t.region, i, s]), _this51.permittedErrorPrefixes = [ze.REGION_ERROR_MESSAGE], _this51.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(ze.HELP_LINK, "\">here</a> for more info.\n </p>"), _this51.url = "", _this51.isTextInputDisabled = !0, _this51.textInputPlaceholderText = "Upload an audio file", !t.region) _this51.isTextInputDisabled = !0, _this51.canSendMessage = function () {
10879
10881
  return !1;
10880
10882
  }, setTimeout(function () {
10881
10883
  e.addMessage({
10882
- error: He.REGION_ERROR_MESSAGE
10884
+ error: ze.REGION_ERROR_MESSAGE
10883
10885
  });
10884
10886
  });else {
10885
- _this51.canSendMessage = He.canFileSendMessage;
10887
+ _this51.canSendMessage = ze.canFileSendMessage;
10886
10888
  var l = t.lang || "en-US";
10887
10889
  _this51.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(l, "&format=detailed"), _this51.recordAudio = void 0;
10888
10890
  }
10889
10891
  return _this51;
10890
10892
  }
10891
- _inherits(He, _Pn2);
10892
- return _createClass(He, [{
10893
+ _inherits(ze, _Pn2);
10894
+ return _createClass(ze, [{
10893
10895
  key: "callServiceAPI",
10894
10896
  value: function () {
10895
10897
  var _callServiceAPI17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee109(e, t, i) {
@@ -10955,12 +10957,12 @@ var He = /*#__PURE__*/function (_Pn2) {
10955
10957
  }
10956
10958
  }]);
10957
10959
  }(Pn);
10958
- He.HELP_LINK =
10960
+ ze.HELP_LINK =
10959
10961
  // eslint-disable-next-line max-len
10960
- "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", He.REGION_ERROR_MESSAGE =
10962
+ "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", ze.REGION_ERROR_MESSAGE =
10961
10963
  // eslint-disable-next-line max-len
10962
10964
  "Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#SpeechToText)";
10963
- var ms = He;
10965
+ var ms = ze;
10964
10966
  var Qo = /*#__PURE__*/function (_W11) {
10965
10967
  // prettier-ignore
10966
10968
  function Qo(e) {
@@ -10969,7 +10971,7 @@ var Qo = /*#__PURE__*/function (_W11) {
10969
10971
  var s, r, o;
10970
10972
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.translation,
10971
10973
  i = (o = e.directConnection) == null ? void 0 : o.azure;
10972
- _this52 = _callSuper(this, Qo, [e, me.buildTranslationKeyVerificationDetails(t.region), me.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this52.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this52.keyHelpUrl =
10974
+ _this52 = _callSuper(this, Qo, [e, ge.buildTranslationKeyVerificationDetails(t.region), ge.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this52.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this52.keyHelpUrl =
10973
10975
  // eslint-disable-next-line max-len
10974
10976
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this52.url = "", _this52.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
10975
10977
  return _this52;
@@ -11043,10 +11045,10 @@ var Qo = /*#__PURE__*/function (_W11) {
11043
11045
  var yt = /*#__PURE__*/function (_W12) {
11044
11046
  // prettier-ignore
11045
11047
  function yt(e, t, i, s, r) {
11046
- var _this53$maxMessages, _m$model;
11048
+ var _this53$maxMessages, _p$model;
11047
11049
  var _this53;
11048
11050
  _classCallCheck(this, yt);
11049
- var u, h, f, m;
11051
+ var u, h, f, m, p;
11050
11052
  var o = JSON.parse(JSON.stringify(e.directConnection)),
11051
11053
  a = t || L.buildKeyVerificationDetails(),
11052
11054
  l = i || L.buildHeaders,
@@ -11055,11 +11057,10 @@ var yt = /*#__PURE__*/function (_W12) {
11055
11057
  var d = r || ((u = o.openAI) == null ? void 0 : u.chat);
11056
11058
  if (_typeof(d) == "object") {
11057
11059
  d.system_prompt && (_this53._systemMessage = yt.generateSystemMessage(d.system_prompt));
11058
- var _ref29 = (f = (h = e.directConnection) == null ? void 0 : h.openAI) == null ? void 0 : f.chat,
11059
- p = _ref29.function_handler;
11060
- p && (_this53._functionHandler = p), _this53.cleanConfig(d), Object.assign(_this53.rawBody, d);
11060
+ var g = (m = (f = (h = e.directConnection) == null ? void 0 : h.openAI) == null ? void 0 : f.chat) == null ? void 0 : m.function_handler;
11061
+ g && (_this53._functionHandler = g), _this53.cleanConfig(d), Object.assign(_this53.rawBody, d);
11061
11062
  }
11062
- (_this53$maxMessages = _this53.maxMessages) !== null && _this53$maxMessages !== void 0 ? _this53$maxMessages : _this53.maxMessages = -1, (_m$model = (m = _this53.rawBody).model) !== null && _m$model !== void 0 ? _m$model : m.model = "gpt-4o";
11063
+ (_this53$maxMessages = _this53.maxMessages) !== null && _this53$maxMessages !== void 0 ? _this53$maxMessages : _this53.maxMessages = -1, (_p$model = (p = _this53.rawBody).model) !== null && _p$model !== void 0 ? _p$model : p.model = "gpt-4o";
11063
11064
  return _this53;
11064
11065
  }
11065
11066
  _inherits(yt, _W12);
@@ -11245,8 +11246,8 @@ var yt = /*#__PURE__*/function (_W12) {
11245
11246
  tool_calls: e.tool_calls,
11246
11247
  role: "assistant",
11247
11248
  content: null
11248
- }), !a.find(function (_ref30) {
11249
- var f = _ref30.response;
11249
+ }), !a.find(function (_ref29) {
11250
+ var f = _ref29.response;
11250
11251
  return typeof f != "string";
11251
11252
  }) && r.length === a.length)) {
11252
11253
  _context116.next = 43;
@@ -11344,16 +11345,16 @@ var Ts = /*#__PURE__*/function (_yt) {
11344
11345
  i = t.azure,
11345
11346
  s = ((a = (o = t.azure) == null ? void 0 : o.openAI) == null ? void 0 : a.urlDetails) || {},
11346
11347
  r = (c = (l = t.azure) == null ? void 0 : l.openAI) == null ? void 0 : c.chat;
11347
- if (_this55 = _callSuper(this, Ts, [e, pe.buildKeyVerificationDetails(s), pe.buildHeaders, i, r]), _this55.permittedErrorPrefixes = [pe.URL_DETAILS_ERROR_MESSAGE], _this55.isTextInputDisabled = !1, _typeof(r) == "object") {
11348
- var _ref31 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
11349
- f = _ref31.function_handler;
11348
+ if (_this55 = _callSuper(this, Ts, [e, me.buildKeyVerificationDetails(s), me.buildHeaders, i, r]), _this55.permittedErrorPrefixes = [me.URL_DETAILS_ERROR_MESSAGE], _this55.isTextInputDisabled = !1, _typeof(r) == "object") {
11349
+ var _ref30 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
11350
+ f = _ref30.function_handler;
11350
11351
  f && (_this55._functionHandler = f);
11351
11352
  }
11352
- pe.validateURLDetails(s) ? _this55.url = Ts.buildURL(s) : (_this55.isTextInputDisabled = !0, _this55.canSendMessage = function () {
11353
+ me.validateURLDetails(s) ? _this55.url = Ts.buildURL(s) : (_this55.isTextInputDisabled = !0, _this55.canSendMessage = function () {
11353
11354
  return !1;
11354
11355
  }, setTimeout(function () {
11355
11356
  e.addMessage({
11356
- error: pe.URL_DETAILS_ERROR_MESSAGE
11357
+ error: me.URL_DETAILS_ERROR_MESSAGE
11357
11358
  });
11358
11359
  }));
11359
11360
  return _this55;
@@ -11369,10 +11370,10 @@ var Ts = /*#__PURE__*/function (_yt) {
11369
11370
  }
11370
11371
  }]);
11371
11372
  }(yt);
11372
- var be = /*#__PURE__*/function (_W13) {
11373
- function be(e) {
11373
+ var ve = /*#__PURE__*/function (_W13) {
11374
+ function ve(e) {
11374
11375
  var _this56;
11375
- _classCallCheck(this, be);
11376
+ _classCallCheck(this, ve);
11376
11377
  var o;
11377
11378
  var t = e.directConnection,
11378
11379
  i = t == null ? void 0 : t.openAI,
@@ -11384,7 +11385,7 @@ var be = /*#__PURE__*/function (_W13) {
11384
11385
  }
11385
11386
  }
11386
11387
  };
11387
- _this56 = _callSuper(this, be, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, s]), _this56.insertKeyPlaceholderText = "OpenAI API Key", _this56.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this56.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this56.url = "", _this56.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
11388
+ _this56 = _callSuper(this, ve, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, s]), _this56.insertKeyPlaceholderText = "OpenAI API Key", _this56.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this56.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this56.url = "", _this56.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
11388
11389
  var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
11389
11390
  if (_this56.camera) {
11390
11391
  var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
@@ -11395,11 +11396,11 @@ var be = /*#__PURE__*/function (_W13) {
11395
11396
  }
11396
11397
  };
11397
11398
  }
11398
- _typeof(r) == "object" && Object.assign(_this56.rawBody, r), _this56.canSendMessage = be.canFileSendMessage;
11399
+ _typeof(r) == "object" && Object.assign(_this56.rawBody, r), _this56.canSendMessage = ve.canFileSendMessage;
11399
11400
  return _this56;
11400
11401
  }
11401
- _inherits(be, _W13);
11402
- return _createClass(be, [{
11402
+ _inherits(ve, _W13);
11403
+ return _createClass(ve, [{
11403
11404
  key: "preprocessBody",
11404
11405
  value: function preprocessBody(e, t) {
11405
11406
  var i = JSON.parse(JSON.stringify(e));
@@ -11413,10 +11414,10 @@ var be = /*#__PURE__*/function (_W13) {
11413
11414
  var s;
11414
11415
  var r = (a = (o = t[t.length - 1]) == null ? void 0 : o.text) == null ? void 0 : a.trim();
11415
11416
  if (i[1] || r && r !== "") {
11416
- this.url = be.IMAGE_EDIT_URL;
11417
+ this.url = ve.IMAGE_EDIT_URL;
11417
11418
  var l = this.preprocessBody(this.rawBody, r);
11418
- s = be.createFormDataBody(l, i[0], i[1]);
11419
- } else this.url = be.IMAGE_VARIATIONS_URL, s = be.createFormDataBody(this.rawBody, i[0]);
11419
+ s = ve.createFormDataBody(l, i[0], i[1]);
11420
+ } else this.url = ve.IMAGE_VARIATIONS_URL, s = ve.createFormDataBody(this.rawBody, i[0]);
11420
11421
  E.tempRemoveContentHeader(this.connectSettings, T.request.bind(this, this, s, e), !1);
11421
11422
  }
11422
11423
  }, {
@@ -11447,7 +11448,7 @@ var be = /*#__PURE__*/function (_W13) {
11447
11448
  }
11448
11449
  throw new Error("Request settings have not been set up");
11449
11450
  case 8:
11450
- this.url = be.IMAGE_GENERATION_URL;
11451
+ this.url = ve.IMAGE_GENERATION_URL;
11451
11452
  r = this.preprocessBody(this.rawBody, t[t.length - 1].text);
11452
11453
  T.request(this, r, e);
11453
11454
  case 11:
@@ -11519,8 +11520,8 @@ var be = /*#__PURE__*/function (_W13) {
11519
11520
  }
11520
11521
  }]);
11521
11522
  }(W);
11522
- be.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", be.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", be.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
11523
- var gs = be;
11523
+ ve.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", ve.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", ve.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
11524
+ var gs = ve;
11524
11525
  var ea = /*#__PURE__*/function (_As3) {
11525
11526
  function ea(e) {
11526
11527
  var _this57$maxMessages;
@@ -11897,9 +11898,9 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
11897
11898
  }, {
11898
11899
  key: "addMessages",
11899
11900
  value: function addMessages(e, t, i, s) {
11900
- Z.createMessages(e, t, i, s).forEach(function (_ref32) {
11901
- var o = _ref32.type,
11902
- a = _ref32.elements;
11901
+ Z.createMessages(e, t, i, s).forEach(function (_ref31) {
11902
+ var o = _ref31.type,
11903
+ a = _ref31.elements;
11903
11904
  V.addMessage(e, a, o, i, s);
11904
11905
  });
11905
11906
  }
@@ -11907,11 +11908,11 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
11907
11908
  }();
11908
11909
  Z.IMAGE_BUBBLE_CLASS = "image-message", Z.AUDIO_BUBBLE_CLASS = "audio-message", Z.ANY_FILE_BUBBLE_CLASS = "any-file-message";
11909
11910
  var Bi = Z;
11910
- var de = /*#__PURE__*/function () {
11911
- function de() {
11912
- _classCallCheck(this, de);
11911
+ var he = /*#__PURE__*/function () {
11912
+ function he() {
11913
+ _classCallCheck(this, he);
11913
11914
  }
11914
- return _createClass(de, null, [{
11915
+ return _createClass(he, null, [{
11915
11916
  key: "removeElements",
11916
11917
  value: function removeElements(e, t) {
11917
11918
  if (!t) return;
@@ -11925,21 +11926,21 @@ var de = /*#__PURE__*/function () {
11925
11926
  value: function removeFilesMessages(e, t) {
11926
11927
  var i;
11927
11928
  (i = t[1].files) == null || i.forEach(function (s) {
11928
- de.removeElements(e.messageElementRefs, s);
11929
+ he.removeElements(e.messageElementRefs, s);
11929
11930
  }), delete t[0].files, delete t[1].files;
11930
11931
  }
11931
11932
  }, {
11932
11933
  key: "removeTextHTMLMessage",
11933
11934
  value: function removeTextHTMLMessage(e, t, i) {
11934
11935
  var s = t[1][i];
11935
- de.removeElements(e.messageElementRefs, s), delete t[0][i], delete t[1][i];
11936
+ he.removeElements(e.messageElementRefs, s), delete t[0][i], delete t[1][i];
11936
11937
  }
11937
11938
  }, {
11938
11939
  key: "updateHTMLMessage",
11939
11940
  value: function updateHTMLMessage(e, t, i) {
11940
11941
  var s, r, o;
11941
- if (t[1].html) xe.overwriteElements(e, i, t[1].html);else {
11942
- var a = xe.create(e, i, t[0].role),
11942
+ if (t[1].html) we.overwriteElements(e, i, t[1].html);else {
11943
+ var a = we.create(e, i, t[0].role),
11943
11944
  l = ((r = t[1].files) == null ? void 0 : r[((s = t[1].files) == null ? void 0 : s.length) - 1]) || t[1].text,
11944
11945
  c = l.outerContainer.nextSibling;
11945
11946
  (o = c == null ? void 0 : c.parentElement) == null || o.insertBefore(a.outerContainer, c), e.messageElementRefs.splice(e.messageElementRefs.length - 1, 1);
@@ -11965,13 +11966,13 @@ var de = /*#__PURE__*/function () {
11965
11966
  });
11966
11967
  a && (c += 1);
11967
11968
  var d = (o == null ? void 0 : o.outerContainer) || (a == null ? void 0 : a.outerContainer.nextSibling);
11968
- r.forEach(function (_ref33, p) {
11969
- var f = _ref33.type,
11970
- m = _ref33.elements;
11969
+ r.forEach(function (_ref32, p) {
11970
+ var f = _ref32.type,
11971
+ m = _ref32.elements;
11971
11972
  var g;
11972
11973
  V.setElementProps(e, m, f, s), (g = d.parentElement) == null || g.insertBefore(m.outerContainer, d), e.messageElementRefs.splice(e.messageElementRefs.length - 1, 1), e.messageElementRefs.splice(c + p, 0, m);
11973
- }), de.removeFilesMessages(e, t), t[1].files = r.map(function (_ref34) {
11974
- var f = _ref34.elements;
11974
+ }), he.removeFilesMessages(e, t), t[1].files = r.map(function (_ref33) {
11975
+ var f = _ref33.elements;
11975
11976
  return f;
11976
11977
  }), t[0].files = i;
11977
11978
  }
@@ -11994,17 +11995,16 @@ var de = /*#__PURE__*/function () {
11994
11995
  key: "isElementActive",
11995
11996
  value: function isElementActive(e) {
11996
11997
  var t, i;
11997
- return ue.isActiveElement((t = e.text) == null ? void 0 : t.bubbleElement.classList) || ue.isActiveElement((i = e.html) == null ? void 0 : i.bubbleElement.classList);
11998
+ return fe.isActiveElement((t = e.text) == null ? void 0 : t.bubbleElement.classList) || fe.isActiveElement((i = e.html) == null ? void 0 : i.bubbleElement.classList);
11998
11999
  }
11999
- // WORK - update message does not work on loaded history messages
12000
12000
  // note that overwrite and 'deep-chat-temporary-message' are used to remove a message
12001
12001
  }, {
12002
12002
  key: "update",
12003
12003
  value: function update(e, t, i) {
12004
12004
  var s = e.messageToElements[i];
12005
12005
  if (s) {
12006
- if (de.isElementActive(s[1])) return console.error("Cannot update a message that is being streamed");
12007
- t.text && de.updateTextMessage(e, s, t.text), t.files ? de.updateFileMessages(e, s, t.files) : de.removeFilesMessages(e, s), t.html && de.updateHTMLMessage(e, s, t.html), !t.text && s[1].text && de.removeTextHTMLMessage(e, s, "text"), !t.html && s[1].html && de.removeTextHTMLMessage(e, s, "html");
12006
+ if (he.isElementActive(s[1])) return console.error("Cannot update a message that is being streamed");
12007
+ t.text && he.updateTextMessage(e, s, t.text), t.files ? he.updateFileMessages(e, s, t.files) : he.removeFilesMessages(e, s), t.html && he.updateHTMLMessage(e, s, t.html), !t.text && s[1].text && he.removeTextHTMLMessage(e, s, "text"), !t.html && s[1].html && he.removeTextHTMLMessage(e, s, "html");
12008
12008
  var r = e.messageElementRefs,
12009
12009
  o = e.avatars,
12010
12010
  a = e.names;
@@ -12031,19 +12031,19 @@ var na = /*#__PURE__*/function () {
12031
12031
  }
12032
12032
  }]);
12033
12033
  }();
12034
- var ue = /*#__PURE__*/function (_fe) {
12035
- function ue(e, t, i) {
12034
+ var fe = /*#__PURE__*/function (_pe) {
12035
+ function fe(e, t, i) {
12036
12036
  var _this59;
12037
- _classCallCheck(this, ue);
12037
+ _classCallCheck(this, fe);
12038
12038
  var a, l;
12039
- _this59 = _callSuper(this, ue, [e]);
12039
+ _this59 = _callSuper(this, fe, [e]);
12040
12040
  var s = t.permittedErrorPrefixes,
12041
12041
  r = t.introPanelMarkUp,
12042
12042
  o = t.demo;
12043
- _this59._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this59._onClearMessages = xi.onClearMessages.bind(_this59, e), _this59._onError = xi.onError.bind(_this59, e), _this59._isLoadingMessageAllowed = ue.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this59.setLoadingToggle.bind(_this59)), _this59._permittedErrorPrefixes = s, _this59.addSetupMessageIfNeeded(e, t) || _this59.populateIntroPanel(i, r, e.introPanelStyle), o && _this59.prepareDemo(ne.processDemo(o), e.loadHistory), _this59.addIntroductoryMessages(e, t), new ri(e, _this59, t), _this59._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
12044
- return JSON.parse(JSON.stringify(_this59.messageToElements.map(function (_ref35) {
12045
- var _ref36 = _slicedToArray(_ref35, 1),
12046
- c = _ref36[0];
12043
+ _this59._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this59._onClearMessages = xi.onClearMessages.bind(_this59, e), _this59._onError = xi.onError.bind(_this59, e), _this59._isLoadingMessageAllowed = fe.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this59.setLoadingToggle.bind(_this59)), _this59._permittedErrorPrefixes = s, _this59.addSetupMessageIfNeeded(e, t) || _this59.populateIntroPanel(i, r, e.introPanelStyle), o && _this59.prepareDemo(ne.processDemo(o), e.loadHistory), _this59.addIntroductoryMessages(e, t), new ri(e, _this59, t), _this59._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
12044
+ return JSON.parse(JSON.stringify(_this59.messageToElements.map(function (_ref34) {
12045
+ var _ref35 = _slicedToArray(_ref34, 1),
12046
+ c = _ref35[0];
12047
12047
  return c;
12048
12048
  })));
12049
12049
  }, e.clearMessages = _this59.clearMessages.bind(_this59, t), e.refreshMessages = _this59.refreshTextMessages.bind(_this59, e.remarkable), e.scrollToBottom = ee.scrollToBottom.bind(_this59, _this59.elementRef), e.addMessage = function (c, d) {
@@ -12051,18 +12051,18 @@ var ue = /*#__PURE__*/function (_fe) {
12051
12051
  sendUpdate: !!d
12052
12052
  }), !d);
12053
12053
  }, e.updateMessage = function (c, d) {
12054
- return de.update(_this59, c, d);
12054
+ return he.update(_this59, c, d);
12055
12055
  }, t.isWebModel() && t.setUpMessages(_this59), e.textToSpeech && vt.processConfig(e.textToSpeech, function (c) {
12056
12056
  _this59.textToSpeech = c;
12057
12057
  });
12058
12058
  return _this59;
12059
12059
  }
12060
- _inherits(ue, _fe);
12061
- return _createClass(ue, [{
12060
+ _inherits(fe, _pe);
12061
+ return _createClass(fe, [{
12062
12062
  key: "setLoadingToggle",
12063
12063
  value: function setLoadingToggle() {
12064
12064
  var e = this.messageElementRefs[this.messageElementRefs.length - 1];
12065
- fe.isLoadingMessage(e) ? this.removeLastMessage() : this.addLoadingMessage(!0);
12065
+ pe.isLoadingMessage(e) ? this.removeLastMessage() : this.addLoadingMessage(!0);
12066
12066
  }
12067
12067
  }, {
12068
12068
  key: "prepareDemo",
@@ -12071,7 +12071,7 @@ var ue = /*#__PURE__*/function (_fe) {
12071
12071
  if (_typeof(e) == "object") {
12072
12072
  if (!t && e.displayLoading) {
12073
12073
  var s = e.displayLoading.history;
12074
- s != null && s.small && De.addMessage(this, !1), s != null && s.full && De.addMessage(this);
12074
+ s != null && s.small && Be.addMessage(this, !1), s != null && s.full && Be.addMessage(this);
12075
12075
  }
12076
12076
  e.displayErrors && (e.displayErrors["default"] && this.addNewErrorMessage("", ""), e.displayErrors.service && this.addNewErrorMessage("service", ""), e.displayErrors.speechToText && this.addNewErrorMessage("speechToText", "")), (i = e.displayLoading) != null && i.message && this.addLoadingMessage(), e.response && (this.customDemoResponse = e.response);
12077
12077
  }
@@ -12108,13 +12108,13 @@ var ue = /*#__PURE__*/function (_fe) {
12108
12108
  value: function addIntroductoryMessage(e, t) {
12109
12109
  var s;
12110
12110
  var i;
12111
- return e != null && e.text ? i = this.createAndAppendNewMessageElement(e.text, v.AI_ROLE) : e != null && e.html && (i = xe.add(this, e.html, v.AI_ROLE, this.messageElementRefs)), i && (this.applyCustomStyles(i, v.AI_ROLE, !1, (s = this.messageStyles) == null ? void 0 : s.intro), i.outerContainer.classList.add(fe.INTRO_CLASS), t && (i.outerContainer.style.display = "none")), i;
12111
+ return e != null && e.text ? i = this.createAndAppendNewMessageElement(e.text, v.AI_ROLE) : e != null && e.html && (i = we.add(this, e.html, v.AI_ROLE, this.messageElementRefs)), i && (this.applyCustomStyles(i, v.AI_ROLE, !1, (s = this.messageStyles) == null ? void 0 : s.intro), i.outerContainer.classList.add(pe.INTRO_CLASS), t && (i.outerContainer.style.display = "none")), i;
12112
12112
  }
12113
12113
  }, {
12114
12114
  key: "removeIntroductoryMessage",
12115
12115
  value: function removeIntroductoryMessage() {
12116
12116
  var e = this.messageElementRefs[0];
12117
- e.outerContainer.classList.contains(fe.INTRO_CLASS) && (e.outerContainer.remove(), this.messageElementRefs.shift());
12117
+ e.outerContainer.classList.contains(pe.INTRO_CLASS) && (e.outerContainer.remove(), this.messageElementRefs.shift());
12118
12118
  }
12119
12119
  }, {
12120
12120
  key: "addAnyMessage",
@@ -12123,21 +12123,39 @@ var ue = /*#__PURE__*/function (_fe) {
12123
12123
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12124
12124
  return e.error ? this.addNewErrorMessage("service", e.error, i) : this.addNewMessage(e, t, i);
12125
12125
  }
12126
+ }, {
12127
+ key: "tryAddTextMessage",
12128
+ value: function tryAddTextMessage(e, t, i) {
12129
+ var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
12130
+ var r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
12131
+ !i.ignoreText && e.text !== void 0 && i.text !== null && (this.addNewTextMessage(e.text, e.role, t, r), !s && this.textToSpeech && e.role !== v.USER_ROLE && vt.speak(e.text, this.textToSpeech));
12132
+ }
12133
+ }, {
12134
+ key: "tryAddFileMessages",
12135
+ value: function tryAddFileMessages(e) {
12136
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
12137
+ e.files && Array.isArray(e.files) && Bi.addMessages(this, e.files, e.role, t);
12138
+ }
12139
+ }, {
12140
+ key: "tryAddHTMLMessage",
12141
+ value: function tryAddHTMLMessage(e, t) {
12142
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12143
+ if (e.html !== void 0 && e.html !== null) {
12144
+ var s = we.add(this, e.html, e.role, this.messageElementRefs, t, i);
12145
+ De.isElementTemporary(s) && delete e.html;
12146
+ }
12147
+ }
12126
12148
  // this should not be activated by streamed messages
12127
12149
  }, {
12128
12150
  key: "addNewMessage",
12129
12151
  value: function addNewMessage(e) {
12130
12152
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
12131
12153
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12132
- var s = ue.createMessageContent(e),
12154
+ var s = fe.createMessageContent(e),
12133
12155
  r = {
12134
12156
  status: e.overwrite
12135
12157
  };
12136
- if (!e.ignoreText && s.text !== void 0 && e.text !== null && (this.addNewTextMessage(s.text, s.role, r, i), !t && this.textToSpeech && s.role !== v.USER_ROLE && vt.speak(s.text, this.textToSpeech)), s.files && Array.isArray(s.files) && Bi.addMessages(this, s.files, s.role, i), s.html !== void 0 && s.html !== null) {
12137
- var o = xe.add(this, s.html, s.role, this.messageElementRefs, r, i);
12138
- Ne.isElementTemporary(o) && delete s.html;
12139
- }
12140
- return this.isValidMessageContent(s) && !i && this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), s;
12158
+ return i ? (this.tryAddHTMLMessage(s, r, i), this.tryAddFileMessages(s, i), this.tryAddTextMessage(s, r, e, t, i)) : (this.tryAddTextMessage(s, r, e, t, i), this.tryAddFileMessages(s, i), this.tryAddHTMLMessage(s, r, i)), this.isValidMessageContent(s) && !i && this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), s;
12141
12159
  }
12142
12160
  }, {
12143
12161
  key: "isValidMessageContent",
@@ -12161,7 +12179,7 @@ var ue = /*#__PURE__*/function (_fe) {
12161
12179
  value: function removeMessageOnError() {
12162
12180
  var e = this.messageElementRefs[this.messageElementRefs.length - 1],
12163
12181
  t = e == null ? void 0 : e.bubbleElement;
12164
- (t != null && t.classList.contains(Ae.MESSAGE_CLASS) && t.textContent === "" || ue.isTemporaryElement(e)) && this.removeLastMessage();
12182
+ (t != null && t.classList.contains(Ce.MESSAGE_CLASS) && t.textContent === "" || fe.isTemporaryElement(e)) && this.removeLastMessage();
12165
12183
  }
12166
12184
  // prettier-ignore
12167
12185
  }, {
@@ -12183,13 +12201,13 @@ var ue = /*#__PURE__*/function (_fe) {
12183
12201
  key: "getPermittedMessage",
12184
12202
  value: function getPermittedMessage(e) {
12185
12203
  if (e) {
12186
- var t = ue.extractErrorMessages(e);
12204
+ var t = fe.extractErrorMessages(e);
12187
12205
  for (var _i6 = 0; _i6 < t.length; _i6 += 1) {
12188
12206
  var s = t[_i6];
12189
12207
  if (typeof s == "string") {
12190
12208
  if (this._displayServiceErrorMessages) return s;
12191
12209
  if (this._permittedErrorPrefixes) {
12192
- var r = ue.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, s);
12210
+ var r = fe.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, s);
12193
12211
  if (r) return r;
12194
12212
  }
12195
12213
  }
@@ -12206,9 +12224,9 @@ var ue = /*#__PURE__*/function (_fe) {
12206
12224
  value: function addDefaultLoadingMessage() {
12207
12225
  var e = this.createMessageElements("", v.AI_ROLE),
12208
12226
  t = e.bubbleElement;
12209
- e.bubbleElement.classList.add(Pe.DOTS_CONTAINER_CLASS);
12227
+ e.bubbleElement.classList.add(Ne.DOTS_CONTAINER_CLASS);
12210
12228
  var i = document.createElement("div");
12211
- return i.classList.add("loading-message-dots"), t.appendChild(i), Pe.setDots(t, this.messageStyles), e;
12229
+ return i.classList.add("loading-message-dots"), t.appendChild(i), Ne.setDots(t, this.messageStyles), e;
12212
12230
  }
12213
12231
  }, {
12214
12232
  key: "addLoadingMessage",
@@ -12216,10 +12234,10 @@ var ue = /*#__PURE__*/function (_fe) {
12216
12234
  var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
12217
12235
  var r, o, a, l, c, d;
12218
12236
  var t = this.messageElementRefs[this.messageElementRefs.length - 1];
12219
- if (fe.isLoadingMessage(t) || !e && !this._isLoadingMessageAllowed) return;
12237
+ if (pe.isLoadingMessage(t) || !e && !this._isLoadingMessageAllowed) return;
12220
12238
  var i = (a = (o = (r = this.messageStyles) == null ? void 0 : r.loading) == null ? void 0 : o.message) == null ? void 0 : a.html,
12221
- s = i ? xe.createElements(this, i, v.AI_ROLE, !1) : this.addDefaultLoadingMessage();
12222
- this.appendOuterContainerElemet(s.outerContainer), s.bubbleElement.classList.add(Pe.BUBBLE_CLASS), this.applyCustomStyles(s, v.AI_ROLE, !1, (d = (c = (l = this.messageStyles) == null ? void 0 : l.loading) == null ? void 0 : c.message) == null ? void 0 : d.styles), this.focusMode || ee.scrollToBottom(this.elementRef);
12239
+ s = i ? we.createElements(this, i, v.AI_ROLE, !1) : this.addDefaultLoadingMessage();
12240
+ this.appendOuterContainerElemet(s.outerContainer), s.bubbleElement.classList.add(Ne.BUBBLE_CLASS), this.applyCustomStyles(s, v.AI_ROLE, !1, (d = (c = (l = this.messageStyles) == null ? void 0 : l.loading) == null ? void 0 : c.message) == null ? void 0 : d.styles), this.focusMode || ee.scrollToBottom(this.elementRef);
12223
12241
  }
12224
12242
  }, {
12225
12243
  key: "populateIntroPanel",
@@ -12274,22 +12292,22 @@ var ue = /*#__PURE__*/function (_fe) {
12274
12292
  var r, o;
12275
12293
  var i = [];
12276
12294
  this.messageElementRefs.forEach(function (a) {
12277
- ue.isActiveElement(a.bubbleElement.classList) ? i.push(a) : a.outerContainer.remove();
12295
+ fe.isActiveElement(a.bubbleElement.classList) ? i.push(a) : a.outerContainer.remove();
12278
12296
  }), Array.from(this.elementRef.children).forEach(function (a) {
12279
12297
  var c;
12280
12298
  var l = (c = a.children[0]) == null ? void 0 : c.children[0];
12281
12299
  l != null && l.classList.contains(v.ERROR_MESSAGE_TEXT_CLASS) && a.remove();
12282
12300
  }), this.messageElementRefs = i;
12283
12301
  var s = this.messageToElements.filter(function (a) {
12284
- return a[1].text && ue.isActiveElement(a[1].text.bubbleElement.classList) || a[1].html && ue.isActiveElement(a[1].html.bubbleElement.classList);
12302
+ return a[1].text && fe.isActiveElement(a[1].text.bubbleElement.classList) || a[1].html && fe.isActiveElement(a[1].html.bubbleElement.classList);
12285
12303
  });
12286
12304
  (_this$messageToElemen = this.messageToElements).splice.apply(_this$messageToElemen, [0, this.messageToElements.length].concat(_toConsumableArray(s))), t !== !1 && ((r = this._introPanel) != null && r._elementRef && this._introPanel.display(), this.addIntroductoryMessages()), (o = this._onClearMessages) == null || o.call(this), delete e.sessionId;
12287
12305
  }
12288
12306
  }], [{
12289
12307
  key: "getDefaultDisplayLoadingMessage",
12290
12308
  value: function getDefaultDisplayLoadingMessage(e, t) {
12291
- var _ref37;
12292
- return t.websocket ? !!e.displayLoadingBubble : (_ref37 = _typeof(e.displayLoadingBubble) == "object" || e.displayLoadingBubble) !== null && _ref37 !== void 0 ? _ref37 : !0;
12309
+ var _ref36;
12310
+ return t.websocket ? !!e.displayLoadingBubble : (_ref36 = _typeof(e.displayLoadingBubble) == "object" || e.displayLoadingBubble) !== null && _ref36 !== void 0 ? _ref36 : !0;
12293
12311
  }
12294
12312
  }, {
12295
12313
  key: "checkPermittedErrorPrefixes",
@@ -12304,10 +12322,10 @@ var ue = /*#__PURE__*/function (_fe) {
12304
12322
  }, {
12305
12323
  key: "isActiveElement",
12306
12324
  value: function isActiveElement(e) {
12307
- return e ? e.contains(Pe.BUBBLE_CLASS) || e.contains(De.CLASS) || e.contains(Ae.MESSAGE_CLASS) : !1;
12325
+ return e ? e.contains(Ne.BUBBLE_CLASS) || e.contains(Be.CLASS) || e.contains(Ce.MESSAGE_CLASS) : !1;
12308
12326
  }
12309
12327
  }]);
12310
- }(fe);
12328
+ }(pe);
12311
12329
  var H = /*#__PURE__*/function () {
12312
12330
  function H() {
12313
12331
  _classCallCheck(this, H);
@@ -12379,7 +12397,8 @@ var St = /*#__PURE__*/function () {
12379
12397
  }
12380
12398
  }]);
12381
12399
  }();
12382
- var Ys = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"];
12400
+ var Ys = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"],
12401
+ Nn = "<?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";
12383
12402
  var Rs = /*#__PURE__*/function () {
12384
12403
  function Rs() {
12385
12404
  _classCallCheck(this, Rs);
@@ -12405,108 +12424,67 @@ var Rs = /*#__PURE__*/function () {
12405
12424
  var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12406
12425
  var t = {
12407
12426
  "default": {
12408
- item: {
12409
- hover: {
12410
- backgroundColor: "#f3f3f3"
12411
- },
12412
- click: {
12413
- backgroundColor: "#ebebeb"
12414
- }
12415
- }
12427
+ item: {}
12416
12428
  },
12417
12429
  active: {
12418
- item: {
12419
- "default": {
12420
- backgroundColor: "#edf7ff",
12421
- color: "#0285ff"
12422
- },
12423
- hover: {
12424
- backgroundColor: "#def0ff"
12425
- },
12426
- click: {
12427
- backgroundColor: "#d2eaff"
12428
- }
12429
- },
12430
- iconContainer: {
12431
- filter:
12432
- // eslint-disable-next-line max-len
12433
- "brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)"
12434
- }
12430
+ item: {}
12435
12431
  },
12436
- disabled: {
12437
- item: {
12438
- "default": {
12439
- color: "#aeaeae",
12440
- cursor: "auto"
12441
- }
12442
- },
12443
- iconContainer: {
12444
- filter:
12445
- // eslint-disable-next-line max-len
12446
- "brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)"
12447
- }
12448
- }
12432
+ disabled: {}
12449
12433
  };
12450
- return Rs.applyCustomStylesToDefault(t, e), t;
12434
+ return Rs.applyCustomStylesToDefault(t, e), e;
12451
12435
  }
12452
12436
  }]);
12453
12437
  }();
12454
- var Nn = "<?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",
12455
- _e = /*#__PURE__*/function () {
12456
- function _e() {
12457
- _classCallCheck(this, _e);
12458
- }
12459
- return _createClass(_e, null, [{
12460
- key: "addItemEvents",
12461
- value: function addItemEvents(e, t, i, s) {
12462
- Ge.add(t, s), t.addEventListener("click", function () {
12463
- i.click();
12464
- }), t.addEventListener("mouseenter", function (r) {
12465
- e.highlightedItem = r.target;
12466
- }), t.addEventListener("mouseleave", function () {
12467
- e.highlightedItem = void 0;
12468
- });
12469
- }
12470
- }, {
12471
- key: "createItemText",
12472
- value: function createItemText(e, t) {
12473
- var i = document.createElement("div");
12474
- return Object.assign(i.style, t), i.classList.add("dropup-menu-item-text"), i.textContent = e || "File", i;
12475
- }
12476
- }, {
12477
- key: "createItemIcon",
12478
- value: function createItemIcon(e, t) {
12479
- var i = document.createElement("div");
12480
- return Object.assign(i.style, t), i.classList.add("dropup-menu-item-icon"), i.appendChild(e.children[0]), i;
12481
- }
12482
- }, {
12483
- key: "populateItem",
12484
- value: function populateItem(e, t, i, s) {
12485
- var r = e.children[0];
12486
- r.classList.contains("text-button") ? t.appendChild(_e.createItemText(r.textContent, s == null ? void 0 : s.text)) : (t.appendChild(_e.createItemIcon(e, s == null ? void 0 : s.iconContainer)), t.appendChild(_e.createItemText(i, s == null ? void 0 : s.text)));
12487
- }
12488
- // prettier-ignore
12489
- }, {
12490
- key: "createItem",
12491
- value: function createItem(e, t, i) {
12492
- var a;
12493
- var s = t.elementRef,
12494
- r = t.dropupText,
12495
- o = document.createElement("div");
12496
- if (Object.assign(o.style, (a = i == null ? void 0 : i.item) == null ? void 0 : a["default"]), _e.populateItem(s, o, r, i), o.classList.add(_e.MENU_ITEM_CLASS), s.classList.contains(Ke.BUTTOM_CLASS)) t.setDropupItem(o);else {
12497
- var l = O.processStateful((i == null ? void 0 : i.item) || {}, {
12498
- backgroundColor: "#f3f3f3"
12499
- }, {
12500
- backgroundColor: "#ebebeb"
12501
- });
12502
- _e.addItemEvents(e, o, s, l);
12503
- }
12504
- return o;
12438
+ var ye = /*#__PURE__*/function () {
12439
+ function ye() {
12440
+ _classCallCheck(this, ye);
12441
+ }
12442
+ return _createClass(ye, null, [{
12443
+ key: "addItemEvents",
12444
+ value: function addItemEvents(e, t, i, s) {
12445
+ Ve.add(t, s), t.addEventListener("click", function () {
12446
+ i.click();
12447
+ }), t.addEventListener("mouseenter", function (r) {
12448
+ e.highlightedItem = r.target;
12449
+ }), t.addEventListener("mouseleave", function () {
12450
+ e.highlightedItem = void 0;
12451
+ });
12452
+ }
12453
+ }, {
12454
+ key: "createItemText",
12455
+ value: function createItemText(e, t) {
12456
+ var i = document.createElement("div");
12457
+ return Object.assign(i.style, t), i.classList.add("dropup-menu-item-text"), i.textContent = e || "File", i;
12458
+ }
12459
+ }, {
12460
+ key: "createItemIcon",
12461
+ value: function createItemIcon(e, t) {
12462
+ var i = document.createElement("div");
12463
+ return Object.assign(i.style, t), i.classList.add("dropup-menu-item-icon"), i.appendChild(e.children[0]), i;
12464
+ }
12465
+ }, {
12466
+ key: "populateItem",
12467
+ value: function populateItem(e, t, i, s) {
12468
+ var r = e.children[0];
12469
+ r.classList.contains("text-button") ? t.appendChild(ye.createItemText(r.textContent, s == null ? void 0 : s.text)) : (t.appendChild(ye.createItemIcon(e, s == null ? void 0 : s.iconContainer)), t.appendChild(ye.createItemText(i, s == null ? void 0 : s.text)));
12470
+ }
12471
+ }, {
12472
+ key: "createItem",
12473
+ value: function createItem(e, t, i) {
12474
+ var a;
12475
+ var s = t.elementRef,
12476
+ r = t.dropupText,
12477
+ o = document.createElement("div");
12478
+ if (Object.assign(o.style, (a = i == null ? void 0 : i.item) == null ? void 0 : a["default"]), ye.populateItem(s, o, r, i), o.classList.add(ye.MENU_ITEM_CLASS), s.classList.contains(Ke.BUTTON_CLASS)) t.setDropupItem(o);else {
12479
+ var l = O.processStateful((i == null ? void 0 : i.item) || {});
12480
+ ye.addItemEvents(e, o, s, l);
12505
12481
  }
12506
- }]);
12507
- }();
12508
- _e.MENU_ITEM_CLASS = "dropup-menu-item", _e.DISABLED_ITEM_CLASS = "dropup-menu-item-disabled";
12509
- var Ve = _e;
12482
+ return o;
12483
+ }
12484
+ }]);
12485
+ }();
12486
+ ye.MENU_ITEM_CLASS = "dropup-menu-item", ye.DISABLED_ITEM_CLASS = "dropup-menu-item-disabled", ye.ACTIVE_ITEM_CLASS = "dropup-menu-item-active";
12487
+ var ce = ye;
12510
12488
  var bt = /*#__PURE__*/function (_ct2) {
12511
12489
  function bt(e, t) {
12512
12490
  var _this61;
@@ -12570,28 +12548,29 @@ var bt = /*#__PURE__*/function (_ct2) {
12570
12548
  }, {
12571
12549
  key: "assignDropupItemStyle",
12572
12550
  value: function assignDropupItemStyle(e) {
12573
- this.elementRef.parentElement && this._originalElementRef && (this.elementRef = ie.replaceElementWithNewClone(this.elementRef, this._originalElementRef)), Object.assign(this.elementRef.style, e.item["default"]);
12574
- var t = O.processStateful(e.item, e.item.hover || {}, e.item.click || {});
12575
- Ge.add(this.elementRef, t), this.addClickListener();
12551
+ var s;
12552
+ this.elementRef.parentElement && this._originalElementRef && (this.elementRef = ie.replaceElementWithNewClone(this.elementRef, this._originalElementRef)), Object.assign(this.elementRef.style, (s = e == null ? void 0 : e.item) == null ? void 0 : s["default"]);
12553
+ var t = O.processStateful((e == null ? void 0 : e.item) || {});
12554
+ Ve.add(this.elementRef, t), this.addClickListener();
12576
12555
  var i = this.elementRef.children[0];
12577
- i.classList.contains("text-button") || Object.assign(i.style, e.iconContainer);
12556
+ i.classList.contains("text-button") || Object.assign(i.style, e == null ? void 0 : e.iconContainer);
12578
12557
  }
12579
12558
  }, {
12580
12559
  key: "changeToDefault",
12581
12560
  value: function changeToDefault(e) {
12582
12561
  var t, i, s, r;
12583
- !e && this._state === "default" || (this.elementRef.classList.contains(Ve.MENU_ITEM_CLASS) ? this.assignDropupItemStyle(this._dropupStyles["default"]) : (this.elementRef.replaceChildren(this._innerElements["default"]), (t = this._customStyles) != null && t.active && D.unsetAllCSS(this.elementRef, (i = this._customStyles) == null ? void 0 : i.active), (s = this._customStyles) != null && s.disabled && D.unsetAllCSS(this.elementRef, (r = this._customStyles) == null ? void 0 : r.disabled), this.reapplyStateStyle("default", ["active", "disabled"])), P.removeAriaDisabled(this.elementRef), this._state = "default");
12562
+ !e && this._state === "default" || (this.elementRef.classList.contains(ce.MENU_ITEM_CLASS) ? (this.assignDropupItemStyle(this._dropupStyles["default"]), this.elementRef.classList.remove(ce.DISABLED_ITEM_CLASS), this.elementRef.classList.remove(ce.ACTIVE_ITEM_CLASS)) : (this.elementRef.replaceChildren(this._innerElements["default"]), (t = this._customStyles) != null && t.active && D.unsetAllCSS(this.elementRef, (i = this._customStyles) == null ? void 0 : i.active), (s = this._customStyles) != null && s.disabled && D.unsetAllCSS(this.elementRef, (r = this._customStyles) == null ? void 0 : r.disabled), this.reapplyStateStyle("default", ["active", "disabled"])), P.removeAriaDisabled(this.elementRef), this._state = "default");
12584
12563
  }
12585
12564
  }, {
12586
12565
  key: "changeToActive",
12587
12566
  value: function changeToActive(e) {
12588
- !e && this._state === "active" || (this.elementRef.classList.contains(Ve.MENU_ITEM_CLASS) ? this.assignDropupItemStyle(this._dropupStyles.active) : (this.elementRef.replaceChildren(this._innerElements.active), this.reapplyStateStyle("active", ["disabled", "default"])), P.removeAriaDisabled(this.elementRef), this._state = "active");
12567
+ !e && this._state === "active" || (this.elementRef.classList.contains(ce.MENU_ITEM_CLASS) ? (this.assignDropupItemStyle(this._dropupStyles.active), this.elementRef.classList.remove(ce.DISABLED_ITEM_CLASS), this.elementRef.classList.add(ce.ACTIVE_ITEM_CLASS)) : (this.elementRef.replaceChildren(this._innerElements.active), this.reapplyStateStyle("active", ["disabled", "default"])), P.removeAriaDisabled(this.elementRef), this._state = "active");
12589
12568
  }
12590
12569
  }, {
12591
12570
  key: "changeToDisabled",
12592
12571
  value: function changeToDisabled(e) {
12593
12572
  var t, i, s, r;
12594
- !e && this._state === "disabled" || (this.elementRef.classList.contains(Ve.MENU_ITEM_CLASS) ? (this.elementRef.classList.add(Ve.DISABLED_ITEM_CLASS), this.assignDropupItemStyle(this._dropupStyles.disabled)) : (this.elementRef.replaceChildren(this._innerElements.disabled), (t = this._customStyles) != null && t.active && D.unsetAllCSS(this.elementRef, (i = this._customStyles) == null ? void 0 : i.active), (s = this._customStyles) != null && s["default"] && D.unsetAllCSS(this.elementRef, (r = this._customStyles) == null ? void 0 : r["default"]), this.reapplyStateStyle("disabled", ["default", "active"])), P.addAriaDisabled(this.elementRef), this._state = "disabled");
12573
+ !e && this._state === "disabled" || (this.elementRef.classList.contains(ce.MENU_ITEM_CLASS) ? (this.assignDropupItemStyle(this._dropupStyles.disabled), this.elementRef.classList.remove(ce.ACTIVE_ITEM_CLASS), this.elementRef.classList.add(ce.DISABLED_ITEM_CLASS)) : (this.elementRef.replaceChildren(this._innerElements.disabled), (t = this._customStyles) != null && t.active && D.unsetAllCSS(this.elementRef, (i = this._customStyles) == null ? void 0 : i.active), (s = this._customStyles) != null && s["default"] && D.unsetAllCSS(this.elementRef, (r = this._customStyles) == null ? void 0 : r["default"]), this.reapplyStateStyle("disabled", ["default", "active"])), P.addAriaDisabled(this.elementRef), this._state = "disabled");
12595
12574
  }
12596
12575
  }, {
12597
12576
  key: "setDropupItem",
@@ -12602,11 +12581,11 @@ var bt = /*#__PURE__*/function (_ct2) {
12602
12581
  key: "createButtonElement",
12603
12582
  value: function createButtonElement() {
12604
12583
  var e = document.createElement("div");
12605
- return e.classList.add("input-button"), e.classList.add(bt.BUTTOM_CLASS), e;
12584
+ return e.classList.add("input-button"), e.classList.add(bt.BUTTON_CLASS), e;
12606
12585
  }
12607
12586
  }]);
12608
12587
  }(ct);
12609
- bt.INDICATOR_PREFIX = "custom", bt.BUTTOM_CLASS = "custom-button";
12588
+ bt.INDICATOR_PREFIX = "custom", bt.BUTTON_CLASS = "custom-button";
12610
12589
  var Ke = bt;
12611
12590
  var ra = "<?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>";
12612
12591
  var ai = /*#__PURE__*/function () {
@@ -12657,7 +12636,7 @@ var Ms = /*#__PURE__*/function () {
12657
12636
  }, {
12658
12637
  key: "addItem",
12659
12638
  value: function addItem(e) {
12660
- var t = Ve.createItem(this, e, this._styles);
12639
+ var t = ce.createItem(this, e, this._styles);
12661
12640
  this.elementRef.appendChild(t);
12662
12641
  }
12663
12642
  // prettier-ignore
@@ -12687,24 +12666,24 @@ var Ms = /*#__PURE__*/function () {
12687
12666
  }
12688
12667
  }]);
12689
12668
  }();
12690
- var ze = /*#__PURE__*/function (_ct3) {
12691
- function ze(e, t) {
12669
+ var Ge = /*#__PURE__*/function (_ct3) {
12670
+ function Ge(e, t) {
12692
12671
  var _this65;
12693
- _classCallCheck(this, ze);
12672
+ _classCallCheck(this, Ge);
12694
12673
  var s;
12695
- _this65 = _callSuper(this, ze, [ze.createButtonElement(), void 0, {
12674
+ _this65 = _callSuper(this, Ge, [Ge.createButtonElement(), void 0, {
12696
12675
  styles: (s = t == null ? void 0 : t.button) == null ? void 0 : s.styles
12697
12676
  }]);
12698
12677
  var i = _this65.createInnerElements(_this65._customStyles);
12699
- _this65._menu = new Ms(e, t == null ? void 0 : t.menu), _this65.addClickEvent(), _this65.buttonContainer = ze.createButtonContainer(), _this65.elementRef.appendChild(i.styles), _this65.buttonContainer.appendChild(_this65.elementRef), _this65.elementRef.classList.add(ze.BUTTON_ICON_CLASS, "upload-file-button"), _this65.elementRef.children[0].id = "dropup-icon", _this65.buttonContainer.appendChild(_this65._menu.elementRef), _this65.reapplyStateStyle("styles"), _this65.addContainerEvents(e);
12678
+ _this65._menu = new Ms(e, t == null ? void 0 : t.menu), _this65.addClickEvent(), _this65.buttonContainer = Ge.createButtonContainer(), _this65.elementRef.appendChild(i.styles), _this65.buttonContainer.appendChild(_this65.elementRef), _this65.elementRef.classList.add(Ge.BUTTON_ICON_CLASS, "upload-file-button"), _this65.elementRef.children[0].id = "dropup-icon", _this65.buttonContainer.appendChild(_this65._menu.elementRef), _this65.reapplyStateStyle("styles"), _this65.addContainerEvents(e);
12700
12679
  return _this65;
12701
12680
  }
12702
- _inherits(ze, _ct3);
12703
- return _createClass(ze, [{
12681
+ _inherits(Ge, _ct3);
12682
+ return _createClass(Ge, [{
12704
12683
  key: "createInnerElements",
12705
12684
  value: function createInnerElements(e) {
12706
12685
  return {
12707
- styles: this.createInnerElement(ze.createSVGIconElement(), "styles", e)
12686
+ styles: this.createInnerElement(Ge.createSVGIconElement(), "styles", e)
12708
12687
  };
12709
12688
  }
12710
12689
  }, {
@@ -12728,7 +12707,7 @@ var ze = /*#__PURE__*/function (_ct3) {
12728
12707
  var _this66 = this;
12729
12708
  e.addEventListener("click", function (t) {
12730
12709
  var i = t.target.classList;
12731
- !i.contains(ze.BUTTON_ICON_CLASS) && !i.contains(Ve.DISABLED_ITEM_CLASS) && _this66._menu.close();
12710
+ !i.contains(Ge.BUTTON_ICON_CLASS) && !i.contains(ce.DISABLED_ITEM_CLASS) && _this66._menu.close();
12732
12711
  });
12733
12712
  }
12734
12713
  }], [{
@@ -12756,8 +12735,8 @@ var ze = /*#__PURE__*/function (_ct3) {
12756
12735
  }
12757
12736
  }]);
12758
12737
  }(ct);
12759
- ze.BUTTON_ICON_CLASS = "dropup-icon";
12760
- var Fi = ze;
12738
+ Ge.BUTTON_ICON_CLASS = "dropup-icon";
12739
+ var Fi = Ge;
12761
12740
  var X = /*#__PURE__*/function () {
12762
12741
  function X() {
12763
12742
  _classCallCheck(this, X);
@@ -12774,8 +12753,8 @@ var X = /*#__PURE__*/function () {
12774
12753
  }),
12775
12754
  c = t["dropup-menu"][l];
12776
12755
  c && (r.addItem(c.button), t["dropup-menu"].splice(l, 1));
12777
- }), t["dropup-menu"].forEach(function (_ref38) {
12778
- var a = _ref38.button;
12756
+ }), t["dropup-menu"].forEach(function (_ref37) {
12757
+ var a = _ref37.button;
12779
12758
  return r.addItem(a);
12780
12759
  });
12781
12760
  var o = Fi.getPosition(t, s);
@@ -14360,32 +14339,32 @@ var ti = /*#__PURE__*/function (_li) {
14360
14339
  }(li);
14361
14340
  ti.MICROPHONE_RESET_TIMEOUT_MS = 300;
14362
14341
  var ci = ti;
14363
- var Oe = /*#__PURE__*/function () {
14342
+ var Pe = /*#__PURE__*/function () {
14364
14343
  // prettier-ignore
14365
- function Oe(e, t, i, s) {
14344
+ function Pe(e, t, i, s) {
14366
14345
  var _this75 = this;
14367
- _classCallCheck(this, Oe);
14346
+ _classCallCheck(this, Pe);
14368
14347
  this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = s, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
14369
14348
  _this75._validationHandler = e._validationHandler;
14370
14349
  });
14371
14350
  }
14372
- return _createClass(Oe, [{
14351
+ return _createClass(Pe, [{
14373
14352
  key: "attemptAddFile",
14374
14353
  value: function attemptAddFile(e, t) {
14375
- return Oe.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
14354
+ return Pe.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
14376
14355
  }
14377
14356
  }, {
14378
14357
  key: "addAttachmentBasedOnType",
14379
14358
  value: function addAttachmentBasedOnType(e, t, i) {
14380
- var s = Oe.getTypeFromBlob(e);
14359
+ var s = Pe.getTypeFromBlob(e);
14381
14360
  if (s === "image") {
14382
- var r = Oe.createImageAttachment(t);
14361
+ var r = Pe.createImageAttachment(t);
14383
14362
  this.addFileAttachment(e, "image", r, i);
14384
14363
  } else if (s === "audio") {
14385
14364
  var _r2 = di.createAudioAttachment(t);
14386
14365
  this.addFileAttachment(e, "audio", _r2, i);
14387
14366
  } else {
14388
- var _r3 = Oe.createAnyFileAttachment(e.name);
14367
+ var _r3 = Pe.createAnyFileAttachment(e.name);
14389
14368
  this.addFileAttachment(e, "any", _r3, i);
14390
14369
  }
14391
14370
  }
@@ -14393,7 +14372,7 @@ var Oe = /*#__PURE__*/function () {
14393
14372
  key: "addFileAttachment",
14394
14373
  value: function addFileAttachment(e, t, i, s) {
14395
14374
  var a;
14396
- var r = Oe.createContainer(i);
14375
+ var r = Pe.createContainer(i);
14397
14376
  if (this._attachments.length >= this._fileCountLimit) {
14398
14377
  var l = this._attachments[this._attachments.length - 1].removeButton;
14399
14378
  l == null || l.click();
@@ -14493,19 +14472,19 @@ var Oe = /*#__PURE__*/function () {
14493
14472
  }
14494
14473
  }]);
14495
14474
  }();
14496
- var Le = /*#__PURE__*/function (_Oe) {
14475
+ var Ie = /*#__PURE__*/function (_Pe) {
14497
14476
  // prettier-ignore
14498
- function Le(e, t, i, s) {
14499
- _classCallCheck(this, Le);
14500
- return _callSuper(this, Le, [e, t, i, s]);
14477
+ function Ie(e, t, i, s) {
14478
+ _classCallCheck(this, Ie);
14479
+ return _callSuper(this, Ie, [e, t, i, s]);
14501
14480
  }
14502
- _inherits(Le, _Oe);
14503
- return _createClass(Le, [{
14481
+ _inherits(Ie, _Pe);
14482
+ return _createClass(Ie, [{
14504
14483
  key: "createTimer",
14505
14484
  value: function createTimer(e, t) {
14506
14485
  var _this76 = this;
14507
14486
  var i = 0;
14508
- var s = t !== void 0 && t < Le.TIMER_LIMIT_S ? t : Le.TIMER_LIMIT_S;
14487
+ var s = t !== void 0 && t < Ie.TIMER_LIMIT_S ? t : Ie.TIMER_LIMIT_S;
14509
14488
  return setInterval(function () {
14510
14489
  var a;
14511
14490
  i += 1, i === s && ((a = _this76.stopPlaceholderCallback) == null || a.call(_this76), _this76.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
@@ -14517,7 +14496,7 @@ var Le = /*#__PURE__*/function (_Oe) {
14517
14496
  }, {
14518
14497
  key: "createPlaceholderAudioAttachment",
14519
14498
  value: function createPlaceholderAudioAttachment(e) {
14520
- var t = Le.createAudioContainer(),
14499
+ var t = Ie.createAudioContainer(),
14521
14500
  i = document.createElement("div");
14522
14501
  i.classList.add("audio-placeholder-text-3-digits");
14523
14502
  var s = document.createElement("div");
@@ -14554,7 +14533,7 @@ var Le = /*#__PURE__*/function (_Oe) {
14554
14533
  key: "completePlaceholderAttachment",
14555
14534
  value: function completePlaceholderAttachment(e, t) {
14556
14535
  var i = this._activePlaceholderAttachment;
14557
- i && (i.file = e, Le.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
14536
+ i && (i.file = e, Ie.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
14558
14537
  }
14559
14538
  }, {
14560
14539
  key: "removePlaceholderAttachment",
@@ -14594,8 +14573,8 @@ var Le = /*#__PURE__*/function (_Oe) {
14594
14573
  }, {
14595
14574
  key: "createAudioAttachment",
14596
14575
  value: function createAudioAttachment(e) {
14597
- var t = Le.createAudioContainer();
14598
- return Le.addAudioElements(t, e), t;
14576
+ var t = Ie.createAudioContainer();
14577
+ return Ie.addAudioElements(t, e), t;
14599
14578
  }
14600
14579
  }, {
14601
14580
  key: "stopAttachmentPlayback",
@@ -14604,9 +14583,9 @@ var Le = /*#__PURE__*/function (_Oe) {
14604
14583
  (s = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && s.classList.contains("stop-icon") && e.children[0].click();
14605
14584
  }
14606
14585
  }]);
14607
- }(Oe);
14608
- Le.TIMER_LIMIT_S = 5999;
14609
- var di = Le;
14586
+ }(Pe);
14587
+ Ie.TIMER_LIMIT_S = 5999;
14588
+ var di = Ie;
14610
14589
  var Ma = /*#__PURE__*/function () {
14611
14590
  function Ma() {
14612
14591
  _classCallCheck(this, Ma);
@@ -14616,7 +14595,7 @@ var Ma = /*#__PURE__*/function () {
14616
14595
  value:
14617
14596
  // prettier-ignore
14618
14597
  function create(e, t, i, s, r) {
14619
- return r === "audio" ? new di(e, t, i, s) : new Oe(e, t, i, s);
14598
+ return r === "audio" ? new di(e, t, i, s) : new Pe(e, t, i, s);
14620
14599
  }
14621
14600
  }]);
14622
14601
  }();
@@ -14662,7 +14641,7 @@ var pi = /*#__PURE__*/function () {
14662
14641
  case 0:
14663
14642
  _context129.next = 2;
14664
14643
  return Promise.all(this._fileAttachmentsTypes.map(/*#__PURE__*/function () {
14665
- var _ref39 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee128(e) {
14644
+ var _ref38 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee128(e) {
14666
14645
  var t;
14667
14646
  return _regeneratorRuntime().wrap(function _callee128$(_context128) {
14668
14647
  while (1) switch (_context128.prev = _context128.next) {
@@ -14675,7 +14654,7 @@ var pi = /*#__PURE__*/function () {
14675
14654
  }, _callee128);
14676
14655
  }));
14677
14656
  return function (_x233) {
14678
- return _ref39.apply(this, arguments);
14657
+ return _ref38.apply(this, arguments);
14679
14658
  };
14680
14659
  }()));
14681
14660
  case 2:
@@ -14718,12 +14697,12 @@ var pi = /*#__PURE__*/function () {
14718
14697
  }
14719
14698
  }]);
14720
14699
  }();
14721
- var ve = /*#__PURE__*/function () {
14722
- function ve(e, t, i) {
14723
- _classCallCheck(this, ve);
14724
- this._isOpen = !1, this._contentRef = ve.createModalContent(t, i == null ? void 0 : i.backgroundColor), this._buttonPanel = ve.createButtonPanel(i == null ? void 0 : i.backgroundColor), this._elementRef = ve.createContainer(this._contentRef, i), this._elementRef.appendChild(this._buttonPanel), e.appendChild(this._elementRef), this._backgroundPanelRef = ve.createDarkBackgroundPanel(), e.appendChild(this._backgroundPanelRef), this.addWindowEvents(e);
14700
+ var Ee = /*#__PURE__*/function () {
14701
+ function Ee(e, t, i) {
14702
+ _classCallCheck(this, Ee);
14703
+ this._isOpen = !1, this._contentRef = Ee.createModalContent(t, i == null ? void 0 : i.backgroundColor), this._buttonPanel = Ee.createButtonPanel(i == null ? void 0 : i.backgroundColor), this._elementRef = Ee.createContainer(this._contentRef, i), this._elementRef.appendChild(this._buttonPanel), e.appendChild(this._elementRef), this._backgroundPanelRef = Ee.createDarkBackgroundPanel(), e.appendChild(this._backgroundPanelRef), this.addWindowEvents(e);
14725
14704
  }
14726
- return _createClass(ve, [{
14705
+ return _createClass(Ee, [{
14727
14706
  key: "isOpen",
14728
14707
  value: function isOpen() {
14729
14708
  return this._isOpen;
@@ -14745,7 +14724,7 @@ var ve = /*#__PURE__*/function () {
14745
14724
  var _this79 = this;
14746
14725
  this._elementRef.classList.remove("show-modal"), this._elementRef.classList.add("hide-modal"), this._backgroundPanelRef.classList.remove("show-modal-background"), this._backgroundPanelRef.classList.add("hide-modal-background"), this._isOpen = !1, setTimeout(function () {
14747
14726
  _this79._elementRef.style.display = "none", _this79._backgroundPanelRef.style.display = "none";
14748
- }, ve.MODAL_CLOSE_TIMEOUT_MS);
14727
+ }, Ee.MODAL_CLOSE_TIMEOUT_MS);
14749
14728
  }
14750
14729
  }, {
14751
14730
  key: "displayModalElements",
@@ -14761,7 +14740,7 @@ var ve = /*#__PURE__*/function () {
14761
14740
  key: "addCloseButton",
14762
14741
  value: function addCloseButton(e, t, i) {
14763
14742
  var _this80 = this;
14764
- var s = t ? ve.createSVGButton(e) : ve.createTextButton(e);
14743
+ var s = t ? Ee.createSVGButton(e) : Ee.createTextButton(e);
14765
14744
  return this.addButtons(s), s.onclick = function () {
14766
14745
  _this80.close(), setTimeout(function () {
14767
14746
  i == null || i();
@@ -14823,14 +14802,14 @@ var ve = /*#__PURE__*/function () {
14823
14802
  value: function createTextModalFunc(e, t, i) {
14824
14803
  var s;
14825
14804
  if (_typeof(t) == "object" && (s = t.files) != null && s.infoModal) {
14826
- var r = new ve(e, ["modal-content"], t.files.infoModal.containerStyle);
14805
+ var r = new Ee(e, ["modal-content"], t.files.infoModal.containerStyle);
14827
14806
  return r.addCloseButton("OK", !1, i), r.openTextModal.bind(r, t.infoModalTextMarkUp || "");
14828
14807
  }
14829
14808
  }
14830
14809
  }]);
14831
14810
  }();
14832
- ve.MODAL_CLOSE_TIMEOUT_MS = 190;
14833
- var it = ve;
14811
+ Ee.MODAL_CLOSE_TIMEOUT_MS = 190;
14812
+ var it = Ee;
14834
14813
  var Jt = /*#__PURE__*/function (_ct5) {
14835
14814
  // prettier-ignore
14836
14815
  function Jt(e, t, i, s, r, o) {
@@ -14897,15 +14876,15 @@ var Jt = /*#__PURE__*/function (_ct5) {
14897
14876
  }
14898
14877
  }]);
14899
14878
  }(ct);
14900
- var Ie = /*#__PURE__*/function () {
14901
- function Ie() {
14902
- _classCallCheck(this, Ie);
14879
+ var Oe = /*#__PURE__*/function () {
14880
+ function Oe() {
14881
+ _classCallCheck(this, Oe);
14903
14882
  }
14904
- return _createClass(Ie, null, [{
14883
+ return _createClass(Oe, null, [{
14905
14884
  key: "create",
14906
14885
  value: function create(e, t, i) {
14907
- var s = Ie.createElement(i);
14908
- Ie.addEvents(s, e, t), e.appendChild(s);
14886
+ var s = Oe.createElement(i);
14887
+ Oe.addEvents(s, e, t), e.appendChild(s);
14909
14888
  }
14910
14889
  }, {
14911
14890
  key: "createElement",
@@ -14917,13 +14896,13 @@ var Ie = /*#__PURE__*/function () {
14917
14896
  key: "addEvents",
14918
14897
  value: function addEvents(e, t, i) {
14919
14898
  t.ondragenter = function (s) {
14920
- s.preventDefault(), Ie.display(e);
14899
+ s.preventDefault(), Oe.display(e);
14921
14900
  }, e.ondragleave = function (s) {
14922
- s.preventDefault(), Ie.hide(e);
14901
+ s.preventDefault(), Oe.hide(e);
14923
14902
  }, e.ondragover = function (s) {
14924
14903
  s.preventDefault();
14925
14904
  }, e.ondrop = function (s) {
14926
- s.preventDefault(), Ie.uploadFile(i, s), Ie.hide(e);
14905
+ s.preventDefault(), Oe.uploadFile(i, s), Oe.hide(e);
14927
14906
  };
14928
14907
  }
14929
14908
  }, {
@@ -15018,7 +14997,7 @@ var Xe = /*#__PURE__*/function () {
15018
14997
  value: function validateWebsocket(e, t) {
15019
14998
  var i = e.websocket,
15020
14999
  s = e.connectSettings;
15021
- return i && s.url !== Ee.URL && !G.canSendMessage(i) ? (t.changeToDisabledIcon(), !1) : !0;
15000
+ return i && s.url !== _e.URL && !G.canSendMessage(i) ? (t.changeToDisabledIcon(), !1) : !0;
15022
15001
  }
15023
15002
  // prettier-ignore
15024
15003
  }, {
@@ -15026,7 +15005,7 @@ var Xe = /*#__PURE__*/function () {
15026
15005
  value: function attach(e, t, i, s, r) {
15027
15006
  var o = e.validateInput || ne.processValidateInput(e);
15028
15007
  e._validationHandler = /*#__PURE__*/function () {
15029
- var _ref40 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee132(a) {
15008
+ var _ref39 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee132(a) {
15030
15009
  var l;
15031
15010
  return _regeneratorRuntime().wrap(function _callee132$(_context132) {
15032
15011
  while (1) switch (_context132.prev = _context132.next) {
@@ -15046,7 +15025,7 @@ var Xe = /*#__PURE__*/function () {
15046
15025
  }, _callee132);
15047
15026
  }));
15048
15027
  return function (_x241) {
15049
- return _ref40.apply(this, arguments);
15028
+ return _ref39.apply(this, arguments);
15050
15029
  };
15051
15030
  }();
15052
15031
  }
@@ -15294,7 +15273,7 @@ var I = /*#__PURE__*/function (_ct6) {
15294
15273
  e.files && (t.files = Array.from(e.files).map(function (i) {
15295
15274
  return {
15296
15275
  file: i,
15297
- type: Oe.getTypeFromBlob(i)
15276
+ type: Pe.getTypeFromBlob(i)
15298
15277
  };
15299
15278
  })), setTimeout(function () {
15300
15279
  return _this88.attemptSubmit(t, !0);
@@ -15375,12 +15354,12 @@ var I = /*#__PURE__*/function (_ct6) {
15375
15354
  }, {
15376
15355
  key: "addNewMessage",
15377
15356
  value: function () {
15378
- var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(_ref41) {
15357
+ var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(_ref40) {
15379
15358
  var e, t, i;
15380
15359
  return _regeneratorRuntime().wrap(function _callee136$(_context136) {
15381
15360
  while (1) switch (_context136.prev = _context136.next) {
15382
15361
  case 0:
15383
- e = _ref41.text, t = _ref41.files;
15362
+ e = _ref40.text, t = _ref40.files;
15384
15363
  i = {
15385
15364
  role: v.USER_ROLE
15386
15365
  };
@@ -15676,7 +15655,7 @@ var Xt = /*#__PURE__*/function () {
15676
15655
  button: new ka(_d, t.recordAudio)
15677
15656
  };
15678
15657
  }
15679
- return Ie.isEnabled(r, e.dragAndDrop) && Ie.create(i, r, e.dragAndDrop), r;
15658
+ return Oe.isEnabled(r, e.dragAndDrop) && Oe.create(i, r, e.dragAndDrop), r;
15680
15659
  }
15681
15660
  // prettier-ignore
15682
15661
  }], [{
@@ -15725,7 +15704,7 @@ var Is = /*#__PURE__*/function () {
15725
15704
  value: function createElements(e, t, i) {
15726
15705
  var s = document.createElement("div");
15727
15706
  s.id = "chat-view";
15728
- var r = new ue(e, t, i);
15707
+ var r = new fe(e, t, i);
15729
15708
  t.websocket && G.createConnection(t, r);
15730
15709
  var o = new Xt(e, r, t, s);
15731
15710
  return ee.addElements(s, r.elementRef, o.elementRef), s;
@@ -15738,7 +15717,7 @@ var Is = /*#__PURE__*/function () {
15738
15717
  }
15739
15718
  }]);
15740
15719
  }();
15741
- var Da = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-mute-active{background-color:#ffe7e7}.deep-chat-openai-realtime-mute-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-mute-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-mute>*{height:30px;width:30px}.deep-chat-openai-realtime-mute-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child{margin-top:0}.message-bubble>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:2}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:1;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative;margin-right:.56em}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}.dropup-menu-item-text{margin-top:.08em;width:max-content}.dropup-menu-item-disabled>div{pointer-events:none}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
15720
+ var Da = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-mute-active{background-color:#ffe7e7}.deep-chat-openai-realtime-mute-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-mute-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-mute>*{height:30px;width:30px}.deep-chat-openai-realtime-mute-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child{margin-top:0}.message-bubble>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:2}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:1;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative;margin-right:.56em}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}.dropup-menu-item-text{margin-top:.08em;width:max-content}.dropup-menu-item-active{background-color:#edf7ff;color:#0285ff}.dropup-menu-item-active:hover,.dropup-menu-item-active:focus-visible{background-color:#def0ff}.dropup-menu-item-active:active{background-color:#d2eaff}.dropup-menu-item-active>.dropup-menu-item-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.dropup-menu-item-disabled{color:#aeaeae;cursor:auto}.dropup-menu-item-disabled>div{pointer-events:none}.dropup-menu-item-disabled:hover,.dropup-menu-item-disabled:focus-visible{background-color:transparent}.dropup-menu-item-disabled:active{background-color:transparent}.dropup-menu-item-disabled>.dropup-menu-item-icon{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
15742
15721
  var Ba = Object.defineProperty,
15743
15722
  w = function w(n, e, t, i) {
15744
15723
  for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);