@enegelai/bot-widget 1.7.2 → 1.7.4
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/enegelaibot.umd.js +4 -4
- package/dist/index.es.js +92 -86
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -25,8 +25,8 @@ import "@shoelace-style/shoelace/dist/components/switch/switch.js";
|
|
|
25
25
|
import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js";
|
|
26
26
|
import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
|
|
27
27
|
import "@shoelace-style/shoelace/dist/components/alert/alert.js";
|
|
28
|
-
import { repeat as
|
|
29
|
-
import { until as
|
|
28
|
+
import { repeat as ze } from "lit/directives/repeat.js";
|
|
29
|
+
import { until as zt } from "lit-html/directives/until.js";
|
|
30
30
|
import Ia from "markdown-it";
|
|
31
31
|
import La from "markdown-it-link-attributes";
|
|
32
32
|
import pt from "highlight.js";
|
|
@@ -222,8 +222,8 @@ var Kt = { exports: {} };
|
|
|
222
222
|
"warn",
|
|
223
223
|
"error"
|
|
224
224
|
];
|
|
225
|
-
function f(E,
|
|
226
|
-
var q = E[
|
|
225
|
+
function f(E, z) {
|
|
226
|
+
var q = E[z];
|
|
227
227
|
if (typeof q.bind == "function")
|
|
228
228
|
return q.bind(E);
|
|
229
229
|
try {
|
|
@@ -240,24 +240,24 @@ var Kt = { exports: {} };
|
|
|
240
240
|
function x(E) {
|
|
241
241
|
return E === "debug" && (E = "log"), typeof console === c ? !1 : E === "trace" && i ? l : console[E] !== void 0 ? f(console, E) : console.log !== void 0 ? f(console, "log") : e;
|
|
242
242
|
}
|
|
243
|
-
function S(E,
|
|
243
|
+
function S(E, z) {
|
|
244
244
|
for (var q = 0; q < n.length; q++) {
|
|
245
245
|
var $ = n[q];
|
|
246
|
-
this[$] = q < E ? e : this.methodFactory($, E,
|
|
246
|
+
this[$] = q < E ? e : this.methodFactory($, E, z);
|
|
247
247
|
}
|
|
248
248
|
this.log = this.debug;
|
|
249
249
|
}
|
|
250
|
-
function D(E,
|
|
250
|
+
function D(E, z, q) {
|
|
251
251
|
return function() {
|
|
252
|
-
typeof console !== c && (S.call(this,
|
|
252
|
+
typeof console !== c && (S.call(this, z, q), this[E].apply(this, arguments));
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function L(E,
|
|
255
|
+
function L(E, z, q) {
|
|
256
256
|
return x(E) || D.apply(this, arguments);
|
|
257
257
|
}
|
|
258
|
-
function M(E,
|
|
258
|
+
function M(E, z, q) {
|
|
259
259
|
var $ = this, he;
|
|
260
|
-
|
|
260
|
+
z = z ?? "WARN";
|
|
261
261
|
var ee = "loglevel";
|
|
262
262
|
typeof E == "string" ? ee += ":" + E : typeof E == "symbol" && (ee = void 0);
|
|
263
263
|
function bt(v) {
|
|
@@ -321,24 +321,24 @@ var Kt = { exports: {} };
|
|
|
321
321
|
} else
|
|
322
322
|
throw "log.setLevel() called with invalid level: " + v;
|
|
323
323
|
}, $.setDefaultLevel = function(v) {
|
|
324
|
-
|
|
324
|
+
z = v, Ie() || $.setLevel(v, !1);
|
|
325
325
|
}, $.resetLevel = function() {
|
|
326
|
-
$.setLevel(
|
|
326
|
+
$.setLevel(z, !1), Ne();
|
|
327
327
|
}, $.enableAll = function(v) {
|
|
328
328
|
$.setLevel($.levels.TRACE, v);
|
|
329
329
|
}, $.disableAll = function(v) {
|
|
330
330
|
$.setLevel($.levels.SILENT, v);
|
|
331
331
|
};
|
|
332
332
|
var Se = Ie();
|
|
333
|
-
Se == null && (Se =
|
|
333
|
+
Se == null && (Se = z), $.setLevel(Se, !1);
|
|
334
334
|
}
|
|
335
335
|
var A = new M(), F = {};
|
|
336
|
-
A.getLogger = function(
|
|
337
|
-
if (typeof
|
|
336
|
+
A.getLogger = function(z) {
|
|
337
|
+
if (typeof z != "symbol" && typeof z != "string" || z === "")
|
|
338
338
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
339
|
-
var q = F[
|
|
340
|
-
return q || (q = F[
|
|
341
|
-
|
|
339
|
+
var q = F[z];
|
|
340
|
+
return q || (q = F[z] = new M(
|
|
341
|
+
z,
|
|
342
342
|
A.getLevel(),
|
|
343
343
|
A.methodFactory
|
|
344
344
|
)), q;
|
|
@@ -351,8 +351,8 @@ var Kt = { exports: {} };
|
|
|
351
351
|
}, A.default = A, A;
|
|
352
352
|
});
|
|
353
353
|
})(Kt);
|
|
354
|
-
var
|
|
355
|
-
const dt = /* @__PURE__ */ Jt(
|
|
354
|
+
var Ha = Kt.exports;
|
|
355
|
+
const dt = /* @__PURE__ */ Jt(Ha), za = U`
|
|
356
356
|
:host {
|
|
357
357
|
}
|
|
358
358
|
.cb-wrapper {
|
|
@@ -1009,13 +1009,14 @@ class W extends Ke {
|
|
|
1009
1009
|
this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null;
|
|
1010
1010
|
}
|
|
1011
1011
|
processStreamingResponseTagImg() {
|
|
1012
|
-
if (!
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
this.streamingResponseBuffer.indexOf(")") !== -1 && (j.info(`IMG TAG END: ${this.streamingResponseBuffer}`), this.isValidImageLink(this.streamingResponseBuffer) && (this.replyMessage = this.updateMessage(this.replyMessage, this.streamingResponseBuffer)), this.streamingResponseBuffer = null, this.streamingResponseCurrentTag = null);
|
|
1012
|
+
if (!this.streamingResponseBuffer || !this.replyMessage)
|
|
1013
|
+
return;
|
|
1014
|
+
if (this.streamingResponseBuffer.indexOf("![") === -1) {
|
|
1015
|
+
j.info(`NOT IMG TAG: ${this.streamingResponseBuffer}`), this.replyMessage = this.updateMessage(this.replyMessage, this.streamingResponseBuffer), this.streamingResponseBuffer = null, this.streamingResponseCurrentTag = null;
|
|
1016
|
+
return;
|
|
1018
1017
|
}
|
|
1018
|
+
const e = this.streamingResponseBuffer.lastIndexOf("]"), c = this.streamingResponseBuffer.lastIndexOf(")");
|
|
1019
|
+
e === -1 || c === -1 || e > c || (j.info(`IMG TAG END: ${this.streamingResponseBuffer}`), this.isValidImageLink(this.streamingResponseBuffer) && (this.replyMessage = this.updateMessage(this.replyMessage, this.streamingResponseBuffer)), this.streamingResponseBuffer = null, this.streamingResponseCurrentTag = null);
|
|
1019
1020
|
}
|
|
1020
1021
|
isValidImageLink(e = "") {
|
|
1021
1022
|
return !(e.indexOf("example.com") !== -1 || e.indexOf("imgur.com") !== -1 || e.indexOf("attachment:") !== -1);
|
|
@@ -1742,7 +1743,7 @@ var ta = { exports: {} };
|
|
|
1742
1743
|
}), v(s) && s();
|
|
1743
1744
|
} });
|
|
1744
1745
|
}
|
|
1745
|
-
function
|
|
1746
|
+
function z(r) {
|
|
1746
1747
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
1747
1748
|
if (t === "")
|
|
1748
1749
|
return r.style.webkitTransform = "", r.style.MozTransform = "", r.style.msTransform = "", r.style.OTransform = "", r.style.transform = "", !1;
|
|
@@ -2024,16 +2025,16 @@ var ta = { exports: {} };
|
|
|
2024
2025
|
if (u.style[h] !== void 0)
|
|
2025
2026
|
return p[h];
|
|
2026
2027
|
}(), s = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, o = F(r, "gslide-media") ? r : r.querySelector(".gslide-media"), d = ce(o, ".ginner-container"), b = r.querySelector(".gslide-description");
|
|
2027
|
-
s > 769 && (o = d), M(o, "greset"),
|
|
2028
|
+
s > 769 && (o = d), M(o, "greset"), z(o, "translate3d(0, 0, 0)"), L(t, { onElement: o, once: !0, withCallback: function(h, u) {
|
|
2028
2029
|
A(o, "greset");
|
|
2029
2030
|
} }), o.style.opacity = "", b && (b.style.opacity = "");
|
|
2030
2031
|
}
|
|
2031
2032
|
function pa(r) {
|
|
2032
2033
|
if (r.events.hasOwnProperty("touch"))
|
|
2033
2034
|
return !1;
|
|
2034
|
-
var t, s, o, d = ee(), b = d.width, h = d.height, u = !1, p = null, k = null, g = null, y = !1, T = 1, _ = 1, O = !1, B = !1, I = null, re = null, ae = null, we = null, xe = 0, _e = 0, Oe = !1, ut = !1, Me = {}, Te = {}, Pt = 0,
|
|
2035
|
+
var t, s, o, d = ee(), b = d.width, h = d.height, u = !1, p = null, k = null, g = null, y = !1, T = 1, _ = 1, O = !1, B = !1, I = null, re = null, ae = null, we = null, xe = 0, _e = 0, Oe = !1, ut = !1, Me = {}, Te = {}, Pt = 0, Ht = 0, Sa = document.getElementById("glightbox-slider"), Ze = document.querySelector(".goverlay"), _a = new ua(Sa, { touchStart: function(P) {
|
|
2035
2036
|
if (u = !0, (F(P.targetTouches[0].target, "ginner-container") || ce(P.targetTouches[0].target, ".gslide-desc") || P.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), ce(P.targetTouches[0].target, ".gslide-inline") && !F(P.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
|
|
2036
|
-
if (Te = P.targetTouches[0], Me.pageX = P.targetTouches[0].pageX, Me.pageY = P.targetTouches[0].pageY, Pt = P.targetTouches[0].clientX,
|
|
2037
|
+
if (Te = P.targetTouches[0], Me.pageX = P.targetTouches[0].pageX, Me.pageY = P.targetTouches[0].pageY, Pt = P.targetTouches[0].clientX, Ht = P.targetTouches[0].clientY, p = r.activeSlide, k = p.querySelector(".gslide-media"), o = p.querySelector(".gslide-inline"), g = null, F(k, "gslide-image") && (g = k.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (k = p.querySelector(".ginner-container")), A(Ze, "greset"), P.pageX > 20 && P.pageX < window.innerWidth - 20)
|
|
2037
2038
|
return;
|
|
2038
2039
|
P.preventDefault();
|
|
2039
2040
|
}
|
|
@@ -2045,10 +2046,10 @@ var ta = { exports: {} };
|
|
|
2045
2046
|
return !1;
|
|
2046
2047
|
}
|
|
2047
2048
|
y = !0;
|
|
2048
|
-
var ke, Ge = P.targetTouches[0].clientX, Ma = P.targetTouches[0].clientY, Ta = Pt - Ge, Ea =
|
|
2049
|
+
var ke, Ge = P.targetTouches[0].clientX, Ma = P.targetTouches[0].clientY, Ta = Pt - Ge, Ea = Ht - Ma;
|
|
2049
2050
|
if (Math.abs(Ta) > Math.abs(Ea) ? (Oe = !1, ut = !0) : (ut = !1, Oe = !0), t = Te.pageX - Me.pageX, xe = 100 * t / b, s = Te.pageY - Me.pageY, _e = 100 * s / h, Oe && g && (ke = 1 - Math.abs(s) / h, Ze.style.opacity = ke, r.settings.touchFollowAxis && (xe = 0)), ut && (ke = 1 - Math.abs(t) / b, k.style.opacity = ke, r.settings.touchFollowAxis && (_e = 0)), !g)
|
|
2050
|
-
return
|
|
2051
|
-
|
|
2051
|
+
return z(k, "translate3d(".concat(xe, "%, 0, 0)"));
|
|
2052
|
+
z(k, "translate3d(".concat(xe, "%, ").concat(_e, "%, 0)"));
|
|
2052
2053
|
}
|
|
2053
2054
|
}, touchEnd: function() {
|
|
2054
2055
|
if (u) {
|
|
@@ -2078,7 +2079,7 @@ var ta = { exports: {} };
|
|
|
2078
2079
|
var K = Te.pageX - Me.pageX, ke = Te.pageY - Me.pageY;
|
|
2079
2080
|
ae && (K += ae), we && (ke += we), I = K, re = ke;
|
|
2080
2081
|
var Ge = "translate3d(".concat(K, "px, ").concat(ke, "px, 0)");
|
|
2081
|
-
_ && (Ge += " scale3d(".concat(_, ", ").concat(_, ", 1)")),
|
|
2082
|
+
_ && (Ge += " scale3d(".concat(_, ", ").concat(_, ", 1)")), z(g, Ge);
|
|
2082
2083
|
}
|
|
2083
2084
|
}, swipe: function(P) {
|
|
2084
2085
|
if (!B)
|
|
@@ -2902,11 +2903,11 @@ St([
|
|
|
2902
2903
|
Ve = St([
|
|
2903
2904
|
Y("cb-external-link")
|
|
2904
2905
|
], Ve);
|
|
2905
|
-
const $c = '<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>', 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-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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></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 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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', jc = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></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 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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>',
|
|
2906
|
-
var
|
|
2906
|
+
const $c = '<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>', 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-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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></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 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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', jc = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></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 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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>', Hc = '<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.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972M1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.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.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.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.035l.823-1.439Z"/></svg>';
|
|
2907
|
+
var zc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, _t = (a, e, c, i) => {
|
|
2907
2908
|
for (var n = i > 1 ? void 0 : i ? Bc(e, c) : e, f = a.length - 1, l; f >= 0; f--)
|
|
2908
2909
|
(l = a[f]) && (n = (i ? l(e, c, n) : l(n)) || n);
|
|
2909
|
-
return i && n &&
|
|
2910
|
+
return i && n && zc(e, c, n), n;
|
|
2910
2911
|
};
|
|
2911
2912
|
const Bt = {
|
|
2912
2913
|
pdf: Ic,
|
|
@@ -2915,7 +2916,7 @@ const Bt = {
|
|
|
2915
2916
|
csv: Oc,
|
|
2916
2917
|
ppd: jc,
|
|
2917
2918
|
doc: Pc,
|
|
2918
|
-
docx:
|
|
2919
|
+
docx: Hc
|
|
2919
2920
|
};
|
|
2920
2921
|
let qe = class extends Q {
|
|
2921
2922
|
constructor() {
|
|
@@ -4522,15 +4523,15 @@ let $e = class extends Q {
|
|
|
4522
4523
|
() => m`<div style="font-size: 12px; color:#9ca3af">${a.data.userName}</div>`,
|
|
4523
4524
|
() => null
|
|
4524
4525
|
)}
|
|
4525
|
-
${
|
|
4526
|
+
${zt(
|
|
4526
4527
|
this._getMessageText(a).then((c) => m`${c}`)
|
|
4527
4528
|
)}
|
|
4528
|
-
</div>` : a.type === "file" ? m`${
|
|
4529
|
+
</div>` : a.type === "file" ? m`${ze(
|
|
4529
4530
|
a.data.files || [],
|
|
4530
4531
|
(c) => c.id,
|
|
4531
4532
|
(c) => m`<cb-file filename="${c.name}" url="${c.url}"></cb-file>`
|
|
4532
4533
|
)}` : m`<div class="cb-message-text">
|
|
4533
|
-
${
|
|
4534
|
+
${zt(
|
|
4534
4535
|
Vt(((e = a.data.text) == null ? void 0 : e.toString()) || "").then((c) => m`${c}`)
|
|
4535
4536
|
)}
|
|
4536
4537
|
</div>`;
|
|
@@ -4600,7 +4601,7 @@ let le = class extends Q {
|
|
|
4600
4601
|
render() {
|
|
4601
4602
|
return m`
|
|
4602
4603
|
<div class="cb-message-list" part="bot-message-list">
|
|
4603
|
-
${
|
|
4604
|
+
${ze(
|
|
4604
4605
|
this.messages,
|
|
4605
4606
|
(a) => a.id + JSON.stringify(a.data),
|
|
4606
4607
|
(a) => m`<cb-message .message="${a}" exportparts="bot-message"></cb-message>`
|
|
@@ -4613,7 +4614,7 @@ let le = class extends Q {
|
|
|
4613
4614
|
renderForm() {
|
|
4614
4615
|
return this.form ? m` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
|
|
4615
4616
|
<div class="cb-input-form-title">${this.form.title}</div>
|
|
4616
|
-
${
|
|
4617
|
+
${ze(
|
|
4617
4618
|
this.form.fields,
|
|
4618
4619
|
(a, e) => e,
|
|
4619
4620
|
(a) => {
|
|
@@ -4644,7 +4645,7 @@ let le = class extends Q {
|
|
|
4644
4645
|
case "select": {
|
|
4645
4646
|
const i = Array.isArray(a.options) ? a.options : a.options.split(",").map((f) => f.trim()), n = c || i[0];
|
|
4646
4647
|
return m`<sl-select value="${n}" class="cb-input-form-input" id="${"cb-form-field" + a.name}" name="${a.name}" label="${a.title}" ?required="${e}">
|
|
4647
|
-
${
|
|
4648
|
+
${ze(
|
|
4648
4649
|
i,
|
|
4649
4650
|
(f, l) => l,
|
|
4650
4651
|
(f) => m`<sl-option value="${f}">${f}</sl-option>`
|
|
@@ -4695,7 +4696,7 @@ let le = class extends Q {
|
|
|
4695
4696
|
renderActions() {
|
|
4696
4697
|
return !Array.isArray(this.actions) || this.actions.length <= 0 ? null : m`
|
|
4697
4698
|
<div class="cb-actions-list">
|
|
4698
|
-
${
|
|
4699
|
+
${ze(
|
|
4699
4700
|
this.actions,
|
|
4700
4701
|
(a) => a,
|
|
4701
4702
|
(a) => this.renderAction(a)
|
|
@@ -5242,7 +5243,7 @@ const ii = U`
|
|
|
5242
5243
|
grid-column-start: 2;
|
|
5243
5244
|
}
|
|
5244
5245
|
`;
|
|
5245
|
-
var ni = Object.defineProperty, si = Object.getOwnPropertyDescriptor,
|
|
5246
|
+
var ni = Object.defineProperty, si = Object.getOwnPropertyDescriptor, He = (a, e, c, i) => {
|
|
5246
5247
|
for (var n = i > 1 ? void 0 : i ? si(e, c) : e, f = a.length - 1, l; f >= 0; f--)
|
|
5247
5248
|
(l = a[f]) && (n = (i ? l(e, c, n) : l(n)) || n);
|
|
5248
5249
|
return i && n && ni(e, c, n), n;
|
|
@@ -5368,22 +5369,22 @@ let Ce = class extends Q {
|
|
|
5368
5369
|
}
|
|
5369
5370
|
};
|
|
5370
5371
|
Ce.styles = ii;
|
|
5371
|
-
|
|
5372
|
+
He([
|
|
5372
5373
|
C({ type: Boolean })
|
|
5373
5374
|
], Ce.prototype, "open", 2);
|
|
5374
|
-
|
|
5375
|
+
He([
|
|
5375
5376
|
C({ type: Object })
|
|
5376
5377
|
], Ce.prototype, "setting", 2);
|
|
5377
|
-
|
|
5378
|
+
He([
|
|
5378
5379
|
C({ type: Boolean })
|
|
5379
5380
|
], Ce.prototype, "clearMessageDialogOpen", 2);
|
|
5380
|
-
|
|
5381
|
+
He([
|
|
5381
5382
|
De("sl-dialog")
|
|
5382
5383
|
], Ce.prototype, "dialog", 2);
|
|
5383
|
-
|
|
5384
|
+
He([
|
|
5384
5385
|
C({ type: Boolean })
|
|
5385
5386
|
], Ce.prototype, "customRequest", 2);
|
|
5386
|
-
Ce =
|
|
5387
|
+
Ce = He([
|
|
5387
5388
|
Y("cb-setting")
|
|
5388
5389
|
], Ce);
|
|
5389
5390
|
const oi = U`
|
|
@@ -5984,7 +5985,7 @@ async function Pi(a, e) {
|
|
|
5984
5985
|
}).text()
|
|
5985
5986
|
);
|
|
5986
5987
|
}
|
|
5987
|
-
async function
|
|
5988
|
+
async function Hi(a, e) {
|
|
5988
5989
|
const c = new FormData();
|
|
5989
5990
|
for (let n = 0; n < e.length; n++)
|
|
5990
5991
|
c.append("files", e[n]);
|
|
@@ -6001,14 +6002,14 @@ async function zi(a, e) {
|
|
|
6001
6002
|
};
|
|
6002
6003
|
}
|
|
6003
6004
|
}
|
|
6004
|
-
var
|
|
6005
|
+
var zi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, R = (a, e, c, i) => {
|
|
6005
6006
|
for (var n = i > 1 ? void 0 : i ? Bi(e, c) : e, f = a.length - 1, l; f >= 0; f--)
|
|
6006
6007
|
(l = a[f]) && (n = (i ? l(e, c, n) : l(n)) || n);
|
|
6007
|
-
return i && n &&
|
|
6008
|
+
return i && n && zi(e, c, n), n;
|
|
6008
6009
|
};
|
|
6009
6010
|
const je = dt.noConflict();
|
|
6010
6011
|
je.setLevel("info");
|
|
6011
|
-
let
|
|
6012
|
+
let H = class extends Q {
|
|
6012
6013
|
constructor() {
|
|
6013
6014
|
super(...arguments), this.store = new Xt(this, w), 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">
|
|
6014
6015
|
<g clip-path="url(#clip0_830_887)">
|
|
@@ -6165,8 +6166,13 @@ let z = class extends Q {
|
|
|
6165
6166
|
}
|
|
6166
6167
|
}
|
|
6167
6168
|
_addMessageHandler(a) {
|
|
6169
|
+
var c;
|
|
6168
6170
|
console.log("_addMessageHandler called", a);
|
|
6169
6171
|
const e = a.detail;
|
|
6172
|
+
if (!((c = e == null ? void 0 : e.data) != null && c.text) || typeof e.data.text != "string" || e.data.text === "") {
|
|
6173
|
+
console.log("_addMessageHandler: input text is empty, ignored", a);
|
|
6174
|
+
return;
|
|
6175
|
+
}
|
|
6170
6176
|
w.isConversationStart() && (console.log("Start of conversation detected, emitting c7o:bot:conversationStart"), this.emit("c7o:bot:conversationStart", {
|
|
6171
6177
|
detail: e
|
|
6172
6178
|
})), w.sendMessage(e);
|
|
@@ -6195,7 +6201,7 @@ let z = class extends Q {
|
|
|
6195
6201
|
}
|
|
6196
6202
|
};
|
|
6197
6203
|
if (w.addMessage(i), this.uploadFileUrl) {
|
|
6198
|
-
const n = await
|
|
6204
|
+
const n = await Hi(this.uploadFileUrl, e.files);
|
|
6199
6205
|
n.code === 0 && n.data && (i.isUploading = !1, i.data = {
|
|
6200
6206
|
files: n.data
|
|
6201
6207
|
}, w.updateMessage(i));
|
|
@@ -6220,82 +6226,82 @@ let z = class extends Q {
|
|
|
6220
6226
|
(e = this._messageList) == null || e.scrollToBottom();
|
|
6221
6227
|
}
|
|
6222
6228
|
};
|
|
6223
|
-
|
|
6229
|
+
H.styles = za;
|
|
6224
6230
|
R([
|
|
6225
6231
|
C({ type: Boolean, attribute: "display-license" })
|
|
6226
|
-
],
|
|
6232
|
+
], H.prototype, "displayLicense", 2);
|
|
6227
6233
|
R([
|
|
6228
6234
|
C({ type: String, attribute: "name" })
|
|
6229
|
-
],
|
|
6235
|
+
], H.prototype, "name", 2);
|
|
6230
6236
|
R([
|
|
6231
6237
|
C({ type: String, attribute: "org-id" })
|
|
6232
|
-
],
|
|
6238
|
+
], H.prototype, "orgId", 2);
|
|
6233
6239
|
R([
|
|
6234
6240
|
C({ type: String, attribute: "bot-id" })
|
|
6235
|
-
],
|
|
6241
|
+
], H.prototype, "botId", 2);
|
|
6236
6242
|
R([
|
|
6237
6243
|
C({ type: String, attribute: "url" })
|
|
6238
|
-
],
|
|
6244
|
+
], H.prototype, "url", 2);
|
|
6239
6245
|
R([
|
|
6240
6246
|
C({ type: String, attribute: "logo-url" })
|
|
6241
|
-
],
|
|
6247
|
+
], H.prototype, "logoUrl", 2);
|
|
6242
6248
|
R([
|
|
6243
6249
|
C({ type: String, attribute: "logo-svg" })
|
|
6244
|
-
],
|
|
6250
|
+
], H.prototype, "logoSvg", 2);
|
|
6245
6251
|
R([
|
|
6246
6252
|
C({ type: String, attribute: "popup-logo-svg" })
|
|
6247
|
-
],
|
|
6253
|
+
], H.prototype, "popupLogoSvg", 2);
|
|
6248
6254
|
R([
|
|
6249
6255
|
C({ type: String, attribute: "popup-logo-url" })
|
|
6250
|
-
],
|
|
6256
|
+
], H.prototype, "popupLogoUrl", 2);
|
|
6251
6257
|
R([
|
|
6252
6258
|
C({ type: String, attribute: "bot-icon-svg" })
|
|
6253
|
-
],
|
|
6259
|
+
], H.prototype, "botIconSvg", 2);
|
|
6254
6260
|
R([
|
|
6255
6261
|
C({ type: String, attribute: "user-icon-svg" })
|
|
6256
|
-
],
|
|
6262
|
+
], H.prototype, "userIconSvg", 2);
|
|
6257
6263
|
R([
|
|
6258
6264
|
C({ type: String, attribute: "system-icon-svg" })
|
|
6259
|
-
],
|
|
6265
|
+
], H.prototype, "systemIconSvg", 2);
|
|
6260
6266
|
R([
|
|
6261
6267
|
C({ type: String, attribute: "agent-icon-svg" })
|
|
6262
|
-
],
|
|
6268
|
+
], H.prototype, "agentIconSvg", 2);
|
|
6263
6269
|
R([
|
|
6264
6270
|
C({ type: Boolean, attribute: "stream" })
|
|
6265
|
-
],
|
|
6271
|
+
], H.prototype, "stream", 2);
|
|
6266
6272
|
R([
|
|
6267
6273
|
C({ type: Boolean, attribute: "custom-request" })
|
|
6268
|
-
],
|
|
6274
|
+
], H.prototype, "customRequest", 2);
|
|
6269
6275
|
R([
|
|
6270
6276
|
C({ type: Boolean, attribute: "enable-file-upload" })
|
|
6271
|
-
],
|
|
6277
|
+
], H.prototype, "enableFileUpload", 2);
|
|
6272
6278
|
R([
|
|
6273
6279
|
C({ type: String, attribute: "upload-file-url" })
|
|
6274
|
-
],
|
|
6280
|
+
], H.prototype, "uploadFileUrl", 2);
|
|
6275
6281
|
R([
|
|
6276
6282
|
C({ type: Boolean, attribute: "open" })
|
|
6277
|
-
],
|
|
6283
|
+
], H.prototype, "open", 2);
|
|
6278
6284
|
R([
|
|
6279
6285
|
C({ type: Boolean, attribute: "always-open" })
|
|
6280
|
-
],
|
|
6286
|
+
], H.prototype, "alwaysOpen", 2);
|
|
6281
6287
|
R([
|
|
6282
6288
|
C({ type: String, attribute: "prefilled-form-fields" })
|
|
6283
|
-
],
|
|
6289
|
+
], H.prototype, "prefilledFormFields", 2);
|
|
6284
6290
|
R([
|
|
6285
6291
|
C({ type: Boolean })
|
|
6286
|
-
],
|
|
6292
|
+
], H.prototype, "loading", 2);
|
|
6287
6293
|
R([
|
|
6288
6294
|
C({ type: Boolean })
|
|
6289
|
-
],
|
|
6295
|
+
], H.prototype, "showSetting", 2);
|
|
6290
6296
|
R([
|
|
6291
6297
|
C({ type: Boolean })
|
|
6292
|
-
],
|
|
6298
|
+
], H.prototype, "showAuthAlert", 2);
|
|
6293
6299
|
R([
|
|
6294
6300
|
De("cb-message-list")
|
|
6295
|
-
],
|
|
6296
|
-
|
|
6301
|
+
], H.prototype, "_messageList", 2);
|
|
6302
|
+
H = R([
|
|
6297
6303
|
Y("enegelai-bot")
|
|
6298
|
-
],
|
|
6304
|
+
], H);
|
|
6299
6305
|
export {
|
|
6300
|
-
|
|
6306
|
+
H as default
|
|
6301
6307
|
};
|