@telia-ace/widget-conversation-flamingo 1.1.52-rc.1 → 1.1.52-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/chat-session.d.ts +31 -0
- package/{conversation-session.d.ts → conversation-feed.d.ts} +3 -6
- package/conversation-platform.d.ts +1 -6
- package/conversation.d.ts +19 -12
- package/index.d.ts +1 -1
- package/index.js +834 -1
- package/index.mjs +4681 -9
- package/models/conversation-entry.d.ts +1 -0
- package/models/conversation-provider.d.ts +8 -3
- package/package.json +2 -3
- package/session-service.d.ts +21 -0
- package/state-machine.d.ts +21 -0
- package/uuid.d.ts +1 -0
- package/conversation-036b72c8.js +0 -810
- package/conversation-83e12020.mjs +0 -3006
- package/index-b1ff7a55.js +0 -3
- package/index-eaede34b.mjs +0 -1199
- package/models/conversation-session-state.d.ts +0 -21
@@ -1,3006 +0,0 @@
|
|
1
|
-
import { C as Et, E as cs } from "./index-eaede34b.mjs";
|
2
|
-
/**
|
3
|
-
* @license
|
4
|
-
* Copyright 2019 Google LLC
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
6
|
-
*/
|
7
|
-
const nt = globalThis, Bt = nt.ShadowRoot && (nt.ShadyCSS === void 0 || nt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, zt = Symbol(), Vt = /* @__PURE__ */ new WeakMap();
|
8
|
-
let Le = class {
|
9
|
-
constructor(t, e, i) {
|
10
|
-
if (this._$cssResult$ = !0, i !== zt)
|
11
|
-
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
12
|
-
this.cssText = t, this.t = e;
|
13
|
-
}
|
14
|
-
get styleSheet() {
|
15
|
-
let t = this.o;
|
16
|
-
const e = this.t;
|
17
|
-
if (Bt && t === void 0) {
|
18
|
-
const i = e !== void 0 && e.length === 1;
|
19
|
-
i && (t = Vt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Vt.set(e, t));
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
}
|
23
|
-
toString() {
|
24
|
-
return this.cssText;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
const ds = (s) => new Le(typeof s == "string" ? s : s + "", void 0, zt), b = (s, ...t) => {
|
28
|
-
const e = s.length === 1 ? s[0] : t.reduce((i, n, o) => i + ((r) => {
|
29
|
-
if (r._$cssResult$ === !0)
|
30
|
-
return r.cssText;
|
31
|
-
if (typeof r == "number")
|
32
|
-
return r;
|
33
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
34
|
-
})(n) + s[o + 1], s[0]);
|
35
|
-
return new Le(e, s, zt);
|
36
|
-
}, hs = (s, t) => {
|
37
|
-
if (Bt)
|
38
|
-
s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
39
|
-
else
|
40
|
-
for (const e of t) {
|
41
|
-
const i = document.createElement("style"), n = nt.litNonce;
|
42
|
-
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
43
|
-
}
|
44
|
-
}, te = Bt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
45
|
-
let e = "";
|
46
|
-
for (const i of t.cssRules)
|
47
|
-
e += i.cssText;
|
48
|
-
return ds(e);
|
49
|
-
})(s) : s;
|
50
|
-
/**
|
51
|
-
* @license
|
52
|
-
* Copyright 2017 Google LLC
|
53
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
54
|
-
*/
|
55
|
-
const { is: ps, defineProperty: us, getOwnPropertyDescriptor: fs, getOwnPropertyNames: gs, getOwnPropertySymbols: $s, getPrototypeOf: ms } = Object, S = globalThis, ee = S.trustedTypes, vs = ee ? ee.emptyScript : "", kt = S.reactiveElementPolyfillSupport, F = (s, t) => s, ot = { toAttribute(s, t) {
|
56
|
-
switch (t) {
|
57
|
-
case Boolean:
|
58
|
-
s = s ? vs : null;
|
59
|
-
break;
|
60
|
-
case Object:
|
61
|
-
case Array:
|
62
|
-
s = s == null ? s : JSON.stringify(s);
|
63
|
-
}
|
64
|
-
return s;
|
65
|
-
}, fromAttribute(s, t) {
|
66
|
-
let e = s;
|
67
|
-
switch (t) {
|
68
|
-
case Boolean:
|
69
|
-
e = s !== null;
|
70
|
-
break;
|
71
|
-
case Number:
|
72
|
-
e = s === null ? null : Number(s);
|
73
|
-
break;
|
74
|
-
case Object:
|
75
|
-
case Array:
|
76
|
-
try {
|
77
|
-
e = JSON.parse(s);
|
78
|
-
} catch {
|
79
|
-
e = null;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
return e;
|
83
|
-
} }, Ft = (s, t) => !ps(s, t), se = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: Ft };
|
84
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
85
|
-
let R = class extends HTMLElement {
|
86
|
-
static addInitializer(t) {
|
87
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
88
|
-
}
|
89
|
-
static get observedAttributes() {
|
90
|
-
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
91
|
-
}
|
92
|
-
static createProperty(t, e = se) {
|
93
|
-
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
94
|
-
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
95
|
-
n !== void 0 && us(this.prototype, t, n);
|
96
|
-
}
|
97
|
-
}
|
98
|
-
static getPropertyDescriptor(t, e, i) {
|
99
|
-
const { get: n, set: o } = fs(this.prototype, t) ?? { get() {
|
100
|
-
return this[e];
|
101
|
-
}, set(r) {
|
102
|
-
this[e] = r;
|
103
|
-
} };
|
104
|
-
return { get() {
|
105
|
-
return n == null ? void 0 : n.call(this);
|
106
|
-
}, set(r) {
|
107
|
-
const a = n == null ? void 0 : n.call(this);
|
108
|
-
o.call(this, r), this.requestUpdate(t, a, i);
|
109
|
-
}, configurable: !0, enumerable: !0 };
|
110
|
-
}
|
111
|
-
static getPropertyOptions(t) {
|
112
|
-
return this.elementProperties.get(t) ?? se;
|
113
|
-
}
|
114
|
-
static _$Ei() {
|
115
|
-
if (this.hasOwnProperty(F("elementProperties")))
|
116
|
-
return;
|
117
|
-
const t = ms(this);
|
118
|
-
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
119
|
-
}
|
120
|
-
static finalize() {
|
121
|
-
if (this.hasOwnProperty(F("finalized")))
|
122
|
-
return;
|
123
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(F("properties"))) {
|
124
|
-
const e = this.properties, i = [...gs(e), ...$s(e)];
|
125
|
-
for (const n of i)
|
126
|
-
this.createProperty(n, e[n]);
|
127
|
-
}
|
128
|
-
const t = this[Symbol.metadata];
|
129
|
-
if (t !== null) {
|
130
|
-
const e = litPropertyMetadata.get(t);
|
131
|
-
if (e !== void 0)
|
132
|
-
for (const [i, n] of e)
|
133
|
-
this.elementProperties.set(i, n);
|
134
|
-
}
|
135
|
-
this._$Eh = /* @__PURE__ */ new Map();
|
136
|
-
for (const [e, i] of this.elementProperties) {
|
137
|
-
const n = this._$Eu(e, i);
|
138
|
-
n !== void 0 && this._$Eh.set(n, e);
|
139
|
-
}
|
140
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
141
|
-
}
|
142
|
-
static finalizeStyles(t) {
|
143
|
-
const e = [];
|
144
|
-
if (Array.isArray(t)) {
|
145
|
-
const i = new Set(t.flat(1 / 0).reverse());
|
146
|
-
for (const n of i)
|
147
|
-
e.unshift(te(n));
|
148
|
-
} else
|
149
|
-
t !== void 0 && e.push(te(t));
|
150
|
-
return e;
|
151
|
-
}
|
152
|
-
static _$Eu(t, e) {
|
153
|
-
const i = e.attribute;
|
154
|
-
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
155
|
-
}
|
156
|
-
constructor() {
|
157
|
-
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
158
|
-
}
|
159
|
-
_$Ev() {
|
160
|
-
var t;
|
161
|
-
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
162
|
-
}
|
163
|
-
addController(t) {
|
164
|
-
var e;
|
165
|
-
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
166
|
-
}
|
167
|
-
removeController(t) {
|
168
|
-
var e;
|
169
|
-
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
170
|
-
}
|
171
|
-
_$E_() {
|
172
|
-
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
173
|
-
for (const i of e.keys())
|
174
|
-
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
175
|
-
t.size > 0 && (this._$Ep = t);
|
176
|
-
}
|
177
|
-
createRenderRoot() {
|
178
|
-
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
179
|
-
return hs(t, this.constructor.elementStyles), t;
|
180
|
-
}
|
181
|
-
connectedCallback() {
|
182
|
-
var t;
|
183
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
184
|
-
var i;
|
185
|
-
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
186
|
-
});
|
187
|
-
}
|
188
|
-
enableUpdating(t) {
|
189
|
-
}
|
190
|
-
disconnectedCallback() {
|
191
|
-
var t;
|
192
|
-
(t = this._$ES) == null || t.forEach((e) => {
|
193
|
-
var i;
|
194
|
-
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
195
|
-
});
|
196
|
-
}
|
197
|
-
attributeChangedCallback(t, e, i) {
|
198
|
-
this._$AK(t, i);
|
199
|
-
}
|
200
|
-
_$EO(t, e) {
|
201
|
-
var o;
|
202
|
-
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
203
|
-
if (n !== void 0 && i.reflect === !0) {
|
204
|
-
const r = (((o = i.converter) == null ? void 0 : o.toAttribute) !== void 0 ? i.converter : ot).toAttribute(e, i.type);
|
205
|
-
this._$Em = t, r == null ? this.removeAttribute(n) : this.setAttribute(n, r), this._$Em = null;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
_$AK(t, e) {
|
209
|
-
var o;
|
210
|
-
const i = this.constructor, n = i._$Eh.get(t);
|
211
|
-
if (n !== void 0 && this._$Em !== n) {
|
212
|
-
const r = i.getPropertyOptions(n), a = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((o = r.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? r.converter : ot;
|
213
|
-
this._$Em = n, this[n] = a.fromAttribute(e, r.type), this._$Em = null;
|
214
|
-
}
|
215
|
-
}
|
216
|
-
requestUpdate(t, e, i, n = !1, o) {
|
217
|
-
if (t !== void 0) {
|
218
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ft)(n ? o : this[t], e))
|
219
|
-
return;
|
220
|
-
this.C(t, e, i);
|
221
|
-
}
|
222
|
-
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
223
|
-
}
|
224
|
-
C(t, e, i) {
|
225
|
-
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
226
|
-
}
|
227
|
-
async _$EP() {
|
228
|
-
this.isUpdatePending = !0;
|
229
|
-
try {
|
230
|
-
await this._$Eg;
|
231
|
-
} catch (e) {
|
232
|
-
Promise.reject(e);
|
233
|
-
}
|
234
|
-
const t = this.scheduleUpdate();
|
235
|
-
return t != null && await t, !this.isUpdatePending;
|
236
|
-
}
|
237
|
-
scheduleUpdate() {
|
238
|
-
return this.performUpdate();
|
239
|
-
}
|
240
|
-
performUpdate() {
|
241
|
-
var i;
|
242
|
-
if (!this.isUpdatePending)
|
243
|
-
return;
|
244
|
-
if (!this.hasUpdated) {
|
245
|
-
if (this._$Ep) {
|
246
|
-
for (const [o, r] of this._$Ep)
|
247
|
-
this[o] = r;
|
248
|
-
this._$Ep = void 0;
|
249
|
-
}
|
250
|
-
const n = this.constructor.elementProperties;
|
251
|
-
if (n.size > 0)
|
252
|
-
for (const [o, r] of n)
|
253
|
-
r.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.C(o, this[o], r);
|
254
|
-
}
|
255
|
-
let t = !1;
|
256
|
-
const e = this._$AL;
|
257
|
-
try {
|
258
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$ES) == null || i.forEach((n) => {
|
259
|
-
var o;
|
260
|
-
return (o = n.hostUpdate) == null ? void 0 : o.call(n);
|
261
|
-
}), this.update(e)) : this._$ET();
|
262
|
-
} catch (n) {
|
263
|
-
throw t = !1, this._$ET(), n;
|
264
|
-
}
|
265
|
-
t && this._$AE(e);
|
266
|
-
}
|
267
|
-
willUpdate(t) {
|
268
|
-
}
|
269
|
-
_$AE(t) {
|
270
|
-
var e;
|
271
|
-
(e = this._$ES) == null || e.forEach((i) => {
|
272
|
-
var n;
|
273
|
-
return (n = i.hostUpdated) == null ? void 0 : n.call(i);
|
274
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
275
|
-
}
|
276
|
-
_$ET() {
|
277
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
278
|
-
}
|
279
|
-
get updateComplete() {
|
280
|
-
return this.getUpdateComplete();
|
281
|
-
}
|
282
|
-
getUpdateComplete() {
|
283
|
-
return this._$Eg;
|
284
|
-
}
|
285
|
-
shouldUpdate(t) {
|
286
|
-
return !0;
|
287
|
-
}
|
288
|
-
update(t) {
|
289
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
290
|
-
}
|
291
|
-
updated(t) {
|
292
|
-
}
|
293
|
-
firstUpdated(t) {
|
294
|
-
}
|
295
|
-
};
|
296
|
-
R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[F("elementProperties")] = /* @__PURE__ */ new Map(), R[F("finalized")] = /* @__PURE__ */ new Map(), kt == null || kt({ ReactiveElement: R }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.0.1");
|
297
|
-
/**
|
298
|
-
* @license
|
299
|
-
* Copyright 2017 Google LLC
|
300
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
301
|
-
*/
|
302
|
-
const W = globalThis, rt = W.trustedTypes, ie = rt ? rt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pe = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, Me = "?" + A, ys = `<${Me}>`, L = document, G = () => L.createComment(""), q = (s) => s === null || typeof s != "object" && typeof s != "function", Re = Array.isArray, bs = (s) => Re(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Tt = `[
|
303
|
-
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ne = /-->/g, oe = />/g, k = RegExp(`>|${Tt}(?:([^\\s"'>=/]+)(${Tt}*=${Tt}*(?:[^
|
304
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), re = /'/g, ae = /"/g, He = /^(?:script|style|textarea|title)$/i, _s = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), f = _s(1), E = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), O = L.createTreeWalker(L, 129);
|
305
|
-
function Ue(s, t) {
|
306
|
-
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
307
|
-
throw Error("invalid template strings array");
|
308
|
-
return ie !== void 0 ? ie.createHTML(t) : t;
|
309
|
-
}
|
310
|
-
const Cs = (s, t) => {
|
311
|
-
const e = s.length - 1, i = [];
|
312
|
-
let n, o = t === 2 ? "<svg>" : "", r = z;
|
313
|
-
for (let a = 0; a < e; a++) {
|
314
|
-
const l = s[a];
|
315
|
-
let c, d, h = -1, p = 0;
|
316
|
-
for (; p < l.length && (r.lastIndex = p, d = r.exec(l), d !== null); )
|
317
|
-
p = r.lastIndex, r === z ? d[1] === "!--" ? r = ne : d[1] !== void 0 ? r = oe : d[2] !== void 0 ? (He.test(d[2]) && (n = RegExp("</" + d[2], "g")), r = k) : d[3] !== void 0 && (r = k) : r === k ? d[0] === ">" ? (r = n ?? z, h = -1) : d[1] === void 0 ? h = -2 : (h = r.lastIndex - d[2].length, c = d[1], r = d[3] === void 0 ? k : d[3] === '"' ? ae : re) : r === ae || r === re ? r = k : r === ne || r === oe ? r = z : (r = k, n = void 0);
|
318
|
-
const g = r === k && s[a + 1].startsWith("/>") ? " " : "";
|
319
|
-
o += r === z ? l + ys : h >= 0 ? (i.push(c), l.slice(0, h) + Pe + l.slice(h) + A + g) : l + A + (h === -2 ? a : g);
|
320
|
-
}
|
321
|
-
return [Ue(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
322
|
-
};
|
323
|
-
class Y {
|
324
|
-
constructor({ strings: t, _$litType$: e }, i) {
|
325
|
-
let n;
|
326
|
-
this.parts = [];
|
327
|
-
let o = 0, r = 0;
|
328
|
-
const a = t.length - 1, l = this.parts, [c, d] = Cs(t, e);
|
329
|
-
if (this.el = Y.createElement(c, i), O.currentNode = this.el.content, e === 2) {
|
330
|
-
const h = this.el.content.firstChild;
|
331
|
-
h.replaceWith(...h.childNodes);
|
332
|
-
}
|
333
|
-
for (; (n = O.nextNode()) !== null && l.length < a; ) {
|
334
|
-
if (n.nodeType === 1) {
|
335
|
-
if (n.hasAttributes())
|
336
|
-
for (const h of n.getAttributeNames())
|
337
|
-
if (h.endsWith(Pe)) {
|
338
|
-
const p = d[r++], g = n.getAttribute(h).split(A), C = /([.?@])?(.*)/.exec(p);
|
339
|
-
l.push({ type: 1, index: o, name: C[2], strings: g, ctor: C[1] === "." ? ws : C[1] === "?" ? As : C[1] === "@" ? Ss : vt }), n.removeAttribute(h);
|
340
|
-
} else
|
341
|
-
h.startsWith(A) && (l.push({ type: 6, index: o }), n.removeAttribute(h));
|
342
|
-
if (He.test(n.tagName)) {
|
343
|
-
const h = n.textContent.split(A), p = h.length - 1;
|
344
|
-
if (p > 0) {
|
345
|
-
n.textContent = rt ? rt.emptyScript : "";
|
346
|
-
for (let g = 0; g < p; g++)
|
347
|
-
n.append(h[g], G()), O.nextNode(), l.push({ type: 2, index: ++o });
|
348
|
-
n.append(h[p], G());
|
349
|
-
}
|
350
|
-
}
|
351
|
-
} else if (n.nodeType === 8)
|
352
|
-
if (n.data === Me)
|
353
|
-
l.push({ type: 2, index: o });
|
354
|
-
else {
|
355
|
-
let h = -1;
|
356
|
-
for (; (h = n.data.indexOf(A, h + 1)) !== -1; )
|
357
|
-
l.push({ type: 7, index: o }), h += A.length - 1;
|
358
|
-
}
|
359
|
-
o++;
|
360
|
-
}
|
361
|
-
}
|
362
|
-
static createElement(t, e) {
|
363
|
-
const i = L.createElement("template");
|
364
|
-
return i.innerHTML = t, i;
|
365
|
-
}
|
366
|
-
}
|
367
|
-
function I(s, t, e = s, i) {
|
368
|
-
var r, a;
|
369
|
-
if (t === E)
|
370
|
-
return t;
|
371
|
-
let n = i !== void 0 ? (r = e._$Co) == null ? void 0 : r[i] : e._$Cl;
|
372
|
-
const o = q(t) ? void 0 : t._$litDirective$;
|
373
|
-
return (n == null ? void 0 : n.constructor) !== o && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), o === void 0 ? n = void 0 : (n = new o(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = I(s, n._$AS(s, t.values), n, i)), t;
|
374
|
-
}
|
375
|
-
class xs {
|
376
|
-
constructor(t, e) {
|
377
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
378
|
-
}
|
379
|
-
get parentNode() {
|
380
|
-
return this._$AM.parentNode;
|
381
|
-
}
|
382
|
-
get _$AU() {
|
383
|
-
return this._$AM._$AU;
|
384
|
-
}
|
385
|
-
u(t) {
|
386
|
-
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? L).importNode(e, !0);
|
387
|
-
O.currentNode = n;
|
388
|
-
let o = O.nextNode(), r = 0, a = 0, l = i[0];
|
389
|
-
for (; l !== void 0; ) {
|
390
|
-
if (r === l.index) {
|
391
|
-
let c;
|
392
|
-
l.type === 2 ? c = new K(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Es(o, this, t)), this._$AV.push(c), l = i[++a];
|
393
|
-
}
|
394
|
-
r !== (l == null ? void 0 : l.index) && (o = O.nextNode(), r++);
|
395
|
-
}
|
396
|
-
return O.currentNode = L, n;
|
397
|
-
}
|
398
|
-
p(t) {
|
399
|
-
let e = 0;
|
400
|
-
for (const i of this._$AV)
|
401
|
-
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
402
|
-
}
|
403
|
-
}
|
404
|
-
class K {
|
405
|
-
get _$AU() {
|
406
|
-
var t;
|
407
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
408
|
-
}
|
409
|
-
constructor(t, e, i, n) {
|
410
|
-
this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
411
|
-
}
|
412
|
-
get parentNode() {
|
413
|
-
let t = this._$AA.parentNode;
|
414
|
-
const e = this._$AM;
|
415
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
416
|
-
}
|
417
|
-
get startNode() {
|
418
|
-
return this._$AA;
|
419
|
-
}
|
420
|
-
get endNode() {
|
421
|
-
return this._$AB;
|
422
|
-
}
|
423
|
-
_$AI(t, e = this) {
|
424
|
-
t = I(this, t, e), q(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : bs(t) ? this.T(t) : this._(t);
|
425
|
-
}
|
426
|
-
k(t) {
|
427
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
428
|
-
}
|
429
|
-
$(t) {
|
430
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
431
|
-
}
|
432
|
-
_(t) {
|
433
|
-
this._$AH !== u && q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(L.createTextNode(t)), this._$AH = t;
|
434
|
-
}
|
435
|
-
g(t) {
|
436
|
-
var o;
|
437
|
-
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Y.createElement(Ue(i.h, i.h[0]), this.options)), i);
|
438
|
-
if (((o = this._$AH) == null ? void 0 : o._$AD) === n)
|
439
|
-
this._$AH.p(e);
|
440
|
-
else {
|
441
|
-
const r = new xs(n, this), a = r.u(this.options);
|
442
|
-
r.p(e), this.$(a), this._$AH = r;
|
443
|
-
}
|
444
|
-
}
|
445
|
-
_$AC(t) {
|
446
|
-
let e = le.get(t.strings);
|
447
|
-
return e === void 0 && le.set(t.strings, e = new Y(t)), e;
|
448
|
-
}
|
449
|
-
T(t) {
|
450
|
-
Re(this._$AH) || (this._$AH = [], this._$AR());
|
451
|
-
const e = this._$AH;
|
452
|
-
let i, n = 0;
|
453
|
-
for (const o of t)
|
454
|
-
n === e.length ? e.push(i = new K(this.k(G()), this.k(G()), this, this.options)) : i = e[n], i._$AI(o), n++;
|
455
|
-
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
456
|
-
}
|
457
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
458
|
-
var i;
|
459
|
-
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
460
|
-
const n = t.nextSibling;
|
461
|
-
t.remove(), t = n;
|
462
|
-
}
|
463
|
-
}
|
464
|
-
setConnected(t) {
|
465
|
-
var e;
|
466
|
-
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
467
|
-
}
|
468
|
-
}
|
469
|
-
class vt {
|
470
|
-
get tagName() {
|
471
|
-
return this.element.tagName;
|
472
|
-
}
|
473
|
-
get _$AU() {
|
474
|
-
return this._$AM._$AU;
|
475
|
-
}
|
476
|
-
constructor(t, e, i, n, o) {
|
477
|
-
this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
|
478
|
-
}
|
479
|
-
_$AI(t, e = this, i, n) {
|
480
|
-
const o = this.strings;
|
481
|
-
let r = !1;
|
482
|
-
if (o === void 0)
|
483
|
-
t = I(this, t, e, 0), r = !q(t) || t !== this._$AH && t !== E, r && (this._$AH = t);
|
484
|
-
else {
|
485
|
-
const a = t;
|
486
|
-
let l, c;
|
487
|
-
for (t = o[0], l = 0; l < o.length - 1; l++)
|
488
|
-
c = I(this, a[i + l], e, l), c === E && (c = this._$AH[l]), r || (r = !q(c) || c !== this._$AH[l]), c === u ? t = u : t !== u && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
|
489
|
-
}
|
490
|
-
r && !n && this.O(t);
|
491
|
-
}
|
492
|
-
O(t) {
|
493
|
-
t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
494
|
-
}
|
495
|
-
}
|
496
|
-
class ws extends vt {
|
497
|
-
constructor() {
|
498
|
-
super(...arguments), this.type = 3;
|
499
|
-
}
|
500
|
-
O(t) {
|
501
|
-
this.element[this.name] = t === u ? void 0 : t;
|
502
|
-
}
|
503
|
-
}
|
504
|
-
let As = class extends vt {
|
505
|
-
constructor() {
|
506
|
-
super(...arguments), this.type = 4;
|
507
|
-
}
|
508
|
-
O(t) {
|
509
|
-
this.element.toggleAttribute(this.name, !!t && t !== u);
|
510
|
-
}
|
511
|
-
};
|
512
|
-
class Ss extends vt {
|
513
|
-
constructor(t, e, i, n, o) {
|
514
|
-
super(t, e, i, n, o), this.type = 5;
|
515
|
-
}
|
516
|
-
_$AI(t, e = this) {
|
517
|
-
if ((t = I(this, t, e, 0) ?? u) === E)
|
518
|
-
return;
|
519
|
-
const i = this._$AH, n = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== u && (i === u || n);
|
520
|
-
n && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
521
|
-
}
|
522
|
-
handleEvent(t) {
|
523
|
-
var e;
|
524
|
-
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
525
|
-
}
|
526
|
-
}
|
527
|
-
class Es {
|
528
|
-
constructor(t, e, i) {
|
529
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
530
|
-
}
|
531
|
-
get _$AU() {
|
532
|
-
return this._$AM._$AU;
|
533
|
-
}
|
534
|
-
_$AI(t) {
|
535
|
-
I(this, t);
|
536
|
-
}
|
537
|
-
}
|
538
|
-
const Ot = W.litHtmlPolyfillSupport;
|
539
|
-
Ot == null || Ot(Y, K), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.0.2");
|
540
|
-
const ks = (s, t, e) => {
|
541
|
-
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
542
|
-
let n = i._$litPart$;
|
543
|
-
if (n === void 0) {
|
544
|
-
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
545
|
-
i._$litPart$ = n = new K(t.insertBefore(G(), o), o, void 0, e ?? {});
|
546
|
-
}
|
547
|
-
return n._$AI(s), n;
|
548
|
-
};
|
549
|
-
/**
|
550
|
-
* @license
|
551
|
-
* Copyright 2017 Google LLC
|
552
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
553
|
-
*/
|
554
|
-
let m = class extends R {
|
555
|
-
constructor() {
|
556
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
557
|
-
}
|
558
|
-
createRenderRoot() {
|
559
|
-
var e;
|
560
|
-
const t = super.createRenderRoot();
|
561
|
-
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
562
|
-
}
|
563
|
-
update(t) {
|
564
|
-
const e = this.render();
|
565
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ks(e, this.renderRoot, this.renderOptions);
|
566
|
-
}
|
567
|
-
connectedCallback() {
|
568
|
-
var t;
|
569
|
-
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
570
|
-
}
|
571
|
-
disconnectedCallback() {
|
572
|
-
var t;
|
573
|
-
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
574
|
-
}
|
575
|
-
render() {
|
576
|
-
return E;
|
577
|
-
}
|
578
|
-
};
|
579
|
-
var Oe;
|
580
|
-
m._$litElement$ = !0, m.finalized = !0, (Oe = globalThis.litElementHydrateSupport) == null || Oe.call(globalThis, { LitElement: m });
|
581
|
-
const Lt = globalThis.litElementPolyfillSupport;
|
582
|
-
Lt == null || Lt({ LitElement: m });
|
583
|
-
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
584
|
-
const Ts = { name: "alert", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 60C47.464 60 60 47.464 60 32C60 16.536 47.464 4 32 4C16.536 4 4 16.536 4 32C4.01731 47.4568 16.5432 59.9827 32 60ZM32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6923 45.0849 45.0849 55.6923 32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.32247 18.9212 18.9212 8.32247 32 8.30769Z"/><path d="M29.3491 38.6031V20.6807C29.348 19.8662 29.4903 19.0598 29.7675 18.3096C29.9945 17.6371 30.3484 17.0302 30.804 16.5322C31.1251 16.1524 31.5593 15.9246 32.0204 15.894C32.6852 15.894 33.3496 16.471 34.0134 17.625C34.3738 18.1337 34.5955 18.7525 34.6509 19.4042V37.3267C34.6509 37.9947 34.2454 38.6329 33.4345 39.2414C32.6632 39.835 31.7547 40.1521 30.825 40.1523C29.8423 40.1524 29.3503 39.636 29.3491 38.6031Z"/><path d="M33.66 44.6959C33.9649 45.0866 34.161 45.551 34.2284 46.0419C34.2284 46.5397 33.8893 47.0083 33.2109 47.4476C32.5638 47.8771 31.8043 48.1062 31.0275 48.1061C30.1902 48.1061 29.7716 47.7271 29.7716 46.9693C29.7703 46.3788 29.8874 45.7941 30.116 45.2496C30.3064 44.7579 30.6022 44.3138 30.9826 43.9487C31.2626 43.6591 31.6427 43.4875 32.045 43.4692C32.5635 43.4692 33.1019 43.8781 33.66 44.6959Z"/></svg>' }, Os = { name: "check-circle-filled", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9829 16.5431 47.4569 4.01712 32 4ZM44.5613 24.5793L31.6382 43.9639C31.2806 44.5011 30.7008 44.8493 30.0586 44.9126C29.988 44.9197 29.9171 44.9232 29.8462 44.9231C29.275 44.9229 28.7272 44.696 28.3233 44.2921L19.7079 35.6767C19.1639 35.1326 18.9514 34.3396 19.1505 33.5964C19.3497 32.8533 19.9302 32.2728 20.6734 32.0736C21.4166 31.8745 22.2095 32.087 22.7536 32.631L29.5117 39.3881L40.9772 22.1899C41.4016 21.5439 42.1396 21.1749 42.9111 21.2229C43.6825 21.2709 44.3691 21.7286 44.7101 22.4223C45.0511 23.1159 44.9944 23.9391 44.5613 24.5793Z"/></svg>' }, Ls = { name: "check-circle", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9998 4C16.5358 4 3.99976 16.536 3.99976 32C3.99976 47.464 16.5358 60 31.9998 60C47.4637 60 59.9998 47.464 59.9998 32C59.9826 16.5431 47.4566 4.01712 31.9998 4ZM31.9998 55.6923C18.9149 55.6923 8.30745 45.0849 8.30745 32C8.30745 18.9151 18.9149 8.30769 31.9998 8.30769C45.0847 8.30769 55.6921 18.9151 55.6921 32C55.6773 45.0788 45.0785 55.6775 31.9998 55.6923ZM44.5611 24.5793L31.638 43.9639C31.2804 44.5011 30.7005 44.8493 30.0584 44.9126C29.9878 44.9197 29.9169 44.9232 29.8459 44.9231C29.2747 44.9229 28.727 44.696 28.3231 44.2921L19.7077 35.6767C19.1636 35.1326 18.9512 34.3396 19.1503 33.5964C19.3494 32.8533 19.9299 32.2728 20.6731 32.0736C21.4163 31.8745 22.2093 32.087 22.7534 32.631L29.5115 39.3881L40.9769 22.1899C41.4013 21.5439 42.1394 21.1749 42.9108 21.2229C43.6823 21.2709 44.3688 21.7286 44.7099 22.4223C45.0509 23.1159 44.9941 23.9391 44.5611 24.5793Z"/></svg>' }, ce = { name: "mute", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M51.4283 11.6761L53.1768 9.53891C53.9347 8.61282 53.7982 7.24774 52.8722 6.48993C51.9461 5.73211 50.581 5.86852 49.8232 6.79461L36.3333 23.2822V13.3972C36.3332 11.6447 35.2774 10.0648 33.6583 9.39418C32.0391 8.72356 30.1755 9.09425 28.9362 10.3334L18.1029 21.1668H14.6667C9.88247 21.1722 6.00547 25.0492 6 29.8334V34.1668C6.00547 38.951 9.88247 42.828 14.6667 42.8334H18.1029L19.3315 44.0621L10.8232 54.4613C10.0653 55.3874 10.2018 56.7525 11.1279 57.5103C12.0539 58.2681 13.419 58.1317 14.1768 57.2056L22.411 47.1416L28.9362 53.6668C30.1755 54.9059 32.0391 55.2766 33.6583 54.606C35.2774 53.9354 36.3332 52.3555 36.3333 50.603V30.1254L42.6092 22.4549C44.2201 25.3756 45.044 28.6649 45 32.0001C45.1184 36.1899 43.7698 40.2896 41.1872 43.5909C40.409 44.5001 40.5152 45.8679 41.4243 46.6461C42.3334 47.4243 43.7012 47.3183 44.4795 46.4093C47.7313 42.3208 49.4486 37.2227 49.3333 32.0001C49.403 27.3538 48.067 22.7949 45.5005 18.9211L48.6119 15.1182C52.019 20.0793 53.7867 25.9829 53.6667 32.0001C53.6667 39.0587 51.4873 45.6518 47.6872 50.0909C46.909 51.0001 47.0152 52.3679 47.9243 53.1461C48.8334 53.9243 50.2012 53.8183 50.9795 52.9093C55.4408 47.6968 58 40.0764 58 32.0001C58 24.21 55.6006 16.8662 51.4283 11.6761ZM19.8971 38.5H14.6667C12.2744 38.4977 10.3357 36.559 10.3333 34.1667V29.8334C10.3357 27.4411 12.2744 25.5024 14.6667 25.5H19.8971L32 13.3972V28.5784L22.089 40.6919L19.8971 38.5ZM31.9997 50.603L25.1682 43.7715L31.9997 35.4218V50.603Z"/></svg>' }, Ps = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' }, Ms = { name: "send", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>' }, de = { name: "volume", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M33.6578 9.3322C32.0391 8.65799 30.1735 9.02919 28.9362 10.2717L18.1029 21.105H14.6667C9.88247 21.1105 6.00547 24.9875 6 29.7717V34.105C6.00547 38.8892 9.88247 42.7662 14.6667 42.7717H18.1029L28.9362 53.605C30.1755 54.8442 32.0391 55.2149 33.6583 54.5442C35.2774 53.8736 36.3332 52.2937 36.3333 50.5412V13.3355C36.3365 11.5817 35.2794 10.0001 33.6578 9.3322ZM32 50.5411L19.8971 38.4382H14.6667C12.2744 38.4358 10.3357 36.4971 10.3333 34.1049V29.7716C10.3357 27.3793 12.2744 25.4406 14.6667 25.4382H19.8971L32 13.3353V50.5411ZM49.3334 31.9383C49.4487 37.161 47.7314 42.2591 44.4796 46.3475C43.7013 47.2565 42.3335 47.3625 41.4244 46.5843C40.5153 45.8061 40.4092 44.4383 41.1873 43.5291C43.7699 40.2278 45.1185 36.1282 45.0001 31.9383C45.1185 27.7485 43.7699 23.6488 41.1873 20.3475C40.4092 19.4383 40.5153 18.0705 41.4244 17.2923C42.3335 16.5141 43.7013 16.6201 44.4796 17.5291C47.7314 21.6176 49.4487 26.7157 49.3334 31.9383ZM58.0001 31.9383C58.0001 40.0147 55.441 47.635 50.9796 52.8475C50.2013 53.7565 48.8335 53.8625 47.9244 53.0843C47.0153 52.3061 46.9092 50.9383 47.6873 50.0291C51.4874 45.59 53.6668 38.9969 53.6668 31.9383C53.6668 24.8797 51.4874 18.2866 47.6873 13.8475C46.9092 12.9383 47.0153 11.5705 47.9244 10.7923C48.8335 10.0141 50.2013 10.1201 50.9796 11.0291C55.441 16.2416 58.0001 23.862 58.0001 31.9383Z"/></svg>' }, H = {
|
585
|
-
allRenderFn: !1,
|
586
|
-
cmpDidLoad: !0,
|
587
|
-
cmpDidUnload: !1,
|
588
|
-
cmpDidUpdate: !0,
|
589
|
-
cmpDidRender: !0,
|
590
|
-
cmpWillLoad: !0,
|
591
|
-
cmpWillUpdate: !0,
|
592
|
-
cmpWillRender: !0,
|
593
|
-
connectedCallback: !0,
|
594
|
-
disconnectedCallback: !0,
|
595
|
-
element: !0,
|
596
|
-
event: !0,
|
597
|
-
hasRenderFn: !0,
|
598
|
-
lifecycle: !0,
|
599
|
-
hostListener: !0,
|
600
|
-
hostListenerTargetWindow: !0,
|
601
|
-
hostListenerTargetDocument: !0,
|
602
|
-
hostListenerTargetBody: !0,
|
603
|
-
hostListenerTargetParent: !1,
|
604
|
-
hostListenerTarget: !0,
|
605
|
-
member: !0,
|
606
|
-
method: !0,
|
607
|
-
mode: !0,
|
608
|
-
observeAttribute: !0,
|
609
|
-
prop: !0,
|
610
|
-
propMutable: !0,
|
611
|
-
reflect: !0,
|
612
|
-
scoped: !0,
|
613
|
-
shadowDom: !0,
|
614
|
-
slot: !0,
|
615
|
-
cssAnnotations: !0,
|
616
|
-
state: !0,
|
617
|
-
style: !0,
|
618
|
-
svg: !0,
|
619
|
-
updatable: !0,
|
620
|
-
vdomAttribute: !0,
|
621
|
-
vdomXlink: !0,
|
622
|
-
vdomClass: !0,
|
623
|
-
vdomFunctional: !0,
|
624
|
-
vdomKey: !0,
|
625
|
-
vdomListener: !0,
|
626
|
-
vdomRef: !0,
|
627
|
-
vdomPropOrAttr: !0,
|
628
|
-
vdomRender: !0,
|
629
|
-
vdomStyle: !0,
|
630
|
-
vdomText: !0,
|
631
|
-
watchCallback: !0,
|
632
|
-
taskQueue: !0,
|
633
|
-
hotModuleReplacement: !1,
|
634
|
-
isDebug: !1,
|
635
|
-
isDev: !1,
|
636
|
-
isTesting: !1,
|
637
|
-
hydrateServerSide: !1,
|
638
|
-
hydrateClientSide: !1,
|
639
|
-
lifecycleDOMEvents: !1,
|
640
|
-
lazyLoad: !1,
|
641
|
-
profile: !1,
|
642
|
-
slotRelocation: !0,
|
643
|
-
appendChildSlotFix: !1,
|
644
|
-
cloneNodeFix: !1,
|
645
|
-
hydratedAttribute: !1,
|
646
|
-
hydratedClass: !0,
|
647
|
-
safari10: !1,
|
648
|
-
scriptDataOpts: !1,
|
649
|
-
scopedSlotTextContentFix: !1,
|
650
|
-
shadowDomShim: !1,
|
651
|
-
slotChildNodesFix: !1,
|
652
|
-
invisiblePrehydration: !0,
|
653
|
-
propBoolean: !0,
|
654
|
-
propNumber: !0,
|
655
|
-
propString: !0,
|
656
|
-
cssVarShim: !1,
|
657
|
-
constructableCSS: !0,
|
658
|
-
cmpShouldUpdate: !0,
|
659
|
-
devTools: !1,
|
660
|
-
dynamicImportShim: !1,
|
661
|
-
shadowDelegatesFocus: !0,
|
662
|
-
initializeNextTick: !1,
|
663
|
-
asyncLoading: !1,
|
664
|
-
asyncQueue: !1,
|
665
|
-
transformTagName: !1,
|
666
|
-
attachStyles: !0
|
667
|
-
};
|
668
|
-
let U, Ne, yt, je = !1, at = !1, Wt = !1, y = !1, he = null, Ht = !1;
|
669
|
-
const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, De = bt.HTMLElement || class {
|
670
|
-
}, v = {
|
671
|
-
$flags$: 0,
|
672
|
-
$resourcesUrl$: "",
|
673
|
-
jmp: (s) => s(),
|
674
|
-
raf: (s) => requestAnimationFrame(s),
|
675
|
-
ael: (s, t, e, i) => s.addEventListener(t, e, i),
|
676
|
-
rel: (s, t, e, i) => s.removeEventListener(t, e, i),
|
677
|
-
ce: (s, t) => new CustomEvent(s, t)
|
678
|
-
}, Rs = /* @__PURE__ */ (() => {
|
679
|
-
let s = !1;
|
680
|
-
try {
|
681
|
-
x.addEventListener("e", null, Object.defineProperty({}, "passive", {
|
682
|
-
get() {
|
683
|
-
s = !0;
|
684
|
-
}
|
685
|
-
}));
|
686
|
-
} catch {
|
687
|
-
}
|
688
|
-
return s;
|
689
|
-
})(), Hs = (s) => Promise.resolve(s), Us = /* @__PURE__ */ (() => {
|
690
|
-
try {
|
691
|
-
return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
|
692
|
-
} catch {
|
693
|
-
}
|
694
|
-
return !1;
|
695
|
-
})(), Ie = (s, t, e, i) => {
|
696
|
-
e && e.map(([n, o, r]) => {
|
697
|
-
const a = js(s, n), l = Ns(t, r), c = Ds(n);
|
698
|
-
v.ael(a, o, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => v.rel(a, o, l, c));
|
699
|
-
});
|
700
|
-
}, Ns = (s, t) => (e) => {
|
701
|
-
try {
|
702
|
-
H.lazyLoad || s.$hostElement$[t](e);
|
703
|
-
} catch (i) {
|
704
|
-
Q(i);
|
705
|
-
}
|
706
|
-
}, js = (s, t) => t & 4 ? x : t & 8 ? bt : t & 16 ? x.body : s, Ds = (s) => Rs ? {
|
707
|
-
passive: (s & 1) !== 0,
|
708
|
-
capture: (s & 2) !== 0
|
709
|
-
} : (s & 2) !== 0, pe = "http://www.w3.org/1999/xlink", P = (s, t = "") => () => {
|
710
|
-
}, ue = /* @__PURE__ */ new WeakMap(), Is = (s, t, e) => {
|
711
|
-
let i = dt.get(s);
|
712
|
-
Us && e ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, dt.set(s, i);
|
713
|
-
}, Bs = (s, t, e, i) => {
|
714
|
-
let n = Be(t, e), o = dt.get(n);
|
715
|
-
if (s = s.nodeType === 11 ? s : x, o)
|
716
|
-
if (typeof o == "string") {
|
717
|
-
s = s.head || s;
|
718
|
-
let r = ue.get(s), a;
|
719
|
-
r || ue.set(s, r = /* @__PURE__ */ new Set()), r.has(n) || (a = x.createElement("style"), a.innerHTML = o, s.insertBefore(a, s.querySelector("link")), r && r.add(n));
|
720
|
-
} else
|
721
|
-
s.adoptedStyleSheets.includes(o) || (s.adoptedStyleSheets = [...s.adoptedStyleSheets, o]);
|
722
|
-
return n;
|
723
|
-
}, zs = (s) => {
|
724
|
-
const t = s.$cmpMeta$, e = s.$hostElement$, i = t.$flags$, n = P("attachStyles", t.$tagName$), o = Bs(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, s.$modeName$);
|
725
|
-
i & 10 && (e["s-sc"] = o, e.classList.add(o + "-h"), i & 2 && e.classList.add(o + "-s")), n();
|
726
|
-
}, Be = (s, t) => "sc-" + (t && s.$flags$ & 32 ? s.$tagName$ + "-" + t : s.$tagName$), Fs = (s) => mi.map((t) => t(s)).find((t) => !!t), fe = {}, Ws = "http://www.w3.org/2000/svg", Zs = "http://www.w3.org/1999/xhtml", Gs = (s) => s != null, Zt = (s) => (s = typeof s, s === "object" || s === "function"), j = (s, t, ...e) => {
|
727
|
-
let i = null, n = null, o = null, r = !1, a = !1, l = [];
|
728
|
-
const c = (h) => {
|
729
|
-
for (let p = 0; p < h.length; p++)
|
730
|
-
i = h[p], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((r = typeof s != "function" && !Zt(i)) && (i = String(i)), r && a ? l[l.length - 1].$text$ += i : l.push(r ? lt(null, i) : i), a = r);
|
731
|
-
};
|
732
|
-
if (c(e), t) {
|
733
|
-
t.key && (n = t.key), t.name && (o = t.name);
|
734
|
-
{
|
735
|
-
const h = t.className || t.class;
|
736
|
-
h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((p) => h[p]).join(" "));
|
737
|
-
}
|
738
|
-
}
|
739
|
-
if (typeof s == "function")
|
740
|
-
return s(t === null ? {} : t, l, Ys);
|
741
|
-
const d = lt(s, null);
|
742
|
-
return d.$attrs$ = t, l.length > 0 && (d.$children$ = l), d.$key$ = n, d.$name$ = o, d;
|
743
|
-
}, lt = (s, t) => {
|
744
|
-
const e = {
|
745
|
-
$flags$: 0,
|
746
|
-
$tag$: s,
|
747
|
-
$text$: t,
|
748
|
-
$elm$: null,
|
749
|
-
$children$: null
|
750
|
-
};
|
751
|
-
return e.$attrs$ = null, e.$key$ = null, e.$name$ = null, e;
|
752
|
-
}, Gt = {}, qs = (s) => s && s.$tag$ === Gt, Ys = {
|
753
|
-
forEach: (s, t) => s.map(ge).forEach(t),
|
754
|
-
map: (s, t) => s.map(ge).map(t).map(Xs)
|
755
|
-
}, ge = (s) => ({
|
756
|
-
vattrs: s.$attrs$,
|
757
|
-
vchildren: s.$children$,
|
758
|
-
vkey: s.$key$,
|
759
|
-
vname: s.$name$,
|
760
|
-
vtag: s.$tag$,
|
761
|
-
vtext: s.$text$
|
762
|
-
}), Xs = (s) => {
|
763
|
-
if (typeof s.vtag == "function") {
|
764
|
-
const e = Object.assign({}, s.vattrs);
|
765
|
-
return s.vkey && (e.key = s.vkey), s.vname && (e.name = s.vname), j(s.vtag, e, ...s.vchildren || []);
|
766
|
-
}
|
767
|
-
const t = lt(s.vtag, s.vtext);
|
768
|
-
return t.$attrs$ = s.vattrs, t.$children$ = s.vchildren, t.$key$ = s.vkey, t.$name$ = s.vname, t;
|
769
|
-
}, $e = (s, t, e, i, n, o) => {
|
770
|
-
if (e !== i) {
|
771
|
-
let r = be(s, t), a = t.toLowerCase();
|
772
|
-
if (t === "class") {
|
773
|
-
const l = s.classList, c = me(e), d = me(i);
|
774
|
-
l.remove(...c.filter((h) => h && !d.includes(h))), l.add(...d.filter((h) => h && !c.includes(h)));
|
775
|
-
} else if (t === "style") {
|
776
|
-
for (const l in e)
|
777
|
-
(!i || i[l] == null) && (l.includes("-") ? s.style.removeProperty(l) : s.style[l] = "");
|
778
|
-
for (const l in i)
|
779
|
-
(!e || i[l] !== e[l]) && (l.includes("-") ? s.style.setProperty(l, i[l]) : s.style[l] = i[l]);
|
780
|
-
} else if (t !== "key")
|
781
|
-
if (t === "ref")
|
782
|
-
i && i(s);
|
783
|
-
else if (!s.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
|
784
|
-
t[2] === "-" ? t = t.slice(3) : be(bt, a) ? t = a.slice(2) : t = a[2] + t.slice(3), e && v.rel(s, t, e, !1), i && v.ael(s, t, i, !1);
|
785
|
-
else {
|
786
|
-
const l = Zt(i);
|
787
|
-
if ((r || l && i !== null) && !n)
|
788
|
-
try {
|
789
|
-
if (s.tagName.includes("-"))
|
790
|
-
s[t] = i;
|
791
|
-
else {
|
792
|
-
let d = i ?? "";
|
793
|
-
t === "list" ? r = !1 : (e == null || s[t] != d) && (s[t] = d);
|
794
|
-
}
|
795
|
-
} catch {
|
796
|
-
}
|
797
|
-
let c = !1;
|
798
|
-
a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, c = !0), i == null || i === !1 ? (i !== !1 || s.getAttribute(t) === "") && (c ? s.removeAttributeNS(pe, t) : s.removeAttribute(t)) : (!r || o & 4 || n) && !l && (i = i === !0 ? "" : i, c ? s.setAttributeNS(pe, t, i) : s.setAttribute(t, i));
|
799
|
-
}
|
800
|
-
}
|
801
|
-
}, Ks = /\s/, me = (s) => s ? s.split(Ks) : [], ze = (s, t, e, i) => {
|
802
|
-
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = s && s.$attrs$ || fe, r = t.$attrs$ || fe;
|
803
|
-
for (i in o)
|
804
|
-
i in r || $e(n, i, o[i], void 0, e, t.$flags$);
|
805
|
-
for (i in r)
|
806
|
-
$e(n, i, o[i], r[i], e, t.$flags$);
|
807
|
-
}, ct = (s, t, e, i) => {
|
808
|
-
let n = t.$children$[e], o = 0, r, a, l;
|
809
|
-
if (je || (Wt = !0, n.$tag$ === "slot" && (U && i.classList.add(U + "-s"), n.$flags$ |= n.$children$ ? (
|
810
|
-
// slot element has fallback content
|
811
|
-
2
|
812
|
-
) : (
|
813
|
-
// slot element does not have fallback content
|
814
|
-
1
|
815
|
-
))), n.$text$ !== null)
|
816
|
-
r = n.$elm$ = x.createTextNode(n.$text$);
|
817
|
-
else if (n.$flags$ & 1)
|
818
|
-
r = n.$elm$ = x.createTextNode("");
|
819
|
-
else {
|
820
|
-
if (y || (y = n.$tag$ === "svg"), r = n.$elm$ = x.createElementNS(y ? Ws : Zs, n.$flags$ & 2 ? "slot-fb" : n.$tag$), y && n.$tag$ === "foreignObject" && (y = !1), ze(null, n, y), Gs(U) && r["s-si"] !== U && r.classList.add(r["s-si"] = U), n.$children$)
|
821
|
-
for (o = 0; o < n.$children$.length; ++o)
|
822
|
-
a = ct(s, n, o, r), a && r.appendChild(a);
|
823
|
-
n.$tag$ === "svg" ? y = !1 : r.tagName === "foreignObject" && (y = !0);
|
824
|
-
}
|
825
|
-
return r["s-hn"] = yt, n.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = Ne, r["s-sn"] = n.$name$ || "", l = s && s.$children$ && s.$children$[e], l && l.$tag$ === n.$tag$ && s.$elm$ && X(s.$elm$, !1)), r;
|
826
|
-
}, X = (s, t) => {
|
827
|
-
v.$flags$ |= 1;
|
828
|
-
const e = s.childNodes;
|
829
|
-
for (let i = e.length - 1; i >= 0; i--) {
|
830
|
-
const n = e[i];
|
831
|
-
n["s-hn"] !== yt && n["s-ol"] && (Ze(n).insertBefore(n, qt(n)), n["s-ol"].remove(), n["s-ol"] = void 0, Wt = !0), t && X(n, t);
|
832
|
-
}
|
833
|
-
v.$flags$ &= -2;
|
834
|
-
}, Fe = (s, t, e, i, n, o) => {
|
835
|
-
let r = s["s-cr"] && s["s-cr"].parentNode || s, a;
|
836
|
-
for (r.shadowRoot && r.tagName === yt && (r = r.shadowRoot); n <= o; ++n)
|
837
|
-
i[n] && (a = ct(null, e, n, s), a && (i[n].$elm$ = a, r.insertBefore(a, qt(t))));
|
838
|
-
}, We = (s, t, e, i, n) => {
|
839
|
-
for (; t <= e; ++t)
|
840
|
-
(i = s[t]) && (n = i.$elm$, Ye(i), at = !0, n["s-ol"] ? n["s-ol"].remove() : X(n, !0), n.remove());
|
841
|
-
}, Qs = (s, t, e, i) => {
|
842
|
-
let n = 0, o = 0, r = 0, a = 0, l = t.length - 1, c = t[0], d = t[l], h = i.length - 1, p = i[0], g = i[h], C, et;
|
843
|
-
for (; n <= l && o <= h; )
|
844
|
-
if (c == null)
|
845
|
-
c = t[++n];
|
846
|
-
else if (d == null)
|
847
|
-
d = t[--l];
|
848
|
-
else if (p == null)
|
849
|
-
p = i[++o];
|
850
|
-
else if (g == null)
|
851
|
-
g = i[--h];
|
852
|
-
else if (st(c, p))
|
853
|
-
N(c, p), c = t[++n], p = i[++o];
|
854
|
-
else if (st(d, g))
|
855
|
-
N(d, g), d = t[--l], g = i[--h];
|
856
|
-
else if (st(c, g))
|
857
|
-
(c.$tag$ === "slot" || g.$tag$ === "slot") && X(c.$elm$.parentNode, !1), N(c, g), s.insertBefore(c.$elm$, d.$elm$.nextSibling), c = t[++n], g = i[--h];
|
858
|
-
else if (st(d, p))
|
859
|
-
(c.$tag$ === "slot" || g.$tag$ === "slot") && X(d.$elm$.parentNode, !1), N(d, p), s.insertBefore(d.$elm$, c.$elm$), d = t[--l], p = i[++o];
|
860
|
-
else {
|
861
|
-
for (r = -1, a = n; a <= l; ++a)
|
862
|
-
if (t[a] && t[a].$key$ !== null && t[a].$key$ === p.$key$) {
|
863
|
-
r = a;
|
864
|
-
break;
|
865
|
-
}
|
866
|
-
r >= 0 ? (et = t[r], et.$tag$ !== p.$tag$ ? C = ct(t && t[o], e, r, s) : (N(et, p), t[r] = void 0, C = et.$elm$), p = i[++o]) : (C = ct(t && t[o], e, o, s), p = i[++o]), C && Ze(c.$elm$).insertBefore(C, qt(c.$elm$));
|
867
|
-
}
|
868
|
-
n > l ? Fe(s, i[h + 1] == null ? null : i[h + 1].$elm$, e, i, o, h) : o > h && We(t, n, l);
|
869
|
-
}, st = (s, t) => s.$tag$ === t.$tag$ ? s.$tag$ === "slot" ? s.$name$ === t.$name$ : s.$key$ === t.$key$ : !1, qt = (s) => s && s["s-ol"] || s, Ze = (s) => (s["s-ol"] ? s["s-ol"] : s).parentNode, N = (s, t) => {
|
870
|
-
const e = t.$elm$ = s.$elm$, i = s.$children$, n = t.$children$, o = t.$tag$, r = t.$text$;
|
871
|
-
let a;
|
872
|
-
r === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y, o === "slot" || ze(s, t, y), i !== null && n !== null ? Qs(e, i, t, n) : n !== null ? (s.$text$ !== null && (e.textContent = ""), Fe(e, null, t, n, 0, n.length - 1)) : i !== null && We(i, 0, i.length - 1), y && o === "svg" && (y = !1)) : (a = e["s-cr"]) ? a.parentNode.textContent = r : s.$text$ !== r && (e.data = r);
|
873
|
-
}, Ge = (s) => {
|
874
|
-
let t = s.childNodes, e, i, n, o, r, a;
|
875
|
-
for (i = 0, n = t.length; i < n; i++)
|
876
|
-
if (e = t[i], e.nodeType === 1) {
|
877
|
-
if (e["s-sr"]) {
|
878
|
-
for (r = e["s-sn"], e.hidden = !1, o = 0; o < n; o++)
|
879
|
-
if (a = t[o].nodeType, t[o]["s-hn"] !== e["s-hn"] || r !== "") {
|
880
|
-
if (a === 1 && r === t[o].getAttribute("slot")) {
|
881
|
-
e.hidden = !0;
|
882
|
-
break;
|
883
|
-
}
|
884
|
-
} else if (a === 1 || a === 3 && t[o].textContent.trim() !== "") {
|
885
|
-
e.hidden = !0;
|
886
|
-
break;
|
887
|
-
}
|
888
|
-
}
|
889
|
-
Ge(e);
|
890
|
-
}
|
891
|
-
}, _ = [], qe = (s) => {
|
892
|
-
let t, e, i, n, o, r, a = 0, l = s.childNodes, c = l.length;
|
893
|
-
for (; a < c; a++) {
|
894
|
-
if (t = l[a], t["s-sr"] && (e = t["s-cr"]) && e.parentNode)
|
895
|
-
for (i = e.parentNode.childNodes, n = t["s-sn"], r = i.length - 1; r >= 0; r--)
|
896
|
-
e = i[r], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (ve(e, n) ? (o = _.find((d) => d.$nodeToRelocate$ === e), at = !0, e["s-sn"] = e["s-sn"] || n, o ? o.$slotRefNode$ = t : _.push({
|
897
|
-
$slotRefNode$: t,
|
898
|
-
$nodeToRelocate$: e
|
899
|
-
}), e["s-sr"] && _.map((d) => {
|
900
|
-
ve(d.$nodeToRelocate$, e["s-sn"]) && (o = _.find((h) => h.$nodeToRelocate$ === e), o && !d.$slotRefNode$ && (d.$slotRefNode$ = o.$slotRefNode$));
|
901
|
-
})) : _.some((d) => d.$nodeToRelocate$ === e) || _.push({
|
902
|
-
$nodeToRelocate$: e
|
903
|
-
}));
|
904
|
-
t.nodeType === 1 && qe(t);
|
905
|
-
}
|
906
|
-
}, ve = (s, t) => s.nodeType === 1 ? s.getAttribute("slot") === null && t === "" || s.getAttribute("slot") === t : s["s-sn"] === t ? !0 : t === "", Ye = (s) => {
|
907
|
-
s.$attrs$ && s.$attrs$.ref && s.$attrs$.ref(null), s.$children$ && s.$children$.map(Ye);
|
908
|
-
}, Js = (s, t) => {
|
909
|
-
const e = s.$hostElement$, i = s.$cmpMeta$, n = s.$vnode$ || lt(null, null), o = qs(t) ? t : j(null, null, t);
|
910
|
-
yt = e.tagName, i.$attrsToReflect$ && (o.$attrs$ = o.$attrs$ || {}, i.$attrsToReflect$.map(([r, a]) => o.$attrs$[a] = e[r])), o.$tag$ = null, o.$flags$ |= 4, s.$vnode$ = o, o.$elm$ = n.$elm$ = e.shadowRoot || e, U = e["s-sc"], Ne = e["s-cr"], je = (i.$flags$ & 1) !== 0, at = !1, N(n, o);
|
911
|
-
{
|
912
|
-
if (v.$flags$ |= 1, Wt) {
|
913
|
-
qe(o.$elm$);
|
914
|
-
let r, a, l, c, d, h, p = 0;
|
915
|
-
for (; p < _.length; p++)
|
916
|
-
r = _[p], a = r.$nodeToRelocate$, a["s-ol"] || (l = x.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
|
917
|
-
for (p = 0; p < _.length; p++)
|
918
|
-
if (r = _[p], a = r.$nodeToRelocate$, r.$slotRefNode$) {
|
919
|
-
for (c = r.$slotRefNode$.parentNode, d = r.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
|
920
|
-
if (h = l["s-nr"], h && h["s-sn"] === a["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
|
921
|
-
d = h;
|
922
|
-
break;
|
923
|
-
}
|
924
|
-
(!d && c !== a.parentNode || a.nextSibling !== d) && a !== d && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), c.insertBefore(a, d));
|
925
|
-
} else
|
926
|
-
a.nodeType === 1 && (a.hidden = !0);
|
927
|
-
}
|
928
|
-
at && Ge(o.$elm$), v.$flags$ &= -2, _.length = 0;
|
929
|
-
}
|
930
|
-
}, Vs = (s) => s, ti = (s, t, e) => {
|
931
|
-
const i = Vs(s);
|
932
|
-
return {
|
933
|
-
emit: (n) => ei(i, t, {
|
934
|
-
bubbles: !!(e & 4),
|
935
|
-
composed: !!(e & 2),
|
936
|
-
cancelable: !!(e & 1),
|
937
|
-
detail: n
|
938
|
-
})
|
939
|
-
};
|
940
|
-
}, ei = (s, t, e) => {
|
941
|
-
const i = v.ce(t, e);
|
942
|
-
return s.dispatchEvent(i), i;
|
943
|
-
}, si = (s, t) => {
|
944
|
-
}, Xe = (s, t) => (s.$flags$ |= 16, si(s, s.$ancestorComponent$), bi(() => ii(s, t))), ii = (s, t) => {
|
945
|
-
const e = s.$hostElement$, i = P("scheduleUpdate", s.$cmpMeta$.$tagName$), n = e;
|
946
|
-
let o;
|
947
|
-
return t ? o = D(n, "componentWillLoad") : o = D(n, "componentWillUpdate"), o = ye(o, () => D(n, "componentWillRender")), i(), ye(o, () => ni(s, n, t));
|
948
|
-
}, ni = async (s, t, e) => {
|
949
|
-
const i = s.$hostElement$, n = P("update", s.$cmpMeta$.$tagName$);
|
950
|
-
i["s-rc"], e && zs(s);
|
951
|
-
const o = P("render", s.$cmpMeta$.$tagName$);
|
952
|
-
oi(s, t, i), o(), n(), ri(s);
|
953
|
-
}, oi = (s, t, e) => {
|
954
|
-
try {
|
955
|
-
he = t, t = t.render && t.render(), s.$flags$ &= -17, s.$flags$ |= 2, (H.hasRenderFn || H.reflect) && (H.vdomRender || H.reflect) && (H.hydrateServerSide || Js(s, t));
|
956
|
-
} catch (a) {
|
957
|
-
Q(a, s.$hostElement$);
|
958
|
-
}
|
959
|
-
return he = null, null;
|
960
|
-
}, ri = (s) => {
|
961
|
-
const t = s.$cmpMeta$.$tagName$, e = s.$hostElement$, i = P("postUpdate", t), n = e;
|
962
|
-
s.$ancestorComponent$, D(n, "componentDidRender"), s.$flags$ & 64 ? (D(n, "componentDidUpdate"), i()) : (s.$flags$ |= 64, D(n, "componentDidLoad"), i());
|
963
|
-
}, D = (s, t, e) => {
|
964
|
-
if (s && s[t])
|
965
|
-
try {
|
966
|
-
return s[t](e);
|
967
|
-
} catch (i) {
|
968
|
-
Q(i);
|
969
|
-
}
|
970
|
-
}, ye = (s, t) => s && s.then ? s.then(t) : t(), ai = (s, t) => s != null && !Zt(s) ? t & 4 ? s === "false" ? !1 : s === "" || !!s : t & 2 ? parseFloat(s) : t & 1 ? String(s) : s : s, li = (s, t) => _t(s).$instanceValues$.get(t), ci = (s, t, e, i) => {
|
971
|
-
const n = _t(s), o = s, r = n.$instanceValues$.get(t), a = n.$flags$, l = o;
|
972
|
-
e = ai(e, i.$members$[t][0]);
|
973
|
-
const c = Number.isNaN(r) && Number.isNaN(e);
|
974
|
-
if (e !== r && !c) {
|
975
|
-
n.$instanceValues$.set(t, e);
|
976
|
-
{
|
977
|
-
if (i.$watchers$ && a & 128) {
|
978
|
-
const h = i.$watchers$[t];
|
979
|
-
h && h.map((p) => {
|
980
|
-
try {
|
981
|
-
l[p](e, r, t);
|
982
|
-
} catch (g) {
|
983
|
-
Q(g, o);
|
984
|
-
}
|
985
|
-
});
|
986
|
-
}
|
987
|
-
if ((a & 18) === 2) {
|
988
|
-
if (l.componentShouldUpdate && l.componentShouldUpdate(e, r, t) === !1)
|
989
|
-
return;
|
990
|
-
Xe(n, !1);
|
991
|
-
}
|
992
|
-
}
|
993
|
-
}
|
994
|
-
}, di = (s, t, e) => {
|
995
|
-
if (t.$members$) {
|
996
|
-
s.watchers && (t.$watchers$ = s.watchers);
|
997
|
-
const i = Object.entries(t.$members$), n = s.prototype;
|
998
|
-
i.map(([o, [r]]) => {
|
999
|
-
(r & 31 || r & 32) && Object.defineProperty(n, o, {
|
1000
|
-
get() {
|
1001
|
-
return li(this, o);
|
1002
|
-
},
|
1003
|
-
set(a) {
|
1004
|
-
ci(this, o, a, t);
|
1005
|
-
},
|
1006
|
-
configurable: !0,
|
1007
|
-
enumerable: !0
|
1008
|
-
});
|
1009
|
-
});
|
1010
|
-
{
|
1011
|
-
const o = /* @__PURE__ */ new Map();
|
1012
|
-
n.attributeChangedCallback = function(r, a, l) {
|
1013
|
-
v.jmp(() => {
|
1014
|
-
const c = o.get(r);
|
1015
|
-
if (this.hasOwnProperty(c))
|
1016
|
-
l = this[c], delete this[c];
|
1017
|
-
else if (n.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == l)
|
1018
|
-
return;
|
1019
|
-
this[c] = l === null && typeof this[c] == "boolean" ? !1 : l;
|
1020
|
-
});
|
1021
|
-
}, s.observedAttributes = i.filter(
|
1022
|
-
([r, a]) => a[0] & 15
|
1023
|
-
/* HasAttribute */
|
1024
|
-
).map(([r, a]) => {
|
1025
|
-
const l = a[1] || r;
|
1026
|
-
return o.set(l, r), a[0] & 512 && t.$attrsToReflect$.push([r, l]), l;
|
1027
|
-
});
|
1028
|
-
}
|
1029
|
-
}
|
1030
|
-
return s;
|
1031
|
-
}, hi = async (s, t, e, i, n) => {
|
1032
|
-
if (!(t.$flags$ & 32) && (n = s.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
|
1033
|
-
let r = n.style;
|
1034
|
-
typeof r != "string" && (r = r[t.$modeName$ = Fs(s)]);
|
1035
|
-
const a = Be(e, t.$modeName$);
|
1036
|
-
if (!dt.has(a)) {
|
1037
|
-
const l = P("registerStyles", e.$tagName$);
|
1038
|
-
Is(a, r, !!(e.$flags$ & 1)), l();
|
1039
|
-
}
|
1040
|
-
}
|
1041
|
-
t.$ancestorComponent$, (() => Xe(t, !0))();
|
1042
|
-
}, pi = (s) => {
|
1043
|
-
}, ui = (s) => {
|
1044
|
-
if (!(v.$flags$ & 1)) {
|
1045
|
-
const t = _t(s), e = t.$cmpMeta$, i = P("connectedCallback", e.$tagName$);
|
1046
|
-
t.$flags$ & 1 ? (Ie(s, t, e.$listeners$), pi(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && fi(s), e.$members$ && Object.entries(e.$members$).map(([n, [o]]) => {
|
1047
|
-
if (o & 31 && s.hasOwnProperty(n)) {
|
1048
|
-
const r = s[n];
|
1049
|
-
delete s[n], s[n] = r;
|
1050
|
-
}
|
1051
|
-
}), hi(s, t, e)), i();
|
1052
|
-
}
|
1053
|
-
}, fi = (s) => {
|
1054
|
-
const t = s["s-cr"] = x.createComment("");
|
1055
|
-
t["s-cn"] = !0, s.insertBefore(t, s.firstChild);
|
1056
|
-
}, gi = (s) => {
|
1057
|
-
if (!(v.$flags$ & 1)) {
|
1058
|
-
const t = _t(s);
|
1059
|
-
t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
|
1060
|
-
}
|
1061
|
-
}, Ke = (s, t) => {
|
1062
|
-
const e = {
|
1063
|
-
$flags$: t[0],
|
1064
|
-
$tagName$: t[1]
|
1065
|
-
};
|
1066
|
-
e.$members$ = t[2], e.$listeners$ = t[3], e.$watchers$ = s.$watchers$, e.$attrsToReflect$ = [];
|
1067
|
-
const i = s.prototype.connectedCallback, n = s.prototype.disconnectedCallback;
|
1068
|
-
return Object.assign(s.prototype, {
|
1069
|
-
__registerHost() {
|
1070
|
-
$i(this, e);
|
1071
|
-
},
|
1072
|
-
connectedCallback() {
|
1073
|
-
ui(this), i && i.call(this);
|
1074
|
-
},
|
1075
|
-
disconnectedCallback() {
|
1076
|
-
gi(this), n && n.call(this);
|
1077
|
-
},
|
1078
|
-
__attachShadow() {
|
1079
|
-
this.attachShadow({
|
1080
|
-
mode: "open",
|
1081
|
-
delegatesFocus: !!(e.$flags$ & 16)
|
1082
|
-
});
|
1083
|
-
}
|
1084
|
-
}), s.is = e.$tagName$, di(s, e);
|
1085
|
-
}, Qe = /* @__PURE__ */ new WeakMap(), _t = (s) => Qe.get(s), $i = (s, t) => {
|
1086
|
-
const e = {
|
1087
|
-
$flags$: 0,
|
1088
|
-
$hostElement$: s,
|
1089
|
-
$cmpMeta$: t,
|
1090
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
1091
|
-
};
|
1092
|
-
return Ie(s, e, t.$listeners$), Qe.set(s, e);
|
1093
|
-
}, be = (s, t) => t in s, Q = (s, t) => (0, console.error)(s, t), dt = /* @__PURE__ */ new Map(), mi = [], _e = [], Je = [], vi = (s, t) => (e) => {
|
1094
|
-
s.push(e), Ht || (Ht = !0, t && v.$flags$ & 4 ? yi(Ut) : v.raf(Ut));
|
1095
|
-
}, Ce = (s) => {
|
1096
|
-
for (let t = 0; t < s.length; t++)
|
1097
|
-
try {
|
1098
|
-
s[t](performance.now());
|
1099
|
-
} catch (e) {
|
1100
|
-
Q(e);
|
1101
|
-
}
|
1102
|
-
s.length = 0;
|
1103
|
-
}, Ut = () => {
|
1104
|
-
Ce(_e), Ce(Je), (Ht = _e.length > 0) && v.raf(Ut);
|
1105
|
-
}, yi = (s) => Hs().then(s), bi = /* @__PURE__ */ vi(Je, !0), _i = (s = {}) => {
|
1106
|
-
const { content: t = "", title: e, attributes: i = [] } = s;
|
1107
|
-
let n = "", o = [
|
1108
|
-
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
1109
|
-
{ name: "fill", value: "currentColor" },
|
1110
|
-
...i
|
1111
|
-
];
|
1112
|
-
return e && (n = `<title>${e}</title>`), `<svg ${o.map((a) => `${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`;
|
1113
|
-
}, Ci = (s) => s.replace(/<(\/?)svg([^>]*)>/g, "").trim();
|
1114
|
-
function xi(s) {
|
1115
|
-
return `${s.getFullYear()}.${s.getMonth() + 1}`;
|
1116
|
-
}
|
1117
|
-
class wi {
|
1118
|
-
constructor(t) {
|
1119
|
-
this.voca_component = t, this.voca_added = xi(/* @__PURE__ */ new Date());
|
1120
|
-
}
|
1121
|
-
}
|
1122
|
-
const Ai = "telia-vst{display:none}", Si = /* @__PURE__ */ Ke(class extends De {
|
1123
|
-
constructor() {
|
1124
|
-
super(), this.__registerHost(), this.vocaInternalUStats = ti(this, "vocaInternalUStats", 7);
|
1125
|
-
}
|
1126
|
-
connectedCallback() {
|
1127
|
-
this.vocaInternalUStats.emit(new wi(this.dataTrackingId));
|
1128
|
-
}
|
1129
|
-
render() {
|
1130
|
-
return j(Gt, null);
|
1131
|
-
}
|
1132
|
-
static get style() {
|
1133
|
-
return Ai;
|
1134
|
-
}
|
1135
|
-
}, [0, "telia-vst", {
|
1136
|
-
dataTrackingId: [1, "data-tracking-id"]
|
1137
|
-
}]);
|
1138
|
-
function Ve() {
|
1139
|
-
if (typeof customElements > "u")
|
1140
|
-
return;
|
1141
|
-
["telia-vst"].forEach((t) => {
|
1142
|
-
switch (t) {
|
1143
|
-
case "telia-vst":
|
1144
|
-
customElements.get(t) || customElements.define(t, Si);
|
1145
|
-
break;
|
1146
|
-
}
|
1147
|
-
});
|
1148
|
-
}
|
1149
|
-
Ve();
|
1150
|
-
function Nt() {
|
1151
|
-
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
|
1152
|
-
}
|
1153
|
-
function Ei() {
|
1154
|
-
if (typeof Nt().vocadsIcons !== void 0)
|
1155
|
-
return Nt().vocadsIcons;
|
1156
|
-
}
|
1157
|
-
function ki() {
|
1158
|
-
return Nt().vocadsIconsRegistered;
|
1159
|
-
}
|
1160
|
-
const Ti = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", Oi = /* @__PURE__ */ Ke(class extends De {
|
1161
|
-
constructor() {
|
1162
|
-
super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
|
1163
|
-
}
|
1164
|
-
/**
|
1165
|
-
* Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
|
1166
|
-
* @private
|
1167
|
-
* @returns string
|
1168
|
-
*/
|
1169
|
-
getSvgString() {
|
1170
|
-
if (this.svg)
|
1171
|
-
return this.svg;
|
1172
|
-
if (ki() && this.name) {
|
1173
|
-
const s = Ei();
|
1174
|
-
return s[this.name] ? s[this.name].svg : "";
|
1175
|
-
}
|
1176
|
-
return this.name && console.warn(this.name, "Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"), "";
|
1177
|
-
}
|
1178
|
-
render() {
|
1179
|
-
let s = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
|
1180
|
-
this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
|
1181
|
-
...t,
|
1182
|
-
{ name: "aria-hidden", value: "true" }
|
1183
|
-
];
|
1184
|
-
const e = _i({
|
1185
|
-
content: Ci(s),
|
1186
|
-
attributes: t,
|
1187
|
-
title: this.allyTitle
|
1188
|
-
});
|
1189
|
-
return j(Gt, { class: `telia-icon telia-icon--${this.size}` }, j("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: e }), j("telia-vst", { dataTrackingId: this.dataTrackingId }));
|
1190
|
-
}
|
1191
|
-
static get style() {
|
1192
|
-
return Ti;
|
1193
|
-
}
|
1194
|
-
}, [0, "telia-icon", {
|
1195
|
-
name: [1],
|
1196
|
-
svg: [1],
|
1197
|
-
size: [1],
|
1198
|
-
allyTitle: [1, "ally-title"],
|
1199
|
-
dataTestid: [1, "data-testid"]
|
1200
|
-
}]);
|
1201
|
-
function Li() {
|
1202
|
-
if (typeof customElements > "u")
|
1203
|
-
return;
|
1204
|
-
["telia-icon", "telia-vst"].forEach((t) => {
|
1205
|
-
switch (t) {
|
1206
|
-
case "telia-icon":
|
1207
|
-
customElements.get(t) || customElements.define(t, Oi);
|
1208
|
-
break;
|
1209
|
-
case "telia-vst":
|
1210
|
-
customElements.get(t) || Ve();
|
1211
|
-
break;
|
1212
|
-
}
|
1213
|
-
});
|
1214
|
-
}
|
1215
|
-
Li();
|
1216
|
-
/**
|
1217
|
-
* @license
|
1218
|
-
* Copyright 2017 Google LLC
|
1219
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1220
|
-
*/
|
1221
|
-
const J = (s) => (t, e) => {
|
1222
|
-
e !== void 0 ? e.addInitializer(() => {
|
1223
|
-
customElements.define(s, t);
|
1224
|
-
}) : customElements.define(s, t);
|
1225
|
-
};
|
1226
|
-
/**
|
1227
|
-
* @license
|
1228
|
-
* Copyright 2017 Google LLC
|
1229
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1230
|
-
*/
|
1231
|
-
const Pi = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: Ft }, Mi = (s = Pi, t, e) => {
|
1232
|
-
const { kind: i, metadata: n } = e;
|
1233
|
-
let o = globalThis.litPropertyMetadata.get(n);
|
1234
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(n, o = /* @__PURE__ */ new Map()), o.set(e.name, s), i === "accessor") {
|
1235
|
-
const { name: r } = e;
|
1236
|
-
return { set(a) {
|
1237
|
-
const l = t.get.call(this);
|
1238
|
-
t.set.call(this, a), this.requestUpdate(r, l, s);
|
1239
|
-
}, init(a) {
|
1240
|
-
return a !== void 0 && this.C(r, void 0, s), a;
|
1241
|
-
} };
|
1242
|
-
}
|
1243
|
-
if (i === "setter") {
|
1244
|
-
const { name: r } = e;
|
1245
|
-
return function(a) {
|
1246
|
-
const l = this[r];
|
1247
|
-
t.call(this, a), this.requestUpdate(r, l, s);
|
1248
|
-
};
|
1249
|
-
}
|
1250
|
-
throw Error("Unsupported decorator location: " + i);
|
1251
|
-
};
|
1252
|
-
function $(s) {
|
1253
|
-
return (t, e) => typeof e == "object" ? Mi(s, t, e) : ((i, n, o) => {
|
1254
|
-
const r = n.hasOwnProperty(o);
|
1255
|
-
return n.constructor.createProperty(o, r ? { ...i, wrapped: !0 } : i), r ? Object.getOwnPropertyDescriptor(n, o) : void 0;
|
1256
|
-
})(s, t, e);
|
1257
|
-
}
|
1258
|
-
/**
|
1259
|
-
* @license
|
1260
|
-
* Copyright 2017 Google LLC
|
1261
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1262
|
-
*/
|
1263
|
-
function w(s) {
|
1264
|
-
return $({ ...s, state: !0, attribute: !1 });
|
1265
|
-
}
|
1266
|
-
/**
|
1267
|
-
* @license
|
1268
|
-
* Copyright 2020 Google LLC
|
1269
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1270
|
-
*/
|
1271
|
-
const Ri = (s) => s.strings === void 0;
|
1272
|
-
/**
|
1273
|
-
* @license
|
1274
|
-
* Copyright 2017 Google LLC
|
1275
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1276
|
-
*/
|
1277
|
-
const Ct = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, xt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
1278
|
-
let Yt = class {
|
1279
|
-
constructor(t) {
|
1280
|
-
}
|
1281
|
-
get _$AU() {
|
1282
|
-
return this._$AM._$AU;
|
1283
|
-
}
|
1284
|
-
_$AT(t, e, i) {
|
1285
|
-
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
1286
|
-
}
|
1287
|
-
_$AS(t, e) {
|
1288
|
-
return this.update(t, e);
|
1289
|
-
}
|
1290
|
-
update(t, e) {
|
1291
|
-
return this.render(...e);
|
1292
|
-
}
|
1293
|
-
};
|
1294
|
-
/**
|
1295
|
-
* @license
|
1296
|
-
* Copyright 2017 Google LLC
|
1297
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1298
|
-
*/
|
1299
|
-
const Z = (s, t) => {
|
1300
|
-
var i;
|
1301
|
-
const e = s._$AN;
|
1302
|
-
if (e === void 0)
|
1303
|
-
return !1;
|
1304
|
-
for (const n of e)
|
1305
|
-
(i = n._$AO) == null || i.call(n, t, !1), Z(n, t);
|
1306
|
-
return !0;
|
1307
|
-
}, ht = (s) => {
|
1308
|
-
let t, e;
|
1309
|
-
do {
|
1310
|
-
if ((t = s._$AM) === void 0)
|
1311
|
-
break;
|
1312
|
-
e = t._$AN, e.delete(s), s = t;
|
1313
|
-
} while ((e == null ? void 0 : e.size) === 0);
|
1314
|
-
}, ts = (s) => {
|
1315
|
-
for (let t; t = s._$AM; s = t) {
|
1316
|
-
let e = t._$AN;
|
1317
|
-
if (e === void 0)
|
1318
|
-
t._$AN = e = /* @__PURE__ */ new Set();
|
1319
|
-
else if (e.has(s))
|
1320
|
-
break;
|
1321
|
-
e.add(s), Ni(t);
|
1322
|
-
}
|
1323
|
-
};
|
1324
|
-
function Hi(s) {
|
1325
|
-
this._$AN !== void 0 ? (ht(this), this._$AM = s, ts(this)) : this._$AM = s;
|
1326
|
-
}
|
1327
|
-
function Ui(s, t = !1, e = 0) {
|
1328
|
-
const i = this._$AH, n = this._$AN;
|
1329
|
-
if (n !== void 0 && n.size !== 0)
|
1330
|
-
if (t)
|
1331
|
-
if (Array.isArray(i))
|
1332
|
-
for (let o = e; o < i.length; o++)
|
1333
|
-
Z(i[o], !1), ht(i[o]);
|
1334
|
-
else
|
1335
|
-
i != null && (Z(i, !1), ht(i));
|
1336
|
-
else
|
1337
|
-
Z(this, s);
|
1338
|
-
}
|
1339
|
-
const Ni = (s) => {
|
1340
|
-
s.type == Ct.CHILD && (s._$AP ?? (s._$AP = Ui), s._$AQ ?? (s._$AQ = Hi));
|
1341
|
-
};
|
1342
|
-
let es = class extends Yt {
|
1343
|
-
constructor() {
|
1344
|
-
super(...arguments), this._$AN = void 0;
|
1345
|
-
}
|
1346
|
-
_$AT(t, e, i) {
|
1347
|
-
super._$AT(t, e, i), ts(this), this.isConnected = t._$AU;
|
1348
|
-
}
|
1349
|
-
_$AO(t, e = !0) {
|
1350
|
-
var i, n;
|
1351
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (Z(this, t), ht(this));
|
1352
|
-
}
|
1353
|
-
setValue(t) {
|
1354
|
-
if (Ri(this._$Ct))
|
1355
|
-
this._$Ct._$AI(t, this);
|
1356
|
-
else {
|
1357
|
-
const e = [...this._$Ct._$AH];
|
1358
|
-
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
1359
|
-
}
|
1360
|
-
}
|
1361
|
-
disconnected() {
|
1362
|
-
}
|
1363
|
-
reconnected() {
|
1364
|
-
}
|
1365
|
-
};
|
1366
|
-
/**
|
1367
|
-
* @license
|
1368
|
-
* Copyright 2020 Google LLC
|
1369
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1370
|
-
*/
|
1371
|
-
const pt = () => new ji();
|
1372
|
-
class ji {
|
1373
|
-
}
|
1374
|
-
const Pt = /* @__PURE__ */ new WeakMap(), ut = xt(class extends es {
|
1375
|
-
render(s) {
|
1376
|
-
return u;
|
1377
|
-
}
|
1378
|
-
update(s, [t]) {
|
1379
|
-
var i;
|
1380
|
-
const e = t !== this.G;
|
1381
|
-
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (i = s.options) == null ? void 0 : i.host, this.ot(this.lt = s.element)), u;
|
1382
|
-
}
|
1383
|
-
ot(s) {
|
1384
|
-
if (typeof this.G == "function") {
|
1385
|
-
const t = this.ct ?? globalThis;
|
1386
|
-
let e = Pt.get(t);
|
1387
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Pt.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, s), s !== void 0 && this.G.call(this.ct, s);
|
1388
|
-
} else
|
1389
|
-
this.G.value = s;
|
1390
|
-
}
|
1391
|
-
get rt() {
|
1392
|
-
var s, t;
|
1393
|
-
return typeof this.G == "function" ? (s = Pt.get(this.ct ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
1394
|
-
}
|
1395
|
-
disconnected() {
|
1396
|
-
this.rt === this.lt && this.ot(void 0);
|
1397
|
-
}
|
1398
|
-
reconnected() {
|
1399
|
-
this.ot(this.lt);
|
1400
|
-
}
|
1401
|
-
});
|
1402
|
-
/**
|
1403
|
-
* @license
|
1404
|
-
* Copyright 2018 Google LLC
|
1405
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1406
|
-
*/
|
1407
|
-
const ft = xt(class extends Yt {
|
1408
|
-
constructor(s) {
|
1409
|
-
var t;
|
1410
|
-
if (super(s), s.type !== Ct.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2)
|
1411
|
-
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
1412
|
-
}
|
1413
|
-
render(s) {
|
1414
|
-
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
1415
|
-
}
|
1416
|
-
update(s, [t]) {
|
1417
|
-
var i, n;
|
1418
|
-
if (this.it === void 0) {
|
1419
|
-
this.it = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.st = new Set(s.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
1420
|
-
for (const o in t)
|
1421
|
-
t[o] && !((i = this.st) != null && i.has(o)) && this.it.add(o);
|
1422
|
-
return this.render(t);
|
1423
|
-
}
|
1424
|
-
const e = s.element.classList;
|
1425
|
-
for (const o of this.it)
|
1426
|
-
o in t || (e.remove(o), this.it.delete(o));
|
1427
|
-
for (const o in t) {
|
1428
|
-
const r = !!t[o];
|
1429
|
-
r === this.it.has(o) || (n = this.st) != null && n.has(o) || (r ? (e.add(o), this.it.add(o)) : (e.remove(o), this.it.delete(o)));
|
1430
|
-
}
|
1431
|
-
return E;
|
1432
|
-
}
|
1433
|
-
});
|
1434
|
-
var Di = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Bi = (s, t, e, i) => {
|
1435
|
-
for (var n = i > 1 ? void 0 : i ? Ii(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
1436
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
1437
|
-
return i && n && Di(t, e, n), n;
|
1438
|
-
};
|
1439
|
-
class Xt extends m {
|
1440
|
-
constructor() {
|
1441
|
-
super(...arguments), this.anchor = "BottomRight";
|
1442
|
-
}
|
1443
|
-
appendChild(t) {
|
1444
|
-
var e;
|
1445
|
-
return (e = this.shadowRoot) == null || e.appendChild(t), t;
|
1446
|
-
}
|
1447
|
-
render() {
|
1448
|
-
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), u;
|
1449
|
-
}
|
1450
|
-
}
|
1451
|
-
Xt.styles = [
|
1452
|
-
b`
|
1453
|
-
:host {
|
1454
|
-
position: fixed;
|
1455
|
-
display: flex;
|
1456
|
-
align-items: center;
|
1457
|
-
gap: 1rem;
|
1458
|
-
}
|
1459
|
-
|
1460
|
-
:host(.bottom-right) {
|
1461
|
-
bottom: 20px;
|
1462
|
-
right: 20px;
|
1463
|
-
}
|
1464
|
-
:host(.bottom-left) {
|
1465
|
-
bottom: 20px;
|
1466
|
-
left: 20px;
|
1467
|
-
}
|
1468
|
-
`
|
1469
|
-
];
|
1470
|
-
Bi([
|
1471
|
-
$({ attribute: !0 })
|
1472
|
-
], Xt.prototype, "anchor", 2);
|
1473
|
-
const zi = /* @__PURE__ */ new WeakMap();
|
1474
|
-
let xe = 0;
|
1475
|
-
const Mt = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new WeakSet(), Ae = () => new Promise((s) => requestAnimationFrame(s)), Fi = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Wi = [{ opacity: 0 }], Se = [{ opacity: 0 }, { opacity: 1 }], Ee = (s, t) => {
|
1476
|
-
const e = s - t;
|
1477
|
-
return e === 0 ? void 0 : e;
|
1478
|
-
}, ke = (s, t) => {
|
1479
|
-
const e = s / t;
|
1480
|
-
return e === 1 ? void 0 : e;
|
1481
|
-
}, Rt = { left: (s, t) => {
|
1482
|
-
const e = Ee(s, t);
|
1483
|
-
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
|
1484
|
-
}, top: (s, t) => {
|
1485
|
-
const e = Ee(s, t);
|
1486
|
-
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
|
1487
|
-
}, width: (s, t) => {
|
1488
|
-
let e;
|
1489
|
-
t === 0 && (t = 1, e = { width: "1px" });
|
1490
|
-
const i = ke(s, t);
|
1491
|
-
return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
|
1492
|
-
}, height: (s, t) => {
|
1493
|
-
let e;
|
1494
|
-
t === 0 && (t = 1, e = { height: "1px" });
|
1495
|
-
const i = ke(s, t);
|
1496
|
-
return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
|
1497
|
-
} }, Zi = { duration: 333, easing: "ease-in-out" }, Gi = ["left", "top", "width", "height", "opacity", "color", "background"], Te = /* @__PURE__ */ new WeakMap();
|
1498
|
-
class qi extends es {
|
1499
|
-
constructor(t) {
|
1500
|
-
if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === Ct.CHILD)
|
1501
|
-
throw Error("The `animate` directive must be used in attribute position.");
|
1502
|
-
this.createFinished();
|
1503
|
-
}
|
1504
|
-
createFinished() {
|
1505
|
-
var t;
|
1506
|
-
(t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
|
1507
|
-
this.h = e;
|
1508
|
-
});
|
1509
|
-
}
|
1510
|
-
async resolveFinished() {
|
1511
|
-
var t;
|
1512
|
-
(t = this.h) == null || t.call(this), this.h = void 0;
|
1513
|
-
}
|
1514
|
-
render(t) {
|
1515
|
-
return u;
|
1516
|
-
}
|
1517
|
-
getController() {
|
1518
|
-
return zi.get(this.l);
|
1519
|
-
}
|
1520
|
-
isDisabled() {
|
1521
|
-
var t;
|
1522
|
-
return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
|
1523
|
-
}
|
1524
|
-
update(t, [e]) {
|
1525
|
-
var n;
|
1526
|
-
const i = this.l === void 0;
|
1527
|
-
return i && (this.l = (n = t.options) == null ? void 0 : n.host, this.l.addController(this), this.element = t.element, Te.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.u(e), this.render(e);
|
1528
|
-
}
|
1529
|
-
u(t) {
|
1530
|
-
t = t ?? {};
|
1531
|
-
const e = this.getController();
|
1532
|
-
e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = Gi), this.options = t;
|
1533
|
-
}
|
1534
|
-
p() {
|
1535
|
-
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1536
|
-
return this.options.properties.forEach((n) => {
|
1537
|
-
const o = e[n] ?? (Rt[n] ? void 0 : i[n]), r = Number(o);
|
1538
|
-
t[n] = isNaN(r) ? o + "" : r;
|
1539
|
-
}), t;
|
1540
|
-
}
|
1541
|
-
m() {
|
1542
|
-
let t, e = !0;
|
1543
|
-
return this.options.guard && (t = this.options.guard(), e = ((i, n) => {
|
1544
|
-
if (Array.isArray(i)) {
|
1545
|
-
if (Array.isArray(n) && n.length === i.length && i.every((o, r) => o === n[r]))
|
1546
|
-
return !1;
|
1547
|
-
} else if (n === i)
|
1548
|
-
return !1;
|
1549
|
-
return !0;
|
1550
|
-
})(t, this.v)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.o && (this.v = Array.isArray(t) ? Array.from(t) : t), this.o;
|
1551
|
-
}
|
1552
|
-
hostUpdate() {
|
1553
|
-
typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.m() && (this.g = this.p(), this.t = this.t ?? this.element.parentNode, this.i = this.element.nextSibling);
|
1554
|
-
}
|
1555
|
-
async hostUpdated() {
|
1556
|
-
if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
|
1557
|
-
return;
|
1558
|
-
let t;
|
1559
|
-
this.prepare(), await Ae;
|
1560
|
-
const e = this._(), i = this.A(this.options.keyframeOptions, e), n = this.p();
|
1561
|
-
if (this.g !== void 0) {
|
1562
|
-
const { from: o, to: r } = this.O(this.g, n, e);
|
1563
|
-
this.log("measured", [this.g, n, o, r]), t = this.calculateKeyframes(o, r);
|
1564
|
-
} else {
|
1565
|
-
const o = Mt.get(this.options.inId);
|
1566
|
-
if (o) {
|
1567
|
-
Mt.delete(this.options.inId);
|
1568
|
-
const { from: r, to: a } = this.O(o, n, e);
|
1569
|
-
t = this.calculateKeyframes(r, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, xe++, t.forEach((l) => l.zIndex = xe);
|
1570
|
-
} else
|
1571
|
-
this.options.in && (t = [...this.options.in, {}]);
|
1572
|
-
}
|
1573
|
-
this.animate(t, i);
|
1574
|
-
}
|
1575
|
-
resetStyles() {
|
1576
|
-
this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
|
1577
|
-
}
|
1578
|
-
commitStyles() {
|
1579
|
-
var t, e;
|
1580
|
-
this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
|
1581
|
-
}
|
1582
|
-
reconnected() {
|
1583
|
-
}
|
1584
|
-
async disconnected() {
|
1585
|
-
var e;
|
1586
|
-
if (!this.o || (this.options.id !== void 0 && Mt.set(this.options.id, this.g), this.options.out === void 0))
|
1587
|
-
return;
|
1588
|
-
if (this.prepare(), await Ae(), (e = this.t) == null ? void 0 : e.isConnected) {
|
1589
|
-
const i = this.i && this.i.parentNode === this.t ? this.i : null;
|
1590
|
-
if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1591
|
-
const n = this.p();
|
1592
|
-
this.log("stabilizing out");
|
1593
|
-
const o = this.g.left - n.left, r = this.g.top - n.top;
|
1594
|
-
getComputedStyle(this.element).position !== "static" || o === 0 && r === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), r !== 0 && (this.element.style.top = r + "px");
|
1595
|
-
}
|
1596
|
-
}
|
1597
|
-
const t = this.A(this.options.keyframeOptions);
|
1598
|
-
await this.animate(this.options.out, t), this.element.remove();
|
1599
|
-
}
|
1600
|
-
prepare() {
|
1601
|
-
this.createFinished();
|
1602
|
-
}
|
1603
|
-
start() {
|
1604
|
-
var t, e;
|
1605
|
-
(e = (t = this.options).onStart) == null || e.call(t, this);
|
1606
|
-
}
|
1607
|
-
didFinish(t) {
|
1608
|
-
var e, i;
|
1609
|
-
t && ((i = (e = this.options).onComplete) == null || i.call(e, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
|
1610
|
-
}
|
1611
|
-
_() {
|
1612
|
-
const t = [];
|
1613
|
-
for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
|
1614
|
-
const i = Te.get(e);
|
1615
|
-
i && !i.isDisabled() && i && t.push(i);
|
1616
|
-
}
|
1617
|
-
return t;
|
1618
|
-
}
|
1619
|
-
get isHostRendered() {
|
1620
|
-
const t = we.has(this.l);
|
1621
|
-
return t || this.l.updateComplete.then(() => {
|
1622
|
-
we.add(this.l);
|
1623
|
-
}), t;
|
1624
|
-
}
|
1625
|
-
A(t, e = this._()) {
|
1626
|
-
const i = { ...Zi };
|
1627
|
-
return e.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
|
1628
|
-
}
|
1629
|
-
O(t, e, i) {
|
1630
|
-
t = { ...t }, e = { ...e };
|
1631
|
-
const n = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1632
|
-
let o = 1, r = 1;
|
1633
|
-
return n !== void 0 && (n.forEach((a) => {
|
1634
|
-
a.width && (o /= a.width), a.height && (r /= a.height);
|
1635
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = r * t.top, e.top = r * e.top)), { from: t, to: e };
|
1636
|
-
}
|
1637
|
-
calculateKeyframes(t, e, i = !1) {
|
1638
|
-
const n = {}, o = {};
|
1639
|
-
let r = !1;
|
1640
|
-
const a = {};
|
1641
|
-
for (const l in e) {
|
1642
|
-
const c = t[l], d = e[l];
|
1643
|
-
if (l in Rt) {
|
1644
|
-
const h = Rt[l];
|
1645
|
-
if (c === void 0 || d === void 0)
|
1646
|
-
continue;
|
1647
|
-
const p = h(c, d);
|
1648
|
-
p.transform !== void 0 && (a[l] = p.value, r = !0, n.transform = `${n.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(n, p.overrideFrom));
|
1649
|
-
} else
|
1650
|
-
c !== d && c !== void 0 && d !== void 0 && (r = !0, n[l] = c, o[l] = d);
|
1651
|
-
}
|
1652
|
-
return n.transformOrigin = o.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, r ? [n, o] : void 0;
|
1653
|
-
}
|
1654
|
-
async animate(t, e = this.options.keyframeOptions) {
|
1655
|
-
this.start(), this.frames = t;
|
1656
|
-
let i = !1;
|
1657
|
-
if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
|
1658
|
-
this.log("animate", [t, e]), i = !0, this.webAnimation = this.element.animate(t, e);
|
1659
|
-
const n = this.getController();
|
1660
|
-
n == null || n.add(this);
|
1661
|
-
try {
|
1662
|
-
await this.webAnimation.finished;
|
1663
|
-
} catch {
|
1664
|
-
}
|
1665
|
-
n == null || n.remove(this);
|
1666
|
-
}
|
1667
|
-
return this.didFinish(i), i;
|
1668
|
-
}
|
1669
|
-
isAnimating() {
|
1670
|
-
var t, e;
|
1671
|
-
return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
|
1672
|
-
}
|
1673
|
-
log(t, e) {
|
1674
|
-
this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
|
1675
|
-
}
|
1676
|
-
}
|
1677
|
-
const jt = xt(qi), it = (s, t, e) => {
|
1678
|
-
s && e.style.setProperty(t, s);
|
1679
|
-
}, ss = (s, t) => {
|
1680
|
-
var e, i, n, o;
|
1681
|
-
it((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), it(
|
1682
|
-
(i = s.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1683
|
-
"--text-on-primary-background",
|
1684
|
-
t
|
1685
|
-
), it(
|
1686
|
-
(n = s.colors) == null ? void 0 : n.secondaryBackground,
|
1687
|
-
"--secondary-background",
|
1688
|
-
t
|
1689
|
-
), it(
|
1690
|
-
(o = s.colors) == null ? void 0 : o.textOnSecondaryBackground,
|
1691
|
-
"--text-on-secondary-background",
|
1692
|
-
t
|
1693
|
-
);
|
1694
|
-
};
|
1695
|
-
var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, wt = (s, t, e, i) => {
|
1696
|
-
for (var n = i > 1 ? void 0 : i ? Xi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
1697
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
1698
|
-
return i && n && Yi(t, e, n), n;
|
1699
|
-
};
|
1700
|
-
class M extends m {
|
1701
|
-
constructor() {
|
1702
|
-
super(...arguments), this.active = !1, this.loaded = !1, this.containerRef = pt();
|
1703
|
-
}
|
1704
|
-
async connectedCallback() {
|
1705
|
-
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
1706
|
-
}
|
1707
|
-
toggleActive() {
|
1708
|
-
var t;
|
1709
|
-
if (!((t = this.application) != null && t.root)) {
|
1710
|
-
console.warn(
|
1711
|
-
"Could not activate widget. No root element assigned to widget."
|
1712
|
-
);
|
1713
|
-
return;
|
1714
|
-
}
|
1715
|
-
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
|
1716
|
-
}
|
1717
|
-
_applyBranding() {
|
1718
|
-
var t;
|
1719
|
-
(t = this.application) != null && t.settings && ss(this.application.settings.branding, this);
|
1720
|
-
}
|
1721
|
-
async _renderSymbol() {
|
1722
|
-
var a, l, c;
|
1723
|
-
const t = (a = this.application) == null ? void 0 : a.branding(), e = (l = t == null ? void 0 : t.graphics) == null ? void 0 : l.trigger;
|
1724
|
-
if (e)
|
1725
|
-
return f` <img src=${e} class="trigger-icon" alt="" /> `;
|
1726
|
-
const i = (c = this.application) == null ? void 0 : c.triggerIcon;
|
1727
|
-
if (!i)
|
1728
|
-
return u;
|
1729
|
-
const n = async (d) => Ps, { type: o, content: r } = i;
|
1730
|
-
switch (o) {
|
1731
|
-
case "Telia": {
|
1732
|
-
const d = await n();
|
1733
|
-
return d ? f`<telia-icon
|
1734
|
-
class="trigger-icon"
|
1735
|
-
svg=${d.svg}
|
1736
|
-
size="lg"
|
1737
|
-
></telia-icon>` : u;
|
1738
|
-
}
|
1739
|
-
default:
|
1740
|
-
return u;
|
1741
|
-
}
|
1742
|
-
}
|
1743
|
-
render() {
|
1744
|
-
var t, e, i, n;
|
1745
|
-
return f`<div class="trigger-container" ${ut(this.containerRef)}>
|
1746
|
-
${!this.active && ((n = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && n.showButtonLabel) ? f`
|
1747
|
-
<button
|
1748
|
-
class="trigger-label"
|
1749
|
-
@click=${this.toggleActive}
|
1750
|
-
${jt({
|
1751
|
-
keyframeOptions: {},
|
1752
|
-
in: Fi,
|
1753
|
-
stabilizeOut: !0,
|
1754
|
-
skipInitial: !1
|
1755
|
-
})}
|
1756
|
-
>
|
1757
|
-
${this.application.settings.branding.other.buttonLabelText}
|
1758
|
-
</button>
|
1759
|
-
` : u}
|
1760
|
-
|
1761
|
-
<button
|
1762
|
-
class=${ft({
|
1763
|
-
trigger: !0,
|
1764
|
-
active: this.active,
|
1765
|
-
rendered: this.loaded
|
1766
|
-
})}
|
1767
|
-
@click=${this.toggleActive}
|
1768
|
-
>
|
1769
|
-
${this.icon}
|
1770
|
-
<span class="trigger-close">
|
1771
|
-
<svg
|
1772
|
-
width="18"
|
1773
|
-
height="9"
|
1774
|
-
viewBox="0 0 18 9"
|
1775
|
-
fill="none"
|
1776
|
-
xmlns="http://www.w3.org/2000/svg"
|
1777
|
-
>
|
1778
|
-
<path
|
1779
|
-
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
1780
|
-
fill="white"
|
1781
|
-
/>
|
1782
|
-
</svg>
|
1783
|
-
</span>
|
1784
|
-
<span class="trigger-loader">
|
1785
|
-
<svg viewBox="25 25 50 50">
|
1786
|
-
<circle
|
1787
|
-
cx="50"
|
1788
|
-
cy="50"
|
1789
|
-
r="20"
|
1790
|
-
fill="none"
|
1791
|
-
stroke="#000"
|
1792
|
-
stroke-width="2"
|
1793
|
-
stroke-miterlimit="10"
|
1794
|
-
/>
|
1795
|
-
</svg>
|
1796
|
-
</span>
|
1797
|
-
</button>
|
1798
|
-
</div>`;
|
1799
|
-
}
|
1800
|
-
}
|
1801
|
-
M.styles = [
|
1802
|
-
b`
|
1803
|
-
:host {
|
1804
|
-
--voca-rem-multiplier: 0.625;
|
1805
|
-
--trigger-label-bg: #f5e0ff;
|
1806
|
-
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
1807
|
-
display: block;
|
1808
|
-
box-sizing: border-box;
|
1809
|
-
/* font-family: var(--font-family); */
|
1810
|
-
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1811
|
-
}
|
1812
|
-
|
1813
|
-
.trigger-container {
|
1814
|
-
display: flex;
|
1815
|
-
align-items: center;
|
1816
|
-
gap: 1rem;
|
1817
|
-
}
|
1818
|
-
|
1819
|
-
.trigger {
|
1820
|
-
transform: scale(0);
|
1821
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1822
|
-
z-index: 5;
|
1823
|
-
display: flex;
|
1824
|
-
align-items: center;
|
1825
|
-
justify-content: center;
|
1826
|
-
border: none;
|
1827
|
-
line-height: 55px;
|
1828
|
-
height: 55px;
|
1829
|
-
width: 55px;
|
1830
|
-
border-radius: 55px;
|
1831
|
-
cursor: pointer;
|
1832
|
-
background-color: var(--trigger-bg, var(--primary-background));
|
1833
|
-
font-family: Lato;
|
1834
|
-
text-decoration: none;
|
1835
|
-
border: 3px dashed transparent;
|
1836
|
-
box-sizing: border-box;
|
1837
|
-
transition: transform 200ms ease-out;
|
1838
|
-
}
|
1839
|
-
.trigger:active {
|
1840
|
-
transform: scale(0.8) !important;
|
1841
|
-
}
|
1842
|
-
.trigger:hover:not(:active) {
|
1843
|
-
transform: scale(1.1) !important;
|
1844
|
-
}
|
1845
|
-
.trigger.rendered {
|
1846
|
-
transform: scale(1);
|
1847
|
-
}
|
1848
|
-
.trigger.active .trigger-icon {
|
1849
|
-
opacity: 0;
|
1850
|
-
transform: rotate(-180deg) scale(0);
|
1851
|
-
}
|
1852
|
-
.trigger.active .trigger-close {
|
1853
|
-
opacity: 1;
|
1854
|
-
transform: rotate(0deg) scale(1);
|
1855
|
-
}
|
1856
|
-
|
1857
|
-
.trigger-icon {
|
1858
|
-
display: inline-block;
|
1859
|
-
line-height: inherit;
|
1860
|
-
text-align: center;
|
1861
|
-
opacity: 1;
|
1862
|
-
transform: rotate(0deg) scale(1);
|
1863
|
-
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
1864
|
-
color: var(--trigger-text-color, var(--text-on-primary-background));
|
1865
|
-
}
|
1866
|
-
.trigger-close {
|
1867
|
-
opacity: 0;
|
1868
|
-
transition: transform 200ms ease-out;
|
1869
|
-
transform: rotate(180deg) scale(0);
|
1870
|
-
position: absolute;
|
1871
|
-
top: 0;
|
1872
|
-
bottom: 0;
|
1873
|
-
left: 0;
|
1874
|
-
right: 0;
|
1875
|
-
display: flex;
|
1876
|
-
justify-content: center;
|
1877
|
-
align-items: center;
|
1878
|
-
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
1879
|
-
}
|
1880
|
-
|
1881
|
-
img {
|
1882
|
-
max-width: 100%;
|
1883
|
-
}
|
1884
|
-
|
1885
|
-
.trigger-label {
|
1886
|
-
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
1887
|
-
background-color: var(--trigger-label-bg);
|
1888
|
-
color: var(--trigger-label-text-color);
|
1889
|
-
white-space: nowrap;
|
1890
|
-
padding: 0.7rem 1rem;
|
1891
|
-
border-radius: 0.3rem;
|
1892
|
-
font-weight: 500;
|
1893
|
-
display: flex;
|
1894
|
-
justify-content: center;
|
1895
|
-
align-items: center;
|
1896
|
-
cursor: pointer;
|
1897
|
-
border: none;
|
1898
|
-
font-size: 1rem;
|
1899
|
-
font-family: inherit;
|
1900
|
-
transition: all 300ms ease-in-out;
|
1901
|
-
}
|
1902
|
-
|
1903
|
-
.trigger-label:hover {
|
1904
|
-
opacity: 0.8;
|
1905
|
-
}
|
1906
|
-
`
|
1907
|
-
];
|
1908
|
-
wt([
|
1909
|
-
$({ attribute: !1 })
|
1910
|
-
], M.prototype, "application", 2);
|
1911
|
-
wt([
|
1912
|
-
w()
|
1913
|
-
], M.prototype, "active", 2);
|
1914
|
-
wt([
|
1915
|
-
w()
|
1916
|
-
], M.prototype, "loaded", 2);
|
1917
|
-
wt([
|
1918
|
-
w()
|
1919
|
-
], M.prototype, "icon", 2);
|
1920
|
-
var Ki = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, T = (s, t, e, i) => {
|
1921
|
-
for (var n = i > 1 ? void 0 : i ? Qi(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
1922
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
1923
|
-
return i && n && Ki(t, e, n), n;
|
1924
|
-
};
|
1925
|
-
const is = (s) => {
|
1926
|
-
class t extends s {
|
1927
|
-
constructor() {
|
1928
|
-
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
1929
|
-
}
|
1930
|
-
writeProperties(i) {
|
1931
|
-
this.properties = i;
|
1932
|
-
}
|
1933
|
-
writeLayout(i) {
|
1934
|
-
this.layout = i;
|
1935
|
-
}
|
1936
|
-
writeContext(i) {
|
1937
|
-
this.context = i;
|
1938
|
-
}
|
1939
|
-
addChild(i) {
|
1940
|
-
i.parent = this, this.nodes.push(i);
|
1941
|
-
}
|
1942
|
-
connectedCallback() {
|
1943
|
-
super.connectedCallback(), this.renderRoot.host.style.setProperty(
|
1944
|
-
"--width",
|
1945
|
-
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
1946
|
-
), this.application.mountComponent(this);
|
1947
|
-
}
|
1948
|
-
}
|
1949
|
-
return t.styles = [
|
1950
|
-
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1951
|
-
b`
|
1952
|
-
:host {
|
1953
|
-
font-family: var(--font-family);
|
1954
|
-
grid-column: span var(--width);
|
1955
|
-
max-width: 100%;
|
1956
|
-
overflow: hidden;
|
1957
|
-
box-sizing: border-box;
|
1958
|
-
display: block;
|
1959
|
-
}
|
1960
|
-
* {
|
1961
|
-
box-sizing: border-box;
|
1962
|
-
}
|
1963
|
-
`
|
1964
|
-
], T([
|
1965
|
-
$()
|
1966
|
-
], t.prototype, "properties", 2), T([
|
1967
|
-
$()
|
1968
|
-
], t.prototype, "context", 2), T([
|
1969
|
-
$()
|
1970
|
-
], t.prototype, "layout", 2), T([
|
1971
|
-
$()
|
1972
|
-
], t.prototype, "name", 2), T([
|
1973
|
-
$()
|
1974
|
-
], t.prototype, "type", 2), T([
|
1975
|
-
$({ attribute: !1 })
|
1976
|
-
], t.prototype, "application", 2), T([
|
1977
|
-
$({ attribute: !1 })
|
1978
|
-
], t.prototype, "parent", 2), t;
|
1979
|
-
};
|
1980
|
-
class ns extends is(m) {
|
1981
|
-
render() {
|
1982
|
-
return f`Non resolved component`;
|
1983
|
-
}
|
1984
|
-
}
|
1985
|
-
ns.styles = [
|
1986
|
-
b`
|
1987
|
-
:host {
|
1988
|
-
display: block;
|
1989
|
-
}
|
1990
|
-
`
|
1991
|
-
];
|
1992
|
-
/**
|
1993
|
-
* @license
|
1994
|
-
* Copyright 2021 Google LLC
|
1995
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
1996
|
-
*/
|
1997
|
-
function* Ji(s, t) {
|
1998
|
-
if (s !== void 0) {
|
1999
|
-
let e = 0;
|
2000
|
-
for (const i of s)
|
2001
|
-
yield t(i, e++);
|
2002
|
-
}
|
2003
|
-
}
|
2004
|
-
var Kt = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))(Kt || {}), Vi = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, en = (s, t, e, i) => {
|
2005
|
-
for (var n = i > 1 ? void 0 : i ? tn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2006
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2007
|
-
return i && n && Vi(t, e, n), n;
|
2008
|
-
};
|
2009
|
-
class Qt extends m {
|
2010
|
-
constructor() {
|
2011
|
-
super(...arguments), this.nodes = [], this.wrapperRef = pt();
|
2012
|
-
}
|
2013
|
-
addChild(t) {
|
2014
|
-
t.parent = this, this.nodes.push(t);
|
2015
|
-
}
|
2016
|
-
applyBranding() {
|
2017
|
-
if (!this.wrapperRef.value)
|
2018
|
-
return;
|
2019
|
-
const t = this.application.settings;
|
2020
|
-
t != null && t.branding && ss(t.branding, this.wrapperRef.value);
|
2021
|
-
}
|
2022
|
-
applyStyles() {
|
2023
|
-
if (!this.wrapperRef.value)
|
2024
|
-
return;
|
2025
|
-
const t = this.application.styles(), e = this.wrapperRef.value;
|
2026
|
-
Object.entries(t).forEach(([i, n]) => {
|
2027
|
-
e.style.setProperty(`--${i}`, n);
|
2028
|
-
});
|
2029
|
-
}
|
2030
|
-
firstUpdated(t) {
|
2031
|
-
this.applyBranding(), this.applyStyles();
|
2032
|
-
}
|
2033
|
-
render() {
|
2034
|
-
return this.application.renderStrategy === Kt.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), f`<div class="widget-container" ${ut(this.wrapperRef)}>
|
2035
|
-
${Ji(this.nodes, (t) => t)}
|
2036
|
-
</div>`;
|
2037
|
-
}
|
2038
|
-
}
|
2039
|
-
Qt.styles = b`
|
2040
|
-
:host {
|
2041
|
-
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
2042
|
-
--spacing-xs: 0.2rem;
|
2043
|
-
--spacing-sm: 0.5rem;
|
2044
|
-
--spacing-md: 1rem;
|
2045
|
-
--spacing-lg: 1.2rem;
|
2046
|
-
--spacing-xl: 1.8rem;
|
2047
|
-
|
2048
|
-
--text-color: #222222;
|
2049
|
-
--link-color: #990ae3;
|
2050
|
-
--gray-color: #f3f3f8;
|
2051
|
-
--gray-dark-color: #a6a6a6;
|
2052
|
-
|
2053
|
-
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
2054
|
-
--border-radius: var(--spacing-sm);
|
2055
|
-
--border-radius-sm: var(--spacing-sm);
|
2056
|
-
--gap: var(--spacing-sm);
|
2057
|
-
}
|
2058
|
-
:host {
|
2059
|
-
--voca-rem-multiplier: 0.625;
|
2060
|
-
box-sizing: border-box;
|
2061
|
-
display: block;
|
2062
|
-
}
|
2063
|
-
|
2064
|
-
:host(.inline) {
|
2065
|
-
height: 100%;
|
2066
|
-
position: fixed;
|
2067
|
-
inset: 0 0 0 0;
|
2068
|
-
}
|
2069
|
-
|
2070
|
-
:host(.floating) {
|
2071
|
-
z-index: 6;
|
2072
|
-
position: fixed;
|
2073
|
-
}
|
2074
|
-
@media screen and (max-width: 800px) {
|
2075
|
-
:host(.floating) {
|
2076
|
-
inset: 0 0 95px 0;
|
2077
|
-
}
|
2078
|
-
}
|
2079
|
-
@media screen and (min-width: 801px) {
|
2080
|
-
:host(.floating) {
|
2081
|
-
inset: auto 20px 95px auto;
|
2082
|
-
max-height: calc(100vh - 120px);
|
2083
|
-
width: 400px;
|
2084
|
-
height: 700px;
|
2085
|
-
}
|
2086
|
-
:host(.floating.bottom-right) {
|
2087
|
-
inset: auto 20px 95px auto;
|
2088
|
-
}
|
2089
|
-
:host(.floating.bottom-left) {
|
2090
|
-
inset: auto auto 95px 20px;
|
2091
|
-
}
|
2092
|
-
}
|
2093
|
-
|
2094
|
-
:host(.floating) .widget-container {
|
2095
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
2096
|
-
border-radius: 0.7rem;
|
2097
|
-
}
|
2098
|
-
|
2099
|
-
* {
|
2100
|
-
box-sizing: border-box;
|
2101
|
-
}
|
2102
|
-
.widget-container {
|
2103
|
-
height: 100%;
|
2104
|
-
background-color: var(--primary-background);
|
2105
|
-
padding: var(--spacing-sm);
|
2106
|
-
border: var(--widget-border, none);
|
2107
|
-
}
|
2108
|
-
@keyframes slideDown {
|
2109
|
-
from {
|
2110
|
-
transform: translateY(0);
|
2111
|
-
opacity: 1;
|
2112
|
-
}
|
2113
|
-
to {
|
2114
|
-
transform: translateY(100%);
|
2115
|
-
opacity: 0;
|
2116
|
-
}
|
2117
|
-
}
|
2118
|
-
@keyframes slideUp {
|
2119
|
-
from {
|
2120
|
-
transform: translateY(100%);
|
2121
|
-
opacity: 0;
|
2122
|
-
}
|
2123
|
-
to {
|
2124
|
-
transform: translateY(0);
|
2125
|
-
opacity: 1;
|
2126
|
-
}
|
2127
|
-
}
|
2128
|
-
:host(.expanded) {
|
2129
|
-
opacity: 1;
|
2130
|
-
animation: slideUp 0.3s linear;
|
2131
|
-
}
|
2132
|
-
:host(.hidden) {
|
2133
|
-
opacity: 0;
|
2134
|
-
animation: slideDown 0.3s linear;
|
2135
|
-
}
|
2136
|
-
`;
|
2137
|
-
en([
|
2138
|
-
$({ attribute: !1 })
|
2139
|
-
], Qt.prototype, "application", 2);
|
2140
|
-
var sn = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, Jt = (s, t, e, i) => {
|
2141
|
-
for (var n = i > 1 ? void 0 : i ? nn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2142
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2143
|
-
return i && n && sn(t, e, n), n;
|
2144
|
-
};
|
2145
|
-
class V extends m {
|
2146
|
-
constructor() {
|
2147
|
-
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
2148
|
-
}
|
2149
|
-
async connectedCallback() {
|
2150
|
-
super.connectedCallback(), await this.getGlobalEnvironment();
|
2151
|
-
}
|
2152
|
-
disconnectedCallback() {
|
2153
|
-
super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
|
2154
|
-
}
|
2155
|
-
async onEnvironmentCreated(t) {
|
2156
|
-
this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
|
2157
|
-
}
|
2158
|
-
async activate() {
|
2159
|
-
this.widget && (await this.widget.activate(), this.status = "activated");
|
2160
|
-
}
|
2161
|
-
async getGlobalEnvironment() {
|
2162
|
-
const t = globalThis.widgets;
|
2163
|
-
t && (this.widget = t.applications.find(
|
2164
|
-
(e) => e.name === this.name
|
2165
|
-
), await this.activate());
|
2166
|
-
}
|
2167
|
-
render() {
|
2168
|
-
if (!this.widget || this.status !== "activated")
|
2169
|
-
return u;
|
2170
|
-
if (this.widget.renderStrategy === Kt.Trigger) {
|
2171
|
-
const t = new M();
|
2172
|
-
return t.application = this.widget, t;
|
2173
|
-
}
|
2174
|
-
return this.widget.render();
|
2175
|
-
}
|
2176
|
-
}
|
2177
|
-
V.styles = [
|
2178
|
-
b`
|
2179
|
-
:host {
|
2180
|
-
display: block;
|
2181
|
-
}
|
2182
|
-
`
|
2183
|
-
];
|
2184
|
-
Jt([
|
2185
|
-
$({ attribute: !0 })
|
2186
|
-
], V.prototype, "name", 2);
|
2187
|
-
Jt([
|
2188
|
-
w()
|
2189
|
-
], V.prototype, "widget", 2);
|
2190
|
-
Jt([
|
2191
|
-
w()
|
2192
|
-
], V.prototype, "status", 2);
|
2193
|
-
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", Xt);
|
2194
|
-
customElements.get("ace-trigger") || customElements.define("ace-trigger", M);
|
2195
|
-
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", ns);
|
2196
|
-
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", Qt);
|
2197
|
-
customElements.get("ace-widget") || customElements.define("ace-widget", V);
|
2198
|
-
var on = Object.defineProperty, rn = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => {
|
2199
|
-
for (var n = i > 1 ? void 0 : i ? rn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2200
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2201
|
-
return i && n && on(t, e, n), n;
|
2202
|
-
};
|
2203
|
-
let B = class extends m {
|
2204
|
-
constructor() {
|
2205
|
-
super(...arguments), this.loading = !0, this.entries = [];
|
2206
|
-
}
|
2207
|
-
connectedCallback() {
|
2208
|
-
super.connectedCallback(), this.session.entries().subscribe((s) => {
|
2209
|
-
this.entries = s;
|
2210
|
-
}), this.session.isTyping().subscribe((s) => {
|
2211
|
-
this.loading = s;
|
2212
|
-
});
|
2213
|
-
}
|
2214
|
-
updated(s) {
|
2215
|
-
const t = new CustomEvent("updated", {});
|
2216
|
-
this.dispatchEvent(t);
|
2217
|
-
}
|
2218
|
-
render() {
|
2219
|
-
return f`<div class="conversation-session">
|
2220
|
-
${this.entries.map(
|
2221
|
-
(s) => f`<div class="conversation-entry" tabindex="-1">
|
2222
|
-
<conversation-entry
|
2223
|
-
.entry=${s}
|
2224
|
-
${jt({
|
2225
|
-
keyframeOptions: {},
|
2226
|
-
in: Se,
|
2227
|
-
stabilizeOut: !0,
|
2228
|
-
skipInitial: !1
|
2229
|
-
})}
|
2230
|
-
>
|
2231
|
-
</conversation-entry>
|
2232
|
-
</div>`
|
2233
|
-
)}
|
2234
|
-
${this.loading ? f`<ace-typing-state
|
2235
|
-
${jt({
|
2236
|
-
keyframeOptions: {},
|
2237
|
-
in: Se,
|
2238
|
-
out: Wi,
|
2239
|
-
stabilizeOut: !0,
|
2240
|
-
skipInitial: !1
|
2241
|
-
})}
|
2242
|
-
></ace-typing-state>` : u}
|
2243
|
-
</div> `;
|
2244
|
-
}
|
2245
|
-
};
|
2246
|
-
B.styles = [
|
2247
|
-
b`
|
2248
|
-
:host {
|
2249
|
-
display: block;
|
2250
|
-
}
|
2251
|
-
.conversation-session {
|
2252
|
-
display: flex;
|
2253
|
-
flex-direction: column;
|
2254
|
-
justify-content: end;
|
2255
|
-
min-height: 100%;
|
2256
|
-
padding: var(--spacing-md);
|
2257
|
-
}
|
2258
|
-
`
|
2259
|
-
];
|
2260
|
-
At([
|
2261
|
-
$({ type: Boolean })
|
2262
|
-
], B.prototype, "loading", 2);
|
2263
|
-
At([
|
2264
|
-
$({ attribute: !1 })
|
2265
|
-
], B.prototype, "session", 2);
|
2266
|
-
At([
|
2267
|
-
w()
|
2268
|
-
], B.prototype, "entries", 2);
|
2269
|
-
B = At([
|
2270
|
-
J("ace-conversation-session")
|
2271
|
-
], B);
|
2272
|
-
var an = Object.defineProperty, ln = Object.getOwnPropertyDescriptor, os = (s, t, e, i) => {
|
2273
|
-
for (var n = i > 1 ? void 0 : i ? ln(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2274
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2275
|
-
return i && n && an(t, e, n), n;
|
2276
|
-
};
|
2277
|
-
let gt = class extends m {
|
2278
|
-
connectedCallback() {
|
2279
|
-
var s;
|
2280
|
-
super.connectedCallback(), (s = this.entry.didUpdate) == null || s.subscribe(() => {
|
2281
|
-
this.requestUpdate();
|
2282
|
-
});
|
2283
|
-
}
|
2284
|
-
_getTimestamp(s) {
|
2285
|
-
return new Date(s).toLocaleTimeString([], {
|
2286
|
-
hour: "numeric",
|
2287
|
-
minute: "2-digit",
|
2288
|
-
hourCycle: "h23"
|
2289
|
-
});
|
2290
|
-
}
|
2291
|
-
_renderTimestamp(s, t) {
|
2292
|
-
if (!s && !t)
|
2293
|
-
return u;
|
2294
|
-
let e = "";
|
2295
|
-
return s ? t ? e = `${s}: ${this._getTimestamp(t)}` : e = s : t && (e = this._getTimestamp(t)), f`<p class="conversation-timestamp">${e}</p>`;
|
2296
|
-
}
|
2297
|
-
_renderDeliveryStatus(s) {
|
2298
|
-
return s === "delivered" ? f`<telia-icon
|
2299
|
-
svg=${Os.svg}
|
2300
|
-
size="sm"
|
2301
|
-
></telia-icon>` : s === "failed" ? f`<telia-icon
|
2302
|
-
svg=${Ts.svg}
|
2303
|
-
size="sm"
|
2304
|
-
title="Message could not be delivered"
|
2305
|
-
></telia-icon>` : f`<telia-icon svg=${Ls.svg} size="sm"></telia-icon>`;
|
2306
|
-
}
|
2307
|
-
_dispatchEntryAction(s) {
|
2308
|
-
this.entry.actions$.next(s.detail);
|
2309
|
-
}
|
2310
|
-
render() {
|
2311
|
-
var s, t;
|
2312
|
-
switch (this.entry.type) {
|
2313
|
-
case Et.System:
|
2314
|
-
return f`
|
2315
|
-
<div class="conversation-system-message">
|
2316
|
-
${this.entry.messages.map(
|
2317
|
-
(e) => f`
|
2318
|
-
<div class="message-container">
|
2319
|
-
<div class="message-content">
|
2320
|
-
<conversation-group
|
2321
|
-
.group=${e}
|
2322
|
-
@action=${this._dispatchEntryAction}
|
2323
|
-
></conversation-group>
|
2324
|
-
</div>
|
2325
|
-
</div>
|
2326
|
-
`
|
2327
|
-
)}
|
2328
|
-
<span>${this._getTimestamp(this.entry.timestamp)}</span>
|
2329
|
-
</div>
|
2330
|
-
`;
|
2331
|
-
case Et.Agent:
|
2332
|
-
return f`<div
|
2333
|
-
class=${ft({
|
2334
|
-
"conversation-agent-message": !0,
|
2335
|
-
"has-avatar": !!((s = this.entry.sender) != null && s.avatar)
|
2336
|
-
})}
|
2337
|
-
>
|
2338
|
-
${typeof ((t = this.entry.sender) == null ? void 0 : t.avatar) == "string" ? f`<div class="avatar">
|
2339
|
-
<img src=${this.entry.sender.avatar} />
|
2340
|
-
</div>` : u}
|
2341
|
-
|
2342
|
-
<div class="entry-content">
|
2343
|
-
${this.entry.messages.map(
|
2344
|
-
(e) => f`
|
2345
|
-
<div class="message-container">
|
2346
|
-
<div class="message-content">
|
2347
|
-
<conversation-group .group=${e}></conversation-group>
|
2348
|
-
</div>
|
2349
|
-
</div>
|
2350
|
-
`
|
2351
|
-
)}
|
2352
|
-
</div>
|
2353
|
-
<div class="message-details">
|
2354
|
-
${this._renderTimestamp(
|
2355
|
-
this.entry.sender.name || "",
|
2356
|
-
this.entry.timestamp
|
2357
|
-
)}
|
2358
|
-
</div>
|
2359
|
-
</div>`;
|
2360
|
-
case Et.User:
|
2361
|
-
return f`<div
|
2362
|
-
class=${ft({
|
2363
|
-
"conversation-user-message": !0,
|
2364
|
-
"has-error": this.entry.status === "failed"
|
2365
|
-
})}
|
2366
|
-
>
|
2367
|
-
<div class="entry-content">
|
2368
|
-
${this.entry.messages.map(
|
2369
|
-
(e) => f`
|
2370
|
-
<div class="message-container">
|
2371
|
-
<div class="message-content">
|
2372
|
-
<conversation-group .group=${e}></conversation-group>
|
2373
|
-
</div>
|
2374
|
-
</div>
|
2375
|
-
`
|
2376
|
-
)}
|
2377
|
-
</div>
|
2378
|
-
<div class="message-details">
|
2379
|
-
${this._renderTimestamp(
|
2380
|
-
this.entry.sender.name || "",
|
2381
|
-
this.entry.timestamp
|
2382
|
-
)}
|
2383
|
-
${this._renderDeliveryStatus(this.entry.status)}
|
2384
|
-
</div>
|
2385
|
-
</div>`;
|
2386
|
-
default:
|
2387
|
-
return u;
|
2388
|
-
}
|
2389
|
-
}
|
2390
|
-
};
|
2391
|
-
gt.styles = [
|
2392
|
-
b`
|
2393
|
-
:host {
|
2394
|
-
box-sizing: border-box;
|
2395
|
-
display: block;
|
2396
|
-
}
|
2397
|
-
* {
|
2398
|
-
box-sizing: border-box;
|
2399
|
-
}
|
2400
|
-
.message-content {
|
2401
|
-
padding: var(--spacing-md);
|
2402
|
-
display: inline-block;
|
2403
|
-
margin-top: var(--spacing-md);
|
2404
|
-
max-width: 100%;
|
2405
|
-
border: 1px solid rgba(255, 255, 255, 0.22);
|
2406
|
-
border-radius: var(--border-radius);
|
2407
|
-
background-color: var(--bubble-bg-color);
|
2408
|
-
color: var(--bubble-text-color);
|
2409
|
-
}
|
2410
|
-
|
2411
|
-
.message-details {
|
2412
|
-
display: flex;
|
2413
|
-
gap: var(--spacing-sm);
|
2414
|
-
align-items: center;
|
2415
|
-
}
|
2416
|
-
|
2417
|
-
.conversation-system-message {
|
2418
|
-
display: flex;
|
2419
|
-
flex-direction: column;
|
2420
|
-
justify-content: center;
|
2421
|
-
align-items: center;
|
2422
|
-
}
|
2423
|
-
|
2424
|
-
.conversation-system-message .message-content {
|
2425
|
-
padding: 0;
|
2426
|
-
}
|
2427
|
-
|
2428
|
-
.conversation-system-message span {
|
2429
|
-
color: var(--message-info-color, var(--text-color));
|
2430
|
-
font-size: 0.8rem;
|
2431
|
-
}
|
2432
|
-
|
2433
|
-
.conversation-user-message {
|
2434
|
-
--bubble-bg-color: var(--user-bg-color);
|
2435
|
-
--bubble-text-color: var(--user-text-color);
|
2436
|
-
margin-left: 10%;
|
2437
|
-
width: 90%;
|
2438
|
-
display: flex;
|
2439
|
-
flex-direction: column;
|
2440
|
-
align-items: flex-end;
|
2441
|
-
gap: var(--spacing-sm);
|
2442
|
-
}
|
2443
|
-
|
2444
|
-
.conversation-user-message.has-error {
|
2445
|
-
opacity: 0.7;
|
2446
|
-
}
|
2447
|
-
|
2448
|
-
.conversation-user-message.has-error .message-details {
|
2449
|
-
color: var(--error-text-color);
|
2450
|
-
}
|
2451
|
-
|
2452
|
-
.conversation-agent-message {
|
2453
|
-
--bubble-bg-color: var(--agent-bg-color);
|
2454
|
-
--bubble-text-color: var(--agent-text-color);
|
2455
|
-
display: grid;
|
2456
|
-
margin-right: 10%;
|
2457
|
-
width: 90%;
|
2458
|
-
gap: var(--spacing-sm);
|
2459
|
-
|
2460
|
-
grid-template-columns: 1fr;
|
2461
|
-
grid-template-rows: 1fr auto;
|
2462
|
-
grid-template-areas:
|
2463
|
-
'content'
|
2464
|
-
'info';
|
2465
|
-
}
|
2466
|
-
.conversation-agent-message.has-avatar {
|
2467
|
-
grid-template-columns: auto 1fr;
|
2468
|
-
grid-template-rows: 1fr auto;
|
2469
|
-
grid-template-areas:
|
2470
|
-
'avatar content'
|
2471
|
-
'. info';
|
2472
|
-
}
|
2473
|
-
|
2474
|
-
.avatar {
|
2475
|
-
grid-area: avatar;
|
2476
|
-
place-self: flex-end;
|
2477
|
-
width: 32px;
|
2478
|
-
height: 32px;
|
2479
|
-
border-radius: 50%;
|
2480
|
-
align-self: flex-end;
|
2481
|
-
justify-self: center;
|
2482
|
-
overflow: hidden;
|
2483
|
-
margin-right: var(--spacing-md);
|
2484
|
-
justify-content: center;
|
2485
|
-
align-items: center;
|
2486
|
-
}
|
2487
|
-
.avatar img {
|
2488
|
-
height: 100%;
|
2489
|
-
width: 100%;
|
2490
|
-
object-fit: cover;
|
2491
|
-
}
|
2492
|
-
|
2493
|
-
.conversation-timestamp {
|
2494
|
-
grid-area: info;
|
2495
|
-
margin: 0;
|
2496
|
-
line-height: 1.5em;
|
2497
|
-
grid-area: info;
|
2498
|
-
color: var(--message-info-color, var(--text-color));
|
2499
|
-
font-size: 0.8rem;
|
2500
|
-
font-weight: 300;
|
2501
|
-
}
|
2502
|
-
|
2503
|
-
.entry-content {
|
2504
|
-
grid-area: content;
|
2505
|
-
}
|
2506
|
-
`
|
2507
|
-
];
|
2508
|
-
os([
|
2509
|
-
$({ attribute: !1 })
|
2510
|
-
], gt.prototype, "entry", 2);
|
2511
|
-
gt = os([
|
2512
|
-
J("conversation-entry")
|
2513
|
-
], gt);
|
2514
|
-
/**
|
2515
|
-
* @license
|
2516
|
-
* Copyright 2021 Google LLC
|
2517
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
2518
|
-
*/
|
2519
|
-
const cn = (s, t, e) => {
|
2520
|
-
for (const i of t)
|
2521
|
-
if (i[0] === s)
|
2522
|
-
return (0, i[1])();
|
2523
|
-
return e == null ? void 0 : e();
|
2524
|
-
};
|
2525
|
-
var dn = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, rs = (s, t, e, i) => {
|
2526
|
-
for (var n = i > 1 ? void 0 : i ? hn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2527
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2528
|
-
return i && n && dn(t, e, n), n;
|
2529
|
-
};
|
2530
|
-
let $t = class extends m {
|
2531
|
-
render() {
|
2532
|
-
return f`
|
2533
|
-
<div class="message-group">
|
2534
|
-
${this.group.items.map(
|
2535
|
-
([s, t]) => f`
|
2536
|
-
${cn(
|
2537
|
-
s,
|
2538
|
-
[["html", () => f`<message-type-html .message=${t} />`]],
|
2539
|
-
() => {
|
2540
|
-
const e = customElements.get(s);
|
2541
|
-
if (!e)
|
2542
|
-
return u;
|
2543
|
-
const i = new e();
|
2544
|
-
return f`${i}`;
|
2545
|
-
}
|
2546
|
-
)}
|
2547
|
-
`
|
2548
|
-
)}
|
2549
|
-
</div>
|
2550
|
-
`;
|
2551
|
-
}
|
2552
|
-
};
|
2553
|
-
$t.styles = [
|
2554
|
-
b`
|
2555
|
-
:host {
|
2556
|
-
box-sizing: border-box;
|
2557
|
-
display: block;
|
2558
|
-
}
|
2559
|
-
* {
|
2560
|
-
box-sizing: border-box;
|
2561
|
-
}
|
2562
|
-
.message-group {
|
2563
|
-
display: flex;
|
2564
|
-
flex-direction: column;
|
2565
|
-
gap: var(--spacing-md);
|
2566
|
-
}
|
2567
|
-
`
|
2568
|
-
];
|
2569
|
-
rs([
|
2570
|
-
$({ attribute: !1 })
|
2571
|
-
], $t.prototype, "group", 2);
|
2572
|
-
$t = rs([
|
2573
|
-
J("conversation-group")
|
2574
|
-
], $t);
|
2575
|
-
var pn = Object.defineProperty, un = Object.getOwnPropertyDescriptor, fn = (s, t, e, i) => {
|
2576
|
-
for (var n = i > 1 ? void 0 : i ? un(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2577
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2578
|
-
return i && n && pn(t, e, n), n;
|
2579
|
-
};
|
2580
|
-
let Dt = class extends m {
|
2581
|
-
render() {
|
2582
|
-
return f`<div class="container">
|
2583
|
-
<div class="dot"></div>
|
2584
|
-
<div class="dot"></div>
|
2585
|
-
<div class="dot"></div>
|
2586
|
-
</div>`;
|
2587
|
-
}
|
2588
|
-
};
|
2589
|
-
Dt.styles = [
|
2590
|
-
b`
|
2591
|
-
:host {
|
2592
|
-
display: block;
|
2593
|
-
}
|
2594
|
-
.container {
|
2595
|
-
align-items: center;
|
2596
|
-
display: flex;
|
2597
|
-
justify-content: center;
|
2598
|
-
gap: var(--spacing-sm);
|
2599
|
-
padding: var(--spacing-md);
|
2600
|
-
}
|
2601
|
-
.dot {
|
2602
|
-
border-radius: 9999px;
|
2603
|
-
height: var(--spacing-sm);
|
2604
|
-
width: var(--spacing-sm);
|
2605
|
-
background: var(--primary-background);
|
2606
|
-
opacity: 0;
|
2607
|
-
animation: blink 1s infinite;
|
2608
|
-
}
|
2609
|
-
.dot:nth-child(1) {
|
2610
|
-
animation-delay: 0.3333s;
|
2611
|
-
}
|
2612
|
-
.dot:nth-child(2) {
|
2613
|
-
animation-delay: 0.6666s;
|
2614
|
-
}
|
2615
|
-
.dot:nth-child(3) {
|
2616
|
-
animation-delay: 0.9999s;
|
2617
|
-
}
|
2618
|
-
|
2619
|
-
@keyframes blink {
|
2620
|
-
50% {
|
2621
|
-
opacity: 1;
|
2622
|
-
}
|
2623
|
-
}
|
2624
|
-
`
|
2625
|
-
];
|
2626
|
-
Dt = fn([
|
2627
|
-
J("ace-typing-state")
|
2628
|
-
], Dt);
|
2629
|
-
/**
|
2630
|
-
* @license
|
2631
|
-
* Copyright 2017 Google LLC
|
2632
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
2633
|
-
*/
|
2634
|
-
class It extends Yt {
|
2635
|
-
constructor(t) {
|
2636
|
-
if (super(t), this.et = u, t.type !== Ct.CHILD)
|
2637
|
-
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
2638
|
-
}
|
2639
|
-
render(t) {
|
2640
|
-
if (t === u || t == null)
|
2641
|
-
return this.vt = void 0, this.et = t;
|
2642
|
-
if (t === E)
|
2643
|
-
return t;
|
2644
|
-
if (typeof t != "string")
|
2645
|
-
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
2646
|
-
if (t === this.et)
|
2647
|
-
return this.vt;
|
2648
|
-
this.et = t;
|
2649
|
-
const e = [t];
|
2650
|
-
return e.raw = e, this.vt = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
2651
|
-
}
|
2652
|
-
}
|
2653
|
-
It.directiveName = "unsafeHTML", It.resultType = 1;
|
2654
|
-
const gn = xt(It);
|
2655
|
-
var $n = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, as = (s, t, e, i) => {
|
2656
|
-
for (var n = i > 1 ? void 0 : i ? mn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2657
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2658
|
-
return i && n && $n(t, e, n), n;
|
2659
|
-
};
|
2660
|
-
let mt = class extends m {
|
2661
|
-
render() {
|
2662
|
-
return f`<div class="message-type-html">
|
2663
|
-
${gn(this.message.content)}
|
2664
|
-
</div>`;
|
2665
|
-
}
|
2666
|
-
};
|
2667
|
-
mt.styles = [
|
2668
|
-
b`
|
2669
|
-
:host {
|
2670
|
-
box-sizing: border-box;
|
2671
|
-
}
|
2672
|
-
* {
|
2673
|
-
box-sizing: border-box;
|
2674
|
-
}
|
2675
|
-
p {
|
2676
|
-
margin: 0;
|
2677
|
-
padding: 0;
|
2678
|
-
word-break: break-word;
|
2679
|
-
}
|
2680
|
-
a {
|
2681
|
-
word-break: break-all;
|
2682
|
-
}
|
2683
|
-
`
|
2684
|
-
];
|
2685
|
-
as([
|
2686
|
-
$({ attribute: !1 })
|
2687
|
-
], mt.prototype, "message", 2);
|
2688
|
-
mt = as([
|
2689
|
-
J("message-type-html")
|
2690
|
-
], mt);
|
2691
|
-
class vn {
|
2692
|
-
constructor(t) {
|
2693
|
-
this._message = null, this._host = t, t.addController(this);
|
2694
|
-
}
|
2695
|
-
hostConnected() {
|
2696
|
-
}
|
2697
|
-
set message(t) {
|
2698
|
-
this._message = t, this._host.requestUpdate();
|
2699
|
-
}
|
2700
|
-
get message() {
|
2701
|
-
return this._message;
|
2702
|
-
}
|
2703
|
-
hasMessage() {
|
2704
|
-
return !!this.message;
|
2705
|
-
}
|
2706
|
-
}
|
2707
|
-
var yn = Object.defineProperty, bn = Object.getOwnPropertyDescriptor, St = (s, t, e, i) => {
|
2708
|
-
for (var n = i > 1 ? void 0 : i ? bn(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2709
|
-
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2710
|
-
return i && n && yn(t, e, n), n;
|
2711
|
-
};
|
2712
|
-
const _n = (s) => {
|
2713
|
-
s.scrollTo ? s.scrollTo({ top: s.scrollHeight, behavior: "smooth" }) : s.scrollTop = s.scrollHeight;
|
2714
|
-
}, ls = is(m);
|
2715
|
-
class tt extends ls {
|
2716
|
-
constructor() {
|
2717
|
-
super(...arguments), this.toast = new vn(this), this.messageMaxLength = 1e3, this.message = "", this.platform = null, this.session = null, this.disabled = !1, this.conversationContentRef = pt(), this.formRef = pt(), this.chatScrollHeight = 0;
|
2718
|
-
}
|
2719
|
-
async connectedCallback() {
|
2720
|
-
super.connectedCallback(), this.messageMaxLength = this.properties.messageMaxLength ?? this.messageMaxLength;
|
2721
|
-
const t = await this.application.container.get(
|
2722
|
-
"conversation"
|
2723
|
-
);
|
2724
|
-
this.platform = t || null, this.platform && (this.platform.activeSessionId ? this.session = this.platform.sessions.get(this.platform.activeSessionId) || null : this.session = this.platform.createSession(this) || null), this._addHeaderOptions();
|
2725
|
-
}
|
2726
|
-
async _onSendMessage(t) {
|
2727
|
-
var i;
|
2728
|
-
if (t.preventDefault(), this.message.length <= 0) {
|
2729
|
-
(i = this.formRef.value) == null || i.classList.add("shake"), setTimeout(() => {
|
2730
|
-
var n;
|
2731
|
-
(n = this.formRef.value) == null || n.classList.remove("shake");
|
2732
|
-
}, 500);
|
2733
|
-
return;
|
2734
|
-
}
|
2735
|
-
this.message = this.message.slice(0, this.messageMaxLength);
|
2736
|
-
const e = new CustomEvent("user-submit", {
|
2737
|
-
detail: { text: this.message }
|
2738
|
-
});
|
2739
|
-
this.dispatchEvent(e), this.message = "";
|
2740
|
-
}
|
2741
|
-
_addHeaderOptions() {
|
2742
|
-
const t = this.application.getComponent("widget-header");
|
2743
|
-
if (!t)
|
2744
|
-
return;
|
2745
|
-
const e = this.application.texts, i = e.getOrFallback("conversation.mute", "Mute"), n = e.getOrFallback("conversation.unmute", "Unmute"), r = !!this.application.branding().other.disableSound, a = t.addOption({
|
2746
|
-
label: r ? n : i,
|
2747
|
-
icon: r ? de.svg : ce.svg,
|
2748
|
-
closeOnClick: !1,
|
2749
|
-
datatestid: "options-mute-button",
|
2750
|
-
onClick: () => {
|
2751
|
-
!!this.application.branding().other.disableSound ? (this.application.unmute(), a.updateLabel(i), a.updateIcon(de.svg)) : (this.application.mute(), a.updateLabel(n), a.updateIcon(ce.svg));
|
2752
|
-
}
|
2753
|
-
});
|
2754
|
-
}
|
2755
|
-
_inputHandler(t) {
|
2756
|
-
this.message = t.target.value;
|
2757
|
-
}
|
2758
|
-
_actionHandler(t) {
|
2759
|
-
}
|
2760
|
-
onSessionUpdated() {
|
2761
|
-
const t = this.conversationContentRef.value;
|
2762
|
-
t && setTimeout(() => {
|
2763
|
-
const e = t.scrollHeight;
|
2764
|
-
e > this.chatScrollHeight && (_n(t), this.chatScrollHeight = e);
|
2765
|
-
}, 1e3);
|
2766
|
-
}
|
2767
|
-
disableInput() {
|
2768
|
-
this.disabled = !0;
|
2769
|
-
}
|
2770
|
-
enableInput() {
|
2771
|
-
this.disabled = !1;
|
2772
|
-
}
|
2773
|
-
setToastMessage(t) {
|
2774
|
-
this.toast.message = t;
|
2775
|
-
}
|
2776
|
-
handover(t, e = {}) {
|
2777
|
-
var i;
|
2778
|
-
return this.enableInput(), this.setToastMessage(null), ((i = this.session) == null ? void 0 : i.handover(t, e)) || cs;
|
2779
|
-
}
|
2780
|
-
render() {
|
2781
|
-
const t = this.application.texts;
|
2782
|
-
return f` <div
|
2783
|
-
@action=${this._actionHandler}
|
2784
|
-
class=${ft({
|
2785
|
-
conversation: !0,
|
2786
|
-
disabled: this.disabled,
|
2787
|
-
"conversation--has-toast": this.toast.hasMessage(),
|
2788
|
-
"conversation--input-has-text": this.message.length > 0
|
2789
|
-
})}
|
2790
|
-
>
|
2791
|
-
<div
|
2792
|
-
class="conversation-content"
|
2793
|
-
aria-live="polite"
|
2794
|
-
${ut(this.conversationContentRef)}
|
2795
|
-
>
|
2796
|
-
${this.toast.hasMessage() ? f`<div class="conversation__toast">${this.toast.message}</div>` : u}
|
2797
|
-
${this.session ? f`<ace-conversation-session
|
2798
|
-
@updated=${this.onSessionUpdated}
|
2799
|
-
.session=${this.session}
|
2800
|
-
></ace-conversation-session>` : u}
|
2801
|
-
</div>
|
2802
|
-
<form
|
2803
|
-
class="conversation-bottom"
|
2804
|
-
@submit=${this._onSendMessage}
|
2805
|
-
${ut(this.formRef)}
|
2806
|
-
>
|
2807
|
-
<input
|
2808
|
-
maxlength=${this.messageMaxLength}
|
2809
|
-
placeholder=${t.getOrFallback(
|
2810
|
-
"conversation.input-placeholder",
|
2811
|
-
"Aa"
|
2812
|
-
)}
|
2813
|
-
data-testid='message-input'
|
2814
|
-
.value=${this.message}
|
2815
|
-
?disabled=${this.disabled}
|
2816
|
-
@input=${this._inputHandler} />
|
2817
|
-
<div class="conversation-actions">
|
2818
|
-
<button
|
2819
|
-
class="conversation-send-button"
|
2820
|
-
type="submit"
|
2821
|
-
data-testid='send-message-button'
|
2822
|
-
title=${t.getOrFallback("conversation.send-alt", "Send")}
|
2823
|
-
?disabled=${this.disabled}
|
2824
|
-
>
|
2825
|
-
<telia-icon svg=${Ms.svg}></telia-icon>
|
2826
|
-
</button>
|
2827
|
-
</div>
|
2828
|
-
</form>
|
2829
|
-
</div>`;
|
2830
|
-
}
|
2831
|
-
}
|
2832
|
-
tt.styles = [
|
2833
|
-
ls.styles || [],
|
2834
|
-
b`
|
2835
|
-
:host {
|
2836
|
-
font-family: var(--font-family);
|
2837
|
-
/* --send-icon-color: var(--gray-dark-color, #a6a6a6); */
|
2838
|
-
--send-icon-opacity: 0.4;
|
2839
|
-
--send-icon-color: var(--text-color);
|
2840
|
-
--conversation-bg: var(--conversation-bg-color, #fafafa);
|
2841
|
-
--agent-bg-color: var(
|
2842
|
-
--conversation-agent-bg-color,
|
2843
|
-
var(--secondary-background)
|
2844
|
-
);
|
2845
|
-
--agent-text-color: var(
|
2846
|
-
--conversation-agent-text-color,
|
2847
|
-
var(--text-on-secondary-background)
|
2848
|
-
);
|
2849
|
-
--user-bg-color: var(
|
2850
|
-
--conversation-user-bg-color,
|
2851
|
-
var(--primary-background)
|
2852
|
-
);
|
2853
|
-
--user-text-color: var(
|
2854
|
-
--conversation-user-text-color,
|
2855
|
-
var(--text-on-primary-background)
|
2856
|
-
);
|
2857
|
-
|
2858
|
-
--content-border: var(--conversation-content-border, none);
|
2859
|
-
--input-border: var(--conversation-input-border, none);
|
2860
|
-
--input-text-color: var(--conversation-input-text-color, inherit);
|
2861
|
-
--conversation-input-bg: var(--conversation-input-bg-color, #fff);
|
2862
|
-
|
2863
|
-
--toast-bg: #eb5185;
|
2864
|
-
--toast-text-color: white;
|
2865
|
-
|
2866
|
-
--error-text-color: #eb5185;
|
2867
|
-
|
2868
|
-
--message-info-color: var(
|
2869
|
-
--conversation-message-info-color,
|
2870
|
-
var(--text-color)
|
2871
|
-
);
|
2872
|
-
|
2873
|
-
scrollbar-width: thin; /* Firefox */
|
2874
|
-
scrollbar-color: #7f7f7f transparent; /* Firefox */
|
2875
|
-
}
|
2876
|
-
::-webkit-scrollbar {
|
2877
|
-
width: 3px !important;
|
2878
|
-
background-color: transparent;
|
2879
|
-
border-left: none;
|
2880
|
-
}
|
2881
|
-
::-webkit-scrollbar-thumb {
|
2882
|
-
background-color: #7f7f7f;
|
2883
|
-
}
|
2884
|
-
::-webkit-scrollbar-track {
|
2885
|
-
-webkit-box-shadow: none !important;
|
2886
|
-
background-color: transparent;
|
2887
|
-
}
|
2888
|
-
|
2889
|
-
@keyframes shake {
|
2890
|
-
10%,
|
2891
|
-
90% {
|
2892
|
-
transform: translateX(1px);
|
2893
|
-
}
|
2894
|
-
20%,
|
2895
|
-
80% {
|
2896
|
-
transform: translateX(-1px);
|
2897
|
-
}
|
2898
|
-
30%,
|
2899
|
-
50%,
|
2900
|
-
70% {
|
2901
|
-
transform: translateX(2px);
|
2902
|
-
}
|
2903
|
-
40%,
|
2904
|
-
60% {
|
2905
|
-
transform: translateX(-2px);
|
2906
|
-
}
|
2907
|
-
}
|
2908
|
-
|
2909
|
-
.conversation {
|
2910
|
-
display: grid;
|
2911
|
-
grid-template-rows: 1fr auto;
|
2912
|
-
gap: var(--spacing-lg);
|
2913
|
-
height: 100%;
|
2914
|
-
background-color: transparent;
|
2915
|
-
}
|
2916
|
-
.conversation.conversation--input-has-text {
|
2917
|
-
/* --send-icon-color: var(--primary-color); */
|
2918
|
-
--send-icon-opacity: 1;
|
2919
|
-
}
|
2920
|
-
.conversation.conversation--has-toast .conversation-content {
|
2921
|
-
border-top-right-radius: 0;
|
2922
|
-
border-top-left-radius: 0;
|
2923
|
-
}
|
2924
|
-
.conversation.disabled .conversation-bottom {
|
2925
|
-
--conversation-input-bg: rgba(255, 255, 255, 0.4);
|
2926
|
-
}
|
2927
|
-
.conversation-content {
|
2928
|
-
flex: 1;
|
2929
|
-
background-color: var(--conversation-bg);
|
2930
|
-
overflow-y: auto;
|
2931
|
-
overflow-x: hidden;
|
2932
|
-
border-radius: var(--border-radius-sm);
|
2933
|
-
border: var(--content-border);
|
2934
|
-
position: relative;
|
2935
|
-
}
|
2936
|
-
.conversation-bottom {
|
2937
|
-
border: var(--input-border);
|
2938
|
-
border-radius: var(--border-radius-sm);
|
2939
|
-
background-color: var(--conversation-input-bg);
|
2940
|
-
min-height: 50px;
|
2941
|
-
max-height: 150px;
|
2942
|
-
display: flex;
|
2943
|
-
align-items: center;
|
2944
|
-
padding: 0 var(--spacing-md);
|
2945
|
-
margin: 0;
|
2946
|
-
transition: background-color 500ms ease-in-out;
|
2947
|
-
}
|
2948
|
-
.conversation-bottom.shake {
|
2949
|
-
animation: 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0s 1 normal both
|
2950
|
-
running shake;
|
2951
|
-
}
|
2952
|
-
.conversation-bottom-left {
|
2953
|
-
border-right: 1px solid var(--gray-color);
|
2954
|
-
padding-right: var(--spacing-md);
|
2955
|
-
}
|
2956
|
-
.conversation-send-button {
|
2957
|
-
border: none;
|
2958
|
-
background: transparent;
|
2959
|
-
color: var(--send-icon-color);
|
2960
|
-
opacity: var(--send-icon-opacity);
|
2961
|
-
transition: opacity 200ms ease-in-out;
|
2962
|
-
}
|
2963
|
-
.conversation-send-button:not(:disabled):hover {
|
2964
|
-
--send-icon-opacity: 1;
|
2965
|
-
cursor: pointer;
|
2966
|
-
}
|
2967
|
-
.conversation__toast {
|
2968
|
-
background-color: var(--toast-bg);
|
2969
|
-
color: var(--toast-text-color);
|
2970
|
-
padding: var(--spacing-md);
|
2971
|
-
position: sticky;
|
2972
|
-
top: 0;
|
2973
|
-
left: 0;
|
2974
|
-
right: 0;
|
2975
|
-
font-size: 0.8rem;
|
2976
|
-
text-align: center;
|
2977
|
-
font-weight: 500;
|
2978
|
-
}
|
2979
|
-
input {
|
2980
|
-
border: none;
|
2981
|
-
font-family: inherit;
|
2982
|
-
font-size: inherit;
|
2983
|
-
flex: 1;
|
2984
|
-
height: 2.5rem;
|
2985
|
-
outline: none;
|
2986
|
-
background-color: transparent;
|
2987
|
-
color: var(--input-text-color);
|
2988
|
-
}
|
2989
|
-
`
|
2990
|
-
];
|
2991
|
-
St([
|
2992
|
-
w()
|
2993
|
-
], tt.prototype, "message", 2);
|
2994
|
-
St([
|
2995
|
-
w()
|
2996
|
-
], tt.prototype, "platform", 2);
|
2997
|
-
St([
|
2998
|
-
w()
|
2999
|
-
], tt.prototype, "session", 2);
|
3000
|
-
St([
|
3001
|
-
w()
|
3002
|
-
], tt.prototype, "disabled", 2);
|
3003
|
-
export {
|
3004
|
-
tt as Conversation,
|
3005
|
-
tt as default
|
3006
|
-
};
|