@enegelai/bot-widget 1.12.5 → 1.13.0

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,9 +2,9 @@ var ja = Object.defineProperty;
2
2
  var Ha = (c, e, a) => e in c ? ja(c, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[e] = a;
3
3
  var ge = (c, e, a) => Ha(c, typeof e != "symbol" ? e + "" : e, a);
4
4
  import { css as X, LitElement as ut, html as g, svg as le } from "lit";
5
- import { property as v, customElement as J, queryAll as Qt, query as ke, eventOptions as Mt } from "lit/decorators.js";
5
+ import { property as v, customElement as J, queryAll as Qt, query as Ce, eventOptions as Tt } from "lit/decorators.js";
6
6
  import { unsafeHTML as W } from "lit-html/directives/unsafe-html.js";
7
- import { when as ie } from "lit/directives/when.js";
7
+ import { when as ee } from "lit/directives/when.js";
8
8
  import { registerIconLibrary as Ba } from "@shoelace-style/shoelace";
9
9
  import "@shoelace-style/shoelace/dist/components/button/button.js";
10
10
  import "@shoelace-style/shoelace/dist/components/avatar/avatar.js";
@@ -25,7 +25,7 @@ import "@shoelace-style/shoelace/dist/components/alert/alert.js";
25
25
  import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js";
26
26
  import "@shoelace-style/shoelace/dist/components/badge/badge.js";
27
27
  import { repeat as ze } from "lit/directives/repeat.js";
28
- import { until as Dt } from "lit-html/directives/until.js";
28
+ import { until as kt } from "lit-html/directives/until.js";
29
29
  import Ra from "markdown-it";
30
30
  import Va from "markdown-it-link-attributes";
31
31
  import vt from "highlight.js";
@@ -47,7 +47,7 @@ const ht = class ht extends Event {
47
47
  };
48
48
  ht.eventName = "lit-state-changed";
49
49
  let He = ht;
50
- const Da = (c, e) => e !== c && (e === e || c === c), Lt = class Lt extends EventTarget {
50
+ const Fa = (c, e) => e !== c && (e === e || c === c), Ot = class Ot extends EventTarget {
51
51
  static initPropertyMap() {
52
52
  this.propertyMap || (this.propertyMap = /* @__PURE__ */ new Map());
53
53
  }
@@ -80,7 +80,7 @@ const Da = (c, e) => e !== c && (e === e || c === c), Lt = class Lt extends Even
80
80
  Object.defineProperty(this.prototype, e, s);
81
81
  }
82
82
  static getPropertyDescriptor(e, a, n) {
83
- const s = (n == null ? void 0 : n.hasChanged) || Da;
83
+ const s = (n == null ? void 0 : n.hasChanged) || Fa;
84
84
  return {
85
85
  get() {
86
86
  return this[a];
@@ -121,8 +121,8 @@ const Da = (c, e) => e !== c && (e === e || c === c), Lt = class Lt extends Even
121
121
  this.dispatchEvent(new He(e, a, n));
122
122
  }
123
123
  };
124
- Lt.finalized = !1;
125
- let kt = Lt;
124
+ Ot.finalized = !1;
125
+ let Ct = Ot;
126
126
  class pt {
127
127
  constructor(e, a, n) {
128
128
  this.host = e, this.state = a, this.callback = n || (() => this.host.requestUpdate()), this.host.addController(this);
@@ -148,7 +148,7 @@ function q(c) {
148
148
  }), n.createProperty(a, c), s ? Object.getOwnPropertyDescriptor(e, a) : void 0;
149
149
  };
150
150
  }
151
- function Fa(c, e) {
151
+ function Da(c, e) {
152
152
  if (c !== null && (e === Boolean || e === Number || e === Array || e === Object))
153
153
  try {
154
154
  c = JSON.parse(c);
@@ -168,13 +168,13 @@ function oe(c) {
168
168
  throw new Error("@local-storage decorator need to be called after @property");
169
169
  const s = `${(c == null ? void 0 : c.prefix) || ""}_${(c == null ? void 0 : c.key) || String(a)}`, r = e.constructor, f = r.propertyMap.get(a), w = f == null ? void 0 : f.type;
170
170
  if (f) {
171
- const F = f.initialValue;
172
- f.initialValue = () => Fa(localStorage.getItem(s), w) ?? ea(F), r.propertyMap.set(a, { ...f, ...c });
171
+ const D = f.initialValue;
172
+ f.initialValue = () => Da(localStorage.getItem(s), w) ?? ea(D), r.propertyMap.set(a, { ...f, ...c });
173
173
  }
174
174
  const S = n == null ? void 0 : n.set, K = {
175
175
  ...n,
176
- set: function(F) {
177
- F !== void 0 && localStorage.setItem(s, w === Object || w === Array ? JSON.stringify(F) : F), S && S.call(this, F);
176
+ set: function(D) {
177
+ D !== void 0 && localStorage.setItem(s, w === Object || w === Array ? JSON.stringify(D) : D), S && S.call(this, D);
178
178
  }
179
179
  };
180
180
  Object.defineProperty(r.prototype, a, K);
@@ -223,19 +223,19 @@ var ca = { exports: {} };
223
223
  if (this.log = this.debug, typeof console === a && $ < this.levels.SILENT)
224
224
  return "No console available for logging";
225
225
  }
226
- function F($) {
226
+ function D($) {
227
227
  return function() {
228
228
  typeof console !== a && (K.call(this), this[$].apply(this, arguments));
229
229
  };
230
230
  }
231
231
  function T($, V, C) {
232
- return _($) || F.apply(this, arguments);
232
+ return _($) || D.apply(this, arguments);
233
233
  }
234
234
  function N($, V) {
235
235
  var C = this, Ie, Le, ne, se = "loglevel";
236
236
  typeof $ == "string" ? se += ":" + $ : typeof $ == "symbol" && (se = void 0);
237
- function mt(z) {
238
- var R = (s[z] || "silent").toUpperCase();
237
+ function mt(j) {
238
+ var R = (s[j] || "silent").toUpperCase();
239
239
  if (!(typeof window === a || !se)) {
240
240
  try {
241
241
  window.localStorage[se] = R;
@@ -248,22 +248,22 @@ var ca = { exports: {} };
248
248
  }
249
249
  }
250
250
  }
251
- function Be() {
252
- var z;
251
+ function Re() {
252
+ var j;
253
253
  if (!(typeof window === a || !se)) {
254
254
  try {
255
- z = window.localStorage[se];
255
+ j = window.localStorage[se];
256
256
  } catch {
257
257
  }
258
- if (typeof z === a)
258
+ if (typeof j === a)
259
259
  try {
260
260
  var R = window.document.cookie, qe = encodeURIComponent(se), Ye = R.indexOf(qe + "=");
261
- Ye !== -1 && (z = /^([^;]+)/.exec(
261
+ Ye !== -1 && (j = /^([^;]+)/.exec(
262
262
  R.slice(Ye + qe.length + 1)
263
263
  )[1]);
264
264
  } catch {
265
265
  }
266
- return C.levels[z] === void 0 && (z = void 0), z;
266
+ return C.levels[j] === void 0 && (j = void 0), j;
267
267
  }
268
268
  }
269
269
  function Qe() {
@@ -278,11 +278,11 @@ var ca = { exports: {} };
278
278
  }
279
279
  }
280
280
  }
281
- function ve(z) {
282
- var R = z;
281
+ function ve(j) {
282
+ var R = j;
283
283
  if (typeof R == "string" && C.levels[R.toUpperCase()] !== void 0 && (R = C.levels[R.toUpperCase()]), typeof R == "number" && R >= 0 && R <= C.levels.SILENT)
284
284
  return R;
285
- throw new TypeError("log.setLevel() called with invalid level: " + z);
285
+ throw new TypeError("log.setLevel() called with invalid level: " + j);
286
286
  }
287
287
  C.name = $, C.levels = {
288
288
  TRACE: 0,
@@ -293,25 +293,25 @@ var ca = { exports: {} };
293
293
  SILENT: 5
294
294
  }, C.methodFactory = V || T, C.getLevel = function() {
295
295
  return ne ?? Le ?? Ie;
296
- }, C.setLevel = function(z, R) {
297
- return ne = ve(z), R !== !1 && mt(ne), K.call(C);
298
- }, C.setDefaultLevel = function(z) {
299
- Le = ve(z), Be() || C.setLevel(z, !1);
296
+ }, C.setLevel = function(j, R) {
297
+ return ne = ve(j), R !== !1 && mt(ne), K.call(C);
298
+ }, C.setDefaultLevel = function(j) {
299
+ Le = ve(j), Re() || C.setLevel(j, !1);
300
300
  }, C.resetLevel = function() {
301
301
  ne = null, Qe(), K.call(C);
302
- }, C.enableAll = function(z) {
303
- C.setLevel(C.levels.TRACE, z);
304
- }, C.disableAll = function(z) {
305
- C.setLevel(C.levels.SILENT, z);
302
+ }, C.enableAll = function(j) {
303
+ C.setLevel(C.levels.TRACE, j);
304
+ }, C.disableAll = function(j) {
305
+ C.setLevel(C.levels.SILENT, j);
306
306
  }, C.rebuild = function() {
307
307
  if (f !== C && (Ie = ve(f.getLevel())), K.call(C), f === C)
308
- for (var z in r)
309
- r[z].rebuild();
308
+ for (var j in r)
309
+ r[j].rebuild();
310
310
  }, Ie = ve(
311
311
  f ? f.getLevel() : "WARN"
312
312
  );
313
- var P = Be();
314
- P != null && (ne = ve(P)), K.call(C);
313
+ var z = Re();
314
+ z != null && (ne = ve(z)), K.call(C);
315
315
  }
316
316
  f = new N(), f.getLogger = function(V) {
317
317
  if (typeof V != "symbol" && typeof V != "string" || V === "")
@@ -497,7 +497,7 @@ const Ke = /* @__PURE__ */ aa(Ua), Wa = X`
497
497
  color: white;
498
498
  }
499
499
  `;
500
- var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, Tt = (c, e, a, n) => {
500
+ var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, Et = (c, e, a, n) => {
501
501
  for (var s = n > 1 ? void 0 : n ? Xa(e, a) : e, r = c.length - 1, f; r >= 0; r--)
502
502
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
503
503
  return n && s && Ya(e, a, s), s;
@@ -511,13 +511,13 @@ let Ge = class extends ut {
511
511
  }
512
512
  };
513
513
  Ge.styles = ia;
514
- Tt([
514
+ Et([
515
515
  v({ type: String })
516
516
  ], Ge.prototype, "color", 2);
517
- Tt([
517
+ Et([
518
518
  v({ type: String })
519
519
  ], Ge.prototype, "svg", 2);
520
- Ge = Tt([
520
+ Ge = Et([
521
521
  J("cb-icon")
522
522
  ], Ge);
523
523
  let Ga = (c) => crypto.getRandomValues(new Uint8Array(c)), Za = (c, e, a) => {
@@ -557,7 +557,7 @@ function ec(c = !0) {
557
557
  }
558
558
  const Z = Ke.noConflict();
559
559
  Z.setLevel("info");
560
- const Ft = 3e4;
560
+ const Nt = 3e4;
561
561
  class tc {
562
562
  constructor(e = {}) {
563
563
  this.id = 0, this.url = (e == null ? void 0 : e.url) || null, this.orgId = (e == null ? void 0 : e.orgId) || null, this.botId = (e == null ? void 0 : e.botId) || null, this.convId = (e == null ? void 0 : e.convId) || null, this._options = e || {}, this._ws = null, this.started = !1, this.connected = !1, this.connecting = !1, this.suspendDetected = !1, this.onMessage = (e == null ? void 0 : e.onMessage) || null, this.onConnecting = (e == null ? void 0 : e.onConnecting) || null, this.queue = [], this.pause = (a) => new Promise((n) => setTimeout(n, a)), this.lastTickTs = 0, this.lastAckTs = 0, this.tickInterval = null, Z.info(`WSC: Created, url: ${this.url}`);
@@ -623,7 +623,7 @@ class tc {
623
623
  async start() {
624
624
  this.started = !0, this.connect(), this.lastTickTs = Date.now(), this.tickInterval = setInterval(() => {
625
625
  this.tick();
626
- }, Ft);
626
+ }, Nt);
627
627
  }
628
628
  async stop() {
629
629
  this.started = !1, this.disconnect(), this.tickInterval && (clearInterval(this.tickInterval), this.tickInterval = null);
@@ -660,7 +660,7 @@ class tc {
660
660
  const e = Date.now();
661
661
  let a = !1;
662
662
  const n = e - this.lastAckTs;
663
- n > Ft + 5e3 && (a = !0, Z.info(`WSC: checkConnection: connection loss detected - last ack delay ${n} msec, reconnecting`)), a && this.disconnect();
663
+ n > Nt + 5e3 && (a = !0, Z.info(`WSC: checkConnection: connection loss detected - last ack delay ${n} msec, reconnecting`)), a && this.disconnect();
664
664
  }
665
665
  sendMessage(e) {
666
666
  if (this.checkConnection(), !this.connected) {
@@ -710,12 +710,12 @@ class tc {
710
710
  });
711
711
  }*/
712
712
  }
713
- function D(c) {
713
+ function F(c) {
714
714
  return c != null && typeof c == "object" && c["@@functional/placeholder"] === !0;
715
715
  }
716
716
  function je(c) {
717
717
  return function e(a) {
718
- return arguments.length === 0 || D(a) ? e : c.apply(this, arguments);
718
+ return arguments.length === 0 || F(a) ? e : c.apply(this, arguments);
719
719
  };
720
720
  }
721
721
  function Pe(c) {
@@ -724,13 +724,13 @@ function Pe(c) {
724
724
  case 0:
725
725
  return e;
726
726
  case 1:
727
- return D(a) ? e : je(function(s) {
727
+ return F(a) ? e : je(function(s) {
728
728
  return c(a, s);
729
729
  });
730
730
  default:
731
- return D(a) && D(n) ? e : D(a) ? je(function(s) {
731
+ return F(a) && F(n) ? e : F(a) ? je(function(s) {
732
732
  return c(s, n);
733
- }) : D(n) ? je(function(s) {
733
+ }) : F(n) ? je(function(s) {
734
734
  return c(a, s);
735
735
  }) : c(a, n);
736
736
  }
@@ -742,29 +742,29 @@ function ac(c) {
742
742
  case 0:
743
743
  return e;
744
744
  case 1:
745
- return D(a) ? e : Pe(function(r, f) {
745
+ return F(a) ? e : Pe(function(r, f) {
746
746
  return c(a, r, f);
747
747
  });
748
748
  case 2:
749
- return D(a) && D(n) ? e : D(a) ? Pe(function(r, f) {
749
+ return F(a) && F(n) ? e : F(a) ? Pe(function(r, f) {
750
750
  return c(r, n, f);
751
- }) : D(n) ? Pe(function(r, f) {
751
+ }) : F(n) ? Pe(function(r, f) {
752
752
  return c(a, r, f);
753
753
  }) : je(function(r) {
754
754
  return c(a, n, r);
755
755
  });
756
756
  default:
757
- return D(a) && D(n) && D(s) ? e : D(a) && D(n) ? Pe(function(r, f) {
757
+ return F(a) && F(n) && F(s) ? e : F(a) && F(n) ? Pe(function(r, f) {
758
758
  return c(r, f, s);
759
- }) : D(a) && D(s) ? Pe(function(r, f) {
759
+ }) : F(a) && F(s) ? Pe(function(r, f) {
760
760
  return c(r, n, f);
761
- }) : D(n) && D(s) ? Pe(function(r, f) {
761
+ }) : F(n) && F(s) ? Pe(function(r, f) {
762
762
  return c(a, r, f);
763
- }) : D(a) ? je(function(r) {
763
+ }) : F(a) ? je(function(r) {
764
764
  return c(r, n, s);
765
- }) : D(n) ? je(function(r) {
765
+ }) : F(n) ? je(function(r) {
766
766
  return c(a, r, s);
767
- }) : D(s) ? je(function(r) {
767
+ }) : F(s) ? je(function(r) {
768
768
  return c(a, n, r);
769
769
  }) : c(a, n, s);
770
770
  }
@@ -803,8 +803,8 @@ var dc = Object.defineProperty, O = (c, e, a, n) => {
803
803
  };
804
804
  const A = Ke.noConflict();
805
805
  A.setLevel("info");
806
- const ee = "cb_";
807
- class L extends kt {
806
+ const te = "cb_";
807
+ class L extends Ct {
808
808
  constructor() {
809
809
  super(...arguments), this.actionIdCounter = 0, this.currentLoadContext = {}, this.prefilledFormValues = {}, this.wsClient = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseLastText = null, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null;
810
810
  }
@@ -848,7 +848,7 @@ class L extends kt {
848
848
  }, this.botSettingsRetryTimeout * 1e3), this.botSettingsRetryTimeout = this.botSettingsRetryTimeout * 2;
849
849
  return;
850
850
  }
851
- A.info("Got bot settings - bot is enabled", r), this.disabled = !1, this.setting.welcomeMessage = (r == null ? void 0 : r.welcomeMessage) || "How can I help ?", this.setting.engageMessage = (r == null ? void 0 : r.engageMessage) || "How can I help ?", this.setting.engageTimeout = (r == null ? void 0 : r.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in r ? r.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in r ? r.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in r ? r.uploadImages : !1, this.setting.newConversationTimeoutInSec = (r == null ? void 0 : r.newConversationTimeoutInSec) || 86400, this.setting.enableNotificationSound = "enableNotificationSound" in r ? r.enableNotificationSound : !0, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
851
+ A.info("Got bot settings - bot is enabled", r), this.disabled = !1, this.setting.welcomeMessage = (r == null ? void 0 : r.welcomeMessage) || "How can I help ?", this.setting.disclaimerMessage = r != null && r.disclaimerMessage && r.disclaimerMessage !== "" ? r.disclaimerMessage : null, this.setting.engageMessage = (r == null ? void 0 : r.engageMessage) || "How can I help ?", this.setting.engageTimeout = (r == null ? void 0 : r.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in r ? r.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in r ? r.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in r ? r.uploadImages : !1, this.setting.newConversationTimeoutInSec = (r == null ? void 0 : r.newConversationTimeoutInSec) || 86400, this.setting.enableNotificationSound = "enableNotificationSound" in r ? r.enableNotificationSound : !0, this.setting.botAdvancedSettings = (r == null ? void 0 : r.botAdvancedSettings) ?? {}, this.setting.startFeedbackFromMessage = "startFeedbackFromMessage" in this.setting.botAdvancedSettings ? this.setting.botAdvancedSettings.startFeedbackFromMessage : 1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
852
852
  this.showEngagePopup();
853
853
  }, this.setting.engageTimeout * 1e3);
854
854
  }
@@ -942,7 +942,7 @@ class L extends kt {
942
942
  A.info("form has no fields", e);
943
943
  return;
944
944
  }
945
- const r = `${ee}${this.setting.botId}.${this.conversationId}.form.${n}`, f = localStorage.getItem(r);
945
+ const r = `${te}${this.setting.botId}.${this.conversationId}.form.${n}`, f = localStorage.getItem(r);
946
946
  if (f) {
947
947
  let w = null;
948
948
  try {
@@ -984,19 +984,20 @@ class L extends kt {
984
984
  }
985
985
  // Lazy initialization: avoid connecting until we actually need to send something
986
986
  async getWsClient() {
987
+ var s, r;
987
988
  if (this.wsClient)
988
989
  return this.wsClient;
989
- const a = `${this.setting.url.startsWith("localhost") ? "ws" : "wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;
990
- return A.info(`Initiating ws connection to ${a} ...`), this.wsClient = new tc({
990
+ let a = `${this.setting.url.startsWith("localhost") ? "ws" : "wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;
991
+ return ((r = (s = this.botSettings) == null ? void 0 : s.botAdvancedSettings) == null ? void 0 : r.enableMultiModalConnection) && (a += "?multiModal=true", A.info("MultiModal connection enabled - adding multiModal=true parameter")), A.info(`Initiating ws connection to ${a} ...`), this.wsClient = new tc({
991
992
  url: a,
992
993
  orgId: this.setting.orgId,
993
994
  botId: this.setting.botId,
994
995
  convId: this.conversationId,
995
- onConnecting: (n) => {
996
- this.handleWscConnecting(n);
996
+ onConnecting: (f) => {
997
+ this.handleWscConnecting(f);
997
998
  },
998
- onMessage: (n) => {
999
- this.handleWscMessage(n);
999
+ onMessage: (f) => {
1000
+ this.handleWscMessage(f);
1000
1001
  }
1001
1002
  }), await this.wsClient.start(), this.connectWs = "true", this.wsClient;
1002
1003
  }
@@ -1034,7 +1035,7 @@ class L extends kt {
1034
1035
  this.replyMessage ? this.insertMessage(n, -1) : this.addMessage(n);
1035
1036
  } else {
1036
1037
  if (this.replyMessage)
1037
- this.streamingResponseInProgress ? (this.finishStreamingResponse(e.text), this.streamingResponseInProgress = !1) : (this.replyMessage.data.text = e.text, this.updateMessage(this.replyMessage, "")), this.replyMessage = null;
1038
+ "userName" in e && (this.replyMessage.data.userName = e.userName), "userAvatar" in e && (this.replyMessage.data.userAvatar = e.userAvatar), this.streamingResponseInProgress ? (this.finishStreamingResponse(e.text), this.streamingResponseInProgress = !1) : (this.replyMessage.data.text = e.text, this.updateMessage(this.replyMessage, "")), this.replyMessage = null;
1038
1039
  else {
1039
1040
  const n = {
1040
1041
  id: (e == null ? void 0 : e.id) || null,
@@ -1057,7 +1058,7 @@ class L extends kt {
1057
1058
  break;
1058
1059
  }
1059
1060
  case "typing": {
1060
- this.replyMessage = {
1061
+ this.replyMessage || (this.replyMessage = {
1061
1062
  id: (e == null ? void 0 : e.id) || null,
1062
1063
  author: "assistant",
1063
1064
  type: "text",
@@ -1065,7 +1066,37 @@ class L extends kt {
1065
1066
  data: {
1066
1067
  text: ""
1067
1068
  }
1068
- }, this.addMessage(this.replyMessage);
1069
+ }, this.addMessage(this.replyMessage));
1070
+ break;
1071
+ }
1072
+ case "typing-stopped": {
1073
+ this.replyMessage && typeof this.replyMessage.id == "string" && this.replyMessage.isThinking && (this.removeMessage(this.replyMessage.id), this.replyMessage = null);
1074
+ break;
1075
+ }
1076
+ case "agent-connected": {
1077
+ this.addMessage({
1078
+ id: (e == null ? void 0 : e.id) || null,
1079
+ author: "assistant",
1080
+ type: "text",
1081
+ data: {
1082
+ text: "_Joined chat_",
1083
+ ...e.userName && { userName: e.userName },
1084
+ ...e.userAvatar && { userAvatar: e.userAvatar }
1085
+ }
1086
+ });
1087
+ break;
1088
+ }
1089
+ case "agent-disconnected": {
1090
+ this.addMessage({
1091
+ id: (e == null ? void 0 : e.id) || null,
1092
+ author: "assistant",
1093
+ type: "text",
1094
+ data: {
1095
+ text: "_Left chat_",
1096
+ ...e.userName && { userName: e.userName },
1097
+ ...e.userAvatar && { userAvatar: e.userAvatar }
1098
+ }
1099
+ });
1069
1100
  break;
1070
1101
  }
1071
1102
  case "form": {
@@ -1250,7 +1281,7 @@ class L extends kt {
1250
1281
  A.info("submitForm: No form is active - ignored");
1251
1282
  return;
1252
1283
  }
1253
- const a = `${ee}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1284
+ const a = `${te}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1254
1285
  await this.sendFormData(this.form.name, e), localStorage.setItem(a, JSON.stringify(e)), "name" in e && (this.feedbackName = e.name), "email" in e && (this.feedbackEmail = e.email), this.form = null;
1255
1286
  }
1256
1287
  async sendFormData(e, a) {
@@ -1355,42 +1386,42 @@ class L extends kt {
1355
1386
  }
1356
1387
  }
1357
1388
  O([
1358
- oe({ prefix: ee }),
1389
+ oe({ prefix: te }),
1359
1390
  q({ value: "en" })
1360
1391
  ], L.prototype, "language");
1361
1392
  O([
1362
- oe({ prefix: ee }),
1393
+ oe({ prefix: te }),
1363
1394
  q({ value: "light" })
1364
1395
  ], L.prototype, "theme");
1365
1396
  O([
1366
- oe({ prefix: ee }),
1397
+ oe({ prefix: te }),
1367
1398
  q({ type: Boolean, value: !1 })
1368
1399
  ], L.prototype, "open");
1369
1400
  O([
1370
1401
  q({ type: Boolean, value: !1 })
1371
1402
  ], L.prototype, "alwaysOpen");
1372
1403
  O([
1373
- oe({ prefix: ee }),
1404
+ oe({ prefix: te }),
1374
1405
  q({ value: "false" })
1375
1406
  ], L.prototype, "connectWs");
1376
1407
  O([
1377
- oe({ prefix: ee }),
1408
+ oe({ prefix: te }),
1378
1409
  q({ value: xe() })
1379
1410
  ], L.prototype, "conversationId");
1380
1411
  O([
1381
- oe({ prefix: ee }),
1412
+ oe({ prefix: te }),
1382
1413
  q({ value: 0 })
1383
1414
  ], L.prototype, "lastConversationUpdate");
1384
1415
  O([
1385
- oe({ prefix: ee }),
1416
+ oe({ prefix: te }),
1386
1417
  q({ type: Array, value: [] })
1387
1418
  ], L.prototype, "messages");
1388
1419
  O([
1389
- oe({ prefix: ee }),
1420
+ oe({ prefix: te }),
1390
1421
  q({ value: 0 })
1391
1422
  ], L.prototype, "unreadMessages");
1392
1423
  O([
1393
- oe({ prefix: ee }),
1424
+ oe({ prefix: te }),
1394
1425
  q({
1395
1426
  type: Array,
1396
1427
  value: []
@@ -1456,14 +1487,14 @@ O([
1456
1487
  q({ type: Boolean, value: !1 })
1457
1488
  ], L.prototype, "connected");
1458
1489
  O([
1459
- oe({ prefix: ee }),
1490
+ oe({ prefix: te }),
1460
1491
  q({ value: "true" })
1461
1492
  ], L.prototype, "shouldEngage");
1462
1493
  O([
1463
1494
  q({ type: Boolean, value: !1 })
1464
1495
  ], L.prototype, "engage");
1465
1496
  O([
1466
- oe({ prefix: ee }),
1497
+ oe({ prefix: te }),
1467
1498
  q({
1468
1499
  type: Object,
1469
1500
  value: {
@@ -1471,16 +1502,19 @@ O([
1471
1502
  botId: null,
1472
1503
  url: null,
1473
1504
  welcomeMessage: null,
1505
+ disclaimerMessage: null,
1474
1506
  splitMessagesAtBreak: !1,
1475
1507
  feedbackEnabled: !1,
1508
+ startFeedbackFromMessage: 1,
1476
1509
  uploadImages: !1,
1477
1510
  newConversationTimeoutInSec: 86400,
1478
- enableNotificationSound: !0
1511
+ enableNotificationSound: !0,
1512
+ botAdvancedOptions: null
1479
1513
  }
1480
1514
  })
1481
1515
  ], L.prototype, "setting");
1482
1516
  O([
1483
- oe({ prefix: ee }),
1517
+ oe({ prefix: te }),
1484
1518
  q({ type: Object, value: {} })
1485
1519
  ], L.prototype, "context");
1486
1520
  O([
@@ -1514,11 +1548,11 @@ O([
1514
1548
  q({ type: Array, value: [] })
1515
1549
  ], L.prototype, "feedbackMessages");
1516
1550
  O([
1517
- oe({ prefix: ee }),
1551
+ oe({ prefix: te }),
1518
1552
  q({ type: String, value: "" })
1519
1553
  ], L.prototype, "feedbackName");
1520
1554
  O([
1521
- oe({ prefix: ee }),
1555
+ oe({ prefix: te }),
1522
1556
  q({ type: String, value: "" })
1523
1557
  ], L.prototype, "feedbackEmail");
1524
1558
  const p = new L(), fc = X`
@@ -1604,7 +1638,7 @@ var lc = Object.defineProperty, bc = (c, e, a, n) => {
1604
1638
  Ba("system", {
1605
1639
  resolver: (c) => ""
1606
1640
  });
1607
- class te extends ut {
1641
+ class ae extends ut {
1608
1642
  constructor() {
1609
1643
  super(...arguments), this.lang = "en";
1610
1644
  }
@@ -1621,14 +1655,14 @@ class te extends ut {
1621
1655
  }
1622
1656
  bc([
1623
1657
  v({ type: String })
1624
- ], te.prototype, "lang");
1658
+ ], ae.prototype, "lang");
1625
1659
  var hc = Object.defineProperty, uc = Object.getOwnPropertyDescriptor, na = (c, e, a, n) => {
1626
1660
  for (var s = n > 1 ? void 0 : n ? uc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
1627
1661
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
1628
1662
  return n && s && hc(e, a, s), s;
1629
1663
  };
1630
1664
  const pc = '<svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"></path></svg>';
1631
- let ot = class extends te {
1665
+ let ot = class extends ae {
1632
1666
  constructor() {
1633
1667
  super(...arguments), this.title = "ChatBot";
1634
1668
  }
@@ -1639,13 +1673,13 @@ let ot = class extends te {
1639
1673
  */
1640
1674
  renderExp() {
1641
1675
  return g` <header class="cb-header" part="header">
1642
- ${ie(
1676
+ ${ee(
1643
1677
  p.setting.logoUrl !== "",
1644
1678
  () => g`<img class="cb-header-logo" part="header-logo" src="${p.setting.logoUrl}" />`,
1645
1679
  () => g`<div class="cb-header-logo" part="header-logo">${W(p.setting.logoSvg)}</div>`
1646
1680
  )}
1647
1681
  <div class="cb-header-title" part="header-title">${this.title}</div>
1648
- ${ie(
1682
+ ${ee(
1649
1683
  p.alwaysOpen,
1650
1684
  () => g``,
1651
1685
  () => g`<div class="cb-header-close" part="header-close">${W(pc)}</div>`
@@ -1654,13 +1688,13 @@ let ot = class extends te {
1654
1688
  }
1655
1689
  render() {
1656
1690
  return g` <header class="cb-header" part="header">
1657
- ${ie(
1691
+ ${ee(
1658
1692
  p.setting.logoUrl !== "",
1659
1693
  () => g`<img class="cb-header-img" part="header-logo" src="${p.setting.logoUrl}" />`,
1660
1694
  () => g`<div class="cb-header-logo" part="header-logo">${W(p.setting.logoSvg)}</div>`
1661
1695
  )}
1662
1696
  <div class="cb-header-title" part="header-title">${this.title}</div>
1663
- ${ie(
1697
+ ${ee(
1664
1698
  p.alwaysOpen,
1665
1699
  () => g`<div></div>`,
1666
1700
  () => g`<div @click=${this._clickCloseHandler} class="cb-header-close" part="header-close">${W(p.setting.closeSvg)}</div>`
@@ -1717,7 +1751,7 @@ var mc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor, vc = (c, e
1717
1751
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
1718
1752
  return n && s && mc(e, a, s), s;
1719
1753
  };
1720
- let Ct = class extends te {
1754
+ let St = class extends ae {
1721
1755
  constructor() {
1722
1756
  super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
1723
1757
  }
@@ -1752,10 +1786,10 @@ let Ct = class extends te {
1752
1786
  `;
1753
1787
  }
1754
1788
  };
1755
- Ct.styles = gc;
1756
- Ct = vc([
1789
+ St.styles = gc;
1790
+ St = vc([
1757
1791
  J("cb-footer")
1758
- ], Ct);
1792
+ ], St);
1759
1793
  const wc = X`
1760
1794
  ${me}
1761
1795
 
@@ -1800,6 +1834,43 @@ const wc = X`
1800
1834
  display: none;
1801
1835
  }*/
1802
1836
 
1837
+ .cb-disclaimer-wrapper {
1838
+ max-width: 100%;
1839
+ }
1840
+
1841
+ .cb-disclaimer-message {
1842
+ color: var(--enegelai-disclaimer-message-color, rgba(34, 34, 34, 0.6));
1843
+ border-radius: 6px;
1844
+ background-color: var(--enegelai-disclaimer-message-background, rgba(234, 234, 234, 0.2));
1845
+ text-align: left;
1846
+ padding: 2px 12px;
1847
+ font-size: 0.85em;
1848
+ cursor: pointer;
1849
+
1850
+ /* clamp to 2 lines by default */
1851
+ display: -webkit-box;
1852
+ -webkit-box-orient: vertical;
1853
+ -webkit-line-clamp: var(--enegelai-disclaimer-line-clamp, 2);
1854
+ overflow: hidden;
1855
+ /* optional: smooth-ish open/close height change in some UAs */
1856
+ transition: all 2s ease;
1857
+ }
1858
+
1859
+ .cb-disclaimer-message p {
1860
+ margin-block-start: 0.5em;
1861
+ margin-block-end: 0.5em;
1862
+ }
1863
+
1864
+ /* remove default disclosure marker */
1865
+ .cb-disclaimer-message::-webkit-details-marker { display: none; }
1866
+ .cb-disclaimer-message::marker { content: ""; }
1867
+
1868
+ /* when open, show full text */
1869
+ .cb-disclaimer-wrapper[open] .cb-disclaimer-message {
1870
+ -webkit-line-clamp: unset;
1871
+ overflow: visible;
1872
+ }
1873
+
1803
1874
  .cb-input-form {
1804
1875
  margin: 10px 5px;
1805
1876
  padding: 20px 20px;
@@ -1971,25 +2042,25 @@ var sa = { exports: {} };
1971
2042
  return t;
1972
2043
  }
1973
2044
  function _(t, i) {
1974
- if ((R(t) || t === window || t === document) && (t = [t]), Ye(t) || Se(t) || (t = [t]), qt(t) != 0) {
1975
- if (Ye(t) && !Se(t)) for (var o = t.length, d = 0; d < o && i.call(t[d], t[d], d, t) !== !1; d++) ;
1976
- else if (Se(t)) {
2045
+ if ((R(t) || t === window || t === document) && (t = [t]), Ye(t) || _e(t) || (t = [t]), Pt(t) != 0) {
2046
+ if (Ye(t) && !_e(t)) for (var o = t.length, d = 0; d < o && i.call(t[d], t[d], d, t) !== !1; d++) ;
2047
+ else if (_e(t)) {
1977
2048
  for (var l in t) if (Y(t, l) && i.call(t[l], t[l], l, t) === !1) break;
1978
2049
  }
1979
2050
  }
1980
2051
  }
1981
2052
  function K(t) {
1982
2053
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, d = t[w] = t[w] || [], l = { all: d, evt: null, found: null };
1983
- return i && o && qt(d) > 0 && _(d, function(h, b) {
2054
+ return i && o && Pt(d) > 0 && _(d, function(h, b) {
1984
2055
  if (h.eventName == i && h.fn.toString() == o.toString()) return l.found = !0, l.evt = b, !1;
1985
2056
  }), l;
1986
2057
  }
1987
- function F(t) {
2058
+ function D(t) {
1988
2059
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = i.onElement, d = i.withCallback, l = i.avoidDuplicate, h = l === void 0 || l, b = i.once, u = b !== void 0 && b, y = i.useCapture, m = y !== void 0 && y, x = arguments.length > 2 ? arguments[2] : void 0, k = o || [];
1989
2060
  function M(E) {
1990
- P(d) && d.call(x, E, this), u && M.destroy();
2061
+ z(d) && d.call(x, E, this), u && M.destroy();
1991
2062
  }
1992
- return z(k) && (k = document.querySelectorAll(k)), M.destroy = function() {
2063
+ return j(k) && (k = document.querySelectorAll(k)), M.destroy = function() {
1993
2064
  _(k, function(E) {
1994
2065
  var I = K(E, t, M);
1995
2066
  I.found && I.all.splice(I.evt, 1), E.removeEventListener && E.removeEventListener(t, M, m);
@@ -2021,14 +2092,14 @@ var sa = { exports: {} };
2021
2092
  function V(t) {
2022
2093
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", o = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
2023
2094
  if (!t || i === "") return !1;
2024
- if (i === "none") return P(o) && o(), !1;
2095
+ if (i === "none") return z(o) && o(), !1;
2025
2096
  var d = mt(), l = i.split(" ");
2026
2097
  _(l, function(h) {
2027
2098
  T(t, "g" + h);
2028
- }), F(d, { onElement: t, avoidDuplicate: !1, once: !0, withCallback: function(h, b) {
2099
+ }), D(d, { onElement: t, avoidDuplicate: !1, once: !0, withCallback: function(h, b) {
2029
2100
  _(l, function(u) {
2030
2101
  N(b, "g" + u);
2031
- }), P(o) && o();
2102
+ }), z(o) && o();
2032
2103
  } });
2033
2104
  }
2034
2105
  function C(t) {
@@ -2054,7 +2125,7 @@ var sa = { exports: {} };
2054
2125
  var t, i = document.createElement("fakeelement"), o = { animation: "animationend", OAnimation: "oAnimationEnd", MozAnimation: "animationend", WebkitAnimation: "webkitAnimationEnd" };
2055
2126
  for (t in o) if (i.style[t] !== void 0) return o[t];
2056
2127
  }
2057
- function Be(t, i, o, d) {
2128
+ function Re(t, i, o, d) {
2058
2129
  if (t()) i();
2059
2130
  else {
2060
2131
  var l;
@@ -2066,17 +2137,17 @@ var sa = { exports: {} };
2066
2137
  }
2067
2138
  function Qe(t, i, o) {
2068
2139
  if (re(t)) console.error("Inject assets error");
2069
- else if (P(i) && (o = i, i = !1), z(i) && i in window) P(o) && o();
2140
+ else if (z(i) && (o = i, i = !1), j(i) && i in window) z(o) && o();
2070
2141
  else {
2071
2142
  var d;
2072
2143
  if (t.indexOf(".css") !== -1) {
2073
- if ((d = document.querySelectorAll('link[href="' + t + '"]')) && d.length > 0) return void (P(o) && o());
2144
+ if ((d = document.querySelectorAll('link[href="' + t + '"]')) && d.length > 0) return void (z(o) && o());
2074
2145
  var l = document.getElementsByTagName("head")[0], h = l.querySelectorAll('link[rel="stylesheet"]'), b = document.createElement("link");
2075
- return b.rel = "stylesheet", b.type = "text/css", b.href = t, b.media = "all", h ? l.insertBefore(b, h[0]) : l.appendChild(b), void (P(o) && o());
2146
+ return b.rel = "stylesheet", b.type = "text/css", b.href = t, b.media = "all", h ? l.insertBefore(b, h[0]) : l.appendChild(b), void (z(o) && o());
2076
2147
  }
2077
2148
  if ((d = document.querySelectorAll('script[src="' + t + '"]')) && d.length > 0) {
2078
- if (P(o)) {
2079
- if (z(i)) return Be(function() {
2149
+ if (z(o)) {
2150
+ if (j(i)) return Re(function() {
2080
2151
  return window[i] !== void 0;
2081
2152
  }, function() {
2082
2153
  o();
@@ -2086,8 +2157,8 @@ var sa = { exports: {} };
2086
2157
  } else {
2087
2158
  var u = document.createElement("script");
2088
2159
  u.type = "text/javascript", u.src = t, u.onload = function() {
2089
- if (P(o)) {
2090
- if (z(i)) return Be(function() {
2160
+ if (z(o)) {
2161
+ if (j(i)) return Re(function() {
2091
2162
  return window[i] !== void 0;
2092
2163
  }, function() {
2093
2164
  o();
@@ -2101,10 +2172,10 @@ var sa = { exports: {} };
2101
2172
  function ve() {
2102
2173
  return "navigator" in window && window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i);
2103
2174
  }
2104
- function P(t) {
2175
+ function z(t) {
2105
2176
  return typeof t == "function";
2106
2177
  }
2107
- function z(t) {
2178
+ function j(t) {
2108
2179
  return typeof t == "string";
2109
2180
  }
2110
2181
  function R(t) {
@@ -2116,8 +2187,8 @@ var sa = { exports: {} };
2116
2187
  function Ye(t) {
2117
2188
  return t && t.length && isFinite(t.length);
2118
2189
  }
2119
- function Se(t) {
2120
- return n(t) === "object" && t != null && !P(t) && !qe(t);
2190
+ function _e(t) {
2191
+ return n(t) === "object" && t != null && !z(t) && !qe(t);
2121
2192
  }
2122
2193
  function re(t) {
2123
2194
  return t == null;
@@ -2125,8 +2196,8 @@ var sa = { exports: {} };
2125
2196
  function Y(t, i) {
2126
2197
  return t !== null && hasOwnProperty.call(t, i);
2127
2198
  }
2128
- function qt(t) {
2129
- if (Se(t)) {
2199
+ function Pt(t) {
2200
+ if (_e(t)) {
2130
2201
  if (t.keys) return t.keys().length;
2131
2202
  var i = 0;
2132
2203
  for (var o in t) Y(t, o) && i++;
@@ -2137,7 +2208,7 @@ var sa = { exports: {} };
2137
2208
  function et(t) {
2138
2209
  return !isNaN(parseFloat(t)) && isFinite(t);
2139
2210
  }
2140
- function Ot() {
2211
+ function zt() {
2141
2212
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, i = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
2142
2213
  if (!i.length) return !1;
2143
2214
  if (i.length == 1) return i[0];
@@ -2157,7 +2228,7 @@ var sa = { exports: {} };
2157
2228
  }
2158
2229
  function va(t) {
2159
2230
  if (t.events.hasOwnProperty("keyboard")) return !1;
2160
- t.events.keyboard = F("keydown", { onElement: window, withCallback: function(i, o) {
2231
+ t.events.keyboard = D("keydown", { onElement: window, withCallback: function(i, o) {
2161
2232
  var d = (i = i || window.event).keyCode;
2162
2233
  if (d == 9) {
2163
2234
  var l = document.querySelector(".gbtn.focused");
@@ -2169,10 +2240,10 @@ var sa = { exports: {} };
2169
2240
  var b = document.querySelectorAll(".gbtn[data-taborder]");
2170
2241
  if (!b || b.length <= 0) return;
2171
2242
  if (!l) {
2172
- var u = Ot();
2243
+ var u = zt();
2173
2244
  return void (u && (u.focus(), T(u, "focused")));
2174
2245
  }
2175
- var y = Ot(l.getAttribute("data-taborder"));
2246
+ var y = zt(l.getAttribute("data-taborder"));
2176
2247
  N(l, "focused"), y && (y.focus(), T(y, "focused"));
2177
2248
  }
2178
2249
  d == 39 && t.nextSlide(), d == 37 && t.prevSlide(), d == 27 && t.close();
@@ -2220,7 +2291,7 @@ var sa = { exports: {} };
2220
2291
  t.style.transform = "translate3d(" + i + "px, " + o + "px, 0)";
2221
2292
  } }, { key: "widowWidth", value: function() {
2222
2293
  return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
2223
- } }]), Pt = f(function t() {
2294
+ } }]), jt = f(function t() {
2224
2295
  var i = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2225
2296
  s(this, t);
2226
2297
  var d = o.dragEl, l = o.toleranceX, h = l === void 0 ? 40 : l, b = o.toleranceY, u = b === void 0 ? 65 : b, y = o.slide, m = y === void 0 ? null : y, x = o.instance, k = x === void 0 ? null : x;
@@ -2275,7 +2346,7 @@ var sa = { exports: {} };
2275
2346
  function xa(t, i, o, d) {
2276
2347
  var l = t.querySelector(".gslide-media"), h = new Image(), b = "gSlideTitle_" + o, u = "gSlideDesc_" + o;
2277
2348
  h.addEventListener("load", function() {
2278
- P(d) && d();
2349
+ z(d) && d();
2279
2350
  }, !1), h.src = i.href, i.sizes != "" && i.srcset != "" && (h.sizes = i.sizes, h.srcset = i.srcset), h.alt = "", re(i.alt) || i.alt === "" || (h.alt = i.alt), i.title !== "" && h.setAttribute("aria-labelledby", b), i.description !== "" && h.setAttribute("aria-describedby", u), i.hasOwnProperty("_hasCustomWidth") && i._hasCustomWidth && (h.style.width = i.width), i.hasOwnProperty("_hasCustomHeight") && i._hasCustomHeight && (h.style.height = i.height), l.insertBefore(h, l.firstChild);
2280
2351
  }
2281
2352
  function ka(t, i, o, d) {
@@ -2294,21 +2365,21 @@ var sa = { exports: {} };
2294
2365
  T(m, "".concat(k, "-video gvideo")), m.appendChild(I), m.setAttribute("data-id", b), m.setAttribute("data-index", o);
2295
2366
  var U = Y(l.settings.plyr, "config") ? l.settings.plyr.config : {}, fe = new Plyr("#" + b, U);
2296
2367
  fe.on("ready", function(de) {
2297
- y[b] = de.detail.plyr, P(d) && d();
2298
- }), Be(function() {
2368
+ y[b] = de.detail.plyr, z(d) && d();
2369
+ }), Re(function() {
2299
2370
  return t.querySelector("iframe") && t.querySelector("iframe").dataset.ready == "true";
2300
2371
  }, function() {
2301
2372
  l.resize(t);
2302
- }), fe.on("enterfullscreen", zt), fe.on("exitfullscreen", zt);
2373
+ }), fe.on("enterfullscreen", Ht), fe.on("exitfullscreen", Ht);
2303
2374
  });
2304
2375
  }
2305
- function zt(t) {
2376
+ function Ht(t) {
2306
2377
  var i = $(t.target, ".gslide-media");
2307
2378
  t.type === "enterfullscreen" && T(i, "fullscreen"), t.type === "exitfullscreen" && N(i, "fullscreen");
2308
2379
  }
2309
2380
  function Ca(t, i, o, d) {
2310
2381
  var l, h = this, b = t.querySelector(".gslide-media"), u = !(!Y(i, "href") || !i.href) && i.href.split("#").pop().trim(), y = !(!Y(i, "content") || !i.content) && i.content;
2311
- if (y && (z(y) && (l = ne('<div class="ginlined-content">'.concat(y, "</div>"))), R(y))) {
2382
+ if (y && (j(y) && (l = ne('<div class="ginlined-content">'.concat(y, "</div>"))), R(y))) {
2312
2383
  y.style.display == "none" && (y.style.display = "block");
2313
2384
  var m = document.createElement("div");
2314
2385
  m.className = "ginlined-content", m.appendChild(y), l = m;
@@ -2320,28 +2391,28 @@ var sa = { exports: {} };
2320
2391
  k.style.height = i.height, k.style.maxWidth = i.width, T(k, "ginlined-content"), l = k;
2321
2392
  }
2322
2393
  if (!l) return console.error("Unable to append inline slide content", i), !1;
2323
- b.style.height = i.height, b.style.width = i.width, b.appendChild(l), this.events["inlineclose" + u] = F("click", { onElement: b.querySelectorAll(".gtrigger-close"), withCallback: function(M) {
2394
+ b.style.height = i.height, b.style.width = i.width, b.appendChild(l), this.events["inlineclose" + u] = D("click", { onElement: b.querySelectorAll(".gtrigger-close"), withCallback: function(M) {
2324
2395
  M.preventDefault(), h.close();
2325
- } }), P(d) && d();
2396
+ } }), z(d) && d();
2326
2397
  }
2327
2398
  function Sa(t, i, o, d) {
2328
2399
  var l = t.querySelector(".gslide-media"), h = function(b) {
2329
2400
  var u = b.url, y = b.allow, m = b.callback, x = b.appendTo, k = document.createElement("iframe");
2330
2401
  return k.className = "vimeo-video gvideo", k.src = u, k.style.width = "100%", k.style.height = "100%", y && k.setAttribute("allow", y), k.onload = function() {
2331
- k.onload = null, T(k, "node-ready"), P(m) && m();
2402
+ k.onload = null, T(k, "node-ready"), z(m) && m();
2332
2403
  }, x && x.appendChild(k), k;
2333
2404
  }({ url: i.href, callback: d });
2334
2405
  l.parentNode.style.maxWidth = i.width, l.parentNode.style.height = i.height, l.appendChild(h);
2335
2406
  }
2336
2407
  var _a = f(function t() {
2337
2408
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2338
- s(this, t), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, Se(i) && (this.defaults = S(this.defaults, i));
2409
+ s(this, t), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, _e(i) && (this.defaults = S(this.defaults, i));
2339
2410
  }, [{ key: "sourceType", value: function(t) {
2340
2411
  var i = t;
2341
2412
  return (t = t.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : t.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || t.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || t.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || t.match(/(youtube\.com|youtube-nocookie\.com)\/shorts\/([a-zA-Z0-9\-_]+)/) || t.match(/vimeo\.com\/([0-9]*)/) || t.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : t.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : t.indexOf("#") > -1 && i.split("#").pop().trim() !== "" ? "inline" : t.indexOf("goajax=true") > -1 ? "ajax" : "external";
2342
2413
  } }, { key: "parseConfig", value: function(t, i) {
2343
2414
  var o = this, d = S({ descPosition: i.descPosition }, this.defaults);
2344
- if (Se(t) && !R(t)) {
2415
+ if (_e(t) && !R(t)) {
2345
2416
  Y(t, "type") || (Y(t, "content") && t.content ? t.type = "inline" : Y(t, "href") && (t.type = this.sourceType(t.href)));
2346
2417
  var l = S(d, t);
2347
2418
  return this.setSize(l, i), l;
@@ -2399,16 +2470,16 @@ var sa = { exports: {} };
2399
2470
  var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, o = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
2400
2471
  if (Q(i, "loaded")) return !1;
2401
2472
  var d = this.instance.settings, l = this.slideConfig, h = ve();
2402
- P(d.beforeSlideLoad) && d.beforeSlideLoad({ index: this.index, slide: i, player: !1 });
2473
+ z(d.beforeSlideLoad) && d.beforeSlideLoad({ index: this.index, slide: i, player: !1 });
2403
2474
  var b = l.type, u = l.descPosition, y = i.querySelector(".gslide-media"), m = i.querySelector(".gslide-title"), x = i.querySelector(".gslide-desc"), k = i.querySelector(".gdesc-inner"), M = o, E = "gSlideTitle_" + this.index, I = "gSlideDesc_" + this.index;
2404
- if (P(d.afterSlideLoad) && (M = function() {
2405
- P(o) && o(), d.afterSlideLoad({ index: t.index, slide: i, player: t.instance.getSlidePlayerInstance(t.index) });
2475
+ if (z(d.afterSlideLoad) && (M = function() {
2476
+ z(o) && o(), d.afterSlideLoad({ index: t.index, slide: i, player: t.instance.getSlidePlayerInstance(t.index) });
2406
2477
  }), l.title == "" && l.description == "" ? k && k.parentNode.parentNode.removeChild(k.parentNode) : (m && l.title !== "" ? (m.id = E, m.innerHTML = l.title) : m.parentNode.removeChild(m), x && l.description !== "" ? (x.id = I, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), x.innerHTML = l.smallDescription, this.descriptionEvents(x, l)) : x.innerHTML = l.description) : x.parentNode.removeChild(x), T(y.parentNode, "desc-".concat(u)), T(k.parentNode, "description-".concat(u))), T(y, "gslide-".concat(b)), T(i, "loaded"), b !== "video") {
2407
- if (b !== "external") return b === "inline" ? (Ca.apply(this.instance, [i, l, this.index, M]), void (l.draggable && new Pt({ dragEl: i.querySelector(".gslide-inline"), toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: this.instance }))) : void (b !== "image" ? P(M) && M() : xa(i, l, this.index, function() {
2478
+ if (b !== "external") return b === "inline" ? (Ca.apply(this.instance, [i, l, this.index, M]), void (l.draggable && new jt({ dragEl: i.querySelector(".gslide-inline"), toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: this.instance }))) : void (b !== "image" ? z(M) && M() : xa(i, l, this.index, function() {
2408
2479
  var U = i.querySelector("img");
2409
- l.draggable && new Pt({ dragEl: U, toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: t.instance }), l.zoomable && U.naturalWidth > U.offsetWidth && (T(U, "zoomable"), new wa(U, i, function() {
2480
+ l.draggable && new jt({ dragEl: U, toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: t.instance }), l.zoomable && U.naturalWidth > U.offsetWidth && (T(U, "zoomable"), new wa(U, i, function() {
2410
2481
  t.instance.resize();
2411
- })), P(M) && M();
2482
+ })), z(M) && M();
2412
2483
  }));
2413
2484
  Sa.apply(this, [i, l, this.index, M]);
2414
2485
  } else ka.apply(this.instance, [i, l, this.index, M]);
@@ -2422,12 +2493,12 @@ var sa = { exports: {} };
2422
2493
  } }, { key: "descriptionEvents", value: function(t, i) {
2423
2494
  var o = this, d = t.querySelector(".desc-more");
2424
2495
  if (!d) return !1;
2425
- F("click", { onElement: d, withCallback: function(l, h) {
2496
+ D("click", { onElement: d, withCallback: function(l, h) {
2426
2497
  l.preventDefault();
2427
2498
  var b = document.body, u = $(h, ".gslide-desc");
2428
2499
  if (!u) return !1;
2429
2500
  u.innerHTML = i.description, T(b, "gdesc-open");
2430
- var y = F("click", { onElement: [b, $(u, ".gslide-description")], withCallback: function(m, x) {
2501
+ var y = D("click", { onElement: [b, $(u, ".gslide-description")], withCallback: function(m, x) {
2431
2502
  m.target.nodeName.toLowerCase() !== "a" && (N(b, "gdesc-open"), T(b, "gdesc-closed"), u.innerHTML = i.smallDescription, o.descriptionEvents(u, i), setTimeout(function() {
2432
2503
  N(b, "gdesc-closed");
2433
2504
  }, 400), y.destroy());
@@ -2469,15 +2540,15 @@ var sa = { exports: {} };
2469
2540
  typeof o == "function" && o.apply(this.el, arguments);
2470
2541
  }
2471
2542
  } }]);
2472
- function ae(t, i) {
2543
+ function ce(t, i) {
2473
2544
  var o = new Ma(t);
2474
2545
  return o.add(i), o;
2475
2546
  }
2476
- var Ta = f(function t(i, o) {
2547
+ var Aa = f(function t(i, o) {
2477
2548
  s(this, t), this.element = typeof i == "string" ? document.querySelector(i) : i, this.start = this.start.bind(this), this.move = this.move.bind(this), this.end = this.end.bind(this), this.cancel = this.cancel.bind(this), this.element.addEventListener("touchstart", this.start, !1), this.element.addEventListener("touchmove", this.move, !1), this.element.addEventListener("touchend", this.end, !1), this.element.addEventListener("touchcancel", this.cancel, !1), this.preV = { x: null, y: null }, this.pinchStartLen = null, this.zoom = 1, this.isDoubleTap = !1;
2478
2549
  var d = function() {
2479
2550
  };
2480
- this.rotate = ae(this.element, o.rotate || d), this.touchStart = ae(this.element, o.touchStart || d), this.multipointStart = ae(this.element, o.multipointStart || d), this.multipointEnd = ae(this.element, o.multipointEnd || d), this.pinch = ae(this.element, o.pinch || d), this.swipe = ae(this.element, o.swipe || d), this.tap = ae(this.element, o.tap || d), this.doubleTap = ae(this.element, o.doubleTap || d), this.longTap = ae(this.element, o.longTap || d), this.singleTap = ae(this.element, o.singleTap || d), this.pressMove = ae(this.element, o.pressMove || d), this.twoFingerPressMove = ae(this.element, o.twoFingerPressMove || d), this.touchMove = ae(this.element, o.touchMove || d), this.touchEnd = ae(this.element, o.touchEnd || d), this.touchCancel = ae(this.element, o.touchCancel || d), this.translateContainer = this.element, this._cancelAllHandler = this.cancelAll.bind(this), window.addEventListener("scroll", this._cancelAllHandler), this.delta = null, this.last = null, this.now = null, this.tapTimeout = null, this.singleTapTimeout = null, this.longTapTimeout = null, this.swipeTimeout = null, this.x1 = this.x2 = this.y1 = this.y2 = null, this.preTapPosition = { x: null, y: null };
2551
+ this.rotate = ce(this.element, o.rotate || d), this.touchStart = ce(this.element, o.touchStart || d), this.multipointStart = ce(this.element, o.multipointStart || d), this.multipointEnd = ce(this.element, o.multipointEnd || d), this.pinch = ce(this.element, o.pinch || d), this.swipe = ce(this.element, o.swipe || d), this.tap = ce(this.element, o.tap || d), this.doubleTap = ce(this.element, o.doubleTap || d), this.longTap = ce(this.element, o.longTap || d), this.singleTap = ce(this.element, o.singleTap || d), this.pressMove = ce(this.element, o.pressMove || d), this.twoFingerPressMove = ce(this.element, o.twoFingerPressMove || d), this.touchMove = ce(this.element, o.touchMove || d), this.touchEnd = ce(this.element, o.touchEnd || d), this.touchCancel = ce(this.element, o.touchCancel || d), this.translateContainer = this.element, this._cancelAllHandler = this.cancelAll.bind(this), window.addEventListener("scroll", this._cancelAllHandler), this.delta = null, this.last = null, this.now = null, this.tapTimeout = null, this.singleTapTimeout = null, this.longTapTimeout = null, this.swipeTimeout = null, this.x1 = this.x2 = this.y1 = this.y2 = null, this.preTapPosition = { x: null, y: null };
2481
2552
  }, [{ key: "start", value: function(t) {
2482
2553
  if (t.touches) if (t.target && t.target.nodeName && ["a", "button", "input"].indexOf(t.target.nodeName.toLowerCase()) >= 0) console.log("ignore drag for this touched element", t.target.nodeName.toLowerCase());
2483
2554
  else {
@@ -2542,33 +2613,33 @@ var sa = { exports: {} };
2542
2613
  var b, u = document.createElement("fakeelement"), y = { transition: "transitionend", OTransition: "oTransitionEnd", MozTransition: "transitionend", WebkitTransition: "webkitTransitionEnd" };
2543
2614
  for (b in y) if (u.style[b] !== void 0) return y[b];
2544
2615
  }(), o = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, d = Q(t, "gslide-media") ? t : t.querySelector(".gslide-media"), l = $(d, ".ginner-container"), h = t.querySelector(".gslide-description");
2545
- o > 769 && (d = l), T(d, "greset"), C(d, "translate3d(0, 0, 0)"), F(i, { onElement: d, once: !0, withCallback: function(b, u) {
2616
+ o > 769 && (d = l), T(d, "greset"), C(d, "translate3d(0, 0, 0)"), D(i, { onElement: d, once: !0, withCallback: function(b, u) {
2546
2617
  N(d, "greset");
2547
2618
  } }), d.style.opacity = "", h && (h.style.opacity = "");
2548
2619
  }
2549
- function Ea(t) {
2620
+ function Ta(t) {
2550
2621
  if (t.events.hasOwnProperty("touch")) return !1;
2551
- var i, o, d, l = se(), h = l.width, b = l.height, u = !1, y = null, m = null, x = null, k = !1, M = 1, E = 1, I = !1, U = !1, fe = null, de = null, G = null, _e = null, ue = 0, Re = 0, Ve = !1, De = !1, pe = {}, Oe = {}, Rt = 0, Vt = 0, La = document.getElementById("glightbox-slider"), ct = document.querySelector(".goverlay"), qa = new Ta(La, { touchStart: function(B) {
2622
+ var i, o, d, l = se(), h = l.width, b = l.height, u = !1, y = null, m = null, x = null, k = !1, M = 1, E = 1, I = !1, U = !1, fe = null, de = null, G = null, $e = null, ue = 0, Ve = 0, Fe = !1, De = !1, pe = {}, Oe = {}, Ft = 0, Dt = 0, La = document.getElementById("glightbox-slider"), ct = document.querySelector(".goverlay"), qa = new Aa(La, { touchStart: function(B) {
2552
2623
  if (u = !0, (Q(B.targetTouches[0].target, "ginner-container") || $(B.targetTouches[0].target, ".gslide-desc") || B.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), $(B.targetTouches[0].target, ".gslide-inline") && !Q(B.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
2553
- if (Oe = B.targetTouches[0], pe.pageX = B.targetTouches[0].pageX, pe.pageY = B.targetTouches[0].pageY, Rt = B.targetTouches[0].clientX, Vt = B.targetTouches[0].clientY, y = t.activeSlide, m = y.querySelector(".gslide-media"), d = y.querySelector(".gslide-inline"), x = null, Q(m, "gslide-image") && (x = m.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (m = y.querySelector(".ginner-container")), N(ct, "greset"), B.pageX > 20 && B.pageX < window.innerWidth - 20) return;
2624
+ if (Oe = B.targetTouches[0], pe.pageX = B.targetTouches[0].pageX, pe.pageY = B.targetTouches[0].pageY, Ft = B.targetTouches[0].clientX, Dt = B.targetTouches[0].clientY, y = t.activeSlide, m = y.querySelector(".gslide-media"), d = y.querySelector(".gslide-inline"), x = null, Q(m, "gslide-image") && (x = m.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (m = y.querySelector(".ginner-container")), N(ct, "greset"), B.pageX > 20 && B.pageX < window.innerWidth - 20) return;
2554
2625
  B.preventDefault();
2555
2626
  }
2556
2627
  }, touchMove: function(B) {
2557
2628
  if (u && (Oe = B.targetTouches[0], !I && !U)) {
2558
2629
  if (d && d.offsetHeight > b) {
2559
- var ce = pe.pageX - Oe.pageX;
2560
- if (Math.abs(ce) <= 13) return !1;
2630
+ var ie = pe.pageX - Oe.pageX;
2631
+ if (Math.abs(ie) <= 13) return !1;
2561
2632
  }
2562
2633
  k = !0;
2563
- var $e, it = B.targetTouches[0].clientX, Oa = B.targetTouches[0].clientY, Pa = Rt - it, za = Vt - Oa;
2564
- if (Math.abs(Pa) > Math.abs(za) ? (Ve = !1, De = !0) : (De = !1, Ve = !0), i = Oe.pageX - pe.pageX, ue = 100 * i / h, o = Oe.pageY - pe.pageY, Re = 100 * o / b, Ve && x && ($e = 1 - Math.abs(o) / b, ct.style.opacity = $e, t.settings.touchFollowAxis && (ue = 0)), De && ($e = 1 - Math.abs(i) / h, m.style.opacity = $e, t.settings.touchFollowAxis && (Re = 0)), !x) return C(m, "translate3d(".concat(ue, "%, 0, 0)"));
2565
- C(m, "translate3d(".concat(ue, "%, ").concat(Re, "%, 0)"));
2634
+ var Me, it = B.targetTouches[0].clientX, Oa = B.targetTouches[0].clientY, Pa = Ft - it, za = Dt - Oa;
2635
+ if (Math.abs(Pa) > Math.abs(za) ? (Fe = !1, De = !0) : (De = !1, Fe = !0), i = Oe.pageX - pe.pageX, ue = 100 * i / h, o = Oe.pageY - pe.pageY, Ve = 100 * o / b, Fe && x && (Me = 1 - Math.abs(o) / b, ct.style.opacity = Me, t.settings.touchFollowAxis && (ue = 0)), De && (Me = 1 - Math.abs(i) / h, m.style.opacity = Me, t.settings.touchFollowAxis && (Ve = 0)), !x) return C(m, "translate3d(".concat(ue, "%, 0, 0)"));
2636
+ C(m, "translate3d(".concat(ue, "%, ").concat(Ve, "%, 0)"));
2566
2637
  }
2567
2638
  }, touchEnd: function() {
2568
2639
  if (u) {
2569
- if (k = !1, U || I) return G = fe, void (_e = de);
2570
- var B = Math.abs(parseInt(Re)), ce = Math.abs(parseInt(ue));
2571
- if (!(B > 29 && x)) return B < 29 && ce < 25 ? (T(ct, "greset"), ct.style.opacity = 1, yt(m)) : void 0;
2640
+ if (k = !1, U || I) return G = fe, void ($e = de);
2641
+ var B = Math.abs(parseInt(Ve)), ie = Math.abs(parseInt(ue));
2642
+ if (!(B > 29 && x)) return B < 29 && ie < 25 ? (T(ct, "greset"), ct.style.opacity = 1, yt(m)) : void 0;
2572
2643
  t.close();
2573
2644
  }
2574
2645
  }, multipointEnd: function() {
@@ -2580,14 +2651,14 @@ var sa = { exports: {} };
2580
2651
  }, pinch: function(B) {
2581
2652
  if (!x || k) return !1;
2582
2653
  I = !0, x.scaleX = x.scaleY = M * B.zoom;
2583
- var ce = M * B.zoom;
2584
- if (U = !0, ce <= 1) return U = !1, ce = 1, _e = null, G = null, fe = null, de = null, void x.setAttribute("style", "");
2585
- ce > 4.5 && (ce = 4.5), x.style.transform = "scale3d(".concat(ce, ", ").concat(ce, ", 1)"), E = ce;
2654
+ var ie = M * B.zoom;
2655
+ if (U = !0, ie <= 1) return U = !1, ie = 1, $e = null, G = null, fe = null, de = null, void x.setAttribute("style", "");
2656
+ ie > 4.5 && (ie = 4.5), x.style.transform = "scale3d(".concat(ie, ", ").concat(ie, ", 1)"), E = ie;
2586
2657
  }, pressMove: function(B) {
2587
2658
  if (U && !I) {
2588
- var ce = Oe.pageX - pe.pageX, $e = Oe.pageY - pe.pageY;
2589
- G && (ce += G), _e && ($e += _e), fe = ce, de = $e;
2590
- var it = "translate3d(".concat(ce, "px, ").concat($e, "px, 0)");
2659
+ var ie = Oe.pageX - pe.pageX, Me = Oe.pageY - pe.pageY;
2660
+ G && (ie += G), $e && (Me += $e), fe = ie, de = Me;
2661
+ var it = "translate3d(".concat(ie, "px, ").concat(Me, "px, 0)");
2591
2662
  E && (it += " scale3d(".concat(E, ", ").concat(E, ", 1)")), C(x, it);
2592
2663
  }
2593
2664
  }, swipe: function(B) {
@@ -2605,7 +2676,7 @@ var sa = { exports: {} };
2605
2676
  } });
2606
2677
  t.events.touch = qa;
2607
2678
  }
2608
- var jt = ve(), Ht = ve() !== null || document.createTouch !== void 0 || "ontouchstart" in window || "onmsgesturechange" in window || navigator.msMaxTouchPoints, Bt = document.getElementsByTagName("html")[0], Aa = { selector: ".glightbox", elements: null, skin: "clean", theme: "clean", closeButton: !0, startAt: null, autoplayVideos: !0, autofocusVideos: !0, descPosition: "bottom", width: "900px", height: "506px", videosWidth: "960px", beforeSlideChange: null, afterSlideChange: null, beforeSlideLoad: null, afterSlideLoad: null, slideInserted: null, slideRemoved: null, slideExtraAttributes: null, onOpen: null, onClose: null, loop: !1, zoomable: !0, draggable: !0, dragAutoSnap: !1, dragToleranceX: 40, dragToleranceY: 65, preload: !0, oneSlidePerOpen: !1, touchNavigation: !0, touchFollowAxis: !0, keyboardNavigation: !0, closeOnOutsideClick: !0, plugins: !1, plyr: { css: "https://cdn.plyr.io/3.6.12/plyr.css", js: "https://cdn.plyr.io/3.6.12/plyr.js", config: { ratio: "16:9", fullscreen: { enabled: !0, iosNative: !0 }, youtube: { noCookie: !0, rel: 0, showinfo: 0, iv_load_policy: 3 }, vimeo: { byline: !1, portrait: !1, title: !1, transparent: !1 } } }, openEffect: "zoom", closeEffect: "zoom", slideEffect: "slide", moreText: "See more", moreLength: 60, cssEfects: { fade: { in: "fadeIn", out: "fadeOut" }, zoom: { in: "zoomIn", out: "zoomOut" }, slide: { in: "slideInRight", out: "slideOutLeft" }, slideBack: { in: "slideInLeft", out: "slideOutRight" }, none: { in: "none", out: "none" } }, svg: { close: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z"/></g></g><g><g><path d="M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z"/></g></g></svg>', next: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"> <g><path d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/></g></svg>', prev: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>' }, slideHTML: `<div class="gslide">
2679
+ var Bt = ve(), Rt = ve() !== null || document.createTouch !== void 0 || "ontouchstart" in window || "onmsgesturechange" in window || navigator.msMaxTouchPoints, Vt = document.getElementsByTagName("html")[0], Ea = { selector: ".glightbox", elements: null, skin: "clean", theme: "clean", closeButton: !0, startAt: null, autoplayVideos: !0, autofocusVideos: !0, descPosition: "bottom", width: "900px", height: "506px", videosWidth: "960px", beforeSlideChange: null, afterSlideChange: null, beforeSlideLoad: null, afterSlideLoad: null, slideInserted: null, slideRemoved: null, slideExtraAttributes: null, onOpen: null, onClose: null, loop: !1, zoomable: !0, draggable: !0, dragAutoSnap: !1, dragToleranceX: 40, dragToleranceY: 65, preload: !0, oneSlidePerOpen: !1, touchNavigation: !0, touchFollowAxis: !0, keyboardNavigation: !0, closeOnOutsideClick: !0, plugins: !1, plyr: { css: "https://cdn.plyr.io/3.6.12/plyr.css", js: "https://cdn.plyr.io/3.6.12/plyr.js", config: { ratio: "16:9", fullscreen: { enabled: !0, iosNative: !0 }, youtube: { noCookie: !0, rel: 0, showinfo: 0, iv_load_policy: 3 }, vimeo: { byline: !1, portrait: !1, title: !1, transparent: !1 } } }, openEffect: "zoom", closeEffect: "zoom", slideEffect: "slide", moreText: "See more", moreLength: 60, cssEfects: { fade: { in: "fadeIn", out: "fadeOut" }, zoom: { in: "zoomIn", out: "zoomOut" }, slide: { in: "slideInRight", out: "slideOutLeft" }, slideBack: { in: "slideInLeft", out: "slideOutRight" }, none: { in: "none", out: "none" } }, svg: { close: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z"/></g></g><g><g><path d="M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z"/></g></g></svg>', next: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"> <g><path d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/></g></svg>', prev: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>' }, slideHTML: `<div class="gslide">
2609
2680
  <div class="gslide-inner-content">
2610
2681
  <div class="ginner-container">
2611
2682
  <div class="gslide-media">
@@ -2629,10 +2700,10 @@ var sa = { exports: {} };
2629
2700
  </div>
2630
2701
  </div>` }, Ia = f(function t() {
2631
2702
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2632
- s(this, t), this.customOptions = i, this.settings = S(Aa, i), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2703
+ s(this, t), this.customOptions = i, this.settings = S(Ea, i), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2633
2704
  }, [{ key: "init", value: function() {
2634
2705
  var t = this, i = this.getSelector();
2635
- i && (this.baseEvents = F("click", { onElement: i, withCallback: function(o, d) {
2706
+ i && (this.baseEvents = D("click", { onElement: i, withCallback: function(o, d) {
2636
2707
  o.preventDefault(), t.open(d);
2637
2708
  } })), this.elements = this.getElements();
2638
2709
  } }, { key: "open", value: function() {
@@ -2650,7 +2721,7 @@ var sa = { exports: {} };
2650
2721
  var b = document.createElement("style");
2651
2722
  b.type = "text/css", b.className = "gcss-styles", b.innerText = ".gscrollbar-fixer {margin-right: ".concat(h, "px}"), document.head.appendChild(b), T(l, "gscrollbar-fixer");
2652
2723
  }
2653
- T(l, "glightbox-open"), T(Bt, "glightbox-open"), jt && (T(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(o, !0), this.elements.length === 1 ? (T(this.prevButton, "glightbox-button-hidden"), T(this.nextButton, "glightbox-button-hidden")) : (N(this.prevButton, "glightbox-button-hidden"), N(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), P(this.settings.onOpen) && this.settings.onOpen(), Ht && this.settings.touchNavigation && Ea(this), this.settings.keyboardNavigation && va(this);
2724
+ T(l, "glightbox-open"), T(Vt, "glightbox-open"), Bt && (T(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(o, !0), this.elements.length === 1 ? (T(this.prevButton, "glightbox-button-hidden"), T(this.nextButton, "glightbox-button-hidden")) : (N(this.prevButton, "glightbox-button-hidden"), N(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), z(this.settings.onOpen) && this.settings.onOpen(), Rt && this.settings.touchNavigation && Ta(this), this.settings.keyboardNavigation && va(this);
2654
2725
  } }, { key: "openAt", value: function() {
2655
2726
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
2656
2727
  this.open(null, t);
@@ -2704,21 +2775,21 @@ var sa = { exports: {} };
2704
2775
  }
2705
2776
  (this.settings.preload && this.index == 0 && i == 0 || this.index - 1 == i || this.index + 1 == i) && this.preloadSlide(i), this.index === 0 && i === 0 && (this.index = 1), this.updateNavigationClasses(), u = this.slidesContainer.querySelectorAll(".gslide")[i], y = this.getSlidePlayerInstance(i), l.slideNode = u;
2706
2777
  }
2707
- this.trigger("slide_inserted", { index: i, slide: u, slideNode: u, slideConfig: d, slideIndex: i, trigger: null, player: y }), P(this.settings.slideInserted) && this.settings.slideInserted({ index: i, slide: u, player: y });
2778
+ this.trigger("slide_inserted", { index: i, slide: u, slideNode: u, slideConfig: d, slideIndex: i, trigger: null, player: y }), z(this.settings.slideInserted) && this.settings.slideInserted({ index: i, slide: u, player: y });
2708
2779
  } }, { key: "removeSlide", value: function() {
2709
2780
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1;
2710
2781
  if (t < 0 || t > this.elements.length - 1) return !1;
2711
2782
  var i = this.slidesContainer && this.slidesContainer.querySelectorAll(".gslide")[t];
2712
- i && (this.getActiveSlideIndex() == t && (t == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), i.parentNode.removeChild(i)), this.elements.splice(t, 1), this.trigger("slide_removed", t), P(this.settings.slideRemoved) && this.settings.slideRemoved(t);
2783
+ i && (this.getActiveSlideIndex() == t && (t == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), i.parentNode.removeChild(i)), this.elements.splice(t, 1), this.trigger("slide_removed", t), z(this.settings.slideRemoved) && this.settings.slideRemoved(t);
2713
2784
  } }, { key: "slideAnimateIn", value: function(t, i) {
2714
2785
  var o = this, d = t.querySelector(".gslide-media"), l = t.querySelector(".gslide-description"), h = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, b = { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideConfig: this.elements[this.index].slideConfig, slideIndex: this.index, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) };
2715
2786
  if (d.offsetWidth > 0 && l && (Le(l), l.style.display = ""), N(t, this.effectsClasses), i) V(t, this.settings.cssEfects[this.settings.openEffect].in, function() {
2716
- o.settings.autoplayVideos && o.slidePlayerPlay(t), o.trigger("slide_changed", { prev: h, current: b }), P(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, b]);
2787
+ o.settings.autoplayVideos && o.slidePlayerPlay(t), o.trigger("slide_changed", { prev: h, current: b }), z(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, b]);
2717
2788
  });
2718
2789
  else {
2719
2790
  var u = this.settings.slideEffect, y = u !== "none" ? this.settings.cssEfects[u].in : u;
2720
2791
  this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (y = this.settings.cssEfects.slideBack.in), V(t, y, function() {
2721
- o.settings.autoplayVideos && o.slidePlayerPlay(t), o.trigger("slide_changed", { prev: h, current: b }), P(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, b]);
2792
+ o.settings.autoplayVideos && o.slidePlayerPlay(t), o.trigger("slide_changed", { prev: h, current: b }), z(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, b]);
2722
2793
  });
2723
2794
  }
2724
2795
  setTimeout(function() {
@@ -2729,7 +2800,7 @@ var sa = { exports: {} };
2729
2800
  var t = this.prevActiveSlide;
2730
2801
  N(t, this.effectsClasses), T(t, "prev");
2731
2802
  var i = this.settings.slideEffect, o = i !== "none" ? this.settings.cssEfects[i].out : i;
2732
- this.slidePlayerPause(t), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), P(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (o = this.settings.cssEfects.slideBack.out), V(t, o, function() {
2803
+ this.slidePlayerPause(t), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: re(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), z(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (o = this.settings.cssEfects.slideBack.out), V(t, o, function() {
2733
2804
  var d = t.querySelector(".ginner-container"), l = t.querySelector(".gslide-media"), h = t.querySelector(".gslide-description");
2734
2805
  d.style.transform = "", l.style.transform = "", N(l, "greset"), l.style.opacity = "", h && (h.style.opacity = ""), N(t, "prev");
2735
2806
  });
@@ -2763,7 +2834,7 @@ var sa = { exports: {} };
2763
2834
  o && !o.playing && o.play();
2764
2835
  } }, { key: "slidePlayerPlay", value: function(t) {
2765
2836
  var i;
2766
- if (!jt || (i = this.settings.plyr.config) !== null && i !== void 0 && i.muted) {
2837
+ if (!Bt || (i = this.settings.plyr.config) !== null && i !== void 0 && i.muted) {
2767
2838
  if (R(t)) {
2768
2839
  var o = t.querySelector(".gvideo-wrapper");
2769
2840
  o && (t = o.getAttribute("data-index"));
@@ -2827,17 +2898,17 @@ var sa = { exports: {} };
2827
2898
  var u = document.getElementById("glightbox-body");
2828
2899
  this.modal = u;
2829
2900
  var y = u.querySelector(".gclose");
2830
- this.prevButton = u.querySelector(".gprev"), this.nextButton = u.querySelector(".gnext"), this.overlay = u.querySelector(".goverlay"), this.loader = u.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = o, this.events = {}, T(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && y && (this.events.close = F("click", { onElement: y, withCallback: function(m, x) {
2901
+ this.prevButton = u.querySelector(".gprev"), this.nextButton = u.querySelector(".gnext"), this.overlay = u.querySelector(".goverlay"), this.loader = u.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = o, this.events = {}, T(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && y && (this.events.close = D("click", { onElement: y, withCallback: function(m, x) {
2831
2902
  m.preventDefault(), t.close();
2832
- } })), y && !this.settings.closeButton && y.parentNode.removeChild(y), this.nextButton && (this.events.next = F("click", { onElement: this.nextButton, withCallback: function(m, x) {
2903
+ } })), y && !this.settings.closeButton && y.parentNode.removeChild(y), this.nextButton && (this.events.next = D("click", { onElement: this.nextButton, withCallback: function(m, x) {
2833
2904
  m.preventDefault(), t.nextSlide();
2834
- } })), this.prevButton && (this.events.prev = F("click", { onElement: this.prevButton, withCallback: function(m, x) {
2905
+ } })), this.prevButton && (this.events.prev = D("click", { onElement: this.prevButton, withCallback: function(m, x) {
2835
2906
  m.preventDefault(), t.prevSlide();
2836
- } })), this.settings.closeOnOutsideClick && (this.events.outClose = F("click", { onElement: u, withCallback: function(m, x) {
2907
+ } })), this.settings.closeOnOutsideClick && (this.events.outClose = D("click", { onElement: u, withCallback: function(m, x) {
2837
2908
  t.preventOutsideClick || Q(document.body, "glightbox-mobile") || $(m.target, ".ginner-container") || $(m.target, ".gbtn") || Q(m.target, "gnext") || Q(m.target, "gprev") || t.close();
2838
2909
  } })), _(this.elements, function(m, x) {
2839
2910
  t.slidesContainer.appendChild(m.instance.create()), m.slideNode = t.slidesContainer.querySelectorAll(".gslide")[x];
2840
- }), Ht && T(document.body, "glightbox-touch"), this.events.resize = F("resize", { onElement: window, withCallback: function() {
2911
+ }), Rt && T(document.body, "glightbox-touch"), this.events.resize = D("resize", { onElement: window, withCallback: function() {
2841
2912
  t.resize();
2842
2913
  } }), this.built = !0;
2843
2914
  } }, { key: "resize", value: function() {
@@ -2859,9 +2930,9 @@ var sa = { exports: {} };
2859
2930
  var I = o.clientWidth, U = o.clientHeight, fe = I / U;
2860
2931
  E = "".concat(I / fe, ":").concat(U / fe);
2861
2932
  }
2862
- var de = E.split(":"), G = this.settings.videosWidth, _e = this.settings.videosWidth, ue = (_e = et(G) || G.indexOf("px") !== -1 ? parseInt(G) : G.indexOf("vw") !== -1 ? h * parseInt(G) / 100 : G.indexOf("vh") !== -1 ? b * parseInt(G) / 100 : G.indexOf("%") !== -1 ? h * parseInt(G) / 100 : parseInt(o.clientWidth)) / (parseInt(de[0]) / parseInt(de[1]));
2863
- if (ue = Math.floor(ue), u && (b -= l.offsetHeight), _e > h || ue > b || b < ue && h > _e) {
2864
- var Re = o.offsetWidth, Ve = o.offsetHeight, De = b / Ve, pe = { width: Re * De, height: Ve * De };
2933
+ var de = E.split(":"), G = this.settings.videosWidth, $e = this.settings.videosWidth, ue = ($e = et(G) || G.indexOf("px") !== -1 ? parseInt(G) : G.indexOf("vw") !== -1 ? h * parseInt(G) / 100 : G.indexOf("vh") !== -1 ? b * parseInt(G) / 100 : G.indexOf("%") !== -1 ? h * parseInt(G) / 100 : parseInt(o.clientWidth)) / (parseInt(de[0]) / parseInt(de[1]));
2934
+ if (ue = Math.floor(ue), u && (b -= l.offsetHeight), $e > h || ue > b || b < ue && h > $e) {
2935
+ var Ve = o.offsetWidth, Fe = o.offsetHeight, De = b / Fe, pe = { width: Ve * De, height: Fe * De };
2865
2936
  o.parentNode.setAttribute("style", "max-width: ".concat(pe.width, "px")), u && l.setAttribute("style", "max-width: ".concat(pe.width, "px;"));
2866
2937
  } else o.parentNode.style.maxWidth = "".concat(G), u && l.setAttribute("style", "max-width: ".concat(G, ";"));
2867
2938
  }
@@ -2893,7 +2964,7 @@ var sa = { exports: {} };
2893
2964
  t.events = null;
2894
2965
  }
2895
2966
  var d = document.body;
2896
- N(Bt, "glightbox-open"), N(d, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), t.modal.parentNode.removeChild(t.modal), t.trigger("close"), P(t.settings.onClose) && t.settings.onClose();
2967
+ N(Vt, "glightbox-open"), N(d, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), t.modal.parentNode.removeChild(t.modal), t.trigger("close"), z(t.settings.onClose) && t.settings.onClose();
2897
2968
  var l = document.querySelector(".gcss-styles");
2898
2969
  l && l.parentNode.removeChild(l), t.lightboxOpen = !1, t.closing = null;
2899
2970
  });
@@ -2901,7 +2972,7 @@ var sa = { exports: {} };
2901
2972
  this.close(), this.clearAllEvents(), this.baseEvents && this.baseEvents.destroy();
2902
2973
  } }, { key: "on", value: function(t, i) {
2903
2974
  var o = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
2904
- if (!t || !P(i)) throw new TypeError("Event name and callback must be defined");
2975
+ if (!t || !z(i)) throw new TypeError("Event name and callback must be defined");
2905
2976
  this.apiEvents.push({ evt: t, once: o, callback: i });
2906
2977
  } }, { key: "once", value: function(t, i) {
2907
2978
  this.on(t, i, !0);
@@ -2931,12 +3002,12 @@ var Cc = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, _c = (c, e
2931
3002
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
2932
3003
  return n && s && Cc(e, a, s), s;
2933
3004
  };
2934
- let St = class extends ut {
3005
+ let _t = class extends ut {
2935
3006
  render() {
2936
3007
  return g` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
2937
3008
  }
2938
3009
  };
2939
- St.styles = X`
3010
+ _t.styles = X`
2940
3011
  .cb-thinking {
2941
3012
  text-align: center;
2942
3013
  }
@@ -2974,15 +3045,15 @@ St.styles = X`
2974
3045
  }
2975
3046
  }
2976
3047
  `;
2977
- St = _c([
3048
+ _t = _c([
2978
3049
  J("cb-thinking")
2979
- ], St);
3050
+ ], _t);
2980
3051
  var $c = Object.defineProperty, Mc = Object.getOwnPropertyDescriptor, oa = (c, e, a, n) => {
2981
3052
  for (var s = n > 1 ? void 0 : n ? Mc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
2982
3053
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
2983
3054
  return n && s && $c(e, a, s), s;
2984
3055
  };
2985
- let rt = class extends te {
3056
+ let rt = class extends ae {
2986
3057
  constructor() {
2987
3058
  super(...arguments), this.files = [];
2988
3059
  }
@@ -3022,7 +3093,7 @@ oa([
3022
3093
  rt = oa([
3023
3094
  J("cb-uploading")
3024
3095
  ], rt);
3025
- const Tc = X`
3096
+ const Ac = X`
3026
3097
  ${me}
3027
3098
  :host {
3028
3099
  }
@@ -3043,10 +3114,10 @@ const Tc = X`
3043
3114
  margin-right: 0.2em;
3044
3115
  }
3045
3116
  `;
3046
- var Ec = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor, Et = (c, e, a, n) => {
3047
- for (var s = n > 1 ? void 0 : n ? Ac(e, a) : e, r = c.length - 1, f; r >= 0; r--)
3117
+ var Tc = Object.defineProperty, Ec = Object.getOwnPropertyDescriptor, It = (c, e, a, n) => {
3118
+ for (var s = n > 1 ? void 0 : n ? Ec(e, a) : e, r = c.length - 1, f; r >= 0; r--)
3048
3119
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
3049
- return n && s && Ec(e, a, s), s;
3120
+ return n && s && Tc(e, a, s), s;
3050
3121
  };
3051
3122
  let Ze = class extends ut {
3052
3123
  constructor() {
@@ -3093,22 +3164,22 @@ Ze.styles = X`
3093
3164
  text-decoration: underline;
3094
3165
  }
3095
3166
  `;
3096
- Et([
3167
+ It([
3097
3168
  v({ type: String })
3098
3169
  ], Ze.prototype, "url", 2);
3099
- Et([
3170
+ It([
3100
3171
  v({ type: Boolean })
3101
3172
  ], Ze.prototype, "inverse", 2);
3102
- Ze = Et([
3173
+ Ze = It([
3103
3174
  J("cb-external-link")
3104
3175
  ], Ze);
3105
3176
  const Ic = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983l-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z"/></svg>', Lc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"/></svg>', qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H9v-1h3a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM.706 13.189v2.66H0V11.85h.806l1.14 2.596h.026l1.14-2.596h.8v3.999h-.716v-2.66h-.038l-.946 2.159h-.516l-.952-2.16H.706Zm3.919 2.66V11.85h1.459q.609 0 1.005.234t.589.68q.195.445.196 1.075q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562q.279 0 .484-.082a.8.8 0 0 0 .334-.252a1.1 1.1 0 0 0 .196-.422q.067-.252.067-.592a2.1 2.1 0 0 0-.117-.753a.9.9 0 0 0-.354-.454q-.238-.152-.61-.152"/></svg>', Oc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.517 14.841a1.13 1.13 0 0 0 .401.823q.195.162.478.252q.284.091.665.091q.507 0 .859-.158q.354-.158.539-.44q.187-.284.187-.656q0-.336-.134-.56a1 1 0 0 0-.375-.357a2 2 0 0 0-.566-.21l-.621-.144a1 1 0 0 1-.404-.176a.37.37 0 0 1-.144-.299q0-.234.185-.384q.188-.152.512-.152q.214 0 .37.068a.6.6 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.2-.566a1.2 1.2 0 0 0-.5-.41a1.8 1.8 0 0 0-.78-.152q-.439 0-.776.15q-.337.149-.527.421q-.19.273-.19.639q0 .302.122.524q.124.223.352.367q.228.143.539.213l.618.144q.31.073.463.193a.39.39 0 0 1 .152.326a.5.5 0 0 1-.085.29a.56.56 0 0 1-.255.193q-.167.07-.413.07q-.175 0-.32-.04a.8.8 0 0 1-.248-.115a.58.58 0 0 1-.255-.384zM.806 13.693q0-.373.102-.633a.87.87 0 0 1 .302-.399a.8.8 0 0 1 .475-.137q.225 0 .398.097a.7.7 0 0 1 .272.26a.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.489-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.572.632q-.195.41-.196.979v.498q0 .568.193.976q.197.407.572.626q.375.217.914.217q.439 0 .785-.164t.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.8.8 0 0 1-.118.363a.7.7 0 0 1-.272.25a.9.9 0 0 1-.401.087a.85.85 0 0 1-.478-.132a.83.83 0 0 1-.299-.392a1.7 1.7 0 0 1-.102-.627zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879z"/></svg>', Pc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m2.817-1.333h-1.6v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474q.162-.302.161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H4.15V12.48h.66q.327 0 .512.181q.185.183.185.522m2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662z"/></svg>', zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-7.839 9.166v.522q0 .384-.117.641a.86.86 0 0 1-.322.387a.9.9 0 0 1-.469.126a.9.9 0 0 1-.471-.126a.87.87 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522q0-.386.117-.641a.87.87 0 0 1 .32-.387a.87.87 0 0 1 .471-.129q.264 0 .469.13a.86.86 0 0 1 .322.386q.117.255.117.641m.803.519v-.513q0-.565-.205-.972a1.46 1.46 0 0 0-.589-.63q-.381-.22-.917-.22q-.533 0-.92.22a1.44 1.44 0 0 0-.589.627q-.204.406-.205.975v.513q0 .563.205.973q.205.406.59.627q.386.216.92.216q.535 0 .916-.216q.383-.22.59-.627q.204-.41.204-.973M0 11.926v4h1.459q.603 0 .999-.238a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.59-.68q-.395-.234-1.004-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082H.79V12.57Zm7.422.483a1.7 1.7 0 0 0-.103.633v.495q0 .369.103.627a.83.83 0 0 0 .298.393a.85.85 0 0 0 .478.131a.9.9 0 0 0 .401-.088a.7.7 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.27 1.27 0 0 1-.226.674q-.205.29-.55.454a1.8 1.8 0 0 1-.786.164q-.54 0-.914-.216a1.4 1.4 0 0 1-.571-.627q-.194-.408-.194-.976v-.498q0-.568.197-.978q.195-.411.571-.633q.378-.223.911-.223q.328 0 .607.097q.28.093.489.272a1.33 1.33 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.8.8 0 0 0-.398-.097a.8.8 0 0 0-.475.138a.87.87 0 0 0-.301.398"/></svg>', jc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641a.86.86 0 0 0-.322-.387a.86.86 0 0 0-.469-.129a.87.87 0 0 0-.471.13a.87.87 0 0 0-.32.386a1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387a.9.9 0 0 0 .471.126a.9.9 0 0 0 .469-.126a.86.86 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.46 1.46 0 0 1-.589-.627a2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975q.205-.411.59-.627q.386-.22.92-.22q.535 0 .916.22q.383.219.59.63q.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235q.396.233.589.68q.196.445.196 1.074q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398a.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26a.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.49-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.571.633q-.197.41-.197.978v.498q0 .568.194.976q.195.406.571.627q.375.216.914.216q.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.7.7 0 0 1-.273.248a.9.9 0 0 1-.401.088a.85.85 0 0 1-.478-.131a.83.83 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006l1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015l-1.228-1.984h.932l.832 1.439h.035z"/></svg>';
3106
- var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, At = (c, e, a, n) => {
3177
+ var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, Lt = (c, e, a, n) => {
3107
3178
  for (var s = n > 1 ? void 0 : n ? Bc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
3108
3179
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
3109
3180
  return n && s && Hc(e, a, s), s;
3110
3181
  };
3111
- const Nt = {
3182
+ const Ut = {
3112
3183
  pdf: Lc,
3113
3184
  txt: Ic,
3114
3185
  md: qc,
@@ -3117,7 +3188,7 @@ const Nt = {
3117
3188
  doc: zc,
3118
3189
  docx: jc
3119
3190
  };
3120
- let Je = class extends te {
3191
+ let Je = class extends ae {
3121
3192
  constructor() {
3122
3193
  super(...arguments), this.filename = "", this.url = "";
3123
3194
  }
@@ -3142,22 +3213,22 @@ let Je = class extends te {
3142
3213
  return g`
3143
3214
  <cb-icon
3144
3215
  class="cb-file-icon"
3145
- svg="${Nt[this.type] || Nt.txt}"
3216
+ svg="${Ut[this.type] || Ut.txt}"
3146
3217
  ></cb-icon>
3147
3218
  `;
3148
3219
  }
3149
3220
  };
3150
- Je.styles = Tc;
3151
- At([
3221
+ Je.styles = Ac;
3222
+ Lt([
3152
3223
  v({ type: String })
3153
3224
  ], Je.prototype, "filename", 2);
3154
- At([
3225
+ Lt([
3155
3226
  v({ type: String })
3156
3227
  ], Je.prototype, "url", 2);
3157
- Je = At([
3228
+ Je = Lt([
3158
3229
  J("cb-file")
3159
3230
  ], Je);
3160
- const Rc = '<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>', Ut = '<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 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', ra = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5 9v12H1V9zm4 12a2 2 0 0 1-2-2V9c0-.55.22-1.05.59-1.41L14.17 1l1.06 1.06c.27.27.44.64.44 1.05l-.03.32L14.69 8H21a2 2 0 0 1 2 2v2c0 .26-.05.5-.14.73l-3.02 7.05C19.54 20.5 18.83 21 18 21zm0-2h9.03L21 12v-2h-8.79l1.13-5.32L9 9.03z"/></svg>', da = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M19 15V3h4v12zM15 3a2 2 0 0 1 2 2v10c0 .55-.22 1.05-.59 1.41L9.83 23l-1.06-1.06c-.27-.27-.44-.64-.44-1.06l.03-.31l.95-4.57H3a2 2 0 0 1-2-2v-2c0-.26.05-.5.14-.73l3.02-7.05C4.46 3.5 5.17 3 6 3zm0 2H5.97L3 12v2h8.78l-1.13 5.32L15 14.97z"/></svg>', Vc = X`
3231
+ const Rc = '<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>', Wt = '<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 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', ra = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5 9v12H1V9zm4 12a2 2 0 0 1-2-2V9c0-.55.22-1.05.59-1.41L14.17 1l1.06 1.06c.27.27.44.64.44 1.05l-.03.32L14.69 8H21a2 2 0 0 1 2 2v2c0 .26-.05.5-.14.73l-3.02 7.05C19.54 20.5 18.83 21 18 21zm0-2h9.03L21 12v-2h-8.79l1.13-5.32L9 9.03z"/></svg>', da = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M19 15V3h4v12zM15 3a2 2 0 0 1 2 2v10c0 .55-.22 1.05-.59 1.41L9.83 23l-1.06-1.06c-.27-.27-.44-.64-.44-1.06l.03-.31l.95-4.57H3a2 2 0 0 1-2-2v-2c0-.26.05-.5.14-.73l3.02-7.05C4.46 3.5 5.17 3 6 3zm0 2H5.97L3 12v2h8.78l-1.13 5.32L15 14.97z"/></svg>', Vc = X`
3161
3232
  pre code.hljs {
3162
3233
  display: block;
3163
3234
  overflow-x: auto;
@@ -4372,7 +4443,7 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
4372
4443
  white-space: pre-wrap;
4373
4444
  color: var(--n-text-color);
4374
4445
  }
4375
- `, Dc = X`
4446
+ `, Fc = X`
4376
4447
  ${me}
4377
4448
  ${Vc}
4378
4449
 
@@ -4605,10 +4676,10 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
4605
4676
  filter: alpha(opacity=80);
4606
4677
  }
4607
4678
  `;
4608
- function Wt(c, e) {
4679
+ function Yt(c, e) {
4609
4680
  return `<pre class="code-block-wrapper"><div class="code-block-header"><span class="code-block-header__lang">${e}</span><span class="code-block-header__copy">Copy</span></div><code class="hljs code-block-body ${e}">${c}</code></pre>`;
4610
4681
  }
4611
- function Fc() {
4682
+ function Dc() {
4612
4683
  const c = new Ra({
4613
4684
  html: !0,
4614
4685
  breaks: !0,
@@ -4616,23 +4687,23 @@ function Fc() {
4616
4687
  highlight(e, a) {
4617
4688
  if (!!(a && vt.getLanguage(a))) {
4618
4689
  const s = a ?? "";
4619
- return Wt(vt.highlight(e, { language: s }).value, s);
4690
+ return Yt(vt.highlight(e, { language: s }).value, s);
4620
4691
  }
4621
- return Wt(vt.highlightAuto(e).value, "");
4692
+ return Yt(vt.highlightAuto(e).value, "");
4622
4693
  }
4623
4694
  });
4624
4695
  return c.use(Va, { attrs: { target: "_blank", rel: "noopener" } }), c;
4625
4696
  }
4626
- async function Yt(c) {
4627
- const a = Fc().render(c);
4697
+ async function $t(c) {
4698
+ const a = Dc().render(c);
4628
4699
  return g`${W(a)}`;
4629
4700
  }
4630
- var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor, Ne = (c, e, a, n) => {
4701
+ var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor, Be = (c, e, a, n) => {
4631
4702
  for (var s = n > 1 ? void 0 : n ? Uc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
4632
4703
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
4633
4704
  return n && s && Nc(e, a, s), s;
4634
4705
  };
4635
- let Te = class extends te {
4706
+ let ke = class extends ae {
4636
4707
  constructor() {
4637
4708
  super(...arguments), this.store = new pt(this, p), this.type = "assistant", this.suppressFeedback = !1, this.lightbox = kc({
4638
4709
  touchNavigation: !0,
@@ -4715,12 +4786,12 @@ let Te = class extends te {
4715
4786
  });
4716
4787
  }
4717
4788
  render() {
4718
- return ie(
4789
+ return ee(
4719
4790
  this.message.data || this.message.isThinking,
4720
4791
  () => g`
4721
4792
  <div class="cb-message-row" part="bot-message">
4722
4793
  <!-- message -->
4723
- ${ie(
4794
+ ${ee(
4724
4795
  this._isBot,
4725
4796
  () => this.renderBotMessage(this.message),
4726
4797
  () => this.renderUserMessage(this.message)
@@ -4753,17 +4824,17 @@ let Te = class extends te {
4753
4824
  `;
4754
4825
  }
4755
4826
  async _getMessageText(c) {
4756
- return Yt(c.data.text);
4827
+ return $t(c.data.text);
4757
4828
  }
4758
4829
  renderMessageContent(c) {
4759
4830
  var e;
4760
4831
  return c.isThinking ? g`<cb-thinking></cb-thinking>` : c.isUploading ? g`<cb-uploading .files="${c.data.files || []}"></cb-uploading>` : c.type === "text" ? g`<div class="cb-message-text">
4761
- ${ie(
4832
+ ${ee(
4762
4833
  c.data.userName,
4763
4834
  () => g`<div class="assistant-message-user-name">${c.data.userName}</div>`,
4764
4835
  () => null
4765
4836
  )}
4766
- ${Dt(
4837
+ ${kt(
4767
4838
  this._getMessageText(c).then((a) => g`${a}`)
4768
4839
  )}
4769
4840
  </div>` : c.type === "file" ? g`${ze(
@@ -4775,8 +4846,8 @@ let Te = class extends te {
4775
4846
  (a) => a.name,
4776
4847
  (a) => g`<div>${a.name}</div>`
4777
4848
  )}` : g`<div class="cb-message-text">
4778
- ${Dt(
4779
- Yt(((e = c.data.text) == null ? void 0 : e.toString()) || "").then((a) => g`${a}`)
4849
+ ${kt(
4850
+ $t(((e = c.data.text) == null ? void 0 : e.toString()) || "").then((a) => g`${a}`)
4780
4851
  )}
4781
4852
  </div>`;
4782
4853
  }
@@ -4808,7 +4879,7 @@ let Te = class extends te {
4808
4879
  `;
4809
4880
  }
4810
4881
  renderBotMessageFeedback(c) {
4811
- return this.suppressFeedback || !p.setting.feedbackEnabled ? null : g`
4882
+ return this.suppressFeedback || !p.setting.feedbackEnabled || this.index < p.setting.startFeedbackFromMessage * 2 ? null : g`
4812
4883
  <div class="cb-message-feedback-tools">
4813
4884
  <div class="cb-message-feedback-icon cb-feedback-up" @click="${() => this.startFeedback(!0, c)}">${le`${W(ra)}`}</div>
4814
4885
  <div class="cb-message-feedback-icon cb-feedback-down" @click="${() => this.startFeedback(!1, c)}">${le`${W(da)}`}</div>
@@ -4822,10 +4893,10 @@ let Te = class extends te {
4822
4893
  return g`
4823
4894
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
4824
4895
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4825
- <cb-icon slot="icon" svg="${Ut}" color="white"></cb-icon>
4896
+ <cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
4826
4897
  //appState.appearanceUserMessageAvatarPosition
4827
4898
  </sl-avatar>-->
4828
- ${ie(
4899
+ ${ee(
4829
4900
  p.appearanceUserMessageAvatarPosition === "left",
4830
4901
  () => g`
4831
4902
  <div class="avatar user-avatar">${W(p.setting.userIconSvg)}</div>
@@ -4845,10 +4916,10 @@ let Te = class extends te {
4845
4916
  return g`
4846
4917
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
4847
4918
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4848
- <cb-icon slot="icon" svg="${Ut}" color="white"></cb-icon>
4919
+ <cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
4849
4920
  //appState.appearanceUserMessageAvatarPosition
4850
4921
  </sl-avatar>-->
4851
- ${ie(
4922
+ ${ee(
4852
4923
  p.appearanceUserMessageAvatarPosition === "left",
4853
4924
  () => g`
4854
4925
  <div class="avatar user-avatar">${W(p.setting.userIconSvg)}</div>
@@ -4863,25 +4934,28 @@ let Te = class extends te {
4863
4934
  `;
4864
4935
  }
4865
4936
  };
4866
- Te.styles = Dc;
4867
- Ne([
4937
+ ke.styles = Fc;
4938
+ Be([
4868
4939
  v({ type: Object })
4869
- ], Te.prototype, "message", 2);
4870
- Ne([
4940
+ ], ke.prototype, "message", 2);
4941
+ Be([
4942
+ v({ type: Number })
4943
+ ], ke.prototype, "index", 2);
4944
+ Be([
4871
4945
  v({ type: String })
4872
- ], Te.prototype, "type", 2);
4873
- Ne([
4946
+ ], ke.prototype, "type", 2);
4947
+ Be([
4874
4948
  v({ type: Boolean })
4875
- ], Te.prototype, "suppressFeedback", 2);
4876
- Ne([
4949
+ ], ke.prototype, "suppressFeedback", 2);
4950
+ Be([
4877
4951
  Qt(".code-block-header__copy")
4878
- ], Te.prototype, "copyBtns", 2);
4879
- Ne([
4952
+ ], ke.prototype, "copyBtns", 2);
4953
+ Be([
4880
4954
  Qt("img")
4881
- ], Te.prototype, "glightboxImages", 2);
4882
- Te = Ne([
4955
+ ], ke.prototype, "glightboxImages", 2);
4956
+ ke = Be([
4883
4957
  J("cb-message")
4884
- ], Te);
4958
+ ], ke);
4885
4959
  var Wc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, ye = (c, e, a, n) => {
4886
4960
  for (var s = n > 1 ? void 0 : n ? Yc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
4887
4961
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
@@ -4889,7 +4963,7 @@ var Wc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, ye = (c, e
4889
4963
  };
4890
4964
  const we = Ke.noConflict();
4891
4965
  we.setLevel("info");
4892
- let be = class extends te {
4966
+ let be = class extends ae {
4893
4967
  constructor() {
4894
4968
  super(...arguments), this.messages = [], this.actions = [], this.form = null, this.suppressFeedback = !1, this.calendlyInjected = !1, this.activeCalendlyAction = -1, this.hubspotMeetingInjected = !1, this.activeHubspotMeetingAction = -1;
4895
4969
  }
@@ -4903,16 +4977,28 @@ let be = class extends te {
4903
4977
  render() {
4904
4978
  return g`
4905
4979
  <div class="cb-message-list" part="bot-message-list">
4980
+ ${this.renderDisclaimerMessage()}
4906
4981
  ${ze(
4907
4982
  this.messages,
4908
4983
  (c) => c.id + JSON.stringify(c.data),
4909
- (c) => g`<cb-message .message="${c}" exportparts="bot-message, cb-message, bot-message-content, user-message-content" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
4984
+ (c, e) => g`<cb-message .message="${c}" .index="${e}" exportparts="bot-message, cb-message, bot-message-content, user-message-content" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
4910
4985
  )}
4911
4986
  ${this.renderActions()} ${this.renderForm()}
4912
4987
  <div id="cb-message-list-bottom-anchor"></div>
4913
4988
  </div>
4914
4989
  `;
4915
4990
  }
4991
+ renderDisclaimerMessage() {
4992
+ return !p.setting.disclaimerMessage || !p.isConversationStart() ? null : g`
4993
+ <details class="cb-disclaimer-wrapper" part="disclaimer-wrapper">
4994
+ <summary class="cb-disclaimer-message" part="disclaimer-message">
4995
+ ${kt(
4996
+ $t(p.setting.disclaimerMessage).then((c) => g`${c}`)
4997
+ )}
4998
+ </summary>
4999
+ </details>
5000
+ `;
5001
+ }
4916
5002
  renderForm() {
4917
5003
  return this.form ? g` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
4918
5004
  <div class="cb-input-form-title" part="form-title">${this.form.title}</div>
@@ -4959,7 +5045,7 @@ let be = class extends te {
4959
5045
  return a || n[0], g`<div class="cb-form-field">
4960
5046
  <label class="cb-form-field-label"
4961
5047
  >${c.title}
4962
- ${ie(
5048
+ ${ee(
4963
5049
  e,
4964
5050
  () => g`*`,
4965
5051
  () => g``
@@ -5181,19 +5267,19 @@ ye([
5181
5267
  v({ type: Boolean })
5182
5268
  ], be.prototype, "suppressFeedback", 2);
5183
5269
  ye([
5184
- ke("#cb-message-list-bottom-anchor")
5270
+ Ce("#cb-message-list-bottom-anchor")
5185
5271
  ], be.prototype, "_messageListBottomAnchor", 2);
5186
5272
  ye([
5187
- ke(".cb-input-form")
5273
+ Ce(".cb-input-form")
5188
5274
  ], be.prototype, "_inputForm", 2);
5189
5275
  ye([
5190
- Mt({ capture: !1, passive: !0 })
5276
+ Tt({ capture: !1, passive: !0 })
5191
5277
  ], be.prototype, "invokeLinkAction", 1);
5192
5278
  ye([
5193
- Mt({ capture: !1, passive: !0 })
5279
+ Tt({ capture: !1, passive: !0 })
5194
5280
  ], be.prototype, "invokeCalendlyAction", 1);
5195
5281
  ye([
5196
- Mt({ capture: !1, passive: !0 })
5282
+ Tt({ capture: !1, passive: !0 })
5197
5283
  ], be.prototype, "invokeHubspotMeetingAction", 1);
5198
5284
  be = ye([
5199
5285
  J("cb-message-list")
@@ -5241,12 +5327,12 @@ const Xc = X`
5241
5327
  margin: 6px 2px;
5242
5328
  }
5243
5329
  `, Gc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"/></svg>', Zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0z"/></svg>';
5244
- var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, Ce = (c, e, a, n) => {
5330
+ var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, Se = (c, e, a, n) => {
5245
5331
  for (var s = n > 1 ? void 0 : n ? Kc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
5246
5332
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5247
5333
  return n && s && Jc(e, a, s), s;
5248
5334
  };
5249
- let he = class extends te {
5335
+ let he = class extends ae {
5250
5336
  constructor() {
5251
5337
  super(...arguments), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
5252
5338
  }
@@ -5291,7 +5377,7 @@ let he = class extends te {
5291
5377
  }
5292
5378
  render() {
5293
5379
  return g`
5294
- ${ie(
5380
+ ${ee(
5295
5381
  this.loading,
5296
5382
  () => g`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
5297
5383
  () => g``
@@ -5313,22 +5399,30 @@ let he = class extends te {
5313
5399
  @keydown=${this._keyDownHandler}
5314
5400
  ></sl-textarea>
5315
5401
 
5316
- <span class="cb-input-buttons">
5402
+ <div class="cb-input-buttons" part="user-input-buttons-wrapper">
5317
5403
  <sl-button @click=${this._sendHandler} name="send" label="Send" size="small" class="send-button" variant="text" ?disabled=${this.value.length === 0} ?loading=${this.loading} circle>
5318
- <cb-icon svg="${Gc}"></cb-icon>
5404
+ ${ee(
5405
+ p.setting.sendIconSvg !== "",
5406
+ () => g`<cb-icon part="user-input-send-icon" svg="${p.setting.sendIconSvg}"></cb-icon>`,
5407
+ () => g`<cb-icon part="user-input-send-icon" svg="${Gc}"></cb-icon>`
5408
+ )}
5319
5409
  </sl-button>
5320
- ${ie(
5410
+ ${ee(
5321
5411
  this.enableFileUpload,
5322
5412
  () => g`
5323
5413
  <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="small" class="paperclip-button" variant="text" circle>
5324
- <cb-icon svg="${Zc}"></cb-icon>
5414
+ ${ee(
5415
+ p.setting.attachIconSvg !== "",
5416
+ () => g`<cb-icon part="user-input-attach-icon" svg="${p.setting.attachIconSvg}"></cb-icon>`,
5417
+ () => g`<cb-icon part="user-input-attach-icon" svg="${Zc}"></cb-icon>`
5418
+ )}
5325
5419
  <!-- select file input -->
5326
5420
  <input type="file" id="file" name="file" class="file-input" />
5327
5421
  </sl-button>
5328
5422
  `,
5329
5423
  () => g``
5330
5424
  )}
5331
- </span>
5425
+ </div>
5332
5426
  </div>
5333
5427
  `;
5334
5428
  }
@@ -5337,31 +5431,31 @@ let he = class extends te {
5337
5431
  }
5338
5432
  };
5339
5433
  he.styles = Xc;
5340
- Ce([
5434
+ Se([
5341
5435
  v({ type: String, attribute: "placeholder" })
5342
5436
  ], he.prototype, "placeholder", 2);
5343
- Ce([
5437
+ Se([
5344
5438
  v({ type: String, attribute: "send-button-label" })
5345
5439
  ], he.prototype, "sendButtonLabel", 2);
5346
- Ce([
5440
+ Se([
5347
5441
  v({ type: Boolean, attribute: "enable-file-upload" })
5348
5442
  ], he.prototype, "enableFileUpload", 2);
5349
- Ce([
5443
+ Se([
5350
5444
  v({ type: String })
5351
5445
  ], he.prototype, "value", 2);
5352
- Ce([
5446
+ Se([
5353
5447
  v({ type: Boolean })
5354
5448
  ], he.prototype, "loading", 2);
5355
- Ce([
5449
+ Se([
5356
5450
  v({ type: Boolean })
5357
5451
  ], he.prototype, "disabled", 2);
5358
- Ce([
5452
+ Se([
5359
5453
  v({ type: String })
5360
5454
  ], he.prototype, "currentKey", 2);
5361
- Ce([
5362
- ke("sl-textarea")
5455
+ Se([
5456
+ Ce("sl-textarea")
5363
5457
  ], he.prototype, "inputElement", 2);
5364
- he = Ce([
5458
+ he = Se([
5365
5459
  J("cb-user-input")
5366
5460
  ], he);
5367
5461
  const fa = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', Qc = X`
@@ -5404,7 +5498,7 @@ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, gt = (c, e
5404
5498
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5405
5499
  return n && s && ei(e, a, s), s;
5406
5500
  };
5407
- let Fe = class extends te {
5501
+ let Ne = class extends ae {
5408
5502
  constructor() {
5409
5503
  super(...arguments), this.open = !1, this.label = "Dialog", this.zindex = 100;
5410
5504
  }
@@ -5448,25 +5542,25 @@ let Fe = class extends te {
5448
5542
  </sl-dialog>`;
5449
5543
  }
5450
5544
  };
5451
- Fe.styles = Qc;
5545
+ Ne.styles = Qc;
5452
5546
  gt([
5453
5547
  v({ type: Boolean })
5454
- ], Fe.prototype, "open", 2);
5548
+ ], Ne.prototype, "open", 2);
5455
5549
  gt([
5456
5550
  v({ type: String, attribute: "label" })
5457
- ], Fe.prototype, "label", 2);
5551
+ ], Ne.prototype, "label", 2);
5458
5552
  gt([
5459
5553
  v({ type: Number })
5460
- ], Fe.prototype, "zindex", 2);
5461
- Fe = gt([
5554
+ ], Ne.prototype, "zindex", 2);
5555
+ Ne = gt([
5462
5556
  J("cb-dialog")
5463
- ], Fe);
5557
+ ], Ne);
5464
5558
  var ai = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, la = (c, e, a, n) => {
5465
5559
  for (var s = n > 1 ? void 0 : n ? ci(e, a) : e, r = c.length - 1, f; r >= 0; r--)
5466
5560
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5467
5561
  return n && s && ai(e, a, s), s;
5468
5562
  };
5469
- let dt = class extends te {
5563
+ let dt = class extends ae {
5470
5564
  constructor() {
5471
5565
  super(...arguments), this.open = !1;
5472
5566
  }
@@ -5579,7 +5673,7 @@ var ni = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Ue = (c, e
5579
5673
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5580
5674
  return n && s && ni(e, a, s), s;
5581
5675
  };
5582
- let Ee = class extends te {
5676
+ let Te = class extends ae {
5583
5677
  constructor() {
5584
5678
  super(...arguments), this.open = !1, this.clearMessageDialogOpen = !1, this.customRequest = !1;
5585
5679
  }
@@ -5612,7 +5706,7 @@ let Ee = class extends te {
5612
5706
  Enable it for your own backend.
5613
5707
  </sl-switch>
5614
5708
  </div> -->
5615
- ${ie(
5709
+ ${ee(
5616
5710
  this.customRequest,
5617
5711
  () => null,
5618
5712
  () => this.renderInternalServices()
@@ -5699,25 +5793,25 @@ let Ee = class extends te {
5699
5793
  });
5700
5794
  }
5701
5795
  };
5702
- Ee.styles = ii;
5796
+ Te.styles = ii;
5703
5797
  Ue([
5704
5798
  v({ type: Boolean })
5705
- ], Ee.prototype, "open", 2);
5799
+ ], Te.prototype, "open", 2);
5706
5800
  Ue([
5707
5801
  v({ type: Object })
5708
- ], Ee.prototype, "setting", 2);
5802
+ ], Te.prototype, "setting", 2);
5709
5803
  Ue([
5710
5804
  v({ type: Boolean })
5711
- ], Ee.prototype, "clearMessageDialogOpen", 2);
5805
+ ], Te.prototype, "clearMessageDialogOpen", 2);
5712
5806
  Ue([
5713
- ke("sl-dialog")
5714
- ], Ee.prototype, "dialog", 2);
5807
+ Ce("sl-dialog")
5808
+ ], Te.prototype, "dialog", 2);
5715
5809
  Ue([
5716
5810
  v({ type: Boolean })
5717
- ], Ee.prototype, "customRequest", 2);
5718
- Ee = Ue([
5811
+ ], Te.prototype, "customRequest", 2);
5812
+ Te = Ue([
5719
5813
  J("cb-setting")
5720
- ], Ee);
5814
+ ], Te);
5721
5815
  const oi = X`
5722
5816
  ${me}
5723
5817
  :host {
@@ -5837,7 +5931,7 @@ var ri = Object.defineProperty, di = Object.getOwnPropertyDescriptor, ba = (c, e
5837
5931
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5838
5932
  return n && s && ri(e, a, s), s;
5839
5933
  };
5840
- let ft = class extends te {
5934
+ let ft = class extends ae {
5841
5935
  constructor() {
5842
5936
  super(...arguments), this.store = new pt(this, p), this.open = !1;
5843
5937
  }
@@ -5876,12 +5970,12 @@ let ft = class extends te {
5876
5970
  <div class="cb-anchor ${this.open ? "open" : ""}" part="anchor" @click=${this._clickHandler.bind(this)}>
5877
5971
  <sl-popup placement="${this.getPopupPlacement()}" distance="16" ?active="${p.engage && !p.open}">
5878
5972
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="anchor-button" circle>
5879
- ${ie(
5973
+ ${ee(
5880
5974
  this.open,
5881
5975
  () => g`<div class="cb-anchor-icon" part="anchor-icon">${le`${W(p.setting.anchorCloseSvg)}`}</div>`,
5882
5976
  () => g`<div class="cb-anchor-icon" part="anchor-icon">${le`${W(p.setting.anchorOpenSvg)}`}</div>`
5883
5977
  )}
5884
- ${ie(
5978
+ ${ee(
5885
5979
  !this.open && p.unreadMessages > 0,
5886
5980
  () => g`<sl-badge part="anchor-badge" class="cb-anchor-badge" variant="${this.getBadgeVariant()}" pill>${p.unreadMessages}</sl-badge>`,
5887
5981
  () => null
@@ -5936,7 +6030,7 @@ const Gt = {
5936
6030
  icon: hi
5937
6031
  }
5938
6032
  };
5939
- let lt = class extends te {
6033
+ let lt = class extends ae {
5940
6034
  constructor() {
5941
6035
  super(...arguments), this.status = "info";
5942
6036
  }
@@ -5957,7 +6051,7 @@ var gi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, yi = (c, e
5957
6051
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
5958
6052
  return n && s && gi(e, a, s), s;
5959
6053
  };
5960
- let _t = class extends te {
6054
+ let Mt = class extends ae {
5961
6055
  render() {
5962
6056
  return g` <sl-alert variant="danger" open>
5963
6057
  <cb-status-icon status="error" slot="icon"></cb-status-icon>
@@ -5973,15 +6067,25 @@ let _t = class extends te {
5973
6067
  this.emit("setting:show");
5974
6068
  }
5975
6069
  };
5976
- _t.styles = fi;
5977
- _t = yi([
6070
+ Mt.styles = fi;
6071
+ Mt = yi([
5978
6072
  J("cb-auth-alert")
5979
- ], _t);
6073
+ ], Mt);
5980
6074
  const vi = X`
5981
6075
  sl-dialog::part(base) {
5982
6076
  z-index: 1000;
5983
6077
  }
5984
6078
 
6079
+ .cb-feedback-dialog {
6080
+ --width: 60vw;
6081
+ }
6082
+
6083
+ @media (max-width: 640px) {
6084
+ .cb-feedback-dialog {
6085
+ --width: 100vw;
6086
+ }
6087
+ }
6088
+
5985
6089
  .cb-header {
5986
6090
  display: flex;
5987
6091
  padding: 0px 0px 20px 0px;
@@ -6057,7 +6161,7 @@ var wi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, We = (c, e
6057
6161
  return n && s && wi(e, a, s), s;
6058
6162
  };
6059
6163
  const Zt = Ke.noConflict(), ki = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg>';
6060
- let Ae = class extends te {
6164
+ let Ee = class extends ae {
6061
6165
  constructor() {
6062
6166
  super(...arguments), this.store = new pt(this, p), this.zindex = 100;
6063
6167
  }
@@ -6076,7 +6180,7 @@ let Ae = class extends te {
6076
6180
  }
6077
6181
  // todo render empty if feedback is disabled
6078
6182
  render() {
6079
- return g` <sl-dialog ?no-header=${!0} ?open=${p.feedback} @sl-hide=${this._cancelHandler} style="--width: 60vw;">
6183
+ return g` <sl-dialog ?no-header=${!0} ?open=${p.feedback} @sl-hide=${this._cancelHandler} class="cb-feedback-dialog">
6080
6184
  <div style="">
6081
6185
  <h2>Please share your feedback</h2>
6082
6186
  <div class="cb-feedback-messages-wrapper">
@@ -6121,25 +6225,25 @@ let Ae = class extends te {
6121
6225
  this._comments.value = "", await p.submitFeedback(c, e, a);
6122
6226
  }
6123
6227
  };
6124
- Ae.styles = vi;
6228
+ Ee.styles = vi;
6125
6229
  We([
6126
6230
  v({ type: Number })
6127
- ], Ae.prototype, "zindex", 2);
6231
+ ], Ee.prototype, "zindex", 2);
6128
6232
  We([
6129
- ke("#cb-feedback-rating-el")
6130
- ], Ae.prototype, "_rating", 2);
6233
+ Ce("#cb-feedback-rating-el")
6234
+ ], Ee.prototype, "_rating", 2);
6131
6235
  We([
6132
- ke("#cb-feedback-comments-el")
6133
- ], Ae.prototype, "_comments", 2);
6236
+ Ce("#cb-feedback-comments-el")
6237
+ ], Ee.prototype, "_comments", 2);
6134
6238
  We([
6135
- ke("#cb-feedback-name-el")
6136
- ], Ae.prototype, "_name", 2);
6239
+ Ce("#cb-feedback-name-el")
6240
+ ], Ee.prototype, "_name", 2);
6137
6241
  We([
6138
- ke("#cb-feedback-email-el")
6139
- ], Ae.prototype, "_email", 2);
6140
- Ae = We([
6242
+ Ce("#cb-feedback-email-el")
6243
+ ], Ee.prototype, "_email", 2);
6244
+ Ee = We([
6141
6245
  J("cb-dialog-feedback")
6142
- ], Ae);
6246
+ ], Ee);
6143
6247
  class Jt extends Error {
6144
6248
  constructor(a, n, s) {
6145
6249
  const r = a.status || a.status === 0 ? a.status : "", f = a.statusText || "", w = `${r} ${f}`.trim(), S = w ? `status code ${w}` : "an unknown error";
@@ -6161,7 +6265,7 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
6161
6265
  for (const e of c)
6162
6266
  if ((!Xe(e) || Array.isArray(e)) && e !== void 0)
6163
6267
  throw new TypeError("The `options` argument must be an object");
6164
- return It({}, ...c);
6268
+ return qt({}, ...c);
6165
6269
  }, pa = (c = {}, e = {}) => {
6166
6270
  const a = new globalThis.Headers(c), n = e instanceof globalThis.Headers, s = new globalThis.Headers(e);
6167
6271
  for (const [r, f] of s.entries())
@@ -6169,21 +6273,21 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
6169
6273
  return a;
6170
6274
  };
6171
6275
  function st(c, e, a) {
6172
- return Object.hasOwn(e, a) && e[a] === void 0 ? [] : It(c[a] ?? [], e[a] ?? []);
6276
+ return Object.hasOwn(e, a) && e[a] === void 0 ? [] : qt(c[a] ?? [], e[a] ?? []);
6173
6277
  }
6174
6278
  const ga = (c = {}, e = {}) => ({
6175
6279
  beforeRequest: st(c, e, "beforeRequest"),
6176
6280
  beforeRetry: st(c, e, "beforeRetry"),
6177
6281
  afterResponse: st(c, e, "afterResponse"),
6178
6282
  beforeError: st(c, e, "beforeError")
6179
- }), It = (...c) => {
6283
+ }), qt = (...c) => {
6180
6284
  let e = {}, a = {}, n = {};
6181
6285
  for (const s of c)
6182
6286
  if (Array.isArray(s))
6183
6287
  Array.isArray(e) || (e = []), e = [...e, ...s];
6184
6288
  else if (Xe(s)) {
6185
6289
  for (let [r, f] of Object.entries(s))
6186
- Xe(f) && r in e && (f = It(e[r], f)), e = { ...e, [r]: f };
6290
+ Xe(f) && r in e && (f = qt(e[r], f)), e = { ...e, [r]: f };
6187
6291
  Xe(s.hooks) && (n = ga(n, s.hooks), e.hooks = n), Xe(s.headers) && (a = pa(a, s.headers), e.headers = a);
6188
6292
  }
6189
6293
  return e;
@@ -6212,7 +6316,7 @@ const ga = (c = {}, e = {}) => ({
6212
6316
  formData: "multipart/form-data",
6213
6317
  arrayBuffer: "*/*",
6214
6318
  blob: "*/*"
6215
- }, xt = 2147483647, ya = Symbol("stop"), Ti = {
6319
+ }, xt = 2147483647, ya = Symbol("stop"), Ai = {
6216
6320
  json: !0,
6217
6321
  parseJson: !0,
6218
6322
  stringifyJson: !0,
@@ -6224,7 +6328,7 @@ const ga = (c = {}, e = {}) => ({
6224
6328
  throwHttpErrors: !0,
6225
6329
  onDownloadProgress: !0,
6226
6330
  fetch: !0
6227
- }, Ei = {
6331
+ }, Ti = {
6228
6332
  method: !0,
6229
6333
  headers: !0,
6230
6334
  body: !0,
@@ -6241,7 +6345,7 @@ const ga = (c = {}, e = {}) => ({
6241
6345
  dispatcher: !0,
6242
6346
  duplex: !0,
6243
6347
  priority: !0
6244
- }, Ai = (c) => ma.includes(c) ? c.toUpperCase() : c, Ii = ["get", "put", "head", "delete", "options", "trace"], Li = [408, 413, 429, 500, 502, 503, 504], qi = [413, 429, 503], Kt = {
6348
+ }, Ei = (c) => ma.includes(c) ? c.toUpperCase() : c, Ii = ["get", "put", "head", "delete", "options", "trace"], Li = [408, 413, 429, 500, 502, 503, 504], qi = [413, 429, 503], Kt = {
6245
6349
  limit: 2,
6246
6350
  methods: Ii,
6247
6351
  statusCodes: Li,
@@ -6288,7 +6392,7 @@ async function zi(c, { signal: e }) {
6288
6392
  const ji = (c, e) => {
6289
6393
  const a = {};
6290
6394
  for (const n in e)
6291
- !(n in Ei) && !(n in Ti) && !(n in c) && (a[n] = e[n]);
6395
+ !(n in Ti) && !(n in Ai) && !(n in c) && (a[n] = e[n]);
6292
6396
  return a;
6293
6397
  };
6294
6398
  class bt {
@@ -6309,7 +6413,7 @@ class bt {
6309
6413
  beforeError: [],
6310
6414
  afterResponse: []
6311
6415
  }, a.hooks),
6312
- method: Ai(a.method ?? this._input.method),
6416
+ method: Ei(a.method ?? this._input.method),
6313
6417
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
6314
6418
  prefixUrl: String(a.prefixUrl || ""),
6315
6419
  retry: Oi(a.retry),
@@ -6463,12 +6567,12 @@ class bt {
6463
6567
  }
6464
6568
  }
6465
6569
  /*! MIT License © Sindre Sorhus */
6466
- const $t = (c) => {
6570
+ const At = (c) => {
6467
6571
  const e = (a, n) => bt.create(a, nt(c, n));
6468
6572
  for (const a of ma)
6469
6573
  e[a] = (n, s) => bt.create(n, nt(c, s, { method: a }));
6470
- return e.create = (a) => $t(nt(a)), e.extend = (a) => (typeof a == "function" && (a = a(c ?? {})), $t(nt(c, a))), e.stop = ya, e;
6471
- }, Hi = $t();
6574
+ return e.create = (a) => At(nt(a)), e.extend = (a) => (typeof a == "function" && (a = a(c ?? {})), At(nt(c, a))), e.stop = ya, e;
6575
+ }, Hi = At();
6472
6576
  Hi.extend({
6473
6577
  hooks: {
6474
6578
  beforeRequest: [
@@ -6503,9 +6607,9 @@ var Ri = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, H = (c, e,
6503
6607
  (f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
6504
6608
  return n && s && Ri(e, a, s), s;
6505
6609
  };
6506
- const Me = Ke.noConflict();
6507
- Me.setLevel("info");
6508
- let j = class extends te {
6610
+ const Ae = Ke.noConflict();
6611
+ Ae.setLevel("info");
6612
+ let P = class extends ae {
6509
6613
  constructor() {
6510
6614
  super(...arguments), this.store = new pt(this, p), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = `<svg width="34" height="34" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
6511
6615
  <g clip-path="url(#clip0_830_887)">
@@ -6533,7 +6637,7 @@ let j = class extends te {
6533
6637
  <rect width="400" height="400" fill="white"/>
6534
6638
  </clipPath>
6535
6639
  </defs>
6536
- </svg>`, this.popupLogoSvg = "", this.popupLogoUrl = "", this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.anchorOpenSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7M5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0m4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0m3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>', this.anchorCloseSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.handleAddMessage = (c) => {
6640
+ </svg>`, this.popupLogoSvg = "", this.popupLogoUrl = "", this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.anchorOpenSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7M5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0m4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0m3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>', this.anchorCloseSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', this.sendIconSvg = "", this.attachIconSvg = "", this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.handleAddMessage = (c) => {
6537
6641
  this._addMessageHandler(c);
6538
6642
  }, this.handleStateEvent = (c) => {
6539
6643
  this._stateEventHandler(c);
@@ -6573,14 +6677,14 @@ let j = class extends te {
6573
6677
  p.addActions(c);
6574
6678
  }
6575
6679
  render() {
6576
- return p.disabled && !this.alwaysOpen ? (Me.info("Bot is disabled until settings are loaded"), null) : g`
6680
+ return p.disabled && !this.alwaysOpen ? (Ae.info("Bot is disabled until settings are loaded"), null) : g`
6577
6681
  <div class="cb-wrapper${p.open ? " cb-open" : ""}" part="wrapper${p.open ? " open" : ""}" exportparts="wrapper${p.open ? " open" : ""}">
6578
6682
  <cb-header title="${this.name}" exportparts="header, header-logo, header-title, header-close"></cb-header>
6579
6683
  <cb-message-list
6580
6684
  .messages=${p.messages}
6581
6685
  .actions=${p.actions}
6582
6686
  .form=${p.form}
6583
- exportparts="bot-message-list, bot-message, cb-message, bot-message-content, user-message-content, form, form-title, form-input, form-submit"
6687
+ exportparts="bot-message-list, disclaimer-message, bot-message, cb-message, bot-message-content, user-message-content, form, form-title, form-input, form-submit"
6584
6688
  ></cb-message-list>
6585
6689
  ${this.renderUserInput()} ${this.renderFeedbackDialog()}
6586
6690
  </div>
@@ -6599,11 +6703,11 @@ let j = class extends te {
6599
6703
  ?loading=${p.connecting}
6600
6704
  ?disabled=${p.connecting || p.form}
6601
6705
  ?enable-file-upload=${p.setting.uploadImages && p.connected}
6602
- exportparts="user-input-control,user-input, user-input-wrapper, user-input-base, user-input-textarea"
6706
+ exportparts="user-input-control,user-input, user-input-wrapper, user-input-base, user-input-textarea, user-input-buttons-wrapper, user-input-send-icon, user-input-attach-icon"
6603
6707
  ></cb-user-input>`;
6604
6708
  }
6605
6709
  connectedCallback() {
6606
- super.connectedCallback(), Me.info("connectedCallback"), this.initCssVariables(), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this.handleToggleEvent), addEventListener("form:submit", this.handleFormSubmitEvent), addEventListener("message:send:file", this._uploadFileHandler);
6710
+ super.connectedCallback(), Ae.info("connectedCallback"), this.initCssVariables(), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this.handleToggleEvent), addEventListener("form:submit", this.handleFormSubmitEvent), addEventListener("message:send:file", this._uploadFileHandler);
6607
6711
  }
6608
6712
  extractCssVariable(c, e, a) {
6609
6713
  let n = c.getPropertyValue(e).trim();
@@ -6632,26 +6736,26 @@ let j = class extends te {
6632
6736
 
6633
6737
  */
6634
6738
  disconnectedCallback() {
6635
- Me.info("disconnectedCallback"), super.disconnectedCallback(), window.removeEventListener("c7o:bot:stateEvent", this.handleStateEvent), window.removeEventListener("message:send", this.handleAddMessage), window.removeEventListener("chatbot:toggle", this.handleToggleEvent), window.removeEventListener("form:submit", this.handleFormSubmitEvent), window.removeEventListener("message:send:file", this._uploadFileHandler);
6739
+ Ae.info("disconnectedCallback"), super.disconnectedCallback(), window.removeEventListener("c7o:bot:stateEvent", this.handleStateEvent), window.removeEventListener("message:send", this.handleAddMessage), window.removeEventListener("chatbot:toggle", this.handleToggleEvent), window.removeEventListener("form:submit", this.handleFormSubmitEvent), window.removeEventListener("message:send:file", this._uploadFileHandler);
6636
6740
  }
6637
6741
  // This is called when component is loaded, with all the settings (props) values
6638
6742
  // Use to initialize
6639
6743
  // This is also called when state changes - ??? - i.e. when message added to the array
6640
6744
  updated(c) {
6641
- super.updated(c), c.size > 0 && (Me.info("updated,_changedProperties:", c), this._initSetting()), setTimeout(() => {
6745
+ super.updated(c), c.size > 0 && (Ae.info("updated,_changedProperties:", c), this._initSetting()), setTimeout(() => {
6642
6746
  this._scrollToBottom();
6643
6747
  }, 0);
6644
6748
  }
6645
6749
  // initialize setting
6646
6750
  _initSetting() {
6647
- Me.info("_initSetting");
6751
+ Ae.info("_initSetting");
6648
6752
  const c = p.setting;
6649
- c.orgId = this.orgId, c.botId = this.botId, c.url = this.url, c.logoUrl = this.logoUrl, c.logoSvg = this.logoSvg, c.closeSvg = this.closeSvg, c.popupLogoSvg = this.popupLogoSvg, c.popupLogoUrl = this.popupLogoUrl, c.botIconSvg = this.botIconSvg, c.userIconSvg = this.userIconSvg, c.systemIconSvg = this.systemIconSvg, c.agentIconSvg = this.agentIconSvg, c.anchorOpenSvg = this.anchorOpenSvg, c.anchorCloseSvg = this.anchorCloseSvg, p.setSetting(c);
6753
+ c.orgId = this.orgId, c.botId = this.botId, c.url = this.url, c.logoUrl = this.logoUrl, c.logoSvg = this.logoSvg, c.closeSvg = this.closeSvg, c.popupLogoSvg = this.popupLogoSvg, c.popupLogoUrl = this.popupLogoUrl, c.botIconSvg = this.botIconSvg, c.userIconSvg = this.userIconSvg, c.systemIconSvg = this.systemIconSvg, c.agentIconSvg = this.agentIconSvg, c.anchorOpenSvg = this.anchorOpenSvg, c.anchorCloseSvg = this.anchorCloseSvg, c.sendIconSvg = this.sendIconSvg, c.attachIconSvg = this.attachIconSvg, p.setSetting(c);
6650
6754
  let e = {};
6651
6755
  try {
6652
6756
  e = JSON.parse(this.prefilledFormFields);
6653
6757
  } catch (a) {
6654
- Me.error(`Failed to parse prefilled-form-fields attribute value, error: ${(a == null ? void 0 : a.message) || ""}`), e = {};
6758
+ Ae.error(`Failed to parse prefilled-form-fields attribute value, error: ${(a == null ? void 0 : a.message) || ""}`), e = {};
6655
6759
  }
6656
6760
  p.setPrefilledFormFields(e), this.open && (p.open = !0), this.alwaysOpen && (p.open = !0, p.alwaysOpen = !0);
6657
6761
  }
@@ -6685,7 +6789,7 @@ let j = class extends te {
6685
6789
  // for example, user profile, current product user is viewing on the web page, etc.
6686
6790
  setContext(c = {}) {
6687
6791
  p.setContext(c).catch((e) => {
6688
- Me.error(`Failed to set context, error: ${(e == null ? void 0 : e.message) || ""}`);
6792
+ Ae.error(`Failed to set context, error: ${(e == null ? void 0 : e.message) || ""}`);
6689
6793
  });
6690
6794
  }
6691
6795
  getContext() {
@@ -6773,91 +6877,97 @@ let j = class extends te {
6773
6877
  (e = this._messageList) == null || e.scrollToBottom();
6774
6878
  }
6775
6879
  };
6776
- j.styles = Wa;
6880
+ P.styles = Wa;
6777
6881
  H([
6778
6882
  v({ type: Boolean, attribute: "display-license" })
6779
- ], j.prototype, "displayLicense", 2);
6883
+ ], P.prototype, "displayLicense", 2);
6780
6884
  H([
6781
6885
  v({ type: String, attribute: "name" })
6782
- ], j.prototype, "name", 2);
6886
+ ], P.prototype, "name", 2);
6783
6887
  H([
6784
6888
  v({ type: String, attribute: "org-id" })
6785
- ], j.prototype, "orgId", 2);
6889
+ ], P.prototype, "orgId", 2);
6786
6890
  H([
6787
6891
  v({ type: String, attribute: "bot-id" })
6788
- ], j.prototype, "botId", 2);
6892
+ ], P.prototype, "botId", 2);
6789
6893
  H([
6790
6894
  v({ type: String, attribute: "url" })
6791
- ], j.prototype, "url", 2);
6895
+ ], P.prototype, "url", 2);
6792
6896
  H([
6793
6897
  v({ type: String, attribute: "logo-url" })
6794
- ], j.prototype, "logoUrl", 2);
6898
+ ], P.prototype, "logoUrl", 2);
6795
6899
  H([
6796
6900
  v({ type: String, attribute: "logo-svg" })
6797
- ], j.prototype, "logoSvg", 2);
6901
+ ], P.prototype, "logoSvg", 2);
6798
6902
  H([
6799
6903
  v({ type: String, attribute: "close-svg" })
6800
- ], j.prototype, "closeSvg", 2);
6904
+ ], P.prototype, "closeSvg", 2);
6801
6905
  H([
6802
6906
  v({ type: String, attribute: "popup-logo-svg" })
6803
- ], j.prototype, "popupLogoSvg", 2);
6907
+ ], P.prototype, "popupLogoSvg", 2);
6804
6908
  H([
6805
6909
  v({ type: String, attribute: "popup-logo-url" })
6806
- ], j.prototype, "popupLogoUrl", 2);
6910
+ ], P.prototype, "popupLogoUrl", 2);
6807
6911
  H([
6808
6912
  v({ type: String, attribute: "bot-icon-svg" })
6809
- ], j.prototype, "botIconSvg", 2);
6913
+ ], P.prototype, "botIconSvg", 2);
6810
6914
  H([
6811
6915
  v({ type: String, attribute: "user-icon-svg" })
6812
- ], j.prototype, "userIconSvg", 2);
6916
+ ], P.prototype, "userIconSvg", 2);
6813
6917
  H([
6814
6918
  v({ type: String, attribute: "system-icon-svg" })
6815
- ], j.prototype, "systemIconSvg", 2);
6919
+ ], P.prototype, "systemIconSvg", 2);
6816
6920
  H([
6817
6921
  v({ type: String, attribute: "agent-icon-svg" })
6818
- ], j.prototype, "agentIconSvg", 2);
6922
+ ], P.prototype, "agentIconSvg", 2);
6819
6923
  H([
6820
6924
  v({ type: String, attribute: "anchor-open-svg" })
6821
- ], j.prototype, "anchorOpenSvg", 2);
6925
+ ], P.prototype, "anchorOpenSvg", 2);
6822
6926
  H([
6823
6927
  v({ type: String, attribute: "anchor-close-svg" })
6824
- ], j.prototype, "anchorCloseSvg", 2);
6928
+ ], P.prototype, "anchorCloseSvg", 2);
6929
+ H([
6930
+ v({ type: String, attribute: "send-icon-svg" })
6931
+ ], P.prototype, "sendIconSvg", 2);
6932
+ H([
6933
+ v({ type: String, attribute: "attach-icon-svg" })
6934
+ ], P.prototype, "attachIconSvg", 2);
6825
6935
  H([
6826
6936
  v({ type: Boolean, attribute: "stream" })
6827
- ], j.prototype, "stream", 2);
6937
+ ], P.prototype, "stream", 2);
6828
6938
  H([
6829
6939
  v({ type: Boolean, attribute: "custom-request" })
6830
- ], j.prototype, "customRequest", 2);
6940
+ ], P.prototype, "customRequest", 2);
6831
6941
  H([
6832
6942
  v({ type: Boolean, attribute: "enable-file-upload" })
6833
- ], j.prototype, "enableFileUpload", 2);
6943
+ ], P.prototype, "enableFileUpload", 2);
6834
6944
  H([
6835
6945
  v({ type: String, attribute: "upload-file-url" })
6836
- ], j.prototype, "uploadFileUrl", 2);
6946
+ ], P.prototype, "uploadFileUrl", 2);
6837
6947
  H([
6838
6948
  v({ type: Boolean, attribute: "open" })
6839
- ], j.prototype, "open", 2);
6949
+ ], P.prototype, "open", 2);
6840
6950
  H([
6841
6951
  v({ type: Boolean, attribute: "always-open" })
6842
- ], j.prototype, "alwaysOpen", 2);
6952
+ ], P.prototype, "alwaysOpen", 2);
6843
6953
  H([
6844
6954
  v({ type: String, attribute: "prefilled-form-fields" })
6845
- ], j.prototype, "prefilledFormFields", 2);
6955
+ ], P.prototype, "prefilledFormFields", 2);
6846
6956
  H([
6847
6957
  v({ type: Boolean })
6848
- ], j.prototype, "loading", 2);
6958
+ ], P.prototype, "loading", 2);
6849
6959
  H([
6850
6960
  v({ type: Boolean })
6851
- ], j.prototype, "showSetting", 2);
6961
+ ], P.prototype, "showSetting", 2);
6852
6962
  H([
6853
6963
  v({ type: Boolean })
6854
- ], j.prototype, "showAuthAlert", 2);
6964
+ ], P.prototype, "showAuthAlert", 2);
6855
6965
  H([
6856
- ke("cb-message-list")
6857
- ], j.prototype, "_messageList", 2);
6858
- j = H([
6966
+ Ce("cb-message-list")
6967
+ ], P.prototype, "_messageList", 2);
6968
+ P = H([
6859
6969
  J("enegelai-bot")
6860
- ], j);
6970
+ ], P);
6861
6971
  export {
6862
- j as default
6972
+ P as default
6863
6973
  };