deep-chat-dev 9.0.132 → 9.0.134

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
@@ -186,11 +186,11 @@ var wi = qn;
186
186
  var R = /* @__PURE__ */function (s) {
187
187
  return s.ESCAPE = "Escape", s.ENTER = "Enter", s.TAB = "Tab", s.ARROW_UP = "ArrowUp", s.ARROW_DOWN = "ArrowDown", s.ARROW_RIGHT = "ArrowRight", s.ARROW_LEFT = "ArrowLeft", s.BACKSPACE = "Backspace", s.DELETE = "Delete", s.META = "Meta", s.CONTROL = "Control", s;
188
188
  }(R || {});
189
- var ye = /*#__PURE__*/_createClass(function ye() {
190
- _classCallCheck(this, ye);
189
+ var xe = /*#__PURE__*/_createClass(function xe() {
190
+ _classCallCheck(this, xe);
191
191
  });
192
- ye.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
193
- ye.IS_CHROMIUM = window.chrome;
192
+ xe.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
193
+ xe.IS_CHROMIUM = window.chrome;
194
194
  var Hn = /*#__PURE__*/function () {
195
195
  function rt() {
196
196
  _classCallCheck(this, rt);
@@ -256,7 +256,7 @@ var Gn = /*#__PURE__*/function () {
256
256
  value: function createInputElement(e) {
257
257
  var i, n, r;
258
258
  var t = document.createElement("div");
259
- return t.id = Ve.TEXT_INPUT_ID, t.classList.add("text-input-styling", "text-input-placeholder"), t.innerText = ((i = e == null ? void 0 : e.placeholder) == null ? void 0 : i.text) || "Ask me anything!", ye.IS_CHROMIUM && Ve.preventAutomaticScrollUpOnNewLine(t), typeof (e == null ? void 0 : e.disabled) == "boolean" && e.disabled === !0 ? (t.contentEditable = "false", t.classList.add("text-input-disabled")) : (t.contentEditable = "true", this.addEventListeners(t, e)), Object.assign(t.style, (n = e == null ? void 0 : e.styles) == null ? void 0 : n.text), Object.assign(t.style, (r = e == null ? void 0 : e.placeholder) == null ? void 0 : r.style), t;
259
+ return t.id = Ve.TEXT_INPUT_ID, t.classList.add("text-input-styling", "text-input-placeholder"), t.innerText = ((i = e == null ? void 0 : e.placeholder) == null ? void 0 : i.text) || "Ask me anything!", xe.IS_CHROMIUM && Ve.preventAutomaticScrollUpOnNewLine(t), typeof (e == null ? void 0 : e.disabled) == "boolean" && e.disabled === !0 ? (t.contentEditable = "false", t.classList.add("text-input-disabled")) : (t.contentEditable = "true", this.addEventListeners(t, e)), Object.assign(t.style, (n = e == null ? void 0 : e.styles) == null ? void 0 : n.text), Object.assign(t.style, (r = e == null ? void 0 : e.placeholder) == null ? void 0 : r.style), t;
260
260
  }
261
261
  }, {
262
262
  key: "removeTextIfPlaceholder",
@@ -274,7 +274,7 @@ var Gn = /*#__PURE__*/function () {
274
274
  key: "onFocus",
275
275
  value: function onFocus(e) {
276
276
  var _this2 = this;
277
- ye.IS_SAFARI ? setTimeout(function () {
277
+ xe.IS_SAFARI ? setTimeout(function () {
278
278
  _this2.removeTextIfPlaceholder();
279
279
  }) : this.removeTextIfPlaceholder(), Object.assign(this.elementRef.style, e);
280
280
  }
@@ -318,7 +318,7 @@ var Gn = /*#__PURE__*/function () {
318
318
  key: "clear",
319
319
  value: function clear(e) {
320
320
  var t = window.scrollY;
321
- e.classList.contains("text-input-disabled") || (e.textContent = ""), ye.IS_CHROMIUM && window.scrollTo({
321
+ e.classList.contains("text-input-disabled") || (e.textContent = ""), xe.IS_CHROMIUM && window.scrollTo({
322
322
  top: t
323
323
  });
324
324
  }
@@ -468,11 +468,11 @@ var Jn = /*#__PURE__*/function () {
468
468
  }();
469
469
  Jn.LOAD_VOICES_MS = 200;
470
470
  var Ft = Jn;
471
- var Re = /*#__PURE__*/function () {
472
- function Re() {
473
- _classCallCheck(this, Re);
471
+ var fe = /*#__PURE__*/function () {
472
+ function fe() {
473
+ _classCallCheck(this, fe);
474
474
  }
475
- _createClass(Re, null, [{
475
+ _createClass(fe, null, [{
476
476
  key: "checkForContainerStyles",
477
477
  value: function checkForContainerStyles(e, t) {
478
478
  var i = e.containerStyle;
@@ -485,8 +485,14 @@ var Re = /*#__PURE__*/function () {
485
485
  return console.error("The {result: ....} response object type is deprecated since version 1.3.0."), console.error("Please change to using the new response object: https://deepchat.dev/docs/connect#Response"), e.result;
486
486
  }
487
487
  }, {
488
- key: "processInitialMessageFile",
489
- value: function processInitialMessageFile(e) {
488
+ key: "processHistory",
489
+ value: function processHistory(e) {
490
+ var t = e.initialMessages;
491
+ if (t) return console.error("The initialMessages property is deprecated since version 1.5.0."), console.error("Please change to using the history property instead: https://deepchat.dev/docs/messages/#history"), t;
492
+ }
493
+ }, {
494
+ key: "processHistoryFile",
495
+ value: function processHistoryFile(e) {
490
496
  var t = e.file;
491
497
  t && (console.error("The file property in MessageContent is deprecated since version 1.3.17."), console.error("Please change to using the files array property: https://deepchat.dev/docs/messages/#MessageContent"), e.files = [t]);
492
498
  }
@@ -509,8 +515,14 @@ var Re = /*#__PURE__*/function () {
509
515
  var t;
510
516
  (t = e.children[0]) != null && t.classList.contains("deep-chat-update-message") && (console.error('The "deep-chat-update-message" html class is deprecated since version 1.4.4.'), console.error("Please change to using {..., overwrite: true} object: https://deepchat.dev/docs/connect#Response"));
511
517
  }
518
+ }, {
519
+ key: "checkForStream",
520
+ value: function checkForStream(e) {
521
+ var t = e.stream;
522
+ if (t) return console.error("The stream property has been moved to the connect object in version 1.5.0."), console.error("Please see the thew connect object: https://deepchat.dev/docs/connect#connect-1"), t;
523
+ }
512
524
  }]);
513
- return Re;
525
+ return fe;
514
526
  }();
515
527
  var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8c3ZnIGZpbGw9IiMwMDAwMDAiIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIAoJCXZpZXdCb3g9IjAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8cGF0aCBkPSJNMjMsMzAuMzZIOWMtMi40MDQsMC00LjM2LTEuOTU2LTQuMzYtNC4zNlYxNWMwLTIuNDA0LDEuOTU2LTQuMzYsNC4zNi00LjM2aDMuNjU5CgkJYzAuMTY3LTEuNTY2LDEuNDE1LTIuODEzLDIuOTgxLTIuOTgxVjUuMzMzYy0xLjEzMS0wLjE3NC0yLTEuMTU0LTItMi4zMzNjMC0xLjMwMSwxLjA1OS0yLjM2LDIuMzYtMi4zNgoJCWMxLjMwMiwwLDIuMzYsMS4wNTksMi4zNiwyLjM2YzAsMS4xNzktMC44NjksMi4xNTktMiwyLjMzM1Y3LjY2YzEuNTY2LDAuMTY3LDIuODE0LDEuNDE1LDIuOTgxLDIuOTgxSDIzCgkJYzIuNDA0LDAsNC4zNiwxLjk1Niw0LjM2LDQuMzZ2MTFDMjcuMzYsMjguNDA0LDI1LjQwNCwzMC4zNiwyMywzMC4zNnogTTksMTEuMzZjLTIuMDA3LDAtMy42NCwxLjYzMy0zLjY0LDMuNjR2MTEKCQljMCwyLjAwNywxLjYzMywzLjY0LDMuNjQsMy42NGgxNGMyLjAwNywwLDMuNjQtMS42MzMsMy42NC0zLjY0VjE1YzAtMi4wMDctMS42MzMtMy42NC0zLjY0LTMuNjRIOXogTTEzLjM4NCwxMC42NGg1LjIzMQoJCUMxOC40MzksOS4zNTQsMTcuMzM0LDguMzYsMTYsOC4zNkMxNC42NjcsOC4zNiwxMy41NjEsOS4zNTQsMTMuMzg0LDEwLjY0eiBNMTYsMS4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NAoJCVMxNS4wOTYsNC42NCwxNiw0LjY0YzAuOTA0LDAsMS42NC0wLjczNiwxLjY0LTEuNjRTMTYuOTA0LDEuMzYsMTYsMS4zNnogTTIwLDI3LjM2aC04Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2CgkJczEuMDU5LTIuMzYsMi4zNi0yLjM2aDhjMS4zMDIsMCwyLjM2LDEuMDU5LDIuMzYsMi4zNlMyMS4zMDIsMjcuMzYsMjAsMjcuMzZ6IE0xMiwyMy4zNmMtMC45MDQsMC0xLjY0LDAuNzM1LTEuNjQsMS42NAoJCXMwLjczNiwxLjY0LDEuNjQsMS42NGg4YzAuOTA0LDAsMS42NC0wLjczNSwxLjY0LTEuNjRzLTAuNzM1LTEuNjQtMS42NC0xLjY0SDEyeiBNMzEsMjMuODZoLTJjLTAuMTk5LDAtMC4zNi0wLjE2MS0wLjM2LTAuMzZWMTUKCQljMC0wLjE5OSwwLjE2MS0wLjM2LDAuMzYtMC4zNmgyYzAuMTk5LDAsMC4zNiwwLjE2MSwwLjM2LDAuMzZ2OC41QzMxLjM2LDIzLjY5OSwzMS4xOTksMjMuODYsMzEsMjMuODZ6IE0yOS4zNiwyMy4xNGgxLjI3OXYtNy43OAoJCUgyOS4zNlYyMy4xNHogTTMsMjMuODZIMWMtMC4xOTksMC0wLjM2LTAuMTYxLTAuMzYtMC4zNlYxNWMwLTAuMTk5LDAuMTYxLTAuMzYsMC4zNi0wLjM2aDJjMC4xOTksMCwwLjM2LDAuMTYxLDAuMzYsMC4zNnY4LjUKCQlDMy4zNiwyMy42OTksMy4xOTksMjMuODYsMywyMy44NnogTTEuMzYsMjMuMTRoMS4yOHYtNy43OEgxLjM2VjIzLjE0eiBNMjAsMjAuMzZjLTEuMzAyLDAtMi4zNi0xLjA1OS0yLjM2LTIuMzYKCQlzMS4wNTktMi4zNiwyLjM2LTIuMzZzMi4zNiwxLjA1OSwyLjM2LDIuMzZDMjIuMzYsMTkuMzAyLDIxLjMwMiwyMC4zNiwyMCwyMC4zNnogTTIwLDE2LjM2Yy0wLjkwNCwwLTEuNjQsMC43MzYtMS42NCwxLjY0CgkJczAuNzM1LDEuNjQsMS42NCwxLjY0czEuNjQtMC43MzUsMS42NC0xLjY0UzIwLjkwNCwxNi4zNiwyMCwxNi4zNnogTTEyLDIwLjM2Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2czEuMDU5LTIuMzYsMi4zNi0yLjM2CgkJczIuMzYsMS4wNTksMi4zNiwyLjM2QzE0LjM2LDE5LjMwMiwxMy4zMDEsMjAuMzYsMTIsMjAuMzZ6IE0xMiwxNi4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NHMwLjczNiwxLjY0LDEuNjQsMS42NAoJCXMxLjY0LTAuNzM1LDEuNjQtMS42NFMxMi45MDQsMTYuMzYsMTIsMTYuMzZ6Ii8+Cgk8cmVjdCBzdHlsZT0iZmlsbDpub25lOyIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPg==",
516
528
  Is = "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==",
@@ -569,13 +581,13 @@ var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNv
569
581
  Kn.CONTAINER_CLASS = "avatar-container";
570
582
  var cn = Kn;
571
583
  var Yn = /*#__PURE__*/function () {
572
- function Se() {
573
- _classCallCheck(this, Se);
584
+ function we() {
585
+ _classCallCheck(this, we);
574
586
  }
575
- _createClass(Se, null, [{
587
+ _createClass(we, null, [{
576
588
  key: "hide",
577
589
  value: function hide(e) {
578
- e.getElementsByClassName(Se.NAME_CLASS)[0].style.visibility = "hidden";
590
+ e.getElementsByClassName(we.NAME_CLASS)[0].style.visibility = "hidden";
579
591
  }
580
592
  }, {
581
593
  key: "getPosition",
@@ -601,26 +613,26 @@ var Yn = /*#__PURE__*/function () {
601
613
  key: "createName",
602
614
  value: function createName(e, t) {
603
615
  var i = document.createElement("div");
604
- return i.classList.add(Se.NAME_CLASS), i.textContent = Se.getNameText(e, t), Se.applyStyle(i, e, t), i;
616
+ return i.classList.add(we.NAME_CLASS), i.textContent = we.getNameText(e, t), we.applyStyle(i, e, t), i;
605
617
  }
606
618
  }, {
607
619
  key: "add",
608
620
  value: function add(e, t, i) {
609
621
  var n = typeof i == "boolean" ? {} : i,
610
- r = Se.createName(t, n),
611
- o = Se.getPosition(t, n);
622
+ r = we.createName(t, n),
623
+ o = we.getPosition(t, n);
612
624
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
613
625
  }
614
626
  }]);
615
- return Se;
627
+ return we;
616
628
  }();
617
629
  Yn.NAME_CLASS = "name";
618
630
  var dn = Yn;
619
631
  var ni = /*#__PURE__*/function () {
620
- function we() {
621
- _classCallCheck(this, we);
632
+ function Me() {
633
+ _classCallCheck(this, Me);
622
634
  }
623
- _createClass(we, null, [{
635
+ _createClass(Me, null, [{
624
636
  key: "getLastElementsByClass",
625
637
  value: function getLastElementsByClass(e, t, i) {
626
638
  var _loop = function _loop() {
@@ -661,8 +673,8 @@ var ni = /*#__PURE__*/function () {
661
673
  }, {
662
674
  key: "overwriteMessage",
663
675
  value: function overwriteMessage(e, t, i, n, r, o) {
664
- var a = we.getLastElementsByClass(t, [we.getRoleClass(n), o], ["loading-message-text"]),
665
- l = we.getLastMessage(e, n, r);
676
+ var a = Me.getLastElementsByClass(t, [Me.getRoleClass(n), o], ["loading-message-text"]),
677
+ l = Me.getLastMessage(e, n, r);
666
678
  return l && (l[r] = i), a;
667
679
  }
668
680
  }, {
@@ -674,18 +686,18 @@ var ni = /*#__PURE__*/function () {
674
686
  }, {
675
687
  key: "fillEmptyMessageElement",
676
688
  value: function fillEmptyMessageElement(e, t) {
677
- t.trim().length === 0 && (e.classList.add(we.EMPTY_MESSAGE_CLASS), e.innerHTML = '<div style="color:#00000000">.</div>');
689
+ t.trim().length === 0 && (e.classList.add(Me.EMPTY_MESSAGE_CLASS), e.innerHTML = '<div style="color:#00000000">.</div>');
678
690
  }
679
691
  }, {
680
692
  key: "unfillEmptyMessageElement",
681
693
  value: function unfillEmptyMessageElement(e, t) {
682
- e.classList.contains(we.EMPTY_MESSAGE_CLASS) && t.trim().length > 0 && e.replaceChildren();
694
+ e.classList.contains(Me.EMPTY_MESSAGE_CLASS) && t.trim().length > 0 && e.replaceChildren();
683
695
  }
684
696
  }, {
685
697
  key: "getLastMessageBubbleElement",
686
698
  value: function getLastMessageBubbleElement(e) {
687
699
  var t, i, n;
688
- return Array.from(((n = (i = (t = we.getLastMessageElement(e)) == null ? void 0 : t.children) == null ? void 0 : i[0]) == null ? void 0 : n.children) || []).find(function (r) {
700
+ return Array.from(((n = (i = (t = Me.getLastMessageElement(e)) == null ? void 0 : t.children) == null ? void 0 : i[0]) == null ? void 0 : n.children) || []).find(function (r) {
689
701
  return r.classList.contains("message-bubble");
690
702
  });
691
703
  }
@@ -706,17 +718,17 @@ var ni = /*#__PURE__*/function () {
706
718
  t && cn.hide(n), i && dn.hide(n);
707
719
  }
708
720
  }]);
709
- return we;
721
+ return Me;
710
722
  }();
711
723
  ni.AI_ROLE = "ai";
712
724
  ni.USER_ROLE = "user";
713
725
  ni.EMPTY_MESSAGE_CLASS = "empty-message";
714
726
  var b = ni;
715
- var Ie = /*#__PURE__*/function () {
716
- function Ie() {
717
- _classCallCheck(this, Ie);
727
+ var Le = /*#__PURE__*/function () {
728
+ function Le() {
729
+ _classCallCheck(this, Le);
718
730
  }
719
- _createClass(Ie, null, [{
731
+ _createClass(Le, null, [{
720
732
  key: "mouseUp",
721
733
  value: function mouseUp(e, t) {
722
734
  C.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
@@ -739,10 +751,10 @@ var Ie = /*#__PURE__*/function () {
739
751
  }, {
740
752
  key: "add",
741
753
  value: function add(e, t) {
742
- e.addEventListener("mouseenter", Ie.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Ie.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Ie.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Ie.mouseUp.bind(this, e, t));
754
+ e.addEventListener("mouseenter", Le.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Le.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Le.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Le.mouseUp.bind(this, e, t));
743
755
  }
744
756
  }]);
745
- return Ie;
757
+ return Le;
746
758
  }();
747
759
  var Ls = "deep-chat-temporary-message",
748
760
  Rs = "deep-chat-suggestion-button",
@@ -768,11 +780,11 @@ var Ls = "deep-chat-temporary-message",
768
780
  }
769
781
  },
770
782
  un = Object.keys(Pi);
771
- var xe = /*#__PURE__*/function () {
772
- function xe() {
773
- _classCallCheck(this, xe);
783
+ var Ee = /*#__PURE__*/function () {
784
+ function Ee() {
785
+ _classCallCheck(this, Ee);
774
786
  }
775
- _createClass(xe, null, [{
787
+ _createClass(Ee, null, [{
776
788
  key: "applySuggestionEvent",
777
789
  value: function applySuggestionEvent(e, t) {
778
790
  setTimeout(function () {
@@ -827,17 +839,17 @@ var xe = /*#__PURE__*/function () {
827
839
  un.forEach(function (r) {
828
840
  var o = i.getElementsByClassName(r);
829
841
  Array.from(o || []).forEach(function (a) {
830
- var l = xe.getProcessedStyles(t, a, r);
831
- le.applyStylesToElement(a, l), xe.applyEvents(a, r);
842
+ var l = Ee.getProcessedStyles(t, a, r);
843
+ le.applyStylesToElement(a, l), Ee.applyEvents(a, r);
832
844
  });
833
845
  });
834
846
  var n = i.getElementsByClassName(Rs);
835
847
  Array.from(n).forEach(function (r) {
836
- return xe.applySuggestionEvent(e, r);
848
+ return Ee.applySuggestionEvent(e, r);
837
849
  });
838
850
  }
839
851
  }]);
840
- return xe;
852
+ return Ee;
841
853
  }();
842
854
  var le = /*#__PURE__*/function () {
843
855
  function le() {
@@ -847,7 +859,7 @@ var le = /*#__PURE__*/function () {
847
859
  key: "applyStylesToElement",
848
860
  value: function applyStylesToElement(e, t) {
849
861
  var i = C.processStateful(t, {}, {});
850
- Ie.add(e, i), Object.assign(e.style, i["default"]);
862
+ Le.add(e, i), Object.assign(e.style, i["default"]);
851
863
  }
852
864
  }, {
853
865
  key: "applyEventsToElement",
@@ -862,7 +874,7 @@ var le = /*#__PURE__*/function () {
862
874
  value: function applyClassUtilitiesToElement(e, t) {
863
875
  var i = t.events,
864
876
  n = t.styles;
865
- i && le.applyEventsToElement(e, i), n && !xe.doesElementContainDeepChatClass(e) && le.applyStylesToElement(e, n);
877
+ i && le.applyEventsToElement(e, i), n && !Ee.doesElementContainDeepChatClass(e) && le.applyStylesToElement(e, n);
866
878
  }
867
879
  }, {
868
880
  key: "applyCustomClassUtilities",
@@ -877,7 +889,7 @@ var le = /*#__PURE__*/function () {
877
889
  }, {
878
890
  key: "apply",
879
891
  value: function apply(e, t) {
880
- xe.applyDeepChatUtilities(e, e.htmlClassUtilities, t), le.applyCustomClassUtilities(e.htmlClassUtilities, t);
892
+ Ee.applyDeepChatUtilities(e, e.htmlClassUtilities, t), le.applyCustomClassUtilities(e.htmlClassUtilities, t);
881
893
  }
882
894
  }]);
883
895
  return le;
@@ -902,7 +914,7 @@ var Qe = /*#__PURE__*/function () {
902
914
  value: function overwrite(e, t, i, n) {
903
915
  var r = e.messages,
904
916
  o = b.overwriteMessage(r, n, t, i, "html", "html-message");
905
- return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer), Re.flagHTMLUpdateClass(o.bubbleElement)), o;
917
+ return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer), fe.flagHTMLUpdateClass(o.bubbleElement)), o;
906
918
  }
907
919
  // prettier-ignore
908
920
  }, {
@@ -915,7 +927,7 @@ var Qe = /*#__PURE__*/function () {
915
927
  r.status = !1;
916
928
  }
917
929
  var o = Qe.createElements(e, t, i);
918
- return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer), Re.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Qe.addElement(e, o.outerContainer), o;
930
+ return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer), fe.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Qe.addElement(e, o.outerContainer), o;
919
931
  }
920
932
  }]);
921
933
  return Qe;
@@ -1451,8 +1463,8 @@ function Ks(s) {
1451
1463
  d = 0,
1452
1464
  u = !1,
1453
1465
  h = {};
1454
- if (s.env.footnotes && (s.tokens = s.tokens.filter(function (f) {
1455
- return f.type === "footnote_reference_open" ? (u = !0, l = [], c = f.label, !1) : f.type === "footnote_reference_close" ? (u = !1, h[":" + c] = l, !1) : (u && l.push(f), !u);
1466
+ if (s.env.footnotes && (s.tokens = s.tokens.filter(function (p) {
1467
+ return p.type === "footnote_reference_open" ? (u = !0, l = [], c = p.label, !1) : p.type === "footnote_reference_close" ? (u = !1, h[":" + c] = l, !1) : (u && l.push(p), !u);
1456
1468
  }), !!s.env.footnotes.list)) {
1457
1469
  for (o = s.env.footnotes.list, s.tokens.push({
1458
1470
  type: "footnote_block_open",
@@ -1509,14 +1521,14 @@ function Ys(s) {
1509
1521
  d,
1510
1522
  u,
1511
1523
  h,
1512
- f = s.tokens;
1524
+ p = s.tokens;
1513
1525
  if (s.env.abbreviations) {
1514
1526
  for (s.env.abbrRegExp || (h = "(^|[" + hn.split("").map(Mi).join("") + "])(" + Object.keys(s.env.abbreviations).map(function (m) {
1515
1527
  return m.substr(1);
1516
- }).sort(function (m, p) {
1517
- return p.length - m.length;
1518
- }).map(Mi).join("|") + ")($|[" + hn.split("").map(Mi).join("") + "])", s.env.abbrRegExp = new RegExp(h, "g")), d = s.env.abbrRegExp, t = 0, i = f.length; t < i; t++) if (f[t].type === "inline") {
1519
- for (n = f[t].children, e = n.length - 1; e >= 0; e--) if (r = n[e], r.type === "text") {
1528
+ }).sort(function (m, f) {
1529
+ return f.length - m.length;
1530
+ }).map(Mi).join("|") + ")($|[" + hn.split("").map(Mi).join("") + "])", s.env.abbrRegExp = new RegExp(h, "g")), d = s.env.abbrRegExp, t = 0, i = p.length; t < i; t++) if (p[t].type === "inline") {
1531
+ for (n = p[t].children, e = n.length - 1; e >= 0; e--) if (r = n[e], r.type === "text") {
1520
1532
  for (l = 0, o = r.content, d.lastIndex = 0, c = r.level, a = []; u = d.exec(o);) d.lastIndex > l && a.push({
1521
1533
  type: "text",
1522
1534
  content: o.slice(l, u.index + u[1].length),
@@ -1537,7 +1549,7 @@ function Ys(s) {
1537
1549
  type: "text",
1538
1550
  content: o.slice(l),
1539
1551
  level: c
1540
- }), f[t].children = n = [].concat(n.slice(0, e), a, n.slice(e + 1)));
1552
+ }), p[t].children = n = [].concat(n.slice(0, e), a, n.slice(e + 1)));
1541
1553
  }
1542
1554
  }
1543
1555
  }
@@ -1562,9 +1574,9 @@ function tr(s) {
1562
1574
  }
1563
1575
  }
1564
1576
  var ir = /['"]/,
1565
- fn = /['"]/g,
1577
+ pn = /['"]/g,
1566
1578
  nr = /[-\s()\[\]]/,
1567
- pn = "’";
1579
+ fn = "’";
1568
1580
  function mn(s, e) {
1569
1581
  return e < 0 || e >= s.length ? !1 : !nr.test(s[e]);
1570
1582
  }
@@ -1572,20 +1584,20 @@ function He(s, e, t) {
1572
1584
  return s.substr(0, e) + t + s.substr(e + 1);
1573
1585
  }
1574
1586
  function sr(s) {
1575
- var e, t, i, n, r, o, a, l, c, d, u, h, f, m, p, _, S;
1587
+ var e, t, i, n, r, o, a, l, c, d, u, h, p, m, f, x, S;
1576
1588
  if (s.options.typographer) {
1577
- for (S = [], p = s.tokens.length - 1; p >= 0; p--) if (s.tokens[p].type === "inline") {
1578
- for (_ = s.tokens[p].children, S.length = 0, e = 0; e < _.length; e++) if (t = _[e], !(t.type !== "text" || ir.test(t.text))) {
1579
- for (a = _[e].level, f = S.length - 1; f >= 0 && !(S[f].level <= a); f--);
1580
- S.length = f + 1, i = t.content, r = 0, o = i.length;
1581
- e: for (; r < o && (fn.lastIndex = r, n = fn.exec(i), !!n);) {
1589
+ for (S = [], f = s.tokens.length - 1; f >= 0; f--) if (s.tokens[f].type === "inline") {
1590
+ for (x = s.tokens[f].children, S.length = 0, e = 0; e < x.length; e++) if (t = x[e], !(t.type !== "text" || ir.test(t.text))) {
1591
+ for (a = x[e].level, p = S.length - 1; p >= 0 && !(S[p].level <= a); p--);
1592
+ S.length = p + 1, i = t.content, r = 0, o = i.length;
1593
+ e: for (; r < o && (pn.lastIndex = r, n = pn.exec(i), !!n);) {
1582
1594
  if (l = !mn(i, n.index - 1), r = n.index + 1, m = n[0] === "'", c = !mn(i, r), !c && !l) {
1583
- m && (t.content = He(t.content, n.index, pn));
1595
+ m && (t.content = He(t.content, n.index, fn));
1584
1596
  continue;
1585
1597
  }
1586
1598
  if (u = !c, h = !l, h) {
1587
- for (f = S.length - 1; f >= 0 && (d = S[f], !(S[f].level < a)); f--) if (d.single === m && S[f].level === a) {
1588
- d = S[f], m ? (_[d.token].content = He(_[d.token].content, d.pos, s.options.quotes[2]), t.content = He(t.content, n.index, s.options.quotes[3])) : (_[d.token].content = He(_[d.token].content, d.pos, s.options.quotes[0]), t.content = He(t.content, n.index, s.options.quotes[1])), S.length = f;
1599
+ for (p = S.length - 1; p >= 0 && (d = S[p], !(S[p].level < a)); p--) if (d.single === m && S[p].level === a) {
1600
+ d = S[p], m ? (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[2]), t.content = He(t.content, n.index, s.options.quotes[3])) : (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[0]), t.content = He(t.content, n.index, s.options.quotes[1])), S.length = p;
1589
1601
  continue e;
1590
1602
  }
1591
1603
  }
@@ -1594,7 +1606,7 @@ function sr(s) {
1594
1606
  pos: n.index,
1595
1607
  single: m,
1596
1608
  level: a
1597
- }) : h && m && (t.content = He(t.content, n.index, pn));
1609
+ }) : h && m && (t.content = He(t.content, n.index, fn));
1598
1610
  }
1599
1611
  }
1600
1612
  }
@@ -1707,19 +1719,19 @@ function ar(s, e, t, i) {
1707
1719
  d,
1708
1720
  u,
1709
1721
  h,
1710
- f,
1722
+ p,
1711
1723
  m,
1712
- p = s.bMarks[e] + s.tShift[e],
1713
- _ = s.eMarks[e];
1714
- if (p > _ || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
1724
+ f = s.bMarks[e] + s.tShift[e],
1725
+ x = s.eMarks[e];
1726
+ if (f > x || s.src.charCodeAt(f++) !== 62 || s.level >= s.options.maxNesting) return !1;
1715
1727
  if (i) return !0;
1716
- for (s.src.charCodeAt(p) === 32 && p++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = p, p = p < _ ? s.skipSpaces(p) : p, r = p >= _, o = [s.tShift[e]], s.tShift[e] = p - s.bMarks[e], u = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], _ = s.eMarks[n], !(p >= _)); n++) {
1717
- if (s.src.charCodeAt(p++) === 62) {
1718
- s.src.charCodeAt(p) === 32 && p++, a.push(s.bMarks[n]), s.bMarks[n] = p, p = p < _ ? s.skipSpaces(p) : p, r = p >= _, o.push(s.tShift[n]), s.tShift[n] = p - s.bMarks[n];
1728
+ for (s.src.charCodeAt(f) === 32 && f++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = f, f = f < x ? s.skipSpaces(f) : f, r = f >= x, o = [s.tShift[e]], s.tShift[e] = f - s.bMarks[e], u = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (f = s.bMarks[n] + s.tShift[n], x = s.eMarks[n], !(f >= x)); n++) {
1729
+ if (s.src.charCodeAt(f++) === 62) {
1730
+ s.src.charCodeAt(f) === 32 && f++, a.push(s.bMarks[n]), s.bMarks[n] = f, f = f < x ? s.skipSpaces(f) : f, r = f >= x, o.push(s.tShift[n]), s.tShift[n] = f - s.bMarks[n];
1719
1731
  continue;
1720
1732
  }
1721
1733
  if (r) break;
1722
- for (m = !1, h = 0, f = u.length; h < f; h++) if (u[h](s, n, t, !0)) {
1734
+ for (m = !1, h = 0, p = u.length; h < p; h++) if (u[h](s, n, t, !0)) {
1723
1735
  m = !0;
1724
1736
  break;
1725
1737
  }
@@ -1787,10 +1799,10 @@ function dr(s, e, t, i) {
1787
1799
  d,
1788
1800
  u,
1789
1801
  h,
1790
- f,
1791
- m,
1792
1802
  p,
1793
- _,
1803
+ m,
1804
+ f,
1805
+ x,
1794
1806
  S,
1795
1807
  J,
1796
1808
  X,
@@ -1801,10 +1813,10 @@ function dr(s, e, t, i) {
1801
1813
  I,
1802
1814
  Rt,
1803
1815
  te;
1804
- if ((u = bn(s, e)) >= 0) _ = !0;else if ((u = gn(s, e)) >= 0) _ = !1;else return !1;
1816
+ if ((u = bn(s, e)) >= 0) x = !0;else if ((u = gn(s, e)) >= 0) x = !1;else return !1;
1805
1817
  if (s.level >= s.options.maxNesting) return !1;
1806
- if (p = s.src.charCodeAt(u - 1), i) return !0;
1807
- for (J = s.tokens.length, _ ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, u - d - 1)), s.tokens.push({
1818
+ if (f = s.src.charCodeAt(u - 1), i) return !0;
1819
+ for (J = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, u - d - 1)), s.tokens.push({
1808
1820
  type: "ordered_list_open",
1809
1821
  order: m,
1810
1822
  lines: O = [e, 0],
@@ -1813,7 +1825,7 @@ function dr(s, e, t, i) {
1813
1825
  type: "bullet_list_open",
1814
1826
  lines: O = [e, 0],
1815
1827
  level: s.level++
1816
- }), n = e, X = !1, ee = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(u), h = s.eMarks[n], S >= h ? f = 1 : f = S - u, f > 4 && (f = 1), f < 1 && (f = 1), r = u - s.bMarks[n] + f, s.tokens.push({
1828
+ }), n = e, X = !1, ee = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(u), h = s.eMarks[n], S >= h ? p = 1 : p = S - u, p > 4 && (p = 1), p < 1 && (p = 1), r = u - s.bMarks[n] + p, s.tokens.push({
1817
1829
  type: "list_item_open",
1818
1830
  lines: H = [e, 0],
1819
1831
  level: s.level++
@@ -1826,13 +1838,13 @@ function dr(s, e, t, i) {
1826
1838
  break;
1827
1839
  }
1828
1840
  if (te) break;
1829
- if (_) {
1841
+ if (x) {
1830
1842
  if (u = bn(s, n), u < 0) break;
1831
1843
  } else if (u = gn(s, n), u < 0) break;
1832
- if (p !== s.src.charCodeAt(u - 1)) break;
1844
+ if (f !== s.src.charCodeAt(u - 1)) break;
1833
1845
  }
1834
1846
  return s.tokens.push({
1835
- type: _ ? "ordered_list_close" : "bullet_list_close",
1847
+ type: x ? "ordered_list_close" : "bullet_list_close",
1836
1848
  level: --s.level
1837
1849
  }), O[1] = n, s.line = n, Q && cr(s, J), !0;
1838
1850
  }
@@ -1883,7 +1895,7 @@ function hr(s, e, t, i) {
1883
1895
  level: s.level
1884
1896
  })), !0);
1885
1897
  }
1886
- function fr(s, e, t) {
1898
+ function pr(s, e, t) {
1887
1899
  var i,
1888
1900
  n,
1889
1901
  r,
@@ -1909,7 +1921,7 @@ var rs = {};
1909
1921
  ["article", "aside", "button", "blockquote", "body", "canvas", "caption", "col", "colgroup", "dd", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "iframe", "li", "map", "object", "ol", "output", "p", "pre", "progress", "script", "section", "style", "table", "tbody", "td", "textarea", "tfoot", "th", "tr", "thead", "ul", "video"].forEach(function (s) {
1910
1922
  rs[s] = !0;
1911
1923
  });
1912
- var pr = /^<([a-zA-Z]{1,15})[\s\/>]/,
1924
+ var fr = /^<([a-zA-Z]{1,15})[\s\/>]/,
1913
1925
  mr = /^<\/([a-zA-Z]{1,15})[\s>]/;
1914
1926
  function gr(s) {
1915
1927
  var e = s | 32;
@@ -1928,7 +1940,7 @@ function br(s, e, t, i) {
1928
1940
  } else if (n === 47 || gr(n)) {
1929
1941
  if (n === 47) {
1930
1942
  if (r = s.src.slice(a, l).match(mr), !r) return !1;
1931
- } else if (r = s.src.slice(a, l).match(pr), !r) return !1;
1943
+ } else if (r = s.src.slice(a, l).match(fr), !r) return !1;
1932
1944
  if (rs[r[1].toLowerCase()] !== !0) return !1;
1933
1945
  if (i) return !0;
1934
1946
  } else return !1;
@@ -1946,7 +1958,7 @@ function Ci(s, e) {
1946
1958
  return s.src.substr(t, i - t);
1947
1959
  }
1948
1960
  function vr(s, e, t, i) {
1949
- var n, r, o, a, l, c, d, u, h, f, m;
1961
+ var n, r, o, a, l, c, d, u, h, p, m;
1950
1962
  if (e + 2 > t || (l = e + 1, s.tShift[l] < s.blkIndent) || (o = s.bMarks[l] + s.tShift[l], o >= s.eMarks[l]) || (n = s.src.charCodeAt(o), n !== 124 && n !== 45 && n !== 58) || (r = Ci(s, e + 1), !/^[-:| ]+$/.test(r)) || (c = r.split("|"), c <= 2)) return !1;
1951
1963
  for (u = [], a = 0; a < c.length; a++) {
1952
1964
  if (h = c[a].trim(), !h) {
@@ -1960,7 +1972,7 @@ function vr(s, e, t, i) {
1960
1972
  if (i) return !0;
1961
1973
  for (s.tokens.push({
1962
1974
  type: "table_open",
1963
- lines: f = [e, 0],
1975
+ lines: p = [e, 0],
1964
1976
  level: s.level++
1965
1977
  }), s.tokens.push({
1966
1978
  type: "thead_open",
@@ -2023,7 +2035,7 @@ function vr(s, e, t, i) {
2023
2035
  }), s.tokens.push({
2024
2036
  type: "table_close",
2025
2037
  level: --s.level
2026
- }), f[1] = m[1] = l, s.line = l, !0;
2038
+ }), p[1] = m[1] = l, s.line = l, !0;
2027
2039
  }
2028
2040
  function Ot(s, e) {
2029
2041
  var t,
@@ -2039,7 +2051,7 @@ function yr(s, e) {
2039
2051
  for (t = e + 2, i = s.tokens.length - 2; t < i; t++) s.tokens[t].level === n && s.tokens[t].type === "paragraph_open" && (s.tokens[t + 2].tight = !0, s.tokens[t].tight = !0, t += 2);
2040
2052
  }
2041
2053
  function xr(s, e, t, i) {
2042
- var n, r, o, a, l, c, d, u, h, f, m, p, _, S;
2054
+ var n, r, o, a, l, c, d, u, h, p, m, f, x, S;
2043
2055
  if (i) return s.ddIndent < 0 ? !1 : Ot(s, e) >= 0;
2044
2056
  if (d = e + 1, s.isEmpty(d) && ++d > t || s.tShift[d] < s.blkIndent || (n = Ot(s, d), n < 0) || s.level >= s.options.maxNesting) return !1;
2045
2057
  c = s.tokens.length, s.tokens.push({
@@ -2048,7 +2060,7 @@ function xr(s, e, t, i) {
2048
2060
  level: s.level++
2049
2061
  }), o = e, r = d;
2050
2062
  e: for (;;) {
2051
- for (S = !0, _ = !1, s.tokens.push({
2063
+ for (S = !0, x = !1, s.tokens.push({
2052
2064
  type: "dt_open",
2053
2065
  lines: [o, o],
2054
2066
  level: s.level++
@@ -2066,7 +2078,7 @@ function xr(s, e, t, i) {
2066
2078
  type: "dd_open",
2067
2079
  lines: a = [d, 0],
2068
2080
  level: s.level++
2069
- }), p = s.tight, h = s.ddIndent, u = s.blkIndent, m = s.tShift[r], f = s.parentType, s.blkIndent = s.ddIndent = s.tShift[r] + 2, s.tShift[r] = n - s.bMarks[r], s.tight = !0, s.parentType = "deflist", s.parser.tokenize(s, r, t, !0), (!s.tight || _) && (S = !1), _ = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = p, s.parentType = f, s.blkIndent = u, s.ddIndent = h, s.tokens.push({
2081
+ }), f = s.tight, h = s.ddIndent, u = s.blkIndent, m = s.tShift[r], p = s.parentType, s.blkIndent = s.ddIndent = s.tShift[r] + 2, s.tShift[r] = n - s.bMarks[r], s.tight = !0, s.parentType = "deflist", s.parser.tokenize(s, r, t, !0), (!s.tight || x) && (S = !1), x = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = f, s.parentType = p, s.blkIndent = u, s.ddIndent = h, s.tokens.push({
2070
2082
  type: "dd_close",
2071
2083
  level: --s.level
2072
2084
  }), a[1] = d = s.line, d >= t || s.tShift[d] < s.blkIndent) break e;
@@ -2114,7 +2126,7 @@ function Er(s, e) {
2114
2126
  level: s.level
2115
2127
  })), !0;
2116
2128
  }
2117
- var Pt = [["code", rr], ["fences", or, ["paragraph", "blockquote", "list"]], ["blockquote", ar, ["paragraph", "blockquote", "list"]], ["hr", lr, ["paragraph", "blockquote", "list"]], ["list", dr, ["paragraph", "blockquote"]], ["footnote", ur, ["paragraph"]], ["heading", hr, ["paragraph", "blockquote"]], ["lheading", fr], ["htmlblock", br, ["paragraph", "blockquote"]], ["table", vr, ["paragraph"]], ["deflist", xr, ["paragraph"]], ["paragraph", Er]];
2129
+ var Pt = [["code", rr], ["fences", or, ["paragraph", "blockquote", "list"]], ["blockquote", ar, ["paragraph", "blockquote", "list"]], ["hr", lr, ["paragraph", "blockquote", "list"]], ["list", dr, ["paragraph", "blockquote"]], ["footnote", ur, ["paragraph"]], ["heading", hr, ["paragraph", "blockquote"]], ["lheading", pr], ["htmlblock", br, ["paragraph", "blockquote"]], ["table", vr, ["paragraph"]], ["deflist", xr, ["paragraph"]], ["paragraph", Er]];
2118
2130
  function Ji() {
2119
2131
  this.ruler = new W();
2120
2132
  for (var s = 0; s < Pt.length; s++) this.ruler.push(Pt[s][0], Pt[s][1], {
@@ -2444,20 +2456,20 @@ function Fr(s, e) {
2444
2456
  d = !1,
2445
2457
  u = s.pos,
2446
2458
  h = s.posMax,
2447
- f = s.pos,
2448
- m = s.src.charCodeAt(f);
2449
- if (m === 33 && (d = !0, m = s.src.charCodeAt(++f)), m !== 91 || s.level >= s.options.maxNesting || (t = f + 1, i = bt(s, f), i < 0)) return !1;
2459
+ p = s.pos,
2460
+ m = s.src.charCodeAt(p);
2461
+ if (m === 33 && (d = !0, m = s.src.charCodeAt(++p)), m !== 91 || s.level >= s.options.maxNesting || (t = p + 1, i = bt(s, p), i < 0)) return !1;
2450
2462
  if (a = i + 1, a < h && s.src.charCodeAt(a) === 40) {
2451
2463
  for (a++; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2452
2464
  if (a >= h) return !1;
2453
- for (f = a, ts(s, a) ? (r = s.linkContent, a = s.pos) : r = "", f = a; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2454
- if (a < h && f !== a && is(s, a)) for (o = s.linkContent, a = s.pos; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);else o = "";
2465
+ for (p = a, ts(s, a) ? (r = s.linkContent, a = s.pos) : r = "", p = a; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2466
+ if (a < h && p !== a && is(s, a)) for (o = s.linkContent, a = s.pos; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);else o = "";
2455
2467
  if (a >= h || s.src.charCodeAt(a) !== 41) return s.pos = u, !1;
2456
2468
  a++;
2457
2469
  } else {
2458
2470
  if (s.linkLevel > 0) return !1;
2459
2471
  for (; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2460
- if (a < h && s.src.charCodeAt(a) === 91 && (f = a + 1, a = bt(s, a), a >= 0 ? n = s.src.slice(f, a++) : a = f - 1), n || (_typeof(n) > "u" && (a = i + 1), n = s.src.slice(t, i)), l = s.env.references[ns(n)], !l) return s.pos = u, !1;
2472
+ if (a < h && s.src.charCodeAt(a) === 91 && (p = a + 1, a = bt(s, a), a >= 0 ? n = s.src.slice(p, a++) : a = p - 1), n || (_typeof(n) > "u" && (a = i + 1), n = s.src.slice(t, i)), l = s.env.references[ns(n)], !l) return s.pos = u, !1;
2461
2473
  r = l.href, o = l.title;
2462
2474
  }
2463
2475
  return e || (s.pos = t, s.posMax = i, d ? s.push({
@@ -2712,7 +2724,7 @@ var uo = {
2712
2724
  inline: {}
2713
2725
  }
2714
2726
  },
2715
- fo = {
2727
+ po = {
2716
2728
  options: {
2717
2729
  html: !0,
2718
2730
  // Enable HTML tags in source
@@ -2750,42 +2762,42 @@ var uo = {
2750
2762
  }
2751
2763
  }
2752
2764
  },
2753
- po = {
2765
+ fo = {
2754
2766
  "default": uo,
2755
2767
  full: ho,
2756
- commonmark: fo
2768
+ commonmark: po
2757
2769
  };
2758
2770
  function os(s, e, t) {
2759
2771
  this.src = e, this.env = t, this.options = s.options, this.tokens = [], this.inlineMode = !1, this.inline = s.inline, this.block = s.block, this.renderer = s.renderer, this.typographer = s.typographer;
2760
2772
  }
2761
- function pe(s, e) {
2762
- typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new ri(), this.block = new Ji(), this.core = new ss(), this.renderer = new Wi(), this.ruler = new W(), this.options = {}, this.configure(po[s]), this.set(e || {});
2773
+ function me(s, e) {
2774
+ typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new ri(), this.block = new Ji(), this.core = new ss(), this.renderer = new Wi(), this.ruler = new W(), this.options = {}, this.configure(fo[s]), this.set(e || {});
2763
2775
  }
2764
- pe.prototype.set = function (s) {
2776
+ me.prototype.set = function (s) {
2765
2777
  Xn(this.options, s);
2766
2778
  };
2767
- pe.prototype.configure = function (s) {
2779
+ me.prototype.configure = function (s) {
2768
2780
  var e = this;
2769
2781
  if (!s) throw new Error("Wrong `remarkable` preset, check name/content");
2770
2782
  s.options && e.set(s.options), s.components && Object.keys(s.components).forEach(function (t) {
2771
2783
  s.components[t].rules && e[t].ruler.enable(s.components[t].rules, !0);
2772
2784
  });
2773
2785
  };
2774
- pe.prototype.use = function (s, e) {
2786
+ me.prototype.use = function (s, e) {
2775
2787
  return s(this, e), this;
2776
2788
  };
2777
- pe.prototype.parse = function (s, e) {
2789
+ me.prototype.parse = function (s, e) {
2778
2790
  var t = new os(this, s, e);
2779
2791
  return this.core.process(t), t.tokens;
2780
2792
  };
2781
- pe.prototype.render = function (s, e) {
2793
+ me.prototype.render = function (s, e) {
2782
2794
  return e = e || {}, this.renderer.render(this.parse(s, e), this.options, e);
2783
2795
  };
2784
- pe.prototype.parseInline = function (s, e) {
2796
+ me.prototype.parseInline = function (s, e) {
2785
2797
  var t = new os(this, s, e);
2786
2798
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2787
2799
  };
2788
- pe.prototype.renderInline = function (s, e) {
2800
+ me.prototype.renderInline = function (s, e) {
2789
2801
  return e = e || {}, this.renderer.render(this.parseInline(s, e), this.options, e);
2790
2802
  };
2791
2803
  var vt = /*#__PURE__*/function () {
@@ -2796,7 +2808,7 @@ var vt = /*#__PURE__*/function () {
2796
2808
  key: "instantiate",
2797
2809
  value: function instantiate() {
2798
2810
  var e = window.hljs;
2799
- return e ? new pe({
2811
+ return e ? new me({
2800
2812
  highlight: function highlight(t, i) {
2801
2813
  if (i && e.getLanguage(i)) try {
2802
2814
  return e.highlight(i, t).value;
@@ -2822,7 +2834,7 @@ var vt = /*#__PURE__*/function () {
2822
2834
  // set target to open in a new tab
2823
2835
  typographer: !0
2824
2836
  // Enable smartypants and other sweet transforms
2825
- }) : new pe({
2837
+ }) : new me({
2826
2838
  linkTarget: "_blank"
2827
2839
  // set target to open in a new tab
2828
2840
  });
@@ -3112,7 +3124,7 @@ var Ye = /*#__PURE__*/function () {
3112
3124
  }, {
3113
3125
  key: "isTemporaryElement",
3114
3126
  value: function isTemporaryElement(e) {
3115
- return (e == null ? void 0 : e.bubbleElement.classList.contains("loading-message-text")) || xe.isElementTemporary(e);
3127
+ return (e == null ? void 0 : e.bubbleElement.classList.contains("loading-message-text")) || Ee.isElementTemporary(e);
3116
3128
  }
3117
3129
  }, {
3118
3130
  key: "createBaseElements",
@@ -3458,17 +3470,17 @@ function Eo(s, e) {
3458
3470
  c = e.fetch,
3459
3471
  d = yo(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
3460
3472
  return new Promise(function (u, h) {
3461
- var f = Object.assign({}, i);
3462
- f.accept || (f.accept = Fi);
3473
+ var p = Object.assign({}, i);
3474
+ p.accept || (p.accept = Fi);
3463
3475
  var m;
3464
- function p() {
3476
+ function f() {
3465
3477
  m.abort(), document.hidden || H();
3466
3478
  }
3467
- l || document.addEventListener("visibilitychange", p);
3468
- var _ = xo,
3479
+ l || document.addEventListener("visibilitychange", f);
3480
+ var x = xo,
3469
3481
  S = 0;
3470
3482
  function J() {
3471
- document.removeEventListener("visibilitychange", p), window.clearTimeout(S), m.abort();
3483
+ document.removeEventListener("visibilitychange", f), window.clearTimeout(S), m.abort();
3472
3484
  }
3473
3485
  t == null || t.addEventListener("abort", function () {
3474
3486
  J(), u();
@@ -3488,7 +3500,7 @@ function Eo(s, e) {
3488
3500
  _context3.prev = 1;
3489
3501
  _context3.next = 4;
3490
3502
  return X(s, Object.assign(Object.assign({}, d), {
3491
- headers: f,
3503
+ headers: p,
3492
3504
  signal: m.signal
3493
3505
  }));
3494
3506
  case 4:
@@ -3498,9 +3510,9 @@ function Eo(s, e) {
3498
3510
  case 7:
3499
3511
  _context3.next = 9;
3500
3512
  return mo(ee.body, go(bo(function (I) {
3501
- I ? f[_n] = I : delete f[_n];
3513
+ I ? p[_n] = I : delete p[_n];
3502
3514
  }, function (I) {
3503
- _ = I;
3515
+ x = I;
3504
3516
  }, r)));
3505
3517
  case 9:
3506
3518
  o == null || o();
@@ -3512,7 +3524,7 @@ function Eo(s, e) {
3512
3524
  _context3.prev = 14;
3513
3525
  _context3.t0 = _context3["catch"](1);
3514
3526
  if (!m.signal.aborted) try {
3515
- I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q : _;
3527
+ I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q : x;
3516
3528
  window.clearTimeout(S), S = window.setTimeout(H, I);
3517
3529
  } catch (I) {
3518
3530
  J(), h(I);
@@ -3543,8 +3555,8 @@ var T = /*#__PURE__*/function () {
3543
3555
  var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e, t, i) {
3544
3556
  var n,
3545
3557
  m,
3546
- p,
3547
- _,
3558
+ f,
3559
+ x,
3548
3560
  S,
3549
3561
  J,
3550
3562
  X,
@@ -3558,7 +3570,7 @@ var T = /*#__PURE__*/function () {
3558
3570
  d,
3559
3571
  u,
3560
3572
  h,
3561
- f,
3573
+ p,
3562
3574
  _args6 = arguments;
3563
3575
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3564
3576
  while (1) switch (_context6.prev = _context6.next) {
@@ -3585,19 +3597,19 @@ var T = /*#__PURE__*/function () {
3585
3597
  }
3586
3598
  return _context6.abrupt("return", v.onInterceptorError(i, l, d));
3587
3599
  case 14:
3588
- if (!((p = e.requestSettings) != null && p.handler)) {
3600
+ if (!((f = e.requestSettings) != null && f.handler)) {
3589
3601
  _context6.next = 16;
3590
3602
  break;
3591
3603
  }
3592
3604
  return _context6.abrupt("return", he.stream(e, o, i));
3593
3605
  case 16:
3594
- if (!(((_ = e.requestSettings) == null ? void 0 : _.url) === Ee.URL)) {
3606
+ if (!(((x = e.requestSettings) == null ? void 0 : x.url) === _e.URL)) {
3595
3607
  _context6.next = 18;
3596
3608
  break;
3597
3609
  }
3598
- return _context6.abrupt("return", Ee.requestStream(i, e.streamHandlers));
3610
+ return _context6.abrupt("return", _e.requestStream(i, e.streamHandlers));
3599
3611
  case 18:
3600
- h = new Oe(i), f = v.fetch.bind(this, e, a, n);
3612
+ h = new Oe(i), p = v.fetch.bind(this, e, a, n);
3601
3613
  Eo(((S = e.requestSettings) == null ? void 0 : S.url) || e.url || "", {
3602
3614
  method: ((J = e.requestSettings) == null ? void 0 : J.method) || "POST",
3603
3615
  headers: a,
@@ -3653,7 +3665,7 @@ var T = /*#__PURE__*/function () {
3653
3665
  _context5.t0 = I;
3654
3666
  case 7:
3655
3667
  Rt = _context5.t0;
3656
- (ee = e.extractResultData) == null || ee.call(e, Rt, f, o).then(function (te) {
3668
+ (ee = e.extractResultData) == null || ee.call(e, Rt, p, o).then(function (te) {
3657
3669
  e.asyncCallInProgress && te && te.text !== "" ? (T.simulate(i, e.streamHandlers, te), d(), e.asyncCallInProgress = !1) : T.upsertWFiles(i, h.upsertStreamedMessage.bind(h), h, te);
3658
3670
  })["catch"](function (te) {
3659
3671
  return v.displayError(i, te);
@@ -3803,7 +3815,7 @@ var cs = /*#__PURE__*/function () {
3803
3815
  _context7.t0 = i;
3804
3816
  case 5:
3805
3817
  n = _context7.t0;
3806
- n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.deepChat.stream, n) ? T.simulate(t, e.streamHandlers, n) : (t.addNewMessage(n), e.completionsHandlers.onFinish());
3818
+ n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, n) ? T.simulate(t, e.streamHandlers, n) : (t.addNewMessage(n), e.completionsHandlers.onFinish());
3807
3819
  case 7:
3808
3820
  case "end":
3809
3821
  return _context7.stop();
@@ -3824,7 +3836,7 @@ var cs = /*#__PURE__*/function () {
3824
3836
  return lt;
3825
3837
  }();
3826
3838
  cs.URL = "deep-chat-demo";
3827
- var Ee = cs;
3839
+ var _e = cs;
3828
3840
  var B = /*#__PURE__*/function () {
3829
3841
  function B() {
3830
3842
  _classCallCheck(this, B);
@@ -3832,7 +3844,7 @@ var B = /*#__PURE__*/function () {
3832
3844
  _createClass(B, null, [{
3833
3845
  key: "setup",
3834
3846
  value: function setup(e) {
3835
- e.requestSettings.url !== Ee.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
3847
+ e.requestSettings.url !== _e.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
3836
3848
  }
3837
3849
  }, {
3838
3850
  key: "createConnection",
@@ -3901,7 +3913,7 @@ var B = /*#__PURE__*/function () {
3901
3913
  }
3902
3914
  throw Error(A.INVALID_RESPONSE(l, "server", !!e.deepChat.responseInterceptor, c));
3903
3915
  case 14:
3904
- if (T.isSimulation(e.deepChat.stream)) {
3916
+ if (T.isSimulation(e.stream)) {
3905
3917
  u = B.stream.bind(_this6, e, i, n), h = n[l.role || b.AI_ROLE];
3906
3918
  T.upsertWFiles(i, u, h, d);
3907
3919
  } else i.addNewMessage(d);
@@ -3921,7 +3933,7 @@ var B = /*#__PURE__*/function () {
3921
3933
  return _ref2.apply(this, arguments);
3922
3934
  };
3923
3935
  }(), t.onclose = function () {
3924
- console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.deepChat.stream && e.streamHandlers.abortStream.abort(), B.createConnection(e, i);
3936
+ console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), B.createConnection(e, i);
3925
3937
  };
3926
3938
  }
3927
3939
  }, {
@@ -3972,11 +3984,11 @@ var B = /*#__PURE__*/function () {
3972
3984
  return _context9.abrupt("return", r.newUserMessage.listener(a));
3973
3985
  case 14:
3974
3986
  c = n ? JSON.stringify(a) : a;
3975
- if (!(((u = e.requestSettings) == null ? void 0 : u.url) === Ee.URL)) {
3987
+ if (!(((u = e.requestSettings) == null ? void 0 : u.url) === _e.URL)) {
3976
3988
  _context9.next = 17;
3977
3989
  break;
3978
3990
  }
3979
- return _context9.abrupt("return", Ee.request(e, i));
3991
+ return _context9.abrupt("return", _e.request(e, i));
3980
3992
  case 17:
3981
3993
  r.readyState === void 0 || r.readyState !== r.OPEN ? (console.error("Connection is not open"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error")) : (r.send(JSON.stringify(c)), e.completionsHandlers.onFinish());
3982
3994
  case 18:
@@ -4005,7 +4017,7 @@ var B = /*#__PURE__*/function () {
4005
4017
  key: "stream",
4006
4018
  value: function stream(e, t, i, n) {
4007
4019
  if (!n) return;
4008
- var r = e.deepChat.stream.simulation;
4020
+ var r = e.stream.simulation;
4009
4021
  if (typeof r == "string") {
4010
4022
  var _i$o;
4011
4023
  var o = n.role || b.AI_ROLE,
@@ -4053,7 +4065,7 @@ var he = /*#__PURE__*/function () {
4053
4065
  _context10.t0 = c;
4054
4066
  case 8:
4055
4067
  d = _context10.t0;
4056
- v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.deepChat.stream, d) ? T.simulate(i, e.streamHandlers, d) : (i.addNewMessage(d), e.completionsHandlers.onFinish()) : (console.error(A.INVALID_RESPONSE(c, "server", !!e.deepChat.responseInterceptor, d)), i.addNewErrorMessage("service", "Error in server message"), e.completionsHandlers.onFinish());
4068
+ v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, d) ? T.simulate(i, e.streamHandlers, d) : (i.addNewMessage(d), e.completionsHandlers.onFinish()) : (console.error(A.INVALID_RESPONSE(c, "server", !!e.deepChat.responseInterceptor, d)), i.addNewErrorMessage("service", "Error in server message"), e.completionsHandlers.onFinish());
4057
4069
  case 10:
4058
4070
  case "end":
4059
4071
  return _context10.stop();
@@ -4102,8 +4114,8 @@ var he = /*#__PURE__*/function () {
4102
4114
  n && (he.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), n = !1);
4103
4115
  },
4104
4116
  c = /*#__PURE__*/function () {
4105
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(f) {
4106
- var p, _, m;
4117
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(p) {
4118
+ var f, x, m;
4107
4119
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4108
4120
  while (1) switch (_context12.prev = _context12.next) {
4109
4121
  case 0:
@@ -4114,17 +4126,17 @@ var he = /*#__PURE__*/function () {
4114
4126
  return _context12.abrupt("return");
4115
4127
  case 2:
4116
4128
  _context12.next = 4;
4117
- return (_ = (p = e.deepChat).responseInterceptor) == null ? void 0 : _.call(p, f);
4129
+ return (x = (f = e.deepChat).responseInterceptor) == null ? void 0 : x.call(f, p);
4118
4130
  case 4:
4119
4131
  _context12.t0 = _context12.sent;
4120
4132
  if (_context12.t0) {
4121
4133
  _context12.next = 7;
4122
4134
  break;
4123
4135
  }
4124
- _context12.t0 = f;
4136
+ _context12.t0 = p;
4125
4137
  case 7:
4126
4138
  m = _context12.t0;
4127
- v.validateResponseFormat(m) ? m.error ? (console.error(m.error), o.finaliseStreamedMessage(), i.addNewErrorMessage("service", m.error), e.streamHandlers.onClose(), n = !1) : T.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m) : console.error(A.INVALID_RESPONSE(f, "server", !!e.deepChat.responseInterceptor, m));
4139
+ v.validateResponseFormat(m) ? m.error ? (console.error(m.error), o.finaliseStreamedMessage(), i.addNewErrorMessage("service", m.error), e.streamHandlers.onClose(), n = !1) : T.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m) : console.error(A.INVALID_RESPONSE(p, "server", !!e.deepChat.responseInterceptor, m));
4128
4140
  case 9:
4129
4141
  case "end":
4130
4142
  return _context12.stop();
@@ -4168,7 +4180,7 @@ var he = /*#__PURE__*/function () {
4168
4180
  },
4169
4181
  o = /*#__PURE__*/function () {
4170
4182
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(d) {
4171
- var h, f, u, m, p;
4183
+ var h, p, u, m, f;
4172
4184
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
4173
4185
  while (1) switch (_context13.prev = _context13.next) {
4174
4186
  case 0:
@@ -4179,7 +4191,7 @@ var he = /*#__PURE__*/function () {
4179
4191
  return _context13.abrupt("return");
4180
4192
  case 2:
4181
4193
  _context13.next = 4;
4182
- return (f = (h = e.deepChat).responseInterceptor) == null ? void 0 : f.call(h, d);
4194
+ return (p = (h = e.deepChat).responseInterceptor) == null ? void 0 : p.call(h, d);
4183
4195
  case 4:
4184
4196
  _context13.t0 = _context13.sent;
4185
4197
  if (_context13.t0) {
@@ -4189,9 +4201,9 @@ var he = /*#__PURE__*/function () {
4189
4201
  _context13.t0 = d;
4190
4202
  case 7:
4191
4203
  u = _context13.t0;
4192
- if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.deepChat.stream)) {
4193
- m = B.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4194
- T.upsertWFiles(t, m, p, d);
4204
+ if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.stream)) {
4205
+ m = B.stream.bind(_this7, e, t, i.roleToStream), f = i.roleToStream[d.role || b.AI_ROLE];
4206
+ T.upsertWFiles(t, m, f, d);
4195
4207
  } else t.addNewMessage(u);
4196
4208
  case 9:
4197
4209
  case "end":
@@ -4239,7 +4251,7 @@ var w = /*#__PURE__*/function () {
4239
4251
  var _request3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(e, t, i) {
4240
4252
  var n,
4241
4253
  h,
4242
- f,
4254
+ p,
4243
4255
  m,
4244
4256
  r,
4245
4257
  _yield$v$processReque3,
@@ -4272,27 +4284,27 @@ var w = /*#__PURE__*/function () {
4272
4284
  }
4273
4285
  return _context15.abrupt("return", v.onInterceptorError(i, l, c));
4274
4286
  case 11:
4275
- if (!((f = e.requestSettings) != null && f.handler)) {
4287
+ if (!((p = e.requestSettings) != null && p.handler)) {
4276
4288
  _context15.next = 13;
4277
4289
  break;
4278
4290
  }
4279
4291
  return _context15.abrupt("return", he.request(e, o, i));
4280
4292
  case 13:
4281
- if (!(((m = e.requestSettings) == null ? void 0 : m.url) === Ee.URL)) {
4293
+ if (!(((m = e.requestSettings) == null ? void 0 : m.url) === _e.URL)) {
4282
4294
  _context15.next = 15;
4283
4295
  break;
4284
4296
  }
4285
- return _context15.abrupt("return", Ee.request(e, i));
4297
+ return _context15.abrupt("return", _e.request(e, i));
4286
4298
  case 15:
4287
4299
  d = !0;
4288
4300
  u = v.fetch.bind(this, e, a, n);
4289
- u(o).then(function (p) {
4290
- return d = !!p.ok, p;
4291
- }).then(function (p) {
4292
- return v.processResponseByType(p);
4301
+ u(o).then(function (f) {
4302
+ return d = !!f.ok, f;
4303
+ }).then(function (f) {
4304
+ return v.processResponseByType(f);
4293
4305
  }).then( /*#__PURE__*/function () {
4294
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(p) {
4295
- var J, X, _, S;
4306
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(f) {
4307
+ var J, X, x, S;
4296
4308
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4297
4309
  while (1) switch (_context14.prev = _context14.next) {
4298
4310
  case 0:
@@ -4303,33 +4315,33 @@ var w = /*#__PURE__*/function () {
4303
4315
  return _context14.abrupt("return");
4304
4316
  case 2:
4305
4317
  _context14.next = 4;
4306
- return (X = (J = e.deepChat).responseInterceptor) == null ? void 0 : X.call(J, p);
4318
+ return (X = (J = e.deepChat).responseInterceptor) == null ? void 0 : X.call(J, f);
4307
4319
  case 4:
4308
4320
  _context14.t0 = _context14.sent;
4309
4321
  if (_context14.t0) {
4310
4322
  _context14.next = 7;
4311
4323
  break;
4312
4324
  }
4313
- _context14.t0 = p;
4325
+ _context14.t0 = f;
4314
4326
  case 7:
4315
- _ = _context14.t0;
4327
+ x = _context14.t0;
4316
4328
  _context14.next = 10;
4317
- return e.extractResultData(_, u, o);
4329
+ return e.extractResultData(x, u, o);
4318
4330
  case 10:
4319
4331
  S = _context14.sent;
4320
4332
  if (d) {
4321
4333
  _context14.next = 13;
4322
4334
  break;
4323
4335
  }
4324
- throw p;
4336
+ throw f;
4325
4337
  case 13:
4326
4338
  if (!(!S || _typeof(S) != "object")) {
4327
4339
  _context14.next = 15;
4328
4340
  break;
4329
4341
  }
4330
- throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, _));
4342
+ throw Error(A.INVALID_RESPONSE(f, "response", !!e.deepChat.responseInterceptor, x));
4331
4343
  case 15:
4332
- S.makingAnotherRequest || (T.isSimulatable(e.deepChat.stream, S) ? T.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
4344
+ S.makingAnotherRequest || (T.isSimulatable(e.stream, S) ? T.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
4333
4345
  case 16:
4334
4346
  case "end":
4335
4347
  return _context14.stop();
@@ -4339,8 +4351,8 @@ var w = /*#__PURE__*/function () {
4339
4351
  return function (_x28) {
4340
4352
  return _ref6.apply(this, arguments);
4341
4353
  };
4342
- }())["catch"](function (p) {
4343
- v.displayError(i, p), c();
4354
+ }())["catch"](function (f) {
4355
+ v.displayError(i, f), c();
4344
4356
  });
4345
4357
  case 18:
4346
4358
  case "end":
@@ -4389,7 +4401,7 @@ var w = /*#__PURE__*/function () {
4389
4401
  a = _context16.sent;
4390
4402
  a.timeoutMS ? setTimeout(function () {
4391
4403
  w.executePollRequest(e, t, i, n);
4392
- }, a.timeoutMS) : T.isSimulatable(e.deepChat.stream, o) ? T.simulate(n, e.streamHandlers, a) : (n.addNewMessage(a), r());
4404
+ }, a.timeoutMS) : T.isSimulatable(e.stream, o) ? T.simulate(n, e.streamHandlers, a) : (n.addNewMessage(a), r());
4393
4405
  case 13:
4394
4406
  case "end":
4395
4407
  return _context16.stop();
@@ -4409,9 +4421,9 @@ var w = /*#__PURE__*/function () {
4409
4421
  value: function () {
4410
4422
  var _poll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(e, t, i) {
4411
4423
  var n,
4412
- f,
4413
- m,
4414
4424
  p,
4425
+ m,
4426
+ f,
4415
4427
  r,
4416
4428
  _yield$v$processReque4,
4417
4429
  o,
@@ -4428,7 +4440,7 @@ var w = /*#__PURE__*/function () {
4428
4440
  n = _args17.length > 3 && _args17[3] !== undefined ? _args17[3] : !0;
4429
4441
  r = {
4430
4442
  body: t,
4431
- headers: (f = e.requestSettings) == null ? void 0 : f.headers
4443
+ headers: (p = e.requestSettings) == null ? void 0 : p.headers
4432
4444
  };
4433
4445
  _context17.next = 4;
4434
4446
  return v.processRequestInterceptor(e.deepChat, r);
@@ -4443,7 +4455,7 @@ var w = /*#__PURE__*/function () {
4443
4455
  }
4444
4456
  return _context17.abrupt("return", v.onInterceptorError(i, l));
4445
4457
  case 10:
4446
- c = ((m = e.requestSettings) == null ? void 0 : m.url) || e.url || "", d = ((p = e.requestSettings) == null ? void 0 : p.method) || "POST", u = n ? JSON.stringify(o) : o, h = {
4458
+ c = ((m = e.requestSettings) == null ? void 0 : m.url) || e.url || "", d = ((f = e.requestSettings) == null ? void 0 : f.method) || "POST", u = n ? JSON.stringify(o) : o, h = {
4447
4459
  method: d,
4448
4460
  body: u,
4449
4461
  headers: a
@@ -4531,9 +4543,9 @@ var L = /*#__PURE__*/function () {
4531
4543
  };
4532
4544
  if (_typeof(n) == "object") {
4533
4545
  var a = n.files,
4534
- l = n.request,
4546
+ l = n.connect,
4535
4547
  c = n.button;
4536
- a && (a.infoModal && (r.files.infoModal = a.infoModal, (o = a.infoModal) != null && o.textMarkDown && (r.infoModalTextMarkUp = i.render(a.infoModal.textMarkDown))), a.acceptedFormats && (r.files.acceptedFormats = a.acceptedFormats), a.maxNumberOfFiles && (r.files.maxNumberOfFiles = a.maxNumberOfFiles)), r.button = c, l && (l.headers || l.method || l.url || l.credentials || e.headers || e.method || e.url || e.credentials) && (r.request = {
4548
+ a && (a.infoModal && (r.files.infoModal = a.infoModal, (o = a.infoModal) != null && o.textMarkDown && (r.infoModalTextMarkUp = i.render(a.infoModal.textMarkDown))), a.acceptedFormats && (r.files.acceptedFormats = a.acceptedFormats), a.maxNumberOfFiles && (r.files.maxNumberOfFiles = a.maxNumberOfFiles)), r.button = c, l && (l.headers || l.method || l.url || l.credentials || e.headers || e.method || e.url || e.credentials) && (r.connect = {
4537
4549
  url: (l == null ? void 0 : l.url) || e.url,
4538
4550
  method: (l == null ? void 0 : l.method) || e.method,
4539
4551
  headers: (l == null ? void 0 : l.headers) || e.headers,
@@ -4628,8 +4640,8 @@ var Pe = /*#__PURE__*/function () {
4628
4640
  function Pe(e, t, i) {
4629
4641
  var _a$url;
4630
4642
  _classCallCheck(this, Pe);
4631
- var n, r, o, a;
4632
- this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.request) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, L.set(e, this, t), e.request && (this.requestSettings = e.request), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = Ee.URL), this.requestSettings.websocket && B.setup(this);
4643
+ var n, r, o, a, l;
4644
+ this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.connect) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, L.set(e, this, t), e.connect && (this.requestSettings = e.connect), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = _e.URL), this.requestSettings.websocket && B.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || fe.checkForStream(this.deepChat);
4633
4645
  }
4634
4646
  _createClass(Pe, [{
4635
4647
  key: "verifyKey",
@@ -4650,15 +4662,13 @@ var Pe = /*#__PURE__*/function () {
4650
4662
  value: function () {
4651
4663
  var _request4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(e, t) {
4652
4664
  var i,
4653
- n,
4654
4665
  _args18 = arguments;
4655
4666
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
4656
4667
  while (1) switch (_context18.prev = _context18.next) {
4657
4668
  case 0:
4658
4669
  i = _args18.length > 2 && _args18[2] !== undefined ? _args18[2] : !0;
4659
- n = this.deepChat.stream;
4660
- return _context18.abrupt("return", n && !T.isSimulation(n) ? T.request(this, e, t) : w.request(this, e, t, i));
4661
- case 3:
4670
+ return _context18.abrupt("return", this.stream && !T.isSimulation(this.stream) ? T.request(this, e, t) : w.request(this, e, t, i));
4671
+ case 2:
4662
4672
  case "end":
4663
4673
  return _context18.stop();
4664
4674
  }
@@ -4707,7 +4717,7 @@ var Pe = /*#__PURE__*/function () {
4707
4717
  while (1) switch (_context20.prev = _context20.next) {
4708
4718
  case 0:
4709
4719
  n = Pe.createCustomFormDataBody(this.rawBody, t, i), r = this.requestSettings, o = this.getServiceIOByType(i[0]);
4710
- this.requestSettings = (o == null ? void 0 : o.request) || this.requestSettings;
4720
+ this.requestSettings = (o == null ? void 0 : o.connect) || this.requestSettings;
4711
4721
  _context20.next = 4;
4712
4722
  return this.request(n, e, !1);
4713
4723
  case 4:
@@ -4791,7 +4801,7 @@ var Pe = /*#__PURE__*/function () {
4791
4801
  _context23.next = 4;
4792
4802
  break;
4793
4803
  }
4794
- return _context23.abrupt("return", Re.handleResponseProperty(e));
4804
+ return _context23.abrupt("return", fe.handleResponseProperty(e));
4795
4805
  case 4:
4796
4806
  if (!v.validateResponseFormat(e)) {
4797
4807
  _context23.next = 6;
@@ -4850,7 +4860,7 @@ var q = /*#__PURE__*/function (_Pe) {
4850
4860
  var _this8;
4851
4861
  _classCallCheck(this, q);
4852
4862
  var o;
4853
- _this8 = _callSuper(this, q, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.request) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.requestSettings = _this8.buildRequestSettings(_this8.key || "", e.request);
4863
+ _this8 = _callSuper(this, q, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.requestSettings = _this8.buildRequestSettings(_this8.key || "", e.connect);
4854
4864
  return _this8;
4855
4865
  }
4856
4866
  _createClass(q, [{
@@ -5135,24 +5145,24 @@ var P = /*#__PURE__*/function () {
5135
5145
  return P;
5136
5146
  }();
5137
5147
  var _t = /*#__PURE__*/function () {
5138
- function me() {
5139
- _classCallCheck(this, me);
5148
+ function ge() {
5149
+ _classCallCheck(this, ge);
5140
5150
  }
5141
- _createClass(me, null, [{
5151
+ _createClass(ge, null, [{
5142
5152
  key: "enableButtons",
5143
5153
  value: function enableButtons(e, t) {
5144
5154
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
5145
5155
  window.webLLM ? (e && (e.disabled = !1), t && (t.disabled = !1)) : i < Zi.MODULE_SEARCH_LIMIT_S * 4 && setTimeout(function () {
5146
- return me.enableButtons(e, t, i + 1);
5156
+ return ge.enableButtons(e, t, i + 1);
5147
5157
  }, 250);
5148
5158
  }
5149
5159
  // prettier-ignore
5150
5160
  }, {
5151
5161
  key: "setUpInitial",
5152
5162
  value: function setUpInitial(e, t, i, n) {
5153
- var r = (t == null ? void 0 : t.downloadClass) || me.DOWNLOAD_BUTTON_CLASS,
5154
- o = (t == null ? void 0 : t.uploadClass) || me.UPLOAD_BUTTON_CLASS,
5155
- a = (t == null ? void 0 : t.fileInputClass) || me.FILE_INPUT_CLASS;
5163
+ var r = (t == null ? void 0 : t.downloadClass) || ge.DOWNLOAD_BUTTON_CLASS,
5164
+ o = (t == null ? void 0 : t.uploadClass) || ge.UPLOAD_BUTTON_CLASS,
5165
+ a = (t == null ? void 0 : t.fileInputClass) || ge.FILE_INPUT_CLASS;
5156
5166
  return setTimeout(function () {
5157
5167
  var l = i == null ? void 0 : i.getElementsByClassName(r)[0],
5158
5168
  c = i == null ? void 0 : i.getElementsByClassName(a)[0],
@@ -5163,7 +5173,7 @@ var _t = /*#__PURE__*/function () {
5163
5173
  c.files && c.files.length > 0 && e(c.files);
5164
5174
  }), d && (d.onclick = function () {
5165
5175
  return c.click();
5166
- }), (l || d) && me.enableButtons(l, d);
5176
+ }), (l || d) && ge.enableButtons(l, d);
5167
5177
  }), (t == null ? void 0 : t.initialHtml) || "<div>\n Download or upload a web model that will run entirely on your browser: <br/> \n <button disabled class=\"".concat(r, " deep-chat-button deep-chat-web-model-button\">Download</button>\n ").concat(n ? "" : "<input type=\"file\" class=\"".concat(a, "\" hidden multiple />\n <button disabled class=\"").concat(o, " deep-chat-button deep-chat-web-model-button\">Upload</button>"), "\n </div>");
5168
5178
  }
5169
5179
  }, {
@@ -5188,16 +5198,16 @@ var _t = /*#__PURE__*/function () {
5188
5198
  }, {
5189
5199
  key: "setUpAfterLoad",
5190
5200
  value: function setUpAfterLoad(e, t, i, n) {
5191
- var r = (t == null ? void 0 : t.exportFilesClass) || me.EXPORT_BUTTON_CLASS;
5201
+ var r = (t == null ? void 0 : t.exportFilesClass) || ge.EXPORT_BUTTON_CLASS;
5192
5202
  return setTimeout(function () {
5193
5203
  var o = i == null ? void 0 : i.getElementsByClassName(r)[0];
5194
5204
  o && (o.onclick = function () {
5195
- return me.exportFile(e);
5205
+ return ge.exportFile(e);
5196
5206
  });
5197
5207
  }), (t == null ? void 0 : t.afterLoadHtml) || "<div>\n Model loaded successfully and has been cached for future requests.\n ".concat(n ? "" : "<br/> <button style=\"margin-top: 5px\" class=\"".concat(r, " deep-chat-button\">Export</button>"), "\n </div>");
5198
5208
  }
5199
5209
  }]);
5200
- return me;
5210
+ return ge;
5201
5211
  }();
5202
5212
  _t.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button";
5203
5213
  _t.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button";
@@ -5336,7 +5346,7 @@ var wn = {
5336
5346
  var _this10;
5337
5347
  _classCallCheck(this, M);
5338
5348
  var t, i;
5339
- _this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.initialMessages && M.setUpHistory(_this10._conversationHistory, e.initialMessages);
5349
+ _this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.history && M.setUpHistory(_this10._conversationHistory, e.history);
5340
5350
  return _this10;
5341
5351
  }
5342
5352
  // need ref of messages object as web model exhibits unique behaviour to manipulate chat
@@ -5354,13 +5364,13 @@ var wn = {
5354
5364
  var _this12 = this;
5355
5365
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
5356
5366
  var i;
5357
- window.webLLM ? this.configureInit(this.shouldAddInitialMessage(e.introMessage)) : t > M.MODULE_SEARCH_LIMIT_S ? ((i = this._messages) == null || i.addNewErrorMessage("service", M.WEB_LLM_NOT_FOUND_ERROR), console.error("The deep-chat-web-llm module has not been attached to the window object. Please see the following guide:"), console.error("https://deepchat.dev/examples/externalModules")) : setTimeout(function () {
5367
+ window.webLLM ? this.configureInit(this.shouldAddIntroMessage(e.introMessage)) : t > M.MODULE_SEARCH_LIMIT_S ? ((i = this._messages) == null || i.addNewErrorMessage("service", M.WEB_LLM_NOT_FOUND_ERROR), console.error("The deep-chat-web-llm module has not been attached to the window object. Please see the following guide:"), console.error("https://deepchat.dev/examples/externalModules")) : setTimeout(function () {
5358
5368
  return _this12.findModelInWindow(e, t + 1);
5359
5369
  }, 1e3);
5360
5370
  }
5361
5371
  }, {
5362
- key: "shouldAddInitialMessage",
5363
- value: function shouldAddInitialMessage(e) {
5372
+ key: "shouldAddIntroMessage",
5373
+ value: function shouldAddIntroMessage(e) {
5364
5374
  var t;
5365
5375
  return !e && this._webModel && ((t = this._webModel.introMessage) == null ? void 0 : t.displayed) !== !1;
5366
5376
  }
@@ -5378,7 +5388,7 @@ var wn = {
5378
5388
  }, {
5379
5389
  key: "getIntroMessage",
5380
5390
  value: function getIntroMessage(e) {
5381
- if (!this.shouldAddInitialMessage(e) || !this._chatEl) return;
5391
+ if (!this.shouldAddIntroMessage(e) || !this._chatEl) return;
5382
5392
  var t = Sn.setUpInitial(this.init.bind(this), this._webModel.introMessage, this._chatEl, !!this._webModel.worker);
5383
5393
  return this.scrollToTop(1), {
5384
5394
  role: b.AI_ROLE,
@@ -5489,32 +5499,32 @@ var wn = {
5489
5499
  value: function () {
5490
5500
  var _loadModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(e, t) {
5491
5501
  var _this14 = this;
5492
- var o, a, l, c, d, u, h, i, n, r, _this$getConfig, f, m, p, _f;
5502
+ var o, a, l, c, d, u, h, i, n, r, _this$getConfig, p, m, f, _p;
5493
5503
  return _regeneratorRuntime().wrap(function _callee26$(_context26) {
5494
5504
  while (1) switch (_context26.prev = _context26.next) {
5495
5505
  case 0:
5496
5506
  this.scrollToTop(), M.chat = e, this._isModelLoading = !0;
5497
5507
  i = ((o = this._webModel.introMessage) == null ? void 0 : o.displayed) === !1;
5498
- n = function n(f) {
5508
+ n = function n(p) {
5499
5509
  var m;
5500
5510
  (m = _this14._messages) == null || m.addNewMessage({
5501
- html: "<div>".concat(f.text, "</div>"),
5511
+ html: "<div>".concat(p.text, "</div>"),
5502
5512
  overwrite: !0,
5503
5513
  sendUpdate: !1
5504
5514
  }), i && (setTimeout(function () {
5505
- var p;
5506
- return G.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
5515
+ var f;
5516
+ return G.scrollToBottom((f = _this14._messages) == null ? void 0 : f.elementRef);
5507
5517
  }), i = !1);
5508
5518
  };
5509
5519
  M.chat.setInitProgressCallback(n);
5510
5520
  _context26.prev = 4;
5511
- _this$getConfig = this.getConfig(), f = _this$getConfig.model, m = _this$getConfig.appConfig, p = {};
5512
- this._webModel.instruction && (p.conv_config = {
5521
+ _this$getConfig = this.getConfig(), p = _this$getConfig.model, m = _this$getConfig.appConfig, f = {};
5522
+ this._webModel.instruction && (f.conv_config = {
5513
5523
  system: this._webModel.instruction
5514
5524
  });
5515
- this._conversationHistory.length > 0 && (p.conversation_history = this._conversationHistory);
5525
+ this._conversationHistory.length > 0 && (f.conversation_history = this._conversationHistory);
5516
5526
  _context26.next = 10;
5517
- return M.chat.reload(f, p, m, t);
5527
+ return M.chat.reload(p, f, m, t);
5518
5528
  case 10:
5519
5529
  r = _context26.sent;
5520
5530
  _context26.next = 16;
@@ -5525,9 +5535,9 @@ var wn = {
5525
5535
  return _context26.abrupt("return", this.unloadChat(_context26.t0));
5526
5536
  case 16:
5527
5537
  if ((l = (a = this.deepChat)._validationHandler) == null || l.call(a), (c = this._webModel.introMessage) != null && c.removeAfterLoad) this._webModel.introMessage.displayed === !1 ? (u = this._messages) == null || u.removeLastMessage() : (h = this._removeIntro) == null || h.call(this);else {
5528
- _f = Sn.setUpAfterLoad(r, this._webModel.introMessage, this._chatEl, !!this._webModel.worker);
5538
+ _p = Sn.setUpAfterLoad(r, this._webModel.introMessage, this._chatEl, !!this._webModel.worker);
5529
5539
  (d = this._messages) == null || d.addNewMessage({
5530
- html: _f,
5540
+ html: _p,
5531
5541
  overwrite: !0,
5532
5542
  sendUpdate: !1
5533
5543
  });
@@ -5719,7 +5729,7 @@ var wn = {
5719
5729
  _yield$v$processReque5 = _context32.sent;
5720
5730
  r = _yield$v$processReque5.body;
5721
5731
  o = _yield$v$processReque5.error;
5722
- a = !!this.deepChat.stream;
5732
+ a = !!this.stream;
5723
5733
  try {
5724
5734
  if (o) v.displayError(e, new Error(o)), (a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish)();else if (!r || !r.text) {
5725
5735
  l = A.INVALID_MODEL_REQUEST({
@@ -5728,7 +5738,7 @@ var wn = {
5728
5738
  console.error(l);
5729
5739
  c = a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish;
5730
5740
  v.onInterceptorError(e, l, c);
5731
- } else this.generateRespByType(e, r.text, !!this.deepChat.stream, i);
5741
+ } else this.generateRespByType(e, r.text, !!this.stream, i);
5732
5742
  } catch (l) {
5733
5743
  this.unloadChat(l);
5734
5744
  }
@@ -7278,25 +7288,25 @@ Qi.DEFAULT_MODEL = "tts-1";
7278
7288
  Qi.DEFAULT_VOIDE = "alloy";
7279
7289
  var Fo = Qi;
7280
7290
  var ai = /*#__PURE__*/function (_q5) {
7281
- _inherits(Me, _q5);
7282
- function Me(e) {
7291
+ _inherits(Te, _q5);
7292
+ function Te(e) {
7283
7293
  var _o$model2;
7284
7294
  var _this28;
7285
- _classCallCheck(this, Me);
7295
+ _classCallCheck(this, Te);
7286
7296
  var r, o;
7287
7297
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7288
7298
  i = t == null ? void 0 : t.openAI;
7289
- _this28 = _callSuper(this, Me, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, {
7299
+ _this28 = _callSuper(this, Te, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, {
7290
7300
  audio: {}
7291
- }]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.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>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url = Me.AUDIO_TRANSCRIPTIONS_URL;
7301
+ }]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.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>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url = Te.AUDIO_TRANSCRIPTIONS_URL;
7292
7302
  var n = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
7293
- _typeof(n) == "object" && (_this28.processConfig(n), Me.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = Me.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = Me.canSendFileMessage;
7303
+ _typeof(n) == "object" && (_this28.processConfig(n), Te.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = Te.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = Te.canSendFileMessage;
7294
7304
  return _this28;
7295
7305
  }
7296
- _createClass(Me, [{
7306
+ _createClass(Te, [{
7297
7307
  key: "processConfig",
7298
7308
  value: function processConfig(e) {
7299
- e != null && e.type && e.type === "translation" && (this._service_url = Me.AUDIO_TRANSLATIONS_URL, delete e.language);
7309
+ e != null && e.type && e.type === "translation" && (this._service_url = Te.AUDIO_TRANSLATIONS_URL, delete e.language);
7300
7310
  }
7301
7311
  }, {
7302
7312
  key: "preprocessBody",
@@ -7328,7 +7338,7 @@ var ai = /*#__PURE__*/function (_q5) {
7328
7338
  throw new Error("No file was added");
7329
7339
  case 4:
7330
7340
  this.url = this.requestSettings.url || this._service_url;
7331
- n = this.preprocessBody(this.rawBody, t), r = Me.createFormDataBody(n, i[0]);
7341
+ n = this.preprocessBody(this.rawBody, t), r = Te.createFormDataBody(n, i[0]);
7332
7342
  v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, r, e), !1);
7333
7343
  case 7:
7334
7344
  case "end":
@@ -7387,7 +7397,7 @@ var ai = /*#__PURE__*/function (_q5) {
7387
7397
  }), i;
7388
7398
  }
7389
7399
  }]);
7390
- return Me;
7400
+ return Te;
7391
7401
  }(q);
7392
7402
  ai.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions";
7393
7403
  ai.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations";
@@ -7866,20 +7876,20 @@ var hs = /*#__PURE__*/function (_q8) {
7866
7876
  }
7867
7877
  return _createClass(hs);
7868
7878
  }(q);
7869
- var fs = /*#__PURE__*/function (_hs) {
7870
- _inherits(ps, _hs);
7879
+ var ps = /*#__PURE__*/function (_hs) {
7880
+ _inherits(fs, _hs);
7871
7881
  // prettier-ignore
7872
- function ps(e) {
7882
+ function fs(e) {
7873
7883
  var _a$lang, _l$name, _c$gender;
7874
7884
  var _this33;
7875
- _classCallCheck(this, ps);
7885
+ _classCallCheck(this, fs);
7876
7886
  var n, r, o, a, l, c;
7877
7887
  var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.textToSpeech,
7878
7888
  i = (o = e.directConnection) == null ? void 0 : o.azure;
7879
- _this33 = _callSuper(this, ps, [e, Z.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this33.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(ps.HELP_LINK, "\">here</a> for more info.\n </p>"), _this33.url = "", Object.assign(_this33.rawBody, t), (_a$lang = (a = _this33.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this33.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this33.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this33.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1");
7889
+ _this33 = _callSuper(this, fs, [e, Z.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this33.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(fs.HELP_LINK, "\">here</a> for more info.\n </p>"), _this33.url = "", Object.assign(_this33.rawBody, t), (_a$lang = (a = _this33.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this33.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this33.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this33.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1");
7880
7890
  return _this33;
7881
7891
  }
7882
- _createClass(ps, [{
7892
+ _createClass(fs, [{
7883
7893
  key: "preprocessBody",
7884
7894
  value: function preprocessBody(e, t) {
7885
7895
  var i = t[t.length - 1].text;
@@ -7942,12 +7952,12 @@ var fs = /*#__PURE__*/function (_hs) {
7942
7952
  return extractResultData;
7943
7953
  }()
7944
7954
  }]);
7945
- return ps;
7955
+ return fs;
7946
7956
  }(hs);
7947
- fs.HELP_LINK =
7957
+ ps.HELP_LINK =
7948
7958
  // eslint-disable-next-line max-len
7949
7959
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
7950
- var qo = fs;
7960
+ var qo = ps;
7951
7961
  var ms = /*#__PURE__*/function (_hs2) {
7952
7962
  _inherits(Ui, _hs2);
7953
7963
  function Ui(e) {
@@ -8119,11 +8129,11 @@ var Go = /*#__PURE__*/function (_q9) {
8119
8129
  }]);
8120
8130
  return Go;
8121
8131
  }(q);
8122
- var ve = /*#__PURE__*/function () {
8123
- function ve() {
8124
- _classCallCheck(this, ve);
8132
+ var ye = /*#__PURE__*/function () {
8133
+ function ye() {
8134
+ _classCallCheck(this, ye);
8125
8135
  }
8126
- _createClass(ve, null, [{
8136
+ _createClass(ye, null, [{
8127
8137
  key: "storeFiles",
8128
8138
  value: function () {
8129
8139
  var _storeFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(e, t, i) {
@@ -8214,7 +8224,7 @@ var ve = /*#__PURE__*/function () {
8214
8224
  l({
8215
8225
  src: d.target.result,
8216
8226
  name: t[a].name,
8217
- type: ve.getType(t, a)
8227
+ type: ye.getType(t, a)
8218
8228
  });
8219
8229
  };
8220
8230
  });
@@ -8252,7 +8262,7 @@ var ve = /*#__PURE__*/function () {
8252
8262
  l.text && l.text.startsWith("sandbox:") && (c = l.file_path) != null && c.file_id && i.push({
8253
8263
  path: l.text,
8254
8264
  fileId: l.file_path.file_id,
8255
- name: ve.getFileName(l.text)
8265
+ name: ye.getFileName(l.text)
8256
8266
  });
8257
8267
  });
8258
8268
  }), t != null && t.image_file && i.push({
@@ -8274,7 +8284,7 @@ var ve = /*#__PURE__*/function () {
8274
8284
  break;
8275
8285
  }
8276
8286
  _context78.next = 4;
8277
- return ve.getFiles(e, t);
8287
+ return ye.getFiles(e, t);
8278
8288
  case 4:
8279
8289
  r = _context78.sent;
8280
8290
  (o = n == null ? void 0 : n.text) != null && o.value && r.forEach(function (l, c) {
@@ -8308,9 +8318,9 @@ var ve = /*#__PURE__*/function () {
8308
8318
  return _regeneratorRuntime().wrap(function _callee79$(_context79) {
8309
8319
  while (1) switch (_context79.prev = _context79.next) {
8310
8320
  case 0:
8311
- n = ve.getFileDetails(t, i);
8321
+ n = ye.getFileDetails(t, i);
8312
8322
  _context79.next = 3;
8313
- return ve.getFilesAndNewText(e, n, t.role, i);
8323
+ return ye.getFilesAndNewText(e, n, t.role, i);
8314
8324
  case 3:
8315
8325
  return _context79.abrupt("return", _context79.sent);
8316
8326
  case 4:
@@ -8325,7 +8335,7 @@ var ve = /*#__PURE__*/function () {
8325
8335
  return getFilesAndText;
8326
8336
  }()
8327
8337
  }]);
8328
- return ve;
8338
+ return ye;
8329
8339
  }();
8330
8340
  var li = /*#__PURE__*/function (_q10) {
8331
8341
  _inherits(oe, _q10);
@@ -8345,8 +8355,8 @@ var li = /*#__PURE__*/function (_q10) {
8345
8355
  var _this36$config = _this36.config,
8346
8356
  u = _this36$config.new_assistant,
8347
8357
  h = _this36$config.thread_id,
8348
- f = _this36$config.load_thread_history;
8349
- Object.assign(_this36.newAssistantDetails, u), h && (_this36.sessionId = h), f && (_this36.shouldFetchHistory = !0);
8358
+ p = _this36$config.load_thread_history;
8359
+ Object.assign(_this36.newAssistantDetails, u), h && (_this36.sessionId = h), p && (_this36.shouldFetchHistory = !0);
8350
8360
  var _ref11 = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.assistant,
8351
8361
  m = _ref11.function_handler;
8352
8362
  m && (_this36._functionHandler = m);
@@ -8463,7 +8473,7 @@ var li = /*#__PURE__*/function (_q10) {
8463
8473
  break;
8464
8474
  }
8465
8475
  _context81.next = 16;
8466
- return ve.storeFiles(this, e, i);
8476
+ return ye.storeFiles(this, e, i);
8467
8477
  case 16:
8468
8478
  _context81.t1 = _context81.sent;
8469
8479
  _context81.next = 20;
@@ -8630,7 +8640,7 @@ var li = /*#__PURE__*/function (_q10) {
8630
8640
  return !!d.text || !!d.image_file;
8631
8641
  });
8632
8642
  _context85.next = 3;
8633
- return ve.getFilesAndText(_this38, l, c);
8643
+ return ye.getFilesAndText(_this38, l, c);
8634
8644
  case 3:
8635
8645
  return _context85.abrupt("return", _context85.sent);
8636
8646
  case 4:
@@ -8788,10 +8798,10 @@ li.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants";
8788
8798
  li.POLLING_TIMEOUT_MS = 800;
8789
8799
  var Vo = li;
8790
8800
  var ci = /*#__PURE__*/function (_q11) {
8791
- _inherits(Te, _q11);
8792
- function Te(e) {
8801
+ _inherits(Ce, _q11);
8802
+ function Ce(e) {
8793
8803
  var _this39;
8794
- _classCallCheck(this, Te);
8804
+ _classCallCheck(this, Ce);
8795
8805
  var o;
8796
8806
  var t = e.directConnection,
8797
8807
  i = t == null ? void 0 : t.openAI,
@@ -8803,7 +8813,7 @@ var ci = /*#__PURE__*/function (_q11) {
8803
8813
  }
8804
8814
  }
8805
8815
  };
8806
- _this39 = _callSuper(this, Te, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, n]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39.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>", _this39.url = "", _this39.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
8816
+ _this39 = _callSuper(this, Ce, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, n]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39.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>", _this39.url = "", _this39.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
8807
8817
  var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
8808
8818
  if (_this39.camera) {
8809
8819
  var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
@@ -8814,10 +8824,10 @@ var ci = /*#__PURE__*/function (_q11) {
8814
8824
  }
8815
8825
  };
8816
8826
  }
8817
- _typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = Te.canFileSendMessage;
8827
+ _typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = Ce.canFileSendMessage;
8818
8828
  return _this39;
8819
8829
  }
8820
- _createClass(Te, [{
8830
+ _createClass(Ce, [{
8821
8831
  key: "preprocessBody",
8822
8832
  value: function preprocessBody(e, t) {
8823
8833
  var i = JSON.parse(JSON.stringify(e));
@@ -8831,10 +8841,10 @@ var ci = /*#__PURE__*/function (_q11) {
8831
8841
  var n;
8832
8842
  var r = (a = (o = t[t.length - 1]) == null ? void 0 : o.text) == null ? void 0 : a.trim();
8833
8843
  if (i[1] || r && r !== "") {
8834
- this.url = Te.IMAGE_EDIT_URL;
8844
+ this.url = Ce.IMAGE_EDIT_URL;
8835
8845
  var l = this.preprocessBody(this.rawBody, r);
8836
- n = Te.createFormDataBody(l, i[0], i[1]);
8837
- } else this.url = Te.IMAGE_VARIATIONS_URL, n = Te.createFormDataBody(this.rawBody, i[0]);
8846
+ n = Ce.createFormDataBody(l, i[0], i[1]);
8847
+ } else this.url = Ce.IMAGE_VARIATIONS_URL, n = Ce.createFormDataBody(this.rawBody, i[0]);
8838
8848
  v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, n, e), !1);
8839
8849
  }
8840
8850
  }, {
@@ -8865,7 +8875,7 @@ var ci = /*#__PURE__*/function (_q11) {
8865
8875
  }
8866
8876
  throw new Error("Request settings have not been set up");
8867
8877
  case 8:
8868
- this.url = Te.IMAGE_GENERATION_URL;
8878
+ this.url = Ce.IMAGE_GENERATION_URL;
8869
8879
  r = this.preprocessBody(this.rawBody, t[t.length - 1].text);
8870
8880
  w.request(this, r, e);
8871
8881
  case 11:
@@ -8936,7 +8946,7 @@ var ci = /*#__PURE__*/function (_q11) {
8936
8946
  }), n;
8937
8947
  }
8938
8948
  }]);
8939
- return Te;
8949
+ return Ce;
8940
8950
  }(q);
8941
8951
  ci.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
8942
8952
  ci.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
@@ -8998,7 +9008,7 @@ var ht = /*#__PURE__*/function (_q12) {
8998
9008
  }
8999
9009
  throw new Error("Request settings have not been set up");
9000
9010
  case 2:
9001
- i = this.preprocessBody(this.rawBody, t), n = this.deepChat.stream;
9011
+ i = this.preprocessBody(this.rawBody, t), n = this.stream;
9002
9012
  n && (_typeof(n) != "object" || !n.simulation) || i.stream ? (i.stream = !0, T.request(this, i, e)) : w.request(this, i, e);
9003
9013
  case 4:
9004
9014
  case "end":
@@ -9133,9 +9143,9 @@ var ht = /*#__PURE__*/function (_q12) {
9133
9143
  _context94.next = 35;
9134
9144
  break;
9135
9145
  }
9136
- o.forEach(function (h, f) {
9137
- var p;
9138
- var m = (p = e.tool_calls) == null ? void 0 : p[f];
9146
+ o.forEach(function (h, p) {
9147
+ var f;
9148
+ var m = (f = e.tool_calls) == null ? void 0 : f[p];
9139
9149
  n == null || n.messages.push({
9140
9150
  role: "tool",
9141
9151
  tool_call_id: m == null ? void 0 : m.id,
@@ -9145,8 +9155,8 @@ var ht = /*#__PURE__*/function (_q12) {
9145
9155
  }), delete n.tools, delete n.tool_choice, delete n.stream;
9146
9156
  _context94.prev = 17;
9147
9157
  _context94.next = 20;
9148
- return t == null ? void 0 : t(n).then(function (f) {
9149
- return v.processResponseByType(f);
9158
+ return t == null ? void 0 : t(n).then(function (p) {
9159
+ return v.processResponseByType(p);
9150
9160
  });
9151
9161
  case 20:
9152
9162
  _h = _context94.sent;
@@ -9311,7 +9321,7 @@ var $o = /*#__PURE__*/function () {
9311
9321
  // this should only be called when no _activeService is set or is demo as otherwise we don't want to reconnect
9312
9322
  function create(e) {
9313
9323
  var t = e.directConnection,
9314
- i = e.request,
9324
+ i = e.connect,
9315
9325
  n = e.demo,
9316
9326
  r = e.webModel;
9317
9327
  if (r) return new Zi(e);
@@ -9376,7 +9386,7 @@ bs.attibutes = {
9376
9386
  return new Function("return ".concat(s))();
9377
9387
  }
9378
9388
  };
9379
- function x(s) {
9389
+ function E(s) {
9380
9390
  return function (e, t) {
9381
9391
  Object.defineProperty(e, t, {});
9382
9392
  var i = e.constructor,
@@ -9452,23 +9462,26 @@ var Yo = /*#__PURE__*/function () {
9452
9462
  key: "getText",
9453
9463
  value: function getText(e, t) {
9454
9464
  var i;
9455
- if (!e.directConnection && !e.request && !e.webModel && !e.demo) return "Connect to any API using the [request](https://deepchat.dev/docs/connect#Request)\n property or a popular service via\n [directConnection](https://deepchat.dev/docs/directConnection/#directConnection).\n \n Host AI entirely on your browser via a [webModel](https://deepchat.dev/docs/webModel).\n \n To get started checkout the [Start](https://deepchat.dev/start) page and\n live code [examples](https://deepchat.dev/examples/frameworks).\n \n To remove this message set the [demo](https://deepchat.dev/docs/demo#demo) property to true.";
9465
+ if (!e.directConnection && !e.connect && !e.webModel && !e.demo) return "Connect to any API using the [connect](https://deepchat.dev/docs/connect#connect-1)\n property or a popular service via\n [directConnection](https://deepchat.dev/docs/directConnection/#directConnection).\n \n Host AI entirely on your browser via a [webModel](https://deepchat.dev/docs/webModel).\n \n To get started checkout the [Start](https://deepchat.dev/start) page and\n live code [examples](https://deepchat.dev/examples/frameworks).\n \n To remove this message set the [demo](https://deepchat.dev/docs/demo#demo) property to true.";
9456
9466
  if (e.directConnection) {
9457
9467
  if (!t.isDirectConnection()) return "Please define a valid service inside\n the [directConnection](https://deepchat.dev/docs/directConnection/#directConnection) object.";
9458
9468
  var n = (i = e.directConnection.openAI) == null ? void 0 : i.chat;
9459
9469
  if (_typeof(n) == "object" && n.tools && !n.function_handler) return "Please define the `function_handler` property inside the openAI [chat](https://deepchat.dev/docs/directConnection/openAI#Chat) object.";
9460
- } else if (e.request && !e.request.url && !e.request.handler) return "Please define a `url` or a `handler` property inside the [request](https://deepchat.dev/docs/connect#Request) object.";
9470
+ } else if (e.connect) {
9471
+ if (e.demo && !e.connect.stream) return "When [demo](https://deepchat.dev/docs/demo) mode is enabled - the [connect](https://deepchat.dev/docs/connect#connect-1) object can only accept the [stream](https://deepchat.dev/docs/connect#Stream) property.";
9472
+ if (!e.connect.url && !e.connect.handler) return "Please define a `url` or a `handler` property inside the [connect](https://deepchat.dev/docs/connect#connect-1) object.";
9473
+ }
9461
9474
  return null;
9462
9475
  }
9463
9476
  }]);
9464
9477
  return Yo;
9465
9478
  }();
9466
9479
  var Zo = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n\t viewBox=\"50 30 420 450\" xml:space=\"preserve\">\n<g filter=\"brightness(0) saturate(100%) invert(16%) sepia(0%) saturate(1942%) hue-rotate(215deg) brightness(99%) contrast(93%)\">\n\t<g>\n\t\t<path d=\"M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008\n\t\t\tC350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237\n\t\t\th333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931\n\t\t\tl50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278\n\t\t\tc-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239\n\t\t\th66.527V486.763z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z\"/>\n\t</g>\n</g>\n</svg>";
9467
- var ge = /*#__PURE__*/function () {
9468
- function ge() {
9469
- _classCallCheck(this, ge);
9480
+ var be = /*#__PURE__*/function () {
9481
+ function be() {
9482
+ _classCallCheck(this, be);
9470
9483
  }
9471
- _createClass(ge, null, [{
9484
+ _createClass(be, null, [{
9472
9485
  key: "createImage",
9473
9486
  value: function createImage(e, t) {
9474
9487
  var i = new Image();
@@ -9483,7 +9496,7 @@ var ge = /*#__PURE__*/function () {
9483
9496
  return _regeneratorRuntime().wrap(function _callee97$(_context97) {
9484
9497
  while (1) switch (_context97.prev = _context97.next) {
9485
9498
  case 0:
9486
- n = ge.createImage(t, e.elementRef), r = e.createNewMessageElement("", i);
9499
+ n = be.createImage(t, e.elementRef), r = e.createNewMessageElement("", i);
9487
9500
  r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), ae.addMessage(e, r, "image", i);
9488
9501
  case 2:
9489
9502
  case "end":
@@ -9500,12 +9513,12 @@ var ge = /*#__PURE__*/function () {
9500
9513
  key: "createAudioElement",
9501
9514
  value: function createAudioElement(e, t) {
9502
9515
  var i = document.createElement("audio");
9503
- return i.src = e.src, i.classList.add("audio-player"), i.controls = !0, ye.IS_SAFARI && (i.classList.add("audio-player-safari"), i.classList.add(t === b.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), i;
9516
+ return i.src = e.src, i.classList.add("audio-player"), i.controls = !0, xe.IS_SAFARI && (i.classList.add("audio-player-safari"), i.classList.add(t === b.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), i;
9504
9517
  }
9505
9518
  }, {
9506
9519
  key: "addNewAudioMessage",
9507
9520
  value: function addNewAudioMessage(e, t, i) {
9508
- var n = ge.createAudioElement(t, i),
9521
+ var n = be.createAudioElement(t, i),
9509
9522
  r = e.createNewMessageElement("", i);
9510
9523
  r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), ae.addMessage(e, r, "audio", i);
9511
9524
  }
@@ -9525,7 +9538,7 @@ var ge = /*#__PURE__*/function () {
9525
9538
  key: "addNewAnyFileMessage",
9526
9539
  value: function addNewAnyFileMessage(e, t, i) {
9527
9540
  var n = e.createNewMessageElement("", i),
9528
- r = ge.createAnyFile(t);
9541
+ r = be.createAnyFile(t);
9529
9542
  n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), ae.addMessage(e, n, "file", i);
9530
9543
  }
9531
9544
  // no overwrite previous message logic as it is complex to track which files are to be overwritten
@@ -9534,34 +9547,34 @@ var ge = /*#__PURE__*/function () {
9534
9547
  value: function addMessages(e, t, i) {
9535
9548
  t.forEach(function (n) {
9536
9549
  var r, o;
9537
- n.ref && (n = ae.removeFileRef(n)), n.type === "audio" || (r = n.src) != null && r.startsWith("data:audio") ? ge.addNewAudioMessage(e, n, i) : n.type === "image" || (o = n.src) != null && o.startsWith("data:image") ? ge.addNewImageMessage(e, n, i) : ge.addNewAnyFileMessage(e, n, i);
9550
+ n.ref && (n = ae.removeFileRef(n)), n.type === "audio" || (r = n.src) != null && r.startsWith("data:audio") ? be.addNewAudioMessage(e, n, i) : n.type === "image" || (o = n.src) != null && o.startsWith("data:image") ? be.addNewImageMessage(e, n, i) : be.addNewAnyFileMessage(e, n, i);
9538
9551
  });
9539
9552
  }
9540
9553
  }]);
9541
- return ge;
9554
+ return be;
9542
9555
  }();
9543
- var be = /*#__PURE__*/function (_Ye) {
9544
- _inherits(be, _Ye);
9545
- function be(e, t) {
9556
+ var ve = /*#__PURE__*/function (_Ye) {
9557
+ _inherits(ve, _Ye);
9558
+ function ve(e, t, i) {
9546
9559
  var _this43;
9547
- _classCallCheck(this, be);
9548
- var o, a;
9549
- _this43 = _callSuper(this, be, [e]);
9550
- var i = t.permittedErrorPrefixes,
9551
- n = t.introPanelMarkUp,
9552
- r = t.demo;
9553
- _this43._errorMessageOverrides = (o = e.errorMessages) == null ? void 0 : o.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = be.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = i, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(e.children[0], n, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), e.initialMessages && _this43.populateInitialMessages(e.initialMessages), _this43._displayServiceErrorMessages = (a = e.errorMessages) == null ? void 0 : a.displayServiceErrorMessages, e.getMessages = function () {
9560
+ _classCallCheck(this, ve);
9561
+ var a, l;
9562
+ _this43 = _callSuper(this, ve, [e]);
9563
+ var n = t.permittedErrorPrefixes,
9564
+ r = t.introPanelMarkUp,
9565
+ o = t.demo;
9566
+ _this43._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = ve.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = n, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(i, r, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), _this43.populateHistory(e), _this43._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
9554
9567
  return JSON.parse(JSON.stringify(_this43.messages));
9555
- }, e.clearMessages = _this43.clearMessages.bind(_assertThisInitialized(_this43), t), e.refreshMessages = _this43.refreshTextMessages.bind(_assertThisInitialized(_this43)), e.scrollToBottom = G.scrollToBottom.bind(_assertThisInitialized(_this43), _this43.elementRef), e._addMessage = function (l, c) {
9556
- _this43.addNewMessage(_objectSpread(_objectSpread({}, l), {}, {
9557
- sendUpdate: !!c
9558
- }), !c);
9559
- }, t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this43)), r && _this43.prepareDemo(r), e.textToSpeech && Ft.processConfig(e.textToSpeech, function (l) {
9560
- _this43.textToSpeech = l;
9568
+ }, e.clearMessages = _this43.clearMessages.bind(_assertThisInitialized(_this43), t), e.refreshMessages = _this43.refreshTextMessages.bind(_assertThisInitialized(_this43)), e.scrollToBottom = G.scrollToBottom.bind(_assertThisInitialized(_this43), _this43.elementRef), e._addMessage = function (c, d) {
9569
+ _this43.addNewMessage(_objectSpread(_objectSpread({}, c), {}, {
9570
+ sendUpdate: !!d
9571
+ }), !d);
9572
+ }, t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this43)), o && _this43.prepareDemo(o), e.textToSpeech && Ft.processConfig(e.textToSpeech, function (c) {
9573
+ _this43.textToSpeech = c;
9561
9574
  }), t.fetchHistory && _this43.fetchHistory(t.fetchHistory);
9562
9575
  return _this43;
9563
9576
  }
9564
- _createClass(be, [{
9577
+ _createClass(ve, [{
9565
9578
  key: "prepareDemo",
9566
9579
  value: function prepareDemo(e) {
9567
9580
  _typeof(e) == "object" && (e.response && (this.customDemoResponse = e.response), e.displayErrors && (e.displayErrors["default"] && this.addNewErrorMessage("", ""), e.displayErrors.service && this.addNewErrorMessage("service", ""), e.displayErrors.speechToText && this.addNewErrorMessage("speechToText", "")), e.displayLoadingBubble && this.addLoadingMessage());
@@ -9596,14 +9609,15 @@ var be = /*#__PURE__*/function (_Ye) {
9596
9609
  e.outerContainer.classList.contains("deep-chat-intro") && (e.outerContainer.remove(), this.messageElementRefs.shift());
9597
9610
  }
9598
9611
  }, {
9599
- key: "populateInitialMessages",
9600
- value: function populateInitialMessages(e) {
9612
+ key: "populateHistory",
9613
+ value: function populateHistory(e) {
9601
9614
  var _this44 = this;
9602
- e.forEach(function (t) {
9603
- Re.processInitialMessageFile(t), _this44.addNewMessage(t, !0);
9615
+ var t = e.history || fe.processHistory(e);
9616
+ t && (t.forEach(function (i) {
9617
+ fe.processHistoryFile(i), _this44.addNewMessage(i, !0);
9604
9618
  }), setTimeout(function () {
9605
9619
  return G.scrollToBottom(_this44.elementRef);
9606
- }, 0);
9620
+ }, 0));
9607
9621
  }
9608
9622
  }, {
9609
9623
  key: "fetchHistory",
@@ -9637,13 +9651,13 @@ var be = /*#__PURE__*/function (_Ye) {
9637
9651
  key: "addNewMessage",
9638
9652
  value: function addNewMessage(e) {
9639
9653
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9640
- var i = be.createMessageContent(e),
9654
+ var i = ve.createMessageContent(e),
9641
9655
  n = {
9642
9656
  status: e.overwrite
9643
9657
  };
9644
- if (!e.ignoreText && i.text !== void 0 && e.text !== null && (this.addNewTextMessage(i.text, i.role, n), !t && this.textToSpeech && i.role !== b.USER_ROLE && Ft.speak(i.text, this.textToSpeech)), i.files && Array.isArray(i.files) && ge.addMessages(this, i.files, i.role), i.html !== void 0 && i.html !== null) {
9658
+ if (!e.ignoreText && i.text !== void 0 && e.text !== null && (this.addNewTextMessage(i.text, i.role, n), !t && this.textToSpeech && i.role !== b.USER_ROLE && Ft.speak(i.text, this.textToSpeech)), i.files && Array.isArray(i.files) && be.addMessages(this, i.files, i.role), i.html !== void 0 && i.html !== null) {
9645
9659
  var r = Qe.add(this, i.html, i.role, this.messageElementRefs, n);
9646
- xe.isElementTemporary(r) && delete i.html;
9660
+ Ee.isElementTemporary(r) && delete i.html;
9647
9661
  }
9648
9662
  this.isValidMessageContent(i) && this.updateStateOnMessage(i, e.overwrite, e.sendUpdate, t);
9649
9663
  }
@@ -9665,7 +9679,7 @@ var be = /*#__PURE__*/function (_Ye) {
9665
9679
  value: function removeMessageOnError() {
9666
9680
  var e = this.messageElementRefs[this.messageElementRefs.length - 1],
9667
9681
  t = e == null ? void 0 : e.bubbleElement;
9668
- (t != null && t.classList.contains(Oe.MESSAGE_CLASS) && t.textContent === "" || be.isTemporaryElement(e)) && this.removeLastMessage();
9682
+ (t != null && t.classList.contains(Oe.MESSAGE_CLASS) && t.textContent === "" || ve.isTemporaryElement(e)) && this.removeLastMessage();
9669
9683
  }
9670
9684
  // prettier-ignore
9671
9685
  }, {
@@ -9673,7 +9687,7 @@ var be = /*#__PURE__*/function (_Ye) {
9673
9687
  value: function addNewErrorMessage(e, t) {
9674
9688
  var l, c, d, u, h;
9675
9689
  this.removeMessageOnError();
9676
- var i = be.createBaseElements(),
9690
+ var i = ve.createBaseElements(),
9677
9691
  n = i.outerContainer,
9678
9692
  r = i.bubbleElement;
9679
9693
  r.classList.add("error-message-text");
@@ -9688,10 +9702,10 @@ var be = /*#__PURE__*/function (_Ye) {
9688
9702
  if (e) {
9689
9703
  if (this._displayServiceErrorMessages) return e;
9690
9704
  if (typeof e == "string" && this._permittedErrorPrefixes) {
9691
- var t = be.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e);
9705
+ var t = ve.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e);
9692
9706
  if (t) return t;
9693
9707
  } else if (Array.isArray(e) && this._permittedErrorPrefixes) for (var _t3 = 0; _t3 < e.length; _t3 += 1) {
9694
- var _i14 = be.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e[_t3]);
9708
+ var _i14 = ve.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e[_t3]);
9695
9709
  if (_i14) return _i14;
9696
9710
  }
9697
9711
  }
@@ -9783,7 +9797,7 @@ var be = /*#__PURE__*/function (_Ye) {
9783
9797
  for (var _i15 = 0; _i15 < e.length; _i15 += 1) if (t.startsWith(e[_i15])) return t;
9784
9798
  }
9785
9799
  }]);
9786
- return be;
9800
+ return ve;
9787
9801
  }(Ye);
9788
9802
  var Mt = /*#__PURE__*/function () {
9789
9803
  function $() {
@@ -10020,14 +10034,14 @@ var yt = /*#__PURE__*/function () {
10020
10034
  }]);
10021
10035
  return yt;
10022
10036
  }();
10023
- var Ae = /*#__PURE__*/function () {
10024
- function Ae() {
10025
- _classCallCheck(this, Ae);
10037
+ var ke = /*#__PURE__*/function () {
10038
+ function ke() {
10039
+ _classCallCheck(this, ke);
10026
10040
  }
10027
- _createClass(Ae, null, [{
10041
+ _createClass(ke, null, [{
10028
10042
  key: "addItemEvents",
10029
10043
  value: function addItemEvents(e, t, i, n) {
10030
- Ie.add(t, n), t.addEventListener("click", function () {
10044
+ Le.add(t, n), t.addEventListener("click", function () {
10031
10045
  i.click();
10032
10046
  }), t.addEventListener("mouseenter", function (r) {
10033
10047
  e.highlightedItem = r.target;
@@ -10051,7 +10065,7 @@ var Ae = /*#__PURE__*/function () {
10051
10065
  key: "populateItem",
10052
10066
  value: function populateItem(e, t, i, n) {
10053
10067
  var r = e.children[0];
10054
- r.classList.contains("text-button") ? t.appendChild(Ae.createItemText(r.textContent, n == null ? void 0 : n.text)) : (t.appendChild(Ae.createItemIcon(e, n == null ? void 0 : n.iconContainer)), t.appendChild(Ae.createItemText(i, n == null ? void 0 : n.text)));
10068
+ r.classList.contains("text-button") ? t.appendChild(ke.createItemText(r.textContent, n == null ? void 0 : n.text)) : (t.appendChild(ke.createItemIcon(e, n == null ? void 0 : n.iconContainer)), t.appendChild(ke.createItemText(i, n == null ? void 0 : n.text)));
10055
10069
  }
10056
10070
  // prettier-ignore
10057
10071
  }, {
@@ -10061,16 +10075,16 @@ var Ae = /*#__PURE__*/function () {
10061
10075
  var n = t.elementRef,
10062
10076
  r = t.dropupText,
10063
10077
  o = document.createElement("div");
10064
- Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), Ae.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
10078
+ Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), ke.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
10065
10079
  var a = C.processStateful((i == null ? void 0 : i.item) || {}, {
10066
10080
  backgroundColor: "#f3f3f3"
10067
10081
  }, {
10068
10082
  backgroundColor: "#ebebeb"
10069
10083
  });
10070
- return Ae.addItemEvents(e, o, n, a), o;
10084
+ return ke.addItemEvents(e, o, n, a), o;
10071
10085
  }
10072
10086
  }]);
10073
- return Ae;
10087
+ return ke;
10074
10088
  }();
10075
10089
  var nn = /*#__PURE__*/function () {
10076
10090
  function nn(e, t) {
@@ -10099,7 +10113,7 @@ var nn = /*#__PURE__*/function () {
10099
10113
  }, {
10100
10114
  key: "addItem",
10101
10115
  value: function addItem(e) {
10102
- var t = Ae.createItem(this, e, this._styles);
10116
+ var t = ke.createItem(this, e, this._styles);
10103
10117
  this.elementRef.appendChild(t);
10104
10118
  }
10105
10119
  // prettier-ignore
@@ -10301,32 +10315,32 @@ var ea = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
10301
10315
  dropupText: "File"
10302
10316
  }
10303
10317
  };
10304
- var fe = /*#__PURE__*/function () {
10318
+ var pe = /*#__PURE__*/function () {
10305
10319
  // prettier-ignore
10306
- function fe(e, t, i, n) {
10320
+ function pe(e, t, i, n) {
10307
10321
  var _this49 = this;
10308
- _classCallCheck(this, fe);
10322
+ _classCallCheck(this, pe);
10309
10323
  this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = n, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
10310
10324
  _this49._validationHandler = e._validationHandler;
10311
10325
  });
10312
10326
  }
10313
- _createClass(fe, [{
10327
+ _createClass(pe, [{
10314
10328
  key: "attemptAddFile",
10315
10329
  value: function attemptAddFile(e, t) {
10316
- return fe.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
10330
+ return pe.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
10317
10331
  }
10318
10332
  }, {
10319
10333
  key: "addAttachmentBasedOnType",
10320
10334
  value: function addAttachmentBasedOnType(e, t, i) {
10321
- var n = fe.getTypeFromBlob(e);
10335
+ var n = pe.getTypeFromBlob(e);
10322
10336
  if (n === "image") {
10323
- var r = fe.createImageAttachment(t);
10337
+ var r = pe.createImageAttachment(t);
10324
10338
  this.addFileAttachment(e, "image", r, i);
10325
10339
  } else if (n === "audio") {
10326
10340
  var _r2 = Hi.createAudioAttachment(t);
10327
10341
  this.addFileAttachment(e, "audio", _r2, i);
10328
10342
  } else {
10329
- var _r3 = fe.createAnyFileAttachment(e.name);
10343
+ var _r3 = pe.createAnyFileAttachment(e.name);
10330
10344
  this.addFileAttachment(e, "any", _r3, i);
10331
10345
  }
10332
10346
  }
@@ -10334,7 +10348,7 @@ var fe = /*#__PURE__*/function () {
10334
10348
  key: "addFileAttachment",
10335
10349
  value: function addFileAttachment(e, t, i, n) {
10336
10350
  var a;
10337
- var r = fe.createContainer(i);
10351
+ var r = pe.createContainer(i);
10338
10352
  if (this._attachments.length >= this._fileCountLimit) {
10339
10353
  var l = this._attachments[this._attachments.length - 1].removeButton;
10340
10354
  l == null || l.click();
@@ -10420,7 +10434,7 @@ var fe = /*#__PURE__*/function () {
10420
10434
  key: "createAnyFileAttachment",
10421
10435
  value: function createAnyFileAttachment(e) {
10422
10436
  var t = document.createElement("div");
10423
- t.classList.add("border-bound-attachment"), ye.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
10437
+ t.classList.add("border-bound-attachment"), xe.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
10424
10438
  var i = document.createElement("div");
10425
10439
  i.classList.add("any-file-attachment-text");
10426
10440
  var n = document.createElement("div");
@@ -10433,23 +10447,23 @@ var fe = /*#__PURE__*/function () {
10433
10447
  return t.classList.add("file-attachment"), t.appendChild(e), t;
10434
10448
  }
10435
10449
  }]);
10436
- return fe;
10450
+ return pe;
10437
10451
  }();
10438
10452
  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 <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
10439
10453
  Tn = "<?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<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
10440
- vs = /*#__PURE__*/function (_fe) {
10441
- _inherits(Ce, _fe);
10454
+ vs = /*#__PURE__*/function (_pe) {
10455
+ _inherits(Ae, _pe);
10442
10456
  // prettier-ignore
10443
- function Ce(e, t, i, n) {
10444
- _classCallCheck(this, Ce);
10445
- return _callSuper(this, Ce, [e, t, i, n]);
10457
+ function Ae(e, t, i, n) {
10458
+ _classCallCheck(this, Ae);
10459
+ return _callSuper(this, Ae, [e, t, i, n]);
10446
10460
  }
10447
- _createClass(Ce, [{
10461
+ _createClass(Ae, [{
10448
10462
  key: "createTimer",
10449
10463
  value: function createTimer(e, t) {
10450
10464
  var _this50 = this;
10451
10465
  var i = 0;
10452
- var n = t !== void 0 && t < Ce.TIMER_LIMIT_S ? t : Ce.TIMER_LIMIT_S;
10466
+ var n = t !== void 0 && t < Ae.TIMER_LIMIT_S ? t : Ae.TIMER_LIMIT_S;
10453
10467
  return setInterval(function () {
10454
10468
  var a;
10455
10469
  i += 1, i === n && ((a = _this50.stopPlaceholderCallback) == null || a.call(_this50), _this50.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
@@ -10461,7 +10475,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10461
10475
  }, {
10462
10476
  key: "createPlaceholderAudioAttachment",
10463
10477
  value: function createPlaceholderAudioAttachment(e) {
10464
- var t = Ce.createAudioContainer(),
10478
+ var t = Ae.createAudioContainer(),
10465
10479
  i = document.createElement("div");
10466
10480
  i.classList.add("audio-placeholder-text-3-digits");
10467
10481
  var n = document.createElement("div");
@@ -10498,7 +10512,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10498
10512
  key: "completePlaceholderAttachment",
10499
10513
  value: function completePlaceholderAttachment(e, t) {
10500
10514
  var i = this._activePlaceholderAttachment;
10501
- i && (i.file = e, Ce.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
10515
+ i && (i.file = e, Ae.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
10502
10516
  }
10503
10517
  }, {
10504
10518
  key: "removePlaceholderAttachment",
@@ -10514,7 +10528,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10514
10528
  key: "createAudioContainer",
10515
10529
  value: function createAudioContainer() {
10516
10530
  var e = document.createElement("div");
10517
- return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), ye.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
10531
+ return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), xe.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
10518
10532
  }
10519
10533
  }, {
10520
10534
  key: "addAudioElements",
@@ -10538,8 +10552,8 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10538
10552
  }, {
10539
10553
  key: "createAudioAttachment",
10540
10554
  value: function createAudioAttachment(e) {
10541
- var t = Ce.createAudioContainer();
10542
- return Ce.addAudioElements(t, e), t;
10555
+ var t = Ae.createAudioContainer();
10556
+ return Ae.addAudioElements(t, e), t;
10543
10557
  }
10544
10558
  }, {
10545
10559
  key: "stopAttachmentPlayback",
@@ -10548,8 +10562,8 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10548
10562
  (n = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && n.classList.contains("stop-icon") && e.children[0].click();
10549
10563
  }
10550
10564
  }]);
10551
- return Ce;
10552
- }(fe);
10565
+ return Ae;
10566
+ }(pe);
10553
10567
  vs.TIMER_LIMIT_S = 5999;
10554
10568
  var Hi = vs;
10555
10569
  var oa = /*#__PURE__*/function () {
@@ -10561,7 +10575,7 @@ var oa = /*#__PURE__*/function () {
10561
10575
  value:
10562
10576
  // prettier-ignore
10563
10577
  function create(e, t, i, n, r) {
10564
- return r === "audio" ? new Hi(e, t, i, n) : new fe(e, t, i, n);
10578
+ return r === "audio" ? new Hi(e, t, i, n) : new pe(e, t, i, n);
10565
10579
  }
10566
10580
  }]);
10567
10581
  return oa;
@@ -10779,22 +10793,22 @@ var ys = /*#__PURE__*/function () {
10779
10793
  }();
10780
10794
  ys.MODAL_CLOSE_TIMEOUT_MS = 190;
10781
10795
  var ct = ys;
10782
- var ft = /*#__PURE__*/function (_Tt2) {
10783
- _inherits(ft, _Tt2);
10796
+ var pt = /*#__PURE__*/function (_Tt2) {
10797
+ _inherits(pt, _Tt2);
10784
10798
  // prettier-ignore
10785
- function ft(e, t, i, n, r, o) {
10799
+ function pt(e, t, i, n, r, o) {
10786
10800
  var _this55;
10787
- _classCallCheck(this, ft);
10788
- var l, c, d, u, h, f;
10789
- _this55 = _callSuper(this, ft, [ft.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o]);
10801
+ _classCallCheck(this, pt);
10802
+ var l, c, d, u, h, p;
10803
+ _this55 = _callSuper(this, pt, [pt.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o]);
10790
10804
  var a = _this55.createInnerElements(n, r, _this55._customStyles);
10791
- _this55._inputElement = ft.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this55.addClickEvent(e, i), _this55.elementRef.replaceChildren(a.styles), _this55.reapplyStateStyle("styles"), _this55._fileAttachmentsType = t, _this55._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (f = (h = i.files) == null ? void 0 : h.infoModal) == null ? void 0 : f.openModalOnce;
10805
+ _this55._inputElement = pt.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this55.addClickEvent(e, i), _this55.elementRef.replaceChildren(a.styles), _this55.reapplyStateStyle("styles"), _this55._fileAttachmentsType = t, _this55._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (p = (h = i.files) == null ? void 0 : h.infoModal) == null ? void 0 : p.openModalOnce;
10792
10806
  return _this55;
10793
10807
  }
10794
- _createClass(ft, [{
10808
+ _createClass(pt, [{
10795
10809
  key: "createInnerElements",
10796
10810
  value: function createInnerElements(e, t, i) {
10797
- var n = ft.createSVGIconElement(e, t);
10811
+ var n = pt.createSVGIconElement(e, t);
10798
10812
  return {
10799
10813
  styles: this.createInnerElement(n, "styles", i)
10800
10814
  };
@@ -10845,7 +10859,7 @@ var ft = /*#__PURE__*/function (_Tt2) {
10845
10859
  return i.id = e, i;
10846
10860
  }
10847
10861
  }]);
10848
- return ft;
10862
+ return pt;
10849
10863
  }(Tt);
10850
10864
  var ue = /*#__PURE__*/function () {
10851
10865
  function ue() {
@@ -10901,11 +10915,11 @@ var ue = /*#__PURE__*/function () {
10901
10915
  }]);
10902
10916
  return ue;
10903
10917
  }();
10904
- var ke = /*#__PURE__*/function () {
10905
- function ke() {
10906
- _classCallCheck(this, ke);
10918
+ var Ie = /*#__PURE__*/function () {
10919
+ function Ie() {
10920
+ _classCallCheck(this, Ie);
10907
10921
  }
10908
- _createClass(ke, null, [{
10922
+ _createClass(Ie, null, [{
10909
10923
  key: "validate",
10910
10924
  value:
10911
10925
  // prettier-ignore
@@ -10929,7 +10943,7 @@ var ke = /*#__PURE__*/function () {
10929
10943
  a = i.getAllFileData(), l = a == null ? void 0 : a.map(function (c) {
10930
10944
  return c.file;
10931
10945
  });
10932
- return _context102.abrupt("return", ke.validate(e, n, o, l));
10946
+ return _context102.abrupt("return", Ie.validate(e, n, o, l));
10933
10947
  case 5:
10934
10948
  case "end":
10935
10949
  return _context102.stop();
@@ -10952,7 +10966,7 @@ var ke = /*#__PURE__*/function () {
10952
10966
  n = (r = t.files) == null ? void 0 : r.map(function (o) {
10953
10967
  return o.file;
10954
10968
  });
10955
- return _context103.abrupt("return", ke.validate(e, i, t.text, n, !0));
10969
+ return _context103.abrupt("return", Ie.validate(e, i, t.text, n, !0));
10956
10970
  case 2:
10957
10971
  case "end":
10958
10972
  return _context103.stop();
@@ -10973,21 +10987,21 @@ var ke = /*#__PURE__*/function () {
10973
10987
  }, {
10974
10988
  key: "attach",
10975
10989
  value: function attach(e, t, i, n, r) {
10976
- var o = e.validateInput || Re.processValidateInput(e);
10990
+ var o = e.validateInput || fe.processValidateInput(e);
10977
10991
  e._validationHandler = /*#__PURE__*/function () {
10978
10992
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee104(a) {
10979
10993
  var l;
10980
10994
  return _regeneratorRuntime().wrap(function _callee104$(_context104) {
10981
10995
  while (1) switch (_context104.prev = _context104.next) {
10982
10996
  case 0:
10983
- if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !ke.validateWebsocket(t, r))) {
10997
+ if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !Ie.validateWebsocket(t, r))) {
10984
10998
  _context104.next = 2;
10985
10999
  break;
10986
11000
  }
10987
11001
  return _context104.abrupt("return", !1);
10988
11002
  case 2:
10989
11003
  l = o || t.canSendMessage;
10990
- return _context104.abrupt("return", l ? a ? ke.useValidationFuncProgrammatic(l, a, r) : ke.useValidationFunc(l, i, n, r) : null);
11004
+ return _context104.abrupt("return", l ? a ? Ie.useValidationFuncProgrammatic(l, a, r) : Ie.useValidationFunc(l, i, n, r) : null);
10991
11005
  case 4:
10992
11006
  case "end":
10993
11007
  return _context104.stop();
@@ -11000,7 +11014,7 @@ var ke = /*#__PURE__*/function () {
11000
11014
  }();
11001
11015
  }
11002
11016
  }]);
11003
- return ke;
11017
+ return Ie;
11004
11018
  }();
11005
11019
  var aa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\" width=\"1.4em\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\t viewBox=\"0 0 490.9 490.9\" xml:space=\"preserve\">\n\t<g>\n\t\t<g>\n\t\t\t<path d=\"M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5\n\t\t\t\tC149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5\n\t\t\t\tc0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z\"/>\n\t\t\t<path d=\"M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3\n\t\t\t\ts5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8\n\t\t\t\tc0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9\n\t\t\t\tC106.6,220,101.2,214.5,94.4,214.5z\"/>\n\t\t</g>\n\t</g>\n</svg>\n";
11006
11020
  var xt = /*#__PURE__*/function (_Tt3) {
@@ -11088,21 +11102,21 @@ Object.defineProperty(ze, "__esModule", {
11088
11102
  value: !0
11089
11103
  });
11090
11104
  ze.Text = void 0;
11091
- var _e = /*#__PURE__*/function () {
11092
- function _e() {
11093
- _classCallCheck(this, _e);
11105
+ var Se = /*#__PURE__*/function () {
11106
+ function Se() {
11107
+ _classCallCheck(this, Se);
11094
11108
  }
11095
- _createClass(_e, null, [{
11109
+ _createClass(Se, null, [{
11096
11110
  key: "capitalize",
11097
11111
  value: function capitalize(e) {
11098
- return e.replace(_e.FIRST_CHAR_REGEX, function (t) {
11112
+ return e.replace(Se.FIRST_CHAR_REGEX, function (t) {
11099
11113
  return t.toUpperCase();
11100
11114
  });
11101
11115
  }
11102
11116
  }, {
11103
11117
  key: "lineBreak",
11104
11118
  value: function lineBreak(e) {
11105
- return e.replace(_e.DOUBLE_LINE, "<p></p>").replace(_e.ONE_LINE, "<br>");
11119
+ return e.replace(Se.DOUBLE_LINE, "<p></p>").replace(Se.ONE_LINE, "<br>");
11106
11120
  }
11107
11121
  }, {
11108
11122
  key: "isCharDefined",
@@ -11116,12 +11130,12 @@ var _e = /*#__PURE__*/function () {
11116
11130
  return e.split(/(\W+)/);
11117
11131
  }
11118
11132
  }]);
11119
- return _e;
11133
+ return Se;
11120
11134
  }();
11121
- ze.Text = _e;
11122
- _e.FIRST_CHAR_REGEX = /\S/;
11123
- _e.DOUBLE_LINE = /\n\n/g;
11124
- _e.ONE_LINE = /\n/g;
11135
+ ze.Text = Se;
11136
+ Se.FIRST_CHAR_REGEX = /\S/;
11137
+ Se.DOUBLE_LINE = /\n\n/g;
11138
+ Se.ONE_LINE = /\n/g;
11125
11139
  Object.defineProperty(At, "__esModule", {
11126
11140
  value: !0
11127
11141
  });
@@ -11247,11 +11261,11 @@ var Y = /*#__PURE__*/function () {
11247
11261
  }();
11248
11262
  hi.EventListeners = Y;
11249
11263
  Y.KEY_DOWN_TIMEOUT = null;
11250
- var fi = {};
11251
- Object.defineProperty(fi, "__esModule", {
11264
+ var pi = {};
11265
+ Object.defineProperty(pi, "__esModule", {
11252
11266
  value: !0
11253
11267
  });
11254
- fi.PreResultUtils = void 0;
11268
+ pi.PreResultUtils = void 0;
11255
11269
  var ua = /*#__PURE__*/function () {
11256
11270
  function ua() {
11257
11271
  _classCallCheck(this, ua);
@@ -11267,7 +11281,7 @@ var ua = /*#__PURE__*/function () {
11267
11281
  }]);
11268
11282
  return ua;
11269
11283
  }();
11270
- fi.PreResultUtils = ua;
11284
+ pi.PreResultUtils = ua;
11271
11285
  var It = {},
11272
11286
  Lt = {};
11273
11287
  Object.defineProperty(Lt, "__esModule", {
@@ -11369,11 +11383,11 @@ Object.defineProperty(qe, "__esModule", {
11369
11383
  value: !0
11370
11384
  });
11371
11385
  qe.Cursor = void 0;
11372
- var pt = /*#__PURE__*/function () {
11373
- function pt() {
11374
- _classCallCheck(this, pt);
11386
+ var ft = /*#__PURE__*/function () {
11387
+ function ft() {
11388
+ _classCallCheck(this, ft);
11375
11389
  }
11376
- _createClass(pt, null, [{
11390
+ _createClass(ft, null, [{
11377
11391
  key: "setOffsetForGeneric",
11378
11392
  value: function setOffsetForGeneric(e, t) {
11379
11393
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -11381,7 +11395,7 @@ var pt = /*#__PURE__*/function () {
11381
11395
  for (var r = 0; r < e.childNodes.length; r += 1) {
11382
11396
  var o = e.childNodes[r];
11383
11397
  if (o.childNodes.length > 0) {
11384
- var a = pt.setOffsetForGeneric(o, t, i);
11398
+ var a = ft.setOffsetForGeneric(o, t, i);
11385
11399
  if (a === -1) return -1;
11386
11400
  i += a;
11387
11401
  } else if (o.textContent !== null) {
@@ -11409,8 +11423,8 @@ var pt = /*#__PURE__*/function () {
11409
11423
  value: function setOffsetForSafariGeneric(e, t) {
11410
11424
  var i = window.getSelection();
11411
11425
  if (i) {
11412
- var n = pt.getGenericElementCursorOffset(e, i, !0);
11413
- console.log(n), setTimeout(function () {}, 100), pt.setOffsetForGeneric(e, n + t);
11426
+ var n = ft.getGenericElementCursorOffset(e, i, !0);
11427
+ console.log(n), setTimeout(function () {}, 100), ft.setOffsetForGeneric(e, n + t);
11414
11428
  }
11415
11429
  }
11416
11430
  // set to automatically scroll to cursor (scroll does not work in Safari)
@@ -11448,16 +11462,16 @@ var pt = /*#__PURE__*/function () {
11448
11462
  return n;
11449
11463
  }
11450
11464
  }]);
11451
- return pt;
11465
+ return ft;
11452
11466
  }();
11453
- qe.Cursor = pt;
11467
+ qe.Cursor = ft;
11454
11468
  Object.defineProperty(It, "__esModule", {
11455
11469
  value: !0
11456
11470
  });
11457
11471
  It.CommandUtils = void 0;
11458
11472
  var An = Lt,
11459
- fa = Ue,
11460
- pa = nt,
11473
+ pa = Ue,
11474
+ fa = nt,
11461
11475
  kn = qe,
11462
11476
  In = ze;
11463
11477
  var K = /*#__PURE__*/function () {
@@ -11493,7 +11507,7 @@ var K = /*#__PURE__*/function () {
11493
11507
  }, {
11494
11508
  key: "setText",
11495
11509
  value: function setText(e, t, i, n) {
11496
- K.toggleCommandModeOff(e), fa.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || kn.Cursor.setOffsetForPrimitive(n, i.length, !0), pa.Browser.IS_SAFARI() && e.autoScroll && An.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || kn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
11510
+ K.toggleCommandModeOff(e), pa.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || kn.Cursor.setOffsetForPrimitive(n, i.length, !0), fa.Browser.IS_SAFARI() && e.autoScroll && An.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || kn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
11497
11511
  return An.AutoScroll.scrollGeneric(e, n);
11498
11512
  })), e.resetRecording(t);
11499
11513
  }
@@ -11536,8 +11550,8 @@ var K = /*#__PURE__*/function () {
11536
11550
  doNotProcessTranscription: !1
11537
11551
  };
11538
11552
  if (c.pause && h(c.pause, d, u)) return K.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
11539
- var f;
11540
- e.isPaused = !0, (f = e.onPauseTrigger) === null || f === void 0 || f.call(e, !0);
11553
+ var p;
11554
+ e.isPaused = !0, (p = e.onPauseTrigger) === null || p === void 0 || p.call(e, !0);
11541
11555
  }), {
11542
11556
  doNotProcessTranscription: !1
11543
11557
  };
@@ -11556,11 +11570,11 @@ var K = /*#__PURE__*/function () {
11556
11570
  return K;
11557
11571
  }();
11558
11572
  It.CommandUtils = K;
11559
- var pi = {};
11560
- Object.defineProperty(pi, "__esModule", {
11573
+ var fi = {};
11574
+ Object.defineProperty(fi, "__esModule", {
11561
11575
  value: !0
11562
11576
  });
11563
- pi.Highlight = void 0;
11577
+ fi.Highlight = void 0;
11564
11578
  var ma = Ue,
11565
11579
  st = qe;
11566
11580
  var Kt = /*#__PURE__*/function () {
@@ -11612,7 +11626,7 @@ var Kt = /*#__PURE__*/function () {
11612
11626
  }]);
11613
11627
  return Kt;
11614
11628
  }();
11615
- pi.Highlight = Kt;
11629
+ fi.Highlight = Kt;
11616
11630
  var mi = {};
11617
11631
  Object.defineProperty(mi, "__esModule", {
11618
11632
  value: !0
@@ -11685,10 +11699,10 @@ Object.defineProperty(kt, "__esModule", {
11685
11699
  });
11686
11700
  kt.Speech = void 0;
11687
11701
  var Rn = hi,
11688
- ba = fi,
11702
+ ba = pi,
11689
11703
  Nn = It,
11690
11704
  Dt = Lt,
11691
- ki = pi,
11705
+ ki = fi,
11692
11706
  se = Ue,
11693
11707
  Ii = mi,
11694
11708
  On = nt,
@@ -12477,11 +12491,11 @@ var z = /*#__PURE__*/function () {
12477
12491
  }]);
12478
12492
  return z;
12479
12493
  }();
12480
- var Le = /*#__PURE__*/function () {
12481
- function Le() {
12482
- _classCallCheck(this, Le);
12494
+ var Re = /*#__PURE__*/function () {
12495
+ function Re() {
12496
+ _classCallCheck(this, Re);
12483
12497
  }
12484
- _createClass(Le, null, [{
12498
+ _createClass(Re, null, [{
12485
12499
  key: "resetSubmit",
12486
12500
  value: function resetSubmit(e, t) {
12487
12501
  t ? e.unsetCustomStateStyles(["loading", "submit"]) : e.unsetCustomStateStyles(["stop", "loading", "submit"]), e.reapplyStateStyle("submit");
@@ -12497,16 +12511,16 @@ var Le = /*#__PURE__*/function () {
12497
12511
  }, {
12498
12512
  key: "setUpDisabledButton",
12499
12513
  value: function setUpDisabledButton(e) {
12500
- z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Le.overwriteDefaultStyleWithSubmit(e, "disabled");
12514
+ z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Re.overwriteDefaultStyleWithSubmit(e, "disabled");
12501
12515
  }
12502
12516
  }, {
12503
12517
  key: "process",
12504
12518
  value: function process(e) {
12505
12519
  var t = JSON.parse(JSON.stringify(e || {}));
12506
- return Le.overwriteDefaultStyleWithSubmit(t, "loading"), Le.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || Le.setUpDisabledButton(t), t;
12520
+ return Re.overwriteDefaultStyleWithSubmit(t, "loading"), Re.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || Re.setUpDisabledButton(t), t;
12507
12521
  }
12508
12522
  }]);
12509
- return Le;
12523
+ return Re;
12510
12524
  }();
12511
12525
  var Si = /*#__PURE__*/function (_Tt4) {
12512
12526
  _inherits(k, _Tt4);
@@ -12514,7 +12528,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12514
12528
  function k(e, t, i, n, r) {
12515
12529
  var _this66;
12516
12530
  _classCallCheck(this, k);
12517
- var o = Le.process(e.submitButtonStyles);
12531
+ var o = Re.process(e.submitButtonStyles);
12518
12532
  _this66 = _callSuper(this, k, [k.createButtonContainerElement(), o == null ? void 0 : o.position, o]), _this66._isSVGLoadingIconOverriden = !1, _this66.status = {
12519
12533
  requestInProgress: !1,
12520
12534
  loadingActive: !1
@@ -12568,7 +12582,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12568
12582
  abortStream: this._abortStream,
12569
12583
  stopClicked: this._stopClicked
12570
12584
  };
12571
- var t = this._serviceIO.deepChat.stream;
12585
+ var t = this._serviceIO.stream;
12572
12586
  _typeof(t) == "object" && typeof t.simulation == "number" && (this._serviceIO.streamHandlers.simulationInterim = t.simulation);
12573
12587
  }
12574
12588
  }, {
@@ -12618,14 +12632,14 @@ var Si = /*#__PURE__*/function (_Tt4) {
12618
12632
  return _regeneratorRuntime().wrap(function _callee110$(_context110) {
12619
12633
  while (1) switch (_context110.prev = _context110.next) {
12620
12634
  case 0:
12621
- typeof e == "string" && (e = Re.processSubmitUserMessage(e));
12635
+ typeof e == "string" && (e = fe.processSubmitUserMessage(e));
12622
12636
  t = {
12623
12637
  text: e.text
12624
12638
  };
12625
12639
  e.files && (t.files = Array.from(e.files).map(function (i) {
12626
12640
  return {
12627
12641
  file: i,
12628
- type: fe.getTypeFromBlob(i)
12642
+ type: pe.getTypeFromBlob(i)
12629
12643
  };
12630
12644
  })), setTimeout(function () {
12631
12645
  return _this67.attemptSubmit(t, !0);
@@ -12741,7 +12755,6 @@ var Si = /*#__PURE__*/function (_Tt4) {
12741
12755
  value: function changeToStopIcon() {
12742
12756
  this._serviceIO.websocket || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS, k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.stop), this.reapplyStateStyle("stop", ["loading", "submit"]), this.elementRef.onclick = this.stopStream.bind(this), this.status.loadingActive = !1);
12743
12757
  }
12744
- // WORK - animation needs to be lowered
12745
12758
  }, {
12746
12759
  key: "changeToLoadingIcon",
12747
12760
  value: function changeToLoadingIcon() {
@@ -12751,7 +12764,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12751
12764
  }, {
12752
12765
  key: "changeToSubmitIcon",
12753
12766
  value: function changeToSubmitIcon() {
12754
- this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit), Le.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = this.submitFromInput.bind(this));
12767
+ this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit), Re.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = this.submitFromInput.bind(this));
12755
12768
  }
12756
12769
  // called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
12757
12770
  }, {
@@ -12973,7 +12986,7 @@ var mt = /*#__PURE__*/function () {
12973
12986
  button: new ei(e, r, t.addNewErrorMessage.bind(t))
12974
12987
  });
12975
12988
  var l = new Aa(e, r.inputElementRef, t, i, a);
12976
- r.submit = l.submitFromInput.bind(l), ke.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
12989
+ r.submit = l.submitFromInput.bind(l), Ie.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
12977
12990
  button: l
12978
12991
  }, mt.addElements(this.elementRef, r, o, n, a, e.dropupStyles);
12979
12992
  }
@@ -13017,9 +13030,9 @@ var mt = /*#__PURE__*/function () {
13017
13030
  d = _sa$a.id,
13018
13031
  u = _sa$a.svgString,
13019
13032
  h = _sa$a.dropupText,
13020
- f = new ft(n, c, l, d, u, h);
13033
+ p = new pt(n, c, l, d, u, h);
13021
13034
  r[a] = {
13022
- button: f,
13035
+ button: p,
13023
13036
  fileType: c
13024
13037
  };
13025
13038
  }
@@ -13043,19 +13056,19 @@ var on = /*#__PURE__*/function () {
13043
13056
  }
13044
13057
  _createClass(on, null, [{
13045
13058
  key: "createElements",
13046
- value: function createElements(e, t) {
13047
- var i = document.createElement("div");
13048
- i.id = "chat-view";
13049
- var n = new be(e, t);
13050
- t.websocket && B.createConnection(t, n);
13051
- var r = new mt(e, n, t, i);
13052
- return G.addElements(i, n.elementRef, r.elementRef), i;
13059
+ value: function createElements(e, t, i) {
13060
+ var n = document.createElement("div");
13061
+ n.id = "chat-view";
13062
+ var r = new ve(e, t, i);
13063
+ t.websocket && B.createConnection(t, r);
13064
+ var o = new mt(e, r, t, n);
13065
+ return G.addElements(n, r.elementRef, o.elementRef), n;
13053
13066
  }
13054
13067
  }, {
13055
13068
  key: "render",
13056
- value: function render(e, t, i) {
13057
- var n = on.createElements(e, i);
13058
- t.replaceChildren(n);
13069
+ value: function render(e, t, i, n) {
13070
+ var r = on.createElements(e, i, n);
13071
+ t.replaceChildren(r);
13059
13072
  }
13060
13073
  }]);
13061
13074
  return on;
@@ -13063,7 +13076,7 @@ var on = /*#__PURE__*/function () {
13063
13076
  var Oa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#large-loading-ring{display:inline-block;width:50px;height:50px}#large-loading-ring:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:large-loading-ring 1.4s linear infinite}@keyframes large-loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#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-ring{display:inline-block;width:16px;height:16px}#loading-ring: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-ring 1.2s linear infinite}@keyframes loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#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}.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}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.loading-message-text{width:1em;padding:.6em .75em .6em 1.3em}.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-bubble{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}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}.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}.dots-jumping{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:dots-jumping 1.5s infinite linear;bottom:-.75em}@keyframes dots-jumping{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}}.dots-flashing{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite linear alternate;animation-delay:.5s}.dots-flashing:before,.dots-flashing:after{content:\"\";display:inline-block;position:absolute;top:0}.dots-flashing:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:0s}.dots-flashing:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:1s}@keyframes dots-flashing{0%{background-color:var(--message-dots-color)}50%,to{background-color:var(--message-dots-color-fade)}}.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{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}.text-input-placeholder{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}#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}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}\n";
13064
13077
  var Pa = Object.defineProperty,
13065
13078
  Da = Object.getOwnPropertyDescriptor,
13066
- E = function E(s, e, t, i) {
13079
+ _ = function _(s, e, t, i) {
13067
13080
  for (var n = i > 1 ? void 0 : i ? Da(e, t) : e, r = s.length - 1, o; r >= 0; r--) (o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
13068
13081
  return i && n && Pa(e, t, n), n;
13069
13082
  };
@@ -13096,7 +13109,8 @@ var y = /*#__PURE__*/function (_So) {
13096
13109
  }, {
13097
13110
  key: "onRender",
13098
13111
  value: function onRender() {
13099
- (!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle), Re.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Bt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof q) || this._activeService.key ? on.render(this, this._elementRef, this._activeService) : this._activeService instanceof q && P.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, zt.onRender(this);
13112
+ var _this$_childElement;
13113
+ (!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle), fe.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Bt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof q) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], on.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof q && P.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, zt.onRender(this);
13100
13114
  }
13101
13115
  }, {
13102
13116
  key: "disconnectedCallback",
@@ -13106,44 +13120,43 @@ var y = /*#__PURE__*/function (_So) {
13106
13120
  }]);
13107
13121
  return y;
13108
13122
  }(So);
13109
- E([x("object")], y.prototype, "directConnection", 2);
13110
- E([x("object")], y.prototype, "request", 2);
13111
- E([x("object")], y.prototype, "webModel", 2);
13112
- E([x("object")], y.prototype, "stream", 2);
13113
- E([x("object")], y.prototype, "requestBodyLimits", 2);
13114
- E([x("function")], y.prototype, "requestInterceptor", 2);
13115
- E([x("function")], y.prototype, "responseInterceptor", 2);
13116
- E([x("function")], y.prototype, "validateInput", 2);
13117
- E([x("object")], y.prototype, "chatStyle", 2);
13118
- E([x("object")], y.prototype, "attachmentContainerStyle", 2);
13119
- E([x("object")], y.prototype, "dropupStyles", 2);
13120
- E([x("object")], y.prototype, "inputAreaStyle", 2);
13121
- E([x("object")], y.prototype, "textInput", 2);
13122
- E([x("object")], y.prototype, "submitButtonStyles", 2);
13123
- E([x("string")], y.prototype, "auxiliaryStyle", 2);
13124
- E([x("array")], y.prototype, "initialMessages", 2);
13125
- E([x("object")], y.prototype, "introMessage", 2);
13126
- E([x("object")], y.prototype, "avatars", 2);
13127
- E([x("object")], y.prototype, "names", 2);
13128
- E([x("boolean")], y.prototype, "displayLoadingBubble", 2);
13129
- E([x("object")], y.prototype, "errorMessages", 2);
13130
- E([x("object")], y.prototype, "messageStyles", 2);
13131
- E([x("object")], y.prototype, "textToSpeech", 2);
13132
- E([x("object")], y.prototype, "speechToText", 2);
13133
- E([x("object")], y.prototype, "images", 2);
13134
- E([x("object")], y.prototype, "gifs", 2);
13135
- E([x("object")], y.prototype, "camera", 2);
13136
- E([x("object")], y.prototype, "audio", 2);
13137
- E([x("object")], y.prototype, "microphone", 2);
13138
- E([x("object")], y.prototype, "mixedFiles", 2);
13139
- E([x("object")], y.prototype, "dragAndDrop", 2);
13140
- E([x("object")], y.prototype, "introPanelStyle", 2);
13141
- E([x("object")], y.prototype, "htmlClassUtilities", 2);
13142
- E([x("function")], y.prototype, "onNewMessage", 2);
13143
- E([x("function")], y.prototype, "onClearMessages", 2);
13144
- E([x("function")], y.prototype, "onComponentRender", 2);
13145
- E([x("function")], y.prototype, "onError", 2);
13146
- E([x("object")], y.prototype, "demo", 2);
13147
- E([x("object")], y.prototype, "_insertKeyViewStyles", 2);
13123
+ _([E("object")], y.prototype, "directConnection", 2);
13124
+ _([E("object")], y.prototype, "connect", 2);
13125
+ _([E("object")], y.prototype, "webModel", 2);
13126
+ _([E("object")], y.prototype, "requestBodyLimits", 2);
13127
+ _([E("function")], y.prototype, "requestInterceptor", 2);
13128
+ _([E("function")], y.prototype, "responseInterceptor", 2);
13129
+ _([E("function")], y.prototype, "validateInput", 2);
13130
+ _([E("object")], y.prototype, "chatStyle", 2);
13131
+ _([E("object")], y.prototype, "attachmentContainerStyle", 2);
13132
+ _([E("object")], y.prototype, "dropupStyles", 2);
13133
+ _([E("object")], y.prototype, "inputAreaStyle", 2);
13134
+ _([E("object")], y.prototype, "textInput", 2);
13135
+ _([E("object")], y.prototype, "submitButtonStyles", 2);
13136
+ _([E("string")], y.prototype, "auxiliaryStyle", 2);
13137
+ _([E("array")], y.prototype, "history", 2);
13138
+ _([E("object")], y.prototype, "introMessage", 2);
13139
+ _([E("object")], y.prototype, "avatars", 2);
13140
+ _([E("object")], y.prototype, "names", 2);
13141
+ _([E("boolean")], y.prototype, "displayLoadingBubble", 2);
13142
+ _([E("object")], y.prototype, "errorMessages", 2);
13143
+ _([E("object")], y.prototype, "messageStyles", 2);
13144
+ _([E("object")], y.prototype, "textToSpeech", 2);
13145
+ _([E("object")], y.prototype, "speechToText", 2);
13146
+ _([E("object")], y.prototype, "images", 2);
13147
+ _([E("object")], y.prototype, "gifs", 2);
13148
+ _([E("object")], y.prototype, "camera", 2);
13149
+ _([E("object")], y.prototype, "audio", 2);
13150
+ _([E("object")], y.prototype, "microphone", 2);
13151
+ _([E("object")], y.prototype, "mixedFiles", 2);
13152
+ _([E("object")], y.prototype, "dragAndDrop", 2);
13153
+ _([E("object")], y.prototype, "introPanelStyle", 2);
13154
+ _([E("object")], y.prototype, "htmlClassUtilities", 2);
13155
+ _([E("function")], y.prototype, "onNewMessage", 2);
13156
+ _([E("function")], y.prototype, "onClearMessages", 2);
13157
+ _([E("function")], y.prototype, "onComponentRender", 2);
13158
+ _([E("function")], y.prototype, "onError", 2);
13159
+ _([E("object")], y.prototype, "demo", 2);
13160
+ _([E("object")], y.prototype, "_insertKeyViewStyles", 2);
13148
13161
  customElements.define("deep-chat", y);
13149
13162
  export { y as DeepChat };