@telia-ace/ace-chat-flamingo 1.1.120-rc.7 → 1.1.120-rc.9
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/chat-utilities.d.ts +1 -0
- package/index.js +42 -42
- package/index.mjs +510 -493
- package/package.json +3 -3
- package/provider.d.ts +47 -49
package/index.mjs
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
var cl = Object.defineProperty;
|
|
2
2
|
var ul = (n, e, t) => e in n ? cl(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var A = (n, e, t) => ul(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
class Xi {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.registeredProviders = /* @__PURE__ */ new Map();
|
|
7
|
-
}
|
|
8
|
-
static async getInstance(e) {
|
|
9
|
-
let t = await e.get("conversation");
|
|
10
|
-
return t || (t = new Xi(), await e.register("conversation", t), t);
|
|
11
|
-
}
|
|
12
|
-
registerProvider(e, t) {
|
|
13
|
-
this.registeredProviders.set(e, t);
|
|
14
|
-
}
|
|
15
|
-
// private getProviderByConfiguration(
|
|
16
|
-
// component: Conversation
|
|
17
|
-
// ): ProviderFactory | undefined {
|
|
18
|
-
// const [providerKey] = (component.properties['providers'] || []) as string[];
|
|
19
|
-
// if (!providerKey) {
|
|
20
|
-
// console.warn(
|
|
21
|
-
// `No providers registered. You most likely forgot to add a provider to the conversation component properties.`
|
|
22
|
-
// );
|
|
23
|
-
// return;
|
|
24
|
-
// }
|
|
25
|
-
// return this.registeredProviders.get(providerKey);
|
|
26
|
-
// }
|
|
27
|
-
}
|
|
28
4
|
var Ai = function(n, e) {
|
|
29
5
|
return Ai = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
|
|
30
6
|
t.__proto__ = i;
|
|
@@ -68,7 +44,7 @@ function hl(n, e, t, i) {
|
|
|
68
44
|
c((i = i.apply(n, e || [])).next());
|
|
69
45
|
});
|
|
70
46
|
}
|
|
71
|
-
function
|
|
47
|
+
function _o(n, e) {
|
|
72
48
|
var t = { label: 0, sent: function() {
|
|
73
49
|
if (r[0] & 1) throw r[1];
|
|
74
50
|
return r[1];
|
|
@@ -220,7 +196,7 @@ function pl(n) {
|
|
|
220
196
|
}, o);
|
|
221
197
|
}
|
|
222
198
|
}
|
|
223
|
-
function
|
|
199
|
+
function _(n) {
|
|
224
200
|
return typeof n == "function";
|
|
225
201
|
}
|
|
226
202
|
function Eo(n) {
|
|
@@ -272,7 +248,7 @@ var Yt = function() {
|
|
|
272
248
|
else
|
|
273
249
|
o.remove(this);
|
|
274
250
|
var u = this.initialTeardown;
|
|
275
|
-
if (
|
|
251
|
+
if (_(u))
|
|
276
252
|
try {
|
|
277
253
|
u();
|
|
278
254
|
} catch ($) {
|
|
@@ -334,10 +310,10 @@ var Yt = function() {
|
|
|
334
310
|
}(), n;
|
|
335
311
|
}(), Ao = Yt.EMPTY;
|
|
336
312
|
function To(n) {
|
|
337
|
-
return n instanceof Yt || n && "closed" in n &&
|
|
313
|
+
return n instanceof Yt || n && "closed" in n && _(n.remove) && _(n.add) && _(n.unsubscribe);
|
|
338
314
|
}
|
|
339
315
|
function $r(n) {
|
|
340
|
-
|
|
316
|
+
_(n) ? n() : n.unsubscribe();
|
|
341
317
|
}
|
|
342
318
|
var fl = {
|
|
343
319
|
Promise: void 0
|
|
@@ -362,7 +338,7 @@ function $n() {
|
|
|
362
338
|
function gn(n) {
|
|
363
339
|
n();
|
|
364
340
|
}
|
|
365
|
-
var
|
|
341
|
+
var Xi = function(n) {
|
|
366
342
|
Ae(e, n);
|
|
367
343
|
function e(t) {
|
|
368
344
|
var i = n.call(this) || this;
|
|
@@ -428,14 +404,14 @@ var Ki = function(n) {
|
|
|
428
404
|
Ae(e, n);
|
|
429
405
|
function e(t, i, s) {
|
|
430
406
|
var r = n.call(this) || this, o;
|
|
431
|
-
return
|
|
407
|
+
return _(t) || !t ? o = {
|
|
432
408
|
next: t ?? void 0,
|
|
433
409
|
error: i ?? void 0,
|
|
434
410
|
complete: s ?? void 0
|
|
435
411
|
} : o = t, r.destination = new ml(o), r;
|
|
436
412
|
}
|
|
437
413
|
return e;
|
|
438
|
-
}(
|
|
414
|
+
}(Xi);
|
|
439
415
|
function un(n) {
|
|
440
416
|
Oo(n);
|
|
441
417
|
}
|
|
@@ -447,7 +423,7 @@ var bl = {
|
|
|
447
423
|
next: $n,
|
|
448
424
|
error: vl,
|
|
449
425
|
complete: $n
|
|
450
|
-
},
|
|
426
|
+
}, Ki = function() {
|
|
451
427
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
452
428
|
}();
|
|
453
429
|
function wt(n) {
|
|
@@ -498,7 +474,7 @@ var j = function() {
|
|
|
498
474
|
}, n.prototype._subscribe = function(e) {
|
|
499
475
|
var t;
|
|
500
476
|
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e);
|
|
501
|
-
}, n.prototype[
|
|
477
|
+
}, n.prototype[Ki] = function() {
|
|
502
478
|
return this;
|
|
503
479
|
}, n.prototype.pipe = function() {
|
|
504
480
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
@@ -525,13 +501,13 @@ function wr(n) {
|
|
|
525
501
|
return (e = n ?? fl.Promise) !== null && e !== void 0 ? e : Promise;
|
|
526
502
|
}
|
|
527
503
|
function $l(n) {
|
|
528
|
-
return n &&
|
|
504
|
+
return n && _(n.next) && _(n.error) && _(n.complete);
|
|
529
505
|
}
|
|
530
506
|
function wl(n) {
|
|
531
|
-
return n && n instanceof
|
|
507
|
+
return n && n instanceof Xi || $l(n) && To(n);
|
|
532
508
|
}
|
|
533
509
|
function xl(n) {
|
|
534
|
-
return
|
|
510
|
+
return _(n == null ? void 0 : n.lift);
|
|
535
511
|
}
|
|
536
512
|
function ne(n) {
|
|
537
513
|
return function(e) {
|
|
@@ -584,7 +560,7 @@ var kl = function(n) {
|
|
|
584
560
|
n.prototype.unsubscribe.call(this), !i && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
585
561
|
}
|
|
586
562
|
}, e;
|
|
587
|
-
}(
|
|
563
|
+
}(Xi), Sl = Eo(function(n) {
|
|
588
564
|
return function() {
|
|
589
565
|
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
590
566
|
};
|
|
@@ -709,11 +685,11 @@ var kl = function(n) {
|
|
|
709
685
|
}, e.prototype.next = function(t) {
|
|
710
686
|
n.prototype.next.call(this, this._value = t);
|
|
711
687
|
}, e;
|
|
712
|
-
}(P),
|
|
688
|
+
}(P), Cl = {
|
|
713
689
|
now: function() {
|
|
714
690
|
return Date.now();
|
|
715
691
|
}
|
|
716
|
-
},
|
|
692
|
+
}, _l = function(n) {
|
|
717
693
|
Ae(e, n);
|
|
718
694
|
function e(t, i) {
|
|
719
695
|
return n.call(this) || this;
|
|
@@ -773,13 +749,13 @@ var kl = function(n) {
|
|
|
773
749
|
this.work = this.state = this.scheduler = null, this.pending = !1, yn(r, this), i != null && (this.id = this.recycleAsyncId(s, i, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
774
750
|
}
|
|
775
751
|
}, e;
|
|
776
|
-
}(
|
|
752
|
+
}(_l), Sr = function() {
|
|
777
753
|
function n(e, t) {
|
|
778
754
|
t === void 0 && (t = n.now), this.schedulerActionCtor = e, this.now = t;
|
|
779
755
|
}
|
|
780
756
|
return n.prototype.schedule = function(e, t, i) {
|
|
781
757
|
return t === void 0 && (t = 0), new this.schedulerActionCtor(this, e).schedule(i, t);
|
|
782
|
-
}, n.now =
|
|
758
|
+
}, n.now = Cl.now, n;
|
|
783
759
|
}(), Al = function(n) {
|
|
784
760
|
Ae(e, n);
|
|
785
761
|
function e(t, i) {
|
|
@@ -810,31 +786,31 @@ var Xe = new j(function(n) {
|
|
|
810
786
|
return n.complete();
|
|
811
787
|
});
|
|
812
788
|
function Tl(n) {
|
|
813
|
-
return n &&
|
|
789
|
+
return n && _(n.schedule);
|
|
814
790
|
}
|
|
815
|
-
function
|
|
791
|
+
function Ji(n) {
|
|
816
792
|
return n[n.length - 1];
|
|
817
793
|
}
|
|
818
794
|
function Lo(n) {
|
|
819
|
-
return
|
|
795
|
+
return _(Ji(n)) ? n.pop() : void 0;
|
|
820
796
|
}
|
|
821
|
-
function
|
|
822
|
-
return Tl(
|
|
797
|
+
function es(n) {
|
|
798
|
+
return Tl(Ji(n)) ? n.pop() : void 0;
|
|
823
799
|
}
|
|
824
800
|
function Ol(n, e) {
|
|
825
|
-
return typeof
|
|
801
|
+
return typeof Ji(n) == "number" ? n.pop() : e;
|
|
826
802
|
}
|
|
827
|
-
var
|
|
803
|
+
var ts = function(n) {
|
|
828
804
|
return n && typeof n.length == "number" && typeof n != "function";
|
|
829
805
|
};
|
|
830
806
|
function Ro(n) {
|
|
831
|
-
return
|
|
807
|
+
return _(n == null ? void 0 : n.then);
|
|
832
808
|
}
|
|
833
809
|
function Io(n) {
|
|
834
|
-
return
|
|
810
|
+
return _(n[Ki]);
|
|
835
811
|
}
|
|
836
812
|
function Po(n) {
|
|
837
|
-
return Symbol.asyncIterator &&
|
|
813
|
+
return Symbol.asyncIterator && _(n == null ? void 0 : n[Symbol.asyncIterator]);
|
|
838
814
|
}
|
|
839
815
|
function Mo(n) {
|
|
840
816
|
return new TypeError("You provided " + (n !== null && typeof n == "object" ? "an invalid object" : "'" + n + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
@@ -844,12 +820,12 @@ function Ll() {
|
|
|
844
820
|
}
|
|
845
821
|
var Do = Ll();
|
|
846
822
|
function Uo(n) {
|
|
847
|
-
return
|
|
823
|
+
return _(n == null ? void 0 : n[Do]);
|
|
848
824
|
}
|
|
849
825
|
function No(n) {
|
|
850
826
|
return dl(this, arguments, function() {
|
|
851
827
|
var t, i, s, r;
|
|
852
|
-
return
|
|
828
|
+
return _o(this, function(o) {
|
|
853
829
|
switch (o.label) {
|
|
854
830
|
case 0:
|
|
855
831
|
t = n.getReader(), o.label = 1;
|
|
@@ -878,7 +854,7 @@ function No(n) {
|
|
|
878
854
|
});
|
|
879
855
|
}
|
|
880
856
|
function zo(n) {
|
|
881
|
-
return
|
|
857
|
+
return _(n == null ? void 0 : n.getReader);
|
|
882
858
|
}
|
|
883
859
|
function ie(n) {
|
|
884
860
|
if (n instanceof j)
|
|
@@ -886,7 +862,7 @@ function ie(n) {
|
|
|
886
862
|
if (n != null) {
|
|
887
863
|
if (Io(n))
|
|
888
864
|
return Rl(n);
|
|
889
|
-
if (
|
|
865
|
+
if (ts(n))
|
|
890
866
|
return Il(n);
|
|
891
867
|
if (Ro(n))
|
|
892
868
|
return Pl(n);
|
|
@@ -901,8 +877,8 @@ function ie(n) {
|
|
|
901
877
|
}
|
|
902
878
|
function Rl(n) {
|
|
903
879
|
return new j(function(e) {
|
|
904
|
-
var t = n[
|
|
905
|
-
if (
|
|
880
|
+
var t = n[Ki]();
|
|
881
|
+
if (_(t.subscribe))
|
|
906
882
|
return t.subscribe(e);
|
|
907
883
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
908
884
|
});
|
|
@@ -958,7 +934,7 @@ function Ul(n, e) {
|
|
|
958
934
|
var t, i, s, r;
|
|
959
935
|
return hl(this, void 0, void 0, function() {
|
|
960
936
|
var o, a;
|
|
961
|
-
return
|
|
937
|
+
return _o(this, function(l) {
|
|
962
938
|
switch (l.label) {
|
|
963
939
|
case 0:
|
|
964
940
|
l.trys.push([0, 5, 6, 11]), t = pl(n), l.label = 1;
|
|
@@ -1053,7 +1029,7 @@ function Hl(n, e) {
|
|
|
1053
1029
|
o ? t.complete() : t.next(r);
|
|
1054
1030
|
}, 0, !0);
|
|
1055
1031
|
}), function() {
|
|
1056
|
-
return
|
|
1032
|
+
return _(i == null ? void 0 : i.return) && i.return();
|
|
1057
1033
|
};
|
|
1058
1034
|
});
|
|
1059
1035
|
}
|
|
@@ -1078,7 +1054,7 @@ function Bl(n, e) {
|
|
|
1078
1054
|
if (n != null) {
|
|
1079
1055
|
if (Io(n))
|
|
1080
1056
|
return Nl(n, e);
|
|
1081
|
-
if (
|
|
1057
|
+
if (ts(n))
|
|
1082
1058
|
return jl(n, e);
|
|
1083
1059
|
if (Ro(n))
|
|
1084
1060
|
return zl(n, e);
|
|
@@ -1097,7 +1073,7 @@ function Ve(n, e) {
|
|
|
1097
1073
|
function Oi() {
|
|
1098
1074
|
for (var n = [], e = 0; e < arguments.length; e++)
|
|
1099
1075
|
n[e] = arguments[e];
|
|
1100
|
-
var t =
|
|
1076
|
+
var t = es(n);
|
|
1101
1077
|
return Ve(n, t);
|
|
1102
1078
|
}
|
|
1103
1079
|
function wn(n, e) {
|
|
@@ -1146,7 +1122,7 @@ function Kl(n, e) {
|
|
|
1146
1122
|
function Jl() {
|
|
1147
1123
|
for (var n = [], e = 0; e < arguments.length; e++)
|
|
1148
1124
|
n[e] = arguments[e];
|
|
1149
|
-
var t =
|
|
1125
|
+
var t = es(n), i = Lo(n), s = Ql(n), r = s.args, o = s.keys;
|
|
1150
1126
|
if (r.length === 0)
|
|
1151
1127
|
return Ve([], t);
|
|
1152
1128
|
var a = new j(ec(r, t, o ? function(l) {
|
|
@@ -1156,9 +1132,9 @@ function Jl() {
|
|
|
1156
1132
|
}
|
|
1157
1133
|
function ec(n, e, t) {
|
|
1158
1134
|
return t === void 0 && (t = wt), function(i) {
|
|
1159
|
-
|
|
1135
|
+
Cr(e, function() {
|
|
1160
1136
|
for (var s = n.length, r = new Array(s), o = s, a = s, l = function(u) {
|
|
1161
|
-
|
|
1137
|
+
Cr(e, function() {
|
|
1162
1138
|
var p = Ve(n[u], e), d = !1;
|
|
1163
1139
|
p.subscribe(G(i, function(g) {
|
|
1164
1140
|
r[u] = g, d || (d = !0, a--), a || i.next(t(r.slice()));
|
|
@@ -1171,7 +1147,7 @@ function ec(n, e, t) {
|
|
|
1171
1147
|
}, i);
|
|
1172
1148
|
};
|
|
1173
1149
|
}
|
|
1174
|
-
function
|
|
1150
|
+
function Cr(n, e, t) {
|
|
1175
1151
|
n ? Pe(t, n, e) : e();
|
|
1176
1152
|
}
|
|
1177
1153
|
function tc(n, e, t, i, s, r, o, a) {
|
|
@@ -1207,7 +1183,7 @@ function tc(n, e, t, i, s, r, o, a) {
|
|
|
1207
1183
|
};
|
|
1208
1184
|
}
|
|
1209
1185
|
function zt(n, e, t) {
|
|
1210
|
-
return t === void 0 && (t = 1 / 0),
|
|
1186
|
+
return t === void 0 && (t = 1 / 0), _(e) ? zt(function(i, s) {
|
|
1211
1187
|
return wn(function(r, o) {
|
|
1212
1188
|
return e(i, r, s, o);
|
|
1213
1189
|
})(ie(n(i, s)));
|
|
@@ -1225,14 +1201,14 @@ function ic(n) {
|
|
|
1225
1201
|
}
|
|
1226
1202
|
var sc = ["addListener", "removeListener"], rc = ["addEventListener", "removeEventListener"], oc = ["on", "off"];
|
|
1227
1203
|
function xn(n, e, t, i) {
|
|
1228
|
-
if (
|
|
1204
|
+
if (_(t) && (i = t, t = void 0), i)
|
|
1229
1205
|
return xn(n, e, t).pipe(qo(i));
|
|
1230
1206
|
var s = De(cc(n) ? rc.map(function(a) {
|
|
1231
1207
|
return function(l) {
|
|
1232
1208
|
return n[a](e, l, t);
|
|
1233
1209
|
};
|
|
1234
|
-
}) : ac(n) ? sc.map(
|
|
1235
|
-
if (!r &&
|
|
1210
|
+
}) : ac(n) ? sc.map(_r(n, e)) : lc(n) ? oc.map(_r(n, e)) : [], 2), r = s[0], o = s[1];
|
|
1211
|
+
if (!r && ts(n))
|
|
1236
1212
|
return zt(function(a) {
|
|
1237
1213
|
return xn(a, e, t);
|
|
1238
1214
|
})(ie(n));
|
|
@@ -1249,7 +1225,7 @@ function xn(n, e, t, i) {
|
|
|
1249
1225
|
};
|
|
1250
1226
|
});
|
|
1251
1227
|
}
|
|
1252
|
-
function
|
|
1228
|
+
function _r(n, e) {
|
|
1253
1229
|
return function(t) {
|
|
1254
1230
|
return function(i) {
|
|
1255
1231
|
return n[t](e, i);
|
|
@@ -1257,18 +1233,18 @@ function Cr(n, e) {
|
|
|
1257
1233
|
};
|
|
1258
1234
|
}
|
|
1259
1235
|
function ac(n) {
|
|
1260
|
-
return
|
|
1236
|
+
return _(n.addListener) && _(n.removeListener);
|
|
1261
1237
|
}
|
|
1262
1238
|
function lc(n) {
|
|
1263
|
-
return
|
|
1239
|
+
return _(n.on) && _(n.off);
|
|
1264
1240
|
}
|
|
1265
1241
|
function cc(n) {
|
|
1266
|
-
return
|
|
1242
|
+
return _(n.addEventListener) && _(n.removeEventListener);
|
|
1267
1243
|
}
|
|
1268
1244
|
function uc() {
|
|
1269
1245
|
for (var n = [], e = 0; e < arguments.length; e++)
|
|
1270
1246
|
n[e] = arguments[e];
|
|
1271
|
-
var t =
|
|
1247
|
+
var t = es(n), i = Ol(n, 1 / 0), s = n;
|
|
1272
1248
|
return s.length ? s.length === 1 ? ie(s[0]) : nc(i)(Ve(s, t)) : Xe;
|
|
1273
1249
|
}
|
|
1274
1250
|
function K(n, e) {
|
|
@@ -1288,7 +1264,7 @@ function Li(n) {
|
|
|
1288
1264
|
});
|
|
1289
1265
|
}
|
|
1290
1266
|
function pi(n, e) {
|
|
1291
|
-
return
|
|
1267
|
+
return _(e) ? zt(n, e, 1) : zt(n, 1);
|
|
1292
1268
|
}
|
|
1293
1269
|
function he(n) {
|
|
1294
1270
|
return n <= 0 ? function() {
|
|
@@ -1318,7 +1294,7 @@ function fi(n) {
|
|
|
1318
1294
|
l();
|
|
1319
1295
|
});
|
|
1320
1296
|
}
|
|
1321
|
-
function
|
|
1297
|
+
function Ce(n, e) {
|
|
1322
1298
|
return ne(function(t, i) {
|
|
1323
1299
|
var s = null, r = 0, o = !1, a = function() {
|
|
1324
1300
|
return o && !s && i.complete();
|
|
@@ -1344,7 +1320,7 @@ function B(n) {
|
|
|
1344
1320
|
});
|
|
1345
1321
|
}
|
|
1346
1322
|
function hc(n, e, t) {
|
|
1347
|
-
var i =
|
|
1323
|
+
var i = _(n) || e || t ? { next: n, error: e, complete: t } : n;
|
|
1348
1324
|
return i ? ne(function(s, r) {
|
|
1349
1325
|
var o;
|
|
1350
1326
|
(o = i.subscribe) === null || o === void 0 || o.call(i);
|
|
@@ -1385,6 +1361,30 @@ function Ri() {
|
|
|
1385
1361
|
}));
|
|
1386
1362
|
});
|
|
1387
1363
|
}
|
|
1364
|
+
class ns {
|
|
1365
|
+
constructor() {
|
|
1366
|
+
this.registeredProviders = /* @__PURE__ */ new Map();
|
|
1367
|
+
}
|
|
1368
|
+
static async getInstance(e) {
|
|
1369
|
+
let t = await e.get("conversation");
|
|
1370
|
+
return t || (t = new ns(), await e.register("conversation", t), t);
|
|
1371
|
+
}
|
|
1372
|
+
registerProvider(e, t) {
|
|
1373
|
+
this.registeredProviders.set(e, t);
|
|
1374
|
+
}
|
|
1375
|
+
// private getProviderByConfiguration(
|
|
1376
|
+
// component: Conversation
|
|
1377
|
+
// ): ProviderFactory | undefined {
|
|
1378
|
+
// const [providerKey] = (component.properties['providers'] || []) as string[];
|
|
1379
|
+
// if (!providerKey) {
|
|
1380
|
+
// console.warn(
|
|
1381
|
+
// `No providers registered. You most likely forgot to add a provider to the conversation component properties.`
|
|
1382
|
+
// );
|
|
1383
|
+
// return;
|
|
1384
|
+
// }
|
|
1385
|
+
// return this.registeredProviders.get(providerKey);
|
|
1386
|
+
// }
|
|
1387
|
+
}
|
|
1388
1388
|
var z = /* @__PURE__ */ ((n) => (n.User = "user", n.Agent = "agent", n.System = "system", n))(z || {});
|
|
1389
1389
|
const dc = () => "10000000-1000-4000-8000-100000000000".replace(
|
|
1390
1390
|
/[018]/g,
|
|
@@ -1658,10 +1658,10 @@ const bc = (n) => new Go(typeof n == "string" ? n : n + "", void 0, ss), T = (n,
|
|
|
1658
1658
|
* Copyright 2017 Google LLC
|
|
1659
1659
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1660
1660
|
*/
|
|
1661
|
-
const { is: $c, defineProperty: wc, getOwnPropertyDescriptor: xc, getOwnPropertyNames: kc, getOwnPropertySymbols: Sc, getPrototypeOf:
|
|
1661
|
+
const { is: $c, defineProperty: wc, getOwnPropertyDescriptor: xc, getOwnPropertyNames: kc, getOwnPropertySymbols: Sc, getPrototypeOf: Cc } = Object, Me = globalThis, Or = Me.trustedTypes, _c = Or ? Or.emptyScript : "", gi = Me.reactiveElementPolyfillSupport, Mt = (n, e) => n, kn = { toAttribute(n, e) {
|
|
1662
1662
|
switch (e) {
|
|
1663
1663
|
case Boolean:
|
|
1664
|
-
n = n ?
|
|
1664
|
+
n = n ? _c : null;
|
|
1665
1665
|
break;
|
|
1666
1666
|
case Object:
|
|
1667
1667
|
case Array:
|
|
@@ -1717,7 +1717,7 @@ let at = class extends HTMLElement {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
static _$Ei() {
|
|
1719
1719
|
if (this.hasOwnProperty(Mt("elementProperties"))) return;
|
|
1720
|
-
const e =
|
|
1720
|
+
const e = Cc(this);
|
|
1721
1721
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
1722
1722
|
}
|
|
1723
1723
|
static finalize() {
|
|
@@ -1897,7 +1897,7 @@ at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[Mt("elementPr
|
|
|
1897
1897
|
*/
|
|
1898
1898
|
const Dt = globalThis, Sn = Dt.trustedTypes, Rr = Sn ? Sn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Zo = "$lit$", Re = `lit$${Math.random().toFixed(9).slice(2)}$`, Yo = "?" + Re, Ec = `<${Yo}>`, Ze = document, jt = () => Ze.createComment(""), Ht = (n) => n === null || typeof n != "object" && typeof n != "function", os = Array.isArray, Ac = (n) => os(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", mi = `[
|
|
1899
1899
|
\f\r]`, Et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ir = /-->/g, Pr = />/g, Fe = RegExp(`>|${mi}(?:([^\\s"'>=/]+)(${mi}*=${mi}*(?:[^
|
|
1900
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mr = /'/g, Dr = /"/g, Qo = /^(?:script|style|textarea|title)$/i, Tc = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), y = Tc(1),
|
|
1900
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mr = /'/g, Dr = /"/g, Qo = /^(?:script|style|textarea|title)$/i, Tc = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), y = Tc(1), _e = Symbol.for("lit-noChange"), w = Symbol.for("lit-nothing"), Ur = /* @__PURE__ */ new WeakMap(), qe = Ze.createTreeWalker(Ze, 129);
|
|
1901
1901
|
function Xo(n, e) {
|
|
1902
1902
|
if (!os(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1903
1903
|
return Rr !== void 0 ? Rr.createHTML(e) : e;
|
|
@@ -1953,7 +1953,7 @@ let Mi = class Ko {
|
|
|
1953
1953
|
};
|
|
1954
1954
|
function mt(n, e, t = n, i) {
|
|
1955
1955
|
var o, a;
|
|
1956
|
-
if (e ===
|
|
1956
|
+
if (e === _e) return e;
|
|
1957
1957
|
let s = i !== void 0 ? (o = t._$Co) == null ? void 0 : o[i] : t._$Cl;
|
|
1958
1958
|
const r = Ht(e) ? void 0 : e._$litDirective$;
|
|
1959
1959
|
return (s == null ? void 0 : s.constructor) !== r && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), r === void 0 ? s = void 0 : (s = new r(n), s._$AT(n, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = s : t._$Cl = s), s !== void 0 && (e = mt(n, s._$AS(n, e.values), s, i)), e;
|
|
@@ -2006,7 +2006,7 @@ class Qt {
|
|
|
2006
2006
|
return this._$AB;
|
|
2007
2007
|
}
|
|
2008
2008
|
_$AI(e, t = this) {
|
|
2009
|
-
e = mt(this, e, t), Ht(e) ? e === w || e == null || e === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : e !== this._$AH && e !==
|
|
2009
|
+
e = mt(this, e, t), Ht(e) ? e === w || e == null || e === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : e !== this._$AH && e !== _e && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ac(e) ? this.k(e) : this._(e);
|
|
2010
2010
|
}
|
|
2011
2011
|
O(e) {
|
|
2012
2012
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -2062,11 +2062,11 @@ class Vn {
|
|
|
2062
2062
|
_$AI(e, t = this, i, s) {
|
|
2063
2063
|
const r = this.strings;
|
|
2064
2064
|
let o = !1;
|
|
2065
|
-
if (r === void 0) e = mt(this, e, t, 0), o = !Ht(e) || e !== this._$AH && e !==
|
|
2065
|
+
if (r === void 0) e = mt(this, e, t, 0), o = !Ht(e) || e !== this._$AH && e !== _e, o && (this._$AH = e);
|
|
2066
2066
|
else {
|
|
2067
2067
|
const a = e;
|
|
2068
2068
|
let l, c;
|
|
2069
|
-
for (e = r[0], l = 0; l < r.length - 1; l++) c = mt(this, a[i + l], t, l), c ===
|
|
2069
|
+
for (e = r[0], l = 0; l < r.length - 1; l++) c = mt(this, a[i + l], t, l), c === _e && (c = this._$AH[l]), o || (o = !Ht(c) || c !== this._$AH[l]), c === w ? e = w : e !== w && (e += (c ?? "") + r[l + 1]), this._$AH[l] = c;
|
|
2070
2070
|
}
|
|
2071
2071
|
o && !s && this.j(e);
|
|
2072
2072
|
}
|
|
@@ -2095,7 +2095,7 @@ class Pc extends Vn {
|
|
|
2095
2095
|
super(e, t, i, s, r), this.type = 5;
|
|
2096
2096
|
}
|
|
2097
2097
|
_$AI(e, t = this) {
|
|
2098
|
-
if ((e = mt(this, e, t, 0) ?? w) ===
|
|
2098
|
+
if ((e = mt(this, e, t, 0) ?? w) === _e) return;
|
|
2099
2099
|
const i = this._$AH, s = e === w && i !== w || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== w && (i === w || s);
|
|
2100
2100
|
s && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
2101
2101
|
}
|
|
@@ -2154,11 +2154,11 @@ let E = class extends at {
|
|
|
2154
2154
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
2155
2155
|
}
|
|
2156
2156
|
render() {
|
|
2157
|
-
return
|
|
2157
|
+
return _e;
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
2160
|
-
var
|
|
2161
|
-
E._$litElement$ = !0, E.finalized = !0, (
|
|
2160
|
+
var Co;
|
|
2161
|
+
E._$litElement$ = !0, E.finalized = !0, (Co = We.litElementHydrateSupport) == null || Co.call(We, { LitElement: E });
|
|
2162
2162
|
const bi = We.litElementPolyfillSupport;
|
|
2163
2163
|
bi == null || bi({ LitElement: E });
|
|
2164
2164
|
(We.litElementVersions ?? (We.litElementVersions = [])).push("4.2.0");
|
|
@@ -2246,7 +2246,7 @@ const Uc = { svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" f
|
|
|
2246
2246
|
transformTagName: !1,
|
|
2247
2247
|
attachStyles: !0
|
|
2248
2248
|
};
|
|
2249
|
-
let ct, ia, Wn, sa = !1,
|
|
2249
|
+
let ct, ia, Wn, sa = !1, Cn = !1, ls = !1, ee = !1, jr = null, Di = !1;
|
|
2250
2250
|
const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} }, ra = Gn.HTMLElement || class {
|
|
2251
2251
|
}, Z = {
|
|
2252
2252
|
$flags$: 0,
|
|
@@ -2307,7 +2307,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2307
2307
|
let i = null, s = null, r = null, o = !1, a = !1, l = [];
|
|
2308
2308
|
const c = (p) => {
|
|
2309
2309
|
for (let d = 0; d < p.length; d++)
|
|
2310
|
-
i = p[d], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((o = typeof n != "function" && !cs(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ?
|
|
2310
|
+
i = p[d], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((o = typeof n != "function" && !cs(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ? _n(null, i) : i), a = o);
|
|
2311
2311
|
};
|
|
2312
2312
|
if (c(t), e) {
|
|
2313
2313
|
e.key && (s = e.key), e.name && (r = e.name);
|
|
@@ -2318,9 +2318,9 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2318
2318
|
}
|
|
2319
2319
|
if (typeof n == "function")
|
|
2320
2320
|
return n(e === null ? {} : e, l, su);
|
|
2321
|
-
const u =
|
|
2321
|
+
const u = _n(n, null);
|
|
2322
2322
|
return u.$attrs$ = e, l.length > 0 && (u.$children$ = l), u.$key$ = s, u.$name$ = r, u;
|
|
2323
|
-
},
|
|
2323
|
+
}, _n = (n, e) => {
|
|
2324
2324
|
const t = {
|
|
2325
2325
|
$flags$: 0,
|
|
2326
2326
|
$tag$: n,
|
|
@@ -2344,7 +2344,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2344
2344
|
const t = Object.assign({}, n.vattrs);
|
|
2345
2345
|
return n.vkey && (t.key = n.vkey), n.vname && (t.name = n.vname), dt(n.vtag, t, ...n.vchildren || []);
|
|
2346
2346
|
}
|
|
2347
|
-
const e =
|
|
2347
|
+
const e = _n(n.vtag, n.vtext);
|
|
2348
2348
|
return e.$attrs$ = n.vattrs, e.$children$ = n.vchildren, e.$key$ = n.vkey, e.$name$ = n.vname, e;
|
|
2349
2349
|
}, Vr = (n, e, t, i, s, r) => {
|
|
2350
2350
|
if (t !== i) {
|
|
@@ -2417,7 +2417,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2417
2417
|
i[s] && (a = En(null, t, s, n), a && (i[s].$elm$ = a, o.insertBefore(a, hs(e))));
|
|
2418
2418
|
}, ua = (n, e, t, i, s) => {
|
|
2419
2419
|
for (; e <= t; ++e)
|
|
2420
|
-
(i = n[e]) && (s = i.$elm$, fa(i),
|
|
2420
|
+
(i = n[e]) && (s = i.$elm$, fa(i), Cn = !0, s["s-ol"] ? s["s-ol"].remove() : Ft(s, !0), s.remove());
|
|
2421
2421
|
}, au = (n, e, t, i) => {
|
|
2422
2422
|
let s = 0, r = 0, o = 0, a = 0, l = e.length - 1, c = e[0], u = e[l], p = i.length - 1, d = i[0], g = i[p], m, $;
|
|
2423
2423
|
for (; s <= l && r <= p; )
|
|
@@ -2473,7 +2473,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2473
2473
|
for (; a < c; a++) {
|
|
2474
2474
|
if (e = l[a], e["s-sr"] && (t = e["s-cr"]) && t.parentNode)
|
|
2475
2475
|
for (i = t.parentNode.childNodes, s = e["s-sn"], o = i.length - 1; o >= 0; o--)
|
|
2476
|
-
t = i[o], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== e["s-hn"] && (Gr(t, s) ? (r = oe.find((u) => u.$nodeToRelocate$ === t),
|
|
2476
|
+
t = i[o], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== e["s-hn"] && (Gr(t, s) ? (r = oe.find((u) => u.$nodeToRelocate$ === t), Cn = !0, t["s-sn"] = t["s-sn"] || s, r ? r.$slotRefNode$ = e : oe.push({
|
|
2477
2477
|
$slotRefNode$: e,
|
|
2478
2478
|
$nodeToRelocate$: t
|
|
2479
2479
|
}), t["s-sr"] && oe.map((u) => {
|
|
@@ -2486,8 +2486,8 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2486
2486
|
}, Gr = (n, e) => n.nodeType === 1 ? n.getAttribute("slot") === null && e === "" || n.getAttribute("slot") === e : n["s-sn"] === e ? !0 : e === "", fa = (n) => {
|
|
2487
2487
|
n.$attrs$ && n.$attrs$.ref && n.$attrs$.ref(null), n.$children$ && n.$children$.map(fa);
|
|
2488
2488
|
}, lu = (n, e) => {
|
|
2489
|
-
const t = n.$hostElement$, i = n.$cmpMeta$, s = n.$vnode$ ||
|
|
2490
|
-
Wn = t.tagName, i.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, i.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = t[o])), r.$tag$ = null, r.$flags$ |= 4, n.$vnode$ = r, r.$elm$ = s.$elm$ = t.shadowRoot || t, ct = t["s-sc"], ia = t["s-cr"], sa = (i.$flags$ & 1) !== 0,
|
|
2489
|
+
const t = n.$hostElement$, i = n.$cmpMeta$, s = n.$vnode$ || _n(null, null), r = iu(e) ? e : dt(null, null, e);
|
|
2490
|
+
Wn = t.tagName, i.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, i.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = t[o])), r.$tag$ = null, r.$flags$ |= 4, n.$vnode$ = r, r.$elm$ = s.$elm$ = t.shadowRoot || t, ct = t["s-sc"], ia = t["s-cr"], sa = (i.$flags$ & 1) !== 0, Cn = !1, ut(s, r);
|
|
2491
2491
|
{
|
|
2492
2492
|
if (Z.$flags$ |= 1, ls) {
|
|
2493
2493
|
pa(r.$elm$);
|
|
@@ -2505,7 +2505,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2505
2505
|
} else
|
|
2506
2506
|
a.nodeType === 1 && (a.hidden = !0);
|
|
2507
2507
|
}
|
|
2508
|
-
|
|
2508
|
+
Cn && da(r.$elm$), Z.$flags$ &= -2, oe.length = 0;
|
|
2509
2509
|
}
|
|
2510
2510
|
}, cu = (n) => n, uu = (n, e, t) => {
|
|
2511
2511
|
const i = cu(n);
|
|
@@ -2633,7 +2633,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2633
2633
|
}, Su = (n) => {
|
|
2634
2634
|
const e = n["s-cr"] = fe.createComment("");
|
|
2635
2635
|
e["s-cn"] = !0, n.insertBefore(e, n.firstChild);
|
|
2636
|
-
},
|
|
2636
|
+
}, Cu = (n) => {
|
|
2637
2637
|
if ((Z.$flags$ & 1) === 0) {
|
|
2638
2638
|
const e = Zn(n);
|
|
2639
2639
|
e.$rmListeners$ && (e.$rmListeners$.map((t) => t()), e.$rmListeners$ = void 0);
|
|
@@ -2647,13 +2647,13 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2647
2647
|
const i = n.prototype.connectedCallback, s = n.prototype.disconnectedCallback;
|
|
2648
2648
|
return Object.assign(n.prototype, {
|
|
2649
2649
|
__registerHost() {
|
|
2650
|
-
|
|
2650
|
+
_u(this, t);
|
|
2651
2651
|
},
|
|
2652
2652
|
connectedCallback() {
|
|
2653
2653
|
ku(this), i && i.call(this);
|
|
2654
2654
|
},
|
|
2655
2655
|
disconnectedCallback() {
|
|
2656
|
-
|
|
2656
|
+
Cu(this), s && s.call(this);
|
|
2657
2657
|
},
|
|
2658
2658
|
__attachShadow() {
|
|
2659
2659
|
this.attachShadow({
|
|
@@ -2662,7 +2662,7 @@ const Gn = typeof window < "u" ? window : {}, fe = Gn.document || { head: {} },
|
|
|
2662
2662
|
});
|
|
2663
2663
|
}
|
|
2664
2664
|
}), n.is = t.$tagName$, $u(n, t);
|
|
2665
|
-
}, va = /* @__PURE__ */ new WeakMap(), Zn = (n) => va.get(n),
|
|
2665
|
+
}, va = /* @__PURE__ */ new WeakMap(), Zn = (n) => va.get(n), _u = (n, e) => {
|
|
2666
2666
|
const t = {
|
|
2667
2667
|
$flags$: 0,
|
|
2668
2668
|
$hostElement$: n,
|
|
@@ -2982,7 +2982,7 @@ const vt = Jt(class extends Yn {
|
|
|
2982
2982
|
const o = !!e[r];
|
|
2983
2983
|
o === this.st.has(r) || (s = this.nt) != null && s.has(r) || (o ? (t.add(r), this.st.add(r)) : (t.remove(r), this.st.delete(r)));
|
|
2984
2984
|
}
|
|
2985
|
-
return
|
|
2985
|
+
return _e;
|
|
2986
2986
|
}
|
|
2987
2987
|
});
|
|
2988
2988
|
var Yu = Object.defineProperty, Qu = (n, e, t, i) => {
|
|
@@ -2990,7 +2990,7 @@ var Yu = Object.defineProperty, Qu = (n, e, t, i) => {
|
|
|
2990
2990
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
2991
2991
|
return s && Yu(e, t, s), s;
|
|
2992
2992
|
};
|
|
2993
|
-
const
|
|
2993
|
+
const _s = class _s extends E {
|
|
2994
2994
|
constructor() {
|
|
2995
2995
|
super(...arguments), this.anchor = "BottomRight";
|
|
2996
2996
|
}
|
|
@@ -3002,7 +3002,7 @@ const Cs = class Cs extends E {
|
|
|
3002
3002
|
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), w;
|
|
3003
3003
|
}
|
|
3004
3004
|
};
|
|
3005
|
-
|
|
3005
|
+
_s.styles = [
|
|
3006
3006
|
T`
|
|
3007
3007
|
:host {
|
|
3008
3008
|
position: fixed;
|
|
@@ -3021,7 +3021,7 @@ Cs.styles = [
|
|
|
3021
3021
|
}
|
|
3022
3022
|
`
|
|
3023
3023
|
];
|
|
3024
|
-
let On =
|
|
3024
|
+
let On = _s;
|
|
3025
3025
|
Qu([
|
|
3026
3026
|
k({ attribute: !0 })
|
|
3027
3027
|
], On.prototype, "anchor");
|
|
@@ -3793,7 +3793,7 @@ function Te({ context: n, subscribe: e }) {
|
|
|
3793
3793
|
});
|
|
3794
3794
|
};
|
|
3795
3795
|
}
|
|
3796
|
-
var ch = Object.defineProperty,
|
|
3796
|
+
var ch = Object.defineProperty, Ca = (n, e, t, i) => {
|
|
3797
3797
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
3798
3798
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
3799
3799
|
return s && ch(e, t, s), s;
|
|
@@ -3997,10 +3997,10 @@ Ts.styles = T`
|
|
|
3997
3997
|
}
|
|
3998
3998
|
`;
|
|
3999
3999
|
let qt = Ts;
|
|
4000
|
-
|
|
4000
|
+
Ca([
|
|
4001
4001
|
k({ attribute: !0 })
|
|
4002
4002
|
], qt.prototype, "fullscreen");
|
|
4003
|
-
|
|
4003
|
+
Ca([
|
|
4004
4004
|
k({ attribute: !1 }),
|
|
4005
4005
|
lh({ context: ge })
|
|
4006
4006
|
], qt.prototype, "application");
|
|
@@ -4121,7 +4121,7 @@ class hh {
|
|
|
4121
4121
|
class lo {
|
|
4122
4122
|
constructor(e, t, i, s, r) {
|
|
4123
4123
|
this.id = e, this.providerKey = t, this.providerOptions = i, this.component = r, this.provider$ = new ae(null), this.entries$ = new ae([]), this.removeEntryAction$ = new P(), this.kill$ = new P(), this.isTyping$ = new ae(!1), this.data$ = new ae({}), this.complete$ = this.provider$.pipe(
|
|
4124
|
-
|
|
4124
|
+
Ce((l) => l ? l.onComplete() : Xe)
|
|
4125
4125
|
);
|
|
4126
4126
|
const o = this._getProviderFactory(t);
|
|
4127
4127
|
if (!o)
|
|
@@ -4164,7 +4164,7 @@ class lo {
|
|
|
4164
4164
|
}
|
|
4165
4165
|
_addEntryRemoveHandler(e) {
|
|
4166
4166
|
e.remove$.pipe(
|
|
4167
|
-
|
|
4167
|
+
Ce(() => this.entries$),
|
|
4168
4168
|
he(1)
|
|
4169
4169
|
).subscribe((t) => {
|
|
4170
4170
|
this.removeEntryAction$.next(e), this.entries$.next(t.filter((i) => i !== e));
|
|
@@ -4275,8 +4275,8 @@ class dh {
|
|
|
4275
4275
|
class ph {
|
|
4276
4276
|
constructor(e, t) {
|
|
4277
4277
|
this.state$ = e, this.component = t, this.entries$ = new ae([]), this.session = () => this.session$, this.isTyping = () => this.isTyping$, this.entries = () => this.entries$.asObservable(), this.sessionService = new dh(this.component), this.session$ = this.sessionService.currentSession(), this.isTyping$ = this.session$.pipe(
|
|
4278
|
-
|
|
4279
|
-
|
|
4278
|
+
Ce((i) => i ? i.provider$.pipe(
|
|
4279
|
+
Ce((s) => s ? s.isTyping() : Oi(!1))
|
|
4280
4280
|
) : Oi(!1))
|
|
4281
4281
|
), e.subscribe((i) => {
|
|
4282
4282
|
switch (i) {
|
|
@@ -4301,7 +4301,7 @@ class ph {
|
|
|
4301
4301
|
}
|
|
4302
4302
|
rehydrate() {
|
|
4303
4303
|
this.session$.pipe(
|
|
4304
|
-
|
|
4304
|
+
Ce((e) => {
|
|
4305
4305
|
if (!e)
|
|
4306
4306
|
return Xe;
|
|
4307
4307
|
const t = e.removeEntryAction$.pipe(Ri(this.entries$)).pipe(
|
|
@@ -4569,7 +4569,7 @@ let Ln = Ls;
|
|
|
4569
4569
|
gh([
|
|
4570
4570
|
k({ attribute: !1 })
|
|
4571
4571
|
], Ln.prototype, "entry");
|
|
4572
|
-
var mh = Object.defineProperty,
|
|
4572
|
+
var mh = Object.defineProperty, _a = (n, e, t, i) => {
|
|
4573
4573
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
4574
4574
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
4575
4575
|
return s && mh(e, t, s), s;
|
|
@@ -4630,10 +4630,10 @@ Rs.styles = [
|
|
|
4630
4630
|
`
|
|
4631
4631
|
];
|
|
4632
4632
|
let Vt = Rs;
|
|
4633
|
-
|
|
4633
|
+
_a([
|
|
4634
4634
|
k({ attribute: !1 })
|
|
4635
4635
|
], Vt.prototype, "entries");
|
|
4636
|
-
|
|
4636
|
+
_a([
|
|
4637
4637
|
k({ type: Boolean })
|
|
4638
4638
|
], Vt.prototype, "loading");
|
|
4639
4639
|
/**
|
|
@@ -4757,7 +4757,7 @@ class Fi extends Yn {
|
|
|
4757
4757
|
}
|
|
4758
4758
|
render(e) {
|
|
4759
4759
|
if (e === w || e == null) return this._t = void 0, this.it = e;
|
|
4760
|
-
if (e ===
|
|
4760
|
+
if (e === _e) return e;
|
|
4761
4761
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
4762
4762
|
if (e === this.it) return this._t;
|
|
4763
4763
|
this.it = e;
|
|
@@ -4795,7 +4795,7 @@ Bi || (Bi = function(e, t, i) {
|
|
|
4795
4795
|
qi || (qi = function(e, t) {
|
|
4796
4796
|
return new e(...t);
|
|
4797
4797
|
});
|
|
4798
|
-
const dn = Q(Array.prototype.forEach), Sh = Q(Array.prototype.lastIndexOf), uo = Q(Array.prototype.pop), At = Q(Array.prototype.push),
|
|
4798
|
+
const dn = Q(Array.prototype.forEach), Sh = Q(Array.prototype.lastIndexOf), uo = Q(Array.prototype.pop), At = Q(Array.prototype.push), Ch = Q(Array.prototype.splice), vn = Q(String.prototype.toLowerCase), xi = Q(String.prototype.toString), ho = Q(String.prototype.match), Tt = Q(String.prototype.replace), _h = Q(String.prototype.indexOf), Eh = Q(String.prototype.trim), re = Q(Object.prototype.hasOwnProperty), V = Q(RegExp.prototype.test), Ot = Ah(TypeError);
|
|
4799
4799
|
function Q(n) {
|
|
4800
4800
|
return function(e) {
|
|
4801
4801
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -4852,7 +4852,7 @@ function Lt(n, e) {
|
|
|
4852
4852
|
}
|
|
4853
4853
|
return t;
|
|
4854
4854
|
}
|
|
4855
|
-
const po = Y(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ki = Y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Si = Y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Oh = Y(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]),
|
|
4855
|
+
const po = Y(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ki = Y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Si = Y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Oh = Y(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ci = Y(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Lh = Y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), fo = Y(["#text"]), go = Y(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), _i = Y(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), mo = Y(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), pn = Y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Rh = te(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ih = te(/<%[\w\W]*|[\w\W]*%>/gm), Ph = te(/\$\{[\w\W]*/gm), Mh = te(/^data-[\-\w.\u00B7-\uFFFF]+$/), Dh = te(/^aria-[\-\w]+$/), Ta = te(
|
|
4856
4856
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
4857
4857
|
// eslint-disable-line no-useless-escape
|
|
4858
4858
|
), Uh = te(/^(?:\w+script|data):/i), Nh = te(
|
|
@@ -4960,9 +4960,9 @@ function La() {
|
|
|
4960
4960
|
let {
|
|
4961
4961
|
IS_ALLOWED_URI: Qs
|
|
4962
4962
|
} = vo, D = null;
|
|
4963
|
-
const Xs = x({}, [...po, ...ki, ...Si, ...
|
|
4963
|
+
const Xs = x({}, [...po, ...ki, ...Si, ...Ci, ...fo]);
|
|
4964
4964
|
let N = null;
|
|
4965
|
-
const Ks = x({}, [...go, ...
|
|
4965
|
+
const Ks = x({}, [...go, ..._i, ...mo, ...pn]);
|
|
4966
4966
|
let R = Object.seal(Aa(null, {
|
|
4967
4967
|
tagNameCheck: {
|
|
4968
4968
|
writable: !0,
|
|
@@ -4994,7 +4994,7 @@ function La() {
|
|
|
4994
4994
|
const nl = x({}, [on, an, ve], xi);
|
|
4995
4995
|
let ln = x({}, ["mi", "mo", "mn", "ms", "mtext"]), cn = x({}, ["annotation-xml"]);
|
|
4996
4996
|
const il = x({}, ["title", "style", "font", "a", "script"]);
|
|
4997
|
-
let
|
|
4997
|
+
let Ct = null;
|
|
4998
4998
|
const sl = ["application/xhtml+xml", "text/html"], rl = "text/html";
|
|
4999
4999
|
let U = null, rt = null;
|
|
5000
5000
|
const ol = t.createElement("form"), lr = function(h) {
|
|
@@ -5002,8 +5002,8 @@ function La() {
|
|
|
5002
5002
|
}, ci = function() {
|
|
5003
5003
|
let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5004
5004
|
if (!(rt && rt === h)) {
|
|
5005
|
-
if ((!h || typeof h != "object") && (h = {}), h = xe(h),
|
|
5006
|
-
sl.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? rl : h.PARSER_MEDIA_TYPE, U =
|
|
5005
|
+
if ((!h || typeof h != "object") && (h = {}), h = xe(h), Ct = // eslint-disable-next-line unicorn/prefer-includes
|
|
5006
|
+
sl.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? rl : h.PARSER_MEDIA_TYPE, U = Ct === "application/xhtml+xml" ? xi : vn, D = re(h, "ALLOWED_TAGS") ? x({}, h.ALLOWED_TAGS, U) : Xs, N = re(h, "ALLOWED_ATTR") ? x({}, h.ALLOWED_ATTR, U) : Ks, li = re(h, "ALLOWED_NAMESPACES") ? x({}, h.ALLOWED_NAMESPACES, xi) : nl, oi = re(h, "ADD_URI_SAFE_ATTR") ? x(xe(ar), h.ADD_URI_SAFE_ATTR, U) : ar, rr = re(h, "ADD_DATA_URI_TAGS") ? x(xe(or), h.ADD_DATA_URI_TAGS, U) : or, it = re(h, "FORBID_CONTENTS") ? x({}, h.FORBID_CONTENTS, U) : sr, kt = re(h, "FORBID_TAGS") ? x({}, h.FORBID_TAGS, U) : xe({}), ti = re(h, "FORBID_ATTR") ? x({}, h.FORBID_ATTR, U) : xe({}), nt = re(h, "USE_PROFILES") ? h.USE_PROFILES : !1, Js = h.ALLOW_ARIA_ATTR !== !1, ni = h.ALLOW_DATA_ATTR !== !1, er = h.ALLOW_UNKNOWN_PROTOCOLS || !1, tr = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, et = h.SAFE_FOR_TEMPLATES || !1, nn = h.SAFE_FOR_XML !== !1, He = h.WHOLE_DOCUMENT || !1, tt = h.RETURN_DOM || !1, sn = h.RETURN_DOM_FRAGMENT || !1, rn = h.RETURN_TRUSTED_TYPE || !1, si = h.FORCE_BODY || !1, nr = h.SANITIZE_DOM !== !1, ir = h.SANITIZE_NAMED_PROPS || !1, ri = h.KEEP_CONTENT !== !1, St = h.IN_PLACE || !1, Qs = h.ALLOWED_URI_REGEXP || Ta, st = h.NAMESPACE || ve, ln = h.MATHML_TEXT_INTEGRATION_POINTS || ln, cn = h.HTML_INTEGRATION_POINTS || cn, R = h.CUSTOM_ELEMENT_HANDLING || {}, h.CUSTOM_ELEMENT_HANDLING && lr(h.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = h.CUSTOM_ELEMENT_HANDLING.tagNameCheck), h.CUSTOM_ELEMENT_HANDLING && lr(h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (R.attributeNameCheck = h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), h.CUSTOM_ELEMENT_HANDLING && typeof h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), et && (ni = !1), sn && (tt = !0), nt && (D = x({}, fo), N = [], nt.html === !0 && (x(D, po), x(N, go)), nt.svg === !0 && (x(D, ki), x(N, _i), x(N, pn)), nt.svgFilters === !0 && (x(D, Si), x(N, _i), x(N, pn)), nt.mathMl === !0 && (x(D, Ci), x(N, mo), x(N, pn))), h.ADD_TAGS && (D === Xs && (D = xe(D)), x(D, h.ADD_TAGS, U)), h.ADD_ATTR && (N === Ks && (N = xe(N)), x(N, h.ADD_ATTR, U)), h.ADD_URI_SAFE_ATTR && x(oi, h.ADD_URI_SAFE_ATTR, U), h.FORBID_CONTENTS && (it === sr && (it = xe(it)), x(it, h.FORBID_CONTENTS, U)), ri && (D["#text"] = !0), He && x(D, ["html", "head", "body"]), D.table && (x(D, ["tbody"]), delete kt.tbody), h.TRUSTED_TYPES_POLICY) {
|
|
5007
5007
|
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
5008
5008
|
throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
5009
5009
|
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -5013,14 +5013,14 @@ function La() {
|
|
|
5013
5013
|
M === void 0 && (M = Hh(g, s)), M !== null && typeof Ne == "string" && (Ne = M.createHTML(""));
|
|
5014
5014
|
Y && Y(h), rt = h;
|
|
5015
5015
|
}
|
|
5016
|
-
}, cr = x({}, [...ki, ...Si, ...Oh]), ur = x({}, [...
|
|
5016
|
+
}, cr = x({}, [...ki, ...Si, ...Oh]), ur = x({}, [...Ci, ...Lh]), al = function(h) {
|
|
5017
5017
|
let f = Ue(h);
|
|
5018
5018
|
(!f || !f.tagName) && (f = {
|
|
5019
5019
|
namespaceURI: st,
|
|
5020
5020
|
tagName: "template"
|
|
5021
5021
|
});
|
|
5022
5022
|
const v = vn(h.tagName), L = vn(f.tagName);
|
|
5023
|
-
return li[h.namespaceURI] ? h.namespaceURI === an ? f.namespaceURI === ve ? v === "svg" : f.namespaceURI === on ? v === "svg" && (L === "annotation-xml" || ln[L]) : !!cr[v] : h.namespaceURI === on ? f.namespaceURI === ve ? v === "math" : f.namespaceURI === an ? v === "math" && cn[L] : !!ur[v] : h.namespaceURI === ve ? f.namespaceURI === an && !cn[L] || f.namespaceURI === on && !ln[L] ? !1 : !ur[v] && (il[v] || !cr[v]) : !!(
|
|
5023
|
+
return li[h.namespaceURI] ? h.namespaceURI === an ? f.namespaceURI === ve ? v === "svg" : f.namespaceURI === on ? v === "svg" && (L === "annotation-xml" || ln[L]) : !!cr[v] : h.namespaceURI === on ? f.namespaceURI === ve ? v === "math" : f.namespaceURI === an ? v === "math" && cn[L] : !!ur[v] : h.namespaceURI === ve ? f.namespaceURI === an && !cn[L] || f.namespaceURI === on && !ln[L] ? !1 : !ur[v] && (il[v] || !cr[v]) : !!(Ct === "application/xhtml+xml" && li[h.namespaceURI]) : !1;
|
|
5024
5024
|
}, ce = function(h) {
|
|
5025
5025
|
At(e.removed, {
|
|
5026
5026
|
element: h
|
|
@@ -5061,11 +5061,11 @@ function La() {
|
|
|
5061
5061
|
const I = ho(h, /^[\r\n\t ]+/);
|
|
5062
5062
|
v = I && I[0];
|
|
5063
5063
|
}
|
|
5064
|
-
|
|
5064
|
+
Ct === "application/xhtml+xml" && st === ve && (h = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + h + "</body></html>");
|
|
5065
5065
|
const L = M ? M.createHTML(h) : h;
|
|
5066
5066
|
if (st === ve)
|
|
5067
5067
|
try {
|
|
5068
|
-
f = new d().parseFromString(L,
|
|
5068
|
+
f = new d().parseFromString(L, Ct);
|
|
5069
5069
|
} catch {
|
|
5070
5070
|
}
|
|
5071
5071
|
if (!f || !f.documentElement) {
|
|
@@ -5141,7 +5141,7 @@ function La() {
|
|
|
5141
5141
|
) return !1;
|
|
5142
5142
|
} else if (!oi[f]) {
|
|
5143
5143
|
if (!V(Qs, Tt(v, Ys, ""))) {
|
|
5144
|
-
if (!((f === "src" || f === "xlink:href" || f === "href") && h !== "script" &&
|
|
5144
|
+
if (!((f === "src" || f === "xlink:href" || f === "href") && h !== "script" && _h(v, "data:") === 0 && rr[h])) {
|
|
5145
5145
|
if (!(er && !V(Ja, Tt(v, Ys, "")))) {
|
|
5146
5146
|
if (v)
|
|
5147
5147
|
return !1;
|
|
@@ -5174,9 +5174,9 @@ function La() {
|
|
|
5174
5174
|
name: I,
|
|
5175
5175
|
namespaceURI: X,
|
|
5176
5176
|
value: ye
|
|
5177
|
-
} = H,
|
|
5177
|
+
} = H, _t = U(I), hi = ye;
|
|
5178
5178
|
let F = I === "value" ? hi : Eh(hi);
|
|
5179
|
-
if (v.attrName =
|
|
5179
|
+
if (v.attrName = _t, v.attrValue = F, v.keepAttr = !0, v.forceKeepAttr = void 0, be(q.uponSanitizeAttribute, h, v), F = v.attrValue, ir && (_t === "id" || _t === "name") && (ot(I, h), F = tl + F), nn && V(/((--!?|])>)|<\/(style|title)/i, F)) {
|
|
5180
5180
|
ot(I, h);
|
|
5181
5181
|
continue;
|
|
5182
5182
|
}
|
|
@@ -5194,12 +5194,12 @@ function La() {
|
|
|
5194
5194
|
F = Tt(F, yr, " ");
|
|
5195
5195
|
});
|
|
5196
5196
|
const br = U(h.nodeName);
|
|
5197
|
-
if (!gr(br,
|
|
5197
|
+
if (!gr(br, _t, F)) {
|
|
5198
5198
|
ot(I, h);
|
|
5199
5199
|
continue;
|
|
5200
5200
|
}
|
|
5201
5201
|
if (M && typeof g == "object" && typeof g.getAttributeType == "function" && !X)
|
|
5202
|
-
switch (g.getAttributeType(br,
|
|
5202
|
+
switch (g.getAttributeType(br, _t)) {
|
|
5203
5203
|
case "TrustedHTML": {
|
|
5204
5204
|
F = M.createHTML(F);
|
|
5205
5205
|
break;
|
|
@@ -5282,7 +5282,7 @@ function La() {
|
|
|
5282
5282
|
}, e.removeHook = function(b, h) {
|
|
5283
5283
|
if (h !== void 0) {
|
|
5284
5284
|
const f = Sh(q[b], h);
|
|
5285
|
-
return f === -1 ? void 0 :
|
|
5285
|
+
return f === -1 ? void 0 : Ch(q[b], f, 1)[0];
|
|
5286
5286
|
}
|
|
5287
5287
|
return uo(q[b]);
|
|
5288
5288
|
}, e.removeHooks = function(b) {
|
|
@@ -5363,7 +5363,7 @@ function Ia(n) {
|
|
|
5363
5363
|
Ke = n;
|
|
5364
5364
|
}
|
|
5365
5365
|
var Nt = { exec: () => null };
|
|
5366
|
-
function
|
|
5366
|
+
function C(n, e = "") {
|
|
5367
5367
|
let t = typeof n == "string" ? n : n.source;
|
|
5368
5368
|
const i = {
|
|
5369
5369
|
replace: (s, r) => {
|
|
@@ -5431,10 +5431,10 @@ var W = {
|
|
|
5431
5431
|
fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`),
|
|
5432
5432
|
headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`),
|
|
5433
5433
|
htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
5434
|
-
}, qh = /^(?:[ \t]*(?:\n|$))+/, Vh = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Wh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, tn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Gh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fs = /(?:[*+-]|\d{1,9}[.)])/, Pa = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ma =
|
|
5434
|
+
}, qh = /^(?:[ \t]*(?:\n|$))+/, Vh = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Wh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, tn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Gh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fs = /(?:[*+-]|\d{1,9}[.)])/, Pa = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ma = C(Pa).replace(/bull/g, fs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Zh = C(Pa).replace(/bull/g, fs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), gs = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Yh = /^[^\n]+/, ms = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Qh = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ms).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Xh = C(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, fs).getRegex(), Qn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", vs = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Kh = C(
|
|
5435
5435
|
"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
|
|
5436
5436
|
"i"
|
|
5437
|
-
).replace("comment", vs).replace("tag", Qn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Da =
|
|
5437
|
+
).replace("comment", vs).replace("tag", Qn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Da = C(gs).replace("hr", tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), Jh = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Da).getRegex(), bs = {
|
|
5438
5438
|
blockquote: Jh,
|
|
5439
5439
|
code: Vh,
|
|
5440
5440
|
def: Qh,
|
|
@@ -5448,16 +5448,16 @@ var W = {
|
|
|
5448
5448
|
paragraph: Da,
|
|
5449
5449
|
table: Nt,
|
|
5450
5450
|
text: Yh
|
|
5451
|
-
}, yo =
|
|
5451
|
+
}, yo = C(
|
|
5452
5452
|
"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
|
|
5453
5453
|
).replace("hr", tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), ed = {
|
|
5454
5454
|
...bs,
|
|
5455
5455
|
lheading: Zh,
|
|
5456
5456
|
table: yo,
|
|
5457
|
-
paragraph:
|
|
5457
|
+
paragraph: C(gs).replace("hr", tn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", yo).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex()
|
|
5458
5458
|
}, td = {
|
|
5459
5459
|
...bs,
|
|
5460
|
-
html:
|
|
5460
|
+
html: C(
|
|
5461
5461
|
`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
|
|
5462
5462
|
).replace("comment", vs).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
5463
5463
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
@@ -5465,14 +5465,14 @@ var W = {
|
|
|
5465
5465
|
fences: Nt,
|
|
5466
5466
|
// fences not supported
|
|
5467
5467
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
5468
|
-
paragraph:
|
|
5468
|
+
paragraph: C(gs).replace("hr", tn).replace("heading", ` *#{1,6} *[^
|
|
5469
5469
|
]`).replace("lheading", Ma).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
5470
|
-
}, nd = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, id = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ua = /^( {2,}|\\)\n(?!\s*$)/, sd = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Xn = /[\p{P}\p{S}]/u, ys = /[\s\p{P}\p{S}]/u, Na = /[^\s\p{P}\p{S}]/u, rd =
|
|
5470
|
+
}, nd = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, id = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ua = /^( {2,}|\\)\n(?!\s*$)/, sd = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Xn = /[\p{P}\p{S}]/u, ys = /[\s\p{P}\p{S}]/u, Na = /[^\s\p{P}\p{S}]/u, rd = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ys).getRegex(), za = /(?!~)[\p{P}\p{S}]/u, od = /(?!~)[\s\p{P}\p{S}]/u, ad = /(?:[^\s\p{P}\p{S}]|~)/u, ld = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, ja = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, cd = C(ja, "u").replace(/punct/g, Xn).getRegex(), ud = C(ja, "u").replace(/punct/g, za).getRegex(), Ha = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", hd = C(Ha, "gu").replace(/notPunctSpace/g, Na).replace(/punctSpace/g, ys).replace(/punct/g, Xn).getRegex(), dd = C(Ha, "gu").replace(/notPunctSpace/g, ad).replace(/punctSpace/g, od).replace(/punct/g, za).getRegex(), pd = C(
|
|
5471
5471
|
"^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
|
|
5472
5472
|
"gu"
|
|
5473
|
-
).replace(/notPunctSpace/g, Na).replace(/punctSpace/g, ys).replace(/punct/g, Xn).getRegex(), fd =
|
|
5473
|
+
).replace(/notPunctSpace/g, Na).replace(/punctSpace/g, ys).replace(/punct/g, Xn).getRegex(), fd = C(/\\(punct)/, "gu").replace(/punct/g, Xn).getRegex(), gd = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), md = C(vs).replace("(?:-->|$)", "-->").getRegex(), vd = C(
|
|
5474
5474
|
"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
|
|
5475
|
-
).replace("comment", md).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Pn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, bd =
|
|
5475
|
+
).replace("comment", md).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Pn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, bd = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Pn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Fa = C(/^!?\[(label)\]\[(ref)\]/).replace("label", Pn).replace("ref", ms).getRegex(), Ba = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", ms).getRegex(), yd = C("reflink|nolink(?!\\()", "g").replace("reflink", Fa).replace("nolink", Ba).getRegex(), $s = {
|
|
5476
5476
|
_backpedal: Nt,
|
|
5477
5477
|
// only used for GFM url
|
|
5478
5478
|
anyPunctuation: fd,
|
|
@@ -5495,20 +5495,20 @@ var W = {
|
|
|
5495
5495
|
url: Nt
|
|
5496
5496
|
}, $d = {
|
|
5497
5497
|
...$s,
|
|
5498
|
-
link:
|
|
5499
|
-
reflink:
|
|
5498
|
+
link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", Pn).getRegex(),
|
|
5499
|
+
reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Pn).getRegex()
|
|
5500
5500
|
}, Vi = {
|
|
5501
5501
|
...$s,
|
|
5502
5502
|
emStrongRDelimAst: dd,
|
|
5503
5503
|
emStrongLDelim: ud,
|
|
5504
|
-
url:
|
|
5504
|
+
url: C(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
5505
5505
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
5506
5506
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
5507
5507
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
5508
5508
|
}, wd = {
|
|
5509
5509
|
...Vi,
|
|
5510
|
-
br:
|
|
5511
|
-
text:
|
|
5510
|
+
br: C(Ua).replace("{2,}", "*").getRegex(),
|
|
5511
|
+
text: C(Vi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
5512
5512
|
}, fn = {
|
|
5513
5513
|
normal: bs,
|
|
5514
5514
|
gfm: ed,
|
|
@@ -6700,7 +6700,7 @@ ${n}</tr>
|
|
|
6700
6700
|
"preprocess",
|
|
6701
6701
|
"postprocess",
|
|
6702
6702
|
"processAllTokens"
|
|
6703
|
-
])), Ei),
|
|
6703
|
+
])), Ei), Cd = class {
|
|
6704
6704
|
constructor(...n) {
|
|
6705
6705
|
A(this, "defaults", ps());
|
|
6706
6706
|
A(this, "options", this.setOptions);
|
|
@@ -6872,7 +6872,7 @@ Please report this to https://github.com/markedjs/marked.`, n) {
|
|
|
6872
6872
|
throw t;
|
|
6873
6873
|
};
|
|
6874
6874
|
}
|
|
6875
|
-
}, Qe = new
|
|
6875
|
+
}, Qe = new Cd();
|
|
6876
6876
|
function S(n, e) {
|
|
6877
6877
|
return Qe.parse(n, e);
|
|
6878
6878
|
}
|
|
@@ -6904,10 +6904,10 @@ S.walkTokens;
|
|
|
6904
6904
|
S.parseInline;
|
|
6905
6905
|
Se.parse;
|
|
6906
6906
|
ke.lex;
|
|
6907
|
-
var
|
|
6907
|
+
var _d = Object.defineProperty, qa = (n, e, t, i) => {
|
|
6908
6908
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
6909
6909
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
6910
|
-
return s &&
|
|
6910
|
+
return s && _d(e, t, s), s;
|
|
6911
6911
|
};
|
|
6912
6912
|
const Va = new Wt();
|
|
6913
6913
|
Va.link = function({ href: n, title: e, text: t }) {
|
|
@@ -7148,7 +7148,7 @@ customElements.get("ace-lightbox") || customElements.define("ace-lightbox", Dn);
|
|
|
7148
7148
|
const So = ka(E), Ns = class Ns extends So {
|
|
7149
7149
|
constructor() {
|
|
7150
7150
|
super(...arguments), this.message = "", this.disabledInput = !1, this.disabledSkipToLatest = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.isMuted = !1, this.conversationContentRef = de(), this.conversationFeedRef = de(), this.formRef = de(), this.inputRef = de(), this.scrollRef = de(), this.counterRef = de(), this.chatScrollHeight = 0, this.chatCurrentScrollPosition = 0, this.toast = new hh(this), this.messageMaxLength = 1e3, this.messageMaxLengthLabel = "Maximum character limit reached", this.skipToLatestMessageLabel = "Skip to latest message", this.platform = null, this.entries = [], this.typing = !1, this.conversationState$ = new ae("waiting"), this.stateMachine = new ph(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
|
|
7151
|
-
|
|
7151
|
+
Ce((e) => e ? e == null ? void 0 : e.provider$ : Oi(null))
|
|
7152
7152
|
), this.userTyping$ = new P();
|
|
7153
7153
|
}
|
|
7154
7154
|
async connectedCallback() {
|
|
@@ -7710,7 +7710,61 @@ Oe([
|
|
|
7710
7710
|
Oe([
|
|
7711
7711
|
O()
|
|
7712
7712
|
], le.prototype, "typing");
|
|
7713
|
-
|
|
7713
|
+
class Od {
|
|
7714
|
+
constructor(e) {
|
|
7715
|
+
this.url = "", this.maxRetries = 300, this.orderRef = "", this.tunnistusUrl = "", this.url = `${e.idHubUrl}/${e.idHubCustomerKey}/${e.idHubOrgKey}/${e.idHubEidType.toLowerCase()}`, this.maxRetries = e.idHubMaxRetries;
|
|
7716
|
+
}
|
|
7717
|
+
async auth() {
|
|
7718
|
+
console.log("\x1B[31mID-Hub \x1B[32m - Initializing auth");
|
|
7719
|
+
try {
|
|
7720
|
+
const t = await (await fetch(this.url + "/auth", {
|
|
7721
|
+
headers: {
|
|
7722
|
+
accept: "application/json",
|
|
7723
|
+
"accept-language": "sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7",
|
|
7724
|
+
"content-type": "application/json"
|
|
7725
|
+
},
|
|
7726
|
+
body: `{
|
|
7727
|
+
"clientName": "idhub-web-1.0.0",
|
|
7728
|
+
"register": {
|
|
7729
|
+
"clientType": "ACEWIDGET",
|
|
7730
|
+
"agentId": "ACEWIDGET",
|
|
7731
|
+
"userName": "ACEWIDGET"
|
|
7732
|
+
}
|
|
7733
|
+
}`,
|
|
7734
|
+
method: "POST"
|
|
7735
|
+
})).json();
|
|
7736
|
+
return console.log("\x1B[31mID-Hub \x1B[32m - Initializing result", t), this.tunnistusUrl = t.tunnistusURL, this.orderRef = t.orderRef, this.tunnistusUrl;
|
|
7737
|
+
} catch {
|
|
7738
|
+
return;
|
|
7739
|
+
}
|
|
7740
|
+
}
|
|
7741
|
+
async collectPolling() {
|
|
7742
|
+
let e = this.maxRetries, t;
|
|
7743
|
+
do
|
|
7744
|
+
await new Promise((i) => setTimeout(i, 1e3)), t = await this.collect(), e--;
|
|
7745
|
+
while (t.status == "pending" && e > 0);
|
|
7746
|
+
return t;
|
|
7747
|
+
}
|
|
7748
|
+
async collect() {
|
|
7749
|
+
if (this.orderRef === "")
|
|
7750
|
+
throw new Error("OrderRef is missing");
|
|
7751
|
+
const t = await (await fetch(this.url + "/collect", {
|
|
7752
|
+
headers: {
|
|
7753
|
+
accept: "application/json",
|
|
7754
|
+
"accept-language": "sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7",
|
|
7755
|
+
"content-type": "application/json"
|
|
7756
|
+
},
|
|
7757
|
+
body: `{
|
|
7758
|
+
"clientName": "idhub-web-1.0.0",
|
|
7759
|
+
"orderRef": "${this.orderRef}",
|
|
7760
|
+
"method": "auth"
|
|
7761
|
+
}`,
|
|
7762
|
+
method: "POST"
|
|
7763
|
+
})).json();
|
|
7764
|
+
return console.log("\x1B[31mID-Hub \x1B[32m - Collect result", t), t;
|
|
7765
|
+
}
|
|
7766
|
+
}
|
|
7767
|
+
const we = (n) => n.objectType === "info", Ld = (n) => n.objectType === "chatEntry", Rd = (n) => n.objectType === "pen", Id = (n) => n.objectType === "chatButtonClicked", Pd = (n) => n.objectType === "endVideoButtonClicked", Md = (n) => n.type === "queue-status", Dd = (n) => n.type === "established", Ud = (n) => n.type === "pen-status", Nd = (n) => n.type === "prepareVideo", zd = (n) => n.type === "videoPrepared", jd = (n) => n.type === "chatButtonClicked", Hd = (n) => n.type === "endVideoButtonClicked", Fd = (n) => n.type === "chat-ended";
|
|
7714
7768
|
class Un extends Error {
|
|
7715
7769
|
constructor(e) {
|
|
7716
7770
|
super(e), this.name = "EngineException";
|
|
@@ -7849,17 +7903,22 @@ class xs {
|
|
|
7849
7903
|
return e.replace(/\/+$/, "");
|
|
7850
7904
|
}
|
|
7851
7905
|
}
|
|
7852
|
-
const
|
|
7906
|
+
const Bd = () => "10000000-1000-4000-8000-100000000000".replace(
|
|
7853
7907
|
/[018]/g,
|
|
7854
7908
|
(n) => (+n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +n / 4).toString(16)
|
|
7855
|
-
), Zi = () => typeof crypto.randomUUID == "function" ? crypto.randomUUID() :
|
|
7909
|
+
), Zi = () => typeof crypto.randomUUID == "function" ? crypto.randomUUID() : Bd();
|
|
7856
7910
|
function Yi(n) {
|
|
7857
7911
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n);
|
|
7858
7912
|
}
|
|
7859
7913
|
function Wa(n) {
|
|
7860
7914
|
return n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
7861
7915
|
}
|
|
7862
|
-
|
|
7916
|
+
function qd(n) {
|
|
7917
|
+
return decodeURIComponent(
|
|
7918
|
+
atob(n).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
7919
|
+
);
|
|
7920
|
+
}
|
|
7921
|
+
class Vd {
|
|
7863
7922
|
constructor(e, t) {
|
|
7864
7923
|
this.config = e, this.messageSubject$ = new P(), this.actionsSubject$ = new P(), this.messages = () => this.messageSubject$.asObservable(), this.actions = () => this.actionsSubject$.asObservable(), this.sessionId = "", this.lastObjectId = 0, this.sessionId = t ?? Zi(), this.client = new xs(this.config.engineUrl, this.config.engineTimeout);
|
|
7865
7924
|
}
|
|
@@ -7877,7 +7936,7 @@ class Bd {
|
|
|
7877
7936
|
text: this.config.errorMessage ?? "An error occured",
|
|
7878
7937
|
source: "system"
|
|
7879
7938
|
}), new j())),
|
|
7880
|
-
|
|
7939
|
+
Ce(() => this.poll().pipe(
|
|
7881
7940
|
pi(() => this.poll()),
|
|
7882
7941
|
// Using concatMap here to ensure that each http request gets handled in order
|
|
7883
7942
|
fi()
|
|
@@ -7904,7 +7963,7 @@ class Bd {
|
|
|
7904
7963
|
text: this.config.errorMessage ?? "An error occured",
|
|
7905
7964
|
source: "system"
|
|
7906
7965
|
}), new j())),
|
|
7907
|
-
|
|
7966
|
+
Ce(() => this.poll().pipe(
|
|
7908
7967
|
pi(() => this.poll()),
|
|
7909
7968
|
// Using concatMap here to ensure that each http request gets handled in order
|
|
7910
7969
|
fi()
|
|
@@ -7981,12 +8040,12 @@ class Bd {
|
|
|
7981
8040
|
}
|
|
7982
8041
|
processMessages(e) {
|
|
7983
8042
|
e.dataObjects.forEach((t) => {
|
|
7984
|
-
|
|
8043
|
+
Ld(t) && t.source && t.objectId >= this.lastObjectId && this.messageSubject$.next({
|
|
7985
8044
|
text: t.message,
|
|
7986
8045
|
source: t.source,
|
|
7987
8046
|
invitationNo: t.invitationNo.toString(),
|
|
7988
8047
|
alias: t.alias
|
|
7989
|
-
}),
|
|
8048
|
+
}), Rd(t) && this.actionsSubject$.next({
|
|
7990
8049
|
penStatus: t.penStatus,
|
|
7991
8050
|
type: "pen-status"
|
|
7992
8051
|
}), we(t) && t.infoType === "queue" && this.actionsSubject$.next({
|
|
@@ -8008,10 +8067,10 @@ class Bd {
|
|
|
8008
8067
|
agent: t.agent,
|
|
8009
8068
|
type: "videoPrepared",
|
|
8010
8069
|
userUrl: t.userUrl
|
|
8011
|
-
}),
|
|
8070
|
+
}), Id(t) && this.actionsSubject$.next({
|
|
8012
8071
|
guestId: t.guestId,
|
|
8013
8072
|
type: "chatButtonClicked"
|
|
8014
|
-
}),
|
|
8073
|
+
}), Pd(t) && this.actionsSubject$.next({
|
|
8015
8074
|
guestId: t.guestId,
|
|
8016
8075
|
type: "endVideoButtonClicked"
|
|
8017
8076
|
}), we(t) && ["afterChat", "finished"].includes(t.infoType) && this.actionsSubject$.next({
|
|
@@ -8100,10 +8159,10 @@ class Ie {
|
|
|
8100
8159
|
this._email = "", this._host.requestUpdate();
|
|
8101
8160
|
}
|
|
8102
8161
|
}
|
|
8103
|
-
var
|
|
8162
|
+
var Wd = Object.defineProperty, xt = (n, e, t, i) => {
|
|
8104
8163
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8105
8164
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8106
|
-
return s &&
|
|
8165
|
+
return s && Wd(e, t, s), s;
|
|
8107
8166
|
}, ft;
|
|
8108
8167
|
let Je = (ft = class extends E {
|
|
8109
8168
|
constructor() {
|
|
@@ -8340,10 +8399,10 @@ xt([
|
|
|
8340
8399
|
k({ attribute: !1 })
|
|
8341
8400
|
], Je.prototype, "application");
|
|
8342
8401
|
window.customElements.get("ace-welcome-form") || window.customElements.define("ace-welcome-form", Je);
|
|
8343
|
-
var
|
|
8402
|
+
var Gd = Object.defineProperty, ks = (n, e, t, i) => {
|
|
8344
8403
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8345
8404
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8346
|
-
return s &&
|
|
8405
|
+
return s && Gd(e, t, s), s;
|
|
8347
8406
|
};
|
|
8348
8407
|
const zs = class zs extends E {
|
|
8349
8408
|
constructor() {
|
|
@@ -8503,10 +8562,10 @@ ks([
|
|
|
8503
8562
|
k({ attribute: !1 })
|
|
8504
8563
|
], yt.prototype, "application");
|
|
8505
8564
|
window.customElements.get("ace-welcome-form-third-party") || window.customElements.define("ace-welcome-form-third-party", yt);
|
|
8506
|
-
var
|
|
8565
|
+
var Zd = Object.defineProperty, Ss = (n, e, t, i) => {
|
|
8507
8566
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8508
8567
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8509
|
-
return s &&
|
|
8568
|
+
return s && Zd(e, t, s), s;
|
|
8510
8569
|
};
|
|
8511
8570
|
const js = class js extends E {
|
|
8512
8571
|
constructor() {
|
|
@@ -8669,10 +8728,10 @@ window.customElements.get("ace-conversation-ended-form") || window.customElement
|
|
|
8669
8728
|
"ace-conversation-ended-form",
|
|
8670
8729
|
$t
|
|
8671
8730
|
);
|
|
8672
|
-
var
|
|
8731
|
+
var Yd = Object.defineProperty, Qd = (n, e, t, i) => {
|
|
8673
8732
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8674
8733
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8675
|
-
return s &&
|
|
8734
|
+
return s && Yd(e, t, s), s;
|
|
8676
8735
|
};
|
|
8677
8736
|
const Hs = class Hs extends E {
|
|
8678
8737
|
_onStartVideo(e) {
|
|
@@ -8800,15 +8859,15 @@ Hs.styles = [
|
|
|
8800
8859
|
`
|
|
8801
8860
|
];
|
|
8802
8861
|
let Nn = Hs;
|
|
8803
|
-
|
|
8862
|
+
Qd([
|
|
8804
8863
|
Te({ context: ge }),
|
|
8805
8864
|
k({ attribute: !1 })
|
|
8806
8865
|
], Nn.prototype, "application");
|
|
8807
8866
|
window.customElements.get("ace-video-confirm-dialog") || window.customElements.define("ace-video-confirm-dialog", Nn);
|
|
8808
|
-
var
|
|
8867
|
+
var Xd = Object.defineProperty, Kd = (n, e, t, i) => {
|
|
8809
8868
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8810
8869
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8811
|
-
return s &&
|
|
8870
|
+
return s && Xd(e, t, s), s;
|
|
8812
8871
|
};
|
|
8813
8872
|
const Fs = class Fs extends E {
|
|
8814
8873
|
constructor(e) {
|
|
@@ -8886,15 +8945,15 @@ Fs.styles = [
|
|
|
8886
8945
|
`
|
|
8887
8946
|
];
|
|
8888
8947
|
let zn = Fs;
|
|
8889
|
-
|
|
8948
|
+
Kd([
|
|
8890
8949
|
Te({ context: ge }),
|
|
8891
8950
|
k({ attribute: !1 })
|
|
8892
8951
|
], zn.prototype, "application");
|
|
8893
8952
|
window.customElements.get("ace-survey") || window.customElements.define("ace-survey", zn);
|
|
8894
|
-
var
|
|
8953
|
+
var Jd = Object.defineProperty, ep = (n, e, t, i) => {
|
|
8895
8954
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8896
8955
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8897
|
-
return s &&
|
|
8956
|
+
return s && Jd(e, t, s), s;
|
|
8898
8957
|
};
|
|
8899
8958
|
const Bs = class Bs extends E {
|
|
8900
8959
|
_onClose() {
|
|
@@ -8983,7 +9042,7 @@ Bs.styles = [
|
|
|
8983
9042
|
`
|
|
8984
9043
|
];
|
|
8985
9044
|
let jn = Bs;
|
|
8986
|
-
|
|
9045
|
+
ep([
|
|
8987
9046
|
Te({ context: ge }),
|
|
8988
9047
|
k({ attribute: !1 })
|
|
8989
9048
|
], jn.prototype, "application");
|
|
@@ -8991,10 +9050,10 @@ window.customElements.get("ace-entrance-closed-dialog") || window.customElements
|
|
|
8991
9050
|
"ace-entrance-closed-dialog",
|
|
8992
9051
|
jn
|
|
8993
9052
|
);
|
|
8994
|
-
var
|
|
9053
|
+
var tp = Object.defineProperty, np = (n, e, t, i) => {
|
|
8995
9054
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
8996
9055
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
8997
|
-
return s &&
|
|
9056
|
+
return s && tp(e, t, s), s;
|
|
8998
9057
|
};
|
|
8999
9058
|
const qs = class qs extends E {
|
|
9000
9059
|
connectedCallback() {
|
|
@@ -9151,14 +9210,14 @@ qs.styles = [
|
|
|
9151
9210
|
`
|
|
9152
9211
|
];
|
|
9153
9212
|
let Hn = qs;
|
|
9154
|
-
|
|
9213
|
+
np([
|
|
9155
9214
|
k({ attribute: !1 })
|
|
9156
9215
|
], Hn.prototype, "entry");
|
|
9157
9216
|
window.customElements.get("ace-contact-data-field") || window.customElements.define("ace-contact-data-field", Hn);
|
|
9158
|
-
var
|
|
9217
|
+
var ip = Object.defineProperty, sp = (n, e, t, i) => {
|
|
9159
9218
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
9160
9219
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
9161
|
-
return s &&
|
|
9220
|
+
return s && ip(e, t, s), s;
|
|
9162
9221
|
};
|
|
9163
9222
|
const Vs = class Vs extends E {
|
|
9164
9223
|
_onQuit() {
|
|
@@ -9271,15 +9330,15 @@ Vs.styles = [
|
|
|
9271
9330
|
`
|
|
9272
9331
|
];
|
|
9273
9332
|
let Fn = Vs;
|
|
9274
|
-
|
|
9333
|
+
sp([
|
|
9275
9334
|
Te({ context: ge }),
|
|
9276
9335
|
k({ attribute: !1 })
|
|
9277
9336
|
], Fn.prototype, "application");
|
|
9278
9337
|
window.customElements.get("ace-quit-confirm-dialog") || window.customElements.define("ace-quit-confirm-dialog", Fn);
|
|
9279
|
-
var
|
|
9338
|
+
var rp = Object.defineProperty, op = (n, e, t, i) => {
|
|
9280
9339
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
9281
9340
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
9282
|
-
return s &&
|
|
9341
|
+
return s && rp(e, t, s), s;
|
|
9283
9342
|
};
|
|
9284
9343
|
const Ws = class Ws extends E {
|
|
9285
9344
|
_onQuit() {
|
|
@@ -9392,7 +9451,7 @@ Ws.styles = [
|
|
|
9392
9451
|
`
|
|
9393
9452
|
];
|
|
9394
9453
|
let Bn = Ws;
|
|
9395
|
-
|
|
9454
|
+
op([
|
|
9396
9455
|
Te({ context: ge }),
|
|
9397
9456
|
k({ attribute: !1 })
|
|
9398
9457
|
], Bn.prototype, "application");
|
|
@@ -9402,7 +9461,7 @@ window.customElements.get("ace-logout-confirm-dialog") || window.customElements.
|
|
|
9402
9461
|
);
|
|
9403
9462
|
const Gs = class Gs extends E {
|
|
9404
9463
|
constructor(e) {
|
|
9405
|
-
super(), this.tunnistusURL = "", e && (this.tunnistusURL = e.tunnistusURL)
|
|
9464
|
+
super(), this.tunnistusURL = "", e && (this.tunnistusURL = e.tunnistusURL);
|
|
9406
9465
|
}
|
|
9407
9466
|
_onStartAuth() {
|
|
9408
9467
|
const e = new CustomEvent("action", {
|
|
@@ -9517,7 +9576,7 @@ window.customElements.get("ace-tunnistus-auth-card") || window.customElements.de
|
|
|
9517
9576
|
* Copyright 2018 Google LLC
|
|
9518
9577
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9519
9578
|
*/
|
|
9520
|
-
const Ga = "important",
|
|
9579
|
+
const Ga = "important", ap = " !" + Ga, lp = Jt(class extends Yn {
|
|
9521
9580
|
constructor(n) {
|
|
9522
9581
|
var e;
|
|
9523
9582
|
if (super(n), n.type !== Kt.ATTRIBUTE || n.name !== "style" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
@@ -9536,17 +9595,17 @@ const Ga = "important", rp = " !" + Ga, op = Jt(class extends Yn {
|
|
|
9536
9595
|
const s = e[i];
|
|
9537
9596
|
if (s != null) {
|
|
9538
9597
|
this.ft.add(i);
|
|
9539
|
-
const r = typeof s == "string" && s.endsWith(
|
|
9598
|
+
const r = typeof s == "string" && s.endsWith(ap);
|
|
9540
9599
|
i.includes("-") || r ? t.setProperty(i, r ? s.slice(0, -11) : s, r ? Ga : "") : t[i] = s;
|
|
9541
9600
|
}
|
|
9542
9601
|
}
|
|
9543
|
-
return
|
|
9602
|
+
return _e;
|
|
9544
9603
|
}
|
|
9545
9604
|
});
|
|
9546
|
-
var
|
|
9605
|
+
var cp = Object.defineProperty, up = (n, e, t, i) => {
|
|
9547
9606
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
9548
9607
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
9549
|
-
return s &&
|
|
9608
|
+
return s && cp(e, t, s), s;
|
|
9550
9609
|
};
|
|
9551
9610
|
const Zs = class Zs extends E {
|
|
9552
9611
|
constructor(e, t) {
|
|
@@ -9578,7 +9637,7 @@ const Zs = class Zs extends E {
|
|
|
9578
9637
|
top: this.headerHeight + e + "px",
|
|
9579
9638
|
bottom: this.copyrightHeight + e + "px"
|
|
9580
9639
|
};
|
|
9581
|
-
return y` <div class="container" style=${
|
|
9640
|
+
return y` <div class="container" style=${lp(t)}>
|
|
9582
9641
|
<iframe
|
|
9583
9642
|
class="video-iframe"
|
|
9584
9643
|
src=${this.userUrl.href}
|
|
@@ -9612,78 +9671,17 @@ Zs.styles = [
|
|
|
9612
9671
|
`
|
|
9613
9672
|
];
|
|
9614
9673
|
let Zt = Zs;
|
|
9615
|
-
|
|
9674
|
+
up([
|
|
9616
9675
|
Te({ context: ge }),
|
|
9617
9676
|
k({ attribute: !1 })
|
|
9618
9677
|
], Zt.prototype, "application");
|
|
9619
9678
|
window.customElements.get("ace-video-iframe") || window.customElements.define("ace-video-iframe", Zt);
|
|
9620
|
-
class
|
|
9621
|
-
constructor(e) {
|
|
9622
|
-
this.url = "", this.maxRetries = 300, this.orderRef = "", this.tunnistusUrl = "", this.url = `${e.idHubUrl}/${e.idHubCustomerKey}/${e.idHubOrgKey}/${e.idHubEidType.toLowerCase()}`, this.maxRetries = e.idHubMaxRetries;
|
|
9623
|
-
}
|
|
9624
|
-
async auth() {
|
|
9625
|
-
console.log("\x1B[31mID-Hub \x1B[32m - Initializing auth");
|
|
9626
|
-
try {
|
|
9627
|
-
const t = await (await fetch(this.url + "/auth", {
|
|
9628
|
-
headers: {
|
|
9629
|
-
accept: "application/json",
|
|
9630
|
-
"accept-language": "sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7",
|
|
9631
|
-
"content-type": "application/json"
|
|
9632
|
-
},
|
|
9633
|
-
body: `{
|
|
9634
|
-
"clientName": "idhub-web-1.0.0",
|
|
9635
|
-
"register": {
|
|
9636
|
-
"clientType": "ACEWIDGET",
|
|
9637
|
-
"agentId": "ACEWIDGET",
|
|
9638
|
-
"userName": "ACEWIDGET"
|
|
9639
|
-
}
|
|
9640
|
-
}`,
|
|
9641
|
-
method: "POST"
|
|
9642
|
-
})).json();
|
|
9643
|
-
return console.log("\x1B[31mID-Hub \x1B[32m - Initializing result", t), this.tunnistusUrl = t.tunnistusURL, this.orderRef = t.orderRef, this.tunnistusUrl;
|
|
9644
|
-
} catch {
|
|
9645
|
-
return;
|
|
9646
|
-
}
|
|
9647
|
-
}
|
|
9648
|
-
async collectPolling() {
|
|
9649
|
-
let e = this.maxRetries, t;
|
|
9650
|
-
do
|
|
9651
|
-
await new Promise((i) => setTimeout(i, 1e3)), t = await this.collect(), e--;
|
|
9652
|
-
while (t.status == "pending" && e > 0);
|
|
9653
|
-
return t;
|
|
9654
|
-
}
|
|
9655
|
-
async collect() {
|
|
9656
|
-
if (this.orderRef === "")
|
|
9657
|
-
throw new Error("OrderRef is missing");
|
|
9658
|
-
const t = await (await fetch(this.url + "/collect", {
|
|
9659
|
-
headers: {
|
|
9660
|
-
accept: "application/json",
|
|
9661
|
-
"accept-language": "sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7",
|
|
9662
|
-
"content-type": "application/json"
|
|
9663
|
-
},
|
|
9664
|
-
body: `{
|
|
9665
|
-
"clientName": "idhub-web-1.0.0",
|
|
9666
|
-
"orderRef": "${this.orderRef}",
|
|
9667
|
-
"method": "auth"
|
|
9668
|
-
}`,
|
|
9669
|
-
method: "POST"
|
|
9670
|
-
})).json();
|
|
9671
|
-
return console.log("\x1B[31mID-Hub \x1B[32m - Collect result", t), t;
|
|
9672
|
-
}
|
|
9673
|
-
}
|
|
9674
|
-
function up(n) {
|
|
9675
|
-
return decodeURIComponent(
|
|
9676
|
-
atob(n).split("").map(function(e) {
|
|
9677
|
-
return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
|
|
9678
|
-
}).join("")
|
|
9679
|
-
);
|
|
9680
|
-
}
|
|
9681
|
-
class _s extends vc {
|
|
9679
|
+
class Cs extends vc {
|
|
9682
9680
|
constructor(e, t) {
|
|
9683
9681
|
var i, s;
|
|
9684
|
-
super(e, t), this.agent = this.createAgent(""), this.user = this.createUser(""), this.
|
|
9685
|
-
this.
|
|
9686
|
-
}, this.
|
|
9682
|
+
super(e, t), this.pendingMessages = [], this.texts = this.component.application.texts, this.headerComponent = this.component.application.getComponent("widget-header"), this.isThirdPartyParticipant = this.component.properties.chat.isThirdPartyWidget, this.agent = this.createAgent(""), this.user = this.createUser(""), this.params = new URLSearchParams(document.location.search), this.invitationUid = this.params.get("invitationUid"), this.customerName = this.params.get("customerName") || void 0, this.disconnected$ = new P(), this.agentUsername = null, this.conversationOption = null, this._conversationOptions = {}, this.sessionId = null, this.contactId = null, this.errand = null, this.entrance = null, this.guestId = null, this.chatOverlayActive = !1, this.inVideoCall = !1, this.onQueueStatusReceived = (r) => {
|
|
9683
|
+
this.setQueueStatus(r.text || null);
|
|
9684
|
+
}, this.onEstablished = (r) => {
|
|
9687
9685
|
this.contactId = r.contactId, this.errand = r.errand, this.entrance = r.entrance, this.agentUsername = r.agentUsername;
|
|
9688
9686
|
const o = {
|
|
9689
9687
|
contactId: this.contactId,
|
|
@@ -9693,57 +9691,57 @@ class _s extends vc {
|
|
|
9693
9691
|
};
|
|
9694
9692
|
this.save({
|
|
9695
9693
|
survey: o
|
|
9696
|
-
}), this.
|
|
9697
|
-
}, this.
|
|
9698
|
-
this.
|
|
9699
|
-
}, this.
|
|
9700
|
-
this.
|
|
9701
|
-
}, this.
|
|
9694
|
+
}), this.setQueueStatus(null), this.agent.name = r.agent, r.videoEnded && this.removeVideo();
|
|
9695
|
+
}, this.onPrepareVideo = () => {
|
|
9696
|
+
this.showVideoConfirmDialog();
|
|
9697
|
+
}, this.onVideoPrepared = (r) => {
|
|
9698
|
+
this.showVideoIFrame(r.userUrl);
|
|
9699
|
+
}, this.onChatButtonClicked = (r) => {
|
|
9702
9700
|
this.showChatOverVideo(r.guestId);
|
|
9703
|
-
}, this.
|
|
9704
|
-
this.
|
|
9705
|
-
}, this.
|
|
9701
|
+
}, this.onEndVideoButtonClicked = (r) => {
|
|
9702
|
+
this.guestId && (r == null ? void 0 : r.guestId) === this.guestId && this.removeVideo();
|
|
9703
|
+
}, this.onPenStatusChange = (r) => {
|
|
9706
9704
|
r.penStatus === "on" ? this.setTypingState(!0) : this.setTypingState(!1);
|
|
9707
|
-
}, this.
|
|
9705
|
+
}, this.onChatEnded = async (r) => {
|
|
9708
9706
|
var a, l;
|
|
9709
9707
|
this.setToastMessage(null), this.setTypingState(!1), this.videoConfirmDialogEntry && this.videoConfirmDialogEntry.remove(), this.component.disableInput(), r.showForm && this.showConversationEndedForm();
|
|
9710
9708
|
const o = this.component.application.settings;
|
|
9711
|
-
(a = o == null ? void 0 : o.survey) != null && a.shouldUseSurvey && ((l = o == null ? void 0 : o.survey) != null && l.surveyBaseUrl) && this.showSurvey(), this.isThirdPartyParticipant ? this.
|
|
9712
|
-
}, this.
|
|
9709
|
+
(a = o == null ? void 0 : o.survey) != null && a.shouldUseSurvey && ((l = o == null ? void 0 : o.survey) != null && l.surveyBaseUrl) && this.showSurvey(), this.isThirdPartyParticipant ? this.removeHeaderOptions() : this.setStartNewChatOption(), this.complete();
|
|
9710
|
+
}, this.properties = t.properties, (i = this.component.application.settings) != null && i.auth && (this.idHubClient = new Od(
|
|
9713
9711
|
(s = this.component.application.settings) == null ? void 0 : s.auth
|
|
9714
9712
|
));
|
|
9715
9713
|
}
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9714
|
+
// =============================
|
|
9715
|
+
// LIFECYCLE METHODS (overrides)
|
|
9716
|
+
// =============================
|
|
9719
9717
|
connect(e = {}) {
|
|
9720
|
-
super.connect(), this._conversationOptions = e;
|
|
9718
|
+
super.connect(), this.headerComponent && (this.headerComponent.provider = this), this._conversationOptions = e;
|
|
9721
9719
|
const t = {
|
|
9722
9720
|
...this.properties.chat ?? {},
|
|
9723
9721
|
...e
|
|
9724
9722
|
}, i = !!this.sessionId;
|
|
9725
9723
|
if (!i) {
|
|
9726
9724
|
const r = Zi();
|
|
9727
|
-
this.
|
|
9725
|
+
this.setSessionId(r);
|
|
9728
9726
|
}
|
|
9729
9727
|
this.save({
|
|
9730
9728
|
chatSessionId: this.sessionId
|
|
9731
|
-
}), this.engine = new
|
|
9729
|
+
}), this.engine = new Vd(t, this.sessionId), this.engine.messages().subscribe((r) => {
|
|
9732
9730
|
switch (r.source) {
|
|
9733
9731
|
case "agent":
|
|
9734
9732
|
this.printAgent(r.text);
|
|
9735
9733
|
break;
|
|
9736
9734
|
case "customer":
|
|
9737
|
-
this.
|
|
9735
|
+
this.clearPendingMessages(), this.isThirdPartyParticipant ? r.source === "customer" && r.invitationNo === "0" ? this.printAgent(r.text, r.alias) : this.printUser(r.text) : r.source === "customer" && Number(r.invitationNo) > 0 ? this.printAgent(r.text, r.alias) : this.printUser(r.text);
|
|
9738
9736
|
break;
|
|
9739
9737
|
case "system":
|
|
9740
9738
|
this.printSystem(r.text);
|
|
9741
9739
|
break;
|
|
9742
9740
|
}
|
|
9743
|
-
}), this.engine.actions().pipe(B(this.disconnected$), K(
|
|
9741
|
+
}), this.engine.actions().pipe(B(this.disconnected$), K(Md)).subscribe(this.onQueueStatusReceived), this.engine.actions().pipe(B(this.disconnected$), K(Dd)).subscribe(this.onEstablished), this.engine.actions().pipe(B(this.disconnected$), K(Nd)).subscribe(this.onPrepareVideo), this.engine.actions().pipe(B(this.disconnected$), K(zd)).subscribe(this.onVideoPrepared), this.engine.actions().pipe(B(this.disconnected$), K(jd)).subscribe(this.onChatButtonClicked), this.engine.actions().pipe(
|
|
9744
9742
|
B(this.disconnected$),
|
|
9745
|
-
K(
|
|
9746
|
-
).subscribe(this.
|
|
9743
|
+
K(Hd)
|
|
9744
|
+
).subscribe(this.onEndVideoButtonClicked), this.engine.actions().pipe(B(this.disconnected$), K(Ud)).subscribe(this.onPenStatusChange), this.engine.actions().pipe(B(this.disconnected$), K(Fd)).subscribe(this.onChatEnded), this.setHeaderOption();
|
|
9747
9745
|
const s = this.component.application.trigger;
|
|
9748
9746
|
s && s.widgetActive$.pipe(B(s.componentIsDestroyed$)).subscribe((r) => {
|
|
9749
9747
|
r && (this.conversationOption = null, this.setHeaderOption());
|
|
@@ -9766,51 +9764,115 @@ class _s extends vc {
|
|
|
9766
9764
|
console.error("Failed to initialize chat:", r);
|
|
9767
9765
|
});
|
|
9768
9766
|
}
|
|
9769
|
-
// Change header option based on chat status
|
|
9770
|
-
async setHeaderOption() {
|
|
9771
|
-
switch (await this.engine.getChatStatus()) {
|
|
9772
|
-
case "finished":
|
|
9773
|
-
this.isThirdPartyParticipant ? this._removeHeaderOptions() : this._setStartNewChatOption();
|
|
9774
|
-
break;
|
|
9775
|
-
case "active":
|
|
9776
|
-
this._setEndConversationOption();
|
|
9777
|
-
break;
|
|
9778
|
-
case "noSession":
|
|
9779
|
-
this.conversationOption = null;
|
|
9780
|
-
}
|
|
9781
|
-
}
|
|
9782
9767
|
disconnected() {
|
|
9783
9768
|
super.disconnected(), this.disconnected$.next();
|
|
9784
9769
|
}
|
|
9785
|
-
|
|
9786
|
-
const
|
|
9787
|
-
|
|
9770
|
+
onUserSubmit(e) {
|
|
9771
|
+
const t = this.printUser(e.text);
|
|
9772
|
+
t.setStatus("pending"), this.pendingMessages.push(t), (async () => {
|
|
9773
|
+
var i;
|
|
9774
|
+
try {
|
|
9775
|
+
await ((i = this.engine) == null ? void 0 : i.chatWrite(e.text));
|
|
9776
|
+
} catch (s) {
|
|
9777
|
+
s instanceof Un ? t.setStatus("failed") : (t.setStatus("failed"), console.warn("Unhandled error:", s));
|
|
9778
|
+
}
|
|
9779
|
+
})();
|
|
9788
9780
|
}
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
key: t,
|
|
9797
|
-
onClick: s,
|
|
9798
|
-
enabled: r
|
|
9799
|
-
});
|
|
9781
|
+
save(e) {
|
|
9782
|
+
this.component.stateMachine.session().pipe(
|
|
9783
|
+
Ce((t) => (t == null ? void 0 : t.data$) || Xe),
|
|
9784
|
+
he(1)
|
|
9785
|
+
).subscribe((t) => {
|
|
9786
|
+
this.saveToCurrentSession$.next({ ...t, ...e });
|
|
9787
|
+
});
|
|
9800
9788
|
}
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9789
|
+
async rehydrate(e) {
|
|
9790
|
+
e.chatSessionId && this.setSessionId(e.chatSessionId), e.survey && (this.contactId = e.survey.contactId, this.errand = e.survey.errand, this.entrance = e.survey.entrance, this.agentUsername = e.survey.agentUsername);
|
|
9791
|
+
}
|
|
9792
|
+
// ==============
|
|
9793
|
+
// STATIC METHODS
|
|
9794
|
+
// ==============
|
|
9795
|
+
static getInstance(e, t) {
|
|
9796
|
+
return t.providerInstance ?? (t.providerInstance = new Cs(e, t)), t.providerInstance;
|
|
9797
|
+
}
|
|
9798
|
+
// ==================
|
|
9799
|
+
// PUBLIC API METHODS
|
|
9800
|
+
// ==================
|
|
9801
|
+
showLogoutConfirmDialog() {
|
|
9802
|
+
var e;
|
|
9803
|
+
(e = this.logoutConfirmDialogEntry) == null || e.remove(), this.logoutConfirmDialogEntry = new J(
|
|
9804
|
+
z.System,
|
|
9805
|
+
{
|
|
9806
|
+
name: ""
|
|
9807
|
+
},
|
|
9808
|
+
[
|
|
9809
|
+
{
|
|
9810
|
+
items: [["ace-logout-confirm-dialog", { content: "" }]]
|
|
9811
|
+
}
|
|
9812
|
+
]
|
|
9813
|
+
), this.printEntry(this.logoutConfirmDialogEntry), this.logoutConfirmDialogEntry.actions$.pipe(
|
|
9814
|
+
K((t) => t.key === "logout-chat"),
|
|
9815
|
+
he(1)
|
|
9816
|
+
).subscribe(async (t) => {
|
|
9817
|
+
var i;
|
|
9818
|
+
this.logoutConfirmDialogEntry && this.logoutConfirmDialogEntry.remove(), ((i = t.data) == null ? void 0 : i.result) === "logout" && (await this.engine.getChatStatus() === "noSession" ? (this.headerComponent._logout(), this.setSessionId(null), this.component.clearMessages(), this.startAuthenticationFlow()) : this.endConversation());
|
|
9819
|
+
});
|
|
9820
|
+
}
|
|
9821
|
+
async handleAuthentication(e) {
|
|
9822
|
+
var i, s, r, o;
|
|
9823
|
+
this.headerComponent.UserName = "Authenticating...", this.headerComponent.authState = "authenticating", this.headerComponent.requestUpdate();
|
|
9824
|
+
const t = await ((i = this.idHubClient) == null ? void 0 : i.collectPolling());
|
|
9825
|
+
if (this.component.application.userData = t, (t == null ? void 0 : t.status) === "authenticated") {
|
|
9826
|
+
const a = qd(
|
|
9827
|
+
((s = t == null ? void 0 : t.idhubEIDToken) == null ? void 0 : s.split(".")[1]) ?? ""
|
|
9828
|
+
), l = JSON.parse(a), c = ((o = (r = l == null ? void 0 : l.completionData) == null ? void 0 : r.user) == null ? void 0 : o.name) ?? "";
|
|
9829
|
+
this.headerComponent.UserName = c, this.headerComponent.authState = "authenticated", this.component.application.storage.set("auth", {
|
|
9830
|
+
name: c,
|
|
9831
|
+
authenticated: !0
|
|
9832
|
+
}), e == null || e.remove(), this.handleWelcomeForm(this.engine.config);
|
|
9833
|
+
}
|
|
9834
|
+
}
|
|
9835
|
+
// ========================
|
|
9836
|
+
// INTERNAL UTILITY METHODS
|
|
9837
|
+
// ========================
|
|
9838
|
+
async initializeChat(e) {
|
|
9839
|
+
var t, i;
|
|
9840
|
+
(i = (t = this.component.application.settings) == null ? void 0 : t.auth) != null && i.shouldUseAuth ? await this.startAuthenticationFlow() : this.handleWelcomeForm(e);
|
|
9841
|
+
}
|
|
9842
|
+
async startAuthenticationFlow() {
|
|
9843
|
+
var i;
|
|
9844
|
+
const e = await ((i = this.idHubClient) == null ? void 0 : i.auth());
|
|
9845
|
+
let t;
|
|
9846
|
+
e && (this.headerComponent.authUrl = e, this.headerComponent.provider = this, this.headerComponent.authState = "non-authenticated", t = this.showTunnistusAuthCard(e), this.headerComponent.idref = t, t.actions$.pipe(
|
|
9847
|
+
K((s) => s.key === "start-auth"),
|
|
9848
|
+
he(1)
|
|
9849
|
+
).subscribe(() => {
|
|
9850
|
+
this.handleAuthentication(t);
|
|
9851
|
+
}));
|
|
9852
|
+
}
|
|
9853
|
+
async handleWelcomeForm(e) {
|
|
9854
|
+
let t = !0;
|
|
9855
|
+
e.webApiUrl && (t = await this.isEntranceOpen(
|
|
9856
|
+
e.webApiUrl,
|
|
9857
|
+
e.entrance
|
|
9858
|
+
)), t ? this.customerName ? this.startChat({
|
|
9859
|
+
customerName: this.customerName,
|
|
9860
|
+
customData: {}
|
|
9861
|
+
}) : this.showWelcomeForm() : this.showEntranceClosedDialog();
|
|
9862
|
+
}
|
|
9863
|
+
startChat(e) {
|
|
9864
|
+
var i, s;
|
|
9865
|
+
if (!this.engine)
|
|
9866
|
+
return;
|
|
9867
|
+
const t = e.customData.errand ?? this.engine.config.defaultErrand;
|
|
9868
|
+
if (!t)
|
|
9869
|
+
throw new Error("Errand is required but was not configured");
|
|
9870
|
+
if (this.isThirdPartyParticipant)
|
|
9871
|
+
this.component.application.root.style.visibility = "visible", this.engine.chatJoin({
|
|
9872
|
+
invitationUid: this.invitationUid,
|
|
9873
|
+
customerName: this.customerName ?? e.customerName
|
|
9874
|
+
}).pipe(B(this.disconnected$)).subscribe();
|
|
9875
|
+
else {
|
|
9814
9876
|
const r = (s = (i = this.component.application) == null ? void 0 : i.userData) == null ? void 0 : s.idhubEIDToken;
|
|
9815
9877
|
this.engine.chatRequest({
|
|
9816
9878
|
customerName: e.customerName,
|
|
@@ -9821,11 +9883,78 @@ class _s extends vc {
|
|
|
9821
9883
|
...r && { authToken: r }
|
|
9822
9884
|
}).pipe(B(this.disconnected$)).subscribe();
|
|
9823
9885
|
}
|
|
9824
|
-
this.component.enableInput(), this.component.enableSkipToLatestMessage(), this.
|
|
9886
|
+
this.component.enableInput(), this.component.enableSkipToLatestMessage(), this.setEndConversationOption();
|
|
9825
9887
|
}
|
|
9826
|
-
|
|
9827
|
-
this.engine && (this.
|
|
9888
|
+
restartNewChat() {
|
|
9889
|
+
this.engine && (this.setSessionId(null), this.component.clearMessages(), this.removeHeaderOptions(), this.connect(this._conversationOptions));
|
|
9828
9890
|
}
|
|
9891
|
+
setQueueStatus(e) {
|
|
9892
|
+
this.setToastMessage(e);
|
|
9893
|
+
}
|
|
9894
|
+
async endConversation() {
|
|
9895
|
+
var e, t, i;
|
|
9896
|
+
(t = (e = this.component.application.settings) == null ? void 0 : e.auth) != null && t.shouldUseAuth && this.headerComponent._logout("chat-ended"), await ((i = this.engine) == null ? void 0 : i.chatQuit());
|
|
9897
|
+
}
|
|
9898
|
+
async sendConversationEmail(e) {
|
|
9899
|
+
var t;
|
|
9900
|
+
try {
|
|
9901
|
+
await ((t = this.engine) == null ? void 0 : t.chatEmailSession(e)), this.printSystem(
|
|
9902
|
+
this.texts.getOrFallback(
|
|
9903
|
+
"email-form.email-sent-label",
|
|
9904
|
+
"An email with the conversation was sent."
|
|
9905
|
+
)
|
|
9906
|
+
);
|
|
9907
|
+
} catch (i) {
|
|
9908
|
+
this.printSystem(
|
|
9909
|
+
this.texts.getOrFallback(
|
|
9910
|
+
"email-form.error-message",
|
|
9911
|
+
"Unable to send email with the conversation."
|
|
9912
|
+
)
|
|
9913
|
+
), i instanceof Un || console.warn("Unhandled error:", i);
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
clearPendingMessages() {
|
|
9917
|
+
this.pendingMessages.forEach((e) => {
|
|
9918
|
+
e.remove();
|
|
9919
|
+
});
|
|
9920
|
+
}
|
|
9921
|
+
setSessionId(e) {
|
|
9922
|
+
this.sessionId = e;
|
|
9923
|
+
}
|
|
9924
|
+
async isEntranceOpen(e, t) {
|
|
9925
|
+
var s;
|
|
9926
|
+
let i = !1;
|
|
9927
|
+
try {
|
|
9928
|
+
const r = await fetch(
|
|
9929
|
+
`${e}/1/entrances/${t}/is-open`
|
|
9930
|
+
), o = await r.json();
|
|
9931
|
+
r.ok ? i = (s = o == null ? void 0 : o.resultData) == null ? void 0 : s.isOpen : console.log(
|
|
9932
|
+
`Problem when fetching open status for entrance ${t}:`,
|
|
9933
|
+
o == null ? void 0 : o.resultMessage
|
|
9934
|
+
);
|
|
9935
|
+
} catch (r) {
|
|
9936
|
+
console.log(`Failed to fetch open status for ${t}:`, r);
|
|
9937
|
+
}
|
|
9938
|
+
return i;
|
|
9939
|
+
}
|
|
9940
|
+
// =====================
|
|
9941
|
+
// CONVERSATION PRINTERS
|
|
9942
|
+
// =====================
|
|
9943
|
+
printAgent(e, t = "") {
|
|
9944
|
+
const i = t.length > 0 ? this.agent.print(e, "markdown", t) : this.agent.print(e, "markdown");
|
|
9945
|
+
return this.setTypingState(!1), i;
|
|
9946
|
+
}
|
|
9947
|
+
printUser(e) {
|
|
9948
|
+
const t = Ii(Er(e));
|
|
9949
|
+
return this.user.print(t);
|
|
9950
|
+
}
|
|
9951
|
+
printSystem(e) {
|
|
9952
|
+
const t = Ii(Er(e));
|
|
9953
|
+
return this.system.print(t);
|
|
9954
|
+
}
|
|
9955
|
+
// ------------
|
|
9956
|
+
// UI INJECTORS
|
|
9957
|
+
// ------------
|
|
9829
9958
|
showSurvey() {
|
|
9830
9959
|
const e = new J(
|
|
9831
9960
|
z.System,
|
|
@@ -9851,45 +9980,6 @@ class _s extends vc {
|
|
|
9851
9980
|
);
|
|
9852
9981
|
this.printEntry(e);
|
|
9853
9982
|
}
|
|
9854
|
-
async startAuthenticationFlow() {
|
|
9855
|
-
var i;
|
|
9856
|
-
const e = await ((i = this.idHubClient) == null ? void 0 : i.auth());
|
|
9857
|
-
let t;
|
|
9858
|
-
e && (this.headerComponent.authUrl = e, this.headerComponent.provider = this, this.headerComponent.authState = "non-authenticated", t = this.showTunnistusAuthCard(e), this.headerComponent.idref = t, t.actions$.pipe(
|
|
9859
|
-
K((s) => s.key === "start-auth"),
|
|
9860
|
-
he(1)
|
|
9861
|
-
).subscribe(() => {
|
|
9862
|
-
this.handleAuthentication(t);
|
|
9863
|
-
}));
|
|
9864
|
-
}
|
|
9865
|
-
async handleAuthentication(e) {
|
|
9866
|
-
var i, s, r, o;
|
|
9867
|
-
this.headerComponent.UserName = "Authenticating...", this.headerComponent.authState = "authenticating", this.headerComponent.requestUpdate();
|
|
9868
|
-
const t = await ((i = this.idHubClient) == null ? void 0 : i.collectPolling());
|
|
9869
|
-
if (this.component.application.userData = t, (t == null ? void 0 : t.status) === "authenticated") {
|
|
9870
|
-
const a = up(
|
|
9871
|
-
((s = t == null ? void 0 : t.idhubEIDToken) == null ? void 0 : s.split(".")[1]) ?? ""
|
|
9872
|
-
), l = JSON.parse(a), c = ((o = (r = l == null ? void 0 : l.completionData) == null ? void 0 : r.user) == null ? void 0 : o.name) ?? "";
|
|
9873
|
-
this.headerComponent.UserName = c, this.headerComponent.authState = "authenticated", this.component.application.storage.set("auth", {
|
|
9874
|
-
name: c,
|
|
9875
|
-
authenticated: !0
|
|
9876
|
-
}), e == null || e.remove(), this.handleWelcomeForm(this.engine.config);
|
|
9877
|
-
}
|
|
9878
|
-
}
|
|
9879
|
-
async handleWelcomeForm(e) {
|
|
9880
|
-
let t = !0;
|
|
9881
|
-
e.webApiUrl && (t = await this.isEntranceOpen(
|
|
9882
|
-
e.webApiUrl,
|
|
9883
|
-
e.entrance
|
|
9884
|
-
)), t ? this.customerName ? this._startChat({
|
|
9885
|
-
customerName: this.customerName,
|
|
9886
|
-
customData: {}
|
|
9887
|
-
}) : this.showWelcomeForm() : this.showEntranceClosedDialog();
|
|
9888
|
-
}
|
|
9889
|
-
async initializeChat(e) {
|
|
9890
|
-
var t, i;
|
|
9891
|
-
(i = (t = this.component.application.settings) == null ? void 0 : t.auth) != null && i.shouldUseAuth ? await this.startAuthenticationFlow() : this.handleWelcomeForm(e);
|
|
9892
|
-
}
|
|
9893
9983
|
showTunnistusAuthCard(e) {
|
|
9894
9984
|
const t = new J(
|
|
9895
9985
|
z.System,
|
|
@@ -9939,7 +10029,7 @@ class _s extends vc {
|
|
|
9939
10029
|
K((t) => t.key === "submitted"),
|
|
9940
10030
|
he(1)
|
|
9941
10031
|
).subscribe((t) => {
|
|
9942
|
-
e.remove(), this.
|
|
10032
|
+
e.remove(), this.startChat({
|
|
9943
10033
|
customerName: t.data.name,
|
|
9944
10034
|
customerEmailAddress: t.data.email,
|
|
9945
10035
|
visitorQuestion: t.data.question,
|
|
@@ -9962,29 +10052,6 @@ class _s extends vc {
|
|
|
9962
10052
|
);
|
|
9963
10053
|
this.printEntry(e);
|
|
9964
10054
|
}
|
|
9965
|
-
_setQueueStatus(e) {
|
|
9966
|
-
this.setToastMessage(e);
|
|
9967
|
-
}
|
|
9968
|
-
showLogoutConfirmDialog() {
|
|
9969
|
-
var e;
|
|
9970
|
-
(e = this.logoutConfirmDialogEntry) == null || e.remove(), this.logoutConfirmDialogEntry = new J(
|
|
9971
|
-
z.System,
|
|
9972
|
-
{
|
|
9973
|
-
name: ""
|
|
9974
|
-
},
|
|
9975
|
-
[
|
|
9976
|
-
{
|
|
9977
|
-
items: [["ace-logout-confirm-dialog", { content: "" }]]
|
|
9978
|
-
}
|
|
9979
|
-
]
|
|
9980
|
-
), this.printEntry(this.logoutConfirmDialogEntry), this.logoutConfirmDialogEntry.actions$.pipe(
|
|
9981
|
-
K((t) => t.key === "logout-chat"),
|
|
9982
|
-
he(1)
|
|
9983
|
-
).subscribe(async (t) => {
|
|
9984
|
-
var i;
|
|
9985
|
-
this.logoutConfirmDialogEntry && this.logoutConfirmDialogEntry.remove(), ((i = t.data) == null ? void 0 : i.result) === "logout" && (await this.engine.getChatStatus() === "noSession" ? (this.headerComponent._logout(), this._setSessionId(null), this.component.clearMessages(), this.startAuthenticationFlow()) : this.endConversation());
|
|
9986
|
-
});
|
|
9987
|
-
}
|
|
9988
10055
|
showQuitConfirmDialog() {
|
|
9989
10056
|
var e;
|
|
9990
10057
|
(e = this.quitConfirmDialogEntry) == null || e.remove(), this.quitConfirmDialogEntry = new J(
|
|
@@ -10024,7 +10091,7 @@ class _s extends vc {
|
|
|
10024
10091
|
e.remove(), t.data.email && this.sendConversationEmail(t.data.email);
|
|
10025
10092
|
});
|
|
10026
10093
|
}
|
|
10027
|
-
|
|
10094
|
+
showVideoConfirmDialog() {
|
|
10028
10095
|
this.videoConfirmDialogEntry = new J(
|
|
10029
10096
|
z.System,
|
|
10030
10097
|
{
|
|
@@ -10043,7 +10110,7 @@ class _s extends vc {
|
|
|
10043
10110
|
this.videoConfirmDialogEntry && this.videoConfirmDialogEntry.remove(), e.data.result === "declined" && (this.guestId = null), (t = this.engine) == null || t.videoPrepared(e.data.result), this.printSystem(e.data.text);
|
|
10044
10111
|
});
|
|
10045
10112
|
}
|
|
10046
|
-
|
|
10113
|
+
showVideoIFrame(e) {
|
|
10047
10114
|
var i;
|
|
10048
10115
|
this.guestId = Zi(), this.videoIFrameElement = new Zt(e, this.guestId);
|
|
10049
10116
|
const t = this.component.application.root;
|
|
@@ -10052,23 +10119,47 @@ class _s extends vc {
|
|
|
10052
10119
|
showChatOverVideo(e) {
|
|
10053
10120
|
this.guestId && e === this.guestId && (this.chatOverlayActive = !0, this.showChatOverlay$.next(this.chatOverlayActive));
|
|
10054
10121
|
}
|
|
10055
|
-
|
|
10056
|
-
|
|
10122
|
+
// -----------
|
|
10123
|
+
// UI REMOVERS
|
|
10124
|
+
// -----------
|
|
10125
|
+
removeVideo() {
|
|
10126
|
+
var e;
|
|
10127
|
+
(e = this.videoIFrameElement) == null || e.remove(), this.guestId = null, this.chatOverlayActive && (this.chatOverlayActive = !1, this.showChatOverlay$.next(this.chatOverlayActive)), this.inVideoCall = !1, this.setHeaderOption();
|
|
10057
10128
|
}
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10129
|
+
// ----------------------
|
|
10130
|
+
// OPTION MENU FUNCTIONS
|
|
10131
|
+
// ----------------------
|
|
10132
|
+
addHeaderOptions(e, t, i, s, r = !0) {
|
|
10133
|
+
const o = this.component.application.getComponent("widget-header");
|
|
10134
|
+
if (o)
|
|
10135
|
+
return this.conversationOption ? (this.conversationOption.label = e, this.conversationOption.key = t, this.conversationOption.icon = i, this.conversationOption.onClick = s, this.conversationOption.enabled = r, o.requestUpdate(), this.conversationOption) : o.addOption({
|
|
10136
|
+
label: e,
|
|
10137
|
+
icon: i,
|
|
10138
|
+
closeOnClick: !0,
|
|
10139
|
+
key: t,
|
|
10140
|
+
onClick: s,
|
|
10141
|
+
enabled: r
|
|
10142
|
+
});
|
|
10061
10143
|
}
|
|
10062
|
-
|
|
10063
|
-
const
|
|
10064
|
-
|
|
10144
|
+
removeHeaderOptions() {
|
|
10145
|
+
const e = this.component.application.getComponent("widget-header");
|
|
10146
|
+
e && e.removeOption(this.conversationOption);
|
|
10065
10147
|
}
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10148
|
+
setStartNewChatOption() {
|
|
10149
|
+
this.conversationOption = this.addHeaderOptions(
|
|
10150
|
+
this.texts.getOrFallback(
|
|
10151
|
+
"widget-header.start-new-chat",
|
|
10152
|
+
"Start new chat"
|
|
10153
|
+
),
|
|
10154
|
+
"start-new-chat-button",
|
|
10155
|
+
na.svg,
|
|
10156
|
+
() => {
|
|
10157
|
+
this.restartNewChat();
|
|
10158
|
+
}
|
|
10159
|
+
);
|
|
10069
10160
|
}
|
|
10070
|
-
|
|
10071
|
-
this.conversationOption = this.
|
|
10161
|
+
setEndConversationOption() {
|
|
10162
|
+
this.conversationOption = this.addHeaderOptions(
|
|
10072
10163
|
this.texts.getOrFallback(
|
|
10073
10164
|
"widget-header.end-conversation",
|
|
10074
10165
|
"End conversation"
|
|
@@ -10082,97 +10173,23 @@ class _s extends vc {
|
|
|
10082
10173
|
!this.inVideoCall
|
|
10083
10174
|
);
|
|
10084
10175
|
}
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
this.
|
|
10095
|
-
}
|
|
10096
|
-
);
|
|
10097
|
-
}
|
|
10098
|
-
removeVideo() {
|
|
10099
|
-
var e;
|
|
10100
|
-
(e = this.videoIFrameElement) == null || e.remove(), this.guestId = null, this.chatOverlayActive && (this.chatOverlayActive = !1, this.showChatOverlay$.next(this.chatOverlayActive)), this.inVideoCall = !1, this.setHeaderOption();
|
|
10101
|
-
}
|
|
10102
|
-
async endConversation() {
|
|
10103
|
-
var e, t, i;
|
|
10104
|
-
(t = (e = this.component.application.settings) == null ? void 0 : e.auth) != null && t.shouldUseAuth && this.headerComponent._logout("chat-ended"), await ((i = this.engine) == null ? void 0 : i.chatQuit());
|
|
10105
|
-
}
|
|
10106
|
-
async sendConversationEmail(e) {
|
|
10107
|
-
var t;
|
|
10108
|
-
try {
|
|
10109
|
-
await ((t = this.engine) == null ? void 0 : t.chatEmailSession(e)), this.printSystem(
|
|
10110
|
-
this.texts.getOrFallback(
|
|
10111
|
-
"email-form.email-sent-label",
|
|
10112
|
-
"An email with the conversation was sent."
|
|
10113
|
-
)
|
|
10114
|
-
);
|
|
10115
|
-
} catch (i) {
|
|
10116
|
-
this.printSystem(
|
|
10117
|
-
this.texts.getOrFallback(
|
|
10118
|
-
"email-form.error-message",
|
|
10119
|
-
"Unable to send email with the conversation."
|
|
10120
|
-
)
|
|
10121
|
-
), i instanceof Un || console.warn("Unhandled error:", i);
|
|
10122
|
-
}
|
|
10123
|
-
}
|
|
10124
|
-
_clearPendingMessages() {
|
|
10125
|
-
this.pendingMessages.forEach((e) => {
|
|
10126
|
-
e.remove();
|
|
10127
|
-
});
|
|
10128
|
-
}
|
|
10129
|
-
_setSessionId(e) {
|
|
10130
|
-
this.sessionId = e;
|
|
10131
|
-
}
|
|
10132
|
-
onUserSubmit(e) {
|
|
10133
|
-
const t = this.printUser(e.text);
|
|
10134
|
-
t.setStatus("pending"), this.pendingMessages.push(t), (async () => {
|
|
10135
|
-
var i;
|
|
10136
|
-
try {
|
|
10137
|
-
await ((i = this.engine) == null ? void 0 : i.chatWrite(e.text));
|
|
10138
|
-
} catch (s) {
|
|
10139
|
-
s instanceof Un ? t.setStatus("failed") : (t.setStatus("failed"), console.warn("Unhandled error:", s));
|
|
10140
|
-
}
|
|
10141
|
-
})();
|
|
10142
|
-
}
|
|
10143
|
-
async rehydrate(e) {
|
|
10144
|
-
e.chatSessionId && this._setSessionId(e.chatSessionId), e.survey && (this.contactId = e.survey.contactId, this.errand = e.survey.errand, this.entrance = e.survey.entrance, this.agentUsername = e.survey.agentUsername);
|
|
10145
|
-
}
|
|
10146
|
-
save(e) {
|
|
10147
|
-
this.component.stateMachine.session().pipe(
|
|
10148
|
-
_e((t) => (t == null ? void 0 : t.data$) || Xe),
|
|
10149
|
-
he(1)
|
|
10150
|
-
).subscribe((t) => {
|
|
10151
|
-
this.saveToCurrentSession$.next({ ...t, ...e });
|
|
10152
|
-
});
|
|
10153
|
-
}
|
|
10154
|
-
// Use "ACE Web API" to check if an entrance is open.
|
|
10155
|
-
async isEntranceOpen(e, t) {
|
|
10156
|
-
var s;
|
|
10157
|
-
let i = !1;
|
|
10158
|
-
try {
|
|
10159
|
-
const r = await fetch(
|
|
10160
|
-
`${e}/1/entrances/${t}/is-open`
|
|
10161
|
-
), o = await r.json();
|
|
10162
|
-
r.ok ? i = (s = o == null ? void 0 : o.resultData) == null ? void 0 : s.isOpen : console.log(
|
|
10163
|
-
`Problem when fetching open status for entrance ${t}:`,
|
|
10164
|
-
o == null ? void 0 : o.resultMessage
|
|
10165
|
-
);
|
|
10166
|
-
} catch (r) {
|
|
10167
|
-
console.log(`Failed to fetch open status for ${t}:`, r);
|
|
10176
|
+
async setHeaderOption() {
|
|
10177
|
+
switch (await this.engine.getChatStatus()) {
|
|
10178
|
+
case "finished":
|
|
10179
|
+
this.isThirdPartyParticipant ? this.removeHeaderOptions() : this.setStartNewChatOption();
|
|
10180
|
+
break;
|
|
10181
|
+
case "active":
|
|
10182
|
+
this.setEndConversationOption();
|
|
10183
|
+
break;
|
|
10184
|
+
case "noSession":
|
|
10185
|
+
this.conversationOption = null;
|
|
10168
10186
|
}
|
|
10169
|
-
return i;
|
|
10170
10187
|
}
|
|
10171
10188
|
}
|
|
10172
10189
|
const kp = async (n) => {
|
|
10173
|
-
(await
|
|
10190
|
+
(await ns.getInstance(n.container)).registerProvider(
|
|
10174
10191
|
"ace-chat",
|
|
10175
|
-
(t) =>
|
|
10192
|
+
(t) => Cs.getInstance("ace-chat", t)
|
|
10176
10193
|
);
|
|
10177
10194
|
};
|
|
10178
10195
|
export {
|