@enegelai/bot-widget 1.5.6 → 1.5.8

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/index.es.js CHANGED
@@ -2,7 +2,7 @@ var Aa = Object.defineProperty;
2
2
  var $a = (a, t, c) => t in a ? Aa(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
3
3
  var oe = (a, t, c) => ($a(a, typeof t != "symbol" ? t + "" : t, c), c);
4
4
  import { css as U, LitElement as rt, html as y, svg as ze } from "lit";
5
- import { property as C, customElement as Y, queryAll as Wt, query as Ve, eventOptions as kt } from "lit/decorators.js";
5
+ import { property as C, customElement as Y, queryAll as Wt, query as Re, eventOptions as kt } from "lit/decorators.js";
6
6
  import { unsafeHTML as de } from "lit-html/directives/unsafe-html.js";
7
7
  import { when as fe } from "lit/directives/when.js";
8
8
  import "@shoelace-style/shoelace/dist/themes/light.css";
@@ -223,14 +223,14 @@ var Kt = { exports: {} };
223
223
  "error"
224
224
  ];
225
225
  function d(T, H) {
226
- var V = T[H];
227
- if (typeof V.bind == "function")
228
- return V.bind(T);
226
+ var R = T[H];
227
+ if (typeof R.bind == "function")
228
+ return R.bind(T);
229
229
  try {
230
- return Function.prototype.bind.call(V, T);
230
+ return Function.prototype.bind.call(R, T);
231
231
  } catch {
232
232
  return function() {
233
- return Function.prototype.apply.apply(V, [T, arguments]);
233
+ return Function.prototype.apply.apply(R, [T, arguments]);
234
234
  };
235
235
  }
236
236
  }
@@ -241,21 +241,21 @@ var Kt = { exports: {} };
241
241
  return T === "debug" && (T = "log"), typeof console === c ? !1 : T === "trace" && i ? l : console[T] !== void 0 ? d(console, T) : console.log !== void 0 ? d(console, "log") : t;
242
242
  }
