deep-chat-dev 9.0.94 → 9.0.95

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
@@ -25,8 +25,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
25
25
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
26
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
27
27
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
28
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
29
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
29
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
30
30
  var gs = /*#__PURE__*/function () {
31
31
  function gs() {
32
32
  _classCallCheck(this, gs);
@@ -422,7 +422,7 @@ var rn = "Make sure the events are using {text: string} or {html: string} format
422
422
  return Un;
423
423
  }();
424
424
  zn.CODE_SNIPPET_GENERATION_JUMP = 0.5;
425
- var Y = zn;
425
+ var $ = zn;
426
426
  var qn = /*#__PURE__*/function () {
427
427
  function Hn() {
428
428
  _classCallCheck(this, Hn);
@@ -754,11 +754,11 @@ var se = /*#__PURE__*/function () {
754
754
  }]);
755
755
  return se;
756
756
  }();
757
- var Ye = /*#__PURE__*/function () {
758
- function Ye() {
759
- _classCallCheck(this, Ye);
757
+ var $e = /*#__PURE__*/function () {
758
+ function $e() {
759
+ _classCallCheck(this, $e);
760
760
  }
761
- _createClass(Ye, null, [{
761
+ _createClass($e, null, [{
762
762
  key: "addElement",
763
763
  value: function addElement(e, t) {
764
764
  e.elementRef.appendChild(t), e.elementRef.scrollTop = e.elementRef.scrollHeight;
@@ -786,11 +786,11 @@ var Ye = /*#__PURE__*/function () {
786
786
  if (l) return l;
787
787
  r.status = !1;
788
788
  }
789
- var o = Ye.createElements(e, t, i);
790
- return v.fillEmptyMessageElement(o.bubbleElement, t), se.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Ye.addElement(e, o.outerContainer), o;
789
+ var o = $e.createElements(e, t, i);
790
+ return v.fillEmptyMessageElement(o.bubbleElement, t), se.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), $e.addElement(e, o.outerContainer), o;
791
791
  }
792
792
  }]);
793
- return Ye;
793
+ return $e;
794
794
  }();
795
795
  var kt;
796
796
  function Vn(s) {
@@ -1259,7 +1259,7 @@ function Jn(s, e) {
1259
1259
  }
1260
1260
  return r === e || (n = ft(s.src.slice(r, e)), !s.parser.validateLink(n)) ? !1 : (s.linkContent = n, s.pos = e, !0);
1261
1261
  }
1262
- function $n(s, e) {
1262
+ function Yn(s, e) {
1263
1263
  var t,
1264
1264
  i = e,
1265
1265
  n = s.posMax,
@@ -1275,7 +1275,7 @@ function $n(s, e) {
1275
1275
  }
1276
1276
  return !1;
1277
1277
  }
1278
- function Yn(s) {
1278
+ function $n(s) {
1279
1279
  return s.trim().replace(/\s+/g, " ").toUpperCase();
1280
1280
  }
1281
1281
  function Ds(s, e, t, i) {
@@ -1284,8 +1284,8 @@ function Ds(s, e, t, i) {
1284
1284
  for (a = n.posMax, o = r + 2; o < a && (l = n.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
1285
1285
  if (!Jn(n, o)) return -1;
1286
1286
  for (d = n.linkContent, o = n.pos, c = o, o = o + 1; o < a && (l = n.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
1287
- for (o < a && c !== o && $n(n, o) ? (u = n.linkContent, o = n.pos) : (u = "", o = c); o < a && n.src.charCodeAt(o) === 32;) o++;
1288
- return o < a && n.src.charCodeAt(o) !== 10 ? -1 : (h = Yn(s.slice(1, r)), _typeof(i.references[h]) > "u" && (i.references[h] = {
1287
+ for (o < a && c !== o && Yn(n, o) ? (u = n.linkContent, o = n.pos) : (u = "", o = c); o < a && n.src.charCodeAt(o) === 32;) o++;
1288
+ return o < a && n.src.charCodeAt(o) !== 10 ? -1 : (h = $n(s.slice(1, r)), _typeof(i.references[h]) > "u" && (i.references[h] = {
1289
1289
  title: u,
1290
1290
  href: d
1291
1291
  }), o);
@@ -1524,7 +1524,7 @@ Ne.prototype.getLines = function (e, t, i, n) {
1524
1524
  for (l = new Array(t - e), r = 0; d < t; d++, r++) c = this.tShift[d], c > i && (c = i), c < 0 && (c = 0), o = this.bMarks[d] + c, d + 1 < t || n ? a = this.eMarks[d] + 1 : a = this.eMarks[d], l[r] = this.src.slice(o, a);
1525
1525
  return l.join("");
1526
1526
  };
1527
- function $s(s, e, t) {
1527
+ function Ys(s, e, t) {
1528
1528
  var i, n;
1529
1529
  if (s.tShift[e] - s.blkIndent < 4) return !1;
1530
1530
  for (n = i = e + 1; i < t;) {
@@ -1546,7 +1546,7 @@ function $s(s, e, t) {
1546
1546
  level: s.level
1547
1547
  }), !0;
1548
1548
  }
1549
- function Ys(s, e, t, i) {
1549
+ function $s(s, e, t, i) {
1550
1550
  var n,
1551
1551
  r,
1552
1552
  o,
@@ -1986,7 +1986,7 @@ function ur(s, e) {
1986
1986
  level: s.level
1987
1987
  })), !0;
1988
1988
  }
1989
- var Lt = [["code", $s], ["fences", Ys, ["paragraph", "blockquote", "list"]], ["blockquote", Zs, ["paragraph", "blockquote", "list"]], ["hr", Xs, ["paragraph", "blockquote", "list"]], ["list", er, ["paragraph", "blockquote"]], ["footnote", tr, ["paragraph"]], ["heading", ir, ["paragraph", "blockquote"]], ["lheading", nr], ["htmlblock", ar, ["paragraph", "blockquote"]], ["table", lr, ["paragraph"]], ["deflist", dr, ["paragraph"]], ["paragraph", ur]];
1989
+ var Lt = [["code", Ys], ["fences", $s, ["paragraph", "blockquote", "list"]], ["blockquote", Zs, ["paragraph", "blockquote", "list"]], ["hr", Xs, ["paragraph", "blockquote", "list"]], ["list", er, ["paragraph", "blockquote"]], ["footnote", tr, ["paragraph"]], ["heading", ir, ["paragraph", "blockquote"]], ["lheading", nr], ["htmlblock", ar, ["paragraph", "blockquote"]], ["table", lr, ["paragraph"]], ["deflist", dr, ["paragraph"]], ["paragraph", ur]];
1990
1990
  function Vi() {
1991
1991
  this.ruler = new H();
1992
1992
  for (var s = 0; s < Lt.length; s++) this.ruler.push(Lt[s][0], Lt[s][1], {
@@ -2323,13 +2323,13 @@ function Ar(s, e) {
2323
2323
  for (a++; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2324
2324
  if (a >= h) return !1;
2325
2325
  for (p = a, Jn(s, a) ? (r = s.linkContent, a = s.pos) : r = "", p = a; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2326
- if (a < h && p !== a && $n(s, a)) for (o = s.linkContent, a = s.pos; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);else o = "";
2326
+ if (a < h && p !== a && Yn(s, a)) for (o = s.linkContent, a = s.pos; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);else o = "";
2327
2327
  if (a >= h || s.src.charCodeAt(a) !== 41) return s.pos = u, !1;
2328
2328
  a++;
2329
2329
  } else {
2330
2330
  if (s.linkLevel > 0) return !1;
2331
2331
  for (; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2332
- if (a < h && s.src.charCodeAt(a) === 91 && (p = a + 1, a = mt(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[Yn(n)], !l) return s.pos = u, !1;
2332
+ if (a < h && s.src.charCodeAt(a) === 91 && (p = a + 1, a = mt(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[$n(n)], !l) return s.pos = u, !1;
2333
2333
  r = l.href, o = l.title;
2334
2334
  }
2335
2335
  return e || (s.pos = t, s.posMax = i, d ? s.push({
@@ -2441,7 +2441,7 @@ function Jr(s) {
2441
2441
  var e = s | 32;
2442
2442
  return e >= 97 && e <= 122;
2443
2443
  }
2444
- function $r(s, e) {
2444
+ function Yr(s, e) {
2445
2445
  var t,
2446
2446
  i,
2447
2447
  n,
@@ -2452,7 +2452,7 @@ function $r(s, e) {
2452
2452
  level: s.level
2453
2453
  }), s.pos += i[0].length, !0);
2454
2454
  }
2455
- var Yr = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
2455
+ var $r = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
2456
2456
  Zr = /^&([a-z][a-z0-9]{1,31});/i;
2457
2457
  function Xr(s, e) {
2458
2458
  var t,
@@ -2463,7 +2463,7 @@ function Xr(s, e) {
2463
2463
  if (s.src.charCodeAt(r) !== 38) return !1;
2464
2464
  if (r + 1 < o) {
2465
2465
  if (t = s.src.charCodeAt(r + 1), t === 35) {
2466
- if (n = s.src.slice(r).match(Yr), n) return e || (i = n[1][0].toLowerCase() === "x" ? parseInt(n[1].slice(1), 16) : parseInt(n[1], 10), s.pending += Wn(i) ? Oi(i) : Oi(65533)), s.pos += n[0].length, !0;
2466
+ if (n = s.src.slice(r).match($r), n) return e || (i = n[1][0].toLowerCase() === "x" ? parseInt(n[1].slice(1), 16) : parseInt(n[1], 10), s.pending += Wn(i) ? Oi(i) : Oi(65533)), s.pos += n[0].length, !0;
2467
2467
  } else if (n = s.src.slice(r).match(Zr), n) {
2468
2468
  var a = Vn(n[1]);
2469
2469
  if (n[1] !== a) return e || (s.pending += a), s.pos += n[0].length, !0;
@@ -2471,7 +2471,7 @@ function Xr(s, e) {
2471
2471
  }
2472
2472
  return e || (s.pending += "&"), s.pos++, !0;
2473
2473
  }
2474
- var Mi = [["text", gr], ["newline", br], ["escape", vr], ["backticks", yr], ["del", xr], ["ins", Er], ["mark", Sr], ["emphasis", _r], ["sub", Mr], ["sup", Cr], ["links", Ar], ["footnote_inline", kr], ["footnote_ref", Ir], ["autolink", Nr], ["htmltag", $r], ["entity", Xr]];
2474
+ var Mi = [["text", gr], ["newline", br], ["escape", vr], ["backticks", yr], ["del", xr], ["ins", Er], ["mark", Sr], ["emphasis", _r], ["sub", Mr], ["sup", Cr], ["links", Ar], ["footnote_inline", kr], ["footnote_ref", Ir], ["autolink", Nr], ["htmltag", Yr], ["entity", Xr]];
2475
2475
  function ii() {
2476
2476
  this.ruler = new H();
2477
2477
  for (var s = 0; s < Mi.length; s++) this.ruler.push(Mi[s][0], Mi[s][1]);
@@ -2539,7 +2539,6 @@ var eo = {
2539
2539
  maxNesting: 20
2540
2540
  // Internal protection, recursion limit
2541
2541
  },
2542
-
2543
2542
  components: {
2544
2543
  core: {
2545
2544
  rules: ["block", "inline", "references", "replacements", "smartquotes", "references", "abbr2", "footnote_tail"]
@@ -2578,7 +2577,6 @@ var eo = {
2578
2577
  maxNesting: 20
2579
2578
  // Internal protection, recursion limit
2580
2579
  },
2581
-
2582
2580
  components: {
2583
2581
  // Don't restrict core/block/inline rules
2584
2582
  core: {},
@@ -2612,7 +2610,6 @@ var eo = {
2612
2610
  maxNesting: 20
2613
2611
  // Internal protection, recursion limit
2614
2612
  },
2615
-
2616
2613
  components: {
2617
2614
  core: {
2618
2615
  rules: ["block", "inline", "references", "abbr2"]
@@ -2796,7 +2793,7 @@ var jt = /*#__PURE__*/function () {
2796
2793
  }, {
2797
2794
  key: "onRender",
2798
2795
  value: function onRender(e) {
2799
- e.onComponentRender(), e.dispatchEvent(new CustomEvent("render"));
2796
+ e.onComponentRender(e), e.dispatchEvent(new CustomEvent("render"));
2800
2797
  }
2801
2798
  }, {
2802
2799
  key: "onError",
@@ -2984,7 +2981,7 @@ var Ke = /*#__PURE__*/function () {
2984
2981
  var _this4 = this;
2985
2982
  var i = this.createNewMessageElement(e, t);
2986
2983
  return this.elementRef.appendChild(i.outerContainer), setTimeout(function () {
2987
- return Y.scrollToBottom(_this4.elementRef);
2984
+ return $.scrollToBottom(_this4.elementRef);
2988
2985
  }), i;
2989
2986
  }
2990
2987
  }, {
@@ -3098,19 +3095,19 @@ var Wi = /*#__PURE__*/function () {
3098
3095
  if (this._hasStreamEnded) return;
3099
3096
  if ((e == null ? void 0 : e.text) === void 0 && (e == null ? void 0 : e.html) === void 0) return console.error(A.INVALID_STREAM_EVENT);
3100
3097
  var t = (e == null ? void 0 : e.text) || (e == null ? void 0 : e.html) || "",
3101
- i = Y.isScrollbarAtBottomOfElement(this._messages.elementRef),
3098
+ i = $.isScrollbarAtBottomOfElement(this._messages.elementRef),
3102
3099
  n = (e == null ? void 0 : e.text) !== void 0 ? "text" : "html";
3103
3100
  if (!this._elements && this._streamedContent === "") this.setInitialState(n, t, e == null ? void 0 : e.role);else {
3104
3101
  if (this._streamType !== n) return console.error(A.INVALID_STREAM_EVENT_MIX);
3105
3102
  this.updateBasedOnType(t, n, (r = this._elements) == null ? void 0 : r.bubbleElement, e == null ? void 0 : e.overwrite);
3106
3103
  }
3107
- i && Y.scrollToBottom(this._messages.elementRef);
3104
+ i && $.scrollToBottom(this._messages.elementRef);
3108
3105
  }
3109
3106
  }, {
3110
3107
  key: "setInitialState",
3111
3108
  value: function setInitialState(e, t, i) {
3112
3109
  var _i8;
3113
- this._streamType = e, (_i8 = i) !== null && _i8 !== void 0 ? _i8 : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : Ye.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(st.MESSAGE_CLASS), this._streamedContent = t, this._activeMessageRole = i;
3110
+ this._streamType = e, (_i8 = i) !== null && _i8 !== void 0 ? _i8 : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : $e.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(st.MESSAGE_CLASS), this._streamedContent = t, this._activeMessageRole = i;
3114
3111
  }
3115
3112
  }, {
3116
3113
  key: "updateBasedOnType",
@@ -4203,11 +4200,11 @@ var Xe = /*#__PURE__*/function () {
4203
4200
  }]);
4204
4201
  return Xe;
4205
4202
  }();
4206
- var $ = /*#__PURE__*/function () {
4207
- function $() {
4208
- _classCallCheck(this, $);
4203
+ var Y = /*#__PURE__*/function () {
4204
+ function Y() {
4205
+ _classCallCheck(this, Y);
4209
4206
  }
4210
- _createClass($, null, [{
4207
+ _createClass(Y, null, [{
4211
4208
  key: "setup",
4212
4209
  value: function setup(e) {
4213
4210
  e.requestSettings.url !== ve.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
@@ -4224,12 +4221,12 @@ var $ = /*#__PURE__*/function () {
4224
4221
  r = new WebSocket(e.requestSettings.url || "", n);
4225
4222
  e.websocket = r, e.websocket.onopen = function () {
4226
4223
  var o, a;
4227
- t.removeError(), e.websocket && _typeof(e.websocket) == "object" && $.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
4224
+ t.removeError(), e.websocket && _typeof(e.websocket) == "object" && Y.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
4228
4225
  }, e.websocket.onerror = function (o) {
4229
- console.error(o), $.retryConnection(e, t);
4226
+ console.error(o), Y.retryConnection(e, t);
4230
4227
  };
4231
4228
  } catch (n) {
4232
- console.error(n), $.retryConnection(e, t);
4229
+ console.error(n), Y.retryConnection(e, t);
4233
4230
  }
4234
4231
  }
4235
4232
  }
@@ -4238,7 +4235,7 @@ var $ = /*#__PURE__*/function () {
4238
4235
  value: function retryConnection(e, t) {
4239
4236
  var i, n;
4240
4237
  (n = (i = e.deepChat)._validationHandler) == null || n.call(i), document.body.contains(e.deepChat) && (e.websocket = "pending", t.isLastMessageError() || t.addNewErrorMessage("service", "Connection error"), setTimeout(function () {
4241
- $.createConnection(e, t);
4238
+ Y.createConnection(e, t);
4242
4239
  }, 5e3));
4243
4240
  }
4244
4241
  }, {
@@ -4294,7 +4291,7 @@ var $ = /*#__PURE__*/function () {
4294
4291
  return _ref6.apply(this, arguments);
4295
4292
  };
4296
4293
  }(), t.onclose = function () {
4297
- console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.deepChat.stream && e.streamHandlers.abortStream.abort(), $.createConnection(e, i);
4294
+ console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.deepChat.stream && e.streamHandlers.abortStream.abort(), Y.createConnection(e, i);
4298
4295
  };
4299
4296
  }
4300
4297
  }, {
@@ -4338,7 +4335,7 @@ var $ = /*#__PURE__*/function () {
4338
4335
  }
4339
4336
  return _context16.abrupt("return", i.addNewErrorMessage("service", l));
4340
4337
  case 12:
4341
- if ($.isWebSocket(r)) {
4338
+ if (Y.isWebSocket(r)) {
4342
4339
  _context16.next = 14;
4343
4340
  break;
4344
4341
  }
@@ -4366,7 +4363,7 @@ var $ = /*#__PURE__*/function () {
4366
4363
  }, {
4367
4364
  key: "canSendMessage",
4368
4365
  value: function canSendMessage(e) {
4369
- return e ? e === "pending" ? !1 : $.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4366
+ return e ? e === "pending" ? !1 : Y.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4370
4367
  }
4371
4368
  // if false then it is the internal websocket handler
4372
4369
  }, {
@@ -4375,7 +4372,7 @@ var $ = /*#__PURE__*/function () {
4375
4372
  return e.send !== void 0;
4376
4373
  }
4377
4374
  }]);
4378
- return $;
4375
+ return Y;
4379
4376
  }();
4380
4377
  var L = /*#__PURE__*/function () {
4381
4378
  function L() {
@@ -4490,7 +4487,7 @@ var Le = /*#__PURE__*/function () {
4490
4487
  var _a$url;
4491
4488
  _classCallCheck(this, Le);
4492
4489
  var n, r, o, a;
4493
- this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Le.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 = ve.URL), this.requestSettings.websocket && $.setup(this);
4490
+ this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Le.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 = ve.URL), this.requestSettings.websocket && Y.setup(this);
4494
4491
  }
4495
4492
  _createClass(Le, [{
4496
4493
  key: "verifyKey",
@@ -4622,7 +4619,7 @@ var Le = /*#__PURE__*/function () {
4622
4619
  n = _objectSpread({
4623
4620
  messages: i
4624
4621
  }, this.rawBody);
4625
- $.sendWebsocket(this, n, t, !1);
4622
+ Y.sendWebsocket(this, n, t, !1);
4626
4623
  } else this.callServiceAPI(t, i, e.files);
4627
4624
  case 4:
4628
4625
  case "end":
@@ -4723,8 +4720,9 @@ var U = /*#__PURE__*/function (_Le) {
4723
4720
  }, {
4724
4721
  key: "buildRequestSettings",
4725
4722
  value: function buildRequestSettings(e, t) {
4723
+ var _i$headers;
4726
4724
  var i = t !== null && t !== void 0 ? t : {};
4727
- return i.headers = this.buildHeadersFunc(e), i;
4725
+ return (_i$headers = i.headers) !== null && _i$headers !== void 0 ? _i$headers : i.headers = {}, Object.assign(i.headers, this.buildHeadersFunc(e)), i;
4728
4726
  }
4729
4727
  }, {
4730
4728
  key: "keyAuthenticated",
@@ -6383,7 +6381,7 @@ var O = /*#__PURE__*/function () {
6383
6381
  }]);
6384
6382
  return O;
6385
6383
  }();
6386
- var $i = /*#__PURE__*/function (_U4) {
6384
+ var Yi = /*#__PURE__*/function (_U4) {
6387
6385
  _inherits(Bi, _U4);
6388
6386
  var _super22 = _createSuper(Bi);
6389
6387
  function Bi(e) {
@@ -6480,9 +6478,9 @@ var $i = /*#__PURE__*/function (_U4) {
6480
6478
  }]);
6481
6479
  return Bi;
6482
6480
  }(U);
6483
- $i.DEFAULT_MODEL = "tts-1";
6484
- $i.DEFAULT_VOIDE = "alloy";
6485
- var Io = $i;
6481
+ Yi.DEFAULT_MODEL = "tts-1";
6482
+ Yi.DEFAULT_VOIDE = "alloy";
6483
+ var Io = Yi;
6486
6484
  var si = /*#__PURE__*/function (_U5) {
6487
6485
  _inherits(Ee, _U5);
6488
6486
  var _super23 = _createSuper(Ee);
@@ -6977,20 +6975,20 @@ var ct = /*#__PURE__*/function () {
6977
6975
  }]);
6978
6976
  return ct;
6979
6977
  }();
6980
- var Yi = /*#__PURE__*/function (_U7) {
6981
- _inherits(Yi, _U7);
6982
- var _super26 = _createSuper(Yi);
6983
- function Yi(e) {
6978
+ var $i = /*#__PURE__*/function (_U7) {
6979
+ _inherits($i, _U7);
6980
+ var _super26 = _createSuper($i);
6981
+ function $i(e) {
6984
6982
  var _this23;
6985
- _classCallCheck(this, Yi);
6983
+ _classCallCheck(this, $i);
6986
6984
  var i;
6987
6985
  var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
6988
6986
  _this23 = _super26.call(this, e, ct.buildKeyVerificationDetails(), ct.buildHeaders, t, {
6989
6987
  audio: {}
6990
- }), _this23.insertKeyPlaceholderText = "AssemblyAI API Key", _this23.getKeyLink = "https://www.assemblyai.com/app/account", _this23.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this23.url = "https://api.assemblyai.com/v2/upload", _this23.isTextInputDisabled = !0, _this23.textInputPlaceholderText = "Upload an audio file", _this23.permittedErrorPrefixes = ["Authentication", "Invalid"], _this23.canSendMessage = Yi.canFileSendMessage;
6988
+ }), _this23.insertKeyPlaceholderText = "AssemblyAI API Key", _this23.getKeyLink = "https://www.assemblyai.com/app/account", _this23.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this23.url = "https://api.assemblyai.com/v2/upload", _this23.isTextInputDisabled = !0, _this23.textInputPlaceholderText = "Upload an audio file", _this23.permittedErrorPrefixes = ["Authentication", "Invalid"], _this23.canSendMessage = $i.canFileSendMessage;
6991
6989
  return _this23;
6992
6990
  }
6993
- _createClass(Yi, [{
6991
+ _createClass($i, [{
6994
6992
  key: "callServiceAPI",
6995
6993
  value: function () {
6996
6994
  var _callServiceAPI13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57(e, t, i) {
@@ -7061,7 +7059,7 @@ var Yi = /*#__PURE__*/function (_U7) {
7061
7059
  return !!(t != null && t[0]);
7062
7060
  }
7063
7061
  }]);
7064
- return Yi;
7062
+ return $i;
7065
7063
  }(U);
7066
7064
  var rs = /*#__PURE__*/function (_U8) {
7067
7065
  _inherits(rs, _U8);
@@ -8273,7 +8271,7 @@ var yn = {
8273
8271
  var t;
8274
8272
  ((t = this._webModel.introMessage) == null ? void 0 : t.scroll) !== !1 && setTimeout(function () {
8275
8273
  var i, n;
8276
- (i = _this35._messages) != null && i.elementRef && Y.scrollToTop((n = _this35._messages) == null ? void 0 : n.elementRef);
8274
+ (i = _this35._messages) != null && i.elementRef && $.scrollToTop((n = _this35._messages) == null ? void 0 : n.elementRef);
8277
8275
  }, e);
8278
8276
  }
8279
8277
  }, {
@@ -8368,18 +8366,19 @@ var yn = {
8368
8366
  }, {
8369
8367
  key: "getConfig",
8370
8368
  value: function getConfig() {
8369
+ var i, n;
8371
8370
  var e = T.DEFAULT_MODEL;
8372
8371
  this._webModel.model && (e = this._webModel.model);
8373
8372
  var t = JSON.parse(JSON.stringify(yn));
8374
- if (this._webModel.modelUrl) {
8375
- var i = t.model_list.find(function (n) {
8376
- return n.local_id = e;
8373
+ if ((i = this._webModel.urls) != null && i.model) {
8374
+ var r = t.model_list.find(function (o) {
8375
+ return o.local_id = e;
8377
8376
  });
8378
- i && (i.model_url = this._webModel.modelUrl);
8377
+ r && (r.model_url = this._webModel.urls.model);
8379
8378
  }
8380
- if (this._webModel.wasmUrl) {
8381
- var _i9 = e;
8382
- t.model_lib_map[_i9] && (t.model_lib_map[_i9] = "".concat(this._webModel.wasmUrl).concat(e, "-webgpu.wasm"));
8379
+ if ((n = this._webModel.urls) != null && n.wasm) {
8380
+ var _r2 = e;
8381
+ t.model_lib_map[_r2] && (t.model_lib_map[_r2] = this._webModel.urls.wasm);
8383
8382
  }
8384
8383
  return {
8385
8384
  model: e,
@@ -8405,7 +8404,7 @@ var yn = {
8405
8404
  sendUpdate: !1
8406
8405
  }), i && (setTimeout(function () {
8407
8406
  var p;
8408
- return Y.scrollToBottom((p = _this36._messages) == null ? void 0 : p.elementRef);
8407
+ return $.scrollToBottom((p = _this36._messages) == null ? void 0 : p.elementRef);
8409
8408
  }), i = !1);
8410
8409
  };
8411
8410
  T.chat.setInitProgressCallback(n);
@@ -8642,7 +8641,7 @@ var zo = /*#__PURE__*/function () {
8642
8641
  if (r) return new cs(e);
8643
8642
  if (t) {
8644
8643
  if (t.openAI) return t.openAI.images ? new Bo(e) : t.openAI.speechToText ? new Lo(e) : t.openAI.textToSpeech ? new Io(e) : t.openAI.assistant ? new jo(e) : new dt(e);
8645
- if (t.assemblyAI) return new Yi(e);
8644
+ if (t.assemblyAI) return new $i(e);
8646
8645
  if (t.cohere) return t.cohere.textGeneration ? new Ao(e) : t.cohere.summarization ? new ko(e) : new Fo(e);
8647
8646
  if (t.huggingFace) return t.huggingFace.textGeneration ? new So(e) : t.huggingFace.summarization ? new wo(e) : t.huggingFace.translation ? new To(e) : t.huggingFace.fillMask ? new Co(e) : t.huggingFace.questionAnswer ? new _o(e) : t.huggingFace.audioSpeechRecognition ? new Eo(e) : t.huggingFace.audioClassification ? new yo(e) : t.huggingFace.imageClassification ? new xo(e) : new Mo(e);
8648
8647
  if (t.azure) {
@@ -8669,8 +8668,8 @@ var ds = /*#__PURE__*/function () {
8669
8668
  if (!Array.from(e.getElementsByTagName("link")).some(function (i) {
8670
8669
  return i.getAttribute("href") === zi.FONT_URL;
8671
8670
  })) {
8672
- var _i10 = document.createElement("link");
8673
- _i10.rel = "stylesheet", _i10.href = zi.FONT_URL, e.appendChild(_i10);
8671
+ var _i9 = document.createElement("link");
8672
+ _i9.rel = "stylesheet", _i9.href = zi.FONT_URL, e.appendChild(_i9);
8674
8673
  }
8675
8674
  }
8676
8675
  }]);
@@ -8777,7 +8776,7 @@ var qo = /*#__PURE__*/function () {
8777
8776
  key: "getText",
8778
8777
  value: function getText(e, t) {
8779
8778
  var i, n;
8780
- if (!e.directConnection && !e.request && !e.demo) return "Connect to any API using the [request](https://deepchat.dev/docs/connect#Request)\n property or choose any one of the preconfigured APIs via\n the [directConnection](https://deepchat.dev/docs/directConnection/#directConnection) property.\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.";
8779
+ 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 [webModel](HERE).\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.";
8781
8780
  if (e.directConnection) {
8782
8781
  if (!t.isDirectConnection()) return "Please define a valid service inside\n the [directConnection](https://deepchat.dev/docs/directConnection/#directConnection) object.";
8783
8782
  var r = (i = e.directConnection.openAI) == null ? void 0 : i.chat;
@@ -8881,11 +8880,7 @@ var me = /*#__PURE__*/function (_Ke) {
8881
8880
  o = t.demo;
8882
8881
  _this37._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this37._onClearMessages = jt.onClearMessages.bind(_assertThisInitialized(_this37), e), _this37._onError = jt.onError.bind(_assertThisInitialized(_this37), e), _this37._displayLoadingMessage = me.getDisplayLoadingMessage(e, t), _this37._permittedErrorPrefixes = n, _this37.addSetupMessageIfNeeded(e, t), _this37.populateIntroPanel(i, r, e.introPanelStyle), _this37.addIntroductoryMessage(e, t), e.initialMessages && _this37.populateInitialMessages(e.initialMessages), _this37._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
8883
8882
  return JSON.parse(JSON.stringify(_this37.messages));
8884
- }, e.clearMessages = _this37.clearMessages.bind(_assertThisInitialized(_this37), t), e.refreshMessages = _this37.refreshTextMessages.bind(_assertThisInitialized(_this37)), e.scrollToBottom = Y.scrollToBottom.bind(_assertThisInitialized(_this37), _this37.elementRef), e.addMessage = function (c, d) {
8885
- _this37.addNewMessage(_objectSpread(_objectSpread({}, c), {}, {
8886
- sendUpdate: !!d
8887
- }), !d);
8888
- }, t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this37)), o && _this37.prepareDemo(o), e.textToSpeech && Nt.processConfig(e.textToSpeech, function (c) {
8883
+ }, e.clearMessages = _this37.clearMessages.bind(_assertThisInitialized(_this37), t), e.refreshMessages = _this37.refreshTextMessages.bind(_assertThisInitialized(_this37)), e.scrollToBottom = $.scrollToBottom.bind(_assertThisInitialized(_this37), _this37.elementRef), t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this37)), o && _this37.prepareDemo(o), e.textToSpeech && Nt.processConfig(e.textToSpeech, function (c) {
8889
8884
  _this37.textToSpeech = c;
8890
8885
  });
8891
8886
  return _this37;
@@ -8908,13 +8903,13 @@ var me = /*#__PURE__*/function (_Ke) {
8908
8903
  }, {
8909
8904
  key: "addIntroductoryMessage",
8910
8905
  value: function addIntroductoryMessage(e, t) {
8911
- var _i11;
8906
+ var _i10;
8912
8907
  var n;
8913
8908
  e != null && e.shadowRoot && (this._introMessage = e.introMessage);
8914
8909
  var i = this._introMessage;
8915
- if (t != null && t.isWebModel() && ((_i11 = i) !== null && _i11 !== void 0 ? _i11 : i = t.getIntroMessage(i)), i) {
8910
+ if (t != null && t.isWebModel() && ((_i10 = i) !== null && _i10 !== void 0 ? _i10 : i = t.getIntroMessage(i)), i) {
8916
8911
  var r;
8917
- i != null && i.text ? r = this.createAndAppendNewMessageElement(i.text, v.AI_ROLE) : i != null && i.html && (r = Ye.add(this, i.html, v.AI_ROLE, this.messageElementRefs)), r && (this.applyCustomStyles(r, v.AI_ROLE, !1, (n = this.messageStyles) == null ? void 0 : n.intro), r.outerContainer.classList.add("deep-chat-intro"));
8912
+ i != null && i.text ? r = this.createAndAppendNewMessageElement(i.text, v.AI_ROLE) : i != null && i.html && (r = $e.add(this, i.html, v.AI_ROLE, this.messageElementRefs)), r && (this.applyCustomStyles(r, v.AI_ROLE, !1, (n = this.messageStyles) == null ? void 0 : n.intro), r.outerContainer.classList.add("deep-chat-intro"));
8918
8913
  }
8919
8914
  }
8920
8915
  }, {
@@ -8930,7 +8925,7 @@ var me = /*#__PURE__*/function (_Ke) {
8930
8925
  e.forEach(function (t) {
8931
8926
  ke.processInitialMessageFile(t), _this38.addNewMessage(t, !0);
8932
8927
  }), setTimeout(function () {
8933
- return Y.scrollToBottom(_this38.elementRef);
8928
+ return $.scrollToBottom(_this38.elementRef);
8934
8929
  });
8935
8930
  }
8936
8931
  // this should not be activated by streamed messages
@@ -8943,10 +8938,15 @@ var me = /*#__PURE__*/function (_Ke) {
8943
8938
  status: e.overwrite
8944
8939
  };
8945
8940
  if (!e.ignoreText && i.text !== void 0 && e.text !== null && (this.addNewTextMessage(i.text, i.role, n), !t && this.textToSpeech && i.role !== v.USER_ROLE && Nt.speak(i.text, this.textToSpeech)), i.files && Array.isArray(i.files) && fe.addMessages(this, i.files, i.role), i.html !== void 0 && i.html !== null) {
8946
- var r = Ye.add(this, i.html, i.role, this.messageElementRefs, n);
8941
+ var r = $e.add(this, i.html, i.role, this.messageElementRefs, n);
8947
8942
  be.isElementTemporary(r) && delete i.html;
8948
8943
  }
8949
- this.updateStateOnMessage(i, e.overwrite, e.sendUpdate, t);
8944
+ this.isValidMessageContent(i) && this.updateStateOnMessage(i, e.overwrite, e.sendUpdate, t);
8945
+ }
8946
+ }, {
8947
+ key: "isValidMessageContent",
8948
+ value: function isValidMessageContent(e) {
8949
+ return e.text || e.html || e.files && e.files.length > 0;
8950
8950
  }
8951
8951
  }, {
8952
8952
  key: "updateStateOnMessage",
@@ -8976,7 +8976,7 @@ var me = /*#__PURE__*/function (_Ke) {
8976
8976
  var o = this.getPermittedMessage(t) || ((l = this._errorMessageOverrides) == null ? void 0 : l[e]) || ((c = this._errorMessageOverrides) == null ? void 0 : c["default"]) || "Error, please try again.";
8977
8977
  this.renderText(r, o);
8978
8978
  var a = D.extractParticularSharedStyles(["fontSize", "fontFamily"], (d = this.messageStyles) == null ? void 0 : d["default"]);
8979
- D.applyCustomStylesToElements(i, !1, a), D.applyCustomStylesToElements(i, !1, (u = this.messageStyles) == null ? void 0 : u.error), this.elementRef.appendChild(n), Y.scrollToBottom(this.elementRef), this.textToSpeech && Nt.speak(o, this.textToSpeech), (h = this._onError) == null || h.call(this, o);
8979
+ D.applyCustomStylesToElements(i, !1, a), D.applyCustomStylesToElements(i, !1, (u = this.messageStyles) == null ? void 0 : u.error), this.elementRef.appendChild(n), $.scrollToBottom(this.elementRef), this.textToSpeech && Nt.speak(o, this.textToSpeech), (h = this._onError) == null || h.call(this, o);
8980
8980
  }
8981
8981
  }, {
8982
8982
  key: "getPermittedMessage",
@@ -8987,8 +8987,8 @@ var me = /*#__PURE__*/function (_Ke) {
8987
8987
  var t = me.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e);
8988
8988
  if (t) return t;
8989
8989
  } else if (Array.isArray(e) && this._permittedErrorPrefixes) for (var _t3 = 0; _t3 < e.length; _t3 += 1) {
8990
- var _i12 = me.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e[_t3]);
8991
- if (_i12) return _i12;
8990
+ var _i11 = me.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, e[_t3]);
8991
+ if (_i11) return _i11;
8992
8992
  }
8993
8993
  }
8994
8994
  }
@@ -9013,7 +9013,7 @@ var me = /*#__PURE__*/function (_Ke) {
9013
9013
  i = e.bubbleElement;
9014
9014
  i.classList.add("loading-message-text");
9015
9015
  var n = document.createElement("div");
9016
- n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, v.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), Xi.set(i, this.messageStyles), this.elementRef.appendChild(t), Y.scrollToBottom(this.elementRef);
9016
+ n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, v.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), Xi.set(i, this.messageStyles), this.elementRef.appendChild(t), $.scrollToBottom(this.elementRef);
9017
9017
  }
9018
9018
  }, {
9019
9019
  key: "populateIntroPanel",
@@ -9082,7 +9082,7 @@ var me = /*#__PURE__*/function (_Ke) {
9082
9082
  }, {
9083
9083
  key: "checkPermittedErrorPrefixes",
9084
9084
  value: function checkPermittedErrorPrefixes(e, t) {
9085
- for (var _i13 = 0; _i13 < e.length; _i13 += 1) if (t.startsWith(e[_i13])) return t;
9085
+ for (var _i12 = 0; _i12 < e.length; _i12 += 1) if (t.startsWith(e[_i12])) return t;
9086
9086
  }
9087
9087
  }]);
9088
9088
  return me;
@@ -9284,8 +9284,8 @@ var _t = /*#__PURE__*/function () {
9284
9284
  key: "unsetCustomStateStyles",
9285
9285
  value: function unsetCustomStateStyles(e) {
9286
9286
  if (this._customStyles) for (var t = 0; t < e.length; t += 1) {
9287
- var _i14 = e[t],
9288
- n = _i14 && this._customStyles[_i14];
9287
+ var _i13 = e[t],
9288
+ n = _i13 && this._customStyles[_i13];
9289
9289
  n && te.unsetActionCSS(this.elementRef, n);
9290
9290
  }
9291
9291
  }
@@ -9576,8 +9576,8 @@ var B = /*#__PURE__*/function () {
9576
9576
  var Wo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>file</title>\n<path d=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>",
9577
9577
  Ko = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n",
9578
9578
  Jo = "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-49.49 -49.49 593.87 593.87\" stroke-width=\"3.95908\" transform=\"rotate(0)\">\n <g stroke-width=\"0\"></g>\n <g stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"0.98977\"></g>\n <g>\n <g>\n <g>\n <path d=\"M163.205,76.413v293.301c-3.434-3.058-7.241-5.867-11.486-8.339c-21.38-12.452-49.663-15.298-77.567-7.846 c-49.038,13.096-80.904,54.519-71.038,92.337c4.019,15.404,14.188,28.221,29.404,37.087c13.553,7.894,29.87,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.447-4.087c42.74-11.406,72.411-44.344,72.807-77.654h0.011v-0.162c0.002-0.166,0-0.331,0-0.496V187.072 l290.971-67.3v178.082c-3.433-3.055-7.238-5.863-11.481-8.334c-21.385-12.452-49.654-15.308-77.567-7.846 c-49.038,13.087-80.904,54.519-71.038,92.356c4.019,15.385,14.183,28.212,29.404,37.067c13.548,7.894,29.875,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.452-4.087c42.74-11.413,72.411-44.346,72.804-77.654h0.004v-0.065c0.003-0.236,0.001-0.469,0-0.704V0 L163.205,76.413z M104.999,471.779c-22.543,6.038-45.942,3.846-62.572-5.846c-10.587-6.163-17.591-14.817-20.255-25.038 c-7.144-27.375,18.452-58.029,57.062-68.346c8.409-2.25,16.938-3.346,25.188-3.346c13.87,0,26.962,3.115,37.389,9.192 c10.587,6.163,17.591,14.817,20.255,25.029c0.809,3.102,1.142,6.248,1.139,9.4v0.321h0.014 C162.99,437.714,139.082,462.678,104.999,471.779z M182.898,166.853V92.067l290.971-67.298v74.784L182.898,166.853z M415.677,399.923c-22.558,6.038-45.942,3.837-62.587-5.846c-10.587-6.163-17.587-14.817-20.25-25.019 c-7.144-27.385,18.452-58.058,57.058-68.365c8.414-2.25,16.942-3.346,25.192-3.346c13.875,0,26.962,3.115,37.385,9.192 c10.596,6.163,17.596,14.817,20.26,25.029v0.01c0.796,3.05,1.124,6.144,1.135,9.244v0.468h0.02 C473.668,365.851,449.763,390.814,415.677,399.923z\">\n </path>\n </g>\n </g>\n </g>\n</svg>",
9579
- $o = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n",
9580
- Yo = {
9579
+ Yo = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n",
9580
+ $o = {
9581
9581
  images: {
9582
9582
  id: "upload-images-icon",
9583
9583
  svgString: Ko,
@@ -9585,7 +9585,7 @@ var Wo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
9585
9585
  },
9586
9586
  gifs: {
9587
9587
  id: "upload-gifs-icon",
9588
- svgString: $o,
9588
+ svgString: Yo,
9589
9589
  dropupText: "GIF"
9590
9590
  },
9591
9591
  audio: {
@@ -9621,11 +9621,11 @@ var ue = /*#__PURE__*/function () {
9621
9621
  var r = ue.createImageAttachment(t);
9622
9622
  this.addFileAttachment(e, "image", r, i);
9623
9623
  } else if (n === "audio") {
9624
- var _r2 = Ui.createAudioAttachment(t);
9625
- this.addFileAttachment(e, "audio", _r2, i);
9624
+ var _r3 = Ui.createAudioAttachment(t);
9625
+ this.addFileAttachment(e, "audio", _r3, i);
9626
9626
  } else {
9627
- var _r3 = ue.createAnyFileAttachment(e.name);
9628
- this.addFileAttachment(e, "any", _r3, i);
9627
+ var _r4 = ue.createAnyFileAttachment(e.name);
9628
+ this.addFileAttachment(e, "any", _r4, i);
9629
9629
  }
9630
9630
  }
9631
9631
  }, {
@@ -9818,7 +9818,7 @@ var Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9818
9818
  }, {
9819
9819
  key: "addAudioElements",
9820
9820
  value: function addAudioElements(e, t) {
9821
- var i = e.parentElement ? Y.cloneElement(e) : e,
9821
+ var i = e.parentElement ? $.cloneElement(e) : e,
9822
9822
  n = document.createElement("audio");
9823
9823
  n.src = t;
9824
9824
  var r = q.createSVGElement(Zo);
@@ -10265,7 +10265,7 @@ var Me = /*#__PURE__*/function () {
10265
10265
  }, {
10266
10266
  key: "validateWebsocket",
10267
10267
  value: function validateWebsocket(e, t) {
10268
- return e.websocket && !$.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
10268
+ return e.websocket && !Y.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
10269
10269
  }
10270
10270
  // prettier-ignore
10271
10271
  }, {
@@ -10640,10 +10640,10 @@ var sa = /*#__PURE__*/function () {
10640
10640
  key: "appendSpans",
10641
10641
  value: function appendSpans(e, t) {
10642
10642
  if (e.spansPopulated = !0, e.insertInCursorLocation && document.activeElement === t) {
10643
- var _i15 = window.getSelection();
10644
- if (_i15 != null && _i15.focusNode) {
10645
- var n = _i15.getRangeAt(0);
10646
- n.insertNode(e.scrollingSpan), n.insertNode(e.interimSpan), n.insertNode(e.finalSpan), n.collapse(!1), _i15.removeAllRanges(), _i15.addRange(n);
10643
+ var _i14 = window.getSelection();
10644
+ if (_i14 != null && _i14.focusNode) {
10645
+ var n = _i14.getRangeAt(0);
10646
+ n.insertNode(e.scrollingSpan), n.insertNode(e.interimSpan), n.insertNode(e.finalSpan), n.collapse(!1), _i14.removeAllRanges(), _i14.addRange(n);
10647
10647
  return;
10648
10648
  }
10649
10649
  }
@@ -11151,9 +11151,9 @@ var Jt = /*#__PURE__*/function (_ua$Speech) {
11151
11151
  if (_typeof(e.results) > "u" && _this53._service) _this53._service.onend = null, _this53._service.stop();else if (_this53._extractText && !_this53._stopping) {
11152
11152
  var _this53$_extractText = _this53._extractText(e, _this53.finalTranscript, _this53._translations),
11153
11153
  t = _this53$_extractText.interimTranscript,
11154
- _i16 = _this53$_extractText.finalTranscript,
11154
+ _i15 = _this53$_extractText.finalTranscript,
11155
11155
  n = _this53$_extractText.newText;
11156
- _this53.updateElements(t, _i16, n);
11156
+ _this53.updateElements(t, _i15, n);
11157
11157
  }
11158
11158
  });
11159
11159
  }
@@ -11182,22 +11182,22 @@ Object.defineProperty(hi, "__esModule", {
11182
11182
  value: !0
11183
11183
  });
11184
11184
  hi.GlobalState = void 0;
11185
- var $e = /*#__PURE__*/function () {
11186
- function $e() {
11187
- _classCallCheck(this, $e);
11185
+ var Ye = /*#__PURE__*/function () {
11186
+ function Ye() {
11187
+ _classCallCheck(this, Ye);
11188
11188
  }
11189
- _createClass($e, null, [{
11189
+ _createClass(Ye, null, [{
11190
11190
  key: "doubleClickDetector",
11191
11191
  value: function doubleClickDetector() {
11192
- return $e.doubleClickPending ? !0 : ($e.doubleClickPending = !0, setTimeout(function () {
11193
- $e.doubleClickPending = !1;
11192
+ return Ye.doubleClickPending ? !0 : (Ye.doubleClickPending = !0, setTimeout(function () {
11193
+ Ye.doubleClickPending = !1;
11194
11194
  }, 300), !1);
11195
11195
  }
11196
11196
  }]);
11197
- return $e;
11197
+ return Ye;
11198
11198
  }();
11199
- hi.GlobalState = $e;
11200
- $e.doubleClickPending = !1;
11199
+ hi.GlobalState = Ye;
11200
+ Ye.doubleClickPending = !1;
11201
11201
  var pi = {},
11202
11202
  fi = {};
11203
11203
  Object.defineProperty(fi, "__esModule", {
@@ -11236,11 +11236,11 @@ Object.defineProperty(mi, "__esModule", {
11236
11236
  });
11237
11237
  mi.AzureSpeechConfig = void 0;
11238
11238
  var ki = gi;
11239
- var $t = /*#__PURE__*/function () {
11240
- function $t() {
11241
- _classCallCheck(this, $t);
11239
+ var Yt = /*#__PURE__*/function () {
11240
+ function Yt() {
11241
+ _classCallCheck(this, Yt);
11242
11242
  }
11243
- _createClass($t, null, [{
11243
+ _createClass(Yt, null, [{
11244
11244
  key: "validateOptions",
11245
11245
  value: function validateOptions(e, t) {
11246
11246
  return t ? !t.subscriptionKey && !t.token && !t.retrieveToken ? (e("Please define a 'subscriptionKey', 'token' or 'retrieveToken' property - more info: ".concat(ki.README_URL)), !1) : t.region ? !0 : (e("Please define a 'region' property - more info: ".concat(ki.README_URL)), !1) : (e("Please provide subscription details - more info: ".concat(ki.README_URL)), !1);
@@ -11286,10 +11286,10 @@ var $t = /*#__PURE__*/function () {
11286
11286
  while (1) switch (_context93.prev = _context93.next) {
11287
11287
  case 0:
11288
11288
  _context93.next = 2;
11289
- return $t.getNewSpeechConfig(e, t);
11289
+ return Yt.getNewSpeechConfig(e, t);
11290
11290
  case 2:
11291
11291
  i = _context93.sent;
11292
- return _context93.abrupt("return", (i && $t.process(i, t), i));
11292
+ return _context93.abrupt("return", (i && Yt.process(i, t), i));
11293
11293
  case 4:
11294
11294
  case "end":
11295
11295
  return _context93.stop();
@@ -11302,9 +11302,9 @@ var $t = /*#__PURE__*/function () {
11302
11302
  return get;
11303
11303
  }()
11304
11304
  }]);
11305
- return $t;
11305
+ return Yt;
11306
11306
  }();
11307
- mi.AzureSpeechConfig = $t;
11307
+ mi.AzureSpeechConfig = Yt;
11308
11308
  var bi = {};
11309
11309
  Object.defineProperty(bi, "__esModule", {
11310
11310
  value: !0
@@ -11369,16 +11369,16 @@ var On = fi,
11369
11369
  Ii = bi,
11370
11370
  Pn = vi,
11371
11371
  ma = Tt;
11372
- var Yt = /*#__PURE__*/function (_ma$Speech) {
11373
- _inherits(Yt, _ma$Speech);
11374
- var _super42 = _createSuper(Yt);
11375
- function Yt() {
11372
+ var $t = /*#__PURE__*/function (_ma$Speech) {
11373
+ _inherits($t, _ma$Speech);
11374
+ var _super42 = _createSuper($t);
11375
+ function $t() {
11376
11376
  var _this54;
11377
- _classCallCheck(this, Yt);
11377
+ _classCallCheck(this, $t);
11378
11378
  _this54 = _super42.apply(this, arguments), _this54._newTextPadding = "";
11379
11379
  return _this54;
11380
11380
  }
11381
- _createClass(Yt, [{
11381
+ _createClass($t, [{
11382
11382
  key: "start",
11383
11383
  value: function start(e, t) {
11384
11384
  this._newTextPadding = "", this.stopTimeout === void 0 && Ii.StopTimeout.reset(this, e == null ? void 0 : e.stopAfterSilenceMs), this.prepareBeforeStart(e), this.startAsync(e), t || On.PreventConnectionStop.applyPrevention(this);
@@ -11415,7 +11415,7 @@ var Yt = /*#__PURE__*/function (_ma$Speech) {
11415
11415
  }, {
11416
11416
  key: "validate",
11417
11417
  value: function validate(e) {
11418
- return Yt.getAPI() ? Nn.AzureSpeechConfig.validateOptions(this.error.bind(this), e) : (this.moduleNotFound(), !1);
11418
+ return $t.getAPI() ? Nn.AzureSpeechConfig.validateOptions(this.error.bind(this), e) : (this.moduleNotFound(), !1);
11419
11419
  }
11420
11420
  }, {
11421
11421
  key: "instantiateService",
@@ -11425,7 +11425,7 @@ var Yt = /*#__PURE__*/function (_ma$Speech) {
11425
11425
  return _regeneratorRuntime().wrap(function _callee95$(_context95) {
11426
11426
  while (1) switch (_context95.prev = _context95.next) {
11427
11427
  case 0:
11428
- t = Yt.getAPI();
11428
+ t = $t.getAPI();
11429
11429
  i = t.AudioConfig.fromDefaultMicrophoneInput();
11430
11430
  _context95.next = 4;
11431
11431
  return Nn.AzureSpeechConfig.get(t.SpeechConfig, e);
@@ -11535,9 +11535,9 @@ var Yt = /*#__PURE__*/function (_ma$Speech) {
11535
11535
  return window.SpeechSDK;
11536
11536
  }
11537
11537
  }]);
11538
- return Yt;
11538
+ return $t;
11539
11539
  }(ma.Speech);
11540
- pi.Azure = Yt;
11540
+ pi.Azure = $t;
11541
11541
  Object.defineProperty(fs, "__esModule", {
11542
11542
  value: !0
11543
11543
  });
@@ -11884,7 +11884,7 @@ var yi = /*#__PURE__*/function (_t7) {
11884
11884
  key: "submitFromInput",
11885
11885
  value: function () {
11886
11886
  var _submitFromInput = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee96() {
11887
- var t, e, _i17;
11887
+ var t, e, _i16;
11888
11888
  return _regeneratorRuntime().wrap(function _callee96$(_context96) {
11889
11889
  while (1) switch (_context96.prev = _context96.next) {
11890
11890
  case 0:
@@ -11896,9 +11896,9 @@ var yi = /*#__PURE__*/function (_t7) {
11896
11896
  text: "",
11897
11897
  files: e
11898
11898
  });else {
11899
- _i17 = (t = this._inputElementRef.textContent) == null ? void 0 : t.trim();
11899
+ _i16 = (t = this._inputElementRef.textContent) == null ? void 0 : t.trim();
11900
11900
  this.attemptSubmit({
11901
- text: _i17,
11901
+ text: _i16,
11902
11902
  files: e
11903
11903
  });
11904
11904
  }
@@ -12182,8 +12182,8 @@ var tn = /*#__PURE__*/function (_at) {
12182
12182
  var e = atob(this._dataURL.split(",")[1]),
12183
12183
  t = new Array(e.length);
12184
12184
  for (var a = 0; a < e.length; a++) t[a] = e.charCodeAt(a);
12185
- var _i18 = new Uint8Array(t),
12186
- n = new Blob([_i18], {
12185
+ var _i17 = new Uint8Array(t),
12186
+ n = new Blob([_i17], {
12187
12187
  type: this._format
12188
12188
  }),
12189
12189
  r = this._format === "image/jpeg" ? "jpeg" : "png",
@@ -12199,8 +12199,8 @@ var tn = /*#__PURE__*/function (_at) {
12199
12199
  if (!this._stopped) {
12200
12200
  if (!this._dataURL) {
12201
12201
  t.width = e.videoWidth, t.height = e.videoHeight;
12202
- var _i19 = t.getContext("2d");
12203
- _i19 == null || _i19.drawImage(e, 0, 0, t.width, t.height);
12202
+ var _i18 = t.getContext("2d");
12203
+ _i18 == null || _i18.drawImage(e, 0, 0, t.width, t.height);
12204
12204
  }
12205
12205
  requestAnimationFrame(this.updateCanvas.bind(this, e, t));
12206
12206
  }
@@ -12320,10 +12320,10 @@ var pt = /*#__PURE__*/function () {
12320
12320
  l = t[a];
12321
12321
  if (l.files) {
12322
12322
  var c = i.addType(e, l.files, a),
12323
- _Yo$a = Yo[a],
12324
- d = _Yo$a.id,
12325
- u = _Yo$a.svgString,
12326
- h = _Yo$a.dropupText,
12323
+ _$o$a = $o[a],
12324
+ d = _$o$a.id,
12325
+ u = _$o$a.svgString,
12326
+ h = _$o$a.dropupText,
12327
12327
  p = new ut(n, c, l, d, u, h);
12328
12328
  r[a] = {
12329
12329
  button: p,
@@ -12336,7 +12336,7 @@ var pt = /*#__PURE__*/function () {
12336
12336
  }, {
12337
12337
  key: "addElements",
12338
12338
  value: function addElements(e, t, i, n, r, o) {
12339
- Y.addElements(e, t.elementRef);
12339
+ $.addElements(e, t.elementRef);
12340
12340
  var a = Qe.create(),
12341
12341
  l = B.addButtons(a, i, n, o);
12342
12342
  Vo.set(t.inputElementRef, a, r.elementRef, l), Qe.add(e, a);
@@ -12354,9 +12354,9 @@ var nn = /*#__PURE__*/function () {
12354
12354
  var n = document.createElement("div");
12355
12355
  n.id = "chat-view";
12356
12356
  var r = new me(e, t, i);
12357
- t.websocket && $.createConnection(t, r);
12357
+ t.websocket && Y.createConnection(t, r);
12358
12358
  var o = new pt(e, r, t, n);
12359
- return Y.addElements(n, r.elementRef, o.elementRef), n;
12359
+ return $.addElements(n, r.elementRef, o.elementRef), n;
12360
12360
  }
12361
12361
  }, {
12362
12362
  key: "render",
@@ -12384,8 +12384,6 @@ var b = /*#__PURE__*/function (_mo) {
12384
12384
  return [];
12385
12385
  }, _this68.submitUserMessage = function () {
12386
12386
  return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
12387
- }, _this68.addMessage = function () {
12388
- return console.warn("addMessage failed - please wait for chat view to render before calling this property.");
12389
12387
  }, _this68.focusInput = function () {
12390
12388
  return Qt.focusFromParentElement(_this68._elementRef);
12391
12389
  }, _this68.refreshMessages = function () {}, _this68.clearMessages = function () {}, _this68.scrollToBottom = function () {}, _this68.disableSubmitButton = function () {}, _this68.onNewMessage = function () {}, _this68.onClearMessages = function () {}, _this68.onComponentRender = function () {}, _this68.onError = function () {}, _this68._hasBeenRendered = !1, _this68._auxiliaryStyleApplied = !1, Uo.appendStyleSheetToHead(), _this68._elementRef = document.createElement("div"), _this68._elementRef.id = "container", _this68.attachShadow({