deep-chat-dev 9.0.49 → 9.0.51

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
@@ -2,7 +2,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
2
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4
4
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
5
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e9) { throw _e9; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e10) { didErr = true; err = _e10; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
6
6
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
8
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
@@ -40,11 +40,11 @@ var rr = /*#__PURE__*/function () {
40
40
  }]);
41
41
  return rr;
42
42
  }();
43
- var Et = /*#__PURE__*/function () {
44
- function Et() {
45
- _classCallCheck(this, Et);
43
+ var St = /*#__PURE__*/function () {
44
+ function St() {
45
+ _classCallCheck(this, St);
46
46
  }
47
- _createClass(Et, null, [{
47
+ _createClass(St, null, [{
48
48
  key: "onLoad",
49
49
  value: function onLoad(e) {
50
50
  e.innerHTML = '<div id="large-loading-ring"></div>';
@@ -58,16 +58,16 @@ var Et = /*#__PURE__*/function () {
58
58
  }, {
59
59
  key: "render",
60
60
  value: function render(e, t, i) {
61
- var r = Et.createElements(),
61
+ var r = St.createElements(),
62
62
  s = {
63
63
  onSuccess: t,
64
64
  onFail: rr.render.bind(this, e, "Your 'key' has failed authentication"),
65
- onLoad: Et.onLoad.bind(this, r)
65
+ onLoad: St.onLoad.bind(this, r)
66
66
  };
67
67
  i.key && i.verifyKey(i.key, s), e.replaceChildren(r);
68
68
  }
69
69
  }]);
70
- return Et;
70
+ return St;
71
71
  }();
72
72
  var _ = /*#__PURE__*/function () {
73
73
  function _() {
@@ -136,16 +136,16 @@ var _ = /*#__PURE__*/function () {
136
136
  return _;
137
137
  }();
138
138
  var wn = /*#__PURE__*/function () {
139
- function bt() {
140
- _classCallCheck(this, bt);
139
+ function vt() {
140
+ _classCallCheck(this, vt);
141
141
  }
142
- _createClass(bt, null, [{
142
+ _createClass(vt, null, [{
143
143
  key: "apply",
144
144
  value: function apply(e, t) {
145
145
  if (t) try {
146
- bt.applyStyleSheet(e, t);
146
+ vt.applyStyleSheet(e, t);
147
147
  } catch (_unused) {
148
- bt.addStyleElement(e, t);
148
+ vt.addStyleElement(e, t);
149
149
  }
150
150
  }
151
151
  }, {
@@ -163,10 +163,10 @@ var wn = /*#__PURE__*/function () {
163
163
  }, {
164
164
  key: "applyDefaultStyleToComponent",
165
165
  value: function applyDefaultStyleToComponent(e) {
166
- _.applyToStyleIfNotDefined(e, bt.DEFAULT_COMPONENT_STYLE);
166
+ _.applyToStyleIfNotDefined(e, vt.DEFAULT_COMPONENT_STYLE);
167
167
  }
168
168
  }]);
169
- return bt;
169
+ return vt;
170
170
  }();
171
171
  wn.DEFAULT_COMPONENT_STYLE = {
172
172
  height: "350px",
@@ -175,9 +175,13 @@ wn.DEFAULT_COMPONENT_STYLE = {
175
175
  fontFamily: "'Inter', sans-serif, Avenir, Helvetica, Arial",
176
176
  fontSize: "0.9rem",
177
177
  backgroundColor: "white",
178
- position: "relative"
178
+ position: "relative",
179
+ // this is used to prevent inputAreaStyle background color from going beyond the container's rounded border
180
+ // it will cause issues if there are elements that are meant to be outside of the chat component and in
181
+ // that instance they should overwrite this
182
+ overflow: "hidden"
179
183
  };
180
- var li = wn;
184
+ var ci = wn;
181
185
  var T = /* @__PURE__ */function (n) {
182
186
  return n.ESCAPE = "Escape", n.ENTER = "Enter", n.TAB = "Tab", n.ARROW_UP = "ArrowUp", n.ARROW_DOWN = "ArrowDown", n.ARROW_RIGHT = "ArrowRight", n.ARROW_LEFT = "ArrowLeft", n.BACKSPACE = "Backspace", n.DELETE = "Delete", n.META = "Meta", n.CONTROL = "Control", n;
183
187
  }(T || {});
@@ -187,13 +191,13 @@ var ce = /*#__PURE__*/_createClass(function ce() {
187
191
  ce.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
188
192
  ce.IS_CHROMIUM = window.chrome;
189
193
  var _n = /*#__PURE__*/function () {
190
- function He() {
191
- _classCallCheck(this, He);
194
+ function Ge() {
195
+ _classCallCheck(this, Ge);
192
196
  }
193
- _createClass(He, null, [{
197
+ _createClass(Ge, null, [{
194
198
  key: "add",
195
199
  value: function add(e, t, i) {
196
- t !== void 0 && e.addEventListener("keydown", He.onKeyDown.bind(this, t)), e.oninput = He.onInput.bind(this, t, i);
200
+ t !== void 0 && e.addEventListener("keydown", Ge.onKeyDown.bind(this, t)), e.oninput = Ge.onInput.bind(this, t, i);
197
201
  }
198
202
  // preventing insertion early for a nicer UX
199
203
  // prettier-ignore
@@ -201,7 +205,7 @@ var _n = /*#__PURE__*/function () {
201
205
  key: "onKeyDown",
202
206
  value: function onKeyDown(e, t) {
203
207
  var r = t.target.textContent;
204
- r && r.length >= e && !He.PERMITTED_KEYS.has(t.key) && !He.isKeyCombinationPermitted(t) && t.preventDefault();
208
+ r && r.length >= e && !Ge.PERMITTED_KEYS.has(t.key) && !Ge.isKeyCombinationPermitted(t) && t.preventDefault();
205
209
  }
206
210
  }, {
207
211
  key: "isKeyCombinationPermitted",
@@ -213,10 +217,10 @@ var _n = /*#__PURE__*/function () {
213
217
  value: function onInput(e, t, i) {
214
218
  var r = i.target,
215
219
  s = r.textContent || "";
216
- e !== void 0 && s.length > e && (r.textContent = s.substring(0, e), Bt.focusEndOfInput(r)), t == null || t();
220
+ e !== void 0 && s.length > e && (r.textContent = s.substring(0, e), Ut.focusEndOfInput(r)), t == null || t();
217
221
  }
218
222
  }]);
219
- return He;
223
+ return Ge;
220
224
  }();
221
225
  _n.PERMITTED_KEYS = /* @__PURE__ */new Set([T.BACKSPACE, T.DELETE, T.ARROW_RIGHT, T.ARROW_LEFT, T.ARROW_DOWN, T.ARROW_UP, T.META, T.CONTROL, T.ENTER]);
222
226
  var sr = _n;
@@ -236,28 +240,28 @@ var or = /*#__PURE__*/function () {
236
240
  return or;
237
241
  }();
238
242
  var kn = /*#__PURE__*/function () {
239
- function Ie(e, t) {
243
+ function Le(e, t) {
240
244
  var _this = this;
241
- _classCallCheck(this, Ie);
245
+ _classCallCheck(this, Le);
242
246
  var r;
243
- var i = Ie.processConfig(t, e.textInput);
244
- this.elementRef = Ie.createContainerElement((r = i == null ? void 0 : i.styles) == null ? void 0 : r.container), this.inputElementRef = this.createInputElement(i), this._config = i, this.elementRef.appendChild(this.inputElementRef), setTimeout(function () {
247
+ var i = Le.processConfig(t, e.textInput);
248
+ this.elementRef = Le.createContainerElement((r = i == null ? void 0 : i.styles) == null ? void 0 : r.container), this.inputElementRef = this.createInputElement(i), this._config = i, this.elementRef.appendChild(this.inputElementRef), setTimeout(function () {
245
249
  var s;
246
250
  sr.add(_this.inputElementRef, (s = e.textInput) == null ? void 0 : s.characterLimit, e._validationHandler);
247
251
  });
248
252
  }
249
- _createClass(Ie, [{
253
+ _createClass(Le, [{
250
254
  key: "createInputElement",
251
255
  value: function createInputElement(e) {
252
256
  var i, r, s;
253
257
  var t = document.createElement("div");
254
- return t.id = Ie.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!", ce.IS_CHROMIUM && Ie.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, (r = e == null ? void 0 : e.styles) == null ? void 0 : r.text), Object.assign(t.style, (s = e == null ? void 0 : e.placeholder) == null ? void 0 : s.style), t;
258
+ return t.id = Le.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!", ce.IS_CHROMIUM && Le.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, (r = e == null ? void 0 : e.styles) == null ? void 0 : r.text), Object.assign(t.style, (s = e == null ? void 0 : e.placeholder) == null ? void 0 : s.style), t;
255
259
  }
256
260
  }, {
257
261
  key: "removeTextIfPlaceholder",
258
262
  value: function removeTextIfPlaceholder() {
259
263
  var e, t, i, r;
260
- this.inputElementRef.classList.contains("text-input-placeholder") && !this.inputElementRef.classList.contains("text-input-disabled") && ((e = this._config.placeholder) != null && e.style && (_.unsetStyle(this.inputElementRef, (t = this._config.placeholder) == null ? void 0 : t.style), Object.assign(this.inputElementRef.style, (r = (i = this._config) == null ? void 0 : i.styles) == null ? void 0 : r.text)), Ie.clear(this.inputElementRef), this.inputElementRef.classList.remove("text-input-placeholder"));
264
+ this.inputElementRef.classList.contains("text-input-placeholder") && !this.inputElementRef.classList.contains("text-input-disabled") && ((e = this._config.placeholder) != null && e.style && (_.unsetStyle(this.inputElementRef, (t = this._config.placeholder) == null ? void 0 : t.style), Object.assign(this.inputElementRef.style, (r = (i = this._config) == null ? void 0 : i.styles) == null ? void 0 : r.text)), Le.clear(this.inputElementRef), this.inputElementRef.classList.remove("text-input-placeholder"));
261
265
  }
262
266
  }, {
263
267
  key: "addEventListeners",
@@ -329,15 +333,15 @@ var kn = /*#__PURE__*/function () {
329
333
  return t.id = "text-input-container", Object.assign(t.style, e), t;
330
334
  }
331
335
  }]);
332
- return Ie;
336
+ return Le;
333
337
  }();
334
338
  kn.TEXT_INPUT_ID = "text-input";
335
- var Ai = kn;
336
- var Bt = /*#__PURE__*/function () {
337
- function Bt() {
338
- _classCallCheck(this, Bt);
339
+ var Ii = kn;
340
+ var Ut = /*#__PURE__*/function () {
341
+ function Ut() {
342
+ _classCallCheck(this, Ut);
339
343
  }
340
- _createClass(Bt, null, [{
344
+ _createClass(Ut, null, [{
341
345
  key: "focusEndOfInput",
342
346
  value: function focusEndOfInput(e) {
343
347
  var t = document.createRange();
@@ -348,21 +352,21 @@ var Bt = /*#__PURE__*/function () {
348
352
  }, {
349
353
  key: "focusFromParentElement",
350
354
  value: function focusFromParentElement(e) {
351
- var t = e.querySelector("#".concat(Ai.TEXT_INPUT_ID));
352
- t && Bt.focusEndOfInput(t);
355
+ var t = e.querySelector("#".concat(Ii.TEXT_INPUT_ID));
356
+ t && Ut.focusEndOfInput(t);
353
357
  }
354
358
  }]);
355
- return Bt;
359
+ return Ut;
356
360
  }();
357
- function Vi(n) {
361
+ function Wi(n) {
358
362
  return n.charAt(0).toUpperCase() + n.slice(1);
359
363
  }
360
364
  function ar(n) {
361
365
  return n && JSON.stringify(n);
362
366
  }
363
367
  function lr(n, e, t, i) {
364
- var r = "\n".concat(Vi(e), " message: ").concat(JSON.stringify(n), " \n"),
365
- s = t ? "".concat(Vi(e), " message after interceptor: ").concat(ar(i), " \n") : "";
368
+ var r = "\n".concat(Wi(e), " message: ").concat(JSON.stringify(n), " \n"),
369
+ s = t ? "".concat(Wi(e), " message after interceptor: ").concat(ar(i), " \n") : "";
366
370
  return "".concat(r + s, "Make sure the ").concat(e, " message is using the Response format: https://deepchat.dev/docs/connect/#Response \n You can also augment it using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor");
367
371
  }
368
372
  var C = {
@@ -372,10 +376,10 @@ var C = {
372
376
  INVALID_STREAM_RESPONSE: "Make sure the events are using the Response format: https://deepchat.dev/docs/connect/#Response \nYou can also augment them using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor"
373
377
  },
374
378
  Mn = /*#__PURE__*/function () {
375
- function vt() {
376
- _classCallCheck(this, vt);
379
+ function yt() {
380
+ _classCallCheck(this, yt);
377
381
  }
378
- _createClass(vt, null, [{
382
+ _createClass(yt, null, [{
379
383
  key: "temporarilyRemoveHeader",
380
384
  value: // need to pass stringifyBody boolean separately as binding is throwing an error for some reason
381
385
  // prettier-ignore
@@ -391,12 +395,12 @@ var C = {
391
395
  }
392
396
  throw new Error("Request settings have not been set up");
393
397
  case 2:
394
- r = e.headers[vt.CONTENT_TYPE];
395
- delete e.headers[vt.CONTENT_TYPE];
398
+ r = e.headers[yt.CONTENT_TYPE];
399
+ delete e.headers[yt.CONTENT_TYPE];
396
400
  _context.next = 6;
397
401
  return t(i);
398
402
  case 6:
399
- e.headers[vt.CONTENT_TYPE] = r;
403
+ e.headers[yt.CONTENT_TYPE] = r;
400
404
  case 7:
401
405
  case "end":
402
406
  return _context.stop();
@@ -464,7 +468,7 @@ var C = {
464
468
  return e && _typeof(e) == "object" && (typeof e.error == "string" || typeof e.text == "string" || typeof e.html == "string" || _typeof(e.files) == "object");
465
469
  }
466
470
  }]);
467
- return vt;
471
+ return yt;
468
472
  }();
469
473
  Mn.CONTENT_TYPE = "Content-Type";
470
474
  var k = Mn;
@@ -527,10 +531,10 @@ function dr(n) {
527
531
  };
528
532
  }
529
533
  function ur(n, e, t) {
530
- var i = Wi();
534
+ var i = Ki();
531
535
  var r = new TextDecoder();
532
536
  return function (o, a) {
533
- if (o.length === 0) t == null || t(i), i = Wi();else if (a > 0) {
537
+ if (o.length === 0) t == null || t(i), i = Ki();else if (a > 0) {
534
538
  var l = r.decode(o.subarray(0, a)),
535
539
  c = a + (o[a + 1] === 32 ? 2 : 1),
536
540
  d = r.decode(o.subarray(c));
@@ -556,7 +560,7 @@ function hr(n, e) {
556
560
  var t = new Uint8Array(n.length + e.length);
557
561
  return t.set(n), t.set(e, n.length), t;
558
562
  }
559
- function Wi() {
563
+ function Ki() {
560
564
  return {
561
565
  data: "",
562
566
  event: "",
@@ -570,9 +574,9 @@ var pr = globalThis && globalThis.__rest || function (n, e) {
570
574
  if (n != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, i = Object.getOwnPropertySymbols(n); r < i.length; r++) e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[r]) && (t[i[r]] = n[i[r]]);
571
575
  return t;
572
576
  };
573
- var yi = "text/event-stream",
577
+ var xi = "text/event-stream",
574
578
  fr = 1e3,
575
- Ki = "last-event-id";
579
+ Ji = "last-event-id";
576
580
  function mr(n, e) {
577
581
  var t = e.signal,
578
582
  i = e.headers,
@@ -585,7 +589,7 @@ function mr(n, e) {
585
589
  d = pr(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
586
590
  return new Promise(function (u, p) {
587
591
  var h = Object.assign({}, i);
588
- h.accept || (h.accept = yi);
592
+ h.accept || (h.accept = xi);
589
593
  var b;
590
594
  function m() {
591
595
  b.abort(), document.hidden || j();
@@ -606,7 +610,7 @@ function mr(n, e) {
606
610
  }
607
611
  function _j() {
608
612
  _j = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
609
- var Te, re, z;
613
+ var Ce, re, z;
610
614
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
611
615
  while (1) switch (_context3.prev = _context3.next) {
612
616
  case 0:
@@ -624,7 +628,7 @@ function mr(n, e) {
624
628
  case 7:
625
629
  _context3.next = 9;
626
630
  return cr(re.body, dr(ur(function (z) {
627
- z ? h[Ki] = z : delete h[Ki];
631
+ z ? h[Ji] = z : delete h[Ji];
628
632
  }, function (z) {
629
633
  g = z;
630
634
  }, s)));
@@ -638,7 +642,7 @@ function mr(n, e) {
638
642
  _context3.prev = 14;
639
643
  _context3.t0 = _context3["catch"](1);
640
644
  if (!b.signal.aborted) try {
641
- z = (Te = a == null ? void 0 : a(_context3.t0)) !== null && Te !== void 0 ? Te : g;
645
+ z = (Ce = a == null ? void 0 : a(_context3.t0)) !== null && Ce !== void 0 ? Ce : g;
642
646
  window.clearTimeout(E), E = window.setTimeout(j, z);
643
647
  } catch (z) {
644
648
  w(), p(z);
@@ -656,13 +660,13 @@ function mr(n, e) {
656
660
  }
657
661
  function gr(n) {
658
662
  var e = n.headers.get("content-type");
659
- if (!(e != null && e.startsWith(yi))) throw new Error("Expected content-type to be ".concat(yi, ", Actual: ").concat(e));
663
+ if (!(e != null && e.startsWith(xi))) throw new Error("Expected content-type to be ".concat(xi, ", Actual: ").concat(e));
660
664
  }
661
665
  var Tn = /*#__PURE__*/function () {
662
- function Ge() {
663
- _classCallCheck(this, Ge);
666
+ function Ve() {
667
+ _classCallCheck(this, Ve);
664
668
  }
665
- _createClass(Ge, null, [{
669
+ _createClass(Ve, null, [{
666
670
  key: "generateResponse",
667
671
  value: function generateResponse(e) {
668
672
  var t = e.messages[e.messages.length - 1];
@@ -685,15 +689,15 @@ var Tn = /*#__PURE__*/function () {
685
689
  }, {
686
690
  key: "getResponse",
687
691
  value: function getResponse(e) {
688
- return e.customDemoResponse ? Ge.getCustomResponse(e.customDemoResponse, e.messages[e.messages.length - 1]) : {
689
- text: Ge.generateResponse(e)
692
+ return e.customDemoResponse ? Ve.getCustomResponse(e.customDemoResponse, e.messages[e.messages.length - 1]) : {
693
+ text: Ve.generateResponse(e)
690
694
  };
691
695
  }
692
696
  // timeout is used to simulate a timeout for a response to come back
693
697
  }, {
694
698
  key: "request",
695
699
  value: function request(e, t, i) {
696
- var r = Ge.getResponse(e);
700
+ var r = Ve.getResponse(e);
697
701
  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
698
702
  var s;
699
703
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -724,12 +728,12 @@ var Tn = /*#__PURE__*/function () {
724
728
  value: function requestStream(e, t) {
725
729
  setTimeout(function () {
726
730
  var r;
727
- var i = (r = Ge.getResponse(e)) == null ? void 0 : r.text;
731
+ var i = (r = Ve.getResponse(e)) == null ? void 0 : r.text;
728
732
  F.simulate(e, t, i);
729
733
  }, 400);
730
734
  }
731
735
  }]);
732
- return Ge;
736
+ return Ve;
733
737
  }();
734
738
  Tn.URL = "deep-chat-demo";
735
739
  var de = Tn;
@@ -788,7 +792,7 @@ var F = /*#__PURE__*/function () {
788
792
  _context6.next = 16;
789
793
  break;
790
794
  }
791
- return _context6.abrupt("return", ve.stream(e, o, i));
795
+ return _context6.abrupt("return", ye.stream(e, o, i));
792
796
  case 16:
793
797
  if (!(((m = e.requestSettings) == null ? void 0 : m.url) === de.URL)) {
794
798
  _context6.next = 18;
@@ -899,11 +903,11 @@ var F = /*#__PURE__*/function () {
899
903
  }]);
900
904
  return F;
901
905
  }();
902
- var ve = /*#__PURE__*/function () {
903
- function ve() {
904
- _classCallCheck(this, ve);
906
+ var ye = /*#__PURE__*/function () {
907
+ function ye() {
908
+ _classCallCheck(this, ye);
905
909
  }
906
- _createClass(ve, null, [{
910
+ _createClass(ye, null, [{
907
911
  key: "request",
908
912
  value: function () {
909
913
  var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(e, t, i) {
@@ -946,7 +950,7 @@ var ve = /*#__PURE__*/function () {
946
950
  return function s(_x14) {
947
951
  return _ref2.apply(this, arguments);
948
952
  };
949
- }(), o = ve.generateOptionalSignals();
953
+ }(), o = ye.generateOptionalSignals();
950
954
  (l = (a = e.requestSettings).handler) == null || l.call(a, t, _objectSpread(_objectSpread({}, o), {}, {
951
955
  onResponse: s
952
956
  }));
@@ -980,7 +984,7 @@ var ve = /*#__PURE__*/function () {
980
984
  e.streamHandlers.abortStream.abort = function () {
981
985
  i.finaliseStreamedMessage(), e.streamHandlers.onClose(), r = !1;
982
986
  };
983
- var d = ve.generateOptionalSignals();
987
+ var d = ye.generateOptionalSignals();
984
988
  (p = (u = e.requestSettings).handler) == null || p.call(u, t, _objectSpread(_objectSpread({}, d), {}, {
985
989
  onOpen: a,
986
990
  onResponse: c,
@@ -1040,7 +1044,7 @@ var ve = /*#__PURE__*/function () {
1040
1044
  return _ref3.apply(this, arguments);
1041
1045
  };
1042
1046
  }(),
1043
- a = ve.generateOptionalSignals();
1047
+ a = ye.generateOptionalSignals();
1044
1048
  (c = (l = e.requestSettings).handler) == null || c.call(l, void 0, _objectSpread(_objectSpread({}, a), {}, {
1045
1049
  onOpen: r,
1046
1050
  onResponse: o,
@@ -1063,7 +1067,7 @@ var ve = /*#__PURE__*/function () {
1063
1067
  };
1064
1068
  }
1065
1069
  }]);
1066
- return ve;
1070
+ return ye;
1067
1071
  }();
1068
1072
  var S = /*#__PURE__*/function () {
1069
1073
  function S() {
@@ -1114,7 +1118,7 @@ var S = /*#__PURE__*/function () {
1114
1118
  _context11.next = 13;
1115
1119
  break;
1116
1120
  }
1117
- return _context11.abrupt("return", ve.request(e, o, i));
1121
+ return _context11.abrupt("return", ye.request(e, o, i));
1118
1122
  case 13:
1119
1123
  if (!(((h = e.requestSettings) == null ? void 0 : h.url) === de.URL)) {
1120
1124
  _context11.next = 15;
@@ -1327,11 +1331,11 @@ var S = /*#__PURE__*/function () {
1327
1331
  }]);
1328
1332
  return S;
1329
1333
  }();
1330
- var Ze = /*#__PURE__*/function () {
1331
- function Ze() {
1332
- _classCallCheck(this, Ze);
1334
+ var Qe = /*#__PURE__*/function () {
1335
+ function Qe() {
1336
+ _classCallCheck(this, Qe);
1333
1337
  }
1334
- _createClass(Ze, null, [{
1338
+ _createClass(Qe, null, [{
1335
1339
  key: "getCharacterLimitMessages",
1336
1340
  value: function getCharacterLimitMessages(e, t) {
1337
1341
  var s;
@@ -1358,10 +1362,10 @@ var Ze = /*#__PURE__*/function () {
1358
1362
  }, {
1359
1363
  key: "processMessages",
1360
1364
  value: function processMessages(e, t, i) {
1361
- return t !== void 0 ? t > 0 && (e = Ze.getMaxMessages(e, t)) : e = [e[e.length - 1]], e = JSON.parse(JSON.stringify(e)), i === void 0 ? e : Ze.getCharacterLimitMessages(e, i);
1365
+ return t !== void 0 ? t > 0 && (e = Qe.getMaxMessages(e, t)) : e = [e[e.length - 1]], e = JSON.parse(JSON.stringify(e)), i === void 0 ? e : Qe.getCharacterLimitMessages(e, i);
1362
1366
  }
1363
1367
  }]);
1364
- return Ze;
1368
+ return Qe;
1365
1369
  }();
1366
1370
  var K = /*#__PURE__*/function () {
1367
1371
  function K() {
@@ -1378,7 +1382,7 @@ var K = /*#__PURE__*/function () {
1378
1382
  if (!document.body.contains(e.deepChat)) return;
1379
1383
  var i = e.requestSettings.websocket;
1380
1384
  if (i) {
1381
- if (e.requestSettings.handler) return ve.websocket(e, t);
1385
+ if (e.requestSettings.handler) return ye.websocket(e, t);
1382
1386
  try {
1383
1387
  var r = typeof i != "boolean" ? i : void 0,
1384
1388
  s = new WebSocket(e.requestSettings.url || "", r);
@@ -1537,11 +1541,11 @@ var K = /*#__PURE__*/function () {
1537
1541
  }]);
1538
1542
  return K;
1539
1543
  }();
1540
- var Ut = /*#__PURE__*/function () {
1541
- function Ut() {
1542
- _classCallCheck(this, Ut);
1544
+ var qt = /*#__PURE__*/function () {
1545
+ function qt() {
1546
+ _classCallCheck(this, qt);
1543
1547
  }
1544
- _createClass(Ut, null, [{
1548
+ _createClass(qt, null, [{
1545
1549
  key: "checkForContainerStyles",
1546
1550
  value: function checkForContainerStyles(e, t) {
1547
1551
  var i = e.containerStyle;
@@ -1566,11 +1570,11 @@ var Ut = /*#__PURE__*/function () {
1566
1570
  if (t) return console.error("The validateMessageBeforeSending property is deprecated since version 1.3.24."), console.error("Please change to using validateInput: https://deepchat.dev/docs/interceptors#validateInput"), t;
1567
1571
  }
1568
1572
  }]);
1569
- return Ut;
1573
+ return qt;
1570
1574
  }();
1571
- var ht;
1575
+ var pt;
1572
1576
  function Cn(n) {
1573
- return ht = ht || document.createElement("textarea"), ht.innerHTML = "&" + n + ";", ht.value;
1577
+ return pt = pt || document.createElement("textarea"), pt.innerHTML = "&" + n + ";", pt.value;
1574
1578
  }
1575
1579
  var br = Object.prototype.hasOwnProperty;
1576
1580
  function vr(n, e) {
@@ -1588,13 +1592,13 @@ function An(n) {
1588
1592
  }), n;
1589
1593
  }
1590
1594
  var yr = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
1591
- function Qe(n) {
1595
+ function Xe(n) {
1592
1596
  return n.indexOf("\\") < 0 ? n : n.replace(yr, "$1");
1593
1597
  }
1594
1598
  function In(n) {
1595
1599
  return !(n >= 55296 && n <= 57343 || n >= 64976 && n <= 65007 || (n & 65535) === 65535 || (n & 65535) === 65534 || n >= 0 && n <= 8 || n === 11 || n >= 14 && n <= 31 || n >= 127 && n <= 159 || n > 1114111);
1596
1600
  }
1597
- function xi(n) {
1601
+ function Ei(n) {
1598
1602
  if (n > 65535) {
1599
1603
  n -= 65536;
1600
1604
  var e = 55296 + (n >> 10),
@@ -1608,9 +1612,9 @@ var xr = /&([a-z#][a-z0-9]{1,31});/gi,
1608
1612
  function Sr(n, e) {
1609
1613
  var t = 0,
1610
1614
  i = Cn(e);
1611
- return e !== i ? i : e.charCodeAt(0) === 35 && Er.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), In(t)) ? xi(t) : n;
1615
+ return e !== i ? i : e.charCodeAt(0) === 35 && Er.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), In(t)) ? Ei(t) : n;
1612
1616
  }
1613
- function ye(n) {
1617
+ function xe(n) {
1614
1618
  return n.indexOf("&") < 0 ? n : n.replace(xr, Sr);
1615
1619
  }
1616
1620
  var wr = /[&<>"]/,
@@ -1632,10 +1636,10 @@ f.blockquote_open = function () {
1632
1636
  return "<blockquote>\n";
1633
1637
  };
1634
1638
  f.blockquote_close = function (n, e) {
1635
- return "</blockquote>" + xe(n, e);
1639
+ return "</blockquote>" + Ee(n, e);
1636
1640
  };
1637
1641
  f.code = function (n, e) {
1638
- return n[e].block ? "<pre><code>" + D(n[e].content) + "</code></pre>" + xe(n, e) : "<code>" + D(n[e].content) + "</code>";
1642
+ return n[e].block ? "<pre><code>" + D(n[e].content) + "</code></pre>" + Ee(n, e) : "<code>" + D(n[e].content) + "</code>";
1639
1643
  };
1640
1644
  f.fence = function (n, e, t, i, r) {
1641
1645
  var s = n[e],
@@ -1647,9 +1651,9 @@ f.fence = function (n, e, t, i, r) {
1647
1651
  u;
1648
1652
  if (s.params) {
1649
1653
  if (c = s.params.split(/\s+/g), d = c.join(" "), vr(r.rules.fence_custom, c[0])) return r.rules.fence_custom[c[0]](n, e, t, i, r);
1650
- l = D(ye(Qe(d))), o = ' class="' + a + l + '"';
1654
+ l = D(xe(Xe(d))), o = ' class="' + a + l + '"';
1651
1655
  }
1652
- return t.highlight ? u = t.highlight.apply(t.highlight, [s.content].concat(c)) || D(s.content) : u = D(s.content), "<pre><code" + o + ">" + u + "</code></pre>" + xe(n, e);
1656
+ return t.highlight ? u = t.highlight.apply(t.highlight, [s.content].concat(c)) || D(s.content) : u = D(s.content), "<pre><code" + o + ">" + u + "</code></pre>" + Ee(n, e);
1653
1657
  };
1654
1658
  f.fence_custom = {};
1655
1659
  f.heading_open = function (n, e) {
@@ -1659,13 +1663,13 @@ f.heading_close = function (n, e) {
1659
1663
  return "</h" + n[e].hLevel + ">\n";
1660
1664
  };
1661
1665
  f.hr = function (n, e, t) {
1662
- return (t.xhtmlOut ? "<hr />" : "<hr>") + xe(n, e);
1666
+ return (t.xhtmlOut ? "<hr />" : "<hr>") + Ee(n, e);
1663
1667
  };
1664
1668
  f.bullet_list_open = function () {
1665
1669
  return "<ul>\n";
1666
1670
  };
1667
1671
  f.bullet_list_close = function (n, e) {
1668
- return "</ul>" + xe(n, e);
1672
+ return "</ul>" + Ee(n, e);
1669
1673
  };
1670
1674
  f.list_item_open = function () {
1671
1675
  return "<li>";
@@ -1679,17 +1683,17 @@ f.ordered_list_open = function (n, e) {
1679
1683
  return "<ol" + i + ">\n";
1680
1684
  };
1681
1685
  f.ordered_list_close = function (n, e) {
1682
- return "</ol>" + xe(n, e);
1686
+ return "</ol>" + Ee(n, e);
1683
1687
  };
1684
1688
  f.paragraph_open = function (n, e) {
1685
1689
  return n[e].tight ? "" : "<p>";
1686
1690
  };
1687
1691
  f.paragraph_close = function (n, e) {
1688
1692
  var t = !(n[e].tight && e && n[e - 1].type === "inline" && !n[e - 1].content);
1689
- return (n[e].tight ? "" : "</p>") + (t ? xe(n, e) : "");
1693
+ return (n[e].tight ? "" : "</p>") + (t ? Ee(n, e) : "");
1690
1694
  };
1691
1695
  f.link_open = function (n, e, t) {
1692
- var i = n[e].title ? ' title="' + D(ye(n[e].title)) + '"' : "",
1696
+ var i = n[e].title ? ' title="' + D(xe(n[e].title)) + '"' : "",
1693
1697
  r = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
1694
1698
  return '<a href="' + D(n[e].href) + '"' + i + r + ">";
1695
1699
  };
@@ -1698,8 +1702,8 @@ f.link_close = function () {
1698
1702
  };
1699
1703
  f.image = function (n, e, t) {
1700
1704
  var i = ' src="' + D(n[e].src) + '"',
1701
- r = n[e].title ? ' title="' + D(ye(n[e].title)) + '"' : "",
1702
- s = ' alt="' + (n[e].alt ? D(ye(Qe(n[e].alt))) : "") + '"',
1705
+ r = n[e].title ? ' title="' + D(xe(n[e].title)) + '"' : "",
1706
+ s = ' alt="' + (n[e].alt ? D(xe(Xe(n[e].alt))) : "") + '"',
1703
1707
  o = t.xhtmlOut ? " /" : "";
1704
1708
  return "<img" + i + s + r + o + ">";
1705
1709
  };
@@ -1793,7 +1797,7 @@ f.htmltag = function (n, e) {
1793
1797
  return n[e].content;
1794
1798
  };
1795
1799
  f.abbr_open = function (n, e) {
1796
- return '<abbr title="' + D(ye(n[e].title)) + '">';
1800
+ return '<abbr title="' + D(xe(n[e].title)) + '">';
1797
1801
  };
1798
1802
  f.abbr_close = function () {
1799
1803
  return "</abbr>";
@@ -1843,17 +1847,17 @@ f.dd_close = function () {
1843
1847
  function Ln(n, e) {
1844
1848
  return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ? Ln(n, e + 2) : e;
1845
1849
  }
1846
- var xe = f.getBreak = function (e, t) {
1850
+ var Ee = f.getBreak = function (e, t) {
1847
1851
  return t = Ln(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
1848
1852
  };
1849
- function Ii() {
1853
+ function Li() {
1850
1854
  this.rules = An({}, f), this.getBreak = f.getBreak;
1851
1855
  }
1852
- Ii.prototype.renderInline = function (n, e, t) {
1856
+ Li.prototype.renderInline = function (n, e, t) {
1853
1857
  for (var i = this.rules, r = n.length, s = 0, o = ""; r--;) o += i[n[s].type](n, s++, e, t, this);
1854
1858
  return o;
1855
1859
  };
1856
- Ii.prototype.render = function (n, e, t) {
1860
+ Li.prototype.render = function (n, e, t) {
1857
1861
  for (var i = this.rules, r = n.length, s = -1, o = ""; ++s < r;) n[s].type === "inline" ? o += this.renderInline(n[s].children, e, t) : o += i[n[s].type](n, s, e, t, this);
1858
1862
  return o;
1859
1863
  };
@@ -1942,27 +1946,27 @@ function Tr(n) {
1942
1946
  children: []
1943
1947
  }) : n.block.parse(n.src, n.options, n.env, n.tokens);
1944
1948
  }
1945
- function Ee(n, e, t, i, r) {
1949
+ function Se(n, e, t, i, r) {
1946
1950
  this.src = n, this.env = i, this.options = t, this.parser = e, this.tokens = r, this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = [], this.isInLabel = !1, this.linkLevel = 0, this.linkContent = "", this.labelUnmatchedScopes = 0;
1947
1951
  }
1948
- Ee.prototype.pushPending = function () {
1952
+ Se.prototype.pushPending = function () {
1949
1953
  this.tokens.push({
1950
1954
  type: "text",
1951
1955
  content: this.pending,
1952
1956
  level: this.pendingLevel
1953
1957
  }), this.pending = "";
1954
1958
  };
1955
- Ee.prototype.push = function (n) {
1959
+ Se.prototype.push = function (n) {
1956
1960
  this.pending && this.pushPending(), this.tokens.push(n), this.pendingLevel = this.level;
1957
1961
  };
1958
- Ee.prototype.cacheSet = function (n, e) {
1962
+ Se.prototype.cacheSet = function (n, e) {
1959
1963
  for (var t = this.cache.length; t <= n; t++) this.cache.push(0);
1960
1964
  this.cache[n] = e;
1961
1965
  };
1962
- Ee.prototype.cacheGet = function (n) {
1966
+ Se.prototype.cacheGet = function (n) {
1963
1967
  return n < this.cache.length ? this.cache[n] : 0;
1964
1968
  };
1965
- function Xe(n, e) {
1969
+ function et(n, e) {
1966
1970
  var t,
1967
1971
  i,
1968
1972
  r,
@@ -1983,7 +1987,7 @@ function Xe(n, e) {
1983
1987
  }
1984
1988
  function Cr(n, e, t, i) {
1985
1989
  var r, s, o, a, l, c;
1986
- if (n.charCodeAt(0) !== 42 || n.charCodeAt(1) !== 91 || n.indexOf("]:") === -1 || (r = new Ee(n, e, t, i, []), s = Xe(r, 1), s < 0 || n.charCodeAt(s + 1) !== 58)) return -1;
1990
+ if (n.charCodeAt(0) !== 42 || n.charCodeAt(1) !== 91 || n.indexOf("]:") === -1 || (r = new Se(n, e, t, i, []), s = et(r, 1), s < 0 || n.charCodeAt(s + 1) !== 58)) return -1;
1987
1991
  for (a = r.posMax, o = s + 2; o < a && r.src.charCodeAt(o) !== 10; o++);
1988
1992
  return l = n.slice(2, s), c = n.slice(s + 2, o).trim(), c.length === 0 ? -1 : (i.abbreviations || (i.abbreviations = {}), _typeof(i.abbreviations[":" + l]) > "u" && (i.abbreviations[":" + l] = c), o);
1989
1993
  }
@@ -2000,8 +2004,8 @@ function Ar(n) {
2000
2004
  }
2001
2005
  }
2002
2006
  }
2003
- function Ei(n) {
2004
- var e = ye(n);
2007
+ function Si(n) {
2008
+ var e = xe(n);
2005
2009
  try {
2006
2010
  e = decodeURI(e);
2007
2011
  } catch (_unused2) {}
@@ -2016,7 +2020,7 @@ function Rn(n, e) {
2016
2020
  if (n.src.charCodeAt(e) === 60) {
2017
2021
  for (e++; e < o;) {
2018
2022
  if (t = n.src.charCodeAt(e), t === 10) return !1;
2019
- if (t === 62) return r = Ei(Qe(n.src.slice(s + 1, e))), n.parser.validateLink(r) ? (n.pos = e + 1, n.linkContent = r, !0) : !1;
2023
+ if (t === 62) return r = Si(Xe(n.src.slice(s + 1, e))), n.parser.validateLink(r) ? (n.pos = e + 1, n.linkContent = r, !0) : !1;
2020
2024
  if (t === 92 && e + 1 < o) {
2021
2025
  e += 2;
2022
2026
  continue;
@@ -2033,7 +2037,7 @@ function Rn(n, e) {
2033
2037
  if (t === 40 && (i++, i > 1) || t === 41 && (i--, i < 0)) break;
2034
2038
  e++;
2035
2039
  }
2036
- return s === e || (r = Qe(n.src.slice(s, e)), !n.parser.validateLink(r)) ? !1 : (n.linkContent = r, n.pos = e, !0);
2040
+ return s === e || (r = Xe(n.src.slice(s, e)), !n.parser.validateLink(r)) ? !1 : (n.linkContent = r, n.pos = e, !0);
2037
2041
  }
2038
2042
  function Nn(n, e) {
2039
2043
  var t,
@@ -2042,7 +2046,7 @@ function Nn(n, e) {
2042
2046
  s = n.src.charCodeAt(e);
2043
2047
  if (s !== 34 && s !== 39 && s !== 40) return !1;
2044
2048
  for (e++, s === 40 && (s = 41); e < r;) {
2045
- if (t = n.src.charCodeAt(e), t === s) return n.pos = e + 1, n.linkContent = Qe(n.src.slice(i + 1, e)), !0;
2049
+ if (t = n.src.charCodeAt(e), t === s) return n.pos = e + 1, n.linkContent = Xe(n.src.slice(i + 1, e)), !0;
2046
2050
  if (t === 92 && e + 1 < r) {
2047
2051
  e += 2;
2048
2052
  continue;
@@ -2056,7 +2060,7 @@ function On(n) {
2056
2060
  }
2057
2061
  function Ir(n, e, t, i) {
2058
2062
  var r, s, o, a, l, c, d, u, p;
2059
- if (n.charCodeAt(0) !== 91 || n.indexOf("]:") === -1 || (r = new Ee(n, e, t, i, []), s = Xe(r, 0), s < 0 || n.charCodeAt(s + 1) !== 58)) return -1;
2063
+ if (n.charCodeAt(0) !== 91 || n.indexOf("]:") === -1 || (r = new Se(n, e, t, i, []), s = et(r, 0), s < 0 || n.charCodeAt(s + 1) !== 58)) return -1;
2060
2064
  for (a = r.posMax, o = s + 2; o < a && (l = r.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
2061
2065
  if (!Rn(r, o)) return -1;
2062
2066
  for (d = r.linkContent, o = r.pos, c = o, o = o + 1; o < a && (l = r.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
@@ -2140,8 +2144,8 @@ function Nr(n) {
2140
2144
  });
2141
2145
  }
2142
2146
  }
2143
- var Ji = " \n()[]'\".,!?-";
2144
- function ci(n) {
2147
+ var Yi = " \n()[]'\".,!?-";
2148
+ function di(n) {
2145
2149
  return n.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1");
2146
2150
  }
2147
2151
  function Or(n) {
@@ -2159,11 +2163,11 @@ function Or(n) {
2159
2163
  p,
2160
2164
  h = n.tokens;
2161
2165
  if (n.env.abbreviations) {
2162
- for (n.env.abbrRegExp || (p = "(^|[" + Ji.split("").map(ci).join("") + "])(" + Object.keys(n.env.abbreviations).map(function (b) {
2166
+ for (n.env.abbrRegExp || (p = "(^|[" + Yi.split("").map(di).join("") + "])(" + Object.keys(n.env.abbreviations).map(function (b) {
2163
2167
  return b.substr(1);
2164
2168
  }).sort(function (b, m) {
2165
2169
  return m.length - b.length;
2166
- }).map(ci).join("|") + ")($|[" + Ji.split("").map(ci).join("") + "])", n.env.abbrRegExp = new RegExp(p, "g")), d = n.env.abbrRegExp, t = 0, i = h.length; t < i; t++) if (h[t].type === "inline") {
2170
+ }).map(di).join("|") + ")($|[" + Yi.split("").map(di).join("") + "])", n.env.abbrRegExp = new RegExp(p, "g")), d = n.env.abbrRegExp, t = 0, i = h.length; t < i; t++) if (h[t].type === "inline") {
2167
2171
  for (r = h[t].children, e = r.length - 1; e >= 0; e--) if (s = r[e], s.type === "text") {
2168
2172
  for (l = 0, o = s.content, d.lastIndex = 0, c = s.level, a = []; u = d.exec(o);) d.lastIndex > l && a.push({
2169
2173
  type: "text",
@@ -2210,13 +2214,13 @@ function Fr(n) {
2210
2214
  }
2211
2215
  }
2212
2216
  var Br = /['"]/,
2213
- Yi = /['"]/g,
2217
+ $i = /['"]/g,
2214
2218
  Ur = /[-\s()\[\]]/,
2215
- $i = "’";
2216
- function Zi(n, e) {
2219
+ Zi = "’";
2220
+ function Qi(n, e) {
2217
2221
  return e < 0 || e >= n.length ? !1 : !Ur.test(n[e]);
2218
2222
  }
2219
- function Ce(n, e, t) {
2223
+ function Ae(n, e, t) {
2220
2224
  return n.substr(0, e) + t + n.substr(e + 1);
2221
2225
  }
2222
2226
  function qr(n) {
@@ -2226,14 +2230,14 @@ function qr(n) {
2226
2230
  for (g = n.tokens[m].children, E.length = 0, e = 0; e < g.length; e++) if (t = g[e], !(t.type !== "text" || Br.test(t.text))) {
2227
2231
  for (a = g[e].level, h = E.length - 1; h >= 0 && !(E[h].level <= a); h--);
2228
2232
  E.length = h + 1, i = t.content, s = 0, o = i.length;
2229
- e: for (; s < o && (Yi.lastIndex = s, r = Yi.exec(i), !!r);) {
2230
- if (l = !Zi(i, r.index - 1), s = r.index + 1, b = r[0] === "'", c = !Zi(i, s), !c && !l) {
2231
- b && (t.content = Ce(t.content, r.index, $i));
2233
+ e: for (; s < o && ($i.lastIndex = s, r = $i.exec(i), !!r);) {
2234
+ if (l = !Qi(i, r.index - 1), s = r.index + 1, b = r[0] === "'", c = !Qi(i, s), !c && !l) {
2235
+ b && (t.content = Ae(t.content, r.index, Zi));
2232
2236
  continue;
2233
2237
  }
2234
2238
  if (u = !c, p = !l, p) {
2235
2239
  for (h = E.length - 1; h >= 0 && (d = E[h], !(E[h].level < a)); h--) if (d.single === b && E[h].level === a) {
2236
- d = E[h], b ? (g[d.token].content = Ce(g[d.token].content, d.pos, n.options.quotes[2]), t.content = Ce(t.content, r.index, n.options.quotes[3])) : (g[d.token].content = Ce(g[d.token].content, d.pos, n.options.quotes[0]), t.content = Ce(t.content, r.index, n.options.quotes[1])), E.length = h;
2240
+ d = E[h], b ? (g[d.token].content = Ae(g[d.token].content, d.pos, n.options.quotes[2]), t.content = Ae(t.content, r.index, n.options.quotes[3])) : (g[d.token].content = Ae(g[d.token].content, d.pos, n.options.quotes[0]), t.content = Ae(t.content, r.index, n.options.quotes[1])), E.length = h;
2237
2241
  continue e;
2238
2242
  }
2239
2243
  }
@@ -2242,22 +2246,22 @@ function qr(n) {
2242
2246
  pos: r.index,
2243
2247
  single: b,
2244
2248
  level: a
2245
- }) : p && b && (t.content = Ce(t.content, r.index, $i));
2249
+ }) : p && b && (t.content = Ae(t.content, r.index, Zi));
2246
2250
  }
2247
2251
  }
2248
2252
  }
2249
2253
  }
2250
2254
  }
2251
- var di = [["block", Tr], ["abbr", Ar], ["references", Lr], ["inline", Rr], ["footnote_tail", Nr], ["abbr2", Or], ["replacements", Fr], ["smartquotes", qr]];
2255
+ var ui = [["block", Tr], ["abbr", Ar], ["references", Lr], ["inline", Rr], ["footnote_tail", Nr], ["abbr2", Or], ["replacements", Fr], ["smartquotes", qr]];
2252
2256
  function Pn() {
2253
2257
  this.options = {}, this.ruler = new q();
2254
- for (var n = 0; n < di.length; n++) this.ruler.push(di[n][0], di[n][1]);
2258
+ for (var n = 0; n < ui.length; n++) this.ruler.push(ui[n][0], ui[n][1]);
2255
2259
  }
2256
2260
  Pn.prototype.process = function (n) {
2257
2261
  var e, t, i;
2258
2262
  for (i = this.ruler.getRules(""), e = 0, t = i.length; e < t; e++) i[e](n);
2259
2263
  };
2260
- function Se(n, e, t, i, r) {
2264
+ function we(n, e, t, i, r) {
2261
2265
  var s, o, a, l, c, d, u;
2262
2266
  for (this.src = n, this.parser = e, this.options = t, this.env = i, this.tokens = r, this.bMarks = [], this.eMarks = [], this.tShift = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.parentType = "root", this.ddIndent = -1, this.level = 0, this.result = "", o = this.src, d = 0, u = !1, a = l = d = 0, c = o.length; l < c; l++) {
2263
2267
  if (s = o.charCodeAt(l), !u) if (s === 32) {
@@ -2268,27 +2272,27 @@ function Se(n, e, t, i, r) {
2268
2272
  }
2269
2273
  this.bMarks.push(o.length), this.eMarks.push(o.length), this.tShift.push(0), this.lineMax = this.bMarks.length - 1;
2270
2274
  }
2271
- Se.prototype.isEmpty = function (e) {
2275
+ we.prototype.isEmpty = function (e) {
2272
2276
  return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
2273
2277
  };
2274
- Se.prototype.skipEmptyLines = function (e) {
2278
+ we.prototype.skipEmptyLines = function (e) {
2275
2279
  for (var t = this.lineMax; e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++);
2276
2280
  return e;
2277
2281
  };
2278
- Se.prototype.skipSpaces = function (e) {
2282
+ we.prototype.skipSpaces = function (e) {
2279
2283
  for (var t = this.src.length; e < t && this.src.charCodeAt(e) === 32; e++);
2280
2284
  return e;
2281
2285
  };
2282
- Se.prototype.skipChars = function (e, t) {
2286
+ we.prototype.skipChars = function (e, t) {
2283
2287
  for (var i = this.src.length; e < i && this.src.charCodeAt(e) === t; e++);
2284
2288
  return e;
2285
2289
  };
2286
- Se.prototype.skipCharsBack = function (e, t, i) {
2290
+ we.prototype.skipCharsBack = function (e, t, i) {
2287
2291
  if (e <= i) return e;
2288
2292
  for (; e > i;) if (t !== this.src.charCodeAt(--e)) return e + 1;
2289
2293
  return e;
2290
2294
  };
2291
- Se.prototype.getLines = function (e, t, i, r) {
2295
+ we.prototype.getLines = function (e, t, i, r) {
2292
2296
  var s,
2293
2297
  o,
2294
2298
  a,
@@ -2401,11 +2405,11 @@ function Wr(n, e, t, i) {
2401
2405
  level: n.level
2402
2406
  })), !0);
2403
2407
  }
2404
- function Qi(n, e) {
2408
+ function Xi(n, e) {
2405
2409
  var t, i, r;
2406
2410
  return i = n.bMarks[e] + n.tShift[e], r = n.eMarks[e], i >= r || (t = n.src.charCodeAt(i++), t !== 42 && t !== 45 && t !== 43) || i < r && n.src.charCodeAt(i) !== 32 ? -1 : i;
2407
2411
  }
2408
- function Xi(n, e) {
2412
+ function en(n, e) {
2409
2413
  var t,
2410
2414
  i = n.bMarks[e] + n.tShift[e],
2411
2415
  r = n.eMarks[e];
@@ -2444,12 +2448,12 @@ function Jr(n, e, t, i) {
2444
2448
  A,
2445
2449
  H,
2446
2450
  j,
2447
- Te = !0,
2451
+ Ce = !0,
2448
2452
  re,
2449
2453
  z,
2450
- Gi,
2451
- ai;
2452
- if ((u = Xi(n, e)) >= 0) g = !0;else if ((u = Qi(n, e)) >= 0) g = !1;else return !1;
2454
+ Vi,
2455
+ li;
2456
+ if ((u = en(n, e)) >= 0) g = !0;else if ((u = Xi(n, e)) >= 0) g = !1;else return !1;
2453
2457
  if (n.level >= n.options.maxNesting) return !1;
2454
2458
  if (m = n.src.charCodeAt(u - 1), i) return !0;
2455
2459
  for (w = n.tokens.length, g ? (d = n.bMarks[e] + n.tShift[e], b = Number(n.src.substr(d, u - d - 1)), n.tokens.push({
@@ -2465,24 +2469,24 @@ function Jr(n, e, t, i) {
2465
2469
  type: "list_item_open",
2466
2470
  lines: j = [e, 0],
2467
2471
  level: n.level++
2468
- }), a = n.blkIndent, l = n.tight, o = n.tShift[e], c = n.parentType, n.tShift[e] = E - n.bMarks[e], n.blkIndent = s, n.tight = !0, n.parentType = "list", n.parser.tokenize(n, e, t, !0), (!n.tight || A) && (Te = !1), A = n.line - e > 1 && n.isEmpty(n.line - 1), n.blkIndent = a, n.tShift[e] = o, n.tight = l, n.parentType = c, n.tokens.push({
2472
+ }), a = n.blkIndent, l = n.tight, o = n.tShift[e], c = n.parentType, n.tShift[e] = E - n.bMarks[e], n.blkIndent = s, n.tight = !0, n.parentType = "list", n.parser.tokenize(n, e, t, !0), (!n.tight || A) && (Ce = !1), A = n.line - e > 1 && n.isEmpty(n.line - 1), n.blkIndent = a, n.tShift[e] = o, n.tight = l, n.parentType = c, n.tokens.push({
2469
2473
  type: "list_item_close",
2470
2474
  level: --n.level
2471
2475
  }), r = e = n.line, j[1] = r, E = n.bMarks[e], !(r >= t || n.isEmpty(r) || n.tShift[r] < n.blkIndent));) {
2472
- for (ai = !1, z = 0, Gi = re.length; z < Gi; z++) if (re[z](n, r, t, !0)) {
2473
- ai = !0;
2476
+ for (li = !1, z = 0, Vi = re.length; z < Vi; z++) if (re[z](n, r, t, !0)) {
2477
+ li = !0;
2474
2478
  break;
2475
2479
  }
2476
- if (ai) break;
2480
+ if (li) break;
2477
2481
  if (g) {
2478
- if (u = Xi(n, r), u < 0) break;
2479
- } else if (u = Qi(n, r), u < 0) break;
2482
+ if (u = en(n, r), u < 0) break;
2483
+ } else if (u = Xi(n, r), u < 0) break;
2480
2484
  if (m !== n.src.charCodeAt(u - 1)) break;
2481
2485
  }
2482
2486
  return n.tokens.push({
2483
2487
  type: g ? "ordered_list_close" : "bullet_list_close",
2484
2488
  level: --n.level
2485
- }), H[1] = r, n.line = r, Te && Kr(n, w), !0;
2489
+ }), H[1] = r, n.line = r, Ce && Kr(n, w), !0;
2486
2490
  }
2487
2491
  function Yr(n, e, t, i) {
2488
2492
  var r,
@@ -2588,14 +2592,14 @@ function ts(n, e, t, i) {
2588
2592
  content: n.getLines(e, o, 0, !0)
2589
2593
  }), !0;
2590
2594
  }
2591
- function ui(n, e) {
2595
+ function hi(n, e) {
2592
2596
  var t = n.bMarks[e] + n.blkIndent,
2593
2597
  i = n.eMarks[e];
2594
2598
  return n.src.substr(t, i - t);
2595
2599
  }
2596
2600
  function is(n, e, t, i) {
2597
2601
  var r, s, o, a, l, c, d, u, p, h, b;
2598
- if (e + 2 > t || (l = e + 1, n.tShift[l] < n.blkIndent) || (o = n.bMarks[l] + n.tShift[l], o >= n.eMarks[l]) || (r = n.src.charCodeAt(o), r !== 124 && r !== 45 && r !== 58) || (s = ui(n, e + 1), !/^[-:| ]+$/.test(s)) || (c = s.split("|"), c <= 2)) return !1;
2602
+ if (e + 2 > t || (l = e + 1, n.tShift[l] < n.blkIndent) || (o = n.bMarks[l] + n.tShift[l], o >= n.eMarks[l]) || (r = n.src.charCodeAt(o), r !== 124 && r !== 45 && r !== 58) || (s = hi(n, e + 1), !/^[-:| ]+$/.test(s)) || (c = s.split("|"), c <= 2)) return !1;
2599
2603
  for (u = [], a = 0; a < c.length; a++) {
2600
2604
  if (p = c[a].trim(), !p) {
2601
2605
  if (a === 0 || a === c.length - 1) continue;
@@ -2604,7 +2608,7 @@ function is(n, e, t, i) {
2604
2608
  if (!/^:?-+:?$/.test(p)) return !1;
2605
2609
  p.charCodeAt(p.length - 1) === 58 ? u.push(p.charCodeAt(0) === 58 ? "center" : "right") : p.charCodeAt(0) === 58 ? u.push("left") : u.push("");
2606
2610
  }
2607
- if (s = ui(n, e).trim(), s.indexOf("|") === -1 || (c = s.replace(/^\||\|$/g, "").split("|"), u.length !== c.length)) return !1;
2611
+ if (s = hi(n, e).trim(), s.indexOf("|") === -1 || (c = s.replace(/^\||\|$/g, "").split("|"), u.length !== c.length)) return !1;
2608
2612
  if (i) return !0;
2609
2613
  for (n.tokens.push({
2610
2614
  type: "table_open",
@@ -2643,7 +2647,7 @@ function is(n, e, t, i) {
2643
2647
  type: "tbody_open",
2644
2648
  lines: b = [e + 2, 0],
2645
2649
  level: n.level++
2646
- }), l = e + 2; l < t && !(n.tShift[l] < n.blkIndent || (s = ui(n, l).trim(), s.indexOf("|") === -1)); l++) {
2650
+ }), l = e + 2; l < t && !(n.tShift[l] < n.blkIndent || (s = hi(n, l).trim(), s.indexOf("|") === -1)); l++) {
2647
2651
  for (c = s.replace(/^\||\|$/g, "").split("|"), n.tokens.push({
2648
2652
  type: "tr_open",
2649
2653
  level: n.level++
@@ -2673,7 +2677,7 @@ function is(n, e, t, i) {
2673
2677
  level: --n.level
2674
2678
  }), h[1] = b[1] = l, n.line = l, !0;
2675
2679
  }
2676
- function pt(n, e) {
2680
+ function ft(n, e) {
2677
2681
  var t,
2678
2682
  i,
2679
2683
  r = n.bMarks[e] + n.tShift[e],
@@ -2688,8 +2692,8 @@ function ns(n, e) {
2688
2692
  }
2689
2693
  function rs(n, e, t, i) {
2690
2694
  var r, s, o, a, l, c, d, u, p, h, b, m, g, E;
2691
- if (i) return n.ddIndent < 0 ? !1 : pt(n, e) >= 0;
2692
- if (d = e + 1, n.isEmpty(d) && ++d > t || n.tShift[d] < n.blkIndent || (r = pt(n, d), r < 0) || n.level >= n.options.maxNesting) return !1;
2695
+ if (i) return n.ddIndent < 0 ? !1 : ft(n, e) >= 0;
2696
+ if (d = e + 1, n.isEmpty(d) && ++d > t || n.tShift[d] < n.blkIndent || (r = ft(n, d), r < 0) || n.level >= n.options.maxNesting) return !1;
2693
2697
  c = n.tokens.length, n.tokens.push({
2694
2698
  type: "dl_open",
2695
2699
  lines: l = [e, 0],
@@ -2718,10 +2722,10 @@ function rs(n, e, t, i) {
2718
2722
  type: "dd_close",
2719
2723
  level: --n.level
2720
2724
  }), a[1] = d = n.line, d >= t || n.tShift[d] < n.blkIndent) break e;
2721
- if (r = pt(n, d), r < 0) break;
2725
+ if (r = ft(n, d), r < 0) break;
2722
2726
  s = d;
2723
2727
  }
2724
- if (d >= t || (o = d, n.isEmpty(o)) || n.tShift[o] < n.blkIndent || (s = o + 1, s >= t) || (n.isEmpty(s) && s++, s >= t) || n.tShift[s] < n.blkIndent || (r = pt(n, s), r < 0)) break;
2728
+ if (d >= t || (o = d, n.isEmpty(o)) || n.tShift[o] < n.blkIndent || (s = o + 1, s >= t) || (n.isEmpty(s) && s++, s >= t) || n.tShift[s] < n.blkIndent || (r = ft(n, s), r < 0)) break;
2725
2729
  }
2726
2730
  return n.tokens.push({
2727
2731
  type: "dl_close",
@@ -2762,14 +2766,14 @@ function ss(n, e) {
2762
2766
  level: n.level
2763
2767
  })), !0;
2764
2768
  }
2765
- var ft = [["code", Hr], ["fences", Gr, ["paragraph", "blockquote", "list"]], ["blockquote", Vr, ["paragraph", "blockquote", "list"]], ["hr", Wr, ["paragraph", "blockquote", "list"]], ["list", Jr, ["paragraph", "blockquote"]], ["footnote", Yr, ["paragraph"]], ["heading", $r, ["paragraph", "blockquote"]], ["lheading", Zr], ["htmlblock", ts, ["paragraph", "blockquote"]], ["table", is, ["paragraph"]], ["deflist", rs, ["paragraph"]], ["paragraph", ss]];
2766
- function Li() {
2769
+ var mt = [["code", Hr], ["fences", Gr, ["paragraph", "blockquote", "list"]], ["blockquote", Vr, ["paragraph", "blockquote", "list"]], ["hr", Wr, ["paragraph", "blockquote", "list"]], ["list", Jr, ["paragraph", "blockquote"]], ["footnote", Yr, ["paragraph"]], ["heading", $r, ["paragraph", "blockquote"]], ["lheading", Zr], ["htmlblock", ts, ["paragraph", "blockquote"]], ["table", is, ["paragraph"]], ["deflist", rs, ["paragraph"]], ["paragraph", ss]];
2770
+ function Ri() {
2767
2771
  this.ruler = new q();
2768
- for (var n = 0; n < ft.length; n++) this.ruler.push(ft[n][0], ft[n][1], {
2769
- alt: (ft[n][2] || []).slice()
2772
+ for (var n = 0; n < mt.length; n++) this.ruler.push(mt[n][0], mt[n][1], {
2773
+ alt: (mt[n][2] || []).slice()
2770
2774
  });
2771
2775
  }
2772
- Li.prototype.tokenize = function (n, e, t) {
2776
+ Ri.prototype.tokenize = function (n, e, t) {
2773
2777
  for (var i = this.ruler.getRules(""), r = i.length, s = e, o = !1, a, l; s < t && (n.line = s = n.skipEmptyLines(s), !(s >= t || n.tShift[s] < n.blkIndent));) {
2774
2778
  for (l = 0; l < r && (a = i[l](n, s, t, !1), !a); l++);
2775
2779
  if (n.tight = !o, n.isEmpty(n.line - 1) && (o = !0), s = n.line, s < t && n.isEmpty(s)) {
@@ -2781,7 +2785,7 @@ Li.prototype.tokenize = function (n, e, t) {
2781
2785
  var os = /[\n\t]/g,
2782
2786
  as = /\r[\n\u0085]|[\u2424\u2028\u0085]/g,
2783
2787
  ls = /\u00a0/g;
2784
- Li.prototype.parse = function (n, e, t, i) {
2788
+ Ri.prototype.parse = function (n, e, t, i) {
2785
2789
  var r,
2786
2790
  s = 0,
2787
2791
  o = 0;
@@ -2789,7 +2793,7 @@ Li.prototype.parse = function (n, e, t, i) {
2789
2793
  n = n.replace(ls, " "), n = n.replace(as, "\n"), n.indexOf(" ") >= 0 && (n = n.replace(os, function (a, l) {
2790
2794
  var c;
2791
2795
  return n.charCodeAt(l) === 10 ? (s = l + 1, o = 0, a) : (c = " ".slice((l - s - o) % 4), o = l - s + 1, c);
2792
- })), r = new Se(n, this, e, t, i), this.tokenize(r, r.line, r.lineMax);
2796
+ })), r = new we(n, this, e, t, i), this.tokenize(r, r.line, r.lineMax);
2793
2797
  };
2794
2798
  function cs(n) {
2795
2799
  switch (n) {
@@ -2849,10 +2853,10 @@ function us(n, e) {
2849
2853
  for (r++; r < i && n.src.charCodeAt(r) === 32;) r++;
2850
2854
  return n.pos = r, !0;
2851
2855
  }
2852
- var Ri = [];
2853
- for (var en = 0; en < 256; en++) Ri.push(0);
2856
+ var Ni = [];
2857
+ for (var tn = 0; tn < 256; tn++) Ni.push(0);
2854
2858
  "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function (n) {
2855
- Ri[n.charCodeAt(0)] = 1;
2859
+ Ni[n.charCodeAt(0)] = 1;
2856
2860
  });
2857
2861
  function hs(n, e) {
2858
2862
  var t,
@@ -2860,7 +2864,7 @@ function hs(n, e) {
2860
2864
  r = n.posMax;
2861
2865
  if (n.src.charCodeAt(i) !== 92) return !1;
2862
2866
  if (i++, i < r) {
2863
- if (t = n.src.charCodeAt(i), t < 256 && Ri[t] !== 0) return e || (n.pending += n.src[i]), n.pos += 2, !0;
2867
+ if (t = n.src.charCodeAt(i), t < 256 && Ni[t] !== 0) return e || (n.pending += n.src[i]), n.pos += 2, !0;
2864
2868
  if (t === 10) {
2865
2869
  for (e || n.push({
2866
2870
  type: "hardbreak",
@@ -2970,10 +2974,10 @@ function gs(n, e) {
2970
2974
  level: --n.level
2971
2975
  })), n.pos = n.posMax + 2, n.posMax = s, !0) : (n.pos = o, !1);
2972
2976
  }
2973
- function tn(n) {
2977
+ function nn(n) {
2974
2978
  return n >= 48 && n <= 57 || n >= 65 && n <= 90 || n >= 97 && n <= 122;
2975
2979
  }
2976
- function nn(n, e) {
2980
+ function rn(n, e) {
2977
2981
  var t = e,
2978
2982
  i,
2979
2983
  r,
@@ -2983,7 +2987,7 @@ function nn(n, e) {
2983
2987
  l = n.posMax,
2984
2988
  c = n.src.charCodeAt(e);
2985
2989
  for (i = e > 0 ? n.src.charCodeAt(e - 1) : -1; t < l && n.src.charCodeAt(t) === c;) t++;
2986
- return t >= l && (o = !1), s = t - e, s >= 4 ? o = a = !1 : (r = t < l ? n.src.charCodeAt(t) : -1, (r === 32 || r === 10) && (o = !1), (i === 32 || i === 10) && (a = !1), c === 95 && (tn(i) && (o = !1), tn(r) && (a = !1))), {
2990
+ return t >= l && (o = !1), s = t - e, s >= 4 ? o = a = !1 : (r = t < l ? n.src.charCodeAt(t) : -1, (r === 32 || r === 10) && (o = !1), (i === 32 || i === 10) && (a = !1), c === 95 && (nn(i) && (o = !1), nn(r) && (a = !1))), {
2987
2991
  can_open: o,
2988
2992
  can_close: a,
2989
2993
  delims: s
@@ -3001,11 +3005,11 @@ function bs(n, e) {
3001
3005
  d = n.pos,
3002
3006
  u = n.src.charCodeAt(d);
3003
3007
  if (u !== 95 && u !== 42 || e) return !1;
3004
- if (l = nn(n, d), t = l.delims, !l.can_open) return n.pos += t, e || (n.pending += n.src.slice(d, n.pos)), !0;
3008
+ if (l = rn(n, d), t = l.delims, !l.can_open) return n.pos += t, e || (n.pending += n.src.slice(d, n.pos)), !0;
3005
3009
  if (n.level >= n.options.maxNesting) return !1;
3006
3010
  for (n.pos = d + t, a = [t]; n.pos < c;) {
3007
3011
  if (n.src.charCodeAt(n.pos) === u) {
3008
- if (l = nn(n, n.pos), i = l.delims, l.can_close) {
3012
+ if (l = rn(n, n.pos), i = l.delims, l.can_close) {
3009
3013
  for (s = a.pop(), o = i; s !== o;) {
3010
3014
  if (o < s) {
3011
3015
  a.push(s - o);
@@ -3094,7 +3098,7 @@ function Ss(n, e) {
3094
3098
  p = n.posMax,
3095
3099
  h = n.pos,
3096
3100
  b = n.src.charCodeAt(h);
3097
- if (b === 33 && (d = !0, b = n.src.charCodeAt(++h)), b !== 91 || n.level >= n.options.maxNesting || (t = h + 1, i = Xe(n, h), i < 0)) return !1;
3101
+ if (b === 33 && (d = !0, b = n.src.charCodeAt(++h)), b !== 91 || n.level >= n.options.maxNesting || (t = h + 1, i = et(n, h), i < 0)) return !1;
3098
3102
  if (a = i + 1, a < p && n.src.charCodeAt(a) === 40) {
3099
3103
  for (a++; a < p && (c = n.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
3100
3104
  if (a >= p) return !1;
@@ -3105,7 +3109,7 @@ function Ss(n, e) {
3105
3109
  } else {
3106
3110
  if (n.linkLevel > 0) return !1;
3107
3111
  for (; a < p && (c = n.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
3108
- if (a < p && n.src.charCodeAt(a) === 91 && (h = a + 1, a = Xe(n, a), a >= 0 ? r = n.src.slice(h, a++) : a = h - 1), r || (_typeof(r) > "u" && (a = i + 1), r = n.src.slice(t, i)), l = n.env.references[On(r)], !l) return n.pos = u, !1;
3112
+ if (a < p && n.src.charCodeAt(a) === 91 && (h = a + 1, a = et(n, a), a >= 0 ? r = n.src.slice(h, a++) : a = h - 1), r || (_typeof(r) > "u" && (a = i + 1), r = n.src.slice(t, i)), l = n.env.references[On(r)], !l) return n.pos = u, !1;
3109
3113
  s = l.href, o = l.title;
3110
3114
  }
3111
3115
  return e || (n.pos = t, n.posMax = i, d ? n.push({
@@ -3131,7 +3135,7 @@ function ws(n, e) {
3131
3135
  s,
3132
3136
  o = n.posMax,
3133
3137
  a = n.pos;
3134
- return a + 2 >= o || n.src.charCodeAt(a) !== 94 || n.src.charCodeAt(a + 1) !== 91 || n.level >= n.options.maxNesting || (t = a + 2, i = Xe(n, a + 1), i < 0) ? !1 : (e || (n.env.footnotes || (n.env.footnotes = {}), n.env.footnotes.list || (n.env.footnotes.list = []), r = n.env.footnotes.list.length, n.pos = t, n.posMax = i, n.push({
3138
+ return a + 2 >= o || n.src.charCodeAt(a) !== 94 || n.src.charCodeAt(a + 1) !== 91 || n.level >= n.options.maxNesting || (t = a + 2, i = et(n, a + 1), i < 0) ? !1 : (e || (n.env.footnotes || (n.env.footnotes = {}), n.env.footnotes.list || (n.env.footnotes.list = []), r = n.env.footnotes.list.length, n.pos = t, n.posMax = i, n.push({
3135
3139
  type: "footnote_ref",
3136
3140
  id: r,
3137
3141
  level: n.level
@@ -3171,7 +3175,7 @@ function Cs(n, e) {
3171
3175
  s,
3172
3176
  o,
3173
3177
  a = n.pos;
3174
- return n.src.charCodeAt(a) !== 60 || (t = n.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Ts), i ? ks.indexOf(i[1].toLowerCase()) < 0 || (s = i[0].slice(1, -1), o = Ei(s), !n.parser.validateLink(s)) ? !1 : (e || (n.push({
3178
+ return n.src.charCodeAt(a) !== 60 || (t = n.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Ts), i ? ks.indexOf(i[1].toLowerCase()) < 0 || (s = i[0].slice(1, -1), o = Si(s), !n.parser.validateLink(s)) ? !1 : (e || (n.push({
3175
3179
  type: "link_open",
3176
3180
  href: o,
3177
3181
  level: n.level
@@ -3182,7 +3186,7 @@ function Cs(n, e) {
3182
3186
  }), n.push({
3183
3187
  type: "link_close",
3184
3188
  level: n.level
3185
- })), n.pos += i[0].length, !0) : (r = t.match(Ms), r ? (s = r[0].slice(1, -1), o = Ei("mailto:" + s), n.parser.validateLink(o) ? (e || (n.push({
3189
+ })), n.pos += i[0].length, !0) : (r = t.match(Ms), r ? (s = r[0].slice(1, -1), o = Si("mailto:" + s), n.parser.validateLink(o) ? (e || (n.push({
3186
3190
  type: "link_open",
3187
3191
  href: o,
3188
3192
  level: n.level
@@ -3195,7 +3199,7 @@ function Cs(n, e) {
3195
3199
  level: n.level
3196
3200
  })), n.pos += r[0].length, !0) : !1) : !1));
3197
3201
  }
3198
- function qt(n, e) {
3202
+ function Ht(n, e) {
3199
3203
  return n = n.source, e = e || "", function t(i, r) {
3200
3204
  return i ? (r = r.source || r, n = n.replace(i, r), t) : new RegExp(n, e);
3201
3205
  };
@@ -3204,15 +3208,15 @@ var As = /[a-zA-Z_:][a-zA-Z0-9:._-]*/,
3204
3208
  Is = /[^"'=<>`\x00-\x20]+/,
3205
3209
  Ls = /'[^']*'/,
3206
3210
  Rs = /"[^"]*"/,
3207
- Ns = qt(/(?:unquoted|single_quoted|double_quoted)/)("unquoted", Is)("single_quoted", Ls)("double_quoted", Rs)(),
3208
- Os = qt(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name", As)("attr_value", Ns)(),
3209
- Ps = qt(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute", Os)(),
3211
+ Ns = Ht(/(?:unquoted|single_quoted|double_quoted)/)("unquoted", Is)("single_quoted", Ls)("double_quoted", Rs)(),
3212
+ Os = Ht(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name", As)("attr_value", Ns)(),
3213
+ Ps = Ht(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute", Os)(),
3210
3214
  Ds = /<\/[A-Za-z][A-Za-z0-9]*\s*>/,
3211
3215
  js = /<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,
3212
3216
  zs = /<[?].*?[?]>/,
3213
3217
  Fs = /<![A-Z]+\s+[^>]*>/,
3214
3218
  Bs = /<!\[CDATA\[[\s\S]*?\]\]>/,
3215
- Us = qt(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag", Ps)("close_tag", Ds)("comment", js)("processing", zs)("declaration", Fs)("cdata", Bs)();
3219
+ Us = Ht(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag", Ps)("close_tag", Ds)("comment", js)("processing", zs)("declaration", Fs)("cdata", Bs)();
3216
3220
  function qs(n) {
3217
3221
  var e = n | 32;
3218
3222
  return e >= 97 && e <= 122;
@@ -3239,7 +3243,7 @@ function Ws(n, e) {
3239
3243
  if (n.src.charCodeAt(s) !== 38) return !1;
3240
3244
  if (s + 1 < o) {
3241
3245
  if (t = n.src.charCodeAt(s + 1), t === 35) {
3242
- if (r = n.src.slice(s).match(Gs), r) return e || (i = r[1][0].toLowerCase() === "x" ? parseInt(r[1].slice(1), 16) : parseInt(r[1], 10), n.pending += In(i) ? xi(i) : xi(65533)), n.pos += r[0].length, !0;
3246
+ if (r = n.src.slice(s).match(Gs), r) return e || (i = r[1][0].toLowerCase() === "x" ? parseInt(r[1].slice(1), 16) : parseInt(r[1], 10), n.pending += In(i) ? Ei(i) : Ei(65533)), n.pos += r[0].length, !0;
3243
3247
  } else if (r = n.src.slice(s).match(Vs), r) {
3244
3248
  var a = Cn(r[1]);
3245
3249
  if (r[1] !== a) return e || (n.pending += a), n.pos += r[0].length, !0;
@@ -3247,13 +3251,13 @@ function Ws(n, e) {
3247
3251
  }
3248
3252
  return e || (n.pending += "&"), n.pos++, !0;
3249
3253
  }
3250
- var hi = [["text", ds], ["newline", us], ["escape", hs], ["backticks", ps], ["del", fs], ["ins", ms], ["mark", gs], ["emphasis", bs], ["sub", ys], ["sup", Es], ["links", Ss], ["footnote_inline", ws], ["footnote_ref", _s], ["autolink", Cs], ["htmltag", Hs], ["entity", Ws]];
3251
- function Ht() {
3254
+ var pi = [["text", ds], ["newline", us], ["escape", hs], ["backticks", ps], ["del", fs], ["ins", ms], ["mark", gs], ["emphasis", bs], ["sub", ys], ["sup", Es], ["links", Ss], ["footnote_inline", ws], ["footnote_ref", _s], ["autolink", Cs], ["htmltag", Hs], ["entity", Ws]];
3255
+ function Gt() {
3252
3256
  this.ruler = new q();
3253
- for (var n = 0; n < hi.length; n++) this.ruler.push(hi[n][0], hi[n][1]);
3257
+ for (var n = 0; n < pi.length; n++) this.ruler.push(pi[n][0], pi[n][1]);
3254
3258
  this.validateLink = Ks;
3255
3259
  }
3256
- Ht.prototype.skipToken = function (n) {
3260
+ Gt.prototype.skipToken = function (n) {
3257
3261
  var e = this.ruler.getRules(""),
3258
3262
  t = e.length,
3259
3263
  i = n.pos,
@@ -3269,7 +3273,7 @@ Ht.prototype.skipToken = function (n) {
3269
3273
  }
3270
3274
  n.pos++, n.cacheSet(i, n.pos);
3271
3275
  };
3272
- Ht.prototype.tokenize = function (n) {
3276
+ Gt.prototype.tokenize = function (n) {
3273
3277
  for (var e = this.ruler.getRules(""), t = e.length, i = n.posMax, r, s; n.pos < i;) {
3274
3278
  for (s = 0; s < t && (r = e[s](n, !1), !r); s++);
3275
3279
  if (r) {
@@ -3280,14 +3284,14 @@ Ht.prototype.tokenize = function (n) {
3280
3284
  }
3281
3285
  n.pending && n.pushPending();
3282
3286
  };
3283
- Ht.prototype.parse = function (n, e, t, i) {
3284
- var r = new Ee(n, this, e, t, i);
3287
+ Gt.prototype.parse = function (n, e, t, i) {
3288
+ var r = new Se(n, this, e, t, i);
3285
3289
  this.tokenize(r);
3286
3290
  };
3287
3291
  function Ks(n) {
3288
3292
  var e = ["vbscript", "javascript", "file", "data"],
3289
3293
  t = n.trim().toLowerCase();
3290
- return t = ye(t), !(t.indexOf(":") !== -1 && e.indexOf(t.split(":")[0]) !== -1);
3294
+ return t = xe(t), !(t.indexOf(":") !== -1 && e.indexOf(t.split(":")[0]) !== -1);
3291
3295
  }
3292
3296
  var Js = {
3293
3297
  options: {
@@ -3410,7 +3414,7 @@ function jn(n, e, t) {
3410
3414
  this.src = e, this.env = t, this.options = n.options, this.tokens = [], this.inlineMode = !1, this.inline = n.inline, this.block = n.block, this.renderer = n.renderer, this.typographer = n.typographer;
3411
3415
  }
3412
3416
  function ne(n, e) {
3413
- typeof n != "string" && (e = n, n = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new Ht(), this.block = new Li(), this.core = new Pn(), this.renderer = new Ii(), this.ruler = new q(), this.options = {}, this.configure(Zs[n]), this.set(e || {});
3417
+ typeof n != "string" && (e = n, n = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new Gt(), this.block = new Ri(), this.core = new Pn(), this.renderer = new Li(), this.ruler = new q(), this.options = {}, this.configure(Zs[n]), this.set(e || {});
3414
3418
  }
3415
3419
  ne.prototype.set = function (n) {
3416
3420
  An(this.options, n);
@@ -3439,11 +3443,11 @@ ne.prototype.parseInline = function (n, e) {
3439
3443
  ne.prototype.renderInline = function (n, e) {
3440
3444
  return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
3441
3445
  };
3442
- var Si = /*#__PURE__*/function () {
3443
- function Si() {
3444
- _classCallCheck(this, Si);
3446
+ var wi = /*#__PURE__*/function () {
3447
+ function wi() {
3448
+ _classCallCheck(this, wi);
3445
3449
  }
3446
- _createClass(Si, null, [{
3450
+ _createClass(wi, null, [{
3447
3451
  key: "createNew",
3448
3452
  value: function createNew() {
3449
3453
  var e = window.hljs;
@@ -3482,7 +3486,7 @@ var Si = /*#__PURE__*/function () {
3482
3486
  });
3483
3487
  }
3484
3488
  }]);
3485
- return Si;
3489
+ return wi;
3486
3490
  }();
3487
3491
  var M = /*#__PURE__*/function () {
3488
3492
  function M() {
@@ -3585,20 +3589,20 @@ var M = /*#__PURE__*/function () {
3585
3589
  key: "set",
3586
3590
  value: function set(e, t, i) {
3587
3591
  M.populateDefaultFileIO(i == null ? void 0 : i.audio, ".4a,.mp3,.webm,.mp4,.mpga,.wav,.mpeg,.m4a"), M.populateDefaultFileIO(i == null ? void 0 : i.images, ".png,.jpg");
3588
- var r = Si.createNew();
3592
+ var r = wi.createNew();
3589
3593
  M.processImagesConfig(t, r, e.images, i == null ? void 0 : i.images), M.processCamera(t, r, e.camera, e.images), M.processGifConfig(t, r, e.gifs, i == null ? void 0 : i.gifs), M.processAudioConfig(t, r, e.audio, i == null ? void 0 : i.audio), M.processMicrophone(t, r, e.microphone, e.audio), M.processMixedFiles(t, r, e.mixedFiles);
3590
3594
  }
3591
3595
  }]);
3592
3596
  return M;
3593
3597
  }();
3594
- var Fe = /*#__PURE__*/function () {
3595
- function Fe(e, t, i) {
3598
+ var Be = /*#__PURE__*/function () {
3599
+ function Be(e, t, i) {
3596
3600
  var _a$url;
3597
- _classCallCheck(this, Fe);
3601
+ _classCallCheck(this, Be);
3598
3602
  var r, s, o, a;
3599
- this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Fe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (r = e.request) == null ? void 0 : r.additionalBodyProps), this.totalMessagesMaxCharLength = (s = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : s.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, M.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 = de.URL), this._directServiceRequiresFiles = !!t && Object.keys(t).length > 0, this.requestSettings.websocket && K.setup(this);
3603
+ this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Be.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (r = e.request) == null ? void 0 : r.additionalBodyProps), this.totalMessagesMaxCharLength = (s = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : s.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, M.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 = de.URL), this._directServiceRequiresFiles = !!t && Object.keys(t).length > 0, this.requestSettings.websocket && K.setup(this);
3600
3604
  }
3601
- _createClass(Fe, [{
3605
+ _createClass(Be, [{
3602
3606
  key: "verifyKey",
3603
3607
  value: function verifyKey(e, t) {}
3604
3608
  }, {
@@ -3673,7 +3677,7 @@ var Fe = /*#__PURE__*/function () {
3673
3677
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
3674
3678
  while (1) switch (_context18.prev = _context18.next) {
3675
3679
  case 0:
3676
- s = Fe.createCustomFormDataBody(e, i, r), o = this.requestSettings, a = this.getServiceIOByType(r[0]);
3680
+ s = Be.createCustomFormDataBody(e, i, r), o = this.requestSettings, a = this.getServiceIOByType(r[0]);
3677
3681
  this.requestSettings = (a == null ? void 0 : a.request) || this.requestSettings;
3678
3682
  _context18.next = 4;
3679
3683
  return this.request(s, t, !1);
@@ -3704,7 +3708,7 @@ var Fe = /*#__PURE__*/function () {
3704
3708
  }
3705
3709
  throw new Error("Request settings have not been set up");
3706
3710
  case 2:
3707
- i = Ze.processMessages(t.messages, this.maxMessages, this.totalMessagesMaxCharLength);
3711
+ i = Qe.processMessages(t.messages, this.maxMessages, this.totalMessagesMaxCharLength);
3708
3712
  if (this.requestSettings.websocket) {
3709
3713
  r = _objectSpread({
3710
3714
  messages: i
@@ -3736,7 +3740,7 @@ var Fe = /*#__PURE__*/function () {
3736
3740
  }
3737
3741
  throw e.error;
3738
3742
  case 2:
3739
- return _context20.abrupt("return", e.result ? Ut.handleResponseProperty(e) : e);
3743
+ return _context20.abrupt("return", e.result ? qt.handleResponseProperty(e) : e);
3740
3744
  case 3:
3741
3745
  case "end":
3742
3746
  return _context20.stop();
@@ -3775,10 +3779,10 @@ var Fe = /*#__PURE__*/function () {
3775
3779
  return o.text && (delete o.files, r.append("message".concat(s += 1), JSON.stringify(o))), r;
3776
3780
  }
3777
3781
  }]);
3778
- return Fe;
3782
+ return Be;
3779
3783
  }();
3780
- var U = /*#__PURE__*/function (_Fe) {
3781
- _inherits(U, _Fe);
3784
+ var U = /*#__PURE__*/function (_Be) {
3785
+ _inherits(U, _Be);
3782
3786
  var _super = _createSuper(U);
3783
3787
  // prettier-ignore
3784
3788
  function U(e, t, i, r, s) {
@@ -3824,40 +3828,40 @@ var U = /*#__PURE__*/function (_Fe) {
3824
3828
  }
3825
3829
  }]);
3826
3830
  return U;
3827
- }(Fe);
3828
- var St = /*#__PURE__*/function () {
3829
- function St() {
3830
- _classCallCheck(this, St);
3831
+ }(Be);
3832
+ var wt = /*#__PURE__*/function () {
3833
+ function wt() {
3834
+ _classCallCheck(this, wt);
3831
3835
  }
3832
- _createClass(St, null, [{
3836
+ _createClass(wt, null, [{
3833
3837
  key: "waitForPropertiesToBeUpdatedBeforeRender",
3834
3838
  value: function waitForPropertiesToBeUpdatedBeforeRender(e) {
3835
3839
  e._propUpdated_ = !1, setTimeout(function () {
3836
- e._propUpdated_ ? St.waitForPropertiesToBeUpdatedBeforeRender(e) : (e._waitingToRender_ = !1, e.onRender());
3840
+ e._propUpdated_ ? wt.waitForPropertiesToBeUpdatedBeforeRender(e) : (e._waitingToRender_ = !1, e.onRender());
3837
3841
  });
3838
3842
  }
3839
3843
  }, {
3840
3844
  key: "attemptRender",
3841
3845
  value: function attemptRender(e) {
3842
- e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0, St.waitForPropertiesToBeUpdatedBeforeRender(e));
3846
+ e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0, wt.waitForPropertiesToBeUpdatedBeforeRender(e));
3843
3847
  }
3844
3848
  }]);
3845
- return St;
3849
+ return wt;
3846
3850
  }();
3847
- var Ni = /*#__PURE__*/function (_HTMLElement) {
3848
- _inherits(Le, _HTMLElement);
3849
- var _super2 = _createSuper(Le);
3851
+ var Oi = /*#__PURE__*/function (_HTMLElement) {
3852
+ _inherits(Re, _HTMLElement);
3853
+ var _super2 = _createSuper(Re);
3850
3854
  // If this is not working, try using propertyName directly
3851
- function Le() {
3855
+ function Re() {
3852
3856
  var _this4;
3853
- _classCallCheck(this, Le);
3854
- _this4 = _super2.call(this), _this4._waitingToRender_ = !1, _this4._propUpdated_ = !1, Object.keys(Le._attributeToProperty_).forEach(function (e) {
3855
- var t = Le._attributeToProperty_[e];
3857
+ _classCallCheck(this, Re);
3858
+ _this4 = _super2.call(this), _this4._waitingToRender_ = !1, _this4._propUpdated_ = !1, Object.keys(Re._attributeToProperty_).forEach(function (e) {
3859
+ var t = Re._attributeToProperty_[e];
3856
3860
  _this4.constructPropertyAccessors(t), _this4.hasOwnProperty(e) || _this4.constructPropertyAccessors(t, e);
3857
3861
  });
3858
3862
  return _this4;
3859
3863
  }
3860
- _createClass(Le, [{
3864
+ _createClass(Re, [{
3861
3865
  key: "constructPropertyAccessors",
3862
3866
  value:
3863
3867
  // need to be called here as accessors need to be set for the class instance
@@ -3868,7 +3872,7 @@ var Ni = /*#__PURE__*/function (_HTMLElement) {
3868
3872
  return i;
3869
3873
  },
3870
3874
  set: function set(o) {
3871
- i = o, t ? this[e] = o : St.attemptRender(this);
3875
+ i = o, t ? this[e] = o : wt.attemptRender(this);
3872
3876
  }
3873
3877
  });
3874
3878
  }
@@ -3876,8 +3880,8 @@ var Ni = /*#__PURE__*/function (_HTMLElement) {
3876
3880
  key: "attributeChangedCallback",
3877
3881
  value: function attributeChangedCallback(e, t, i) {
3878
3882
  if (t === i) return;
3879
- var r = Le._attributes_[e](i),
3880
- s = Le._attributeToProperty_[e];
3883
+ var r = Re._attributes_[e](i),
3884
+ s = Re._attributeToProperty_[e];
3881
3885
  this[s] = r;
3882
3886
  }
3883
3887
  }, {
@@ -3886,14 +3890,14 @@ var Ni = /*#__PURE__*/function (_HTMLElement) {
3886
3890
  }], [{
3887
3891
  key: "observedAttributes",
3888
3892
  get: function get() {
3889
- return Object.keys(Le._attributes_) || [];
3893
+ return Object.keys(Re._attributes_) || [];
3890
3894
  }
3891
3895
  }]);
3892
- return Le;
3896
+ return Re;
3893
3897
  }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
3894
- Ni._attributes_ = {};
3895
- Ni._attributeToProperty_ = {};
3896
- var Qs = Ni;
3898
+ Oi._attributes_ = {};
3899
+ Oi._attributeToProperty_ = {};
3900
+ var Qs = Oi;
3897
3901
  var Xs = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n",
3898
3902
  eo = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n";
3899
3903
  var B = /*#__PURE__*/function () {
@@ -3909,15 +3913,15 @@ var B = /*#__PURE__*/function () {
3909
3913
  return B;
3910
3914
  }();
3911
3915
  var zn = /*#__PURE__*/function () {
3912
- function Re() {
3913
- _classCallCheck(this, Re);
3916
+ function Ne() {
3917
+ _classCallCheck(this, Ne);
3914
3918
  }
3915
- _createClass(Re, null, [{
3919
+ _createClass(Ne, null, [{
3916
3920
  key: "changeVisibility",
3917
3921
  value:
3918
3922
  // prettier-ignore
3919
3923
  function changeVisibility(e, t, i, r) {
3920
- r.target.id === Re.VISIBLE_ICON_ID ? (t.style.display = "none", i.style.display = "block", e.type = "password") : (t.style.display = "block", i.style.display = "none", e.type = "text");
3924
+ r.target.id === Ne.VISIBLE_ICON_ID ? (t.style.display = "none", i.style.display = "block", e.type = "password") : (t.style.display = "block", i.style.display = "none", e.type = "text");
3921
3925
  }
3922
3926
  }, {
3923
3927
  key: "createIconElement",
@@ -3931,13 +3935,13 @@ var zn = /*#__PURE__*/function () {
3931
3935
  value: function create(e) {
3932
3936
  var t = document.createElement("div");
3933
3937
  t.id = "visibility-icon-container";
3934
- var i = Re.createIconElement(eo, Re.VISIBLE_ICON_ID);
3938
+ var i = Ne.createIconElement(eo, Ne.VISIBLE_ICON_ID);
3935
3939
  i.style.display = "none", t.appendChild(i);
3936
- var r = Re.createIconElement(Xs, "not-visible-icon");
3937
- return t.appendChild(r), t.onclick = Re.changeVisibility.bind(this, e, i, r), t;
3940
+ var r = Ne.createIconElement(Xs, "not-visible-icon");
3941
+ return t.appendChild(r), t.onclick = Ne.changeVisibility.bind(this, e, i, r), t;
3938
3942
  }
3939
3943
  }]);
3940
- return Re;
3944
+ return Ne;
3941
3945
  }();
3942
3946
  zn.VISIBLE_ICON_ID = "visible-icon";
3943
3947
  var to = zn;
@@ -4069,11 +4073,11 @@ var I = /*#__PURE__*/function () {
4069
4073
  }]);
4070
4074
  return I;
4071
4075
  }();
4072
- var wt = /*#__PURE__*/function () {
4073
- function wt() {
4074
- _classCallCheck(this, wt);
4076
+ var _t = /*#__PURE__*/function () {
4077
+ function _t() {
4078
+ _classCallCheck(this, _t);
4075
4079
  }
4076
- _createClass(wt, null, [{
4080
+ _createClass(_t, null, [{
4077
4081
  key: "buildHeaders",
4078
4082
  value: function buildHeaders(e) {
4079
4083
  return {
@@ -4095,24 +4099,24 @@ var wt = /*#__PURE__*/function () {
4095
4099
  return {
4096
4100
  url: "https://api-inference.huggingface.co/models/gpt2",
4097
4101
  method: "POST",
4098
- handleVerificationResult: wt.handleVerificationResult
4102
+ handleVerificationResult: _t.handleVerificationResult
4099
4103
  };
4100
4104
  }
4101
4105
  }]);
4102
- return wt;
4106
+ return _t;
4103
4107
  }();
4104
4108
  var Fn = /*#__PURE__*/function (_U) {
4105
- _inherits(wi, _U);
4106
- var _super3 = _createSuper(wi);
4109
+ _inherits(_i, _U);
4110
+ var _super3 = _createSuper(_i);
4107
4111
  // prettier-ignore
4108
- function wi(e, t, i, r, s, o) {
4112
+ function _i(e, t, i, r, s, o) {
4109
4113
  var _this5;
4110
- _classCallCheck(this, wi);
4111
- _this5 = _super3.call(this, e, wt.buildKeyVerificationDetails(), wt.buildHeaders, s, o), _this5.insertKeyPlaceholderText = "Hugging Face Token", _this5.getKeyLink = "https://huggingface.co/settings/tokens", _this5.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this5.permittedErrorPrefixes = ["Authorization header"], _this5.url = "".concat(wi.URL_PREFIX).concat(i), _this5.textInputPlaceholderText = t, _typeof(r) == "object" && (r.model && (_this5.url = "".concat(wi.URL_PREFIX).concat(r.model)), r.options && (_this5.rawBody.options = r.options), r.parameters && (_this5.rawBody.parameters = r.parameters));
4114
+ _classCallCheck(this, _i);
4115
+ _this5 = _super3.call(this, e, _t.buildKeyVerificationDetails(), _t.buildHeaders, s, o), _this5.insertKeyPlaceholderText = "Hugging Face Token", _this5.getKeyLink = "https://huggingface.co/settings/tokens", _this5.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this5.permittedErrorPrefixes = ["Authorization header"], _this5.url = "".concat(_i.URL_PREFIX).concat(i), _this5.textInputPlaceholderText = t, _typeof(r) == "object" && (r.model && (_this5.url = "".concat(_i.URL_PREFIX).concat(r.model)), r.options && (_this5.rawBody.options = r.options), r.parameters && (_this5.rawBody.parameters = r.parameters));
4112
4116
  return _this5;
4113
4117
  }
4114
4118
  // prettier-ignore
4115
- _createClass(wi, [{
4119
+ _createClass(_i, [{
4116
4120
  key: "preprocessBody",
4117
4121
  value: function preprocessBody(e, t, i) {
4118
4122
  var _r$options;
@@ -4150,21 +4154,21 @@ var Fn = /*#__PURE__*/function (_U) {
4150
4154
  return callServiceAPI;
4151
4155
  }()
4152
4156
  }]);
4153
- return wi;
4157
+ return _i;
4154
4158
  }(U);
4155
4159
  Fn.URL_PREFIX = "https://api-inference.huggingface.co/models/";
4156
- var we = Fn;
4157
- var nt = /*#__PURE__*/function (_we) {
4158
- _inherits(nt, _we);
4159
- var _super4 = _createSuper(nt);
4160
+ var _e = Fn;
4161
+ var rt = /*#__PURE__*/function (_e2) {
4162
+ _inherits(rt, _e2);
4163
+ var _super4 = _createSuper(rt);
4160
4164
  // prettier-ignore
4161
- function nt(e, t, i, r, s, o) {
4165
+ function rt(e, t, i, r, s, o) {
4162
4166
  var _this6;
4163
- _classCallCheck(this, nt);
4164
- _this6 = _super4.call(this, e, t, i, r, s, o), _this6.isTextInputDisabled = !0, _this6.canSendMessage = nt.canSendFile;
4167
+ _classCallCheck(this, rt);
4168
+ _this6 = _super4.call(this, e, t, i, r, s, o), _this6.isTextInputDisabled = !0, _this6.canSendMessage = rt.canSendFile;
4165
4169
  return _this6;
4166
4170
  }
4167
- _createClass(nt, [{
4171
+ _createClass(rt, [{
4168
4172
  key: "preprocessBody",
4169
4173
  value: function preprocessBody(e, t, i) {
4170
4174
  return i[0];
@@ -4207,10 +4211,10 @@ var nt = /*#__PURE__*/function (_we) {
4207
4211
  return !!(t != null && t[0]);
4208
4212
  }
4209
4213
  }]);
4210
- return nt;
4211
- }(we);
4212
- var io = /*#__PURE__*/function (_nt) {
4213
- _inherits(io, _nt);
4214
+ return rt;
4215
+ }(_e);
4216
+ var io = /*#__PURE__*/function (_rt) {
4217
+ _inherits(io, _rt);
4214
4218
  var _super5 = _createSuper(io);
4215
4219
  // prettier-ignore
4216
4220
  function io(e) {
@@ -4260,9 +4264,9 @@ var io = /*#__PURE__*/function (_nt) {
4260
4264
  }()
4261
4265
  }]);
4262
4266
  return io;
4263
- }(nt);
4264
- var no = /*#__PURE__*/function (_nt2) {
4265
- _inherits(no, _nt2);
4267
+ }(rt);
4268
+ var no = /*#__PURE__*/function (_rt2) {
4269
+ _inherits(no, _rt2);
4266
4270
  var _super6 = _createSuper(no);
4267
4271
  function no(e) {
4268
4272
  _classCallCheck(this, no);
@@ -4311,8 +4315,8 @@ var no = /*#__PURE__*/function (_nt2) {
4311
4315
  }()
4312
4316
  }]);
4313
4317
  return no;
4314
- }(nt);
4315
- var rt = "data:image/png;base64,";
4318
+ }(rt);
4319
+ var st = "data:image/png;base64,";
4316
4320
  var X = /*#__PURE__*/function () {
4317
4321
  function X() {
4318
4322
  _classCallCheck(this, X);
@@ -4343,24 +4347,24 @@ var X = /*#__PURE__*/function () {
4343
4347
  }]);
4344
4348
  return X;
4345
4349
  }();
4346
- var Gt = /*#__PURE__*/function (_U2) {
4347
- _inherits(Gt, _U2);
4348
- var _super7 = _createSuper(Gt);
4350
+ var Vt = /*#__PURE__*/function (_U2) {
4351
+ _inherits(Vt, _U2);
4352
+ var _super7 = _createSuper(Vt);
4349
4353
  // prettier-ignore
4350
- function Gt(e, t, i, r, s) {
4354
+ function Vt(e, t, i, r, s) {
4351
4355
  var _this7;
4352
- _classCallCheck(this, Gt);
4356
+ _classCallCheck(this, Vt);
4353
4357
  _this7 = _super7.call(this, e, t, i, r, s), _this7.insertKeyPlaceholderText = "Stability AI API Key", _this7.getKeyLink = "https://platform.stability.ai/docs/getting-started/authentication", _this7.permittedErrorPrefixes = ["Incorrect", "invalid_"];
4354
4358
  return _this7;
4355
4359
  }
4356
- return _createClass(Gt);
4360
+ return _createClass(Vt);
4357
4361
  }(U);
4358
- var _t = /*#__PURE__*/function (_Gt) {
4359
- _inherits(_t, _Gt);
4360
- var _super8 = _createSuper(_t);
4361
- function _t(e) {
4362
+ var kt = /*#__PURE__*/function (_Vt) {
4363
+ _inherits(kt, _Vt);
4364
+ var _super8 = _createSuper(kt);
4365
+ function kt(e) {
4362
4366
  var _this8;
4363
- _classCallCheck(this, _t);
4367
+ _classCallCheck(this, kt);
4364
4368
  var o;
4365
4369
  var t = JSON.parse(JSON.stringify(e.directConnection)),
4366
4370
  i = t == null ? void 0 : t.stabilityAI,
@@ -4374,10 +4378,10 @@ var _t = /*#__PURE__*/function (_Gt) {
4374
4378
  };
4375
4379
  _this8 = _super8.call(this, e, X.buildKeyVerificationDetails(), X.buildHeaders, i, r), _this8.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this8.textInputPlaceholderText = "Describe image changes", _this8.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
4376
4380
  var s = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
4377
- _typeof(s) == "object" && (s.engine_id && (_this8.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/image-to-image/upscale")), _t.cleanConfig(s), Object.assign(_this8.rawBody, s)), _this8.canSendMessage = _t.canSendFileMessage;
4381
+ _typeof(s) == "object" && (s.engine_id && (_this8.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/image-to-image/upscale")), kt.cleanConfig(s), Object.assign(_this8.rawBody, s)), _this8.canSendMessage = kt.canSendFileMessage;
4378
4382
  return _this8;
4379
4383
  }
4380
- _createClass(_t, [{
4384
+ _createClass(kt, [{
4381
4385
  key: "createFormDataBody",
4382
4386
  value: function createFormDataBody(e, t) {
4383
4387
  var i = new FormData();
@@ -4435,7 +4439,7 @@ var _t = /*#__PURE__*/function (_Gt) {
4435
4439
  return _context26.abrupt("return", {
4436
4440
  files: e.artifacts.map(function (i) {
4437
4441
  return {
4438
- src: "".concat(rt).concat(i.base64),
4442
+ src: "".concat(st).concat(i.base64),
4439
4443
  type: "image"
4440
4444
  };
4441
4445
  })
@@ -4462,14 +4466,14 @@ var _t = /*#__PURE__*/function (_Gt) {
4462
4466
  return !!(t != null && t[0]);
4463
4467
  }
4464
4468
  }]);
4465
- return _t;
4466
- }(Gt);
4467
- var kt = /*#__PURE__*/function (_Gt2) {
4468
- _inherits(kt, _Gt2);
4469
- var _super9 = _createSuper(kt);
4470
- function kt(e) {
4469
+ return kt;
4470
+ }(Vt);
4471
+ var Mt = /*#__PURE__*/function (_Vt2) {
4472
+ _inherits(Mt, _Vt2);
4473
+ var _super9 = _createSuper(Mt);
4474
+ function Mt(e) {
4471
4475
  var _this9;
4472
- _classCallCheck(this, kt);
4476
+ _classCallCheck(this, Mt);
4473
4477
  var o;
4474
4478
  var t = JSON.parse(JSON.stringify(e.directConnection)),
4475
4479
  i = t == null ? void 0 : t.stabilityAI,
@@ -4483,10 +4487,10 @@ var kt = /*#__PURE__*/function (_Gt2) {
4483
4487
  };
4484
4488
  _this9 = _super9.call(this, e, X.buildKeyVerificationDetails(), X.buildHeaders, i, r), _this9.url = "https://api.stability.ai/v1/generation/stable-inpainting-512-v2-0/image-to-image/masking", _this9._maskSource = "MASK_IMAGE_WHITE", _this9.textInputPlaceholderText = "Describe image changes", _this9.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
4485
4489
  var s = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
4486
- _typeof(s) == "object" && (s.engine_id && (_this9.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/image-to-image/masking")), s.weight !== void 0 && s.weight !== null && (_this9._imageWeight = s.weight), s.mask_source !== void 0 && s.mask_source !== null && (_this9._maskSource = s.mask_source), kt.cleanConfig(s), Object.assign(_this9.rawBody, s)), _this9.canSendMessage = kt.canSendFileTextMessage;
4490
+ _typeof(s) == "object" && (s.engine_id && (_this9.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/image-to-image/masking")), s.weight !== void 0 && s.weight !== null && (_this9._imageWeight = s.weight), s.mask_source !== void 0 && s.mask_source !== null && (_this9._maskSource = s.mask_source), Mt.cleanConfig(s), Object.assign(_this9.rawBody, s)), _this9.canSendMessage = Mt.canSendFileTextMessage;
4487
4491
  return _this9;
4488
4492
  }
4489
- _createClass(kt, [{
4493
+ _createClass(Mt, [{
4490
4494
  key: "createFormDataBody",
4491
4495
  value: function createFormDataBody(e, t, i, r) {
4492
4496
  var s = new FormData();
@@ -4544,7 +4548,7 @@ var kt = /*#__PURE__*/function (_Gt2) {
4544
4548
  return _context28.abrupt("return", {
4545
4549
  files: e.artifacts.map(function (i) {
4546
4550
  return {
4547
- src: "".concat(rt).concat(i.base64),
4551
+ src: "".concat(st).concat(i.base64),
4548
4552
  type: "image"
4549
4553
  };
4550
4554
  })
@@ -4571,10 +4575,10 @@ var kt = /*#__PURE__*/function (_Gt2) {
4571
4575
  return !!(t != null && t[0]) && !!(e && e.trim() !== "");
4572
4576
  }
4573
4577
  }]);
4574
- return kt;
4575
- }(Gt);
4576
- var ro = /*#__PURE__*/function (_nt3) {
4577
- _inherits(ro, _nt3);
4578
+ return Mt;
4579
+ }(Vt);
4580
+ var ro = /*#__PURE__*/function (_rt3) {
4581
+ _inherits(ro, _rt3);
4578
4582
  var _super10 = _createSuper(ro);
4579
4583
  function ro(e) {
4580
4584
  _classCallCheck(this, ro);
@@ -4622,9 +4626,9 @@ var ro = /*#__PURE__*/function (_nt3) {
4622
4626
  }()
4623
4627
  }]);
4624
4628
  return ro;
4625
- }(nt);
4626
- var so = /*#__PURE__*/function (_we2) {
4627
- _inherits(so, _we2);
4629
+ }(rt);
4630
+ var so = /*#__PURE__*/function (_e3) {
4631
+ _inherits(so, _e3);
4628
4632
  var _super11 = _createSuper(so);
4629
4633
  function so(e) {
4630
4634
  _classCallCheck(this, so);
@@ -4662,9 +4666,9 @@ var so = /*#__PURE__*/function (_we2) {
4662
4666
  }()
4663
4667
  }]);
4664
4668
  return so;
4665
- }(we);
4666
- var oo = /*#__PURE__*/function (_we3) {
4667
- _inherits(oo, _we3);
4669
+ }(_e);
4670
+ var oo = /*#__PURE__*/function (_e4) {
4671
+ _inherits(oo, _e4);
4668
4672
  var _super12 = _createSuper(oo);
4669
4673
  function oo(e) {
4670
4674
  var _this10;
@@ -4718,9 +4722,9 @@ var oo = /*#__PURE__*/function (_we3) {
4718
4722
  }()
4719
4723
  }]);
4720
4724
  return oo;
4721
- }(we);
4722
- var ao = /*#__PURE__*/function (_we4) {
4723
- _inherits(ao, _we4);
4725
+ }(_e);
4726
+ var ao = /*#__PURE__*/function (_e5) {
4727
+ _inherits(ao, _e5);
4724
4728
  var _super13 = _createSuper(ao);
4725
4729
  function ao(e) {
4726
4730
  _classCallCheck(this, ao);
@@ -4758,9 +4762,9 @@ var ao = /*#__PURE__*/function (_we4) {
4758
4762
  }()
4759
4763
  }]);
4760
4764
  return ao;
4761
- }(we);
4762
- var lo = /*#__PURE__*/function (_we5) {
4763
- _inherits(lo, _we5);
4765
+ }(_e);
4766
+ var lo = /*#__PURE__*/function (_e6) {
4767
+ _inherits(lo, _e6);
4764
4768
  var _super14 = _createSuper(lo);
4765
4769
  function lo(e) {
4766
4770
  var _this11$maxMessages;
@@ -4842,13 +4846,13 @@ var lo = /*#__PURE__*/function (_we5) {
4842
4846
  }()
4843
4847
  }]);
4844
4848
  return lo;
4845
- }(we);
4846
- var Mt = /*#__PURE__*/function (_Gt3) {
4847
- _inherits(Mt, _Gt3);
4848
- var _super15 = _createSuper(Mt);
4849
- function Mt(e) {
4849
+ }(_e);
4850
+ var Tt = /*#__PURE__*/function (_Vt3) {
4851
+ _inherits(Tt, _Vt3);
4852
+ var _super15 = _createSuper(Tt);
4853
+ function Tt(e) {
4850
4854
  var _this12;
4851
- _classCallCheck(this, Mt);
4855
+ _classCallCheck(this, Tt);
4852
4856
  var o;
4853
4857
  var t = JSON.parse(JSON.stringify(e.directConnection)),
4854
4858
  i = t.stabilityAI,
@@ -4862,10 +4866,10 @@ var Mt = /*#__PURE__*/function (_Gt3) {
4862
4866
  };
4863
4867
  _this12 = _super15.call(this, e, X.buildKeyVerificationDetails(), X.buildHeaders, i, r), _this12.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-5/image-to-image", _this12.textInputPlaceholderText = "Describe image changes", _this12.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
4864
4868
  var s = (o = t.stabilityAI) == null ? void 0 : o.imageToImage;
4865
- _typeof(s) == "object" && (s.engine_id && (_this12.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/text-to-image")), s.weight !== void 0 && s.weight !== null && (_this12._imageWeight = s.weight), Mt.cleanConfig(s), Object.assign(_this12.rawBody, s)), _this12.canSendMessage = Mt.canSendFileTextMessage;
4869
+ _typeof(s) == "object" && (s.engine_id && (_this12.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/text-to-image")), s.weight !== void 0 && s.weight !== null && (_this12._imageWeight = s.weight), Tt.cleanConfig(s), Object.assign(_this12.rawBody, s)), _this12.canSendMessage = Tt.canSendFileTextMessage;
4866
4870
  return _this12;
4867
4871
  }
4868
- _createClass(Mt, [{
4872
+ _createClass(Tt, [{
4869
4873
  key: "createFormDataBody",
4870
4874
  value: function createFormDataBody(e, t, i) {
4871
4875
  var r = new FormData();
@@ -4923,7 +4927,7 @@ var Mt = /*#__PURE__*/function (_Gt3) {
4923
4927
  return _context35.abrupt("return", {
4924
4928
  files: e.artifacts.map(function (i) {
4925
4929
  return {
4926
- src: "".concat(rt).concat(i.base64),
4930
+ src: "".concat(st).concat(i.base64),
4927
4931
  type: "image"
4928
4932
  };
4929
4933
  })
@@ -4950,10 +4954,10 @@ var Mt = /*#__PURE__*/function (_Gt3) {
4950
4954
  return !!(t != null && t[0]) && !!(e && e.trim() !== "");
4951
4955
  }
4952
4956
  }]);
4953
- return Mt;
4954
- }(Gt);
4955
- var co = /*#__PURE__*/function (_we6) {
4956
- _inherits(co, _we6);
4957
+ return Tt;
4958
+ }(Vt);
4959
+ var co = /*#__PURE__*/function (_e7) {
4960
+ _inherits(co, _e7);
4957
4961
  var _super16 = _createSuper(co);
4958
4962
  function co(e) {
4959
4963
  _classCallCheck(this, co);
@@ -4991,22 +4995,22 @@ var co = /*#__PURE__*/function (_we6) {
4991
4995
  }()
4992
4996
  }]);
4993
4997
  return co;
4994
- }(we);
4995
- var Tt = /*#__PURE__*/function (_Gt4) {
4996
- _inherits(Tt, _Gt4);
4997
- var _super17 = _createSuper(Tt);
4998
- function Tt(e) {
4998
+ }(_e);
4999
+ var Ct = /*#__PURE__*/function (_Vt4) {
5000
+ _inherits(Ct, _Vt4);
5001
+ var _super17 = _createSuper(Ct);
5002
+ function Ct(e) {
4999
5003
  var _this13;
5000
- _classCallCheck(this, Tt);
5004
+ _classCallCheck(this, Ct);
5001
5005
  var s;
5002
5006
  var t = JSON.parse(JSON.stringify(e.directConnection)),
5003
5007
  i = t.stabilityAI;
5004
5008
  _this13 = _super17.call(this, e, X.buildKeyVerificationDetails(), X.buildHeaders, i), _this13.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-5/text-to-image", _this13.textInputPlaceholderText = "Describe an image", _this13.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5005
5009
  var r = (s = t.stabilityAI) == null ? void 0 : s.textToImage;
5006
- _typeof(r) == "object" && (r.engine_id && (_this13.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/text-to-image")), r.weight !== void 0 && r.weight !== null && (_this13._imageWeight = r.weight), Tt.cleanConfig(r), Object.assign(_this13.rawBody, r)), _this13.canSendMessage = Tt.canSendTextMessage;
5010
+ _typeof(r) == "object" && (r.engine_id && (_this13.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/text-to-image")), r.weight !== void 0 && r.weight !== null && (_this13._imageWeight = r.weight), Ct.cleanConfig(r), Object.assign(_this13.rawBody, r)), _this13.canSendMessage = Ct.canSendTextMessage;
5007
5011
  return _this13;
5008
5012
  }
5009
- _createClass(Tt, [{
5013
+ _createClass(Ct, [{
5010
5014
  key: "preprocessBody",
5011
5015
  value: function preprocessBody(e, t) {
5012
5016
  var i = JSON.parse(JSON.stringify(e)),
@@ -5058,7 +5062,7 @@ var Tt = /*#__PURE__*/function (_Gt4) {
5058
5062
  return _context38.abrupt("return", {
5059
5063
  files: e.artifacts.map(function (i) {
5060
5064
  return {
5061
- src: "".concat(rt).concat(i.base64),
5065
+ src: "".concat(st).concat(i.base64),
5062
5066
  type: "image"
5063
5067
  };
5064
5068
  })
@@ -5085,10 +5089,10 @@ var Tt = /*#__PURE__*/function (_Gt4) {
5085
5089
  return !!(e && e.trim() !== "");
5086
5090
  }
5087
5091
  }]);
5088
- return Tt;
5089
- }(Gt);
5090
- var uo = /*#__PURE__*/function (_we7) {
5091
- _inherits(uo, _we7);
5092
+ return Ct;
5093
+ }(Vt);
5094
+ var uo = /*#__PURE__*/function (_e8) {
5095
+ _inherits(uo, _e8);
5092
5096
  var _super18 = _createSuper(uo);
5093
5097
  function uo(e) {
5094
5098
  var _this14;
@@ -5128,12 +5132,12 @@ var uo = /*#__PURE__*/function (_we7) {
5128
5132
  }()
5129
5133
  }]);
5130
5134
  return uo;
5131
- }(we);
5132
- var Ct = /*#__PURE__*/function () {
5133
- function Ct() {
5134
- _classCallCheck(this, Ct);
5135
+ }(_e);
5136
+ var At = /*#__PURE__*/function () {
5137
+ function At() {
5138
+ _classCallCheck(this, At);
5135
5139
  }
5136
- _createClass(Ct, null, [{
5140
+ _createClass(At, null, [{
5137
5141
  key: "buildHeaders",
5138
5142
  value: function buildHeaders(e) {
5139
5143
  return {
@@ -5154,28 +5158,28 @@ var Ct = /*#__PURE__*/function () {
5154
5158
  return {
5155
5159
  url: "https://api.cohere.ai/v1/generate",
5156
5160
  method: "POST",
5157
- handleVerificationResult: Ct.handleVerificationResult,
5161
+ handleVerificationResult: At.handleVerificationResult,
5158
5162
  body: JSON.stringify({
5159
5163
  prompt: ""
5160
5164
  })
5161
5165
  };
5162
5166
  }
5163
5167
  }]);
5164
- return Ct;
5168
+ return At;
5165
5169
  }();
5166
- var Oi = /*#__PURE__*/function (_U3) {
5167
- _inherits(Oi, _U3);
5168
- var _super19 = _createSuper(Oi);
5169
- function Oi(e, t, i, r, s) {
5170
+ var Pi = /*#__PURE__*/function (_U3) {
5171
+ _inherits(Pi, _U3);
5172
+ var _super19 = _createSuper(Pi);
5173
+ function Pi(e, t, i, r, s) {
5170
5174
  var _this15;
5171
- _classCallCheck(this, Oi);
5172
- _this15 = _super19.call(this, e, Ct.buildKeyVerificationDetails(), Ct.buildHeaders, s), _this15.insertKeyPlaceholderText = "Cohere API Key", _this15.getKeyLink = "https://dashboard.cohere.ai/api-keys", _this15.permittedErrorPrefixes = ["invalid"], _this15.url = t, _this15.textInputPlaceholderText = i, r && _typeof(r) == "object" && Object.assign(_this15.rawBody, r);
5175
+ _classCallCheck(this, Pi);
5176
+ _this15 = _super19.call(this, e, At.buildKeyVerificationDetails(), At.buildHeaders, s), _this15.insertKeyPlaceholderText = "Cohere API Key", _this15.getKeyLink = "https://dashboard.cohere.ai/api-keys", _this15.permittedErrorPrefixes = ["invalid"], _this15.url = t, _this15.textInputPlaceholderText = i, r && _typeof(r) == "object" && Object.assign(_this15.rawBody, r);
5173
5177
  return _this15;
5174
5178
  }
5175
- return _createClass(Oi);
5179
+ return _createClass(Pi);
5176
5180
  }(U);
5177
- var ho = /*#__PURE__*/function (_Oi) {
5178
- _inherits(ho, _Oi);
5181
+ var ho = /*#__PURE__*/function (_Pi) {
5182
+ _inherits(ho, _Pi);
5179
5183
  var _super20 = _createSuper(ho);
5180
5184
  function ho(e) {
5181
5185
  _classCallCheck(this, ho);
@@ -5250,9 +5254,9 @@ var ho = /*#__PURE__*/function (_Oi) {
5250
5254
  }()
5251
5255
  }]);
5252
5256
  return ho;
5253
- }(Oi);
5254
- var po = /*#__PURE__*/function (_Oi2) {
5255
- _inherits(po, _Oi2);
5257
+ }(Pi);
5258
+ var po = /*#__PURE__*/function (_Pi2) {
5259
+ _inherits(po, _Pi2);
5256
5260
  var _super21 = _createSuper(po);
5257
5261
  function po(e) {
5258
5262
  _classCallCheck(this, po);
@@ -5326,7 +5330,7 @@ var po = /*#__PURE__*/function (_Oi2) {
5326
5330
  }()
5327
5331
  }]);
5328
5332
  return po;
5329
- }(Oi);
5333
+ }(Pi);
5330
5334
  var J = /*#__PURE__*/function () {
5331
5335
  function J() {
5332
5336
  _classCallCheck(this, J);
@@ -5598,7 +5602,7 @@ var mo = /*#__PURE__*/function (_fo) {
5598
5602
  }]);
5599
5603
  return mo;
5600
5604
  }(fo);
5601
- var Pi = /*#__PURE__*/function () {
5605
+ var Di = /*#__PURE__*/function () {
5602
5606
  function Bn() {
5603
5607
  _classCallCheck(this, Bn);
5604
5608
  }
@@ -5618,10 +5622,10 @@ var Pi = /*#__PURE__*/function () {
5618
5622
  }]);
5619
5623
  return Bn;
5620
5624
  }();
5621
- Pi.GPT_COMPLETIONS_DAVINCI_MODEL = "text-davinci-003";
5622
- Pi.GPT_CHAT_TURBO_MODEL = "gpt-3.5-turbo";
5623
- var Un = Pi;
5624
- var Di = /*#__PURE__*/function () {
5625
+ Di.GPT_COMPLETIONS_DAVINCI_MODEL = "text-davinci-003";
5626
+ Di.GPT_CHAT_TURBO_MODEL = "gpt-3.5-turbo";
5627
+ var Un = Di;
5628
+ var ji = /*#__PURE__*/function () {
5625
5629
  function qn() {
5626
5630
  _classCallCheck(this, qn);
5627
5631
  }
@@ -5652,9 +5656,9 @@ var Di = /*#__PURE__*/function () {
5652
5656
  }]);
5653
5657
  return qn;
5654
5658
  }();
5655
- Di.CONVERSE_MAX_CHAR_LENGTH = 13352;
5656
- Di.FILE_MAX_CHAR_LENGTH = 1e3;
5657
- var Y = Di;
5659
+ ji.CONVERSE_MAX_CHAR_LENGTH = 13352;
5660
+ ji.FILE_MAX_CHAR_LENGTH = 1e3;
5661
+ var Y = ji;
5658
5662
  var go = /*#__PURE__*/function (_U5) {
5659
5663
  _inherits(go, _U5);
5660
5664
  var _super24 = _createSuper(go);
@@ -5747,11 +5751,11 @@ var go = /*#__PURE__*/function (_U5) {
5747
5751
  }]);
5748
5752
  return go;
5749
5753
  }(U);
5750
- var Ke = /*#__PURE__*/function () {
5751
- function Ke() {
5752
- _classCallCheck(this, Ke);
5754
+ var Je = /*#__PURE__*/function () {
5755
+ function Je() {
5756
+ _classCallCheck(this, Je);
5753
5757
  }
5754
- _createClass(Ke, null, [{
5758
+ _createClass(Je, null, [{
5755
5759
  key: "poll",
5756
5760
  value: function () {
5757
5761
  var _poll2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(e, t) {
@@ -5847,26 +5851,26 @@ var Ke = /*#__PURE__*/function () {
5847
5851
  return {
5848
5852
  url: "https://api.assemblyai.com/v2/upload",
5849
5853
  method: "POST",
5850
- handleVerificationResult: Ke.handleVerificationResult
5854
+ handleVerificationResult: Je.handleVerificationResult
5851
5855
  };
5852
5856
  }
5853
5857
  }]);
5854
- return Ke;
5858
+ return Je;
5855
5859
  }();
5856
- var ji = /*#__PURE__*/function (_U6) {
5857
- _inherits(ji, _U6);
5858
- var _super25 = _createSuper(ji);
5859
- function ji(e) {
5860
+ var zi = /*#__PURE__*/function (_U6) {
5861
+ _inherits(zi, _U6);
5862
+ var _super25 = _createSuper(zi);
5863
+ function zi(e) {
5860
5864
  var _this19;
5861
- _classCallCheck(this, ji);
5865
+ _classCallCheck(this, zi);
5862
5866
  var i;
5863
5867
  var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
5864
- _this19 = _super25.call(this, e, Ke.buildKeyVerificationDetails(), Ke.buildHeaders, t, {
5868
+ _this19 = _super25.call(this, e, Je.buildKeyVerificationDetails(), Je.buildHeaders, t, {
5865
5869
  audio: {}
5866
- }), _this19.insertKeyPlaceholderText = "AssemblyAI API Key", _this19.getKeyLink = "https://www.assemblyai.com/app/account", _this19.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>", _this19.url = "https://api.assemblyai.com/v2/upload", _this19.isTextInputDisabled = !0, _this19.textInputPlaceholderText = "Upload an audio file", _this19.permittedErrorPrefixes = ["Authentication", "Invalid"], _this19.canSendMessage = ji.canFileSendMessage;
5870
+ }), _this19.insertKeyPlaceholderText = "AssemblyAI API Key", _this19.getKeyLink = "https://www.assemblyai.com/app/account", _this19.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>", _this19.url = "https://api.assemblyai.com/v2/upload", _this19.isTextInputDisabled = !0, _this19.textInputPlaceholderText = "Upload an audio file", _this19.permittedErrorPrefixes = ["Authentication", "Invalid"], _this19.canSendMessage = zi.canFileSendMessage;
5867
5871
  return _this19;
5868
5872
  }
5869
- _createClass(ji, [{
5873
+ _createClass(zi, [{
5870
5874
  key: "callServiceAPI",
5871
5875
  value: function () {
5872
5876
  var _callServiceAPI12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(e, t, i) {
@@ -5914,7 +5918,7 @@ var ji = /*#__PURE__*/function (_U6) {
5914
5918
  case 2:
5915
5919
  t = (s = (r = this.requestSettings) == null ? void 0 : r.headers) == null ? void 0 : s.Authorization;
5916
5920
  _context51.next = 5;
5917
- return Ke.poll(t, e.upload_url);
5921
+ return Je.poll(t, e.upload_url);
5918
5922
  case 5:
5919
5923
  _context51.t0 = _context51.sent.text;
5920
5924
  return _context51.abrupt("return", {
@@ -5937,7 +5941,7 @@ var ji = /*#__PURE__*/function (_U6) {
5937
5941
  return !!(t != null && t[0]);
5938
5942
  }
5939
5943
  }]);
5940
- return ji;
5944
+ return zi;
5941
5945
  }(U);
5942
5946
  var Hn = /*#__PURE__*/function (_U7) {
5943
5947
  _inherits(Hn, _U7);
@@ -6037,11 +6041,11 @@ Gn.HELP_LINK =
6037
6041
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
6038
6042
  var bo = Gn;
6039
6043
  var Wn = /*#__PURE__*/function (_Hn2) {
6040
- _inherits(_i, _Hn2);
6041
- var _super28 = _createSuper(_i);
6042
- function _i(e) {
6044
+ _inherits(ki, _Hn2);
6045
+ var _super28 = _createSuper(ki);
6046
+ function ki(e) {
6043
6047
  var _this22;
6044
- _classCallCheck(this, _i);
6048
+ _classCallCheck(this, ki);
6045
6049
  var o, a, l;
6046
6050
  var t = (a = (o = e.directConnection) == null ? void 0 : o.azure) == null ? void 0 : a.speechToText,
6047
6051
  i = (l = e.directConnection) == null ? void 0 : l.azure,
@@ -6052,12 +6056,12 @@ var Wn = /*#__PURE__*/function (_Hn2) {
6052
6056
  }
6053
6057
  }
6054
6058
  };
6055
- _this22 = _super28.call(this, e, J.buildSpeechToTextHeaders, t.region, i, r), _this22.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(_i.HELP_LINK, "\">here</a> for more info.\n </p>"), _this22.url = "", _this22.isTextInputDisabled = !0, _this22.textInputPlaceholderText = "Upload an audio file", _this22.canSendMessage = _i.canFileSendMessage;
6059
+ _this22 = _super28.call(this, e, J.buildSpeechToTextHeaders, t.region, i, r), _this22.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(ki.HELP_LINK, "\">here</a> for more info.\n </p>"), _this22.url = "", _this22.isTextInputDisabled = !0, _this22.textInputPlaceholderText = "Upload an audio file", _this22.canSendMessage = ki.canFileSendMessage;
6056
6060
  var s = t.lang || "en-US";
6057
6061
  _this22.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(s, "&format=detailed"), _this22.recordAudio = void 0;
6058
6062
  return _this22;
6059
6063
  }
6060
- _createClass(_i, [{
6064
+ _createClass(ki, [{
6061
6065
  key: "callServiceAPI",
6062
6066
  value: function () {
6063
6067
  var _callServiceAPI14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(e, t, i) {
@@ -6122,7 +6126,7 @@ var Wn = /*#__PURE__*/function (_Hn2) {
6122
6126
  return !!(t != null && t[0]);
6123
6127
  }
6124
6128
  }]);
6125
- return _i;
6129
+ return ki;
6126
6130
  }(Hn);
6127
6131
  Wn.HELP_LINK =
6128
6132
  // eslint-disable-next-line max-len
@@ -6209,7 +6213,7 @@ var yo = /*#__PURE__*/function (_U8) {
6209
6213
  }]);
6210
6214
  return yo;
6211
6215
  }(U);
6212
- var Vt = /*#__PURE__*/function (_U9) {
6216
+ var Wt = /*#__PURE__*/function (_U9) {
6213
6217
  _inherits(he, _U9);
6214
6218
  var _super30 = _createSuper(he);
6215
6219
  function he(e) {
@@ -6326,7 +6330,7 @@ var Vt = /*#__PURE__*/function (_U9) {
6326
6330
  src: i.url,
6327
6331
  type: "image"
6328
6332
  } : {
6329
- src: "".concat(rt).concat(i.b64_json),
6333
+ src: "".concat(st).concat(i.b64_json),
6330
6334
  type: "image"
6331
6335
  };
6332
6336
  })
@@ -6366,11 +6370,11 @@ var Vt = /*#__PURE__*/function (_U9) {
6366
6370
  }]);
6367
6371
  return he;
6368
6372
  }(U);
6369
- Vt.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
6370
- Vt.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
6371
- Vt.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
6372
- var xo = Vt;
6373
- var Wt = /*#__PURE__*/function (_U10) {
6373
+ Wt.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
6374
+ Wt.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
6375
+ Wt.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
6376
+ var xo = Wt;
6377
+ var Kt = /*#__PURE__*/function (_U10) {
6374
6378
  _inherits(pe, _U10);
6375
6379
  var _super31 = _createSuper(pe);
6376
6380
  function pe(e) {
@@ -6488,26 +6492,26 @@ var Wt = /*#__PURE__*/function (_U10) {
6488
6492
  }]);
6489
6493
  return pe;
6490
6494
  }(U);
6491
- Wt.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions";
6492
- Wt.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations";
6493
- Wt.DEFAULT_MODEL = "whisper-1";
6494
- var Eo = Wt;
6495
- var At = /*#__PURE__*/function (_U11) {
6496
- _inherits(At, _U11);
6497
- var _super32 = _createSuper(At);
6498
- function At(e) {
6495
+ Kt.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions";
6496
+ Kt.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations";
6497
+ Kt.DEFAULT_MODEL = "whisper-1";
6498
+ var Eo = Kt;
6499
+ var It = /*#__PURE__*/function (_U11) {
6500
+ _inherits(It, _U11);
6501
+ var _super32 = _createSuper(It);
6502
+ function It(e) {
6499
6503
  var _this26$maxMessages, _o$model;
6500
6504
  var _this26;
6501
- _classCallCheck(this, At);
6505
+ _classCallCheck(this, It);
6502
6506
  var s, o;
6503
6507
  var t = JSON.parse(JSON.stringify(e.directConnection)),
6504
6508
  i = t.openAI;
6505
- _this26 = _super32.call(this, e, Y.buildKeyVerificationDetails(), Y.buildHeaders, i), _this26.insertKeyPlaceholderText = "OpenAI API Key", _this26.getKeyLink = "https://platform.openai.com/account/api-keys", _this26.url = "https://api.openai.com/v1/chat/completions", _this26.permittedErrorPrefixes = ["Incorrect"], _this26._systemMessage = At.generateSystemMessage("You are a helpful assistant.");
6509
+ _this26 = _super32.call(this, e, Y.buildKeyVerificationDetails(), Y.buildHeaders, i), _this26.insertKeyPlaceholderText = "OpenAI API Key", _this26.getKeyLink = "https://platform.openai.com/account/api-keys", _this26.url = "https://api.openai.com/v1/chat/completions", _this26.permittedErrorPrefixes = ["Incorrect"], _this26._systemMessage = It.generateSystemMessage("You are a helpful assistant.");
6506
6510
  var r = (s = t.openAI) == null ? void 0 : s.chat;
6507
- _typeof(r) == "object" && (r.system_prompt && (_this26._systemMessage = At.generateSystemMessage(r.system_prompt)), _this26.cleanConfig(r), Object.assign(_this26.rawBody, r)), (_this26$maxMessages = _this26.maxMessages) !== null && _this26$maxMessages !== void 0 ? _this26$maxMessages : _this26.maxMessages = -1, (_o$model = (o = _this26.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = Un.GPT_CHAT_TURBO_MODEL;
6511
+ _typeof(r) == "object" && (r.system_prompt && (_this26._systemMessage = It.generateSystemMessage(r.system_prompt)), _this26.cleanConfig(r), Object.assign(_this26.rawBody, r)), (_this26$maxMessages = _this26.maxMessages) !== null && _this26$maxMessages !== void 0 ? _this26$maxMessages : _this26.maxMessages = -1, (_o$model = (o = _this26.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = Un.GPT_CHAT_TURBO_MODEL;
6508
6512
  return _this26;
6509
6513
  }
6510
- _createClass(At, [{
6514
+ _createClass(It, [{
6511
6515
  key: "cleanConfig",
6512
6516
  value: function cleanConfig(e) {
6513
6517
  delete e.system_prompt;
@@ -6521,7 +6525,7 @@ var At = /*#__PURE__*/function (_U11) {
6521
6525
  s = t.filter(function (a) {
6522
6526
  return a.text;
6523
6527
  }),
6524
- o = Ze.getCharacterLimitMessages(s, r - this._systemMessage.content.length).map(function (a) {
6528
+ o = Qe.getCharacterLimitMessages(s, r - this._systemMessage.content.length).map(function (a) {
6525
6529
  return {
6526
6530
  content: a.text,
6527
6531
  role: a.role === "ai" ? "assistant" : "user"
@@ -6596,10 +6600,10 @@ var At = /*#__PURE__*/function (_U11) {
6596
6600
  };
6597
6601
  }
6598
6602
  }]);
6599
- return At;
6603
+ return It;
6600
6604
  }(U);
6601
- var So = /*#__PURE__*/function (_Oi3) {
6602
- _inherits(So, _Oi3);
6605
+ var So = /*#__PURE__*/function (_Pi3) {
6606
+ _inherits(So, _Pi3);
6603
6607
  var _super33 = _createSuper(So);
6604
6608
  function So(e) {
6605
6609
  var _this27$maxMessages;
@@ -6688,7 +6692,7 @@ var So = /*#__PURE__*/function (_Oi3) {
6688
6692
  }()
6689
6693
  }]);
6690
6694
  return So;
6691
- }(Oi);
6695
+ }(Pi);
6692
6696
  var wo = /*#__PURE__*/function () {
6693
6697
  function wo() {
6694
6698
  _classCallCheck(this, wo);
@@ -6700,8 +6704,8 @@ var wo = /*#__PURE__*/function () {
6700
6704
  i = e.request,
6701
6705
  r = e.demo;
6702
6706
  if (t) {
6703
- if (t.openAI) return t.openAI.images ? new xo(e) : t.openAI.audio ? new Eo(e) : t.openAI.completions ? new go(e) : new At(e);
6704
- if (t.assemblyAI) return new ji(e);
6707
+ if (t.openAI) return t.openAI.images ? new xo(e) : t.openAI.audio ? new Eo(e) : t.openAI.completions ? new go(e) : new It(e);
6708
+ if (t.assemblyAI) return new zi(e);
6705
6709
  if (t.cohere) return t.cohere.chat ? new So(e) : t.cohere.summarization ? new po(e) : new ho(e);
6706
6710
  if (t.huggingFace) return t.huggingFace.textGeneration ? new so(e) : t.huggingFace.summarization ? new ao(e) : t.huggingFace.translation ? new co(e) : t.huggingFace.fillMask ? new uo(e) : t.huggingFace.questionAnswer ? new oo(e) : t.huggingFace.audioSpeechRecognition ? new ro(e) : t.huggingFace.audioClassification ? new io(e) : t.huggingFace.imageClassification ? new no(e) : new lo(e);
6707
6711
  if (t.azure) {
@@ -6710,30 +6714,30 @@ var wo = /*#__PURE__*/function () {
6710
6714
  if (t.azure.summarization) return new mo(e);
6711
6715
  if (t.azure.translation) return new yo(e);
6712
6716
  }
6713
- if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Mt(e) : t.stabilityAI.imageToImageUpscale ? new _t(e) : t.stabilityAI.imageToImageMasking ? new kt(e) : new Tt(e);
6717
+ if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Tt(e) : t.stabilityAI.imageToImageUpscale ? new kt(e) : t.stabilityAI.imageToImageMasking ? new Mt(e) : new Ct(e);
6714
6718
  }
6715
- return i ? new Fe(e) : new Fe(e, void 0, r || !0);
6719
+ return i ? new Be(e) : new Be(e, void 0, r || !0);
6716
6720
  }
6717
6721
  }]);
6718
6722
  return wo;
6719
6723
  }();
6720
6724
  var Kn = /*#__PURE__*/function () {
6721
- function ki() {
6722
- _classCallCheck(this, ki);
6725
+ function Mi() {
6726
+ _classCallCheck(this, Mi);
6723
6727
  }
6724
- _createClass(ki, null, [{
6728
+ _createClass(Mi, null, [{
6725
6729
  key: "appendStyleSheetToHead",
6726
6730
  value: function appendStyleSheetToHead() {
6727
6731
  var e = document.getElementsByTagName("head")[0];
6728
6732
  if (!Array.from(e.getElementsByTagName("link")).some(function (i) {
6729
- return i.getAttribute("href") === ki.FONT_URL;
6733
+ return i.getAttribute("href") === Mi.FONT_URL;
6730
6734
  })) {
6731
6735
  var i = document.createElement("link");
6732
- i.rel = "stylesheet", i.href = ki.FONT_URL, e.appendChild(i);
6736
+ i.rel = "stylesheet", i.href = Mi.FONT_URL, e.appendChild(i);
6733
6737
  }
6734
6738
  }
6735
6739
  }]);
6736
- return ki;
6740
+ return Mi;
6737
6741
  }();
6738
6742
  Kn.FONT_URL = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap";
6739
6743
  var _o = Kn;
@@ -6768,11 +6772,11 @@ function y(n) {
6768
6772
  i._attributes_[r] = Jn.attibutes[n], i._attributeToProperty_[r] = t;
6769
6773
  };
6770
6774
  }
6771
- var Mi = /*#__PURE__*/function () {
6772
- function Mi() {
6773
- _classCallCheck(this, Mi);
6775
+ var Ti = /*#__PURE__*/function () {
6776
+ function Ti() {
6777
+ _classCallCheck(this, Ti);
6774
6778
  }
6775
- _createClass(Mi, null, [{
6779
+ _createClass(Ti, null, [{
6776
6780
  key: "onNewMessage",
6777
6781
  value: function onNewMessage(e, t, i) {
6778
6782
  var r = JSON.parse(JSON.stringify({
@@ -6794,7 +6798,7 @@ var Mi = /*#__PURE__*/function () {
6794
6798
  e.onComponentRender(), e.dispatchEvent(new CustomEvent("render"));
6795
6799
  }
6796
6800
  }]);
6797
- return Mi;
6801
+ return Ti;
6798
6802
  }();
6799
6803
  var Yn = /*#__PURE__*/function () {
6800
6804
  function $n() {
@@ -6829,7 +6833,7 @@ var Yn = /*#__PURE__*/function () {
6829
6833
  return $n;
6830
6834
  }();
6831
6835
  Yn.CODE_SNIPPET_GENERATION_JUMP = 0.5;
6832
- var Kt = Yn;
6836
+ var Jt = Yn;
6833
6837
  var Zn = /*#__PURE__*/function () {
6834
6838
  function Qn() {
6835
6839
  _classCallCheck(this, Qn);
@@ -6861,12 +6865,12 @@ var Zn = /*#__PURE__*/function () {
6861
6865
  return Qn;
6862
6866
  }();
6863
6867
  Zn.LOAD_VOICES_MS = 200;
6864
- var mt = Zn;
6865
- var zi = /*#__PURE__*/function () {
6866
- function zi() {
6867
- _classCallCheck(this, zi);
6868
+ var gt = Zn;
6869
+ var Fi = /*#__PURE__*/function () {
6870
+ function Fi() {
6871
+ _classCallCheck(this, Fi);
6868
6872
  }
6869
- _createClass(zi, null, [{
6873
+ _createClass(Fi, null, [{
6870
6874
  key: "colorToHex",
6871
6875
  value: function colorToHex(e) {
6872
6876
  var t = document.createElement("div");
@@ -6879,12 +6883,12 @@ var zi = /*#__PURE__*/function () {
6879
6883
  value: function set(e, t) {
6880
6884
  var i, r, s, o;
6881
6885
  if ((r = (i = t == null ? void 0 : t.loading) == null ? void 0 : i.bubble) != null && r.color) {
6882
- var a = zi.colorToHex((o = (s = t == null ? void 0 : t.loading) == null ? void 0 : s.bubble) == null ? void 0 : o.color);
6886
+ var a = Fi.colorToHex((o = (s = t == null ? void 0 : t.loading) == null ? void 0 : s.bubble) == null ? void 0 : o.color);
6883
6887
  e.style.setProperty("--message-dots-color", a), e.style.setProperty("--message-dots-color-fade", "".concat(a, "33"));
6884
6888
  } else e.style.setProperty("--message-dots-color", "#848484"), e.style.setProperty("--message-dots-color-fade", "#55555533");
6885
6889
  }
6886
6890
  }]);
6887
- return zi;
6891
+ return Fi;
6888
6892
  }();
6889
6893
  var ge = /*#__PURE__*/function () {
6890
6894
  function ge() {
@@ -6964,7 +6968,7 @@ var le = /*#__PURE__*/function () {
6964
6968
  var ko = "deep-chat-temporary-message",
6965
6969
  Mo = "deep-chat-suggestion-button",
6966
6970
  To = "deep-chat-update-message",
6967
- Ti = {
6971
+ Ci = {
6968
6972
  "deep-chat-button": {
6969
6973
  styles: {
6970
6974
  "default": {
@@ -6985,7 +6989,7 @@ var ko = "deep-chat-temporary-message",
6985
6989
  }
6986
6990
  }
6987
6991
  },
6988
- rn = Object.keys(Ti);
6992
+ sn = Object.keys(Ci);
6989
6993
  var ie = /*#__PURE__*/function () {
6990
6994
  function ie() {
6991
6995
  _classCallCheck(this, ie);
@@ -7016,14 +7020,14 @@ var ie = /*#__PURE__*/function () {
7016
7020
  }, {
7017
7021
  key: "doesElementContainDeepChatClass",
7018
7022
  value: function doesElementContainDeepChatClass(e) {
7019
- return rn.find(function (t) {
7023
+ return sn.find(function (t) {
7020
7024
  return e.classList.contains(t);
7021
7025
  });
7022
7026
  }
7023
7027
  }, {
7024
7028
  key: "applyEvents",
7025
7029
  value: function applyEvents(e, t) {
7026
- var i = Ti[t].events;
7030
+ var i = Ci[t].events;
7027
7031
  Object.keys(i || []).forEach(function (r) {
7028
7032
  e.addEventListener(r, i == null ? void 0 : i[r]);
7029
7033
  });
@@ -7036,7 +7040,7 @@ var ie = /*#__PURE__*/function () {
7036
7040
  var c = (d = e[l]) == null ? void 0 : d.styles;
7037
7041
  return c && e[l].styles && a.push(c), a;
7038
7042
  }, []),
7039
- s = Ti[i].styles;
7043
+ s = Ci[i].styles;
7040
7044
  if (s) {
7041
7045
  var a = JSON.parse(JSON.stringify(s));
7042
7046
  a["default"] && _.overwriteDefaultWithAlreadyApplied(a, t), r.unshift(a);
@@ -7047,7 +7051,7 @@ var ie = /*#__PURE__*/function () {
7047
7051
  }, {
7048
7052
  key: "applyDeepChatUtilities",
7049
7053
  value: function applyDeepChatUtilities(e, t, i) {
7050
- rn.forEach(function (s) {
7054
+ sn.forEach(function (s) {
7051
7055
  var o = i.getElementsByClassName(s);
7052
7056
  Array.from(o || []).forEach(function (a) {
7053
7057
  var l = ie.getProcessedStyles(t, a, s);
@@ -7112,21 +7116,21 @@ var O = /*#__PURE__*/function () {
7112
7116
  }]);
7113
7117
  return O;
7114
7118
  }();
7115
- var It = /*#__PURE__*/function () {
7116
- function It(e, t, i) {
7117
- _classCallCheck(this, It);
7119
+ var Lt = /*#__PURE__*/function () {
7120
+ function Lt(e, t, i) {
7121
+ _classCallCheck(this, Lt);
7118
7122
  this._isDisplayed = !1, e ? (this._elementRef = this.createIntroPanelWithChild(e, i), this._isDisplayed = !0) : t && (this._elementRef = this.createInternalIntroPanel(t, i), this._isDisplayed = !0);
7119
7123
  }
7120
- _createClass(It, [{
7124
+ _createClass(Lt, [{
7121
7125
  key: "createIntroPanelWithChild",
7122
7126
  value: function createIntroPanelWithChild(e, t) {
7123
- var i = It.createIntroPanel(t);
7127
+ var i = Lt.createIntroPanel(t);
7124
7128
  return e.style.display === "none" && (e.style.display = "block"), i.appendChild(e), i;
7125
7129
  }
7126
7130
  }, {
7127
7131
  key: "createInternalIntroPanel",
7128
7132
  value: function createInternalIntroPanel(e, t) {
7129
- var i = It.createIntroPanel(t);
7133
+ var i = Lt.createIntroPanel(t);
7130
7134
  return i.id = "internal-intro-panel", i.innerHTML = e, i;
7131
7135
  }
7132
7136
  }, {
@@ -7146,13 +7150,13 @@ var It = /*#__PURE__*/function () {
7146
7150
  return t.classList.add("intro-panel"), Object.assign(t.style, e), t;
7147
7151
  }
7148
7152
  }]);
7149
- return It;
7153
+ return Lt;
7150
7154
  }();
7151
7155
  var Xn = /*#__PURE__*/function () {
7152
- function yt() {
7153
- _classCallCheck(this, yt);
7156
+ function xt() {
7157
+ _classCallCheck(this, xt);
7154
7158
  }
7155
- _createClass(yt, null, [{
7159
+ _createClass(xt, null, [{
7156
7160
  key: "addMessage",
7157
7161
  value: function addMessage(e, t, i, r) {
7158
7162
  var s;
@@ -7167,7 +7171,7 @@ var Xn = /*#__PURE__*/function () {
7167
7171
  }, {
7168
7172
  key: "processContent",
7169
7173
  value: function processContent(e, t) {
7170
- return !t || t.startsWith("data") ? e : yt.wrapInLink(e, t);
7174
+ return !t || t.startsWith("data") ? e : xt.wrapInLink(e, t);
7171
7175
  }
7172
7176
  }, {
7173
7177
  key: "waitToLoadThenScroll",
@@ -7179,29 +7183,29 @@ var Xn = /*#__PURE__*/function () {
7179
7183
  }, {
7180
7184
  key: "scrollDownOnImageLoad",
7181
7185
  value: function scrollDownOnImageLoad(e, t) {
7182
- if (e.startsWith("data")) yt.waitToLoadThenScroll(t);else try {
7186
+ if (e.startsWith("data")) xt.waitToLoadThenScroll(t);else try {
7183
7187
  fetch(e, {
7184
7188
  mode: "no-cors"
7185
7189
  })["catch"](function () {})["finally"](function () {
7186
- yt.waitToLoadThenScroll(t);
7190
+ xt.waitToLoadThenScroll(t);
7187
7191
  });
7188
7192
  } catch (_unused5) {
7189
7193
  t.scrollTop = t.scrollHeight;
7190
7194
  }
7191
7195
  }
7192
7196
  }]);
7193
- return yt;
7197
+ return xt;
7194
7198
  }();
7195
7199
  Xn.DEFAULT_FILE_NAME = "file";
7196
7200
  var se = Xn;
7197
- var Fi = /*#__PURE__*/function () {
7198
- function xt() {
7199
- _classCallCheck(this, xt);
7201
+ var Bi = /*#__PURE__*/function () {
7202
+ function Et() {
7203
+ _classCallCheck(this, Et);
7200
7204
  }
7201
- _createClass(xt, null, [{
7205
+ _createClass(Et, null, [{
7202
7206
  key: "getRole",
7203
7207
  value: function getRole(e) {
7204
- return e ? xt.AI_ROLE : xt.USER_ROLE;
7208
+ return e ? Et.AI_ROLE : Et.USER_ROLE;
7205
7209
  }
7206
7210
  }, {
7207
7211
  key: "getLastElementsByClass",
@@ -7229,22 +7233,22 @@ var Fi = /*#__PURE__*/function () {
7229
7233
  }, {
7230
7234
  key: "getLastMessage",
7231
7235
  value: function getLastMessage(e, t, i) {
7232
- var r = xt.getRole(t);
7236
+ var r = Et.getRole(t);
7233
7237
  for (var s = e.length - 1; s >= 0; s -= 1) if (e[s].role === r) if (i) {
7234
7238
  if (e[s][i]) return e[s];
7235
7239
  } else return e[s];
7236
7240
  }
7237
7241
  }]);
7238
- return xt;
7242
+ return Et;
7239
7243
  }();
7240
- Fi.AI_ROLE = "ai";
7241
- Fi.USER_ROLE = "user";
7242
- var Lt = Fi;
7243
- var De = /*#__PURE__*/function () {
7244
- function De() {
7245
- _classCallCheck(this, De);
7244
+ Bi.AI_ROLE = "ai";
7245
+ Bi.USER_ROLE = "user";
7246
+ var Rt = Bi;
7247
+ var je = /*#__PURE__*/function () {
7248
+ function je() {
7249
+ _classCallCheck(this, je);
7246
7250
  }
7247
- _createClass(De, null, [{
7251
+ _createClass(je, null, [{
7248
7252
  key: "addElement",
7249
7253
  value: function addElement(e, t) {
7250
7254
  e.elementRef.appendChild(t), e.elementRef.scrollTop = e.elementRef.scrollHeight;
@@ -7260,22 +7264,22 @@ var De = /*#__PURE__*/function () {
7260
7264
  }, {
7261
7265
  key: "updateLastAIMessage",
7262
7266
  value: function updateLastAIMessage(e, t, i) {
7263
- var r = Lt.getLastElementsByClass(i, ["ai-message-text", "html-message"], ["loading-message-text"]);
7267
+ var r = Rt.getLastElementsByClass(i, ["ai-message-text", "html-message"], ["loading-message-text"]);
7264
7268
  if (!r) return !1;
7265
7269
  r && (r.bubbleElement.innerHTML = t);
7266
- var s = Lt.getLastMessage(e, !0, "html");
7270
+ var s = Rt.getLastMessage(e, !0, "html");
7267
7271
  return s && (s.html = t), !0;
7268
7272
  }
7269
7273
  }, {
7270
7274
  key: "add",
7271
7275
  value: function add(e, t, i, r) {
7272
7276
  var o;
7273
- if (ie.isUpdateMessage(t) && De.updateLastAIMessage(e.messages, t, r)) return;
7274
- var s = De.createElements(e, t, i);
7275
- return t.trim().length === 0 && L.editEmptyMessageElement(s.bubbleElement), le.apply(e, s.outerContainer), e.applyCustomStyles(s, i, !1, (o = e.messageStyles) == null ? void 0 : o.html), De.addElement(e, s.outerContainer), s;
7277
+ if (ie.isUpdateMessage(t) && je.updateLastAIMessage(e.messages, t, r)) return;
7278
+ var s = je.createElements(e, t, i);
7279
+ return t.trim().length === 0 && L.editEmptyMessageElement(s.bubbleElement), le.apply(e, s.outerContainer), e.applyCustomStyles(s, i, !1, (o = e.messageStyles) == null ? void 0 : o.html), je.addElement(e, s.outerContainer), s;
7276
7280
  }
7277
7281
  }]);
7278
- return De;
7282
+ return je;
7279
7283
  }();
7280
7284
  var Co = /*#__PURE__*/function () {
7281
7285
  function Co() {
@@ -7417,11 +7421,11 @@ var ae = /*#__PURE__*/function () {
7417
7421
  }]);
7418
7422
  return ae;
7419
7423
  }();
7420
- var Ne = /*#__PURE__*/function () {
7421
- function Ne() {
7422
- _classCallCheck(this, Ne);
7424
+ var Oe = /*#__PURE__*/function () {
7425
+ function Oe() {
7426
+ _classCallCheck(this, Oe);
7423
7427
  }
7424
- _createClass(Ne, null, [{
7428
+ _createClass(Oe, null, [{
7425
7429
  key: "getPosition",
7426
7430
  value: function getPosition(e, t) {
7427
7431
  var r, s, o;
@@ -7444,18 +7448,18 @@ var Ne = /*#__PURE__*/function () {
7444
7448
  key: "createName",
7445
7449
  value: function createName(e, t) {
7446
7450
  var i = document.createElement("div");
7447
- return i.classList.add("name"), i.textContent = Ne.getNameText(e, t), Ne.applyStyle(i, e, t), i;
7451
+ return i.classList.add("name"), i.textContent = Oe.getNameText(e, t), Oe.applyStyle(i, e, t), i;
7448
7452
  }
7449
7453
  }, {
7450
7454
  key: "add",
7451
7455
  value: function add(e, t, i) {
7452
7456
  var r = typeof i == "boolean" ? {} : i,
7453
- s = Ne.createName(t, r),
7454
- o = Ne.getPosition(t, r);
7457
+ s = Oe.createName(t, r),
7458
+ o = Oe.getPosition(t, r);
7455
7459
  s.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", s);
7456
7460
  }
7457
7461
  }]);
7458
- return Ne;
7462
+ return Oe;
7459
7463
  }();
7460
7464
  var L = /*#__PURE__*/function () {
7461
7465
  function L(e, t, i) {
@@ -7466,9 +7470,9 @@ var L = /*#__PURE__*/function () {
7466
7470
  var r = t.permittedErrorPrefixes,
7467
7471
  s = t.introPanelMarkUp,
7468
7472
  o = t.demo;
7469
- this._remarkable = Si.createNew(), this.elementRef = L.createContainerElement(), this.messageStyles = e.messageStyles, this._avatars = e.avatars, this._names = e.names, this._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this._onNewMessage = Mi.onNewMessage.bind(this, e), this._onClearMessages = Mi.onClearMessages.bind(this, e), this._displayLoadingMessage = L.getDisplayLoadingMessage(e, t), this._permittedErrorPrefixes = r, this.addSetupMessageIfNeeded(e, t), this.populateIntroPanel(i, s, e.introPanelStyle), e.introMessage && this.addIntroductoryMessage(e.introMessage), e.initialMessages && this.populateInitialMessages(e.initialMessages), this._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
7473
+ this._remarkable = wi.createNew(), this.elementRef = L.createContainerElement(), this.messageStyles = e.messageStyles, this._avatars = e.avatars, this._names = e.names, this._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this._onNewMessage = Ti.onNewMessage.bind(this, e), this._onClearMessages = Ti.onClearMessages.bind(this, e), this._displayLoadingMessage = L.getDisplayLoadingMessage(e, t), this._permittedErrorPrefixes = r, this.addSetupMessageIfNeeded(e, t), this.populateIntroPanel(i, s, e.introPanelStyle), e.introMessage && this.addIntroductoryMessage(e.introMessage), e.initialMessages && this.populateInitialMessages(e.initialMessages), this._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
7470
7474
  return JSON.parse(JSON.stringify(_this29.messages));
7471
- }, e.clearMessages = this.clearMessages.bind(this), e.refreshMessages = this.refreshTextMessages.bind(this), e.scrollToBottom = this.scrollToBottom.bind(this), o && this.prepareDemo(o), e.textToSpeech && mt.processConfig(e.textToSpeech, function (c) {
7475
+ }, e.clearMessages = this.clearMessages.bind(this), e.refreshMessages = this.refreshTextMessages.bind(this), e.scrollToBottom = this.scrollToBottom.bind(this), o && this.prepareDemo(o), e.textToSpeech && gt.processConfig(e.textToSpeech, function (c) {
7472
7476
  _this29._textToSpeech = c;
7473
7477
  }), setTimeout(function () {
7474
7478
  _this29.submitUserMessage = e.submitUserMessage;
@@ -7496,7 +7500,7 @@ var L = /*#__PURE__*/function () {
7496
7500
  var o = this.createAndAppendNewMessageElement(this._introMessage.text, !0);
7497
7501
  this.applyCustomStyles(o, !0, !1, (i = this.messageStyles) == null ? void 0 : i.intro);
7498
7502
  } else if ((r = this._introMessage) != null && r.html) {
7499
- var _o3 = De.add(this, this._introMessage.html, !0, this._messageElementRefs);
7503
+ var _o3 = je.add(this, this._introMessage.html, !0, this._messageElementRefs);
7500
7504
  this.applyCustomStyles(_o3, !0, !1, (s = this.messageStyles) == null ? void 0 : s.intro);
7501
7505
  }
7502
7506
  }
@@ -7505,7 +7509,7 @@ var L = /*#__PURE__*/function () {
7505
7509
  value: function populateInitialMessages(e) {
7506
7510
  var _this30 = this;
7507
7511
  e.forEach(function (t) {
7508
- Ut.processInitialMessageFile(t), _this30.addNewMessage(t, t.role === Lt.AI_ROLE, !0);
7512
+ qt.processInitialMessageFile(t), _this30.addNewMessage(t, t.role === Rt.AI_ROLE, !0);
7509
7513
  }), setTimeout(function () {
7510
7514
  return _this30.scrollToBottom();
7511
7515
  });
@@ -7519,7 +7523,7 @@ var L = /*#__PURE__*/function () {
7519
7523
  }, {
7520
7524
  key: "addInnerContainerElements",
7521
7525
  value: function addInnerContainerElements(e, t, i) {
7522
- return e.classList.add("message-bubble", i ? "ai-message-text" : "user-message-text"), e.innerHTML = this._remarkable.render(t), e.innerText.trim().length === 0 && (e.innerText = t), this._avatars && ae.add(e, i, this._avatars), this._names && Ne.add(e, i, this._names), {
7526
+ return e.classList.add("message-bubble", i ? "ai-message-text" : "user-message-text"), e.innerHTML = this._remarkable.render(t), e.innerText.trim().length === 0 && (e.innerText = t), this._avatars && ae.add(e, i, this._avatars), this._names && Oe.add(e, i, this._names), {
7523
7527
  bubbleElement: e
7524
7528
  };
7525
7529
  }
@@ -7560,8 +7564,8 @@ var L = /*#__PURE__*/function () {
7560
7564
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
7561
7565
  var r = !0;
7562
7566
  var s = L.createMessageContent(t, e);
7563
- if (s.text !== void 0 && e.text !== null && (this.addNewTextMessage(s.text, t), !i && this._textToSpeech && t && mt.speak(s.text, this._textToSpeech)), s.files && Array.isArray(s.files) && oe.addMessages(this, s.files, t), s.html !== void 0 && s.html !== null) {
7564
- var o = De.add(this, s.html, t, this._messageElementRefs);
7567
+ if (s.text !== void 0 && e.text !== null && (this.addNewTextMessage(s.text, t), !i && this._textToSpeech && t && gt.speak(s.text, this._textToSpeech)), s.files && Array.isArray(s.files) && oe.addMessages(this, s.files, t), s.html !== void 0 && s.html !== null) {
7568
+ var o = je.add(this, s.html, t, this._messageElementRefs);
7565
7569
  ie.isElementTemporary(o) && delete s.html, r = !!o;
7566
7570
  }
7567
7571
  this.updateStateOnMessage(s, r, i);
@@ -7600,7 +7604,7 @@ var L = /*#__PURE__*/function () {
7600
7604
  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.";
7601
7605
  s.innerHTML = o;
7602
7606
  var a = O.extractParticularSharedStyles(["fontSize", "fontFamily"], (d = this.messageStyles) == null ? void 0 : d["default"]);
7603
- O.applyCustomStylesToElements(i, !1, a), O.applyCustomStylesToElements(i, !1, (u = this.messageStyles) == null ? void 0 : u.error), this.elementRef.appendChild(r), this.scrollToBottom(), this._textToSpeech && mt.speak(o, this._textToSpeech), this._streamedText = "";
7607
+ O.applyCustomStylesToElements(i, !1, a), O.applyCustomStylesToElements(i, !1, (u = this.messageStyles) == null ? void 0 : u.error), this.elementRef.appendChild(r), this.scrollToBottom(), this._textToSpeech && gt.speak(o, this._textToSpeech), this._streamedText = "";
7604
7608
  }
7605
7609
  }, {
7606
7610
  key: "getPermittedMessage",
@@ -7650,7 +7654,7 @@ var L = /*#__PURE__*/function () {
7650
7654
  i = e.bubbleElement;
7651
7655
  i.classList.add("loading-message-text");
7652
7656
  var r = document.createElement("div");
7653
- r.classList.add("dots-flashing"), i.appendChild(r), this.applyCustomStyles(e, !0, !1, (s = this.messageStyles) == null ? void 0 : s.loading), zi.set(i, this.messageStyles), this.elementRef.appendChild(t), this.scrollToBottom();
7657
+ r.classList.add("dots-flashing"), i.appendChild(r), this.applyCustomStyles(e, !0, !1, (s = this.messageStyles) == null ? void 0 : s.loading), Fi.set(i, this.messageStyles), this.elementRef.appendChild(t), this.scrollToBottom();
7654
7658
  }
7655
7659
  }, {
7656
7660
  key: "addNewStreamedMessage",
@@ -7666,7 +7670,7 @@ var L = /*#__PURE__*/function () {
7666
7670
  key: "updateStreamedMessage",
7667
7671
  value: function updateStreamedMessage(e, t) {
7668
7672
  var r, s, o, a, l;
7669
- var i = Kt.isScrollbarAtBottomOfElement(this.elementRef);
7673
+ var i = Jt.isScrollbarAtBottomOfElement(this.elementRef);
7670
7674
  if (e.trim().length !== 0) {
7671
7675
  var c = (r = this.messageStyles) == null ? void 0 : r["default"];
7672
7676
  t.style.color = ((o = (s = c == null ? void 0 : c.ai) == null ? void 0 : s.bubble) == null ? void 0 : o.color) || ((l = (a = c == null ? void 0 : c.shared) == null ? void 0 : a.bubble) == null ? void 0 : l.color) || "";
@@ -7679,12 +7683,12 @@ var L = /*#__PURE__*/function () {
7679
7683
  var e;
7680
7684
  (e = this.getLastMessageBubbleElement()) != null && e.classList.contains("streamed-message") && (this._textElementsToText[this._textElementsToText.length - 1][1] = this._streamedText, this.messages[this.messages.length - 1].text = this._streamedText, this.sendClientUpdate(L.createMessageContent(!0, {
7681
7685
  text: this._streamedText
7682
- }), !1), this._textToSpeech && mt.speak(this._streamedText, this._textToSpeech), this._streamedText = "");
7686
+ }), !1), this._textToSpeech && gt.speak(this._streamedText, this._textToSpeech), this._streamedText = "");
7683
7687
  }
7684
7688
  }, {
7685
7689
  key: "populateIntroPanel",
7686
7690
  value: function populateIntroPanel(e, t, i) {
7687
- (e || t) && (this._introPanel = new It(e, t, i), this._introPanel._elementRef && (le.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
7691
+ (e || t) && (this._introPanel = new Lt(e, t, i), this._introPanel._elementRef && (le.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
7688
7692
  }
7689
7693
  }, {
7690
7694
  key: "addMultipleFiles",
@@ -7747,7 +7751,7 @@ var L = /*#__PURE__*/function () {
7747
7751
  key: "refreshTextMessages",
7748
7752
  value: function refreshTextMessages() {
7749
7753
  var _this31 = this;
7750
- this._remarkable = Si.createNew(), this._textElementsToText.forEach(function (e) {
7754
+ this._remarkable = wi.createNew(), this._textElementsToText.forEach(function (e) {
7751
7755
  e[0].bubbleElement.innerHTML = _this31._remarkable.render(e[1]);
7752
7756
  });
7753
7757
  }
@@ -7767,7 +7771,7 @@ var L = /*#__PURE__*/function () {
7767
7771
  key: "createMessageContent",
7768
7772
  value: function createMessageContent(e, t) {
7769
7773
  var i = {
7770
- role: Lt.getRole(e)
7774
+ role: Rt.getRole(e)
7771
7775
  },
7772
7776
  r = t.text,
7773
7777
  s = t.files,
@@ -7805,7 +7809,7 @@ var L = /*#__PURE__*/function () {
7805
7809
  }]);
7806
7810
  return L;
7807
7811
  }();
7808
- var st = /*#__PURE__*/function () {
7812
+ var ot = /*#__PURE__*/function () {
7809
7813
  function G() {
7810
7814
  _classCallCheck(this, G);
7811
7815
  }
@@ -7841,16 +7845,16 @@ var st = /*#__PURE__*/function () {
7841
7845
  }]);
7842
7846
  return G;
7843
7847
  }();
7844
- st.INPUT_OUTSIDE_LEFT_ADJUSTMENT_CLASS = "text-input-container-left-adjustment";
7845
- st.INPUT_OUTSIDE_RIGHT_ADJUSTMENT_CLASS = "text-input-container-right-adjustment";
7846
- st.INPUT_OUTSIDE_LEFT_SMALL_ADJUSTMENT_CLASS = "text-input-container-left-small-adjustment";
7847
- st.INPUT_OUTSIDE_RIGHT_SMALL_ADJUSTMENT_CLASS = "text-input-container-right-small-adjustment";
7848
- var Ro = st;
7849
- var Be = /*#__PURE__*/function () {
7850
- function Be() {
7851
- _classCallCheck(this, Be);
7852
- }
7853
- _createClass(Be, null, [{
7848
+ ot.INPUT_OUTSIDE_LEFT_ADJUSTMENT_CLASS = "text-input-container-left-adjustment";
7849
+ ot.INPUT_OUTSIDE_RIGHT_ADJUSTMENT_CLASS = "text-input-container-right-adjustment";
7850
+ ot.INPUT_OUTSIDE_LEFT_SMALL_ADJUSTMENT_CLASS = "text-input-container-left-small-adjustment";
7851
+ ot.INPUT_OUTSIDE_RIGHT_SMALL_ADJUSTMENT_CLASS = "text-input-container-right-small-adjustment";
7852
+ var Ro = ot;
7853
+ var Ue = /*#__PURE__*/function () {
7854
+ function Ue() {
7855
+ _classCallCheck(this, Ue);
7856
+ }
7857
+ _createClass(Ue, null, [{
7854
7858
  key: "create",
7855
7859
  value: function create() {
7856
7860
  return Array.from({
@@ -7874,13 +7878,13 @@ var Be = /*#__PURE__*/function () {
7874
7878
  key: "addButton",
7875
7879
  value: function addButton(e, t, i) {
7876
7880
  t.classList.add(i);
7877
- var r = Be.getContainerIndex(i);
7881
+ var r = Ue.getContainerIndex(i);
7878
7882
  e[r].appendChild(t), r === 3 && t.classList.add("outside-right");
7879
7883
  }
7880
7884
  }]);
7881
- return Be;
7885
+ return Ue;
7882
7886
  }();
7883
- var sn = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"];
7887
+ var on = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"];
7884
7888
  var R = /*#__PURE__*/function () {
7885
7889
  function R() {
7886
7890
  _classCallCheck(this, R);
@@ -7965,14 +7969,14 @@ var Z = /*#__PURE__*/function () {
7965
7969
  }]);
7966
7970
  return Z;
7967
7971
  }();
7968
- var ot = /*#__PURE__*/function () {
7969
- function ot(e, t, i, r) {
7970
- _classCallCheck(this, ot);
7972
+ var at = /*#__PURE__*/function () {
7973
+ function at(e, t, i, r) {
7974
+ _classCallCheck(this, at);
7971
7975
  this._mouseState = {
7972
7976
  state: "default"
7973
7977
  }, this.elementRef = e, this._customStyles = i, this.position = t, this.dropupText = r;
7974
7978
  }
7975
- _createClass(ot, [{
7979
+ _createClass(at, [{
7976
7980
  key: "buttonMouseLeave",
7977
7981
  value: function buttonMouseLeave(e) {
7978
7982
  this._mouseState.state = "default", e && (Z.unsetAllCSS(this.elementRef, e), Z.setElementsCSS(this.elementRef, e, "default"));
@@ -8016,17 +8020,17 @@ var ot = /*#__PURE__*/function () {
8016
8020
  i && Z.setElementCssUpToState(this.elementRef, i, this._mouseState.state), this.setEvents(i);
8017
8021
  }
8018
8022
  }]);
8019
- return ot;
8023
+ return at;
8020
8024
  }();
8021
- var et = /*#__PURE__*/function () {
8022
- function et() {
8023
- _classCallCheck(this, et);
8025
+ var tt = /*#__PURE__*/function () {
8026
+ function tt() {
8027
+ _classCallCheck(this, tt);
8024
8028
  }
8025
- _createClass(et, null, [{
8029
+ _createClass(tt, null, [{
8026
8030
  key: "focusItemWhenOnEdge",
8027
8031
  value: function focusItemWhenOnEdge(e, t) {
8028
8032
  var i = t ? e.children[0] : e.children[e.children.length - 1];
8029
- et.focusSiblingItem(i, e, t, !0);
8033
+ tt.focusSiblingItem(i, e, t, !0);
8030
8034
  }
8031
8035
  // isEdgeItem means is it a start or end item
8032
8036
  // prettier-ignore
@@ -8035,10 +8039,10 @@ var et = /*#__PURE__*/function () {
8035
8039
  value: function focusSiblingItem(e, t, i) {
8036
8040
  var r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
8037
8041
  var s = r ? e : e[i ? "nextSibling" : "previousSibling"];
8038
- s ? (e.dispatchEvent(new MouseEvent("mouseleave")), s.dispatchEvent(new MouseEvent("mouseenter"))) : (e.dispatchEvent(new MouseEvent("mouseleave")), et.focusItemWhenOnEdge(t, i));
8042
+ s ? (e.dispatchEvent(new MouseEvent("mouseleave")), s.dispatchEvent(new MouseEvent("mouseenter"))) : (e.dispatchEvent(new MouseEvent("mouseleave")), tt.focusItemWhenOnEdge(t, i));
8039
8043
  }
8040
8044
  }]);
8041
- return et;
8045
+ return tt;
8042
8046
  }();
8043
8047
  var me = /*#__PURE__*/function () {
8044
8048
  function me() {
@@ -8092,16 +8096,16 @@ var me = /*#__PURE__*/function () {
8092
8096
  }]);
8093
8097
  return me;
8094
8098
  }();
8095
- var Bi = /*#__PURE__*/function () {
8096
- function Bi(e, t) {
8099
+ var Ui = /*#__PURE__*/function () {
8100
+ function Ui(e, t) {
8097
8101
  var _this32 = this;
8098
- _classCallCheck(this, Bi);
8102
+ _classCallCheck(this, Ui);
8099
8103
  var i;
8100
- this._isOpen = !0, this._styles = t, this.elementRef = Bi.createElement((i = this._styles) == null ? void 0 : i.container), this.close(), setTimeout(function () {
8104
+ this._isOpen = !0, this._styles = t, this.elementRef = Ui.createElement((i = this._styles) == null ? void 0 : i.container), this.close(), setTimeout(function () {
8101
8105
  return _this32.addWindowEvents(e);
8102
8106
  });
8103
8107
  }
8104
- _createClass(Bi, [{
8108
+ _createClass(Ui, [{
8105
8109
  key: "open",
8106
8110
  value: function open() {
8107
8111
  this.elementRef.style.display = "block", this._isOpen = !0;
@@ -8132,7 +8136,7 @@ var Bi = /*#__PURE__*/function () {
8132
8136
  e.parentElement !== ((i = t.target.shadowRoot) == null ? void 0 : i.children[0]) && _this33.close();
8133
8137
  }), window.addEventListener("keydown", function (t) {
8134
8138
  var i, r, s;
8135
- _this33._isOpen && (t.key === T.ESCAPE ? (_this33.close(), (i = _this33.highlightedItem) == null || i.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === T.ENTER ? ((r = _this33.highlightedItem) == null || r.click(), (s = _this33.highlightedItem) == null || s.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === T.ARROW_DOWN ? et.focusSiblingItem(_this33.highlightedItem || _this33.elementRef.children[_this33.elementRef.children.length - 1], _this33.elementRef, !0) : t.key === T.ARROW_UP && et.focusSiblingItem(_this33.highlightedItem || _this33.elementRef.children[0], _this33.elementRef, !1));
8139
+ _this33._isOpen && (t.key === T.ESCAPE ? (_this33.close(), (i = _this33.highlightedItem) == null || i.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === T.ENTER ? ((r = _this33.highlightedItem) == null || r.click(), (s = _this33.highlightedItem) == null || s.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === T.ARROW_DOWN ? tt.focusSiblingItem(_this33.highlightedItem || _this33.elementRef.children[_this33.elementRef.children.length - 1], _this33.elementRef, !0) : t.key === T.ARROW_UP && tt.focusSiblingItem(_this33.highlightedItem || _this33.elementRef.children[0], _this33.elementRef, !1));
8136
8140
  });
8137
8141
  }
8138
8142
  }], [{
@@ -8142,27 +8146,27 @@ var Bi = /*#__PURE__*/function () {
8142
8146
  return t.id = "dropup-menu", Object.assign(t.style, e), t;
8143
8147
  }
8144
8148
  }]);
8145
- return Bi;
8149
+ return Ui;
8146
8150
  }();
8147
- var je = /*#__PURE__*/function (_ot) {
8148
- _inherits(je, _ot);
8149
- var _super34 = _createSuper(je);
8150
- function je(e, t) {
8151
+ var ze = /*#__PURE__*/function (_at) {
8152
+ _inherits(ze, _at);
8153
+ var _super34 = _createSuper(ze);
8154
+ function ze(e, t) {
8151
8155
  var _this34;
8152
- _classCallCheck(this, je);
8156
+ _classCallCheck(this, ze);
8153
8157
  var r;
8154
- _this34 = _super34.call(this, je.createButtonElement(), void 0, {
8158
+ _this34 = _super34.call(this, ze.createButtonElement(), void 0, {
8155
8159
  styles: (r = t == null ? void 0 : t.button) == null ? void 0 : r.styles
8156
8160
  });
8157
8161
  var i = _this34.createInnerElements(_this34._customStyles);
8158
- _this34._menu = new Bi(e, t == null ? void 0 : t.menu), _this34.addClickEvent(), _this34.buttonContainer = je.createButtonContainer(), _this34.elementRef.appendChild(i.styles), _this34.buttonContainer.appendChild(_this34.elementRef), _this34.elementRef.classList.add("dropup-icon", "upload-file-button"), _this34.buttonContainer.appendChild(_this34._menu.elementRef), _this34.reapplyStateStyle("styles"), _this34.addContainerEvents(e);
8162
+ _this34._menu = new Ui(e, t == null ? void 0 : t.menu), _this34.addClickEvent(), _this34.buttonContainer = ze.createButtonContainer(), _this34.elementRef.appendChild(i.styles), _this34.buttonContainer.appendChild(_this34.elementRef), _this34.elementRef.classList.add("dropup-icon", "upload-file-button"), _this34.buttonContainer.appendChild(_this34._menu.elementRef), _this34.reapplyStateStyle("styles"), _this34.addContainerEvents(e);
8159
8163
  return _this34;
8160
8164
  }
8161
- _createClass(je, [{
8165
+ _createClass(ze, [{
8162
8166
  key: "createInnerElements",
8163
8167
  value: function createInnerElements(e) {
8164
8168
  return {
8165
- styles: this.createInnerElement(je.createSVGIconElement(), "styles", e)
8169
+ styles: this.createInnerElement(ze.createSVGIconElement(), "styles", e)
8166
8170
  };
8167
8171
  }
8168
8172
  }, {
@@ -8213,8 +8217,8 @@ var je = /*#__PURE__*/function (_ot) {
8213
8217
  return (i = t == null ? void 0 : t.button) != null && i.position ? (r = t == null ? void 0 : t.button) == null ? void 0 : r.position : e["outside-left"].length > 0 && e["outside-right"].length === 0 ? "outside-right" : "outside-left";
8214
8218
  }
8215
8219
  }]);
8216
- return je;
8217
- }(ot);
8220
+ return ze;
8221
+ }(at);
8218
8222
  var N = /*#__PURE__*/function () {
8219
8223
  function N() {
8220
8224
  _classCallCheck(this, N);
@@ -8224,16 +8228,16 @@ var N = /*#__PURE__*/function () {
8224
8228
  value:
8225
8229
  // prettier-ignore
8226
8230
  function addToDropup(e, t, i, r) {
8227
- var s = new je(i, r);
8228
- sn.forEach(function (a) {
8231
+ var s = new ze(i, r);
8232
+ on.forEach(function (a) {
8229
8233
  var l = t["dropup-menu"].findIndex(function (d) {
8230
8234
  return d.buttonType === a;
8231
8235
  }),
8232
8236
  c = t["dropup-menu"][l];
8233
8237
  c && (s.addItem(c.button), t["dropup-menu"].splice(l, 1));
8234
8238
  });
8235
- var o = je.getPosition(t, r);
8236
- Be.addButton(e, s.buttonContainer, o), t[o].push({});
8239
+ var o = ze.getPosition(t, r);
8240
+ Ue.addButton(e, s.buttonContainer, o), t[o].push({});
8237
8241
  }
8238
8242
  }, {
8239
8243
  key: "addToSideContainer",
@@ -8241,7 +8245,7 @@ var N = /*#__PURE__*/function () {
8241
8245
  ["inside-left", "inside-right", "outside-left", "outside-right"].forEach(function (r) {
8242
8246
  var s = r;
8243
8247
  t[s].forEach(function (o) {
8244
- Be.addButton(e, o.button.elementRef, s);
8248
+ Ue.addButton(e, o.button.elementRef, s);
8245
8249
  });
8246
8250
  });
8247
8251
  }
@@ -8275,7 +8279,7 @@ var N = /*#__PURE__*/function () {
8275
8279
  s && N.setPosition(e, r, t[s]);
8276
8280
  }), t["inside-right"].length === 0 && e.submit && N.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? N.setPosition(e, "submit", t["outside-right"]) : e.microphone ? N.setPosition(e, "microphone", t["outside-right"]) : e.camera && N.setPosition(e, "camera", t["outside-right"])), e.submit && N.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && N.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
8277
8281
  var i = Object.keys(e);
8278
- return i.length > 1 || t["dropup-menu"].length > 0 ? sn.forEach(function (r) {
8282
+ return i.length > 1 || t["dropup-menu"].length > 0 ? on.forEach(function (r) {
8279
8283
  e[r] && t["dropup-menu"].push(_objectSpread(_objectSpread({}, e[r]), {}, {
8280
8284
  buttonType: r
8281
8285
  }));
@@ -8338,7 +8342,7 @@ var be = /*#__PURE__*/function () {
8338
8342
  var r = be.createImageAttachment(t);
8339
8343
  this.addFileAttachment(e, "image", r, i);
8340
8344
  } else if (e.type.startsWith("audio")) {
8341
- var _r3 = Ci.createAudioAttachment(t);
8345
+ var _r3 = Ai.createAudioAttachment(t);
8342
8346
  this.addFileAttachment(e, "audio", _r3, i);
8343
8347
  } else {
8344
8348
  var _r4 = be.createAnyFileAttachment(e.name);
@@ -8379,7 +8383,7 @@ var be = /*#__PURE__*/function () {
8379
8383
  return s === e;
8380
8384
  }),
8381
8385
  i = this._attachments[t].attachmentContainerElement;
8382
- this._attachments.splice(t, 1), Ci.stopAttachmentPlayback(i), i.remove(), this._toggleContainerDisplay(!1), (r = this._validationHandler) == null || r.call(this);
8386
+ this._attachments.splice(t, 1), Ai.stopAttachmentPlayback(i), i.remove(), this._toggleContainerDisplay(!1), (r = this._validationHandler) == null || r.call(this);
8383
8387
  }
8384
8388
  }, {
8385
8389
  key: "getFiles",
@@ -8445,7 +8449,7 @@ var be = /*#__PURE__*/function () {
8445
8449
  return be;
8446
8450
  }();
8447
8451
  var Fo = "<?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>",
8448
- on = "<?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>",
8452
+ an = "<?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>",
8449
8453
  er = /*#__PURE__*/function (_be) {
8450
8454
  _inherits(fe, _be);
8451
8455
  var _super35 = _createSuper(fe);
@@ -8476,7 +8480,7 @@ var Fo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
8476
8480
  i.classList.add("audio-placeholder-text-3-digits");
8477
8481
  var r = document.createElement("div");
8478
8482
  r.classList.add("file-attachment-text-container", "audio-placeholder-text-3-digits-container"), r.appendChild(i);
8479
- var s = B.createSVGElement(on);
8483
+ var s = B.createSVGElement(an);
8480
8484
  return s.classList.add("attachment-icon", "stop-icon", "not-removable-attachment-icon"), i.textContent = "0:00", this._activePlaceholderTimer = this.createTimer(i, e), t.appendChild(r), this.addPlaceholderAudioAttachmentEvents(t, s, r), t;
8481
8485
  }
8482
8486
  }, {
@@ -8529,12 +8533,12 @@ var Fo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
8529
8533
  }, {
8530
8534
  key: "addAudioElements",
8531
8535
  value: function addAudioElements(e, t) {
8532
- var i = e.parentElement ? Kt.cloneElement(e) : e,
8536
+ var i = e.parentElement ? Jt.cloneElement(e) : e,
8533
8537
  r = document.createElement("audio");
8534
8538
  r.src = t;
8535
8539
  var s = B.createSVGElement(Fo);
8536
8540
  s.classList.add("attachment-icon", "play-icon");
8537
- var o = B.createSVGElement(on);
8541
+ var o = B.createSVGElement(an);
8538
8542
  o.classList.add("attachment-icon", "stop-icon"), i.replaceChildren(s), r.onplay = function () {
8539
8543
  i.replaceChildren(o);
8540
8544
  }, r.onpause = function () {
@@ -8561,7 +8565,7 @@ var Fo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
8561
8565
  return fe;
8562
8566
  }(be);
8563
8567
  er.TIMER_LIMIT_S = 5999;
8564
- var Ci = er;
8568
+ var Ai = er;
8565
8569
  var Bo = /*#__PURE__*/function () {
8566
8570
  function Bo() {
8567
8571
  _classCallCheck(this, Bo);
@@ -8571,20 +8575,20 @@ var Bo = /*#__PURE__*/function () {
8571
8575
  value:
8572
8576
  // prettier-ignore
8573
8577
  function create(e, t, i, r, s) {
8574
- return s === "audio" ? new Ci(e, t, i, r) : new be(e, t, i, r);
8578
+ return s === "audio" ? new Ai(e, t, i, r) : new be(e, t, i, r);
8575
8579
  }
8576
8580
  }]);
8577
8581
  return Bo;
8578
8582
  }();
8579
- var at = /*#__PURE__*/function () {
8580
- function at(e, t, i) {
8581
- _classCallCheck(this, at);
8583
+ var lt = /*#__PURE__*/function () {
8584
+ function lt(e, t, i) {
8585
+ _classCallCheck(this, lt);
8582
8586
  this._fileAttachmentsTypes = [], this.elementRef = this.createAttachmentContainer();
8583
8587
  var r = _typeof(i) == "object" && !!i.displayFileAttachmentContainer;
8584
8588
  this.toggleContainerDisplay(r), e.appendChild(this.elementRef), t && Object.assign(this.elementRef.style, t);
8585
8589
  }
8586
8590
  // prettier-ignore
8587
- _createClass(at, [{
8591
+ _createClass(lt, [{
8588
8592
  key: "addType",
8589
8593
  value: function addType(e, t, i) {
8590
8594
  var r = Bo.create(e, t, this.toggleContainerDisplay.bind(this), this.elementRef, i);
@@ -8648,7 +8652,7 @@ var at = /*#__PURE__*/function () {
8648
8652
  }, {
8649
8653
  key: "addFilesToAnyType",
8650
8654
  value: function addFilesToAnyType(e) {
8651
- at.addFilesToType(e, this._fileAttachmentsTypes);
8655
+ lt.addFilesToType(e, this._fileAttachmentsTypes);
8652
8656
  }
8653
8657
  }, {
8654
8658
  key: "removeAllFiles",
@@ -8673,7 +8677,7 @@ var at = /*#__PURE__*/function () {
8673
8677
  });
8674
8678
  }
8675
8679
  }]);
8676
- return at;
8680
+ return lt;
8677
8681
  }();
8678
8682
  var tr = /*#__PURE__*/function () {
8679
8683
  function ee(e, t, i) {
@@ -8786,24 +8790,24 @@ var tr = /*#__PURE__*/function () {
8786
8790
  return ee;
8787
8791
  }();
8788
8792
  tr.MODAL_CLOSE_TIMEOUT_MS = 190;
8789
- var Ve = tr;
8790
- var Je = /*#__PURE__*/function (_ot2) {
8791
- _inherits(Je, _ot2);
8792
- var _super36 = _createSuper(Je);
8793
+ var We = tr;
8794
+ var Ye = /*#__PURE__*/function (_at2) {
8795
+ _inherits(Ye, _at2);
8796
+ var _super36 = _createSuper(Ye);
8793
8797
  // prettier-ignore
8794
- function Je(e, t, i, r, s, o) {
8798
+ function Ye(e, t, i, r, s, o) {
8795
8799
  var _this43;
8796
- _classCallCheck(this, Je);
8800
+ _classCallCheck(this, Ye);
8797
8801
  var l, c, d, u, p, h;
8798
- _this43 = _super36.call(this, Je.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o);
8802
+ _this43 = _super36.call(this, Ye.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o);
8799
8803
  var a = _this43.createInnerElements(r, s, _this43._customStyles);
8800
- _this43._inputElement = Je.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this43.addClickEvent(e, i), _this43.elementRef.replaceChildren(a.styles), _this43.reapplyStateStyle("styles"), _this43._fileAttachmentsType = t, _this43._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (h = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : h.openModalOnce;
8804
+ _this43._inputElement = Ye.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this43.addClickEvent(e, i), _this43.elementRef.replaceChildren(a.styles), _this43.reapplyStateStyle("styles"), _this43._fileAttachmentsType = t, _this43._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (h = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : h.openModalOnce;
8801
8805
  return _this43;
8802
8806
  }
8803
- _createClass(Je, [{
8807
+ _createClass(Ye, [{
8804
8808
  key: "createInnerElements",
8805
8809
  value: function createInnerElements(e, t, i) {
8806
- var r = Je.createSVGIconElement(e, t);
8810
+ var r = Ye.createSVGIconElement(e, t);
8807
8811
  return {
8808
8812
  styles: this.createInnerElement(r, "styles", i)
8809
8813
  };
@@ -8816,7 +8820,7 @@ var Je = /*#__PURE__*/function (_ot2) {
8816
8820
  }, {
8817
8821
  key: "import",
8818
8822
  value: function _import(e) {
8819
- at.addFilesToType(Array.from(e.files || []), [this._fileAttachmentsType]), e.value = "";
8823
+ lt.addFilesToType(Array.from(e.files || []), [this._fileAttachmentsType]), e.value = "";
8820
8824
  }
8821
8825
  }, {
8822
8826
  key: "createInnerElement",
@@ -8827,7 +8831,7 @@ var Je = /*#__PURE__*/function (_ot2) {
8827
8831
  key: "addClickEvent",
8828
8832
  value: function addClickEvent(e, t) {
8829
8833
  var i = this.triggerImportPrompt.bind(this, this._inputElement),
8830
- r = Ve.createTextModalFunc(e, t, i);
8834
+ r = We.createTextModalFunc(e, t, i);
8831
8835
  this.elementRef.onclick = this.click.bind(this, r);
8832
8836
  }
8833
8837
  }, {
@@ -8854,8 +8858,8 @@ var Je = /*#__PURE__*/function (_ot2) {
8854
8858
  return i.id = e, i;
8855
8859
  }
8856
8860
  }]);
8857
- return Je;
8858
- }(ot);
8861
+ return Ye;
8862
+ }(at);
8859
8863
  var te = /*#__PURE__*/function () {
8860
8864
  function te() {
8861
8865
  _classCallCheck(this, te);
@@ -8910,11 +8914,11 @@ var te = /*#__PURE__*/function () {
8910
8914
  }]);
8911
8915
  return te;
8912
8916
  }();
8913
- var Rt = /*#__PURE__*/function () {
8914
- function Rt() {
8915
- _classCallCheck(this, Rt);
8917
+ var Nt = /*#__PURE__*/function () {
8918
+ function Nt() {
8919
+ _classCallCheck(this, Nt);
8916
8920
  }
8917
- _createClass(Rt, null, [{
8921
+ _createClass(Nt, null, [{
8918
8922
  key: "useValidationFunc",
8919
8923
  value: // prettier-ignore
8920
8924
  function () {
@@ -8951,7 +8955,7 @@ var Rt = /*#__PURE__*/function () {
8951
8955
  }, {
8952
8956
  key: "attach",
8953
8957
  value: function attach(e, t, i, r, s) {
8954
- var o = e.validateInput || Ut.processValidateInput(e);
8958
+ var o = e.validateInput || qt.processValidateInput(e);
8955
8959
  e._validationHandler = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71() {
8956
8960
  var a,
8957
8961
  l,
@@ -8960,14 +8964,14 @@ var Rt = /*#__PURE__*/function () {
8960
8964
  while (1) switch (_context71.prev = _context71.next) {
8961
8965
  case 0:
8962
8966
  a = _args71.length > 0 && _args71[0] !== undefined ? _args71[0] : !1;
8963
- if (!(t.isSubmitProgrammaticallyDisabled === !0 || !Rt.validateWebsocket(t, s))) {
8967
+ if (!(t.isSubmitProgrammaticallyDisabled === !0 || !Nt.validateWebsocket(t, s))) {
8964
8968
  _context71.next = 3;
8965
8969
  break;
8966
8970
  }
8967
8971
  return _context71.abrupt("return", !1);
8968
8972
  case 3:
8969
8973
  l = o || t.canSendMessage;
8970
- return _context71.abrupt("return", l ? Rt.useValidationFunc(l, i, r, s, a) : null);
8974
+ return _context71.abrupt("return", l ? Nt.useValidationFunc(l, i, r, s, a) : null);
8971
8975
  case 5:
8972
8976
  case "end":
8973
8977
  return _context71.stop();
@@ -8976,22 +8980,22 @@ var Rt = /*#__PURE__*/function () {
8976
8980
  }));
8977
8981
  }
8978
8982
  }]);
8979
- return Rt;
8983
+ return Nt;
8980
8984
  }();
8981
8985
  var Uo = "<?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";
8982
- var tt = /*#__PURE__*/function (_ot3) {
8983
- _inherits(tt, _ot3);
8984
- var _super37 = _createSuper(tt);
8985
- function tt(e) {
8986
+ var it = /*#__PURE__*/function (_at3) {
8987
+ _inherits(it, _at3);
8988
+ var _super37 = _createSuper(it);
8989
+ function it(e) {
8986
8990
  var _this44;
8987
- _classCallCheck(this, tt);
8988
- (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this44 = _super37.call(this, tt.createMicrophoneElement(), e == null ? void 0 : e.position, e), _this44.isActive = !1, _this44._innerElements = _this44.createInnerElements(_this44._customStyles), _this44.changeToDefault();
8991
+ _classCallCheck(this, it);
8992
+ (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this44 = _super37.call(this, it.createMicrophoneElement(), e == null ? void 0 : e.position, e), _this44.isActive = !1, _this44._innerElements = _this44.createInnerElements(_this44._customStyles), _this44.changeToDefault();
8989
8993
  return _this44;
8990
8994
  }
8991
- _createClass(tt, [{
8995
+ _createClass(it, [{
8992
8996
  key: "createInnerElements",
8993
8997
  value: function createInnerElements(e) {
8994
- var t = tt.createSVGIconElement();
8998
+ var t = it.createSVGIconElement();
8995
8999
  return {
8996
9000
  "default": this.createInnerElement(t, "default", e),
8997
9001
  active: this.createInnerElement(t, "active", e),
@@ -9054,17 +9058,17 @@ var tt = /*#__PURE__*/function (_ot3) {
9054
9058
  return e.id = "microphone-icon", e;
9055
9059
  }
9056
9060
  }]);
9057
- return tt;
9058
- }(ot);
9061
+ return it;
9062
+ }(at);
9059
9063
  var ir = {},
9060
- Jt = {},
9061
9064
  Yt = {},
9062
- lt = {},
9063
- _e = {};
9064
- Object.defineProperty(_e, "__esModule", {
9065
+ $t = {},
9066
+ ct = {},
9067
+ ke = {};
9068
+ Object.defineProperty(ke, "__esModule", {
9065
9069
  value: !0
9066
9070
  });
9067
- _e.Text = void 0;
9071
+ ke.Text = void 0;
9068
9072
  var ue = /*#__PURE__*/function () {
9069
9073
  function ue() {
9070
9074
  _classCallCheck(this, ue);
@@ -9095,15 +9099,15 @@ var ue = /*#__PURE__*/function () {
9095
9099
  }]);
9096
9100
  return ue;
9097
9101
  }();
9098
- _e.Text = ue;
9102
+ ke.Text = ue;
9099
9103
  ue.FIRST_CHAR_REGEX = /\S/;
9100
9104
  ue.DOUBLE_LINE = /\n\n/g;
9101
9105
  ue.ONE_LINE = /\n/g;
9102
- Object.defineProperty(lt, "__esModule", {
9106
+ Object.defineProperty(ct, "__esModule", {
9103
9107
  value: !0
9104
9108
  });
9105
- lt.Translate = void 0;
9106
- var qo = _e;
9109
+ ct.Translate = void 0;
9110
+ var qo = ke;
9107
9111
  var Ho = /*#__PURE__*/function () {
9108
9112
  function Ho() {
9109
9113
  _classCallCheck(this, Ho);
@@ -9118,12 +9122,12 @@ var Ho = /*#__PURE__*/function () {
9118
9122
  }]);
9119
9123
  return Ho;
9120
9124
  }();
9121
- lt.Translate = Ho;
9122
- Object.defineProperty(Yt, "__esModule", {
9125
+ ct.Translate = Ho;
9126
+ Object.defineProperty($t, "__esModule", {
9123
9127
  value: !0
9124
9128
  });
9125
- Yt.WebSpeechTranscript = void 0;
9126
- var an = lt;
9129
+ $t.WebSpeechTranscript = void 0;
9130
+ var ln = ct;
9127
9131
  var Go = /*#__PURE__*/function () {
9128
9132
  function Go() {
9129
9133
  _classCallCheck(this, Go);
@@ -9134,7 +9138,7 @@ var Go = /*#__PURE__*/function () {
9134
9138
  var r = "";
9135
9139
  for (var s = e.resultIndex; s < e.results.length; ++s) {
9136
9140
  var o = e.results[s][0].transcript;
9137
- i && (o = an.Translate.translate(o, i)), e.results[s].isFinal ? t += o : r += o;
9141
+ i && (o = ln.Translate.translate(o, i)), e.results[s].isFinal ? t += o : r += o;
9138
9142
  }
9139
9143
  return {
9140
9144
  interimTranscript: r,
@@ -9149,7 +9153,7 @@ var Go = /*#__PURE__*/function () {
9149
9153
  var s = "";
9150
9154
  for (var o = e.resultIndex; o < e.results.length; ++o) {
9151
9155
  var a = e.results[o][0].transcript;
9152
- i && (a = an.Translate.translate(a, i)), r += a;
9156
+ i && (a = ln.Translate.translate(a, i)), r += a;
9153
9157
  }
9154
9158
  return {
9155
9159
  interimTranscript: s,
@@ -9160,25 +9164,25 @@ var Go = /*#__PURE__*/function () {
9160
9164
  }]);
9161
9165
  return Go;
9162
9166
  }();
9163
- Yt.WebSpeechTranscript = Go;
9164
- var Ue = {};
9165
- Object.defineProperty(Ue, "__esModule", {
9167
+ $t.WebSpeechTranscript = Go;
9168
+ var qe = {};
9169
+ Object.defineProperty(qe, "__esModule", {
9166
9170
  value: !0
9167
9171
  });
9168
- Ue.Browser = void 0;
9169
- var We = /*#__PURE__*/_createClass(function We() {
9170
- _classCallCheck(this, We);
9172
+ qe.Browser = void 0;
9173
+ var Ke = /*#__PURE__*/_createClass(function Ke() {
9174
+ _classCallCheck(this, Ke);
9171
9175
  });
9172
- Ue.Browser = We;
9173
- We.IS_SAFARI = function () {
9174
- return We._IS_SAFARI === void 0 && (We._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), We._IS_SAFARI;
9176
+ qe.Browser = Ke;
9177
+ Ke.IS_SAFARI = function () {
9178
+ return Ke._IS_SAFARI === void 0 && (Ke._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), Ke._IS_SAFARI;
9175
9179
  };
9176
- var ct = {},
9177
- $t = {};
9178
- Object.defineProperty($t, "__esModule", {
9180
+ var dt = {},
9181
+ Zt = {};
9182
+ Object.defineProperty(Zt, "__esModule", {
9179
9183
  value: !0
9180
9184
  });
9181
- $t.EventListeners = void 0;
9185
+ Zt.EventListeners = void 0;
9182
9186
  var W = /*#__PURE__*/function () {
9183
9187
  function W() {
9184
9188
  _classCallCheck(this, W);
@@ -9222,13 +9226,13 @@ var W = /*#__PURE__*/function () {
9222
9226
  }]);
9223
9227
  return W;
9224
9228
  }();
9225
- $t.EventListeners = W;
9229
+ Zt.EventListeners = W;
9226
9230
  W.KEY_DOWN_TIMEOUT = null;
9227
- var Zt = {};
9228
- Object.defineProperty(Zt, "__esModule", {
9231
+ var Qt = {};
9232
+ Object.defineProperty(Qt, "__esModule", {
9229
9233
  value: !0
9230
9234
  });
9231
- Zt.PreResultUtils = void 0;
9235
+ Qt.PreResultUtils = void 0;
9232
9236
  var Vo = /*#__PURE__*/function () {
9233
9237
  function Vo() {
9234
9238
  _classCallCheck(this, Vo);
@@ -9244,18 +9248,18 @@ var Vo = /*#__PURE__*/function () {
9244
9248
  }]);
9245
9249
  return Vo;
9246
9250
  }();
9247
- Zt.PreResultUtils = Vo;
9248
- var dt = {},
9249
- ut = {};
9250
- Object.defineProperty(ut, "__esModule", {
9251
+ Qt.PreResultUtils = Vo;
9252
+ var ut = {},
9253
+ ht = {};
9254
+ Object.defineProperty(ht, "__esModule", {
9251
9255
  value: !0
9252
9256
  });
9253
- ut.AutoScroll = void 0;
9254
- var Ui = /*#__PURE__*/function () {
9255
- function Ui() {
9256
- _classCallCheck(this, Ui);
9257
+ ht.AutoScroll = void 0;
9258
+ var qi = /*#__PURE__*/function () {
9259
+ function qi() {
9260
+ _classCallCheck(this, qi);
9257
9261
  }
9258
- _createClass(Ui, null, [{
9262
+ _createClass(qi, null, [{
9259
9263
  key: "changeStateIfNeeded",
9260
9264
  value: function changeStateIfNeeded(e, t) {
9261
9265
  t && !e.isCursorAtEnd && (e.endPadding = "", e.scrollingSpan.innerHTML = "&nbsp;");
@@ -9282,17 +9286,17 @@ var Ui = /*#__PURE__*/function () {
9282
9286
  }, {
9283
9287
  key: "isRequired",
9284
9288
  value: function isRequired(e, t) {
9285
- return e && Ui.isElementOverflown(t);
9289
+ return e && qi.isElementOverflown(t);
9286
9290
  }
9287
9291
  }]);
9288
- return Ui;
9292
+ return qi;
9289
9293
  }();
9290
- ut.AutoScroll = Ui;
9291
- var ke = {};
9292
- Object.defineProperty(ke, "__esModule", {
9294
+ ht.AutoScroll = qi;
9295
+ var Me = {};
9296
+ Object.defineProperty(Me, "__esModule", {
9293
9297
  value: !0
9294
9298
  });
9295
- ke.Elements = void 0;
9299
+ Me.Elements = void 0;
9296
9300
  var Wo = /*#__PURE__*/function () {
9297
9301
  function Wo() {
9298
9302
  _classCallCheck(this, Wo);
@@ -9340,17 +9344,17 @@ var Wo = /*#__PURE__*/function () {
9340
9344
  }]);
9341
9345
  return Wo;
9342
9346
  }();
9343
- ke.Elements = Wo;
9344
- var Me = {};
9345
- Object.defineProperty(Me, "__esModule", {
9347
+ Me.Elements = Wo;
9348
+ var Te = {};
9349
+ Object.defineProperty(Te, "__esModule", {
9346
9350
  value: !0
9347
9351
  });
9348
- Me.Cursor = void 0;
9349
- var Ye = /*#__PURE__*/function () {
9350
- function Ye() {
9351
- _classCallCheck(this, Ye);
9352
+ Te.Cursor = void 0;
9353
+ var $e = /*#__PURE__*/function () {
9354
+ function $e() {
9355
+ _classCallCheck(this, $e);
9352
9356
  }
9353
- _createClass(Ye, null, [{
9357
+ _createClass($e, null, [{
9354
9358
  key: "setOffsetForGeneric",
9355
9359
  value: function setOffsetForGeneric(e, t) {
9356
9360
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -9358,7 +9362,7 @@ var Ye = /*#__PURE__*/function () {
9358
9362
  for (var s = 0; s < e.childNodes.length; s += 1) {
9359
9363
  var o = e.childNodes[s];
9360
9364
  if (o.childNodes.length > 0) {
9361
- var a = Ye.setOffsetForGeneric(o, t, i);
9365
+ var a = $e.setOffsetForGeneric(o, t, i);
9362
9366
  if (a === -1) return -1;
9363
9367
  i += a;
9364
9368
  } else if (o.textContent !== null) {
@@ -9386,8 +9390,8 @@ var Ye = /*#__PURE__*/function () {
9386
9390
  value: function setOffsetForSafariGeneric(e, t) {
9387
9391
  var i = window.getSelection();
9388
9392
  if (i) {
9389
- var r = Ye.getGenericElementCursorOffset(e, i, !0);
9390
- console.log(r), setTimeout(function () {}, 100), Ye.setOffsetForGeneric(e, r + t);
9393
+ var r = $e.getGenericElementCursorOffset(e, i, !0);
9394
+ console.log(r), setTimeout(function () {}, 100), $e.setOffsetForGeneric(e, r + t);
9391
9395
  }
9392
9396
  }
9393
9397
  // set to automatically scroll to cursor (scroll does not work in Safari)
@@ -9425,18 +9429,18 @@ var Ye = /*#__PURE__*/function () {
9425
9429
  return r;
9426
9430
  }
9427
9431
  }]);
9428
- return Ye;
9432
+ return $e;
9429
9433
  }();
9430
- Me.Cursor = Ye;
9431
- Object.defineProperty(dt, "__esModule", {
9434
+ Te.Cursor = $e;
9435
+ Object.defineProperty(ut, "__esModule", {
9432
9436
  value: !0
9433
9437
  });
9434
- dt.CommandUtils = void 0;
9435
- var ln = ut,
9436
- Ko = ke,
9437
- Jo = Ue,
9438
- cn = Me,
9439
- dn = _e;
9438
+ ut.CommandUtils = void 0;
9439
+ var cn = ht,
9440
+ Ko = Me,
9441
+ Jo = qe,
9442
+ dn = Te,
9443
+ un = ke;
9440
9444
  var V = /*#__PURE__*/function () {
9441
9445
  function V() {
9442
9446
  _classCallCheck(this, V);
@@ -9444,7 +9448,7 @@ var V = /*#__PURE__*/function () {
9444
9448
  _createClass(V, null, [{
9445
9449
  key: "processCommand",
9446
9450
  value: function processCommand(e, t) {
9447
- return (!t || !t.caseSensitive) && (e = e.toLowerCase()), (t == null ? void 0 : t.substrings) === !1 ? dn.Text.breakupIntoWordsArr(e) : e;
9451
+ return (!t || !t.caseSensitive) && (e = e.toLowerCase()), (t == null ? void 0 : t.substrings) === !1 ? un.Text.breakupIntoWordsArr(e) : e;
9448
9452
  }
9449
9453
  }, {
9450
9454
  key: "process",
@@ -9470,8 +9474,8 @@ var V = /*#__PURE__*/function () {
9470
9474
  }, {
9471
9475
  key: "setText",
9472
9476
  value: function setText(e, t, i, r) {
9473
- V.toggleCommandModeOff(e), Ko.Elements.isPrimitiveElement(r) ? (r.value = i, e.isTargetInShadow || cn.Cursor.setOffsetForPrimitive(r, i.length, !0), Jo.Browser.IS_SAFARI() && e.autoScroll && ln.AutoScroll.scrollSafariPrimitiveToEnd(r)) : (r.textContent = i, e.isTargetInShadow || cn.Cursor.focusEndOfGeneric(r), setTimeout(function () {
9474
- return ln.AutoScroll.scrollGeneric(e, r);
9477
+ V.toggleCommandModeOff(e), Ko.Elements.isPrimitiveElement(r) ? (r.value = i, e.isTargetInShadow || dn.Cursor.setOffsetForPrimitive(r, i.length, !0), Jo.Browser.IS_SAFARI() && e.autoScroll && cn.AutoScroll.scrollSafariPrimitiveToEnd(r)) : (r.textContent = i, e.isTargetInShadow || dn.Cursor.focusEndOfGeneric(r), setTimeout(function () {
9478
+ return cn.AutoScroll.scrollGeneric(e, r);
9475
9479
  })), e.resetRecording(t);
9476
9480
  }
9477
9481
  }, {
@@ -9499,7 +9503,7 @@ var V = /*#__PURE__*/function () {
9499
9503
  var c = e.commands;
9500
9504
  if (!c || !r || !i) return;
9501
9505
  var d = ((o = c.settings) === null || o === void 0 ? void 0 : o.caseSensitive) === !0 ? t : t.toLowerCase(),
9502
- u = dn.Text.breakupIntoWordsArr(d),
9506
+ u = un.Text.breakupIntoWordsArr(d),
9503
9507
  p = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? V.checkIfMatchesWord : V.checkIfMatchesSubstring;
9504
9508
  if (c.commandMode && p(c.commandMode, d, u)) return e.setInterimColorToFinal(), setTimeout(function () {
9505
9509
  return V.toggleCommandModeOn(e);
@@ -9532,19 +9536,19 @@ var V = /*#__PURE__*/function () {
9532
9536
  }]);
9533
9537
  return V;
9534
9538
  }();
9535
- dt.CommandUtils = V;
9536
- var Qt = {};
9537
- Object.defineProperty(Qt, "__esModule", {
9539
+ ut.CommandUtils = V;
9540
+ var Xt = {};
9541
+ Object.defineProperty(Xt, "__esModule", {
9538
9542
  value: !0
9539
9543
  });
9540
- Qt.Highlight = void 0;
9541
- var Yo = ke,
9542
- qe = Me;
9543
- var Nt = /*#__PURE__*/function () {
9544
- function Nt() {
9545
- _classCallCheck(this, Nt);
9544
+ Xt.Highlight = void 0;
9545
+ var Yo = Me,
9546
+ He = Te;
9547
+ var Ot = /*#__PURE__*/function () {
9548
+ function Ot() {
9549
+ _classCallCheck(this, Ot);
9546
9550
  }
9547
- _createClass(Nt, null, [{
9551
+ _createClass(Ot, null, [{
9548
9552
  key: "setStateForPrimitive",
9549
9553
  value: function setStateForPrimitive(e, t) {
9550
9554
  var i, r;
@@ -9555,23 +9559,23 @@ var Nt = /*#__PURE__*/function () {
9555
9559
  value: function setStateForGeneric(e, t) {
9556
9560
  var i = window.getSelection();
9557
9561
  if (i != null && i.focusNode) {
9558
- var r = qe.Cursor.getGenericElementCursorOffset(t, i, !0),
9559
- s = qe.Cursor.getGenericElementCursorOffset(t, i, !1);
9562
+ var r = He.Cursor.getGenericElementCursorOffset(t, i, !0),
9563
+ s = He.Cursor.getGenericElementCursorOffset(t, i, !1);
9560
9564
  e.isHighlighted = r !== s;
9561
9565
  }
9562
9566
  }
9563
9567
  }, {
9564
9568
  key: "setState",
9565
9569
  value: function setState(e, t) {
9566
- document.activeElement === t && (Yo.Elements.isPrimitiveElement(t) ? Nt.setStateForPrimitive(e, t) : Nt.setStateForGeneric(e, t));
9570
+ document.activeElement === t && (Yo.Elements.isPrimitiveElement(t) ? Ot.setStateForPrimitive(e, t) : Ot.setStateForGeneric(e, t));
9567
9571
  }
9568
9572
  }, {
9569
9573
  key: "removeForGeneric",
9570
9574
  value: function removeForGeneric(e, t) {
9571
9575
  var i = window.getSelection();
9572
9576
  if (i) {
9573
- var r = qe.Cursor.getGenericElementCursorOffset(t, i, !0);
9574
- i.deleteFromDocument(), qe.Cursor.setOffsetForGeneric(t, r), e.isHighlighted = !1;
9577
+ var r = He.Cursor.getGenericElementCursorOffset(t, i, !0);
9578
+ i.deleteFromDocument(), He.Cursor.setOffsetForGeneric(t, r), e.isHighlighted = !1;
9575
9579
  }
9576
9580
  }
9577
9581
  }, {
@@ -9582,27 +9586,27 @@ var Nt = /*#__PURE__*/function () {
9582
9586
  s = t.value;
9583
9587
  if (i && r) {
9584
9588
  var o = s.substring(0, i) + s.substring(r);
9585
- t.value = o, qe.Cursor.setOffsetForPrimitive(t, i, e.autoScroll);
9589
+ t.value = o, He.Cursor.setOffsetForPrimitive(t, i, e.autoScroll);
9586
9590
  }
9587
9591
  e.isHighlighted = !1;
9588
9592
  }
9589
9593
  }]);
9590
- return Nt;
9594
+ return Ot;
9591
9595
  }();
9592
- Qt.Highlight = Nt;
9593
- var Xt = {};
9594
- Object.defineProperty(Xt, "__esModule", {
9596
+ Xt.Highlight = Ot;
9597
+ var ei = {};
9598
+ Object.defineProperty(ei, "__esModule", {
9595
9599
  value: !0
9596
9600
  });
9597
- Xt.Padding = void 0;
9598
- var $o = ke,
9599
- un = Me,
9600
- Ae = _e;
9601
- var Ot = /*#__PURE__*/function () {
9602
- function Ot() {
9603
- _classCallCheck(this, Ot);
9601
+ ei.Padding = void 0;
9602
+ var $o = Me,
9603
+ hn = Te,
9604
+ Ie = ke;
9605
+ var Pt = /*#__PURE__*/function () {
9606
+ function Pt() {
9607
+ _classCallCheck(this, Pt);
9604
9608
  }
9605
- _createClass(Ot, null, [{
9609
+ _createClass(Pt, null, [{
9606
9610
  key: "setStateForPrimitiveElement",
9607
9611
  value: function setStateForPrimitiveElement(e, t) {
9608
9612
  if (document.activeElement === t && t.selectionStart !== null) {
@@ -9610,11 +9614,11 @@ var Ot = /*#__PURE__*/function () {
9610
9614
  s = t.value[r - 1],
9611
9615
  o = t.selectionEnd === null ? r : t.selectionEnd,
9612
9616
  a = t.value[o];
9613
- Ae.Text.isCharDefined(s) && (e.startPadding = " ", e.numberOfSpacesBeforeNewText = 1), Ae.Text.isCharDefined(a) && (e.endPadding = " ", e.numberOfSpacesAfterNewText = 1), e.isCursorAtEnd = t.value.length === o;
9617
+ Ie.Text.isCharDefined(s) && (e.startPadding = " ", e.numberOfSpacesBeforeNewText = 1), Ie.Text.isCharDefined(a) && (e.endPadding = " ", e.numberOfSpacesAfterNewText = 1), e.isCursorAtEnd = t.value.length === o;
9614
9618
  return;
9615
9619
  }
9616
9620
  var i = t.value[t.value.length - 1];
9617
- Ae.Text.isCharDefined(i) && (e.startPadding = " ", e.numberOfSpacesBeforeNewText = 1), e.isCursorAtEnd = !0;
9621
+ Ie.Text.isCharDefined(i) && (e.startPadding = " ", e.numberOfSpacesBeforeNewText = 1), e.isCursorAtEnd = !0;
9618
9622
  }
9619
9623
  }, {
9620
9624
  key: "setStateForGenericElement",
@@ -9623,21 +9627,21 @@ var Ot = /*#__PURE__*/function () {
9623
9627
  if (document.activeElement === t) {
9624
9628
  var a = window.getSelection();
9625
9629
  if (a != null && a.focusNode) {
9626
- var l = un.Cursor.getGenericElementCursorOffset(t, a, !0),
9630
+ var l = hn.Cursor.getGenericElementCursorOffset(t, a, !0),
9627
9631
  c = (i = t.textContent) === null || i === void 0 ? void 0 : i[l - 1],
9628
- d = un.Cursor.getGenericElementCursorOffset(t, a, !1),
9632
+ d = hn.Cursor.getGenericElementCursorOffset(t, a, !1),
9629
9633
  u = (r = t.textContent) === null || r === void 0 ? void 0 : r[d];
9630
- Ae.Text.isCharDefined(c) && (e.startPadding = " "), Ae.Text.isCharDefined(u) && (e.endPadding = " "), e.isCursorAtEnd = ((s = t.textContent) === null || s === void 0 ? void 0 : s.length) === d;
9634
+ Ie.Text.isCharDefined(c) && (e.startPadding = " "), Ie.Text.isCharDefined(u) && (e.endPadding = " "), e.isCursorAtEnd = ((s = t.textContent) === null || s === void 0 ? void 0 : s.length) === d;
9631
9635
  return;
9632
9636
  }
9633
9637
  }
9634
9638
  var o = t.innerText.charAt(t.innerText.length - 1);
9635
- Ae.Text.isCharDefined(o) && (e.startPadding = " "), e.isCursorAtEnd = !0;
9639
+ Ie.Text.isCharDefined(o) && (e.startPadding = " "), e.isCursorAtEnd = !0;
9636
9640
  }
9637
9641
  }, {
9638
9642
  key: "setState",
9639
9643
  value: function setState(e, t) {
9640
- $o.Elements.isPrimitiveElement(t) ? Ot.setStateForPrimitiveElement(e, t) : Ot.setStateForGenericElement(e, t);
9644
+ $o.Elements.isPrimitiveElement(t) ? Pt.setStateForPrimitiveElement(e, t) : Pt.setStateForGenericElement(e, t);
9641
9645
  }
9642
9646
  }, {
9643
9647
  key: "adjustStateAfterRecodingPrimitiveElement",
@@ -9654,23 +9658,23 @@ var Ot = /*#__PURE__*/function () {
9654
9658
  e.numberOfSpacesBeforeNewText === 1 && (e.startPadding = e.startPadding.substring(0, e.startPadding.length - 1), e.numberOfSpacesBeforeNewText = 0), e.numberOfSpacesAfterNewText === 1 && (e.endPadding = e.endPadding.substring(1), e.numberOfSpacesAfterNewText = 0);
9655
9659
  }
9656
9660
  }]);
9657
- return Ot;
9661
+ return Pt;
9658
9662
  }();
9659
- Xt.Padding = Ot;
9660
- Object.defineProperty(ct, "__esModule", {
9663
+ ei.Padding = Pt;
9664
+ Object.defineProperty(dt, "__esModule", {
9661
9665
  value: !0
9662
9666
  });
9663
- ct.Speech = void 0;
9664
- var hn = $t,
9665
- Zo = Zt,
9666
- pn = dt,
9667
- gt = ut,
9668
- pi = Qt,
9669
- Q = ke,
9667
+ dt.Speech = void 0;
9668
+ var pn = Zt,
9669
+ Zo = Qt,
9670
+ fn = ut,
9671
+ bt = ht,
9670
9672
  fi = Xt,
9671
- fn = Ue,
9672
- mn = Me,
9673
- mi = _e;
9673
+ Q = Me,
9674
+ mi = ei,
9675
+ mn = qe,
9676
+ gn = Te,
9677
+ gi = ke;
9674
9678
  var Qo = /*#__PURE__*/function () {
9675
9679
  function Qo() {
9676
9680
  _classCallCheck(this, Qo);
@@ -9680,19 +9684,19 @@ var Qo = /*#__PURE__*/function () {
9680
9684
  key: "prepareBeforeStart",
9681
9685
  value: function prepareBeforeStart(e) {
9682
9686
  var t, i;
9683
- if (e != null && e.element) if (hn.EventListeners.add(this, e), Array.isArray(e.element)) {
9687
+ if (e != null && e.element) if (pn.EventListeners.add(this, e), Array.isArray(e.element)) {
9684
9688
  var s = e.element.find(function (o) {
9685
9689
  return o === document.activeElement;
9686
9690
  }) || e.element[0];
9687
9691
  if (!s) return;
9688
9692
  this.prepare(s);
9689
9693
  } else this.prepare(e.element);
9690
- (e == null ? void 0 : e.displayInterimResults) !== void 0 && (this._displayInterimResults = e.displayInterimResults), e != null && e.textColor && (this._finalTextColor = (t = e == null ? void 0 : e.textColor) === null || t === void 0 ? void 0 : t["final"], Q.Elements.applyCustomColors(this, e.textColor)), (e == null ? void 0 : e.insertInCursorLocation) !== void 0 && (this.insertInCursorLocation = e.insertInCursorLocation), (e == null ? void 0 : e.autoScroll) !== void 0 && (this.autoScroll = e.autoScroll), this._onResult = e == null ? void 0 : e.onResult, this._onPreResult = e == null ? void 0 : e.onPreResult, this._onStart = e == null ? void 0 : e.onStart, this._onStop = e == null ? void 0 : e.onStop, this._onError = e == null ? void 0 : e.onError, this.onCommandModeTrigger = e == null ? void 0 : e.onCommandModeTrigger, this.onPauseTrigger = e == null ? void 0 : e.onPauseTrigger, this._options = e, !((i = this._options) === null || i === void 0) && i.commands && (this.commands = pn.CommandUtils.process(this._options.commands));
9694
+ (e == null ? void 0 : e.displayInterimResults) !== void 0 && (this._displayInterimResults = e.displayInterimResults), e != null && e.textColor && (this._finalTextColor = (t = e == null ? void 0 : e.textColor) === null || t === void 0 ? void 0 : t["final"], Q.Elements.applyCustomColors(this, e.textColor)), (e == null ? void 0 : e.insertInCursorLocation) !== void 0 && (this.insertInCursorLocation = e.insertInCursorLocation), (e == null ? void 0 : e.autoScroll) !== void 0 && (this.autoScroll = e.autoScroll), this._onResult = e == null ? void 0 : e.onResult, this._onPreResult = e == null ? void 0 : e.onPreResult, this._onStart = e == null ? void 0 : e.onStart, this._onStop = e == null ? void 0 : e.onStop, this._onError = e == null ? void 0 : e.onError, this.onCommandModeTrigger = e == null ? void 0 : e.onCommandModeTrigger, this.onPauseTrigger = e == null ? void 0 : e.onPauseTrigger, this._options = e, !((i = this._options) === null || i === void 0) && i.commands && (this.commands = fn.CommandUtils.process(this._options.commands));
9691
9695
  }
9692
9696
  }, {
9693
9697
  key: "prepare",
9694
9698
  value: function prepare(e) {
9695
- fi.Padding.setState(this, e), pi.Highlight.setState(this, e), this.isTargetInShadow = Q.Elements.isInsideShadowDOM(e), Q.Elements.isPrimitiveElement(e) ? (this._primitiveElement = e, this._originalText = this._primitiveElement.value) : (this._genericElement = e, this._originalText = this._genericElement.textContent);
9699
+ mi.Padding.setState(this, e), fi.Highlight.setState(this, e), this.isTargetInShadow = Q.Elements.isInsideShadowDOM(e), Q.Elements.isPrimitiveElement(e) ? (this._primitiveElement = e, this._originalText = this._primitiveElement.value) : (this._genericElement = e, this._originalText = this._genericElement.textContent);
9696
9700
  }
9697
9701
  // there was an attempt to optimize this by not having to restart the service and just reset state:
9698
9702
  // unfortunately it did not work because the service would still continue firing the intermediate and final results
@@ -9707,10 +9711,10 @@ var Qo = /*#__PURE__*/function () {
9707
9711
  key: "updateElements",
9708
9712
  value: function updateElements(e, t, i) {
9709
9713
  var r;
9710
- var s = mi.Text.capitalize(t);
9714
+ var s = gi.Text.capitalize(t);
9711
9715
  if (this.finalTranscript === s && e === "") return;
9712
9716
  Zo.PreResultUtils.process(this, i, e === "", this._onPreResult, this._options) && (e = "", i = "");
9713
- var o = this.commands && pn.CommandUtils.execCommand(this, i, this._options, this._primitiveElement || this._genericElement, this._originalText);
9717
+ var o = this.commands && fn.CommandUtils.execCommand(this, i, this._options, this._primitiveElement || this._genericElement, this._originalText);
9714
9718
  if (o) {
9715
9719
  if (o.doNotProcessTranscription) return;
9716
9720
  e = "", i = "";
@@ -9725,29 +9729,29 @@ var Qo = /*#__PURE__*/function () {
9725
9729
  }, {
9726
9730
  key: "updatePrimitiveElement",
9727
9731
  value: function updatePrimitiveElement(e, t, i) {
9728
- this.isHighlighted && pi.Highlight.removeForPrimitive(this, e), this.primitiveTextRecorded || fi.Padding.adjustStateAfterRecodingPrimitiveElement(this, e), i && fi.Padding.adjustSateForNoTextPrimitiveElement(this);
9732
+ this.isHighlighted && fi.Highlight.removeForPrimitive(this, e), this.primitiveTextRecorded || mi.Padding.adjustStateAfterRecodingPrimitiveElement(this, e), i && mi.Padding.adjustSateForNoTextPrimitiveElement(this);
9729
9733
  var r = this.startPadding + this.finalTranscript + t;
9730
9734
  if (e.value = r + this.endPadding, !this.isTargetInShadow) {
9731
9735
  var s = r.length + this.numberOfSpacesAfterNewText;
9732
- mn.Cursor.setOffsetForPrimitive(e, s, this.autoScroll);
9736
+ gn.Cursor.setOffsetForPrimitive(e, s, this.autoScroll);
9733
9737
  }
9734
- this.autoScroll && fn.Browser.IS_SAFARI() && this.isCursorAtEnd && gt.AutoScroll.scrollSafariPrimitiveToEnd(e);
9738
+ this.autoScroll && mn.Browser.IS_SAFARI() && this.isCursorAtEnd && bt.AutoScroll.scrollSafariPrimitiveToEnd(e);
9735
9739
  }
9736
9740
  }, {
9737
9741
  key: "updateGenericElement",
9738
9742
  value: function updateGenericElement(e, t, i) {
9739
- this.isHighlighted && pi.Highlight.removeForGeneric(this, e), this.spansPopulated || Q.Elements.appendSpans(this, e);
9740
- var r = (i ? "" : this.startPadding) + mi.Text.lineBreak(this.finalTranscript);
9743
+ this.isHighlighted && fi.Highlight.removeForGeneric(this, e), this.spansPopulated || Q.Elements.appendSpans(this, e);
9744
+ var r = (i ? "" : this.startPadding) + gi.Text.lineBreak(this.finalTranscript);
9741
9745
  this.finalSpan.innerHTML = r;
9742
- var s = gt.AutoScroll.isRequired(this.autoScroll, e);
9743
- gt.AutoScroll.changeStateIfNeeded(this, s);
9744
- var o = mi.Text.lineBreak(t) + (i ? "" : this.endPadding);
9745
- this.interimSpan.innerHTML = o, fn.Browser.IS_SAFARI() && this.insertInCursorLocation && mn.Cursor.setOffsetForSafariGeneric(e, r.length + o.length), s && gt.AutoScroll.scrollGeneric(this, e), i && (this.scrollingSpan.innerHTML = "");
9746
+ var s = bt.AutoScroll.isRequired(this.autoScroll, e);
9747
+ bt.AutoScroll.changeStateIfNeeded(this, s);
9748
+ var o = gi.Text.lineBreak(t) + (i ? "" : this.endPadding);
9749
+ this.interimSpan.innerHTML = o, mn.Browser.IS_SAFARI() && this.insertInCursorLocation && gn.Cursor.setOffsetForSafariGeneric(e, r.length + o.length), s && bt.AutoScroll.scrollGeneric(this, e), i && (this.scrollingSpan.innerHTML = "");
9746
9750
  }
9747
9751
  }, {
9748
9752
  key: "finalise",
9749
9753
  value: function finalise(e) {
9750
- this._genericElement && (e ? (this.finalSpan = Q.Elements.createGenericSpan(), this.setInterimColorToFinal(), this.interimSpan = Q.Elements.createInterimSpan(), this.scrollingSpan = Q.Elements.createGenericSpan()) : this._genericElement.textContent = this._genericElement.textContent, this.spansPopulated = !1), hn.EventListeners.remove(this);
9754
+ this._genericElement && (e ? (this.finalSpan = Q.Elements.createGenericSpan(), this.setInterimColorToFinal(), this.interimSpan = Q.Elements.createInterimSpan(), this.scrollingSpan = Q.Elements.createGenericSpan()) : this._genericElement.textContent = this._genericElement.textContent, this.spansPopulated = !1), pn.EventListeners.remove(this);
9751
9755
  }
9752
9756
  }, {
9753
9757
  key: "setInterimColorToFinal",
@@ -9780,37 +9784,37 @@ var Qo = /*#__PURE__*/function () {
9780
9784
  }]);
9781
9785
  return Qo;
9782
9786
  }();
9783
- ct.Speech = Qo;
9784
- Object.defineProperty(Jt, "__esModule", {
9787
+ dt.Speech = Qo;
9788
+ Object.defineProperty(Yt, "__esModule", {
9785
9789
  value: !0
9786
9790
  });
9787
- Jt.WebSpeech = void 0;
9788
- var gn = Yt,
9789
- bn = Ue,
9790
- Xo = ct;
9791
- var Pt = /*#__PURE__*/function (_Xo$Speech) {
9792
- _inherits(Pt, _Xo$Speech);
9793
- var _super38 = _createSuper(Pt);
9794
- function Pt() {
9795
- _classCallCheck(this, Pt);
9791
+ Yt.WebSpeech = void 0;
9792
+ var bn = $t,
9793
+ vn = qe,
9794
+ Xo = dt;
9795
+ var Dt = /*#__PURE__*/function (_Xo$Speech) {
9796
+ _inherits(Dt, _Xo$Speech);
9797
+ var _super38 = _createSuper(Dt);
9798
+ function Dt() {
9799
+ _classCallCheck(this, Dt);
9796
9800
  return _super38.call(this);
9797
9801
  }
9798
- _createClass(Pt, [{
9802
+ _createClass(Dt, [{
9799
9803
  key: "start",
9800
9804
  value: function start(e) {
9801
9805
  var t;
9802
- this._extractText === void 0 && (this._extractText = bn.Browser.IS_SAFARI() ? gn.WebSpeechTranscript.extractSafari : gn.WebSpeechTranscript.extract), this.validate() && (this.prepareBeforeStart(e), this.instantiateService(e), (t = this._service) === null || t === void 0 || t.start(), this._translations = e == null ? void 0 : e.translations);
9806
+ this._extractText === void 0 && (this._extractText = vn.Browser.IS_SAFARI() ? bn.WebSpeechTranscript.extractSafari : bn.WebSpeechTranscript.extract), this.validate() && (this.prepareBeforeStart(e), this.instantiateService(e), (t = this._service) === null || t === void 0 || t.start(), this._translations = e == null ? void 0 : e.translations);
9803
9807
  }
9804
9808
  }, {
9805
9809
  key: "validate",
9806
9810
  value: function validate() {
9807
- return Pt.getAPI() ? !0 : (this.error("Speech Recognition is unsupported"), !1);
9811
+ return Dt.getAPI() ? !0 : (this.error("Speech Recognition is unsupported"), !1);
9808
9812
  }
9809
9813
  }, {
9810
9814
  key: "instantiateService",
9811
9815
  value: function instantiateService(e) {
9812
9816
  var t, i;
9813
- var r = Pt.getAPI();
9817
+ var r = Dt.getAPI();
9814
9818
  this._service = new r(), this._service.continuous = !0, this._service.interimResults = (t = e == null ? void 0 : e.displayInterimResults) !== null && t !== void 0 ? t : !0, this._service.lang = ((i = e == null ? void 0 : e.language) === null || i === void 0 ? void 0 : i.trim()) || "en-US", this.setEvents();
9815
9819
  }
9816
9820
  }, {
@@ -9820,7 +9824,7 @@ var Pt = /*#__PURE__*/function (_Xo$Speech) {
9820
9824
  this._service && (this._service.onstart = function () {
9821
9825
  _this46.setStateOnStart();
9822
9826
  }, this._service.onerror = function (e) {
9823
- bn.Browser.IS_SAFARI() && e.message === "Another request is started" || e.error === "aborted" && _this46.isRestarting || e.error !== "no-speech" && _this46.error(e.message || e.error);
9827
+ vn.Browser.IS_SAFARI() && e.message === "Another request is started" || e.error === "aborted" && _this46.isRestarting || e.error !== "no-speech" && _this46.error(e.message || e.error);
9824
9828
  }, this._service.onaudioend = function () {
9825
9829
  _this46.setStateOnStop();
9826
9830
  }, this._service.onend = function () {
@@ -9852,36 +9856,36 @@ var Pt = /*#__PURE__*/function (_Xo$Speech) {
9852
9856
  return window.webkitSpeechRecognition || window.SpeechRecognition;
9853
9857
  }
9854
9858
  }]);
9855
- return Pt;
9859
+ return Dt;
9856
9860
  }(Xo.Speech);
9857
- Jt.WebSpeech = Pt;
9858
- var ei = {};
9859
- Object.defineProperty(ei, "__esModule", {
9861
+ Yt.WebSpeech = Dt;
9862
+ var ti = {};
9863
+ Object.defineProperty(ti, "__esModule", {
9860
9864
  value: !0
9861
9865
  });
9862
- ei.GlobalState = void 0;
9863
- var ze = /*#__PURE__*/function () {
9864
- function ze() {
9865
- _classCallCheck(this, ze);
9866
+ ti.GlobalState = void 0;
9867
+ var Fe = /*#__PURE__*/function () {
9868
+ function Fe() {
9869
+ _classCallCheck(this, Fe);
9866
9870
  }
9867
- _createClass(ze, null, [{
9871
+ _createClass(Fe, null, [{
9868
9872
  key: "doubleClickDetector",
9869
9873
  value: function doubleClickDetector() {
9870
- return ze.doubleClickPending ? !0 : (ze.doubleClickPending = !0, setTimeout(function () {
9871
- ze.doubleClickPending = !1;
9874
+ return Fe.doubleClickPending ? !0 : (Fe.doubleClickPending = !0, setTimeout(function () {
9875
+ Fe.doubleClickPending = !1;
9872
9876
  }, 300), !1);
9873
9877
  }
9874
9878
  }]);
9875
- return ze;
9879
+ return Fe;
9876
9880
  }();
9877
- ei.GlobalState = ze;
9878
- ze.doubleClickPending = !1;
9879
- var ti = {},
9880
- ii = {};
9881
- Object.defineProperty(ii, "__esModule", {
9881
+ ti.GlobalState = Fe;
9882
+ Fe.doubleClickPending = !1;
9883
+ var ii = {},
9884
+ ni = {};
9885
+ Object.defineProperty(ni, "__esModule", {
9882
9886
  value: !0
9883
9887
  });
9884
- ii.PreventConnectionStop = void 0;
9888
+ ni.PreventConnectionStop = void 0;
9885
9889
  var ea = /*#__PURE__*/function () {
9886
9890
  function ea() {
9887
9891
  _classCallCheck(this, ea);
@@ -9901,27 +9905,27 @@ var ea = /*#__PURE__*/function () {
9901
9905
  }]);
9902
9906
  return ea;
9903
9907
  }();
9904
- ii.PreventConnectionStop = ea;
9905
- var ni = {},
9906
- ri = {};
9907
- Object.defineProperty(ri, "__esModule", {
9908
+ ni.PreventConnectionStop = ea;
9909
+ var ri = {},
9910
+ si = {};
9911
+ Object.defineProperty(si, "__esModule", {
9908
9912
  value: !0
9909
9913
  });
9910
- ri.README_URL = void 0;
9911
- ri.README_URL = "https://github.com/OvidijusParsiunas/speech-to-element";
9912
- Object.defineProperty(ni, "__esModule", {
9914
+ si.README_URL = void 0;
9915
+ si.README_URL = "https://github.com/OvidijusParsiunas/speech-to-element";
9916
+ Object.defineProperty(ri, "__esModule", {
9913
9917
  value: !0
9914
9918
  });
9915
- ni.AzureSpeechConfig = void 0;
9916
- var gi = ri;
9917
- var Dt = /*#__PURE__*/function () {
9918
- function Dt() {
9919
- _classCallCheck(this, Dt);
9919
+ ri.AzureSpeechConfig = void 0;
9920
+ var bi = si;
9921
+ var jt = /*#__PURE__*/function () {
9922
+ function jt() {
9923
+ _classCallCheck(this, jt);
9920
9924
  }
9921
- _createClass(Dt, null, [{
9925
+ _createClass(jt, null, [{
9922
9926
  key: "validateOptions",
9923
9927
  value: function validateOptions(e, t) {
9924
- return t ? !t.subscriptionKey && !t.token && !t.retrieveToken ? (e("Please define a 'subscriptionKey', 'token' or 'retrieveToken' property - more info: ".concat(gi.README_URL)), !1) : t.region ? !0 : (e("Please define a 'region' property - more info: ".concat(gi.README_URL)), !1) : (e("Please provide subscription details - more info: ".concat(gi.README_URL)), !1);
9928
+ return t ? !t.subscriptionKey && !t.token && !t.retrieveToken ? (e("Please define a 'subscriptionKey', 'token' or 'retrieveToken' property - more info: ".concat(bi.README_URL)), !1) : t.region ? !0 : (e("Please define a 'region' property - more info: ".concat(bi.README_URL)), !1) : (e("Please provide subscription details - more info: ".concat(bi.README_URL)), !1);
9925
9929
  }
9926
9930
  }, {
9927
9931
  key: "getNewSpeechConfig",
@@ -9964,10 +9968,10 @@ var Dt = /*#__PURE__*/function () {
9964
9968
  while (1) switch (_context73.prev = _context73.next) {
9965
9969
  case 0:
9966
9970
  _context73.next = 2;
9967
- return Dt.getNewSpeechConfig(e, t);
9971
+ return jt.getNewSpeechConfig(e, t);
9968
9972
  case 2:
9969
9973
  i = _context73.sent;
9970
- return _context73.abrupt("return", (i && Dt.process(i, t), i));
9974
+ return _context73.abrupt("return", (i && jt.process(i, t), i));
9971
9975
  case 4:
9972
9976
  case "end":
9973
9977
  return _context73.stop();
@@ -9980,19 +9984,19 @@ var Dt = /*#__PURE__*/function () {
9980
9984
  return get;
9981
9985
  }()
9982
9986
  }]);
9983
- return Dt;
9987
+ return jt;
9984
9988
  }();
9985
- ni.AzureSpeechConfig = Dt;
9986
- var si = {};
9987
- Object.defineProperty(si, "__esModule", {
9989
+ ri.AzureSpeechConfig = jt;
9990
+ var oi = {};
9991
+ Object.defineProperty(oi, "__esModule", {
9988
9992
  value: !0
9989
9993
  });
9990
- si.StopTimeout = void 0;
9991
- var it = /*#__PURE__*/function () {
9992
- function it() {
9993
- _classCallCheck(this, it);
9994
+ oi.StopTimeout = void 0;
9995
+ var nt = /*#__PURE__*/function () {
9996
+ function nt() {
9997
+ _classCallCheck(this, nt);
9994
9998
  }
9995
- _createClass(it, null, [{
9999
+ _createClass(nt, null, [{
9996
10000
  key: "set",
9997
10001
  value: function set(e) {
9998
10002
  e.stopTimeout = setTimeout(function () {
@@ -10002,19 +10006,19 @@ var it = /*#__PURE__*/function () {
10002
10006
  }, {
10003
10007
  key: "reset",
10004
10008
  value: function reset(e, t) {
10005
- e.stopTimeoutMS = t || it.DEFAULT_MS, e.stopTimeout && clearTimeout(e.stopTimeout), it.set(e);
10009
+ e.stopTimeoutMS = t || nt.DEFAULT_MS, e.stopTimeout && clearTimeout(e.stopTimeout), nt.set(e);
10006
10010
  }
10007
10011
  }]);
10008
- return it;
10012
+ return nt;
10009
10013
  }();
10010
- si.StopTimeout = it;
10011
- it.DEFAULT_MS = 2e4;
10012
- var oi = {};
10013
- Object.defineProperty(oi, "__esModule", {
10014
+ oi.StopTimeout = nt;
10015
+ nt.DEFAULT_MS = 2e4;
10016
+ var ai = {};
10017
+ Object.defineProperty(ai, "__esModule", {
10014
10018
  value: !0
10015
10019
  });
10016
- oi.AzureTranscript = void 0;
10017
- var ta = lt;
10020
+ ai.AzureTranscript = void 0;
10021
+ var ta = ct;
10018
10022
  var ia = /*#__PURE__*/function () {
10019
10023
  function ia() {
10020
10024
  _classCallCheck(this, ia);
@@ -10037,29 +10041,29 @@ var ia = /*#__PURE__*/function () {
10037
10041
  }]);
10038
10042
  return ia;
10039
10043
  }();
10040
- oi.AzureTranscript = ia;
10041
- Object.defineProperty(ti, "__esModule", {
10044
+ ai.AzureTranscript = ia;
10045
+ Object.defineProperty(ii, "__esModule", {
10042
10046
  value: !0
10043
10047
  });
10044
- ti.Azure = void 0;
10045
- var vn = ii,
10046
- yn = ni,
10047
- bi = si,
10048
- xn = oi,
10049
- na = ct;
10050
- var jt = /*#__PURE__*/function (_na$Speech) {
10051
- _inherits(jt, _na$Speech);
10052
- var _super39 = _createSuper(jt);
10053
- function jt() {
10048
+ ii.Azure = void 0;
10049
+ var yn = ni,
10050
+ xn = ri,
10051
+ vi = oi,
10052
+ En = ai,
10053
+ na = dt;
10054
+ var zt = /*#__PURE__*/function (_na$Speech) {
10055
+ _inherits(zt, _na$Speech);
10056
+ var _super39 = _createSuper(zt);
10057
+ function zt() {
10054
10058
  var _this47;
10055
- _classCallCheck(this, jt);
10059
+ _classCallCheck(this, zt);
10056
10060
  _this47 = _super39.apply(this, arguments), _this47._newTextPadding = "";
10057
10061
  return _this47;
10058
10062
  }
10059
- _createClass(jt, [{
10063
+ _createClass(zt, [{
10060
10064
  key: "start",
10061
10065
  value: function start(e, t) {
10062
- this._newTextPadding = "", this.stopTimeout === void 0 && bi.StopTimeout.reset(this, e == null ? void 0 : e.stopAfterSilenceMs), this.prepareBeforeStart(e), this.startAsync(e), t || vn.PreventConnectionStop.applyPrevention(this);
10066
+ this._newTextPadding = "", this.stopTimeout === void 0 && vi.StopTimeout.reset(this, e == null ? void 0 : e.stopAfterSilenceMs), this.prepareBeforeStart(e), this.startAsync(e), t || yn.PreventConnectionStop.applyPrevention(this);
10063
10067
  }
10064
10068
  }, {
10065
10069
  key: "startAsync",
@@ -10093,7 +10097,7 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10093
10097
  }, {
10094
10098
  key: "validate",
10095
10099
  value: function validate(e) {
10096
- return jt.getAPI() ? yn.AzureSpeechConfig.validateOptions(this.error.bind(this), e) : (this.moduleNotFound(), !1);
10100
+ return zt.getAPI() ? xn.AzureSpeechConfig.validateOptions(this.error.bind(this), e) : (this.moduleNotFound(), !1);
10097
10101
  }
10098
10102
  }, {
10099
10103
  key: "instantiateService",
@@ -10103,10 +10107,10 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10103
10107
  return _regeneratorRuntime().wrap(function _callee75$(_context75) {
10104
10108
  while (1) switch (_context75.prev = _context75.next) {
10105
10109
  case 0:
10106
- t = jt.getAPI();
10110
+ t = zt.getAPI();
10107
10111
  i = t.AudioConfig.fromDefaultMicrophoneInput();
10108
10112
  _context75.next = 4;
10109
- return yn.AzureSpeechConfig.get(t.SpeechConfig, e);
10113
+ return xn.AzureSpeechConfig.get(t.SpeechConfig, e);
10110
10114
  case 4:
10111
10115
  r = _context75.sent;
10112
10116
  if (r) {
@@ -10134,11 +10138,11 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10134
10138
  key: "onRecognizing",
10135
10139
  value: function onRecognizing(e, t) {
10136
10140
  if (this._stopping) return;
10137
- var _xn$AzureTranscript$e = xn.AzureTranscript.extract(this._newTextPadding + t.result.text, this.finalTranscript, !1, this._translations),
10138
- i = _xn$AzureTranscript$e.interimTranscript,
10139
- r = _xn$AzureTranscript$e.finalTranscript,
10140
- s = _xn$AzureTranscript$e.newText;
10141
- bi.StopTimeout.reset(this, this.stopTimeoutMS), this.updateElements(i, r, s);
10141
+ var _En$AzureTranscript$e = En.AzureTranscript.extract(this._newTextPadding + t.result.text, this.finalTranscript, !1, this._translations),
10142
+ i = _En$AzureTranscript$e.interimTranscript,
10143
+ r = _En$AzureTranscript$e.finalTranscript,
10144
+ s = _En$AzureTranscript$e.newText;
10145
+ vi.StopTimeout.reset(this, this.stopTimeoutMS), this.updateElements(i, r, s);
10142
10146
  }
10143
10147
  // WORK - huge opportunity to fix this in the repo!!!!!
10144
10148
  // function onRecognized(sender, recognitionEventArgs) {
@@ -10155,11 +10159,11 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10155
10159
  break;
10156
10160
  case window.SpeechSDK.ResultReason.RecognizedSpeech:
10157
10161
  if (i.text && !this._stopping) {
10158
- var _xn$AzureTranscript$e2 = xn.AzureTranscript.extract(this._newTextPadding + i.text, this.finalTranscript, !0, this._translations),
10159
- r = _xn$AzureTranscript$e2.interimTranscript,
10160
- s = _xn$AzureTranscript$e2.finalTranscript,
10161
- o = _xn$AzureTranscript$e2.newText;
10162
- bi.StopTimeout.reset(this, this.stopTimeoutMS), this.updateElements(r, s, o), s !== "" && (this._newTextPadding = " ");
10162
+ var _En$AzureTranscript$e2 = En.AzureTranscript.extract(this._newTextPadding + i.text, this.finalTranscript, !0, this._translations),
10163
+ r = _En$AzureTranscript$e2.interimTranscript,
10164
+ s = _En$AzureTranscript$e2.finalTranscript,
10165
+ o = _En$AzureTranscript$e2.newText;
10166
+ vi.StopTimeout.reset(this, this.stopTimeoutMS), this.updateElements(r, s, o), s !== "" && (this._newTextPadding = " ");
10163
10167
  }
10164
10168
  break;
10165
10169
  }
@@ -10172,7 +10176,7 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10172
10176
  }, {
10173
10177
  key: "onSessionStarted",
10174
10178
  value: function onSessionStarted() {
10175
- vn.PreventConnectionStop.clearPrevention(this), this.setStateOnStart();
10179
+ yn.PreventConnectionStop.clearPrevention(this), this.setStateOnStart();
10176
10180
  }
10177
10181
  }, {
10178
10182
  key: "onSessionStopped",
@@ -10213,42 +10217,42 @@ var jt = /*#__PURE__*/function (_na$Speech) {
10213
10217
  return window.SpeechSDK;
10214
10218
  }
10215
10219
  }]);
10216
- return jt;
10220
+ return zt;
10217
10221
  }(na.Speech);
10218
- ti.Azure = jt;
10222
+ ii.Azure = zt;
10219
10223
  Object.defineProperty(ir, "__esModule", {
10220
10224
  value: !0
10221
10225
  });
10222
- var En = Jt,
10223
- ra = dt,
10224
- $ = ei,
10225
- sa = ti;
10226
- var Oe = /*#__PURE__*/function () {
10227
- function Oe() {
10228
- _classCallCheck(this, Oe);
10226
+ var Sn = Yt,
10227
+ ra = ut,
10228
+ $ = ti,
10229
+ sa = ii;
10230
+ var Pe = /*#__PURE__*/function () {
10231
+ function Pe() {
10232
+ _classCallCheck(this, Pe);
10229
10233
  }
10230
- _createClass(Oe, null, [{
10234
+ _createClass(Pe, null, [{
10231
10235
  key: "toggle",
10232
10236
  value: function toggle(e, t) {
10233
10237
  var i, r;
10234
10238
  var s = e.toLocaleLowerCase().trim();
10235
- !((i = $.GlobalState.service) === null || i === void 0) && i.recognizing ? this.stop() : s === "webspeech" ? Oe.startWebSpeech(t) : s === "azure" ? Oe.startAzure(t) : (console.error("service not found - must be either 'webspeech' or 'azure'"), (r = t == null ? void 0 : t.onError) === null || r === void 0 || r.call(t, "service not found - must be either 'webspeech' or 'azure'"));
10239
+ !((i = $.GlobalState.service) === null || i === void 0) && i.recognizing ? this.stop() : s === "webspeech" ? Pe.startWebSpeech(t) : s === "azure" ? Pe.startAzure(t) : (console.error("service not found - must be either 'webspeech' or 'azure'"), (r = t == null ? void 0 : t.onError) === null || r === void 0 || r.call(t, "service not found - must be either 'webspeech' or 'azure'"));
10236
10240
  }
10237
10241
  }, {
10238
10242
  key: "startWebSpeech",
10239
10243
  value: function startWebSpeech(e) {
10240
- Oe.stop() || ($.GlobalState.service = new En.WebSpeech(), $.GlobalState.service.start(e));
10244
+ Pe.stop() || ($.GlobalState.service = new Sn.WebSpeech(), $.GlobalState.service.start(e));
10241
10245
  }
10242
10246
  }, {
10243
10247
  key: "isWebSpeechSupported",
10244
10248
  value: function isWebSpeechSupported() {
10245
- return !!En.WebSpeech.getAPI();
10249
+ return !!Sn.WebSpeech.getAPI();
10246
10250
  }
10247
10251
  }, {
10248
10252
  key: "startAzure",
10249
10253
  value: function startAzure(e) {
10250
10254
  var t;
10251
- Oe.stop() || !((t = $.GlobalState.service) === null || t === void 0) && t.cannotBeStopped || ($.GlobalState.service = new sa.Azure(), $.GlobalState.service.start(e));
10255
+ Pe.stop() || !((t = $.GlobalState.service) === null || t === void 0) && t.cannotBeStopped || ($.GlobalState.service = new sa.Azure(), $.GlobalState.service.start(e));
10252
10256
  }
10253
10257
  }, {
10254
10258
  key: "stop",
@@ -10262,31 +10266,31 @@ var Oe = /*#__PURE__*/function () {
10262
10266
  $.GlobalState.service && ra.CommandUtils.toggleCommandModeOff($.GlobalState.service);
10263
10267
  }
10264
10268
  }]);
10265
- return Oe;
10269
+ return Pe;
10266
10270
  }();
10267
- var vi = ir["default"] = Oe;
10268
- var zt = /*#__PURE__*/function (_tt) {
10269
- _inherits(zt, _tt);
10270
- var _super40 = _createSuper(zt);
10271
- function zt(e, t, i) {
10271
+ var yi = ir["default"] = Pe;
10272
+ var Ft = /*#__PURE__*/function (_it) {
10273
+ _inherits(Ft, _it);
10274
+ var _super40 = _createSuper(Ft);
10275
+ function Ft(e, t, i) {
10272
10276
  var _this49;
10273
- _classCallCheck(this, zt);
10277
+ _classCallCheck(this, Ft);
10274
10278
  var o;
10275
10279
  _this49 = _super40.call(this, _typeof(e.speechToText) == "object" ? (o = e.speechToText) == null ? void 0 : o.button : {});
10276
- var _zt$processConfigurat = zt.processConfiguration(t, e.speechToText),
10277
- r = _zt$processConfigurat.serviceName,
10278
- s = _zt$processConfigurat.processedConfig;
10279
- if (_this49._addErrorMessage = i, r === "webspeech" && !vi.isWebSpeechSupported()) _this49.changeToUnsupported();else {
10280
+ var _Ft$processConfigurat = Ft.processConfiguration(t, e.speechToText),
10281
+ r = _Ft$processConfigurat.serviceName,
10282
+ s = _Ft$processConfigurat.processedConfig;
10283
+ if (_this49._addErrorMessage = i, r === "webspeech" && !yi.isWebSpeechSupported()) _this49.changeToUnsupported();else {
10280
10284
  var a = !e.textInput || !e.textInput.disabled;
10281
10285
  _this49.elementRef.onclick = _this49.buttonClick.bind(_assertThisInitialized(_this49), t, a, r, s);
10282
10286
  }
10283
10287
  return _this49;
10284
10288
  }
10285
10289
  // prettier-ignore
10286
- _createClass(zt, [{
10290
+ _createClass(Ft, [{
10287
10291
  key: "buttonClick",
10288
10292
  value: function buttonClick(e, t, i, r) {
10289
- e.removeTextIfPlaceholder(), vi.toggle(i, _objectSpread({
10293
+ e.removeTextIfPlaceholder(), yi.toggle(i, _objectSpread({
10290
10294
  insertInCursorLocation: !1,
10291
10295
  element: t ? e.inputElementRef : void 0,
10292
10296
  onError: this.onError.bind(this),
@@ -10324,12 +10328,12 @@ var zt = /*#__PURE__*/function (_tt) {
10324
10328
  return d.toLowerCase().includes(a) ? (setTimeout(function () {
10325
10329
  var u;
10326
10330
  return (u = e.submit) == null ? void 0 : u.call(e);
10327
- }), vi.endCommandMode(), {
10331
+ }), yi.endCommandMode(), {
10328
10332
  restart: !0,
10329
10333
  removeNewText: !0
10330
10334
  }) : null;
10331
10335
  }), {
10332
- serviceName: zt.getServiceName(i),
10336
+ serviceName: Ft.getServiceName(i),
10333
10337
  processedConfig: o
10334
10338
  };
10335
10339
  }
@@ -10339,8 +10343,8 @@ var zt = /*#__PURE__*/function (_tt) {
10339
10343
  return e.webSpeech ? "webspeech" : e.azure ? "azure" : "webspeech";
10340
10344
  }
10341
10345
  }]);
10342
- return zt;
10343
- }(tt);
10346
+ return Ft;
10347
+ }(it);
10344
10348
  var nr = /*#__PURE__*/function () {
10345
10349
  function nr() {
10346
10350
  _classCallCheck(this, nr);
@@ -10357,8 +10361,8 @@ var nr = /*#__PURE__*/function () {
10357
10361
  }]);
10358
10362
  return nr;
10359
10363
  }();
10360
- var oa = /*#__PURE__*/function (_tt2) {
10361
- _inherits(oa, _tt2);
10364
+ var oa = /*#__PURE__*/function (_it2) {
10365
+ _inherits(oa, _it2);
10362
10366
  var _super41 = _createSuper(oa);
10363
10367
  function oa(e, t) {
10364
10368
  var _this50;
@@ -10419,7 +10423,7 @@ var oa = /*#__PURE__*/function (_tt2) {
10419
10423
  }
10420
10424
  }]);
10421
10425
  return oa;
10422
- }(tt);
10426
+ }(it);
10423
10427
  var aa = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";
10424
10428
  var P = /*#__PURE__*/function () {
10425
10429
  function P() {
@@ -10458,36 +10462,46 @@ var P = /*#__PURE__*/function () {
10458
10462
  }]);
10459
10463
  return P;
10460
10464
  }();
10461
- var Sn = /*#__PURE__*/function () {
10462
- function Sn() {
10463
- _classCallCheck(this, Sn);
10465
+ var ve = /*#__PURE__*/function () {
10466
+ function ve() {
10467
+ _classCallCheck(this, ve);
10464
10468
  }
10465
- _createClass(Sn, null, [{
10469
+ _createClass(ve, null, [{
10466
10470
  key: "resetSubmit",
10467
10471
  value: function resetSubmit(e, t) {
10468
10472
  t ? e.unsetCustomStateStyles(["loading", "submit"]) : e.unsetCustomStateStyles(["stop", "loading", "submit"]), e.reapplyStateStyle("submit");
10469
10473
  }
10474
+ }, {
10475
+ key: "overwriteDefaultStyleWithSubmit",
10476
+ value: function overwriteDefaultStyleWithSubmit(e, t) {
10477
+ if (!e.submit) return;
10478
+ var i = JSON.parse(JSON.stringify(e[t] || {}));
10479
+ P.overwritePropertyObjectFromAnother(i, e.submit, ["container", "default"]), P.overwritePropertyObjectFromAnother(i, e.submit, ["text", "styles", "default"]), P.overwritePropertyObjectFromAnother(i, e.submit, ["svg", "styles", "default"]), e[t] = i;
10480
+ }
10481
+ // prettier-ignore
10482
+ }, {
10483
+ key: "setUpDisabledButton",
10484
+ value: function setUpDisabledButton(e) {
10485
+ P.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), P.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), P.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), P.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), ve.overwriteDefaultStyleWithSubmit(e, "disabled");
10486
+ }
10470
10487
  }, {
10471
10488
  key: "process",
10472
10489
  value: function process(e) {
10473
- if (e != null && e.alwaysEnabled) return e;
10474
10490
  var t = JSON.parse(JSON.stringify(e || {}));
10475
- P.setPropertyValueIfDoesNotExist(t, ["submit", "container", "default", "backgroundColor"], ""), P.setPropertyValueIfDoesNotExist(t, ["disabled", "container", "default", "backgroundColor"], "unset"), P.setPropertyValueIfDoesNotExist(t.submit, ["svg", "styles", "default", "filter"], ""), P.setPropertyValueIfDoesNotExist(t.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)");
10476
- var i = JSON.parse(JSON.stringify(t.disabled));
10477
- return P.overwritePropertyObjectFromAnother(i, t.submit, ["container", "default"]), P.overwritePropertyObjectFromAnother(i, t.submit, ["text", "styles", "default"]), P.overwritePropertyObjectFromAnother(i, t.submit, ["svg", "styles", "default"]), t.disabled = i, t;
10491
+ return ve.overwriteDefaultStyleWithSubmit(t, "loading"), ve.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || ve.setUpDisabledButton(t), t;
10478
10492
  }
10479
10493
  }]);
10480
- return Sn;
10494
+ return ve;
10481
10495
  }();
10482
- var Pe = /*#__PURE__*/function (_ot4) {
10483
- _inherits(Pe, _ot4);
10484
- var _super42 = _createSuper(Pe);
10496
+ var De = /*#__PURE__*/function (_at4) {
10497
+ _inherits(De, _at4);
10498
+ var _super42 = _createSuper(De);
10485
10499
  // prettier-ignore
10486
- function Pe(e, t, i, r, s) {
10500
+ function De(e, t, i, r, s) {
10487
10501
  var _this54;
10488
- _classCallCheck(this, Pe);
10489
- var o = Sn.process(e.submitButtonStyles);
10490
- _this54 = _super42.call(this, Pe.createButtonContainerElement(), o == null ? void 0 : o.position, o), _this54._isRequestInProgress = !1, _this54._isLoadingActive = !1, _this54._isSVGLoadingIconOverriden = !1, _this54._messages = i, _this54._inputElementRef = t, _this54._fileAttachments = s, _this54._innerElements = _this54.createInnerElements(), _this54._abortStream = new AbortController(), _this54._stopClicked = {
10502
+ _classCallCheck(this, De);
10503
+ var o = ve.process(e.submitButtonStyles);
10504
+ _this54 = _super42.call(this, De.createButtonContainerElement(), o == null ? void 0 : o.position, o), _this54._isRequestInProgress = !1, _this54._isLoadingActive = !1, _this54._isSVGLoadingIconOverriden = !1, _this54._messages = i, _this54._inputElementRef = t, _this54._fileAttachments = s, _this54._innerElements = _this54.createInnerElements(), _this54._abortStream = new AbortController(), _this54._stopClicked = {
10491
10505
  listener: function listener() {}
10492
10506
  }, _this54._serviceIO = r, _this54._alwaysEnabled = !!(o != null && o.alwaysEnabled), e.changeSubmitButtonState = _this54.changeSubmitButtonState.bind(_assertThisInitialized(_this54), r), _this54.attemptOverwriteLoadingStyle(e), setTimeout(function () {
10493
10507
  var a;
@@ -10496,18 +10510,18 @@ var Pe = /*#__PURE__*/function (_ot4) {
10496
10510
  return _this54;
10497
10511
  }
10498
10512
  // prettier-ignore
10499
- _createClass(Pe, [{
10513
+ _createClass(De, [{
10500
10514
  key: "createInnerElements",
10501
10515
  value: function createInnerElements() {
10502
10516
  var _R$create = R.create(this.elementRef, ["submit", "loading", "stop"], this._customStyles),
10503
10517
  e = _R$create.submit,
10504
10518
  t = _R$create.loading,
10505
10519
  i = _R$create.stop,
10506
- r = e || Pe.createSubmitIconElement();
10520
+ r = e || De.createSubmitIconElement();
10507
10521
  return {
10508
10522
  submit: r,
10509
- loading: t || Pe.createLoadingIconElement(),
10510
- stop: i || Pe.createStopIconElement(),
10523
+ loading: t || De.createLoadingIconElement(),
10524
+ stop: i || De.createStopIconElement(),
10511
10525
  disabled: this.createDisabledIconElement(r)
10512
10526
  };
10513
10527
  }
@@ -10549,7 +10563,7 @@ var Pe = /*#__PURE__*/function (_ot4) {
10549
10563
  this.submit(!1, t);
10550
10564
  }
10551
10565
  }
10552
- // TO-DO - should be disabled loading history
10566
+ // TO-DO - should be disabled when loading history
10553
10567
  // prettier-ignore
10554
10568
  }, {
10555
10569
  key: "submit",
@@ -10595,7 +10609,7 @@ var Pe = /*#__PURE__*/function (_ot4) {
10595
10609
  return this.addNewMessages(t, i);
10596
10610
  case 18:
10597
10611
  this._messages.addLoadingMessage();
10598
- e || Ai.clear(this._inputElementRef);
10612
+ e || Ii.clear(this._inputElementRef);
10599
10613
  s = {
10600
10614
  text: t === "" ? void 0 : t,
10601
10615
  files: r
@@ -10667,7 +10681,7 @@ var Pe = /*#__PURE__*/function (_ot4) {
10667
10681
  }, {
10668
10682
  key: "changeToSubmitIcon",
10669
10683
  value: function changeToSubmitIcon() {
10670
- this.elementRef.classList.remove("loading-button"), this.elementRef.replaceChildren(this._innerElements.submit), Sn.resetSubmit(this, this._isLoadingActive), this.elementRef.onclick = this.submitFromInput.bind(this), this._isRequestInProgress = !1, this._isLoadingActive = !1;
10684
+ this.elementRef.classList.remove("loading-button"), this.elementRef.replaceChildren(this._innerElements.submit), ve.resetSubmit(this, this._isLoadingActive), this.elementRef.onclick = this.submitFromInput.bind(this), this._isRequestInProgress = !1, this._isLoadingActive = !1;
10671
10685
  }
10672
10686
  }, {
10673
10687
  key: "changeToDisabledIcon",
@@ -10706,19 +10720,19 @@ var Pe = /*#__PURE__*/function (_ot4) {
10706
10720
  return e.id = "stop-icon", e;
10707
10721
  }
10708
10722
  }]);
10709
- return Pe;
10710
- }(ot);
10723
+ return De;
10724
+ }(at);
10711
10725
  var la = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z\"/>\n</svg>\n",
10712
10726
  ca = "<?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>capture</title>\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",
10713
10727
  da = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>",
10714
10728
  ua = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
10715
- var qi = /*#__PURE__*/function (_Ve) {
10716
- _inherits(qi, _Ve);
10717
- var _super43 = _createSuper(qi);
10729
+ var Hi = /*#__PURE__*/function (_We) {
10730
+ _inherits(Hi, _We);
10731
+ var _super43 = _createSuper(Hi);
10718
10732
  // prettier-ignore
10719
- function qi(e, t, i, r) {
10733
+ function Hi(e, t, i, r) {
10720
10734
  var _this55;
10721
- _classCallCheck(this, qi);
10735
+ _classCallCheck(this, Hi);
10722
10736
  _this55 = _super43.call(this, e, ["modal-content", "modal-camera-content"], i), _this55._stopped = !1, _this55._format = "image/png", _this55._canvas = document.createElement("canvas"), _this55._canvas.classList.add("camera-modal-canvas");
10723
10737
  var _this55$addButtonsAnd = _this55.addButtonsAndTheirEvents(t),
10724
10738
  s = _this55$addButtonsAnd.captureButton,
@@ -10726,14 +10740,14 @@ var qi = /*#__PURE__*/function (_Ve) {
10726
10740
  _this55._captureButton = s, _this55._submitButton = o, _this55._captureIcon = _this55._captureButton.children[0], _this55._refreshIcon = B.createSVGElement(la), _this55._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (r == null ? void 0 : r.format) === "jpeg" && (_this55._format = "image/jpeg"), r != null && r.dimensions && (_this55._dimensions = r.dimensions), _this55._contentRef.appendChild(_this55._canvas), _this55.extensionCloseCallback = _this55.stop;
10727
10741
  return _this55;
10728
10742
  }
10729
- _createClass(qi, [{
10743
+ _createClass(Hi, [{
10730
10744
  key: "addButtonsAndTheirEvents",
10731
10745
  value: function addButtonsAndTheirEvents(e) {
10732
- var t = Ve.createSVGButton(ca);
10746
+ var t = We.createSVGButton(ca);
10733
10747
  t.classList.add("modal-svg-camera-button"), t.children[0].classList.add("modal-svg-camera-icon");
10734
10748
  var i = this.addCloseButton(da, !0);
10735
10749
  i.classList.add("modal-svg-close-button"), i.children[0].classList.add("modal-svg-close-icon");
10736
- var r = Ve.createSVGButton(ua);
10750
+ var r = We.createSVGButton(ua);
10737
10751
  return r.classList.add("modal-svg-submit-button"), this.addButtons(t, r), this.addButtonEvents(t, i, r, e), {
10738
10752
  captureButton: t,
10739
10753
  submitButton: r
@@ -10748,7 +10762,7 @@ var qi = /*#__PURE__*/function (_Ve) {
10748
10762
  _this56.capture();
10749
10763
  }, t.addEventListener("click", this.stop.bind(this)), i.onclick = function () {
10750
10764
  var s = _this56.getFile();
10751
- s && at.addFilesToType([s], [r]), _this56.stop(), _this56.close();
10765
+ s && lt.addFilesToType([s], [r]), _this56.stop(), _this56.close();
10752
10766
  };
10753
10767
  }
10754
10768
  }, {
@@ -10761,7 +10775,7 @@ var qi = /*#__PURE__*/function (_Ve) {
10761
10775
  _this57._captureButton.replaceChildren(_this57._captureIcon), _this57._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
10762
10776
  var e = _this57._canvas.getContext("2d");
10763
10777
  e == null || e.clearRect(0, 0, _this57._canvas.width, _this57._canvas.height);
10764
- }, Ve.MODAL_CLOSE_TIMEOUT_MS);
10778
+ }, We.MODAL_CLOSE_TIMEOUT_MS);
10765
10779
  }
10766
10780
  }, {
10767
10781
  key: "start",
@@ -10821,30 +10835,30 @@ var qi = /*#__PURE__*/function (_Ve) {
10821
10835
  }], [{
10822
10836
  key: "createCameraModalFunc",
10823
10837
  value: function createCameraModalFunc(e, t, i, r) {
10824
- var s = new qi(e, t, i, r);
10838
+ var s = new Hi(e, t, i, r);
10825
10839
  return s.openCameraModal.bind(s, s);
10826
10840
  }
10827
10841
  }]);
10828
- return qi;
10829
- }(Ve);
10842
+ return Hi;
10843
+ }(We);
10830
10844
  var ha = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
10831
- var Ft = /*#__PURE__*/function (_ot5) {
10832
- _inherits(Ft, _ot5);
10833
- var _super44 = _createSuper(Ft);
10834
- function Ft(e, t, i) {
10845
+ var Bt = /*#__PURE__*/function (_at5) {
10846
+ _inherits(Bt, _at5);
10847
+ var _super44 = _createSuper(Bt);
10848
+ function Bt(e, t, i) {
10835
10849
  var _this59;
10836
- _classCallCheck(this, Ft);
10850
+ _classCallCheck(this, Bt);
10837
10851
  var s;
10838
- _this59 = _super44.call(this, Ft.createButtonElement(), (s = i == null ? void 0 : i.button) == null ? void 0 : s.position, (i == null ? void 0 : i.button) || {}, "Photo");
10852
+ _this59 = _super44.call(this, Bt.createButtonElement(), (s = i == null ? void 0 : i.button) == null ? void 0 : s.position, (i == null ? void 0 : i.button) || {}, "Photo");
10839
10853
  var r = _this59.createInnerElements(_this59._customStyles);
10840
10854
  i && _this59.addClickEvent(e, t, i.modalContainerStyle, i.files), _this59.elementRef.classList.add("upload-file-button"), _this59.elementRef.appendChild(r.styles), _this59.reapplyStateStyle("styles");
10841
10855
  return _this59;
10842
10856
  }
10843
- _createClass(Ft, [{
10857
+ _createClass(Bt, [{
10844
10858
  key: "createInnerElements",
10845
10859
  value: function createInnerElements(e) {
10846
10860
  return {
10847
- styles: this.createInnerElement(Ft.createSVGIconElement(), "styles", e)
10861
+ styles: this.createInnerElement(Bt.createSVGIconElement(), "styles", e)
10848
10862
  };
10849
10863
  }
10850
10864
  }, {
@@ -10857,7 +10871,7 @@ var Ft = /*#__PURE__*/function (_ot5) {
10857
10871
  value:
10858
10872
  // prettier-ignore
10859
10873
  function addClickEvent(e, t, i, r) {
10860
- var s = qi.createCameraModalFunc(e, t, i, r);
10874
+ var s = Hi.createCameraModalFunc(e, t, i, r);
10861
10875
  this.elementRef.onclick = s;
10862
10876
  }
10863
10877
  }], [{
@@ -10873,35 +10887,35 @@ var Ft = /*#__PURE__*/function (_ot5) {
10873
10887
  return e.id = "camera-icon", e;
10874
10888
  }
10875
10889
  }]);
10876
- return Ft;
10877
- }(ot);
10878
- var $e = /*#__PURE__*/function () {
10890
+ return Bt;
10891
+ }(at);
10892
+ var Ze = /*#__PURE__*/function () {
10879
10893
  // prettier-ignore
10880
- function $e(e, t, i, r) {
10881
- _classCallCheck(this, $e);
10882
- this.elementRef = $e.createPanelElement(e.inputAreaStyle);
10883
- var s = new Ai(e, i),
10894
+ function Ze(e, t, i, r) {
10895
+ _classCallCheck(this, Ze);
10896
+ this.elementRef = Ze.createPanelElement(e.inputAreaStyle);
10897
+ var s = new Ii(e, i),
10884
10898
  o = {},
10885
10899
  a = this.createFileUploadComponents(e, i, r, o);
10886
10900
  e.speechToText && !o.microphone && (o.microphone = {
10887
- button: new zt(e, s, t.addNewErrorMessage.bind(t))
10901
+ button: new Ft(e, s, t.addNewErrorMessage.bind(t))
10888
10902
  });
10889
- var l = new Pe(e, s.inputElementRef, t, i, a);
10890
- s.submit = l.submitFromInput.bind(l), Rt.attach(e, i, s, a, l), e.submitUserMessage = l.submit.bind(l, !0), o.submit = {
10903
+ var l = new De(e, s.inputElementRef, t, i, a);
10904
+ s.submit = l.submitFromInput.bind(l), Nt.attach(e, i, s, a, l), e.submitUserMessage = l.submit.bind(l, !0), o.submit = {
10891
10905
  button: l
10892
- }, $e.addElements(this.elementRef, s, o, r, a, e.dropupStyles);
10906
+ }, Ze.addElements(this.elementRef, s, o, r, a, e.dropupStyles);
10893
10907
  }
10894
- _createClass($e, [{
10908
+ _createClass(Ze, [{
10895
10909
  key: "createFileUploadComponents",
10896
10910
  value:
10897
10911
  // prettier-ignore
10898
10912
  function createFileUploadComponents(e, t, i, r) {
10899
10913
  var o, a, l, c;
10900
- var s = new at(this.elementRef, e.attachmentContainerStyle, t.demo);
10901
- if ($e.createUploadButtons(e, t.fileTypes || {}, s, i, r), (o = t.camera) != null && o.files) {
10914
+ var s = new lt(this.elementRef, e.attachmentContainerStyle, t.demo);
10915
+ if (Ze.createUploadButtons(e, t.fileTypes || {}, s, i, r), (o = t.camera) != null && o.files) {
10902
10916
  var d = ((a = r.images) == null ? void 0 : a.fileType) || s.addType(e, t.camera.files, "images");
10903
10917
  r.camera = {
10904
- button: new Ft(i, d, t.camera)
10918
+ button: new Bt(i, d, t.camera)
10905
10919
  };
10906
10920
  }
10907
10921
  if ((l = t.recordAudio) != null && l.files) {
@@ -10931,7 +10945,7 @@ var $e = /*#__PURE__*/function () {
10931
10945
  d = _zo$a.id,
10932
10946
  u = _zo$a.svgString,
10933
10947
  p = _zo$a.dropupText,
10934
- h = new Je(r, c, l, d, u, p);
10948
+ h = new Ye(r, c, l, d, u, p);
10935
10949
  s[a] = {
10936
10950
  button: h,
10937
10951
  fileType: c
@@ -10943,38 +10957,38 @@ var $e = /*#__PURE__*/function () {
10943
10957
  }, {
10944
10958
  key: "addElements",
10945
10959
  value: function addElements(e, t, i, r, s, o) {
10946
- Kt.addElements(e, t.elementRef);
10947
- var a = Be.create(),
10960
+ Jt.addElements(e, t.elementRef);
10961
+ var a = Ue.create(),
10948
10962
  l = N.addButtons(a, i, r, o);
10949
- Ro.set(t.inputElementRef, a, s.elementRef, l), Be.add(e, a);
10963
+ Ro.set(t.inputElementRef, a, s.elementRef, l), Ue.add(e, a);
10950
10964
  }
10951
10965
  }]);
10952
- return $e;
10966
+ return Ze;
10953
10967
  }();
10954
- var Hi = /*#__PURE__*/function () {
10955
- function Hi() {
10956
- _classCallCheck(this, Hi);
10968
+ var Gi = /*#__PURE__*/function () {
10969
+ function Gi() {
10970
+ _classCallCheck(this, Gi);
10957
10971
  }
10958
- _createClass(Hi, null, [{
10972
+ _createClass(Gi, null, [{
10959
10973
  key: "createElements",
10960
10974
  value: function createElements(e, t, i) {
10961
10975
  var r = document.createElement("div");
10962
10976
  r.id = "chat-view";
10963
10977
  var s = new L(e, t, i);
10964
10978
  t.websocket && K.createConnection(t, s);
10965
- var o = new $e(e, s, t, r);
10966
- return Kt.addElements(r, s.elementRef, o.elementRef), r;
10979
+ var o = new Ze(e, s, t, r);
10980
+ return Jt.addElements(r, s.elementRef, o.elementRef), r;
10967
10981
  }
10968
10982
  }, {
10969
10983
  key: "render",
10970
10984
  value: function render(e, t, i, r) {
10971
- var s = Hi.createElements(e, i, r);
10985
+ var s = Gi.createElements(e, i, r);
10972
10986
  t.replaceChildren(s);
10973
10987
  }
10974
10988
  }]);
10975
- return Hi;
10989
+ return Gi;
10976
10990
  }();
10977
- var pa = "#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}.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:-.7em}@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{background-color:#fff;cursor:auto}.loading-button:hover,.loading-button:active{background-color:#fff}.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";
10991
+ var pa = "#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}.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:-.7em}@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}.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";
10978
10992
  var fa = Object.defineProperty,
10979
10993
  ma = Object.getOwnPropertyDescriptor,
10980
10994
  x = function x(n, e, t, i) {
@@ -10992,10 +11006,10 @@ var v = /*#__PURE__*/function (_Qs) {
10992
11006
  }, _this60.submitUserMessage = function () {
10993
11007
  return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
10994
11008
  }, _this60.focusInput = function () {
10995
- return Bt.focusFromParentElement(_this60._elementRef);
11009
+ return Ut.focusFromParentElement(_this60._elementRef);
10996
11010
  }, _this60.refreshMessages = function () {}, _this60.clearMessages = function () {}, _this60.scrollToBottom = function () {}, _this60.changeSubmitButtonState = function () {}, _this60.onNewMessage = function () {}, _this60.onClearMessages = function () {}, _this60.onComponentRender = function () {}, _this60._hasBeenRendered = !1, _this60._auxiliaryStyleApplied = !1, _o.appendStyleSheetToHead(), _this60._elementRef = document.createElement("div"), _this60._elementRef.id = "container", _this60.attachShadow({
10997
11011
  mode: "open"
10998
- }).appendChild(_this60._elementRef), li.apply(pa, _this60.shadowRoot), setTimeout(function () {
11012
+ }).appendChild(_this60._elementRef), ci.apply(pa, _this60.shadowRoot), setTimeout(function () {
10999
11013
  _this60._hasBeenRendered || _this60.onRender();
11000
11014
  }, 20);
11001
11015
  return _this60;
@@ -11010,7 +11024,7 @@ var v = /*#__PURE__*/function (_Qs) {
11010
11024
  key: "onRender",
11011
11025
  value: function onRender() {
11012
11026
  var _this$_activeService, _this$_childElement;
11013
- (_this$_activeService = this._activeService) !== null && _this$_activeService !== void 0 ? _this$_activeService : this._activeService = wo.create(this), this._activeService && (this.auxiliaryStyle && !this._auxiliaryStyleApplied && (li.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), li.applyDefaultStyleToComponent(this.style), Ut.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Et.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof U) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Hi.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof U && I.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Mi.onRender(this));
11027
+ (_this$_activeService = this._activeService) !== null && _this$_activeService !== void 0 ? _this$_activeService : this._activeService = wo.create(this), this._activeService && (this.auxiliaryStyle && !this._auxiliaryStyleApplied && (ci.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), ci.applyDefaultStyleToComponent(this.style), qt.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? St.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof U) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Gi.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof U && I.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Ti.onRender(this));
11014
11028
  }
11015
11029
  }]);
11016
11030
  return v;