243
243
  function S(T, H) {
244
- for (var V = 0; V < n.length; V++) {
245
- var $ = n[V];
246
- this[$] = V < T ? t : this.methodFactory($, T, H);
244
+ for (var R = 0; R < n.length; R++) {
245
+ var $ = n[R];
246
+ this[$] = R < T ? t : this.methodFactory($, T, H);
247
247
  }
248
248
  this.log = this.debug;
249
249
  }
250
- function D(T, H, V) {
250
+ function D(T, H, R) {
251
251
  return function() {
252
- typeof console !== c && (S.call(this, H, V), this[T].apply(this, arguments));
252
+ typeof console !== c && (S.call(this, H, R), this[T].apply(this, arguments));
253
253
  };
254
254
  }
255
- function L(T, H, V) {
255
+ function L(T, H, R) {
256
256
  return v(T) || D.apply(this, arguments);
257
257
  }
258
- function E(T, H, V) {
258
+ function E(T, H, R) {
259
259
  var $ = this, he;
260
260
  H = H ?? "WARN";
261
261
  var ee = "loglevel";
@@ -312,7 +312,7 @@ var Kt = { exports: {} };
312
312
  WARN: 3,
313
313
  ERROR: 4,
314
314
  SILENT: 5
315
- }, $.methodFactory = V || L, $.getLevel = function() {
315
+ }, $.methodFactory = R || L, $.getLevel = function() {
316
316
  return he;
317
317
  }, $.setLevel = function(w, ie) {
318
318
  if (typeof w == "string" && $.levels[w.toUpperCase()] !== void 0 && (w = $.levels[w.toUpperCase()]), typeof w == "number" && w >= 0 && w <= $.levels.SILENT) {
@@ -336,12 +336,12 @@ var Kt = { exports: {} };
336
336
  A.getLogger = function(H) {
337
337
  if (typeof H != "symbol" && typeof H != "string" || H === "")
338
338
  throw new TypeError("You must supply a name when creating a logger.");
339
- var V = F[H];
340
- return V || (V = F[H] = new E(
339
+ var R = F[H];
340
+ return R || (R = F[H] = new E(
341
341
  H,
342
342
  A.getLevel(),
343
343
  A.methodFactory
344
- )), V;
344
+ )), R;
345
345
  };
346
346
  var ce = typeof window !== c ? window.log : void 0;
347
347
  return A.noConflict = function() {
@@ -487,27 +487,29 @@ const dt = /* @__PURE__ */ Jt(Ha), za = U`
487
487
  text-decoration: underline;
488
488
  }
489
489
  `, Qt = U`
490
- ${ge}
490
+ ${ge}
491
491
 
492
- :host {
493
- display: inline-flex;
494
- justify-content: center;
495
- align-items: center;
496
- vertical-align: sub;
497
- font-size: 1.2rem;
498
- }
492
+ :host {
493
+ /*
494
+ display: inline-flex;
495
+ justify-content: center;
496
+ align-items: center;
497
+ vertical-align: sub;
498
+ font-size: var(--enegelai-bot-cb-icon-font-size, 1.2em);
499
+ */
500
+ }
499
501
 
500
- .cb-icon {
501
- display: inline-flex;
502
- justify-content: center;
503
- align-items: center;
504
- vertical-align: sub;
505
- font-size: 1.2rem;
506
- }
502
+ .cb-icon {
503
+ display: inline-flex;
504
+ justify-content: center;
505
+ align-items: center;
506
+ vertical-align: sub;
507
+ font-size: var(--enegelai-bot-cb-icon-font-size, 1.2em);
508
+ }
507
509
 
508
- .color-white {
509
- color: white;
510
- }
510
+ .color-white {
511
+ color: white;
512
+ }
511
513
  `;
512
514
  var Ba = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Ct = (a, t, c, i) => {
513
515
  for (var n = i > 1 ? void 0 : i ? qa(t, c) : t, d = a.length - 1, l; d >= 0; d--)
@@ -532,7 +534,7 @@ Ct([
532
534
  Be = Ct([
533
535
  Y("cb-icon")
534
536
  ], Be);
535
- let Ra = (a) => crypto.getRandomValues(new Uint8Array(a)), Va = (a, t, c) => {
537
+ let Va = (a) => crypto.getRandomValues(new Uint8Array(a)), Ra = (a, t, c) => {
536
538
  let i = (2 << Math.log(a.length - 1) / Math.LN2) - 1, n = -~(1.6 * i * t / a.length);
537
539
  return (d = t) => {
538
540
  let l = "";
@@ -543,7 +545,7 @@ let Ra = (a) => crypto.getRandomValues(new Uint8Array(a)), Va = (a, t, c) => {
543
545
  return l;
544
546
  }
545
547
  };
546
- }, Da = (a, t = 21) => Va(a, t, Ra);
548
+ }, Da = (a, t = 21) => Ra(a, t, Va);
547
549
  const Fa = Da("1234567890abcdefghijklmnopqrstuvwxyz", 10);
548
550
  function mt(a = 10) {
549
551
  return Fa(a);
@@ -678,12 +680,12 @@ class Wa {
678
680
  });
679
681
  }*/
680
682
  }
681
- function R(a) {
683
+ function V(a) {
682
684
  return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
683
685
  }
684
686
  function Te(a) {
685
687
  return function t(c) {
686
- return arguments.length === 0 || R(c) ? t : a.apply(this, arguments);
688
+ return arguments.length === 0 || V(c) ? t : a.apply(this, arguments);
687
689
  };
688
690
  }
689
691
  function ue(a) {
@@ -692,13 +694,13 @@ function ue(a) {
692
694
  case 0:
693
695
  return t;
694
696
  case 1:
695
- return R(c) ? t : Te(function(n) {
697
+ return V(c) ? t : Te(function(n) {
696
698
  return a(c, n);
697
699
  });
698
700
  default:
699
- return R(c) && R(i) ? t : R(c) ? Te(function(n) {
701
+ return V(c) && V(i) ? t : V(c) ? Te(function(n) {
700
702
  return a(n, i);
701
- }) : R(i) ? Te(function(n) {
703
+ }) : V(i) ? Te(function(n) {
702
704
  return a(c, n);
703
705
  }) : a(c, i);
704
706
  }
@@ -710,29 +712,29 @@ function Ya(a) {
710
712
  case 0:
711
713
  return t;
712
714
  case 1:
713
- return R(c) ? t : ue(function(d, l) {
715
+ return V(c) ? t : ue(function(d, l) {
714
716
  return a(c, d, l);
715
717
  });
716
718
  case 2:
717
- return R(c) && R(i) ? t : R(c) ? ue(function(d, l) {
719
+ return V(c) && V(i) ? t : V(c) ? ue(function(d, l) {
718
720
  return a(d, i, l);
719
- }) : R(i) ? ue(function(d, l) {
721
+ }) : V(i) ? ue(function(d, l) {
720
722
  return a(c, d, l);
721
723
  }) : Te(function(d) {
722
724
  return a(c, i, d);
723
725
  });
724
726
  default:
725
- return R(c) && R(i) && R(n) ? t : R(c) && R(i) ? ue(function(d, l) {
727
+ return V(c) && V(i) && V(n) ? t : V(c) && V(i) ? ue(function(d, l) {
726
728
  return a(d, l, n);
727
- }) : R(c) && R(n) ? ue(function(d, l) {
729
+ }) : V(c) && V(n) ? ue(function(d, l) {
728
730
  return a(d, i, l);
729
- }) : R(i) && R(n) ? ue(function(d, l) {
731
+ }) : V(i) && V(n) ? ue(function(d, l) {
730
732
  return a(c, d, l);
731
- }) : R(c) ? Te(function(d) {
733
+ }) : V(c) ? Te(function(d) {
732
734
  return a(d, i, n);
733
- }) : R(i) ? Te(function(d) {
735
+ }) : V(i) ? Te(function(d) {
734
736
  return a(c, d, n);
735
- }) : R(n) ? Te(function(d) {
737
+ }) : V(n) ? Te(function(d) {
736
738
  return a(c, i, d);
737
739
  }) : a(c, i, n);
738
740
  }
@@ -910,8 +912,6 @@ class W extends Ke {
910
912
  return this.messages.find((c) => c.author === "user") === void 0;
911
913
  }
912
914
  // Lazy initialization: avoid connecting until we actually need to send something
913
- // TODO Depending on state, start ws & connect immediately when initialized
914
- // use case: page refresh in the middle of the conversation
915
915
  async getWsClient() {
916
916
  if (this.wsClient)
917
917
  return this.wsClient;
@@ -923,7 +923,7 @@ class W extends Ke {
923
923
  convId: this.conversationId
924
924
  }), await this.wsClient.start(), this.wsClient.onMessage = (i) => {
925
925
  this.handleWscMessage(i);
926
- }, this.wsClient;
926
+ }, this.connectWs = "true", this.wsClient;
927
927
  }
928
928
  handleWscMessage(t) {
929
929
  var c;
@@ -939,7 +939,7 @@ class W extends Ke {
939
939
  text: t.text
940
940
  }
941
941
  };
942
- "userName" in t && (i.data.userName = t.userName, this.connectWs = "true"), "userAvatar" in t && (i.data.userAvatar = t.userAvatar, this.connectWs = "true");
942
+ "userName" in t && (i.data.userName = t.userName), "userAvatar" in t && (i.data.userAvatar = t.userAvatar);
943
943
  const n = this.formatMessage(i);
944
944
  this.messages = this.messages.concat([n]);
945
945
  }
@@ -1699,7 +1699,7 @@ var ta = { exports: {} };
1699
1699
  return r.style.webkitTransform = "", r.style.MozTransform = "", r.style.msTransform = "", r.style.OTransform = "", r.style.transform = "", !1;
1700
1700
  r.style.webkitTransform = e, r.style.MozTransform = e, r.style.msTransform = e, r.style.OTransform = e, r.style.transform = e;
1701
1701
  }
1702
- function V(r) {
1702
+ function R(r) {
1703
1703
  r.style.display = "block";
1704
1704
  }
1705
1705
  function $(r) {
@@ -2389,14 +2389,14 @@ var ta = { exports: {} };
2389
2389
  this.open(null, e);
2390
2390
  } }, { key: "showSlide", value: function() {
2391
2391
  var e = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, s = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
2392
- V(this.loader), this.index = parseInt(o);
2392
+ R(this.loader), this.index = parseInt(o);
2393
2393
  var f = this.slidesContainer.querySelector(".current");
2394
2394
  f && A(f, "current"), this.slideAnimateOut();
2395
2395
  var b = this.slidesContainer.querySelectorAll(".gslide")[o];
2396
2396
  if (F(b, "loaded"))
2397
2397
  this.slideAnimateIn(b, s), $(this.loader);
2398
2398
  else {
2399
- V(this.loader);
2399
+ R(this.loader);
2400
2400
  var h = this.elements[o], u = { index: this.index, slide: b, slideNode: b, slideConfig: h.slideConfig, slideIndex: this.index, trigger: h.node, player: null };
2401
2401
  this.trigger("slide_before_load", u), h.instance.setContent(b, function() {
2402
2402
  $(e.loader), e.resize(), e.slideAnimateIn(b, s), e.trigger("slide_after_load", u);
@@ -2868,7 +2868,7 @@ const Bt = {
2868
2868
  doc: Pc,
2869
2869
  docx: Hc
2870
2870
  };
2871
- let Re = class extends Q {
2871
+ let Ve = class extends Q {
2872
2872
  constructor() {
2873
2873
  super(...arguments), this.filename = "", this.url = "";
2874
2874
  }
@@ -2898,17 +2898,17 @@ let Re = class extends Q {
2898
2898
  `;
2899
2899
  }
2900
2900
  };
2901
- Re.styles = Mc;
2901
+ Ve.styles = Mc;
2902
2902
  _t([
2903
2903
  C({ type: String })
2904
- ], Re.prototype, "filename", 2);
2904
+ ], Ve.prototype, "filename", 2);
2905
2905
  _t([
2906
2906
  C({ type: String })
2907
- ], Re.prototype, "url", 2);
2908
- Re = _t([
2907
+ ], Ve.prototype, "url", 2);
2908
+ Ve = _t([
2909
2909
  Y("cb-file")
2910
- ], Re);
2911
- const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', Vc = U`
2910
+ ], Ve);
2911
+ const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Vc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', Rc = U`
2912
2912
  pre code.hljs {
2913
2913
  display: block;
2914
2914
  overflow-x: auto;
@@ -4125,7 +4125,7 @@ const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
4125
4125
  }
4126
4126
  `, Dc = U`
4127
4127
  ${ge}
4128
- ${Vc}
4128
+ ${Rc}
4129
4129
 
4130
4130
  .cb-message-row {
4131
4131
  width: 100%;
@@ -4314,7 +4314,7 @@ function Fc() {
4314
4314
  });
4315
4315
  return a.use(La, { attrs: { target: "_blank", rel: "noopener" } }), a;
4316
4316
  }
4317
- async function Rt(a) {
4317
+ async function Vt(a) {
4318
4318
  const c = Fc().render(a);
4319
4319
  return y`${de(c)}`;
4320
4320
  }
@@ -4443,7 +4443,7 @@ let $e = class extends Q {
4443
4443
  `;
4444
4444
  }
4445
4445
  async _getMessageText(a) {
4446
- return Rt(a.data.text);
4446
+ return Vt(a.data.text);
4447
4447
  }
4448
4448
  renderMessageContent(a) {
4449
4449
  var t;
@@ -4462,7 +4462,7 @@ let $e = class extends Q {
4462
4462
  (c) => y`<cb-file filename="${c.name}" url="${c.url}"></cb-file>`
4463
4463
  )}` : y`<div class="cb-message-text">
4464
4464
  ${zt(
4465
- Rt(((t = a.data.text) == null ? void 0 : t.toString()) || "").then((c) => y`${c}`)
4465
+ Vt(((t = a.data.text) == null ? void 0 : t.toString()) || "").then((c) => y`${c}`)
4466
4466
  )}
4467
4467
  </div>`;
4468
4468
  }
@@ -4486,7 +4486,7 @@ let $e = class extends Q {
4486
4486
  return y`
4487
4487
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
4488
4488
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4489
- <cb-icon slot="icon" svg="${Rc}" color="white"></cb-icon>
4489
+ <cb-icon slot="icon" svg="${Vc}" color="white"></cb-icon>
4490
4490
  </sl-avatar>-->
4491
4491
  <div class="avatar user-avatar">${de(x.setting.userIconSvg)}</div>
4492
4492
  ${this.renderMessage(a)}
@@ -4766,10 +4766,10 @@ ye([
4766
4766
  C({ type: Object })
4767
4767
  ], le.prototype, "form", 2);
4768
4768
  ye([
4769
- Ve("#cb-message-list-bottom-anchor")
4769
+ Re("#cb-message-list-bottom-anchor")
4770
4770
  ], le.prototype, "_messageListBottomAnchor", 2);
4771
4771
  ye([
4772
- Ve(".cb-input-form")
4772
+ Re(".cb-input-form")
4773
4773
  ], le.prototype, "_inputForm", 2);
4774
4774
  ye([
4775
4775
  kt({ capture: !1, passive: !0 })
@@ -4933,7 +4933,7 @@ ve([
4933
4933
  C({ type: String })
4934
4934
  ], be.prototype, "currentKey", 2);
4935
4935
  ve([
4936
- Ve("sl-textarea")
4936
+ Re("sl-textarea")
4937
4937
  ], be.prototype, "inputElement", 2);
4938
4938
  be = ve([
4939
4939
  Y("cb-user-input")
@@ -5284,7 +5284,7 @@ He([
5284
5284
  C({ type: Boolean })
5285
5285
  ], Ce.prototype, "clearMessageDialogOpen", 2);
5286
5286
  He([
5287
- Ve("sl-dialog")
5287
+ Re("sl-dialog")
5288
5288
  ], Ce.prototype, "dialog", 2);
5289
5289
  He([
5290
5290
  C({ type: Boolean })
@@ -5339,6 +5339,7 @@ const si = U`
5339
5339
 
5340
5340
  .cb-engage-popup {
5341
5341
  min-width: var(--enegelai-bot-popup-min-width, 250px);
5342
+ max-width: var(--enegelai-bot-popup-max-width, 350px);
5342
5343
  min-height: var(--enegelai-bot-popup-min-height, 100px);
5343
5344
  color: var(--enegelai-bot-popup-color, rgb(0, 0, 0));
5344
5345
  padding: 10px 20px 10px 10px;
@@ -5411,10 +5412,26 @@ let it = class extends Q {
5411
5412
  _engageClickHandler(a) {
5412
5413
  console.log("engage close clicked!"), x.suppressEngagePopup(), a.stopPropagation();
5413
5414
  }
5415
+ /*
5416
+ ${when(
5417
+ this.open,
5418
+ () => html`<cb-icon color="white" svg="${BiXLg}"></cb-icon>`,
5419
+ () => html`<cb-icon color="white" svg="${BiChatDotsFill}"></cb-icon>`,
5420
+ )}
5421
+ */
5422
+ getPopupPlacement() {
5423
+ let a = "top-end";
5424
+ const t = document.querySelector("enegelai-bot");
5425
+ if (t) {
5426
+ let i = getComputedStyle(t).getPropertyValue("--enegelai-bot-anchor-popup-position").trim();
5427
+ i && i != "" && (a = i);
5428
+ }
5429
+ return a;
5430
+ }
5414
5431
  render() {
5415
5432
  return y`
5416
- <div class="cb-anchor ${this.open ? "open" : ""}" part="cb-anchor" @click=${this._clickHandler.bind(this)}>
5417
- <sl-popup placement="top-end" distance="16" ?active="${x.engage && !x.open}">
5433
+ <div class="cb-anchor ${this.open ? "open" : ""}" part="anchor" @click=${this._clickHandler.bind(this)}>
5434
+ <sl-popup placement="${this.getPopupPlacement()}" distance="16" ?active="${x.engage && !x.open}">
5418
5435
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="icon anchor-button" circle>
5419
5436
  ${fe(
5420
5437
  this.open,
@@ -5448,7 +5465,7 @@ it = ia([
5448
5465
  ], it);
5449
5466
  const li = U`
5450
5467
  ${ge}
5451
- `, Vt = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', bi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', hi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>', ui = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
5468
+ `, Rt = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', bi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', hi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>', ui = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
5452
5469
  var pi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, na = (a, t, c, i) => {
5453
5470
  for (var n = i > 1 ? void 0 : i ? gi(t, c) : t, d = a.length - 1, l; d >= 0; d--)
5454
5471
  (l = a[d]) && (n = (i ? l(t, c, n) : l(n)) || n);
@@ -5457,11 +5474,11 @@ var pi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, na = (a, t
5457
5474
  const Dt = {
5458
5475
  error: {
5459
5476
  variant: "danger",
5460
- icon: Vt
5477
+ icon: Rt
5461
5478
  },
5462
5479
  danger: {
5463
5480
  variant: "danger",
5464
- icon: Vt
5481
+ icon: Rt
5465
5482
  },
5466
5483
  warning: {
5467
5484
  variant: "warning",
@@ -5967,7 +5984,7 @@ let P = class extends Q {
5967
5984
  <cb-message-list .messages=${x.messages} .actions=${x.actions} .form=${x.form} exportparts="form"></cb-message-list>
5968
5985
  ${this.renderUserInput()}
5969
5986
  </div>
5970
- <cb-anchor ?open=${x.open}></cb-anchor>
5987
+ <cb-anchor ?open=${x.open} exportparts="anchor"></cb-anchor>
5971
5988
  `;
5972
5989
  }
5973
5990
  renderUserInput() {
@@ -6165,7 +6182,7 @@ q([
6165
6182
  C({ type: Boolean })
6166
6183
  ], P.prototype, "showAuthAlert", 2);
6167
6184
  q([
6168
- Ve("cb-message-list")
6185
+ Re("cb-message-list")
6169
6186
  ], P.prototype, "_messageList", 2);
6170
6187
  P = q([
6171
6188
  Y("enegelai-bot")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enegelai/bot-widget",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "description": "Enegel.ai Bot Widget",
5
5
  "scripts": {
6
6
  "dev": "vite",