@enegelai/bot-widget 1.6.3 → 1.7.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/enegelaibot.umd.js +77 -47
- package/dist/index.es.js +277 -237
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var $a = (a, t, c) => t in a ?
|
|
1
|
+
var Ta = Object.defineProperty;
|
|
2
|
+
var $a = (a, t, c) => t in a ? Ta(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
|
|
3
3
|
var oe = (a, t, c) => ($a(a, typeof t != "symbol" ? t + "" : t, c), c);
|
|
4
|
-
import { css as U, LitElement as dt, html as
|
|
5
|
-
import { property as C, customElement as Y, queryAll as Wt, query as
|
|
4
|
+
import { css as U, LitElement as dt, html as m, svg as Be } from "lit";
|
|
5
|
+
import { property as C, customElement as Y, queryAll as Wt, query as De, eventOptions as kt } from "lit/decorators.js";
|
|
6
6
|
import { unsafeHTML as de } from "lit-html/directives/unsafe-html.js";
|
|
7
7
|
import { when as fe } from "lit/directives/when.js";
|
|
8
8
|
import "@shoelace-style/shoelace/dist/themes/light.css";
|
|
@@ -25,7 +25,7 @@ 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
|
|
28
|
+
import { repeat as He } from "lit/directives/repeat.js";
|
|
29
29
|
import { until as Ht } from "lit-html/directives/until.js";
|
|
30
30
|
import Ia from "markdown-it";
|
|
31
31
|
import La from "markdown-it-link-attributes";
|
|
@@ -50,7 +50,7 @@ const rt = class rt extends Event {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
oe(rt, "eventName", "lit-state-changed");
|
|
53
|
-
let
|
|
53
|
+
let Te = rt;
|
|
54
54
|
const ja = (a, t) => t !== a && (t === t || a === a);
|
|
55
55
|
class Ke extends EventTarget {
|
|
56
56
|
constructor() {
|
|
@@ -120,10 +120,10 @@ class Ke extends EventTarget {
|
|
|
120
120
|
const d = (l) => {
|
|
121
121
|
(!i || i.includes(l.key)) && c(l.key, l.value, this);
|
|
122
122
|
};
|
|
123
|
-
return this.addEventListener(
|
|
123
|
+
return this.addEventListener(Te.eventName, d, n), () => this.removeEventListener(Te.eventName, d);
|
|
124
124
|
}
|
|
125
125
|
dispatchStateEvent(c, i, n) {
|
|
126
|
-
this.dispatchEvent(new
|
|
126
|
+
this.dispatchEvent(new Te(c, i, n));
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
// a map holding decorators definition.
|
|
@@ -136,10 +136,10 @@ class Xt {
|
|
|
136
136
|
this.host = t, this.state = c, this.host.addController(this), this.callback = i || (() => this.host.requestUpdate());
|
|
137
137
|
}
|
|
138
138
|
hostConnected() {
|
|
139
|
-
this.state.addEventListener(
|
|
139
|
+
this.state.addEventListener(Te.eventName, this.callback), this.callback();
|
|
140
140
|
}
|
|
141
141
|
hostDisconnected() {
|
|
142
|
-
this.state.removeEventListener(
|
|
142
|
+
this.state.removeEventListener(Te.eventName, this.callback);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
@@ -222,44 +222,44 @@ var Kt = { exports: {} };
|
|
|
222
222
|
"warn",
|
|
223
223
|
"error"
|
|
224
224
|
];
|
|
225
|
-
function d(
|
|
226
|
-
var R =
|
|
225
|
+
function d(A, z) {
|
|
226
|
+
var R = A[z];
|
|
227
227
|
if (typeof R.bind == "function")
|
|
228
|
-
return R.bind(
|
|
228
|
+
return R.bind(A);
|
|
229
229
|
try {
|
|
230
|
-
return Function.prototype.bind.call(R,
|
|
230
|
+
return Function.prototype.bind.call(R, A);
|
|
231
231
|
} catch {
|
|
232
232
|
return function() {
|
|
233
|
-
return Function.prototype.apply.apply(R, [
|
|
233
|
+
return Function.prototype.apply.apply(R, [A, arguments]);
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function l() {
|
|
238
238
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
239
239
|
}
|
|
240
|
-
function v(
|
|
241
|
-
return
|
|
240
|
+
function v(A) {
|
|
241
|
+
return A === "debug" && (A = "log"), typeof console === c ? !1 : A === "trace" && i ? l : console[A] !== void 0 ? d(console, A) : console.log !== void 0 ? d(console, "log") : t;
|
|
242
242
|
}
|
|
243
|
-
function S(
|
|
243
|
+
function S(A, z) {
|
|
244
244
|
for (var R = 0; R < n.length; R++) {
|
|
245
245
|
var $ = n[R];
|
|
246
|
-
this[$] = R <
|
|
246
|
+
this[$] = R < A ? t : this.methodFactory($, A, z);
|
|
247
247
|
}
|
|
248
248
|
this.log = this.debug;
|
|
249
249
|
}
|
|
250
|
-
function D(
|
|
250
|
+
function D(A, z, R) {
|
|
251
251
|
return function() {
|
|
252
|
-
typeof console !== c && (S.call(this, z, R), this[
|
|
252
|
+
typeof console !== c && (S.call(this, z, R), this[A].apply(this, arguments));
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function L(
|
|
256
|
-
return v(
|
|
255
|
+
function L(A, z, R) {
|
|
256
|
+
return v(A) || D.apply(this, arguments);
|
|
257
257
|
}
|
|
258
|
-
function E(
|
|
258
|
+
function E(A, z, R) {
|
|
259
259
|
var $ = this, he;
|
|
260
260
|
z = z ?? "WARN";
|
|
261
261
|
var ee = "loglevel";
|
|
262
|
-
typeof
|
|
262
|
+
typeof A == "string" ? ee += ":" + A : typeof A == "symbol" && (ee = void 0);
|
|
263
263
|
function bt(w) {
|
|
264
264
|
var ie = (n[w] || "silent").toUpperCase();
|
|
265
265
|
if (!(typeof window === c || !ee)) {
|
|
@@ -292,7 +292,7 @@ var Kt = { exports: {} };
|
|
|
292
292
|
return $.levels[w] === void 0 && (w = void 0), w;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Ne() {
|
|
296
296
|
if (!(typeof window === c || !ee)) {
|
|
297
297
|
try {
|
|
298
298
|
window.localStorage.removeItem(ee);
|
|
@@ -305,7 +305,7 @@ var Kt = { exports: {} };
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
$.name =
|
|
308
|
+
$.name = A, $.levels = {
|
|
309
309
|
TRACE: 0,
|
|
310
310
|
DEBUG: 1,
|
|
311
311
|
INFO: 2,
|
|
@@ -316,14 +316,14 @@ var Kt = { exports: {} };
|
|
|
316
316
|
return he;
|
|
317
317
|
}, $.setLevel = function(w, ie) {
|
|
318
318
|
if (typeof w == "string" && $.levels[w.toUpperCase()] !== void 0 && (w = $.levels[w.toUpperCase()]), typeof w == "number" && w >= 0 && w <= $.levels.SILENT) {
|
|
319
|
-
if (he = w, ie !== !1 && bt(w), S.call($, w,
|
|
319
|
+
if (he = w, ie !== !1 && bt(w), S.call($, w, A), typeof console === c && w < $.levels.SILENT)
|
|
320
320
|
return "No console available for logging";
|
|
321
321
|
} else
|
|
322
322
|
throw "log.setLevel() called with invalid level: " + w;
|
|
323
323
|
}, $.setDefaultLevel = function(w) {
|
|
324
324
|
z = w, Ie() || $.setLevel(w, !1);
|
|
325
325
|
}, $.resetLevel = function() {
|
|
326
|
-
$.setLevel(z, !1),
|
|
326
|
+
$.setLevel(z, !1), Ne();
|
|
327
327
|
}, $.enableAll = function(w) {
|
|
328
328
|
$.setLevel($.levels.TRACE, w);
|
|
329
329
|
}, $.disableAll = function(w) {
|
|
@@ -332,23 +332,23 @@ var Kt = { exports: {} };
|
|
|
332
332
|
var Se = Ie();
|
|
333
333
|
Se == null && (Se = z), $.setLevel(Se, !1);
|
|
334
334
|
}
|
|
335
|
-
var
|
|
336
|
-
|
|
335
|
+
var T = new E(), F = {};
|
|
336
|
+
T.getLogger = function(z) {
|
|
337
337
|
if (typeof z != "symbol" && typeof z != "string" || z === "")
|
|
338
338
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
339
339
|
var R = F[z];
|
|
340
340
|
return R || (R = F[z] = new E(
|
|
341
341
|
z,
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
T.getLevel(),
|
|
343
|
+
T.methodFactory
|
|
344
344
|
)), R;
|
|
345
345
|
};
|
|
346
346
|
var ce = typeof window !== c ? window.log : void 0;
|
|
347
|
-
return
|
|
348
|
-
return typeof window !== c && window.log ===
|
|
349
|
-
},
|
|
347
|
+
return T.noConflict = function() {
|
|
348
|
+
return typeof window !== c && window.log === T && (window.log = ce), T;
|
|
349
|
+
}, T.getLoggers = function() {
|
|
350
350
|
return F;
|
|
351
|
-
},
|
|
351
|
+
}, T.default = T, T;
|
|
352
352
|
});
|
|
353
353
|
})(Kt);
|
|
354
354
|
var za = Kt.exports;
|
|
@@ -516,24 +516,24 @@ var Ba = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Ct = (a, t
|
|
|
516
516
|
(l = a[d]) && (n = (i ? l(t, c, n) : l(n)) || n);
|
|
517
517
|
return i && n && Ba(t, c, n), n;
|
|
518
518
|
};
|
|
519
|
-
let
|
|
519
|
+
let qe = class extends dt {
|
|
520
520
|
constructor() {
|
|
521
521
|
super(...arguments), this.color = "primary", this.svg = "";
|
|
522
522
|
}
|
|
523
523
|
render() {
|
|
524
|
-
return
|
|
524
|
+
return m`<span class="cb-icon" part="base">${de(this.svg)}</span>`;
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
|
-
|
|
527
|
+
qe.styles = Qt;
|
|
528
528
|
Ct([
|
|
529
529
|
C({ type: String })
|
|
530
|
-
],
|
|
530
|
+
], qe.prototype, "color", 2);
|
|
531
531
|
Ct([
|
|
532
532
|
C({ type: String })
|
|
533
|
-
],
|
|
534
|
-
|
|
533
|
+
], qe.prototype, "svg", 2);
|
|
534
|
+
qe = Ct([
|
|
535
535
|
Y("cb-icon")
|
|
536
|
-
],
|
|
536
|
+
], qe);
|
|
537
537
|
let Va = (a) => crypto.getRandomValues(new Uint8Array(a)), Ra = (a, t, c) => {
|
|
538
538
|
let i = (2 << Math.log(a.length - 1) / Math.LN2) - 1, n = -~(1.6 * i * t / a.length);
|
|
539
539
|
return (d = t) => {
|
|
@@ -695,7 +695,7 @@ class Wa {
|
|
|
695
695
|
function V(a) {
|
|
696
696
|
return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Ae(a) {
|
|
699
699
|
return function t(c) {
|
|
700
700
|
return arguments.length === 0 || V(c) ? t : a.apply(this, arguments);
|
|
701
701
|
};
|
|
@@ -706,13 +706,13 @@ function ue(a) {
|
|
|
706
706
|
case 0:
|
|
707
707
|
return t;
|
|
708
708
|
case 1:
|
|
709
|
-
return V(c) ? t :
|
|
709
|
+
return V(c) ? t : Ae(function(n) {
|
|
710
710
|
return a(c, n);
|
|
711
711
|
});
|
|
712
712
|
default:
|
|
713
|
-
return V(c) && V(i) ? t : V(c) ?
|
|
713
|
+
return V(c) && V(i) ? t : V(c) ? Ae(function(n) {
|
|
714
714
|
return a(n, i);
|
|
715
|
-
}) : V(i) ?
|
|
715
|
+
}) : V(i) ? Ae(function(n) {
|
|
716
716
|
return a(c, n);
|
|
717
717
|
}) : a(c, i);
|
|
718
718
|
}
|
|
@@ -732,7 +732,7 @@ function Ya(a) {
|
|
|
732
732
|
return a(d, i, l);
|
|
733
733
|
}) : V(i) ? ue(function(d, l) {
|
|
734
734
|
return a(c, d, l);
|
|
735
|
-
}) :
|
|
735
|
+
}) : Ae(function(d) {
|
|
736
736
|
return a(c, i, d);
|
|
737
737
|
});
|
|
738
738
|
default:
|
|
@@ -742,11 +742,11 @@ function Ya(a) {
|
|
|
742
742
|
return a(d, i, l);
|
|
743
743
|
}) : V(i) && V(n) ? ue(function(d, l) {
|
|
744
744
|
return a(c, d, l);
|
|
745
|
-
}) : V(c) ?
|
|
745
|
+
}) : V(c) ? Ae(function(d) {
|
|
746
746
|
return a(d, i, n);
|
|
747
|
-
}) : V(i) ?
|
|
747
|
+
}) : V(i) ? Ae(function(d) {
|
|
748
748
|
return a(c, d, n);
|
|
749
|
-
}) : V(n) ?
|
|
749
|
+
}) : V(n) ? Ae(function(d) {
|
|
750
750
|
return a(c, i, d);
|
|
751
751
|
}) : a(c, i, n);
|
|
752
752
|
}
|
|
@@ -1368,32 +1368,32 @@ let at = class extends Q {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
*/
|
|
1370
1370
|
renderExp() {
|
|
1371
|
-
return
|
|
1371
|
+
return m` <header class="cb-header" part="header">
|
|
1372
1372
|
${fe(
|
|
1373
1373
|
x.setting.logoUrl !== "",
|
|
1374
|
-
() =>
|
|
1375
|
-
() =>
|
|
1374
|
+
() => m`<img class="cb-header-logo" part="header-logo" src="${x.setting.logoUrl}" />`,
|
|
1375
|
+
() => m`<div class="cb-header-logo" part="header-logo">${de(x.setting.logoSvg)}</div>`
|
|
1376
1376
|
)}
|
|
1377
1377
|
<div class="cb-header-title" part="header-title">${this.title}</div>
|
|
1378
1378
|
${fe(
|
|
1379
1379
|
x.alwaysOpen,
|
|
1380
|
-
() =>
|
|
1381
|
-
() =>
|
|
1380
|
+
() => m``,
|
|
1381
|
+
() => m`<div class="cb-header-close" part="header-close">${de(uc)}</div>`
|
|
1382
1382
|
)}
|
|
1383
1383
|
</header>`;
|
|
1384
1384
|
}
|
|
1385
1385
|
render() {
|
|
1386
|
-
return
|
|
1386
|
+
return m` <header class="cb-header" part="header">
|
|
1387
1387
|
${fe(
|
|
1388
1388
|
x.setting.logoUrl !== "",
|
|
1389
|
-
() =>
|
|
1390
|
-
() =>
|
|
1389
|
+
() => m`<img class="cb-header-img" part="header-logo" src="${x.setting.logoUrl}" />`,
|
|
1390
|
+
() => m`<div class="cb-header-logo" part="header-logo">${de(x.setting.logoSvg)}</div>`
|
|
1391
1391
|
)}
|
|
1392
1392
|
<span class="center title" part="header-title">${this.title}</span>
|
|
1393
1393
|
${fe(
|
|
1394
1394
|
x.alwaysOpen,
|
|
1395
|
-
() =>
|
|
1396
|
-
() =>
|
|
1395
|
+
() => m``,
|
|
1396
|
+
() => m`<span class="right">
|
|
1397
1397
|
<sl-button @click=${this._clickCloseHandler} class="cb-setting-button" variant="text" circle part="header-close">
|
|
1398
1398
|
<cb-icon class="cb-header-close" svg="${tt}"></cb-icon>
|
|
1399
1399
|
</sl-button>
|
|
@@ -1444,7 +1444,7 @@ let yt = class extends Q {
|
|
|
1444
1444
|
super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1445
1445
|
}
|
|
1446
1446
|
render() {
|
|
1447
|
-
return
|
|
1447
|
+
return m`
|
|
1448
1448
|
<div class="cb-footer" part="footer">
|
|
1449
1449
|
yugasun@${this.year}
|
|
1450
1450
|
<a
|
|
@@ -1645,7 +1645,7 @@ var ta = { exports: {} };
|
|
|
1645
1645
|
return r;
|
|
1646
1646
|
}
|
|
1647
1647
|
function S(r, e) {
|
|
1648
|
-
if ((te(r) || r === window || r === document) && (r = [r]), Mt(r) || Le(r) || (r = [r]),
|
|
1648
|
+
if ((te(r) || r === window || r === document) && (r = [r]), Mt(r) || Le(r) || (r = [r]), At(r) != 0) {
|
|
1649
1649
|
if (Mt(r) && !Le(r))
|
|
1650
1650
|
for (var o = r.length, s = 0; s < o && e.call(r[s], r[s], s, r) !== !1; s++)
|
|
1651
1651
|
;
|
|
@@ -1658,22 +1658,22 @@ var ta = { exports: {} };
|
|
|
1658
1658
|
}
|
|
1659
1659
|
function D(r) {
|
|
1660
1660
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, s = r[l] = r[l] || [], f = { all: s, evt: null, found: null };
|
|
1661
|
-
return e && o &&
|
|
1661
|
+
return e && o && At(s) > 0 && S(s, function(b, h) {
|
|
1662
1662
|
if (b.eventName == e && b.fn.toString() == o.toString())
|
|
1663
1663
|
return f.found = !0, f.evt = h, !1;
|
|
1664
1664
|
}), f;
|
|
1665
1665
|
}
|
|
1666
1666
|
function L(r) {
|
|
1667
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = e.onElement, s = e.withCallback, f = e.avoidDuplicate, b = f === void 0 || f, h = e.once, u = h !== void 0 && h, p = e.useCapture, k = p !== void 0 && p, g = arguments.length > 2 ? arguments[2] : void 0,
|
|
1667
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = e.onElement, s = e.withCallback, f = e.avoidDuplicate, b = f === void 0 || f, h = e.once, u = h !== void 0 && h, p = e.useCapture, k = p !== void 0 && p, g = arguments.length > 2 ? arguments[2] : void 0, y = o || [];
|
|
1668
1668
|
function M(_) {
|
|
1669
1669
|
w(s) && s.call(g, _, this), u && M.destroy();
|
|
1670
1670
|
}
|
|
1671
|
-
return ie(
|
|
1672
|
-
S(
|
|
1671
|
+
return ie(y) && (y = document.querySelectorAll(y)), M.destroy = function() {
|
|
1672
|
+
S(y, function(_) {
|
|
1673
1673
|
var j = D(_, r, M);
|
|
1674
1674
|
j.found && j.all.splice(j.evt, 1), _.removeEventListener && _.removeEventListener(r, M, k);
|
|
1675
1675
|
});
|
|
1676
|
-
}, S(
|
|
1676
|
+
}, S(y, function(_) {
|
|
1677
1677
|
var j = D(_, r, M);
|
|
1678
1678
|
(_.addEventListener && b && !j.found || !b) && (_.addEventListener(r, M, k), j.all.push({ eventName: r, fn: M }));
|
|
1679
1679
|
}), M;
|
|
@@ -1683,7 +1683,7 @@ var ta = { exports: {} };
|
|
|
1683
1683
|
return r.classList.add(o);
|
|
1684
1684
|
});
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function T(r, e) {
|
|
1687
1687
|
S(e.split(" "), function(o) {
|
|
1688
1688
|
return r.classList.remove(o);
|
|
1689
1689
|
});
|
|
@@ -1699,7 +1699,7 @@ var ta = { exports: {} };
|
|
|
1699
1699
|
return r;
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function A(r) {
|
|
1703
1703
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", o = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
1704
1704
|
if (!r || e === "")
|
|
1705
1705
|
return !1;
|
|
@@ -1710,7 +1710,7 @@ var ta = { exports: {} };
|
|
|
1710
1710
|
E(r, "g" + b);
|
|
1711
1711
|
}), L(s, { onElement: r, avoidDuplicate: !1, once: !0, withCallback: function(b, h) {
|
|
1712
1712
|
S(f, function(u) {
|
|
1713
|
-
|
|
1713
|
+
T(h, "g" + u);
|
|
1714
1714
|
}), w(o) && o();
|
|
1715
1715
|
} });
|
|
1716
1716
|
}
|
|
@@ -1755,7 +1755,7 @@ var ta = { exports: {} };
|
|
|
1755
1755
|
}, s));
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1758
|
+
function Ne(r, e, o) {
|
|
1759
1759
|
if (ne(r))
|
|
1760
1760
|
console.error("Inject assets error");
|
|
1761
1761
|
else if (w(e) && (o = e, e = !1), ie(e) && e in window)
|
|
@@ -1806,14 +1806,14 @@ var ta = { exports: {} };
|
|
|
1806
1806
|
function te(r) {
|
|
1807
1807
|
return !(!r || !r.nodeType || r.nodeType != 1);
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Ue(r) {
|
|
1810
1810
|
return Array.isArray(r);
|
|
1811
1811
|
}
|
|
1812
1812
|
function Mt(r) {
|
|
1813
1813
|
return r && r.length && isFinite(r.length);
|
|
1814
1814
|
}
|
|
1815
1815
|
function Le(r) {
|
|
1816
|
-
return c(r) === "object" && r != null && !w(r) && !
|
|
1816
|
+
return c(r) === "object" && r != null && !w(r) && !Ue(r);
|
|
1817
1817
|
}
|
|
1818
1818
|
function ne(r) {
|
|
1819
1819
|
return r == null;
|
|
@@ -1821,7 +1821,7 @@ var ta = { exports: {} };
|
|
|
1821
1821
|
function N(r, e) {
|
|
1822
1822
|
return r !== null && hasOwnProperty.call(r, e);
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function At(r) {
|
|
1825
1825
|
if (Le(r)) {
|
|
1826
1826
|
if (r.keys)
|
|
1827
1827
|
return r.keys().length;
|
|
@@ -1832,10 +1832,10 @@ var ta = { exports: {} };
|
|
|
1832
1832
|
}
|
|
1833
1833
|
return r.length;
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function We(r) {
|
|
1836
1836
|
return !isNaN(parseFloat(r)) && isFinite(r);
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function Tt() {
|
|
1839
1839
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, e = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
1840
1840
|
if (!e.length)
|
|
1841
1841
|
return !1;
|
|
@@ -1872,21 +1872,21 @@ var ta = { exports: {} };
|
|
|
1872
1872
|
if (!h || h.length <= 0)
|
|
1873
1873
|
return;
|
|
1874
1874
|
if (!f) {
|
|
1875
|
-
var u =
|
|
1875
|
+
var u = Tt();
|
|
1876
1876
|
return void (u && (u.focus(), E(u, "focused")));
|
|
1877
1877
|
}
|
|
1878
|
-
var p =
|
|
1879
|
-
|
|
1878
|
+
var p = Tt(f.getAttribute("data-taborder"));
|
|
1879
|
+
T(f, "focused"), p && (p.focus(), E(p, "focused"));
|
|
1880
1880
|
}
|
|
1881
1881
|
s == 39 && r.nextSlide(), s == 37 && r.prevSlide(), s == 27 && r.close();
|
|
1882
1882
|
} });
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Ye(r) {
|
|
1885
1885
|
return Math.sqrt(r.x * r.x + r.y * r.y);
|
|
1886
1886
|
}
|
|
1887
1887
|
function ba(r, e) {
|
|
1888
1888
|
var o = function(s, f) {
|
|
1889
|
-
var b =
|
|
1889
|
+
var b = Ye(s) * Ye(f);
|
|
1890
1890
|
if (b === 0)
|
|
1891
1891
|
return 0;
|
|
1892
1892
|
var h = function(u, p) {
|
|
@@ -1936,7 +1936,7 @@ var ta = { exports: {} };
|
|
|
1936
1936
|
if (e.touches.length > 1) {
|
|
1937
1937
|
this._cancelLongTap(), this._cancelSingleTap();
|
|
1938
1938
|
var s = { x: e.touches[1].pageX - this.x1, y: e.touches[1].pageY - this.y1 };
|
|
1939
|
-
o.x = s.x, o.y = s.y, this.pinchStartLen =
|
|
1939
|
+
o.x = s.x, o.y = s.y, this.pinchStartLen = Ye(o), this.multipointStart.dispatch(e, this.element);
|
|
1940
1940
|
}
|
|
1941
1941
|
this._preventTap = !1, this.longTapTimeout = setTimeout((function() {
|
|
1942
1942
|
this.longTap.dispatch(e, this.element), this._preventTap = !0;
|
|
@@ -1947,7 +1947,7 @@ var ta = { exports: {} };
|
|
|
1947
1947
|
var o = this.preV, s = e.touches.length, f = e.touches[0].pageX, b = e.touches[0].pageY;
|
|
1948
1948
|
if (this.isDoubleTap = !1, s > 1) {
|
|
1949
1949
|
var h = e.touches[1].pageX, u = e.touches[1].pageY, p = { x: e.touches[1].pageX - f, y: e.touches[1].pageY - b };
|
|
1950
|
-
o.x !== null && (this.pinchStartLen > 0 && (e.zoom =
|
|
1950
|
+
o.x !== null && (this.pinchStartLen > 0 && (e.zoom = Ye(p) / this.pinchStartLen, this.pinch.dispatch(e, this.element)), e.angle = ba(p, o), this.rotate.dispatch(e, this.element)), o.x = p.x, o.y = p.y, this.x2 !== null && this.sx2 !== null ? (e.deltaX = (f - this.x2 + h - this.sx2) / 2, e.deltaY = (b - this.y2 + u - this.sy2) / 2) : (e.deltaX = 0, e.deltaY = 0), this.twoFingerPressMove.dispatch(e, this.element), this.sx2 = h, this.sy2 = u;
|
|
1951
1951
|
} else {
|
|
1952
1952
|
if (this.x2 !== null) {
|
|
1953
1953
|
e.deltaX = f - this.x2, e.deltaY = b - this.y2;
|
|
@@ -1997,15 +1997,15 @@ var ta = { exports: {} };
|
|
|
1997
1997
|
return p[h];
|
|
1998
1998
|
}(), o = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, s = F(r, "gslide-media") ? r : r.querySelector(".gslide-media"), f = ce(s, ".ginner-container"), b = r.querySelector(".gslide-description");
|
|
1999
1999
|
o > 769 && (s = f), E(s, "greset"), z(s, "translate3d(0, 0, 0)"), L(e, { onElement: s, once: !0, withCallback: function(h, u) {
|
|
2000
|
-
|
|
2000
|
+
T(s, "greset");
|
|
2001
2001
|
} }), s.style.opacity = "", b && (b.style.opacity = "");
|
|
2002
2002
|
}
|
|
2003
2003
|
function pa(r) {
|
|
2004
2004
|
if (r.events.hasOwnProperty("touch"))
|
|
2005
2005
|
return !1;
|
|
2006
|
-
var e, o, s, f = ee(), b = f.width, h = f.height, u = !1, p = null, k = null, g = null,
|
|
2006
|
+
var e, o, s, f = ee(), b = f.width, h = f.height, u = !1, p = null, k = null, g = null, y = !1, M = 1, _ = 1, j = !1, H = !1, I = null, re = null, ae = null, we = null, xe = 0, _e = 0, je = !1, ut = !1, Ee = {}, Me = {}, Pt = 0, zt = 0, Sa = document.getElementById("glightbox-slider"), Ze = document.querySelector(".goverlay"), _a = new ua(Sa, { touchStart: function(O) {
|
|
2007
2007
|
if (u = !0, (F(O.targetTouches[0].target, "ginner-container") || ce(O.targetTouches[0].target, ".gslide-desc") || O.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), ce(O.targetTouches[0].target, ".gslide-inline") && !F(O.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
|
|
2008
|
-
if (Me = O.targetTouches[0], Ee.pageX = O.targetTouches[0].pageX, Ee.pageY = O.targetTouches[0].pageY, Pt = O.targetTouches[0].clientX, zt = O.targetTouches[0].clientY, p = r.activeSlide, k = p.querySelector(".gslide-media"), s = 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")),
|
|
2008
|
+
if (Me = O.targetTouches[0], Ee.pageX = O.targetTouches[0].pageX, Ee.pageY = O.targetTouches[0].pageY, Pt = O.targetTouches[0].clientX, zt = O.targetTouches[0].clientY, p = r.activeSlide, k = p.querySelector(".gslide-media"), s = 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")), T(Ze, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
|
|
2009
2009
|
return;
|
|
2010
2010
|
O.preventDefault();
|
|
2011
2011
|
}
|
|
@@ -2016,19 +2016,19 @@ var ta = { exports: {} };
|
|
|
2016
2016
|
if (Math.abs(K) <= 13)
|
|
2017
2017
|
return !1;
|
|
2018
2018
|
}
|
|
2019
|
-
|
|
2020
|
-
var ke,
|
|
2021
|
-
if (Math.abs(Ma) > Math.abs(
|
|
2019
|
+
y = !0;
|
|
2020
|
+
var ke, Ge = O.targetTouches[0].clientX, Ea = O.targetTouches[0].clientY, Ma = Pt - Ge, Aa = zt - Ea;
|
|
2021
|
+
if (Math.abs(Ma) > Math.abs(Aa) ? (je = !1, ut = !0) : (ut = !1, je = !0), e = Me.pageX - Ee.pageX, xe = 100 * e / b, o = Me.pageY - Ee.pageY, _e = 100 * o / h, je && g && (ke = 1 - Math.abs(o) / h, Ze.style.opacity = ke, r.settings.touchFollowAxis && (xe = 0)), ut && (ke = 1 - Math.abs(e) / b, k.style.opacity = ke, r.settings.touchFollowAxis && (_e = 0)), !g)
|
|
2022
2022
|
return z(k, "translate3d(".concat(xe, "%, 0, 0)"));
|
|
2023
2023
|
z(k, "translate3d(".concat(xe, "%, ").concat(_e, "%, 0)"));
|
|
2024
2024
|
}
|
|
2025
2025
|
}, touchEnd: function() {
|
|
2026
2026
|
if (u) {
|
|
2027
|
-
if (
|
|
2027
|
+
if (y = !1, H || j)
|
|
2028
2028
|
return ae = I, void (we = re);
|
|
2029
2029
|
var O = Math.abs(parseInt(_e)), K = Math.abs(parseInt(xe));
|
|
2030
2030
|
if (!(O > 29 && g))
|
|
2031
|
-
return O < 29 && K < 25 ? (E(
|
|
2031
|
+
return O < 29 && K < 25 ? (E(Ze, "greset"), Ze.style.opacity = 1, ht(k)) : void 0;
|
|
2032
2032
|
r.close();
|
|
2033
2033
|
}
|
|
2034
2034
|
}, multipointEnd: function() {
|
|
@@ -2038,7 +2038,7 @@ var ta = { exports: {} };
|
|
|
2038
2038
|
}, multipointStart: function() {
|
|
2039
2039
|
j = !0, M = _ || 1;
|
|
2040
2040
|
}, pinch: function(O) {
|
|
2041
|
-
if (!g ||
|
|
2041
|
+
if (!g || y)
|
|
2042
2042
|
return !1;
|
|
2043
2043
|
j = !0, g.scaleX = g.scaleY = M * O.zoom;
|
|
2044
2044
|
var K = M * O.zoom;
|
|
@@ -2049,8 +2049,8 @@ var ta = { exports: {} };
|
|
|
2049
2049
|
if (H && !j) {
|
|
2050
2050
|
var K = Me.pageX - Ee.pageX, ke = Me.pageY - Ee.pageY;
|
|
2051
2051
|
ae && (K += ae), we && (ke += we), I = K, re = ke;
|
|
2052
|
-
var
|
|
2053
|
-
_ && (
|
|
2052
|
+
var Ge = "translate3d(".concat(K, "px, ").concat(ke, "px, 0)");
|
|
2053
|
+
_ && (Ge += " scale3d(".concat(_, ", ").concat(_, ", 1)")), z(g, Ge);
|
|
2054
2054
|
}
|
|
2055
2055
|
}, swipe: function(O) {
|
|
2056
2056
|
if (!H)
|
|
@@ -2121,8 +2121,8 @@ var ta = { exports: {} };
|
|
|
2121
2121
|
function r() {
|
|
2122
2122
|
var e = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2123
2123
|
i(this, r);
|
|
2124
|
-
var s = o.dragEl, f = o.toleranceX, b = f === void 0 ? 40 : f, h = o.toleranceY, u = h === void 0 ? 65 : h, p = o.slide, k = p === void 0 ? null : p, g = o.instance,
|
|
2125
|
-
this.el = s, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = b, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = k, this.instance =
|
|
2124
|
+
var s = o.dragEl, f = o.toleranceX, b = f === void 0 ? 40 : f, h = o.toleranceY, u = h === void 0 ? 65 : h, p = o.slide, k = p === void 0 ? null : p, g = o.instance, y = g === void 0 ? null : g;
|
|
2125
|
+
this.el = s, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = b, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = k, this.instance = y, this.el.addEventListener("mousedown", function(M) {
|
|
2126
2126
|
return e.dragStart(M);
|
|
2127
2127
|
}, !1), this.el.addEventListener("mouseup", function(M) {
|
|
2128
2128
|
return e.dragEnd(M);
|
|
@@ -2184,16 +2184,16 @@ var ta = { exports: {} };
|
|
|
2184
2184
|
var f = this, b = r.querySelector(".ginner-container"), h = "gvideo" + o, u = r.querySelector(".gslide-media"), p = this.getAllPlayers();
|
|
2185
2185
|
E(b, "gvideo-container"), u.insertBefore(he('<div class="gvideo-wrapper"></div>'), u.firstChild);
|
|
2186
2186
|
var k = r.querySelector(".gvideo-wrapper");
|
|
2187
|
-
|
|
2188
|
-
var g = e.href,
|
|
2189
|
-
u.style.maxWidth = e.width,
|
|
2190
|
-
if (!
|
|
2191
|
-
|
|
2187
|
+
Ne(this.settings.plyr.css, "Plyr");
|
|
2188
|
+
var g = e.href, y = e == null ? void 0 : e.videoProvider, M = !1;
|
|
2189
|
+
u.style.maxWidth = e.width, Ne(this.settings.plyr.js, "Plyr", function() {
|
|
2190
|
+
if (!y && g.match(/vimeo\.com\/([0-9]*)/) && (y = "vimeo"), !y && (g.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || g.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || g.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)) && (y = "youtube"), y === "local" || !y) {
|
|
2191
|
+
y = "local";
|
|
2192
2192
|
var _ = '<video id="' + h + '" ';
|
|
2193
2193
|
_ += 'style="background:#000; max-width: '.concat(e.width, ';" '), _ += 'preload="metadata" ', _ += 'x-webkit-airplay="allow" ', _ += "playsinline ", _ += "controls ", _ += 'class="gvideo-local">', _ += '<source src="'.concat(g, '">'), M = he(_ += "</video>");
|
|
2194
2194
|
}
|
|
2195
|
-
var j = M || he('<div id="'.concat(h, '" data-plyr-provider="').concat(
|
|
2196
|
-
E(k, "".concat(
|
|
2195
|
+
var j = M || he('<div id="'.concat(h, '" data-plyr-provider="').concat(y, '" data-plyr-embed-id="').concat(g, '"></div>'));
|
|
2196
|
+
E(k, "".concat(y, "-video gvideo")), k.appendChild(j), k.setAttribute("data-id", h), k.setAttribute("data-index", o);
|
|
2197
2197
|
var H = N(f.settings.plyr, "config") ? f.settings.plyr.config : {}, I = new Plyr("#" + h, H);
|
|
2198
2198
|
I.on("ready", function(re) {
|
|
2199
2199
|
p[h] = re.detail.plyr, w(s) && s();
|
|
@@ -2206,7 +2206,7 @@ var ta = { exports: {} };
|
|
|
2206
2206
|
}
|
|
2207
2207
|
function It(r) {
|
|
2208
2208
|
var e = ce(r.target, ".gslide-media");
|
|
2209
|
-
r.type === "enterfullscreen" && E(e, "fullscreen"), r.type === "exitfullscreen" &&
|
|
2209
|
+
r.type === "enterfullscreen" && E(e, "fullscreen"), r.type === "exitfullscreen" && T(e, "fullscreen");
|
|
2210
2210
|
}
|
|
2211
2211
|
function va(r, e, o, s) {
|
|
2212
2212
|
var f, b = this, h = r.querySelector(".gslide-media"), u = !(!N(e, "href") || !e.href) && e.href.split("#").pop().trim(), p = !(!N(e, "content") || !e.content) && e.content;
|
|
@@ -2219,8 +2219,8 @@ var ta = { exports: {} };
|
|
|
2219
2219
|
var g = document.getElementById(u);
|
|
2220
2220
|
if (!g)
|
|
2221
2221
|
return !1;
|
|
2222
|
-
var
|
|
2223
|
-
|
|
2222
|
+
var y = g.cloneNode(!0);
|
|
2223
|
+
y.style.height = e.height, y.style.maxWidth = e.width, E(y, "ginlined-content"), f = y;
|
|
2224
2224
|
}
|
|
2225
2225
|
if (!f)
|
|
2226
2226
|
return console.error("Unable to append inline slide content", e), !1;
|
|
@@ -2230,10 +2230,10 @@ var ta = { exports: {} };
|
|
|
2230
2230
|
}
|
|
2231
2231
|
function wa(r, e, o, s) {
|
|
2232
2232
|
var f = r.querySelector(".gslide-media"), b = function(h) {
|
|
2233
|
-
var u = h.url, p = h.allow, k = h.callback, g = h.appendTo,
|
|
2234
|
-
return
|
|
2235
|
-
|
|
2236
|
-
}, g && g.appendChild(
|
|
2233
|
+
var u = h.url, p = h.allow, k = h.callback, g = h.appendTo, y = document.createElement("iframe");
|
|
2234
|
+
return y.className = "vimeo-video gvideo", y.src = u, y.style.width = "100%", y.style.height = "100%", p && y.setAttribute("allow", p), y.onload = function() {
|
|
2235
|
+
y.onload = null, E(y, "node-ready"), w(k) && k();
|
|
2236
|
+
}, g && g.appendChild(y), y;
|
|
2237
2237
|
}({ url: e.href, callback: s });
|
|
2238
2238
|
f.parentNode.style.maxWidth = e.width, f.parentNode.style.height = e.height, f.appendChild(b);
|
|
2239
2239
|
}
|
|
@@ -2267,11 +2267,11 @@ var ta = { exports: {} };
|
|
|
2267
2267
|
ne(g) || g === "" || (f.title = g);
|
|
2268
2268
|
}
|
|
2269
2269
|
} else {
|
|
2270
|
-
var
|
|
2270
|
+
var y = [];
|
|
2271
2271
|
S(f, function(j, H) {
|
|
2272
|
-
|
|
2273
|
-
}),
|
|
2274
|
-
var I = u, re = new RegExp("s?" + H + "s?:s?(.*?)(" +
|
|
2272
|
+
y.push(";\\s?" + H);
|
|
2273
|
+
}), y = y.join("\\s?:|"), u.trim() !== "" && S(f, function(j, H) {
|
|
2274
|
+
var I = u, re = new RegExp("s?" + H + "s?:s?(.*?)(" + y + "s?:|$)"), ae = I.match(re);
|
|
2275
2275
|
if (ae && ae.length && ae[1]) {
|
|
2276
2276
|
var we = ae[1].trim().replace(/;\s*$/, "");
|
|
2277
2277
|
f[H] = s.sanitizeValue(we);
|
|
@@ -2297,11 +2297,11 @@ var ta = { exports: {} };
|
|
|
2297
2297
|
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, f = e.type == "video" ? this.checkSize(o.videosWidth) : this.checkSize(o.width), b = this.checkSize(o.height);
|
|
2298
2298
|
return e.width = N(e, "width") && e.width !== "" ? this.checkSize(e.width) : f, e.height = N(e, "height") && e.height !== "" ? this.checkSize(e.height) : b, s && e.type == "image" && (e._hasCustomWidth = !!s.dataset.width, e._hasCustomHeight = !!s.dataset.height), e;
|
|
2299
2299
|
} }, { key: "checkSize", value: function(e) {
|
|
2300
|
-
return
|
|
2300
|
+
return We(e) ? "".concat(e, "px") : e;
|
|
2301
2301
|
} }, { key: "sanitizeValue", value: function(e) {
|
|
2302
2302
|
return e !== "true" && e !== "false" ? e : e === "true";
|
|
2303
2303
|
} }]), r;
|
|
2304
|
-
}(),
|
|
2304
|
+
}(), Xe = function() {
|
|
2305
2305
|
function r(e, o, s) {
|
|
2306
2306
|
i(this, r), this.element = e, this.instance = o, this.index = s;
|
|
2307
2307
|
}
|
|
@@ -2311,10 +2311,10 @@ var ta = { exports: {} };
|
|
|
2311
2311
|
return !1;
|
|
2312
2312
|
var f = this.instance.settings, b = this.slideConfig, h = Se();
|
|
2313
2313
|
w(f.beforeSlideLoad) && f.beforeSlideLoad({ index: this.index, slide: o, player: !1 });
|
|
2314
|
-
var u = b.type, p = b.descPosition, k = o.querySelector(".gslide-media"), g = o.querySelector(".gslide-title"),
|
|
2314
|
+
var u = b.type, p = b.descPosition, k = o.querySelector(".gslide-media"), g = o.querySelector(".gslide-title"), y = o.querySelector(".gslide-desc"), M = o.querySelector(".gdesc-inner"), _ = s, j = "gSlideTitle_" + this.index, H = "gSlideDesc_" + this.index;
|
|
2315
2315
|
if (w(f.afterSlideLoad) && (_ = function() {
|
|
2316
2316
|
w(s) && s(), f.afterSlideLoad({ index: e.index, slide: o, player: e.instance.getSlidePlayerInstance(e.index) });
|
|
2317
|
-
}), b.title == "" && b.description == "" ? M && M.parentNode.parentNode.removeChild(M.parentNode) : (g && b.title !== "" ? (g.id = j, g.innerHTML = b.title) : g.parentNode.removeChild(g),
|
|
2317
|
+
}), b.title == "" && b.description == "" ? M && M.parentNode.parentNode.removeChild(M.parentNode) : (g && b.title !== "" ? (g.id = j, g.innerHTML = b.title) : g.parentNode.removeChild(g), y && b.description !== "" ? (y.id = H, h && f.moreLength > 0 ? (b.smallDescription = this.slideShortDesc(b.description, f.moreLength, f.moreText), y.innerHTML = b.smallDescription, this.descriptionEvents(y, b)) : y.innerHTML = b.description) : y.parentNode.removeChild(y), E(k.parentNode, "desc-".concat(p)), E(M.parentNode, "description-".concat(p))), E(k, "gslide-".concat(u)), E(o, "loaded"), u !== "video") {
|
|
2318
2318
|
if (u !== "external")
|
|
2319
2319
|
return u === "inline" ? (va.apply(this.instance, [o, b, this.index, _]), void (b.draggable && new $t({ dragEl: o.querySelector(".gslide-inline"), toleranceX: f.dragToleranceX, toleranceY: f.dragToleranceY, slide: o, instance: this.instance }))) : void (u !== "image" ? w(_) && _() : ma(o, b, this.index, function() {
|
|
2320
2320
|
var I = o.querySelector("img");
|
|
@@ -2343,9 +2343,9 @@ var ta = { exports: {} };
|
|
|
2343
2343
|
if (!p)
|
|
2344
2344
|
return !1;
|
|
2345
2345
|
p.innerHTML = o.description, E(u, "gdesc-open");
|
|
2346
|
-
var k = L("click", { onElement: [u, ce(p, ".gslide-description")], withCallback: function(g,
|
|
2347
|
-
g.target.nodeName.toLowerCase() !== "a" && (
|
|
2348
|
-
|
|
2346
|
+
var k = L("click", { onElement: [u, ce(p, ".gslide-description")], withCallback: function(g, y) {
|
|
2347
|
+
g.target.nodeName.toLowerCase() !== "a" && (T(u, "gdesc-open"), E(u, "gdesc-closed"), p.innerHTML = o.smallDescription, s.descriptionEvents(p, o), setTimeout(function() {
|
|
2348
|
+
T(u, "gdesc-closed");
|
|
2349
2349
|
}, 400), k.destroy());
|
|
2350
2350
|
} });
|
|
2351
2351
|
} });
|
|
@@ -2393,18 +2393,18 @@ var ta = { exports: {} };
|
|
|
2393
2393
|
if (this.elements.length === 0)
|
|
2394
2394
|
return !1;
|
|
2395
2395
|
this.activeSlide = null, this.prevActiveSlideIndex = null, this.prevActiveSlide = null;
|
|
2396
|
-
var s =
|
|
2396
|
+
var s = We(o) ? o : this.settings.startAt;
|
|
2397
2397
|
if (te(e)) {
|
|
2398
2398
|
var f = e.getAttribute("data-gallery");
|
|
2399
2399
|
f && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, f)), ne(s) && (s = this.getElementIndex(e)) < 0 && (s = 0);
|
|
2400
2400
|
}
|
|
2401
|
-
|
|
2401
|
+
We(s) || (s = 0), this.build(), A(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
|
|
2402
2402
|
var b = document.body, h = window.innerWidth - document.documentElement.clientWidth;
|
|
2403
2403
|
if (h > 0) {
|
|
2404
2404
|
var u = document.createElement("style");
|
|
2405
2405
|
u.type = "text/css", u.className = "gcss-styles", u.innerText = ".gscrollbar-fixer {margin-right: ".concat(h, "px}"), document.head.appendChild(u), E(b, "gscrollbar-fixer");
|
|
2406
2406
|
}
|
|
2407
|
-
E(b, "glightbox-open"), E(Ot, "glightbox-open"), Lt && (E(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (E(this.prevButton, "glightbox-button-hidden"), E(this.nextButton, "glightbox-button-hidden")) : (
|
|
2407
|
+
E(b, "glightbox-open"), E(Ot, "glightbox-open"), Lt && (E(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (E(this.prevButton, "glightbox-button-hidden"), E(this.nextButton, "glightbox-button-hidden")) : (T(this.prevButton, "glightbox-button-hidden"), T(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), w(this.settings.onOpen) && this.settings.onOpen(), jt && this.settings.touchNavigation && pa(this), this.settings.keyboardNavigation && la(this);
|
|
2408
2408
|
} }, { key: "openAt", value: function() {
|
|
2409
2409
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
2410
2410
|
this.open(null, e);
|
|
@@ -2412,7 +2412,7 @@ var ta = { exports: {} };
|
|
|
2412
2412
|
var e = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, s = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
2413
2413
|
R(this.loader), this.index = parseInt(o);
|
|
2414
2414
|
var f = this.slidesContainer.querySelector(".current");
|
|
2415
|
-
f &&
|
|
2415
|
+
f && T(f, "current"), this.slideAnimateOut();
|
|
2416
2416
|
var b = this.slidesContainer.querySelectorAll(".gslide")[o];
|
|
2417
2417
|
if (F(b, "loaded"))
|
|
2418
2418
|
this.slideAnimateIn(b, s), $(this.loader);
|
|
@@ -2451,7 +2451,7 @@ var ta = { exports: {} };
|
|
|
2451
2451
|
} }, { key: "insertSlide", value: function() {
|
|
2452
2452
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
|
|
2453
2453
|
o < 0 && (o = this.elements.length);
|
|
2454
|
-
var s = new
|
|
2454
|
+
var s = new Xe(e, this, o), f = s.getConfig(), b = v({}, f), h = s.create(), u = this.elements.length - 1;
|
|
2455
2455
|
b.index = o, b.node = !1, b.instance = s, b.slideConfig = f, this.elements.splice(o, 0, b);
|
|
2456
2456
|
var p = null, k = null;
|
|
2457
2457
|
if (this.slidesContainer) {
|
|
@@ -2472,13 +2472,13 @@ var ta = { exports: {} };
|
|
|
2472
2472
|
o && (this.getActiveSlideIndex() == e && (e == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), o.parentNode.removeChild(o)), this.elements.splice(e, 1), this.trigger("slide_removed", e), w(this.settings.slideRemoved) && this.settings.slideRemoved(e);
|
|
2473
2473
|
} }, { key: "slideAnimateIn", value: function(e, o) {
|
|
2474
2474
|
var s = this, f = e.querySelector(".gslide-media"), b = e.querySelector(".gslide-description"), h = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, u = { 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) };
|
|
2475
|
-
if (f.offsetWidth > 0 && b && ($(b), b.style.display = ""),
|
|
2476
|
-
|
|
2475
|
+
if (f.offsetWidth > 0 && b && ($(b), b.style.display = ""), T(e, this.effectsClasses), o)
|
|
2476
|
+
A(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
|
|
2477
2477
|
s.settings.autoplayVideos && s.slidePlayerPlay(e), s.trigger("slide_changed", { prev: h, current: u }), w(s.settings.afterSlideChange) && s.settings.afterSlideChange.apply(s, [h, u]);
|
|
2478
2478
|
});
|
|
2479
2479
|
else {
|
|
2480
2480
|
var p = this.settings.slideEffect, k = p !== "none" ? this.settings.cssEfects[p].in : p;
|
|
2481
|
-
this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (k = this.settings.cssEfects.slideBack.in),
|
|
2481
|
+
this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (k = this.settings.cssEfects.slideBack.in), A(e, k, function() {
|
|
2482
2482
|
s.settings.autoplayVideos && s.slidePlayerPlay(e), s.trigger("slide_changed", { prev: h, current: u }), w(s.settings.afterSlideChange) && s.settings.afterSlideChange.apply(s, [h, u]);
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
@@ -2489,11 +2489,11 @@ var ta = { exports: {} };
|
|
|
2489
2489
|
if (!this.prevActiveSlide)
|
|
2490
2490
|
return !1;
|
|
2491
2491
|
var e = this.prevActiveSlide;
|
|
2492
|
-
|
|
2492
|
+
T(e, this.effectsClasses), E(e, "prev");
|
|
2493
2493
|
var o = this.settings.slideEffect, s = o !== "none" ? this.settings.cssEfects[o].out : o;
|
|
2494
|
-
this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(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) } }), w(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" && (s = this.settings.cssEfects.slideBack.out),
|
|
2494
|
+
this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(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) } }), w(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" && (s = this.settings.cssEfects.slideBack.out), A(e, s, function() {
|
|
2495
2495
|
var f = e.querySelector(".ginner-container"), b = e.querySelector(".gslide-media"), h = e.querySelector(".gslide-description");
|
|
2496
|
-
f.style.transform = "", b.style.transform = "",
|
|
2496
|
+
f.style.transform = "", b.style.transform = "", T(b, "greset"), b.style.opacity = "", h && (h.style.opacity = ""), T(e, "prev");
|
|
2497
2497
|
});
|
|
2498
2498
|
} }, { key: "getAllPlayers", value: function() {
|
|
2499
2499
|
return this.videoPlayers;
|
|
@@ -2538,7 +2538,7 @@ var ta = { exports: {} };
|
|
|
2538
2538
|
this.settings.elements = !1;
|
|
2539
2539
|
var s = [];
|
|
2540
2540
|
e && e.length && S(e, function(f, b) {
|
|
2541
|
-
var h = new
|
|
2541
|
+
var h = new Xe(f, o, b), u = h.getConfig(), p = v({}, u);
|
|
2542
2542
|
p.slideConfig = u, p.instance = h, p.index = b, s.push(p);
|
|
2543
2543
|
}), this.elements = s, this.lightboxOpen && (this.slidesContainer.innerHTML = "", this.elements.length && (S(this.elements, function() {
|
|
2544
2544
|
var f = he(o.settings.slideHTML);
|
|
@@ -2552,13 +2552,13 @@ var ta = { exports: {} };
|
|
|
2552
2552
|
}), o;
|
|
2553
2553
|
} }, { key: "getElements", value: function() {
|
|
2554
2554
|
var e = this, o = [];
|
|
2555
|
-
this.elements = this.elements ? this.elements : [], !ne(this.settings.elements) &&
|
|
2556
|
-
var h = new
|
|
2555
|
+
this.elements = this.elements ? this.elements : [], !ne(this.settings.elements) && Ue(this.settings.elements) && this.settings.elements.length && S(this.settings.elements, function(f, b) {
|
|
2556
|
+
var h = new Xe(f, e, b), u = h.getConfig(), p = v({}, u);
|
|
2557
2557
|
p.node = !1, p.index = b, p.instance = h, p.slideConfig = u, o.push(p);
|
|
2558
2558
|
});
|
|
2559
2559
|
var s = !1;
|
|
2560
2560
|
return this.getSelector() && (s = document.querySelectorAll(this.getSelector())), s && S(s, function(f, b) {
|
|
2561
|
-
var h = new
|
|
2561
|
+
var h = new Xe(f, e, b), u = h.getConfig(), p = v({}, u);
|
|
2562
2562
|
p.node = f, p.index = b, p.instance = h, p.slideConfig = u, p.gallery = f.getAttribute("data-gallery"), o.push(p);
|
|
2563
2563
|
}), o;
|
|
2564
2564
|
} }, { key: "getGalleryElements", value: function(e, o) {
|
|
@@ -2592,16 +2592,16 @@ var ta = { exports: {} };
|
|
|
2592
2592
|
var p = document.getElementById("glightbox-body");
|
|
2593
2593
|
this.modal = p;
|
|
2594
2594
|
var k = p.querySelector(".gclose");
|
|
2595
|
-
this.prevButton = p.querySelector(".gprev"), this.nextButton = p.querySelector(".gnext"), this.overlay = p.querySelector(".goverlay"), this.loader = p.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = s, this.events = {}, E(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && k && (this.events.close = L("click", { onElement: k, withCallback: function(g,
|
|
2595
|
+
this.prevButton = p.querySelector(".gprev"), this.nextButton = p.querySelector(".gnext"), this.overlay = p.querySelector(".goverlay"), this.loader = p.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = s, this.events = {}, E(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && k && (this.events.close = L("click", { onElement: k, withCallback: function(g, y) {
|
|
2596
2596
|
g.preventDefault(), e.close();
|
|
2597
|
-
} })), k && !this.settings.closeButton && k.parentNode.removeChild(k), this.nextButton && (this.events.next = L("click", { onElement: this.nextButton, withCallback: function(g,
|
|
2597
|
+
} })), k && !this.settings.closeButton && k.parentNode.removeChild(k), this.nextButton && (this.events.next = L("click", { onElement: this.nextButton, withCallback: function(g, y) {
|
|
2598
2598
|
g.preventDefault(), e.nextSlide();
|
|
2599
|
-
} })), this.prevButton && (this.events.prev = L("click", { onElement: this.prevButton, withCallback: function(g,
|
|
2599
|
+
} })), this.prevButton && (this.events.prev = L("click", { onElement: this.prevButton, withCallback: function(g, y) {
|
|
2600
2600
|
g.preventDefault(), e.prevSlide();
|
|
2601
|
-
} })), this.settings.closeOnOutsideClick && (this.events.outClose = L("click", { onElement: p, withCallback: function(g,
|
|
2601
|
+
} })), this.settings.closeOnOutsideClick && (this.events.outClose = L("click", { onElement: p, withCallback: function(g, y) {
|
|
2602
2602
|
e.preventOutsideClick || F(document.body, "glightbox-mobile") || ce(g.target, ".ginner-container") || ce(g.target, ".gbtn") || F(g.target, "gnext") || F(g.target, "gprev") || e.close();
|
|
2603
|
-
} })), S(this.elements, function(g,
|
|
2604
|
-
e.slidesContainer.appendChild(g.instance.create()), g.slideNode = e.slidesContainer.querySelectorAll(".gslide")[
|
|
2603
|
+
} })), S(this.elements, function(g, y) {
|
|
2604
|
+
e.slidesContainer.appendChild(g.instance.create()), g.slideNode = e.slidesContainer.querySelectorAll(".gslide")[y];
|
|
2605
2605
|
}), jt && E(document.body, "glightbox-touch"), this.events.resize = L("resize", { onElement: window, withCallback: function() {
|
|
2606
2606
|
e.resize();
|
|
2607
2607
|
} }), this.built = !0;
|
|
@@ -2609,7 +2609,7 @@ var ta = { exports: {} };
|
|
|
2609
2609
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2610
2610
|
if ((e = e || this.activeSlide) && !F(e, "zoomed")) {
|
|
2611
2611
|
var o = ee(), s = e.querySelector(".gvideo-wrapper"), f = e.querySelector(".gslide-image"), b = this.slideDescription, h = o.width, u = o.height;
|
|
2612
|
-
if (h <= 768 ? E(document.body, "glightbox-mobile") :
|
|
2612
|
+
if (h <= 768 ? E(document.body, "glightbox-mobile") : T(document.body, "glightbox-mobile"), s || f) {
|
|
2613
2613
|
var p = !1;
|
|
2614
2614
|
if (b && (F(b, "description-bottom") || F(b, "description-top")) && !F(b, "gabsolute") && (p = !0), f) {
|
|
2615
2615
|
if (h <= 768)
|
|
@@ -2620,12 +2620,12 @@ var ta = { exports: {} };
|
|
|
2620
2620
|
}
|
|
2621
2621
|
}
|
|
2622
2622
|
if (s) {
|
|
2623
|
-
var
|
|
2624
|
-
if (!
|
|
2623
|
+
var y = N(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
|
|
2624
|
+
if (!y) {
|
|
2625
2625
|
var M = s.clientWidth, _ = s.clientHeight, j = M / _;
|
|
2626
|
-
|
|
2626
|
+
y = "".concat(M / j, ":").concat(_ / j);
|
|
2627
2627
|
}
|
|
2628
|
-
var H =
|
|
2628
|
+
var H = y.split(":"), I = this.settings.videosWidth, re = this.settings.videosWidth, ae = (re = We(I) || I.indexOf("px") !== -1 ? parseInt(I) : I.indexOf("vw") !== -1 ? h * parseInt(I) / 100 : I.indexOf("vh") !== -1 ? u * parseInt(I) / 100 : I.indexOf("%") !== -1 ? h * parseInt(I) / 100 : parseInt(s.clientWidth)) / (parseInt(H[0]) / parseInt(H[1]));
|
|
2629
2629
|
if (ae = Math.floor(ae), p && (u -= b.offsetHeight), re > h || ae > u || u < ae && h > re) {
|
|
2630
2630
|
var we = s.offsetWidth, xe = s.offsetHeight, _e = u / xe, je = { width: we * _e, height: xe * _e };
|
|
2631
2631
|
s.parentNode.setAttribute("style", "max-width: ".concat(je.width, "px")), p && b.setAttribute("style", "max-width: ".concat(je.width, "px;"));
|
|
@@ -2638,7 +2638,7 @@ var ta = { exports: {} };
|
|
|
2638
2638
|
this.init();
|
|
2639
2639
|
} }, { key: "updateNavigationClasses", value: function() {
|
|
2640
2640
|
var e = this.loop();
|
|
2641
|
-
|
|
2641
|
+
T(this.nextButton, "disabled"), T(this.prevButton, "disabled"), this.index == 0 && this.elements.length - 1 == 0 ? (E(this.prevButton, "disabled"), E(this.nextButton, "disabled")) : this.index !== 0 || e ? this.index !== this.elements.length - 1 || e || E(this.nextButton, "disabled") : E(this.prevButton, "disabled");
|
|
2642
2642
|
} }, { key: "loop", value: function() {
|
|
2643
2643
|
var e = N(this.settings, "loopAtEnd") ? this.settings.loopAtEnd : null;
|
|
2644
2644
|
return e = N(this.settings, "loop") ? this.settings.loop : e, e;
|
|
@@ -2656,14 +2656,14 @@ var ta = { exports: {} };
|
|
|
2656
2656
|
return !1;
|
|
2657
2657
|
this.closing = !0, this.slidePlayerPause(this.activeSlide), this.fullElementsList && (this.elements = this.fullElementsList), this.bodyHiddenChildElms.length && S(this.bodyHiddenChildElms, function(s) {
|
|
2658
2658
|
s.removeAttribute("aria-hidden");
|
|
2659
|
-
}), E(this.modal, "glightbox-closing"),
|
|
2659
|
+
}), E(this.modal, "glightbox-closing"), A(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), A(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
|
|
2660
2660
|
if (e.activeSlide = null, e.prevActiveSlideIndex = null, e.prevActiveSlide = null, e.built = !1, e.events) {
|
|
2661
2661
|
for (var s in e.events)
|
|
2662
2662
|
e.events.hasOwnProperty(s) && e.events[s].destroy();
|
|
2663
2663
|
e.events = null;
|
|
2664
2664
|
}
|
|
2665
2665
|
var f = document.body;
|
|
2666
|
-
|
|
2666
|
+
T(Ot, "glightbox-open"), T(f, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), e.modal.parentNode.removeChild(e.modal), e.trigger("close"), w(e.settings.onClose) && e.settings.onClose();
|
|
2667
2667
|
var b = document.querySelector(".gcss-styles");
|
|
2668
2668
|
b && b.parentNode.removeChild(b), e.lightboxOpen = !1, e.closing = null;
|
|
2669
2669
|
});
|
|
@@ -2705,7 +2705,7 @@ var kc = Object.defineProperty, Cc = Object.getOwnPropertyDescriptor, Sc = (a, t
|
|
|
2705
2705
|
};
|
|
2706
2706
|
let vt = class extends dt {
|
|
2707
2707
|
render() {
|
|
2708
|
-
return
|
|
2708
|
+
return m` <div class="cb-thinking" style="color: rgb(34, 34, 34);"><span></span><span></span><span></span></div>`;
|
|
2709
2709
|
}
|
|
2710
2710
|
};
|
|
2711
2711
|
vt.styles = U`
|
|
@@ -2759,13 +2759,13 @@ let ct = class extends Q {
|
|
|
2759
2759
|
super(...arguments), this.files = [];
|
|
2760
2760
|
}
|
|
2761
2761
|
render() {
|
|
2762
|
-
return
|
|
2762
|
+
return m` <div class="cb-uploading">
|
|
2763
2763
|
<div class="cb-uploading__title">
|
|
2764
2764
|
<sl-spinner class="cb-spinner"></sl-spinner>
|
|
2765
2765
|
<span>Uploading...</span>
|
|
2766
2766
|
</div>
|
|
2767
2767
|
<div class="cb-uploading__filelist">
|
|
2768
|
-
${this.files.map((a) =>
|
|
2768
|
+
${this.files.map((a) => m`${a.name}<br />`)}
|
|
2769
2769
|
</div>
|
|
2770
2770
|
</div>`;
|
|
2771
2771
|
}
|
|
@@ -2815,17 +2815,17 @@ const Mc = U`
|
|
|
2815
2815
|
margin-right: 0.2em;
|
|
2816
2816
|
}
|
|
2817
2817
|
`;
|
|
2818
|
-
var
|
|
2819
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
2818
|
+
var Ac = Object.defineProperty, Tc = Object.getOwnPropertyDescriptor, St = (a, t, c, i) => {
|
|
2819
|
+
for (var n = i > 1 ? void 0 : i ? Tc(t, c) : t, d = a.length - 1, l; d >= 0; d--)
|
|
2820
2820
|
(l = a[d]) && (n = (i ? l(t, c, n) : l(n)) || n);
|
|
2821
|
-
return i && n &&
|
|
2821
|
+
return i && n && Ac(t, c, n), n;
|
|
2822
2822
|
};
|
|
2823
|
-
let
|
|
2823
|
+
let Ve = class extends dt {
|
|
2824
2824
|
constructor() {
|
|
2825
2825
|
super(...arguments), this.url = "", this.inverse = !1;
|
|
2826
2826
|
}
|
|
2827
2827
|
render() {
|
|
2828
|
-
return
|
|
2828
|
+
return m`
|
|
2829
2829
|
<a
|
|
2830
2830
|
class="
|
|
2831
2831
|
cb-external-link link__item
|
|
@@ -2840,7 +2840,7 @@ let qe = class extends dt {
|
|
|
2840
2840
|
`;
|
|
2841
2841
|
}
|
|
2842
2842
|
};
|
|
2843
|
-
|
|
2843
|
+
Ve.styles = U`
|
|
2844
2844
|
:host {
|
|
2845
2845
|
--primary-color: var(--sl-color-primary-600);
|
|
2846
2846
|
}
|
|
@@ -2867,13 +2867,13 @@ qe.styles = U`
|
|
|
2867
2867
|
`;
|
|
2868
2868
|
St([
|
|
2869
2869
|
C({ type: String })
|
|
2870
|
-
],
|
|
2870
|
+
], Ve.prototype, "url", 2);
|
|
2871
2871
|
St([
|
|
2872
2872
|
C({ type: Boolean })
|
|
2873
|
-
],
|
|
2874
|
-
|
|
2873
|
+
], Ve.prototype, "inverse", 2);
|
|
2874
|
+
Ve = St([
|
|
2875
2875
|
Y("cb-external-link")
|
|
2876
|
-
],
|
|
2876
|
+
], Ve);
|
|
2877
2877
|
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>', 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.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>', 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.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>', zc = '<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>';
|
|
2878
2878
|
var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, _t = (a, t, c, i) => {
|
|
2879
2879
|
for (var n = i > 1 ? void 0 : i ? Bc(t, c) : t, d = a.length - 1, l; d >= 0; d--)
|
|
@@ -2889,7 +2889,7 @@ const Bt = {
|
|
|
2889
2889
|
doc: Pc,
|
|
2890
2890
|
docx: zc
|
|
2891
2891
|
};
|
|
2892
|
-
let
|
|
2892
|
+
let Re = class extends Q {
|
|
2893
2893
|
constructor() {
|
|
2894
2894
|
super(...arguments), this.filename = "", this.url = "";
|
|
2895
2895
|
}
|
|
@@ -2901,7 +2901,7 @@ let Ve = class extends Q {
|
|
|
2901
2901
|
return t ? t.toLowerCase() : a;
|
|
2902
2902
|
}
|
|
2903
2903
|
render() {
|
|
2904
|
-
return
|
|
2904
|
+
return m`
|
|
2905
2905
|
<cb-external-link url="${this.url}" inverse>
|
|
2906
2906
|
<div class="cb-file">
|
|
2907
2907
|
${this.renderFileIcon()}
|
|
@@ -2911,7 +2911,7 @@ let Ve = class extends Q {
|
|
|
2911
2911
|
`;
|
|
2912
2912
|
}
|
|
2913
2913
|
renderFileIcon() {
|
|
2914
|
-
return
|
|
2914
|
+
return m`
|
|
2915
2915
|
<cb-icon
|
|
2916
2916
|
class="cb-file-icon"
|
|
2917
2917
|
svg="${Bt[this.type] || Bt.txt}"
|
|
@@ -2919,16 +2919,16 @@ let Ve = class extends Q {
|
|
|
2919
2919
|
`;
|
|
2920
2920
|
}
|
|
2921
2921
|
};
|
|
2922
|
-
|
|
2922
|
+
Re.styles = Mc;
|
|
2923
2923
|
_t([
|
|
2924
2924
|
C({ type: String })
|
|
2925
|
-
],
|
|
2925
|
+
], Re.prototype, "filename", 2);
|
|
2926
2926
|
_t([
|
|
2927
2927
|
C({ type: String })
|
|
2928
|
-
],
|
|
2929
|
-
|
|
2928
|
+
], Re.prototype, "url", 2);
|
|
2929
|
+
Re = _t([
|
|
2930
2930
|
Y("cb-file")
|
|
2931
|
-
],
|
|
2931
|
+
], Re);
|
|
2932
2932
|
const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Vc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', Rc = U`
|
|
2933
2933
|
pre code.hljs {
|
|
2934
2934
|
display: block;
|
|
@@ -4251,6 +4251,10 @@ const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4251
4251
|
max-width: 75%;
|
|
4252
4252
|
}
|
|
4253
4253
|
|
|
4254
|
+
.user-message a {
|
|
4255
|
+
color: var(--enegelai-bot-message-user-a-color, rgb(85, 26, 139));
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4254
4258
|
.assistant-message {
|
|
4255
4259
|
margin-right: auto;
|
|
4256
4260
|
//margin-left: -12px;
|
|
@@ -4262,6 +4266,10 @@ const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4262
4266
|
padding: 4px 12px 6px 12px;
|
|
4263
4267
|
}
|
|
4264
4268
|
|
|
4269
|
+
.assistant-message a {
|
|
4270
|
+
color: var(--enegelai-bot-message-bot-a-color, rgb(85, 26, 139));
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4265
4273
|
.system-message {
|
|
4266
4274
|
margin-right: auto;
|
|
4267
4275
|
//margin-left: -12px;
|
|
@@ -4295,6 +4303,18 @@ const qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4295
4303
|
text-align: left;
|
|
4296
4304
|
}
|
|
4297
4305
|
|
|
4306
|
+
/*
|
|
4307
|
+
.cb-message-text a:visited {
|
|
4308
|
+
color: var(--enegelai-bot-message-a-visited-color, rgb(85, 26, 139));
|
|
4309
|
+
}
|
|
4310
|
+
.cb-message-text a:hover {
|
|
4311
|
+
color: var(--enegelai-bot-message-a-hover-color, rgb(85, 26, 139));
|
|
4312
|
+
}
|
|
4313
|
+
.cb-message-text a:active {
|
|
4314
|
+
color: var(--enegelai-bot-message-a-active-color, rgb(85, 26, 139));
|
|
4315
|
+
}
|
|
4316
|
+
*/
|
|
4317
|
+
|
|
4298
4318
|
.cb-message-text p {
|
|
4299
4319
|
padding: 0;
|
|
4300
4320
|
margin: 0;
|
|
@@ -4337,9 +4357,9 @@ function Fc() {
|
|
|
4337
4357
|
}
|
|
4338
4358
|
async function Vt(a) {
|
|
4339
4359
|
const c = Fc().render(a);
|
|
4340
|
-
return
|
|
4360
|
+
return m`${de(c)}`;
|
|
4341
4361
|
}
|
|
4342
|
-
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor,
|
|
4362
|
+
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor, Fe = (a, t, c, i) => {
|
|
4343
4363
|
for (var n = i > 1 ? void 0 : i ? Uc(t, c) : t, d = a.length - 1, l; d >= 0; d--)
|
|
4344
4364
|
(l = a[d]) && (n = (i ? l(t, c, n) : l(n)) || n);
|
|
4345
4365
|
return i && n && Nc(t, c, n), n;
|
|
@@ -4429,7 +4449,7 @@ let $e = class extends Q {
|
|
|
4429
4449
|
render() {
|
|
4430
4450
|
return fe(
|
|
4431
4451
|
this.message.data || this.message.isThinking,
|
|
4432
|
-
() =>
|
|
4452
|
+
() => m`
|
|
4433
4453
|
<div class="cb-message-row" part="bot-message">
|
|
4434
4454
|
<!-- message -->
|
|
4435
4455
|
${fe(
|
|
@@ -4443,7 +4463,7 @@ let $e = class extends Q {
|
|
|
4443
4463
|
);
|
|
4444
4464
|
}
|
|
4445
4465
|
renderButtons(a = "left") {
|
|
4446
|
-
return
|
|
4466
|
+
return m`<div class="cb-message__buttons ${a}">
|
|
4447
4467
|
<!-- delete button -->
|
|
4448
4468
|
<sl-button class="cb-message__delete-button" name="trash" @click=${this._removeMessageHandler} circle variant="text" size="small">
|
|
4449
4469
|
<cb-icon svg="${qc}" style="font-size: 1em !important;"></cb-icon>
|
|
@@ -4451,7 +4471,7 @@ let $e = class extends Q {
|
|
|
4451
4471
|
</div>`;
|
|
4452
4472
|
}
|
|
4453
4473
|
renderMessage(a) {
|
|
4454
|
-
return
|
|
4474
|
+
return m`
|
|
4455
4475
|
<div
|
|
4456
4476
|
class="cb-message__content
|
|
4457
4477
|
${a.author}-message
|
|
@@ -4468,22 +4488,22 @@ let $e = class extends Q {
|
|
|
4468
4488
|
}
|
|
4469
4489
|
renderMessageContent(a) {
|
|
4470
4490
|
var t;
|
|
4471
|
-
return a.isThinking ?
|
|
4491
|
+
return a.isThinking ? m`<cb-thinking></cb-thinking>` : a.isUploading ? m`<cb-uploading .files="${a.data.files || []}"></cb-uploading>` : a.type === "text" ? m`<div class="cb-message-text">
|
|
4472
4492
|
${fe(
|
|
4473
4493
|
a.data.userName,
|
|
4474
|
-
() =>
|
|
4494
|
+
() => m`<div style="font-size: 12px; color:#9ca3af">${a.data.userName}</div>`,
|
|
4475
4495
|
() => null
|
|
4476
4496
|
)}
|
|
4477
4497
|
${Ht(
|
|
4478
|
-
this._getMessageText(a).then((c) =>
|
|
4498
|
+
this._getMessageText(a).then((c) => m`${c}`)
|
|
4479
4499
|
)}
|
|
4480
|
-
</div>` : a.type === "file" ?
|
|
4500
|
+
</div>` : a.type === "file" ? m`${He(
|
|
4481
4501
|
a.data.files || [],
|
|
4482
4502
|
(c) => c.id,
|
|
4483
|
-
(c) =>
|
|
4484
|
-
)}` :
|
|
4503
|
+
(c) => m`<cb-file filename="${c.name}" url="${c.url}"></cb-file>`
|
|
4504
|
+
)}` : m`<div class="cb-message-text">
|
|
4485
4505
|
${Ht(
|
|
4486
|
-
Vt(((t = a.data.text) == null ? void 0 : t.toString()) || "").then((c) =>
|
|
4506
|
+
Vt(((t = a.data.text) == null ? void 0 : t.toString()) || "").then((c) => m`${c}`)
|
|
4487
4507
|
)}
|
|
4488
4508
|
</div>`;
|
|
4489
4509
|
}
|
|
@@ -4491,12 +4511,12 @@ let $e = class extends Q {
|
|
|
4491
4511
|
var t;
|
|
4492
4512
|
if (a.data.userName && a.data.userName !== "") {
|
|
4493
4513
|
const c = ((t = a.data) == null ? void 0 : t.userAvatar) || "";
|
|
4494
|
-
return c !== "" ?
|
|
4514
|
+
return c !== "" ? m` <img src="${c}" style="width: 24px;height: 24px;" /> ` : Be`${de(x.setting.agentIconSvg)}`;
|
|
4495
4515
|
}
|
|
4496
|
-
return a.author === "system" ?
|
|
4516
|
+
return a.author === "system" ? Be`${de(x.setting.systemIconSvg)}` : Be`${de(x.setting.botIconSvg)}`;
|
|
4497
4517
|
}
|
|
4498
4518
|
renderBotMessage(a) {
|
|
4499
|
-
return
|
|
4519
|
+
return m`
|
|
4500
4520
|
<div class="cb-message cb-bot-message-wrapper" part="cb-message">
|
|
4501
4521
|
<div class="avatar assistant-avatar xsmall" style="margin-top:4px;">${this.renderBotMessageAvatar(a)}</div>
|
|
4502
4522
|
<div style="margin-left: 4px;width: 100%">${this.renderMessage(a)}</div>
|
|
@@ -4504,7 +4524,7 @@ let $e = class extends Q {
|
|
|
4504
4524
|
`;
|
|
4505
4525
|
}
|
|
4506
4526
|
renderUserMessage(a) {
|
|
4507
|
-
return
|
|
4527
|
+
return m`
|
|
4508
4528
|
<div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
|
|
4509
4529
|
<!--<sl-avatar class="avatar user-avatar small" label="User">
|
|
4510
4530
|
<cb-icon slot="icon" svg="${Vc}" color="white"></cb-icon>
|
|
@@ -4516,19 +4536,19 @@ let $e = class extends Q {
|
|
|
4516
4536
|
}
|
|
4517
4537
|
};
|
|
4518
4538
|
$e.styles = Dc;
|
|
4519
|
-
|
|
4539
|
+
Fe([
|
|
4520
4540
|
C({ type: Object })
|
|
4521
4541
|
], $e.prototype, "message", 2);
|
|
4522
|
-
|
|
4542
|
+
Fe([
|
|
4523
4543
|
C({ type: String })
|
|
4524
4544
|
], $e.prototype, "type", 2);
|
|
4525
|
-
|
|
4545
|
+
Fe([
|
|
4526
4546
|
Wt(".code-block-header__copy")
|
|
4527
4547
|
], $e.prototype, "copyBtns", 2);
|
|
4528
|
-
|
|
4548
|
+
Fe([
|
|
4529
4549
|
Wt("img")
|
|
4530
4550
|
], $e.prototype, "glightboxImages", 2);
|
|
4531
|
-
$e =
|
|
4551
|
+
$e = Fe([
|
|
4532
4552
|
Y("cb-message")
|
|
4533
4553
|
], $e);
|
|
4534
4554
|
var Wc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, ye = (a, t, c, i) => {
|
|
@@ -4550,12 +4570,12 @@ let le = class extends Q {
|
|
|
4550
4570
|
autoplayVideos: true,
|
|
4551
4571
|
});*/
|
|
4552
4572
|
render() {
|
|
4553
|
-
return
|
|
4573
|
+
return m`
|
|
4554
4574
|
<div class="cb-message-list" part="bot-message-list">
|
|
4555
|
-
${
|
|
4575
|
+
${He(
|
|
4556
4576
|
this.messages,
|
|
4557
4577
|
(a) => a.id + JSON.stringify(a.data),
|
|
4558
|
-
(a) =>
|
|
4578
|
+
(a) => m`<cb-message .message="${a}" exportparts="bot-message"></cb-message>`
|
|
4559
4579
|
)}
|
|
4560
4580
|
${this.renderActions()} ${this.renderForm()}
|
|
4561
4581
|
<div id="cb-message-list-bottom-anchor"></div>
|
|
@@ -4563,18 +4583,18 @@ let le = class extends Q {
|
|
|
4563
4583
|
`;
|
|
4564
4584
|
}
|
|
4565
4585
|
renderForm() {
|
|
4566
|
-
return this.form ?
|
|
4586
|
+
return this.form ? m` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
|
|
4567
4587
|
<div class="cb-input-form-title">${this.form.title}</div>
|
|
4568
|
-
${
|
|
4588
|
+
${He(
|
|
4569
4589
|
this.form.fields,
|
|
4570
4590
|
(a, t) => t,
|
|
4571
4591
|
(a) => {
|
|
4572
4592
|
const t = (a == null ? void 0 : a.required) || !1, c = x.getPrefilledFormFieldValue(a.name);
|
|
4573
4593
|
switch (a.type) {
|
|
4574
4594
|
case "string":
|
|
4575
|
-
return
|
|
4595
|
+
return m`<sl-input value="${c}" class="cb-input-form-input" id="${"cb-form-field" + a.name}" name="${a.name}" label="${a.title}" ?required="${t}"></sl-input>`;
|
|
4576
4596
|
case "email":
|
|
4577
|
-
return
|
|
4597
|
+
return m`<sl-input
|
|
4578
4598
|
value="${c}"
|
|
4579
4599
|
class="cb-input-form-input"
|
|
4580
4600
|
id="${"cb-form-field" + a.name}"
|
|
@@ -4583,6 +4603,26 @@ let le = class extends Q {
|
|
|
4583
4603
|
label="${a.title}"
|
|
4584
4604
|
?required="${t}"
|
|
4585
4605
|
></sl-input>`;
|
|
4606
|
+
case "phone":
|
|
4607
|
+
return m`<sl-input
|
|
4608
|
+
value="${c}"
|
|
4609
|
+
class="cb-input-form-input"
|
|
4610
|
+
id="${"cb-form-field" + a.name}"
|
|
4611
|
+
name="${a.name}"
|
|
4612
|
+
type="tel"
|
|
4613
|
+
label="${a.title}"
|
|
4614
|
+
?required="${t}"
|
|
4615
|
+
></sl-input>`;
|
|
4616
|
+
case "select": {
|
|
4617
|
+
const i = Array.isArray(a.options) ? a.options : a.options.split(",").map((d) => d.trim()), n = c || i[0];
|
|
4618
|
+
return m`<sl-select value="${n}" class="cb-input-form-input" id="${"cb-form-field" + a.name}" name="${a.name}" label="${a.title}" ?required="${t}">
|
|
4619
|
+
${He(
|
|
4620
|
+
i,
|
|
4621
|
+
(d, l) => l,
|
|
4622
|
+
(d) => m`<sl-option value="${d}">${d}</sl-option>`
|
|
4623
|
+
)}
|
|
4624
|
+
</sl-select>`;
|
|
4625
|
+
}
|
|
4586
4626
|
}
|
|
4587
4627
|
}
|
|
4588
4628
|
)}
|
|
@@ -4625,9 +4665,9 @@ let le = class extends Q {
|
|
|
4625
4665
|
<br /><br />
|
|
4626
4666
|
*/
|
|
4627
4667
|
renderActions() {
|
|
4628
|
-
return !Array.isArray(this.actions) || this.actions.length <= 0 ? null :
|
|
4668
|
+
return !Array.isArray(this.actions) || this.actions.length <= 0 ? null : m`
|
|
4629
4669
|
<div class="cb-actions-list">
|
|
4630
|
-
${
|
|
4670
|
+
${He(
|
|
4631
4671
|
this.actions,
|
|
4632
4672
|
(a) => a,
|
|
4633
4673
|
(a) => this.renderAction(a)
|
|
@@ -4674,7 +4714,7 @@ let le = class extends Q {
|
|
|
4674
4714
|
n.origin === "https://calendly.com" && n.data.event && n.data.event.indexOf("calendly.") !== -1 && this.handleCalendlyEvent(n);
|
|
4675
4715
|
}), this.calendlyInjected = !0;
|
|
4676
4716
|
}
|
|
4677
|
-
return
|
|
4717
|
+
return m`
|
|
4678
4718
|
<div class="cb-actions-list">
|
|
4679
4719
|
<div class="cb-action ripple" @click="${this.invokeCalendlyAction.bind(this, a)}">
|
|
4680
4720
|
<div class="cb-action-icon">
|
|
@@ -4691,7 +4731,7 @@ let le = class extends Q {
|
|
|
4691
4731
|
`;
|
|
4692
4732
|
}
|
|
4693
4733
|
renderLinkAction(a) {
|
|
4694
|
-
return
|
|
4734
|
+
return m`
|
|
4695
4735
|
<div class="cb-actions-list">
|
|
4696
4736
|
<div class="cb-action ripple" @click="${this.invokeLinkAction.bind(this, a)}">
|
|
4697
4737
|
<div class="cb-action-icon">
|
|
@@ -4759,7 +4799,7 @@ let le = class extends Q {
|
|
|
4759
4799
|
}
|
|
4760
4800
|
return a != null && a.hubspotMeetingAuto && !("triggered" in a) && setTimeout(() => {
|
|
4761
4801
|
this.invokeHubspotMeetingAction(a);
|
|
4762
|
-
}, 500),
|
|
4802
|
+
}, 500), m`
|
|
4763
4803
|
<div class="cb-actions-list">
|
|
4764
4804
|
<div class="cb-action ripple" @click="${this.invokeHubspotMeetingAction.bind(this, a)}">
|
|
4765
4805
|
<div class="cb-action-icon">
|
|
@@ -4787,10 +4827,10 @@ ye([
|
|
|
4787
4827
|
C({ type: Object })
|
|
4788
4828
|
], le.prototype, "form", 2);
|
|
4789
4829
|
ye([
|
|
4790
|
-
|
|
4830
|
+
De("#cb-message-list-bottom-anchor")
|
|
4791
4831
|
], le.prototype, "_messageListBottomAnchor", 2);
|
|
4792
4832
|
ye([
|
|
4793
|
-
|
|
4833
|
+
De(".cb-input-form")
|
|
4794
4834
|
], le.prototype, "_inputForm", 2);
|
|
4795
4835
|
ye([
|
|
4796
4836
|
kt({ capture: !1, passive: !0 })
|
|
@@ -4897,7 +4937,7 @@ let be = class extends Q {
|
|
|
4897
4937
|
});
|
|
4898
4938
|
}
|
|
4899
4939
|
render() {
|
|
4900
|
-
return
|
|
4940
|
+
return m`
|
|
4901
4941
|
<div class="cb-user-input-wrapper" part="user-input-wrapper">
|
|
4902
4942
|
<sl-textarea
|
|
4903
4943
|
@sl-input=${this._inputChangeHandler}
|
|
@@ -4916,14 +4956,14 @@ let be = class extends Q {
|
|
|
4916
4956
|
<span class="cb-input-buttons">
|
|
4917
4957
|
${fe(
|
|
4918
4958
|
this.enableFileUpload,
|
|
4919
|
-
() =>
|
|
4959
|
+
() => m`
|
|
4920
4960
|
<sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="large" class="paperclip-button" variant="text" circle>
|
|
4921
4961
|
<cb-icon svg="${Gc}"></cb-icon>
|
|
4922
4962
|
<!-- select file input -->
|
|
4923
4963
|
<input type="file" id="file" name="file" class="file-input" />
|
|
4924
4964
|
</sl-button>
|
|
4925
4965
|
`,
|
|
4926
|
-
() =>
|
|
4966
|
+
() => m``
|
|
4927
4967
|
)}
|
|
4928
4968
|
<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>
|
|
4929
4969
|
<cb-icon svg="${Zc}"></cb-icon>
|
|
@@ -4959,7 +4999,7 @@ ve([
|
|
|
4959
4999
|
C({ type: String })
|
|
4960
5000
|
], be.prototype, "currentKey", 2);
|
|
4961
5001
|
ve([
|
|
4962
|
-
|
|
5002
|
+
De("sl-textarea")
|
|
4963
5003
|
], be.prototype, "inputElement", 2);
|
|
4964
5004
|
be = ve([
|
|
4965
5005
|
Y("cb-user-input")
|
|
@@ -5012,7 +5052,7 @@ let Pe = class extends Q {
|
|
|
5012
5052
|
this.emit("cancel");
|
|
5013
5053
|
}
|
|
5014
5054
|
render() {
|
|
5015
|
-
return
|
|
5055
|
+
return m` <sl-dialog
|
|
5016
5056
|
label="Setting"
|
|
5017
5057
|
class="cb-dialog"
|
|
5018
5058
|
style="sl-dialog::part(base) { z-index: ${this.zindex}; }"
|
|
@@ -5022,7 +5062,7 @@ let Pe = class extends Q {
|
|
|
5022
5062
|
>
|
|
5023
5063
|
<header class="cb-header">
|
|
5024
5064
|
<div class="cb-header__left">
|
|
5025
|
-
${this.label ?
|
|
5065
|
+
${this.label ? m`<span class="title">${this.label}</span>` : ""}
|
|
5026
5066
|
</div>
|
|
5027
5067
|
<sl-button
|
|
5028
5068
|
@click=${this._settingCancelHandler}
|
|
@@ -5071,7 +5111,7 @@ let it = class extends Q {
|
|
|
5071
5111
|
super(...arguments), this.open = !1;
|
|
5072
5112
|
}
|
|
5073
5113
|
render() {
|
|
5074
|
-
return
|
|
5114
|
+
return m` <cb-dialog
|
|
5075
5115
|
label="Confirm"
|
|
5076
5116
|
class="cb-clear-message-dialog"
|
|
5077
5117
|
?open=${this.open}
|
|
@@ -5184,7 +5224,7 @@ let Ce = class extends Q {
|
|
|
5184
5224
|
super(...arguments), this.open = !1, this.clearMessageDialogOpen = !1, this.customRequest = !1;
|
|
5185
5225
|
}
|
|
5186
5226
|
render() {
|
|
5187
|
-
return this.customRequest = this.setting.customRequest,
|
|
5227
|
+
return this.customRequest = this.setting.customRequest, m`
|
|
5188
5228
|
<cb-dialog label="Setting" class="cb-dialog" ?open=${this.open} ?no-header=${!0} @cancel=${this._settingCancelHandler}>
|
|
5189
5229
|
<form>
|
|
5190
5230
|
<div class="form-item">
|
|
@@ -5248,7 +5288,7 @@ let Ce = class extends Q {
|
|
|
5248
5288
|
`;
|
|
5249
5289
|
}
|
|
5250
5290
|
renderInternalServices() {
|
|
5251
|
-
return
|
|
5291
|
+
return m`
|
|
5252
5292
|
<div class="form-item">
|
|
5253
5293
|
<label class="label">Service</label>
|
|
5254
5294
|
<sl-radio-group name="openai" value="openai" size="small">
|
|
@@ -5310,7 +5350,7 @@ ze([
|
|
|
5310
5350
|
C({ type: Boolean })
|
|
5311
5351
|
], Ce.prototype, "clearMessageDialogOpen", 2);
|
|
5312
5352
|
ze([
|
|
5313
|
-
|
|
5353
|
+
De("sl-dialog")
|
|
5314
5354
|
], Ce.prototype, "dialog", 2);
|
|
5315
5355
|
ze([
|
|
5316
5356
|
C({ type: Boolean })
|
|
@@ -5455,23 +5495,23 @@ let nt = class extends Q {
|
|
|
5455
5495
|
return a;
|
|
5456
5496
|
}
|
|
5457
5497
|
render() {
|
|
5458
|
-
return
|
|
5498
|
+
return m`
|
|
5459
5499
|
<div class="cb-anchor ${this.open ? "open" : ""}" part="anchor" @click=${this._clickHandler.bind(this)}>
|
|
5460
5500
|
<sl-popup placement="${this.getPopupPlacement()}" distance="16" ?active="${x.engage && !x.open}">
|
|
5461
5501
|
<sl-button slot="anchor" label="Start" size="large" variant="primary" class="icon anchor-button" circle>
|
|
5462
5502
|
${fe(
|
|
5463
5503
|
this.open,
|
|
5464
|
-
() =>
|
|
5465
|
-
() =>
|
|
5504
|
+
() => m`<cb-icon color="white" svg="${tt}"></cb-icon>`,
|
|
5505
|
+
() => m`<cb-icon color="white" svg="${ri}"></cb-icon>`
|
|
5466
5506
|
)}
|
|
5467
5507
|
</sl-button>
|
|
5468
5508
|
<div class="cb-engage-popup">
|
|
5469
|
-
<div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${
|
|
5509
|
+
<div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${Be`${de(tt)}`}</div>
|
|
5470
5510
|
<div class="cb-engage-popup-content">
|
|
5471
5511
|
${fe(
|
|
5472
5512
|
x.setting.logoUrl !== "",
|
|
5473
|
-
() =>
|
|
5474
|
-
() =>
|
|
5513
|
+
() => m`<img class="cb-engage-popup-img" src="${x.setting.logoUrl}" />`,
|
|
5514
|
+
() => m`<div class="cb-engage-popup-logo">${Be`${de(x.setting.logoSvg)}`}</div>`
|
|
5475
5515
|
)}
|
|
5476
5516
|
<!--<cb-icon class="cb-engage-popup-logo" svg="${x.setting.logoSvg}"></cb-icon>-->
|
|
5477
5517
|
<div>${x.setting.engageMessage}</div>
|
|
@@ -5525,7 +5565,7 @@ let ot = class extends Q {
|
|
|
5525
5565
|
}
|
|
5526
5566
|
render() {
|
|
5527
5567
|
const { variant: a, icon: t } = Dt[this.status] || Dt.info;
|
|
5528
|
-
return
|
|
5568
|
+
return m`<cb-icon svg=${t} color="${a}"></cb-icon>`;
|
|
5529
5569
|
}
|
|
5530
5570
|
};
|
|
5531
5571
|
ot.styles = Qt;
|
|
@@ -5542,7 +5582,7 @@ var mi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, vi = (a, t
|
|
|
5542
5582
|
};
|
|
5543
5583
|
let wt = class extends Q {
|
|
5544
5584
|
render() {
|
|
5545
|
-
return
|
|
5585
|
+
return m` <sl-alert variant="danger" open>
|
|
5546
5586
|
<cb-status-icon status="error" slot="icon"></cb-status-icon>
|
|
5547
5587
|
Please config openai api key in the settings.
|
|
5548
5588
|
<span
|
|
@@ -5591,7 +5631,7 @@ class oa extends Error {
|
|
|
5591
5631
|
}), this.name = "TimeoutError", this.request = t;
|
|
5592
5632
|
}
|
|
5593
5633
|
}
|
|
5594
|
-
const Qe = (a) => a !== null && typeof a == "object",
|
|
5634
|
+
const Qe = (a) => a !== null && typeof a == "object", Je = (...a) => {
|
|
5595
5635
|
for (const t of a)
|
|
5596
5636
|
if ((!Qe(t) || Array.isArray(t)) && typeof t < "u")
|
|
5597
5637
|
throw new TypeError("The `options` argument must be an object");
|
|
@@ -5636,7 +5676,7 @@ const Qe = (a) => a !== null && typeof a == "object", Ge = (...a) => {
|
|
|
5636
5676
|
afterStatusCodes: fa,
|
|
5637
5677
|
maxRetryAfter: Number.POSITIVE_INFINITY,
|
|
5638
5678
|
backoffLimit: Number.POSITIVE_INFINITY
|
|
5639
|
-
},
|
|
5679
|
+
}, Ai = (a = {}) => {
|
|
5640
5680
|
if (typeof a == "number")
|
|
5641
5681
|
return {
|
|
5642
5682
|
...Nt,
|
|
@@ -5652,7 +5692,7 @@ const Qe = (a) => a !== null && typeof a == "object", Ge = (...a) => {
|
|
|
5652
5692
|
afterStatusCodes: fa
|
|
5653
5693
|
};
|
|
5654
5694
|
};
|
|
5655
|
-
async function
|
|
5695
|
+
async function Ti(a, t, c) {
|
|
5656
5696
|
return new Promise((i, n) => {
|
|
5657
5697
|
const d = setTimeout(() => {
|
|
5658
5698
|
t && t.abort(), n(new oa(a));
|
|
@@ -5768,7 +5808,7 @@ class st {
|
|
|
5768
5808
|
method: _i(c.method ?? this._input.method),
|
|
5769
5809
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
5770
5810
|
prefixUrl: String(c.prefixUrl || ""),
|
|
5771
|
-
retry:
|
|
5811
|
+
retry: Ai(c.retry),
|
|
5772
5812
|
throwHttpErrors: c.throwHttpErrors !== !1,
|
|
5773
5813
|
timeout: typeof c.timeout > "u" ? 1e4 : c.timeout,
|
|
5774
5814
|
fetch: c.fetch ?? globalThis.fetch.bind(globalThis)
|
|
@@ -5845,7 +5885,7 @@ class st {
|
|
|
5845
5885
|
if (c instanceof Response)
|
|
5846
5886
|
return c;
|
|
5847
5887
|
}
|
|
5848
|
-
return this._options.timeout === !1 ? this._options.fetch(this.request.clone()) :
|
|
5888
|
+
return this._options.timeout === !1 ? this._options.fetch(this.request.clone()) : Ti(this.request.clone(), this.abortController, this._options);
|
|
5849
5889
|
}
|
|
5850
5890
|
/* istanbul ignore next */
|
|
5851
5891
|
_stream(t, c) {
|
|
@@ -5883,10 +5923,10 @@ class st {
|
|
|
5883
5923
|
}
|
|
5884
5924
|
/*! MIT License © Sindre Sorhus */
|
|
5885
5925
|
const xt = (a) => {
|
|
5886
|
-
const t = (c, i) => st.create(c,
|
|
5926
|
+
const t = (c, i) => st.create(c, Je(a, i));
|
|
5887
5927
|
for (const c of ra)
|
|
5888
|
-
t[c] = (i, n) => st.create(i,
|
|
5889
|
-
return t.create = (c) => xt(
|
|
5928
|
+
t[c] = (i, n) => st.create(i, Je(a, n, { method: c }));
|
|
5929
|
+
return t.create = (c) => xt(Je(c)), t.extend = (c) => xt(Je(a, c)), t.stop = da, t;
|
|
5890
5930
|
}, Li = xt(), ji = Li, Oi = ji.extend({
|
|
5891
5931
|
hooks: {
|
|
5892
5932
|
beforeRequest: [
|
|
@@ -6004,7 +6044,7 @@ let P = class extends Q {
|
|
|
6004
6044
|
x.addActions(a);
|
|
6005
6045
|
}
|
|
6006
6046
|
render() {
|
|
6007
|
-
return x.disabled && !this.alwaysOpen ? (Oe.error("Bot is disabled"), null) :
|
|
6047
|
+
return x.disabled && !this.alwaysOpen ? (Oe.error("Bot is disabled"), null) : m`
|
|
6008
6048
|
<div class="cb-wrapper" style="${x.open ? "display:flex" : "display:none"}">
|
|
6009
6049
|
<cb-header title="${this.name}" exportparts="header, header-logo, header-title, header-close"></cb-header>
|
|
6010
6050
|
<cb-message-list .messages=${x.messages} .actions=${x.actions} .form=${x.form} exportparts="bot-message-list, bot-message"></cb-message-list>
|
|
@@ -6014,7 +6054,7 @@ let P = class extends Q {
|
|
|
6014
6054
|
`;
|
|
6015
6055
|
}
|
|
6016
6056
|
renderUserInput() {
|
|
6017
|
-
return x.form || x.disabled && this.alwaysOpen ? null :
|
|
6057
|
+
return x.form || x.disabled && this.alwaysOpen ? null : m`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || x.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
|
|
6018
6058
|
}
|
|
6019
6059
|
connectedCallback() {
|
|
6020
6060
|
super.connectedCallback(), Oe.info("connectedCallback"), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this._chatbotToggleHandler), addEventListener("form:submit", this._formSubmitHandler);
|
|
@@ -6223,7 +6263,7 @@ q([
|
|
|
6223
6263
|
C({ type: Boolean })
|
|
6224
6264
|
], P.prototype, "showAuthAlert", 2);
|
|
6225
6265
|
q([
|
|
6226
|
-
|
|
6266
|
+
De("cb-message-list")
|
|
6227
6267
|
], P.prototype, "_messageList", 2);
|
|
6228
6268
|
P = q([
|
|
6229
6269
|
Y("enegelai-bot")
|