@iai-lib/any-chat-widget 0.1.0-alpha.27 → 0.1.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/any-chat-widget.es.js +978 -979
- package/dist/any-chat-widget.umd.js +127 -127
- package/package.json +3 -3
|
@@ -2,37 +2,45 @@ var Ui = (i, e, t) => {
|
|
|
2
2
|
if (!e.has(i))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)),
|
|
5
|
+
var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Gn = (i, e, t) => {
|
|
6
6
|
if (e.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
9
9
|
}, Ie = (i, e, t, n) => (Ui(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
10
|
+
var mr = Object.defineProperty, gr = (i, e, t) => e in i ? mr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, W = (i, e, t) => (gr(i, typeof e != "symbol" ? e + "" : e, t), t), fr = (i, e, t) => {
|
|
11
|
+
if (!e.has(i))
|
|
12
|
+
throw TypeError("Cannot " + t);
|
|
13
|
+
}, Hi = (i, e, t) => {
|
|
14
|
+
if (e.has(i))
|
|
15
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
16
|
+
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
17
|
+
}, ni = (i, e, t) => (fr(i, e, "access private method"), t);
|
|
10
18
|
/**
|
|
11
19
|
* @license
|
|
12
20
|
* Copyright 2019 Google LLC
|
|
13
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
22
|
*/
|
|
15
|
-
const sn = globalThis,
|
|
23
|
+
const sn = globalThis, ui = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, hi = Symbol(), Bi = /* @__PURE__ */ new WeakMap();
|
|
16
24
|
let bs = class {
|
|
17
|
-
constructor(e, t
|
|
18
|
-
if (this._$cssResult$ = !0,
|
|
25
|
+
constructor(i, e, t) {
|
|
26
|
+
if (this._$cssResult$ = !0, t !== hi)
|
|
19
27
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
20
|
-
this.cssText =
|
|
28
|
+
this.cssText = i, this.t = e;
|
|
21
29
|
}
|
|
22
30
|
get styleSheet() {
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
31
|
+
let i = this.o;
|
|
32
|
+
const e = this.t;
|
|
33
|
+
if (ui && i === void 0) {
|
|
34
|
+
const t = e !== void 0 && e.length === 1;
|
|
35
|
+
t && (i = Bi.get(e)), i === void 0 && ((this.o = i = new CSSStyleSheet()).replaceSync(this.cssText), t && Bi.set(e, i));
|
|
28
36
|
}
|
|
29
|
-
return
|
|
37
|
+
return i;
|
|
30
38
|
}
|
|
31
39
|
toString() {
|
|
32
40
|
return this.cssText;
|
|
33
41
|
}
|
|
34
42
|
};
|
|
35
|
-
const
|
|
43
|
+
const yr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, hi), nt = (i, ...e) => {
|
|
36
44
|
const t = i.length === 1 ? i[0] : e.reduce((n, s, r) => n + ((a) => {
|
|
37
45
|
if (a._$cssResult$ === !0)
|
|
38
46
|
return a.cssText;
|
|
@@ -40,30 +48,30 @@ const mr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, ui), nt = (i
|
|
|
40
48
|
return a;
|
|
41
49
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
42
50
|
})(s) + i[r + 1], i[0]);
|
|
43
|
-
return new bs(t, i,
|
|
44
|
-
},
|
|
45
|
-
if (
|
|
51
|
+
return new bs(t, i, hi);
|
|
52
|
+
}, vr = (i, e) => {
|
|
53
|
+
if (ui)
|
|
46
54
|
i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
47
55
|
else
|
|
48
56
|
for (const t of e) {
|
|
49
57
|
const n = document.createElement("style"), s = sn.litNonce;
|
|
50
58
|
s !== void 0 && n.setAttribute("nonce", s), n.textContent = t.cssText, i.appendChild(n);
|
|
51
59
|
}
|
|
52
|
-
},
|
|
60
|
+
}, Wi = ui ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
53
61
|
let t = "";
|
|
54
62
|
for (const n of e.cssRules)
|
|
55
63
|
t += n.cssText;
|
|
56
|
-
return
|
|
64
|
+
return yr(t);
|
|
57
65
|
})(i) : i;
|
|
58
66
|
/**
|
|
59
67
|
* @license
|
|
60
68
|
* Copyright 2017 Google LLC
|
|
61
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
70
|
*/
|
|
63
|
-
const { is:
|
|
71
|
+
const { is: br, defineProperty: wr, getOwnPropertyDescriptor: xr, getOwnPropertyNames: _r, getOwnPropertySymbols: kr, getPrototypeOf: $r } = Object, ct = globalThis, Fi = ct.trustedTypes, Tr = Fi ? Fi.emptyScript : "", Vi = ct.reactiveElementPolyfillSupport, wt = (i, e) => i, ln = { toAttribute(i, e) {
|
|
64
72
|
switch (e) {
|
|
65
73
|
case Boolean:
|
|
66
|
-
i = i ?
|
|
74
|
+
i = i ? Tr : null;
|
|
67
75
|
break;
|
|
68
76
|
case Object:
|
|
69
77
|
case Array:
|
|
@@ -88,7 +96,7 @@ const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnProperty
|
|
|
88
96
|
}
|
|
89
97
|
}
|
|
90
98
|
return t;
|
|
91
|
-
} }, pi = (i, e) => !
|
|
99
|
+
} }, pi = (i, e) => !br(i, e), qi = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi };
|
|
92
100
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ct.litPropertyMetadata ?? (ct.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
93
101
|
class at extends HTMLElement {
|
|
94
102
|
static addInitializer(e) {
|
|
@@ -97,14 +105,14 @@ class at extends HTMLElement {
|
|
|
97
105
|
static get observedAttributes() {
|
|
98
106
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
99
107
|
}
|
|
100
|
-
static createProperty(e, t =
|
|
108
|
+
static createProperty(e, t = qi) {
|
|
101
109
|
if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
102
110
|
const n = Symbol(), s = this.getPropertyDescriptor(e, n, t);
|
|
103
|
-
s !== void 0 &&
|
|
111
|
+
s !== void 0 && wr(this.prototype, e, s);
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
static getPropertyDescriptor(e, t, n) {
|
|
107
|
-
const { get: s, set: r } =
|
|
115
|
+
const { get: s, set: r } = xr(this.prototype, e) ?? { get() {
|
|
108
116
|
return this[t];
|
|
109
117
|
}, set(a) {
|
|
110
118
|
this[t] = a;
|
|
@@ -117,19 +125,19 @@ class at extends HTMLElement {
|
|
|
117
125
|
}, configurable: !0, enumerable: !0 };
|
|
118
126
|
}
|
|
119
127
|
static getPropertyOptions(e) {
|
|
120
|
-
return this.elementProperties.get(e) ??
|
|
128
|
+
return this.elementProperties.get(e) ?? qi;
|
|
121
129
|
}
|
|
122
130
|
static _$Ei() {
|
|
123
131
|
if (this.hasOwnProperty(wt("elementProperties")))
|
|
124
132
|
return;
|
|
125
|
-
const e =
|
|
133
|
+
const e = $r(this);
|
|
126
134
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
127
135
|
}
|
|
128
136
|
static finalize() {
|
|
129
137
|
if (this.hasOwnProperty(wt("finalized")))
|
|
130
138
|
return;
|
|
131
139
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(wt("properties"))) {
|
|
132
|
-
const t = this.properties, n = [...
|
|
140
|
+
const t = this.properties, n = [..._r(t), ...kr(t)];
|
|
133
141
|
for (const s of n)
|
|
134
142
|
this.createProperty(s, t[s]);
|
|
135
143
|
}
|
|
@@ -152,9 +160,9 @@ class at extends HTMLElement {
|
|
|
152
160
|
if (Array.isArray(e)) {
|
|
153
161
|
const n = new Set(e.flat(1 / 0).reverse());
|
|
154
162
|
for (const s of n)
|
|
155
|
-
t.unshift(
|
|
163
|
+
t.unshift(Wi(s));
|
|
156
164
|
} else
|
|
157
|
-
e !== void 0 && t.push(
|
|
165
|
+
e !== void 0 && t.push(Wi(e));
|
|
158
166
|
return t;
|
|
159
167
|
}
|
|
160
168
|
static _$Eu(e, t) {
|
|
@@ -184,7 +192,7 @@ class at extends HTMLElement {
|
|
|
184
192
|
}
|
|
185
193
|
createRenderRoot() {
|
|
186
194
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
187
|
-
return
|
|
195
|
+
return vr(e, this.constructor.elementStyles), e;
|
|
188
196
|
}
|
|
189
197
|
connectedCallback() {
|
|
190
198
|
var e;
|
|
@@ -301,39 +309,39 @@ class at extends HTMLElement {
|
|
|
301
309
|
firstUpdated(e) {
|
|
302
310
|
}
|
|
303
311
|
}
|
|
304
|
-
at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementProperties")] = /* @__PURE__ */ new Map(), at[wt("finalized")] = /* @__PURE__ */ new Map(),
|
|
312
|
+
at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementProperties")] = /* @__PURE__ */ new Map(), at[wt("finalized")] = /* @__PURE__ */ new Map(), Vi == null || Vi({ ReactiveElement: at }), (ct.reactiveElementVersions ?? (ct.reactiveElementVersions = [])).push("2.0.4");
|
|
305
313
|
/**
|
|
306
314
|
* @license
|
|
307
315
|
* Copyright 2017 Google LLC
|
|
308
316
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
309
317
|
*/
|
|
310
|
-
const cn = globalThis, dn = cn.trustedTypes,
|
|
311
|
-
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
312
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
313
|
-
function
|
|
318
|
+
const cn = globalThis, dn = cn.trustedTypes, Ki = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, mi = "$lit$", ke = `lit$${(Math.random() + "").slice(9)}$`, gi = "?" + ke, Er = `<${gi}>`, Ke = document, St = () => Ke.createComment(""), Ct = (i) => i === null || typeof i != "object" && typeof i != "function", ws = Array.isArray, xs = (i) => ws(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Xn = `[
|
|
319
|
+
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ji = /-->/g, Qi = />/g, De = RegExp(`>|${Xn}(?:([^\\s"'>=/]+)(${Xn}*=${Xn}*(?:[^
|
|
320
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Yi = /'/g, Gi = /"/g, _s = /^(?:script|style|textarea|title)$/i, Sr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), z = Sr(1), fe = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Xi = /* @__PURE__ */ new WeakMap(), Be = Ke.createTreeWalker(Ke, 129);
|
|
321
|
+
function ks(i, e) {
|
|
314
322
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
315
323
|
throw Error("invalid template strings array");
|
|
316
|
-
return
|
|
324
|
+
return Ki !== void 0 ? Ki.createHTML(e) : e;
|
|
317
325
|
}
|
|
318
326
|
const $s = (i, e) => {
|
|
319
327
|
const t = i.length - 1, n = [];
|
|
320
328
|
let s, r = e === 2 ? "<svg>" : "", a = yt;
|
|
321
329
|
for (let o = 0; o < t; o++) {
|
|
322
330
|
const l = i[o];
|
|
323
|
-
let d,
|
|
324
|
-
for (; c < l.length && (a.lastIndex = c,
|
|
325
|
-
c = a.lastIndex, a === yt ?
|
|
326
|
-
const
|
|
327
|
-
r += a === yt ? l +
|
|
331
|
+
let d, u, p = -1, c = 0;
|
|
332
|
+
for (; c < l.length && (a.lastIndex = c, u = a.exec(l), u !== null); )
|
|
333
|
+
c = a.lastIndex, a === yt ? u[1] === "!--" ? a = Ji : u[1] !== void 0 ? a = Qi : u[2] !== void 0 ? (_s.test(u[2]) && (s = RegExp("</" + u[2], "g")), a = De) : u[3] !== void 0 && (a = De) : a === De ? u[0] === ">" ? (a = s ?? yt, p = -1) : u[1] === void 0 ? p = -2 : (p = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? De : u[3] === '"' ? Gi : Yi) : a === Gi || a === Yi ? a = De : a === Ji || a === Qi ? a = yt : (a = De, s = void 0);
|
|
334
|
+
const g = a === De && i[o + 1].startsWith("/>") ? " " : "";
|
|
335
|
+
r += a === yt ? l + Er : p >= 0 ? (n.push(d), l.slice(0, p) + mi + l.slice(p) + ke + g) : l + ke + (p === -2 ? o : g);
|
|
328
336
|
}
|
|
329
|
-
return [
|
|
337
|
+
return [ks(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
|
|
330
338
|
};
|
|
331
339
|
class At {
|
|
332
340
|
constructor({ strings: e, _$litType$: t }, n) {
|
|
333
341
|
let s;
|
|
334
342
|
this.parts = [];
|
|
335
343
|
let r = 0, a = 0;
|
|
336
|
-
const o = e.length - 1, l = this.parts, [d,
|
|
344
|
+
const o = e.length - 1, l = this.parts, [d, u] = $s(e, t);
|
|
337
345
|
if (this.el = At.createElement(d, n), Be.currentNode = this.el.content, t === 2) {
|
|
338
346
|
const p = this.el.content.firstChild;
|
|
339
347
|
p.replaceWith(...p.childNodes);
|
|
@@ -343,26 +351,26 @@ class At {
|
|
|
343
351
|
if (s.hasAttributes())
|
|
344
352
|
for (const p of s.getAttributeNames())
|
|
345
353
|
if (p.endsWith(mi)) {
|
|
346
|
-
const c =
|
|
347
|
-
l.push({ type: 1, index: r, name: O[2], strings:
|
|
354
|
+
const c = u[a++], g = s.getAttribute(p).split(ke), O = /([.?@])?(.*)/.exec(c);
|
|
355
|
+
l.push({ type: 1, index: r, name: O[2], strings: g, ctor: O[1] === "." ? Es : O[1] === "?" ? Ss : O[1] === "@" ? Cs : Wt }), s.removeAttribute(p);
|
|
348
356
|
} else
|
|
349
|
-
p.startsWith(
|
|
350
|
-
if (
|
|
351
|
-
const p = s.textContent.split(
|
|
357
|
+
p.startsWith(ke) && (l.push({ type: 6, index: r }), s.removeAttribute(p));
|
|
358
|
+
if (_s.test(s.tagName)) {
|
|
359
|
+
const p = s.textContent.split(ke), c = p.length - 1;
|
|
352
360
|
if (c > 0) {
|
|
353
361
|
s.textContent = dn ? dn.emptyScript : "";
|
|
354
|
-
for (let
|
|
355
|
-
s.append(p[
|
|
362
|
+
for (let g = 0; g < c; g++)
|
|
363
|
+
s.append(p[g], St()), Be.nextNode(), l.push({ type: 2, index: ++r });
|
|
356
364
|
s.append(p[c], St());
|
|
357
365
|
}
|
|
358
366
|
}
|
|
359
367
|
} else if (s.nodeType === 8)
|
|
360
|
-
if (s.data ===
|
|
368
|
+
if (s.data === gi)
|
|
361
369
|
l.push({ type: 2, index: r });
|
|
362
370
|
else {
|
|
363
371
|
let p = -1;
|
|
364
|
-
for (; (p = s.data.indexOf(
|
|
365
|
-
l.push({ type: 7, index: r }), p +=
|
|
372
|
+
for (; (p = s.data.indexOf(ke, p + 1)) !== -1; )
|
|
373
|
+
l.push({ type: 7, index: r }), p += ke.length - 1;
|
|
366
374
|
}
|
|
367
375
|
r++;
|
|
368
376
|
}
|
|
@@ -374,13 +382,13 @@ class At {
|
|
|
374
382
|
}
|
|
375
383
|
function Je(i, e, t = i, n) {
|
|
376
384
|
var s, r;
|
|
377
|
-
if (e ===
|
|
385
|
+
if (e === fe)
|
|
378
386
|
return e;
|
|
379
387
|
let a = n !== void 0 ? (s = t._$Co) == null ? void 0 : s[n] : t._$Cl;
|
|
380
388
|
const o = Ct(e) ? void 0 : e._$litDirective$;
|
|
381
389
|
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e = Je(i, a._$AS(i, e.values), a, n)), e;
|
|
382
390
|
}
|
|
383
|
-
|
|
391
|
+
class Ts {
|
|
384
392
|
constructor(e, t) {
|
|
385
393
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
386
394
|
}
|
|
@@ -408,7 +416,7 @@ let Ts = class {
|
|
|
408
416
|
for (const n of this._$AV)
|
|
409
417
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(e, n, t), t += n.strings.length - 2) : n._$AI(e[t])), t++;
|
|
410
418
|
}
|
|
411
|
-
}
|
|
419
|
+
}
|
|
412
420
|
class mt {
|
|
413
421
|
get _$AU() {
|
|
414
422
|
var e;
|
|
@@ -429,7 +437,7 @@ class mt {
|
|
|
429
437
|
return this._$AB;
|
|
430
438
|
}
|
|
431
439
|
_$AI(e, t = this) {
|
|
432
|
-
e = Je(this, e, t), Ct(e) ? e === q || e == null || e === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : e !== this._$AH && e !==
|
|
440
|
+
e = Je(this, e, t), Ct(e) ? e === q || e == null || e === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : e !== this._$AH && e !== fe && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : xs(e) ? this.k(e) : this._(e);
|
|
433
441
|
}
|
|
434
442
|
S(e) {
|
|
435
443
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -442,7 +450,7 @@ class mt {
|
|
|
442
450
|
}
|
|
443
451
|
$(e) {
|
|
444
452
|
var t;
|
|
445
|
-
const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(
|
|
453
|
+
const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(ks(s.h, s.h[0]), this.options)), s);
|
|
446
454
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
|
|
447
455
|
this._$AH.p(n);
|
|
448
456
|
else {
|
|
@@ -451,8 +459,8 @@ class mt {
|
|
|
451
459
|
}
|
|
452
460
|
}
|
|
453
461
|
_$AC(e) {
|
|
454
|
-
let t =
|
|
455
|
-
return t === void 0 &&
|
|
462
|
+
let t = Xi.get(e.strings);
|
|
463
|
+
return t === void 0 && Xi.set(e.strings, t = new At(e)), t;
|
|
456
464
|
}
|
|
457
465
|
k(e) {
|
|
458
466
|
ws(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -488,12 +496,12 @@ class Wt {
|
|
|
488
496
|
const r = this.strings;
|
|
489
497
|
let a = !1;
|
|
490
498
|
if (r === void 0)
|
|
491
|
-
e = Je(this, e, t, 0), a = !Ct(e) || e !== this._$AH && e !==
|
|
499
|
+
e = Je(this, e, t, 0), a = !Ct(e) || e !== this._$AH && e !== fe, a && (this._$AH = e);
|
|
492
500
|
else {
|
|
493
501
|
const o = e;
|
|
494
502
|
let l, d;
|
|
495
503
|
for (e = r[0], l = 0; l < r.length - 1; l++)
|
|
496
|
-
d = Je(this, o[n + l], t, l), d ===
|
|
504
|
+
d = Je(this, o[n + l], t, l), d === fe && (d = this._$AH[l]), a || (a = !Ct(d) || d !== this._$AH[l]), d === q ? e = q : e !== q && (e += (d ?? "") + r[l + 1]), this._$AH[l] = d;
|
|
497
505
|
}
|
|
498
506
|
a && !s && this.j(e);
|
|
499
507
|
}
|
|
@@ -501,14 +509,14 @@ class Wt {
|
|
|
501
509
|
e === q ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
502
510
|
}
|
|
503
511
|
}
|
|
504
|
-
|
|
512
|
+
class Es extends Wt {
|
|
505
513
|
constructor() {
|
|
506
514
|
super(...arguments), this.type = 3;
|
|
507
515
|
}
|
|
508
516
|
j(e) {
|
|
509
517
|
this.element[this.name] = e === q ? void 0 : e;
|
|
510
518
|
}
|
|
511
|
-
}
|
|
519
|
+
}
|
|
512
520
|
class Ss extends Wt {
|
|
513
521
|
constructor() {
|
|
514
522
|
super(...arguments), this.type = 4;
|
|
@@ -517,12 +525,12 @@ class Ss extends Wt {
|
|
|
517
525
|
this.element.toggleAttribute(this.name, !!e && e !== q);
|
|
518
526
|
}
|
|
519
527
|
}
|
|
520
|
-
|
|
528
|
+
class Cs extends Wt {
|
|
521
529
|
constructor(e, t, n, s, r) {
|
|
522
530
|
super(e, t, n, s, r), this.type = 5;
|
|
523
531
|
}
|
|
524
532
|
_$AI(e, t = this) {
|
|
525
|
-
if ((e = Je(this, e, t, 0) ?? q) ===
|
|
533
|
+
if ((e = Je(this, e, t, 0) ?? q) === fe)
|
|
526
534
|
return;
|
|
527
535
|
const n = this._$AH, s = e === q && n !== q || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, r = e !== q && (n === q || s);
|
|
528
536
|
s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
@@ -531,7 +539,7 @@ let Cs = class extends Wt {
|
|
|
531
539
|
var t;
|
|
532
540
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
533
541
|
}
|
|
534
|
-
}
|
|
542
|
+
}
|
|
535
543
|
class As {
|
|
536
544
|
constructor(e, t, n) {
|
|
537
545
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
@@ -543,9 +551,9 @@ class As {
|
|
|
543
551
|
Je(this, e);
|
|
544
552
|
}
|
|
545
553
|
}
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
554
|
+
const Cr = { P: mi, A: ke, C: gi, M: 1, L: $s, R: Ts, D: xs, V: Je, I: mt, H: Wt, N: Ss, U: Cs, B: Es, F: As }, es = cn.litHtmlPolyfillSupport;
|
|
555
|
+
es == null || es(At, mt), (cn.litHtmlVersions ?? (cn.litHtmlVersions = [])).push("3.1.2");
|
|
556
|
+
const Ar = (i, e, t) => {
|
|
549
557
|
const n = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
550
558
|
let s = n._$litPart$;
|
|
551
559
|
if (s === void 0) {
|
|
@@ -570,7 +578,7 @@ let ne = class extends at {
|
|
|
570
578
|
}
|
|
571
579
|
update(i) {
|
|
572
580
|
const e = this.render();
|
|
573
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(i), this._$Do =
|
|
581
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(i), this._$Do = Ar(e, this.renderRoot, this.renderOptions);
|
|
574
582
|
}
|
|
575
583
|
connectedCallback() {
|
|
576
584
|
var i;
|
|
@@ -581,13 +589,13 @@ let ne = class extends at {
|
|
|
581
589
|
super.disconnectedCallback(), (i = this._$Do) == null || i.setConnected(!1);
|
|
582
590
|
}
|
|
583
591
|
render() {
|
|
584
|
-
return
|
|
592
|
+
return fe;
|
|
585
593
|
}
|
|
586
594
|
};
|
|
587
|
-
var
|
|
588
|
-
ne._$litElement$ = !0, ne.finalized = !0, (
|
|
589
|
-
const
|
|
590
|
-
|
|
595
|
+
var ts;
|
|
596
|
+
ne._$litElement$ = !0, ne.finalized = !0, (ts = globalThis.litElementHydrateSupport) == null || ts.call(globalThis, { LitElement: ne });
|
|
597
|
+
const ns = globalThis.litElementPolyfillSupport;
|
|
598
|
+
ns == null || ns({ LitElement: ne });
|
|
591
599
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
|
592
600
|
/**
|
|
593
601
|
* @license
|
|
@@ -604,7 +612,7 @@ const Ee = (i) => (e, t) => {
|
|
|
604
612
|
* Copyright 2017 Google LLC
|
|
605
613
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
606
614
|
*/
|
|
607
|
-
const
|
|
615
|
+
const Ir = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi }, Or = (i = Ir, e, t) => {
|
|
608
616
|
const { kind: n, metadata: s } = t;
|
|
609
617
|
let r = globalThis.litPropertyMetadata.get(s);
|
|
610
618
|
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(t.name, i), n === "accessor") {
|
|
@@ -626,7 +634,7 @@ const Sr = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged
|
|
|
626
634
|
throw Error("Unsupported decorator location: " + n);
|
|
627
635
|
};
|
|
628
636
|
function V(i) {
|
|
629
|
-
return (e, t) => typeof t == "object" ?
|
|
637
|
+
return (e, t) => typeof t == "object" ? Or(i, e, t) : ((n, s, r) => {
|
|
630
638
|
const a = s.hasOwnProperty(r);
|
|
631
639
|
return s.constructor.createProperty(r, a ? { ...n, wrapped: !0 } : n), a ? Object.getOwnPropertyDescriptor(s, r) : void 0;
|
|
632
640
|
})(i, e, t);
|
|
@@ -636,7 +644,15 @@ function V(i) {
|
|
|
636
644
|
* Copyright 2017 Google LLC
|
|
637
645
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
638
646
|
*/
|
|
639
|
-
|
|
647
|
+
function gt(i) {
|
|
648
|
+
return V({ ...i, state: !0, attribute: !1 });
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* @license
|
|
652
|
+
* Copyright 2017 Google LLC
|
|
653
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
654
|
+
*/
|
|
655
|
+
const is = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
|
|
640
656
|
/**
|
|
641
657
|
* @license
|
|
642
658
|
* Copyright 2017 Google LLC
|
|
@@ -657,12 +673,12 @@ function An(i, e) {
|
|
|
657
673
|
this[l] = d;
|
|
658
674
|
} };
|
|
659
675
|
})();
|
|
660
|
-
return
|
|
676
|
+
return is(t, n, { get() {
|
|
661
677
|
let l = a.call(this);
|
|
662
678
|
return l === void 0 && (l = r(this), (l !== null || this.hasUpdated) && o.call(this, l)), l;
|
|
663
679
|
} });
|
|
664
680
|
}
|
|
665
|
-
return
|
|
681
|
+
return is(t, n, { get() {
|
|
666
682
|
return r(this);
|
|
667
683
|
} });
|
|
668
684
|
};
|
|
@@ -673,34 +689,33 @@ function An(i, e) {
|
|
|
673
689
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
674
690
|
*/
|
|
675
691
|
const In = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, On = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
676
|
-
|
|
677
|
-
constructor(
|
|
692
|
+
let Mn = class {
|
|
693
|
+
constructor(i) {
|
|
678
694
|
}
|
|
679
695
|
get _$AU() {
|
|
680
696
|
return this._$AM._$AU;
|
|
681
697
|
}
|
|
682
|
-
_$AT(e, t
|
|
683
|
-
this._$Ct =
|
|
698
|
+
_$AT(i, e, t) {
|
|
699
|
+
this._$Ct = i, this._$AM = e, this._$Ci = t;
|
|
684
700
|
}
|
|
685
|
-
_$AS(
|
|
686
|
-
return this.update(
|
|
701
|
+
_$AS(i, e) {
|
|
702
|
+
return this.update(i, e);
|
|
687
703
|
}
|
|
688
|
-
update(
|
|
689
|
-
return this.render(...
|
|
704
|
+
update(i, e) {
|
|
705
|
+
return this.render(...e);
|
|
690
706
|
}
|
|
691
|
-
}
|
|
692
|
-
const Se = nt`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-20{max-height:5rem}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-0{padding:0}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #0B64F4);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
|
|
707
|
+
};
|
|
693
708
|
/**
|
|
694
709
|
* @license
|
|
695
710
|
* Copyright 2020 Google LLC
|
|
696
711
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
712
|
*/
|
|
698
|
-
const { I:
|
|
713
|
+
const { I: Mr } = Cr, ss = () => document.createComment(""), vt = (i, e, t) => {
|
|
699
714
|
var n;
|
|
700
715
|
const s = i._$AA.parentNode, r = e === void 0 ? i._$AB : e._$AA;
|
|
701
716
|
if (t === void 0) {
|
|
702
|
-
const a = s.insertBefore(
|
|
703
|
-
t = new
|
|
717
|
+
const a = s.insertBefore(ss(), r), o = s.insertBefore(ss(), r);
|
|
718
|
+
t = new Mr(a, o, i, i.options);
|
|
704
719
|
} else {
|
|
705
720
|
const a = t._$AB.nextSibling, o = t._$AM, l = o !== i;
|
|
706
721
|
if (l) {
|
|
@@ -710,13 +725,13 @@ const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
|
|
|
710
725
|
if (a !== r || l) {
|
|
711
726
|
let d = t._$AA;
|
|
712
727
|
for (; d !== a; ) {
|
|
713
|
-
const
|
|
714
|
-
s.insertBefore(d, r), d =
|
|
728
|
+
const u = d.nextSibling;
|
|
729
|
+
s.insertBefore(d, r), d = u;
|
|
715
730
|
}
|
|
716
731
|
}
|
|
717
732
|
}
|
|
718
733
|
return t;
|
|
719
|
-
}, Ue = (i, e, t = i) => (i._$AI(e, t), i),
|
|
734
|
+
}, Ue = (i, e, t = i) => (i._$AI(e, t), i), Rr = {}, Nr = (i, e = Rr) => i._$AH = e, Pr = (i) => i._$AH, ei = (i) => {
|
|
720
735
|
var e;
|
|
721
736
|
(e = i._$AP) == null || e.call(i, !1, !0);
|
|
722
737
|
let t = i._$AA;
|
|
@@ -731,7 +746,7 @@ const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
|
|
|
731
746
|
* Copyright 2017 Google LLC
|
|
732
747
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
733
748
|
*/
|
|
734
|
-
const
|
|
749
|
+
const rs = (i, e, t) => {
|
|
735
750
|
const n = /* @__PURE__ */ new Map();
|
|
736
751
|
for (let s = e; s <= t; s++)
|
|
737
752
|
n.set(i[s], s);
|
|
@@ -754,57 +769,164 @@ const ss = (i, e, t) => {
|
|
|
754
769
|
return this.dt(i, e, t).values;
|
|
755
770
|
}
|
|
756
771
|
update(i, [e, t, n]) {
|
|
757
|
-
const s =
|
|
772
|
+
const s = Pr(i), { values: r, keys: a } = this.dt(e, t, n);
|
|
758
773
|
if (!Array.isArray(s))
|
|
759
774
|
return this.ut = a, r;
|
|
760
775
|
const o = this.ut ?? (this.ut = []), l = [];
|
|
761
|
-
let d,
|
|
762
|
-
for (; p <= c &&
|
|
776
|
+
let d, u, p = 0, c = s.length - 1, g = 0, O = r.length - 1;
|
|
777
|
+
for (; p <= c && g <= O; )
|
|
763
778
|
if (s[p] === null)
|
|
764
779
|
p++;
|
|
765
780
|
else if (s[c] === null)
|
|
766
781
|
c--;
|
|
767
|
-
else if (o[p] === a[
|
|
768
|
-
l[
|
|
782
|
+
else if (o[p] === a[g])
|
|
783
|
+
l[g] = Ue(s[p], r[g]), p++, g++;
|
|
769
784
|
else if (o[c] === a[O])
|
|
770
785
|
l[O] = Ue(s[c], r[O]), c--, O--;
|
|
771
786
|
else if (o[p] === a[O])
|
|
772
787
|
l[O] = Ue(s[p], r[O]), vt(i, l[O + 1], s[p]), p++, O--;
|
|
773
|
-
else if (o[c] === a[
|
|
774
|
-
l[
|
|
775
|
-
else if (d === void 0 && (d =
|
|
788
|
+
else if (o[c] === a[g])
|
|
789
|
+
l[g] = Ue(s[c], r[g]), vt(i, s[p], s[c]), c--, g++;
|
|
790
|
+
else if (d === void 0 && (d = rs(a, g, O), u = rs(o, p, c)), d.has(o[p]))
|
|
776
791
|
if (d.has(o[c])) {
|
|
777
|
-
const H =
|
|
792
|
+
const H = u.get(a[g]), J = H !== void 0 ? s[H] : null;
|
|
778
793
|
if (J === null) {
|
|
779
794
|
const Ce = vt(i, s[p]);
|
|
780
|
-
Ue(Ce, r[
|
|
795
|
+
Ue(Ce, r[g]), l[g] = Ce;
|
|
781
796
|
} else
|
|
782
|
-
l[
|
|
783
|
-
|
|
797
|
+
l[g] = Ue(J, r[g]), vt(i, s[p], J), s[H] = null;
|
|
798
|
+
g++;
|
|
784
799
|
} else
|
|
785
800
|
ei(s[c]), c--;
|
|
786
801
|
else
|
|
787
802
|
ei(s[p]), p++;
|
|
788
|
-
for (;
|
|
803
|
+
for (; g <= O; ) {
|
|
789
804
|
const H = vt(i, l[O + 1]);
|
|
790
|
-
Ue(H, r[
|
|
805
|
+
Ue(H, r[g]), l[g++] = H;
|
|
791
806
|
}
|
|
792
807
|
for (; p <= c; ) {
|
|
793
808
|
const H = s[p++];
|
|
794
809
|
H !== null && ei(H);
|
|
795
810
|
}
|
|
796
|
-
return this.ut = a,
|
|
811
|
+
return this.ut = a, Nr(i, l), fe;
|
|
797
812
|
}
|
|
798
|
-
});
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
813
|
+
}), Se = nt`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-20{max-height:5rem}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-0{padding:0}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #0B64F4);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
|
|
814
|
+
var jr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Rn = (i, e, t, n) => {
|
|
815
|
+
for (var s = n > 1 ? void 0 : n ? zr(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
816
|
+
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
817
|
+
return n && s && jr(e, t, s), s;
|
|
818
|
+
};
|
|
819
|
+
let dt = class extends ne {
|
|
820
|
+
constructor() {
|
|
821
|
+
super(...arguments), this.activeIndex = 0, this.items = [];
|
|
822
|
+
}
|
|
823
|
+
render() {
|
|
824
|
+
return z`
|
|
825
|
+
<div>
|
|
826
|
+
<div
|
|
827
|
+
id="carousel"
|
|
828
|
+
class="flex overflow-x-auto snap-x snap-mandatory overflow-scrolling-touch m-0 p-0"
|
|
829
|
+
@scroll="${this.onScroll}"
|
|
830
|
+
>
|
|
831
|
+
<slot @slotchange=${this.onSlotChange}>zzz</slot>
|
|
832
|
+
</div>
|
|
833
|
+
|
|
834
|
+
<div class="flex justify-between items-center">
|
|
835
|
+
<button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(-1)}>
|
|
836
|
+
|
|
837
|
+
<svg
|
|
838
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
839
|
+
viewBox="0 0 24 24"
|
|
840
|
+
width="100%"
|
|
841
|
+
height="100%"
|
|
842
|
+
fill="currentColor"
|
|
843
|
+
>
|
|
844
|
+
<title>arrow-left</title>
|
|
845
|
+
<path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
|
|
846
|
+
</svg>
|
|
847
|
+
</button>
|
|
848
|
+
|
|
849
|
+
<div class="flex justify-center space-x-2">
|
|
850
|
+
${Is(this.items, (i, e) => e, (i, e) => z`
|
|
851
|
+
<span
|
|
852
|
+
class="h-2.5 w-2.5 bg-gray-400 rounded-full inline-block ${this.activeIndex === e ? "bg-gray-600" : ""}"
|
|
853
|
+
@click=${() => this.scrollToIndex(e)}
|
|
854
|
+
/>
|
|
855
|
+
`)}
|
|
856
|
+
</div>
|
|
857
|
+
|
|
858
|
+
<button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(1)}>
|
|
859
|
+
<svg
|
|
860
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
861
|
+
viewBox="0 0 24 24"
|
|
862
|
+
width="100%"
|
|
863
|
+
height="100%"
|
|
864
|
+
fill="currentColor"
|
|
865
|
+
>
|
|
866
|
+
<title>arrow-right</title>
|
|
867
|
+
<path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
|
|
868
|
+
</svg>
|
|
869
|
+
</button>
|
|
870
|
+
</div>
|
|
871
|
+
</div>
|
|
872
|
+
`;
|
|
873
|
+
}
|
|
874
|
+
onSlotChange(i) {
|
|
875
|
+
const e = i.target;
|
|
876
|
+
this.items = (e == null ? void 0 : e.assignedElements()) || [];
|
|
877
|
+
}
|
|
878
|
+
onScroll() {
|
|
879
|
+
const { carousel: i } = this;
|
|
880
|
+
if (!i)
|
|
881
|
+
return;
|
|
882
|
+
let e = 0, t = 1 / 0;
|
|
883
|
+
this.items.forEach((n, s) => {
|
|
884
|
+
const r = Math.abs(n.offsetLeft - i.scrollLeft);
|
|
885
|
+
r < t && (t = r, e = s);
|
|
886
|
+
}), this.activeIndex = e;
|
|
887
|
+
}
|
|
888
|
+
scrollCarousel(i) {
|
|
889
|
+
this.scrollToIndex(this.activeIndex + i);
|
|
890
|
+
}
|
|
891
|
+
scrollToIndex(i) {
|
|
892
|
+
i !== this.activeIndex && (this.activeIndex = Math.max(0, Math.min(i, this.items.length - 1)), this.scrollToActiveItem());
|
|
893
|
+
}
|
|
894
|
+
scrollToActiveItem() {
|
|
895
|
+
const { carousel: i, items: e, activeIndex: t } = this;
|
|
896
|
+
if (!i)
|
|
897
|
+
return;
|
|
898
|
+
const n = e[t];
|
|
899
|
+
n && i.scrollTo({
|
|
900
|
+
left: n.offsetLeft - i.clientWidth / 2 + n.clientWidth / 2,
|
|
901
|
+
behavior: "smooth"
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
dt.styles = [Se, nt`
|
|
906
|
+
::slotted(div) {
|
|
907
|
+
flex: 0 0 auto;
|
|
908
|
+
scroll-snap-align: start;
|
|
909
|
+
width: 100%;
|
|
910
|
+
padding: 1rem;
|
|
911
|
+
background-color: #f8f9fa;
|
|
912
|
+
border: 1px solid rgba(0, 0, 0, 0.125);
|
|
913
|
+
border-radius: 0.25rem;
|
|
914
|
+
margin-right: 1rem;
|
|
915
|
+
}
|
|
916
|
+
`];
|
|
917
|
+
Rn([
|
|
918
|
+
V({ type: Number })
|
|
919
|
+
], dt.prototype, "activeIndex", 2);
|
|
920
|
+
Rn([
|
|
921
|
+
V({ type: Array })
|
|
922
|
+
], dt.prototype, "items", 2);
|
|
923
|
+
Rn([
|
|
924
|
+
An("#carousel")
|
|
925
|
+
], dt.prototype, "carousel", 2);
|
|
926
|
+
dt = Rn([
|
|
927
|
+
Ee("iai-chat-carousel")
|
|
928
|
+
], dt);
|
|
929
|
+
function Zr(i) {
|
|
808
930
|
if (Array.isArray(i)) {
|
|
809
931
|
for (var e = 0, t = Array(i.length); e < i.length; e++)
|
|
810
932
|
t[e] = i[e];
|
|
@@ -812,34 +934,34 @@ function jr(i) {
|
|
|
812
934
|
} else
|
|
813
935
|
return Array.from(i);
|
|
814
936
|
}
|
|
815
|
-
var
|
|
937
|
+
var fi = !1;
|
|
816
938
|
if (typeof window < "u") {
|
|
817
939
|
var as = {
|
|
818
940
|
get passive() {
|
|
819
|
-
|
|
941
|
+
fi = !0;
|
|
820
942
|
}
|
|
821
943
|
};
|
|
822
944
|
window.addEventListener("testPassive", null, as), window.removeEventListener("testPassive", null, as);
|
|
823
945
|
}
|
|
824
|
-
var
|
|
946
|
+
var un = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Fe = [], hn = !1, Os = -1, xt = void 0, He = void 0, _t = void 0, Ms = function(i) {
|
|
825
947
|
return Fe.some(function(e) {
|
|
826
948
|
return !!(e.options.allowTouchMove && e.options.allowTouchMove(i));
|
|
827
949
|
});
|
|
828
950
|
}, yi = function(i) {
|
|
829
951
|
var e = i || window.event;
|
|
830
952
|
return Ms(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
831
|
-
},
|
|
832
|
-
if (
|
|
953
|
+
}, Lr = function(i) {
|
|
954
|
+
if (_t === void 0) {
|
|
833
955
|
var e = !!i && i.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
|
|
834
956
|
if (e && t > 0) {
|
|
835
957
|
var n = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
836
|
-
|
|
958
|
+
_t = document.body.style.paddingRight, document.body.style.paddingRight = n + t + "px";
|
|
837
959
|
}
|
|
838
960
|
}
|
|
839
961
|
xt === void 0 && (xt = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
840
|
-
},
|
|
841
|
-
|
|
842
|
-
},
|
|
962
|
+
}, Dr = function() {
|
|
963
|
+
_t !== void 0 && (document.body.style.paddingRight = _t, _t = void 0), xt !== void 0 && (document.body.style.overflow = xt, xt = void 0);
|
|
964
|
+
}, Ur = function() {
|
|
843
965
|
return window.requestAnimationFrame(function() {
|
|
844
966
|
if (He === void 0) {
|
|
845
967
|
He = {
|
|
@@ -856,17 +978,17 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
856
978
|
}, 300);
|
|
857
979
|
}
|
|
858
980
|
});
|
|
859
|
-
},
|
|
981
|
+
}, Hr = function() {
|
|
860
982
|
if (He !== void 0) {
|
|
861
983
|
var i = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
862
984
|
document.body.style.position = He.position, document.body.style.top = He.top, document.body.style.left = He.left, window.scrollTo(e, i), He = void 0;
|
|
863
985
|
}
|
|
864
|
-
},
|
|
986
|
+
}, Br = function(i) {
|
|
865
987
|
return i ? i.scrollHeight - i.scrollTop <= i.clientHeight : !1;
|
|
866
|
-
},
|
|
988
|
+
}, Wr = function(i, e) {
|
|
867
989
|
var t = i.targetTouches[0].clientY - Os;
|
|
868
|
-
return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 ||
|
|
869
|
-
},
|
|
990
|
+
return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Br(e) && t < 0 ? yi(i) : (i.stopPropagation(), !0);
|
|
991
|
+
}, Fr = function(i, e) {
|
|
870
992
|
if (!i) {
|
|
871
993
|
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
872
994
|
return;
|
|
@@ -878,11 +1000,11 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
878
1000
|
targetElement: i,
|
|
879
1001
|
options: e || {}
|
|
880
1002
|
};
|
|
881
|
-
Fe = [].concat(
|
|
1003
|
+
Fe = [].concat(Zr(Fe), [t]), un ? Ur() : Lr(e), un && (i.ontouchstart = function(n) {
|
|
882
1004
|
n.targetTouches.length === 1 && (Os = n.targetTouches[0].clientY);
|
|
883
1005
|
}, i.ontouchmove = function(n) {
|
|
884
|
-
n.targetTouches.length === 1 &&
|
|
885
|
-
},
|
|
1006
|
+
n.targetTouches.length === 1 && Wr(n, i);
|
|
1007
|
+
}, hn || (document.addEventListener("touchmove", yi, fi ? { passive: !1 } : void 0), hn = !0));
|
|
886
1008
|
}
|
|
887
1009
|
}, os = function(i) {
|
|
888
1010
|
if (!i) {
|
|
@@ -891,16 +1013,8 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
891
1013
|
}
|
|
892
1014
|
Fe = Fe.filter(function(e) {
|
|
893
1015
|
return e.targetElement !== i;
|
|
894
|
-
}),
|
|
1016
|
+
}), un && (i.ontouchstart = null, i.ontouchmove = null, hn && Fe.length === 0 && (document.removeEventListener("touchmove", yi, fi ? { passive: !1 } : void 0), hn = !1)), un ? Hr() : Dr();
|
|
895
1017
|
};
|
|
896
|
-
/**
|
|
897
|
-
* @license
|
|
898
|
-
* Copyright 2017 Google LLC
|
|
899
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
900
|
-
*/
|
|
901
|
-
function ft(i) {
|
|
902
|
-
return V({ ...i, state: !0, attribute: !1 });
|
|
903
|
-
}
|
|
904
1018
|
/**
|
|
905
1019
|
* @license
|
|
906
1020
|
* Copyright 2018 Google LLC
|
|
@@ -930,7 +1044,7 @@ const ls = On(class extends Mn {
|
|
|
930
1044
|
const a = !!e[r];
|
|
931
1045
|
a === this.st.has(r) || (n = this.nt) != null && n.has(r) || (a ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
|
|
932
1046
|
}
|
|
933
|
-
return
|
|
1047
|
+
return fe;
|
|
934
1048
|
}
|
|
935
1049
|
});
|
|
936
1050
|
/**
|
|
@@ -938,7 +1052,7 @@ const ls = On(class extends Mn {
|
|
|
938
1052
|
* Copyright 2018 Google LLC
|
|
939
1053
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
940
1054
|
*/
|
|
941
|
-
const Rs = "important",
|
|
1055
|
+
const Rs = "important", Vr = " !" + Rs, Ve = On(class extends Mn {
|
|
942
1056
|
constructor(i) {
|
|
943
1057
|
var e;
|
|
944
1058
|
if (super(i), i.type !== In.ATTRIBUTE || i.name !== "style" || ((e = i.strings) == null ? void 0 : e.length) > 2)
|
|
@@ -960,14 +1074,14 @@ const Rs = "important", Wr = " !" + Rs, Ve = On(class extends Mn {
|
|
|
960
1074
|
const s = e[n];
|
|
961
1075
|
if (s != null) {
|
|
962
1076
|
this.ft.add(n);
|
|
963
|
-
const r = typeof s == "string" && s.endsWith(
|
|
1077
|
+
const r = typeof s == "string" && s.endsWith(Vr);
|
|
964
1078
|
n.includes("-") || r ? t.setProperty(n, r ? s.slice(0, -11) : s, r ? Rs : "") : t[n] = s;
|
|
965
1079
|
}
|
|
966
1080
|
}
|
|
967
|
-
return
|
|
1081
|
+
return fe;
|
|
968
1082
|
}
|
|
969
1083
|
});
|
|
970
|
-
function
|
|
1084
|
+
function qr(i) {
|
|
971
1085
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
972
1086
|
}
|
|
973
1087
|
var vi = {};
|
|
@@ -975,58 +1089,58 @@ var vi = {};
|
|
|
975
1089
|
function e(o) {
|
|
976
1090
|
o && o.options && clearTimeout(o.options.timer);
|
|
977
1091
|
}
|
|
978
|
-
function t(o, l, d,
|
|
1092
|
+
function t(o, l, d, u) {
|
|
979
1093
|
var p = { timer: void 0, lastArgs: [] }, c = function() {
|
|
980
|
-
for (var
|
|
1094
|
+
for (var g = this, O = [], H = 0; H < arguments.length; H++)
|
|
981
1095
|
O[H] = arguments[H];
|
|
982
1096
|
p.lastArgs = O, p.timer ? clearTimeout(p.timer) : l && d.apply(this, p.lastArgs), p.timer = setTimeout(function() {
|
|
983
|
-
l || d.apply(
|
|
1097
|
+
l || d.apply(g, p.lastArgs), p.timer = void 0;
|
|
984
1098
|
}, o);
|
|
985
1099
|
};
|
|
986
|
-
return
|
|
1100
|
+
return u && (c = c.bind(u)), c.options = p, c;
|
|
987
1101
|
}
|
|
988
|
-
function n(o, l, d,
|
|
1102
|
+
function n(o, l, d, u) {
|
|
989
1103
|
var p;
|
|
990
|
-
Object.defineProperty(d,
|
|
1104
|
+
Object.defineProperty(d, u, { configurable: !0, enumerable: !1, get: function() {
|
|
991
1105
|
return p;
|
|
992
1106
|
}, set: function(c) {
|
|
993
1107
|
p = t(o, l, c, this);
|
|
994
1108
|
} });
|
|
995
1109
|
}
|
|
996
1110
|
function s(o, l, d) {
|
|
997
|
-
var
|
|
998
|
-
return d.value = t(o, l,
|
|
1111
|
+
var u = d.value;
|
|
1112
|
+
return d.value = t(o, l, u), d;
|
|
999
1113
|
}
|
|
1000
1114
|
function r(o, l) {
|
|
1001
|
-
for (var d = [],
|
|
1002
|
-
d[
|
|
1115
|
+
for (var d = [], u = 2; u < arguments.length; u++)
|
|
1116
|
+
d[u - 2] = arguments[u];
|
|
1003
1117
|
if (d.length === 0)
|
|
1004
1118
|
throw new Error("function applied debounce decorator should be a method");
|
|
1005
1119
|
if (d.length === 1)
|
|
1006
1120
|
throw new Error("method applied debounce decorator should have valid name");
|
|
1007
|
-
var p = d[0], c = d[1],
|
|
1008
|
-
if (
|
|
1009
|
-
return s(o, l,
|
|
1121
|
+
var p = d[0], c = d[1], g = d.length === 3 && d[2] ? d[2] : Object.getOwnPropertyDescriptor(p, c);
|
|
1122
|
+
if (g)
|
|
1123
|
+
return s(o, l, g);
|
|
1010
1124
|
n(o, l, p, c);
|
|
1011
1125
|
}
|
|
1012
1126
|
function a() {
|
|
1013
1127
|
for (var o = [], l = 0; l < arguments.length; l++)
|
|
1014
1128
|
o[l] = arguments[l];
|
|
1015
|
-
var d = 500,
|
|
1129
|
+
var d = 500, u = !1;
|
|
1016
1130
|
if (o.length && (typeof o[0] == "number" || typeof o[0] == "object" && o[0].leading !== void 0)) {
|
|
1017
1131
|
typeof o[0] == "number" && (d = o[0]);
|
|
1018
1132
|
var p = void 0;
|
|
1019
|
-
return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (
|
|
1020
|
-
for (var c = [],
|
|
1021
|
-
c[
|
|
1022
|
-
return r.apply(void 0, [d,
|
|
1133
|
+
return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (u = p.leading), function() {
|
|
1134
|
+
for (var c = [], g = 0; g < arguments.length; g++)
|
|
1135
|
+
c[g] = arguments[g];
|
|
1136
|
+
return r.apply(void 0, [d, u].concat(c));
|
|
1023
1137
|
};
|
|
1024
1138
|
}
|
|
1025
|
-
return r.apply(void 0, [d,
|
|
1139
|
+
return r.apply(void 0, [d, u].concat(o));
|
|
1026
1140
|
}
|
|
1027
1141
|
Object.defineProperty(i, "__esModule", { value: !0 }), i.cancel = e, i.debounce = a;
|
|
1028
1142
|
})(vi);
|
|
1029
|
-
var
|
|
1143
|
+
var P;
|
|
1030
1144
|
(function(i) {
|
|
1031
1145
|
i.assertEqual = (s) => s;
|
|
1032
1146
|
function e(s) {
|
|
@@ -1061,7 +1175,7 @@ var N;
|
|
|
1061
1175
|
return s.map((a) => typeof a == "string" ? `'${a}'` : a).join(r);
|
|
1062
1176
|
}
|
|
1063
1177
|
i.joinValues = n, i.jsonStringifyReplacer = (s, r) => typeof r == "bigint" ? r.toString() : r;
|
|
1064
|
-
})(
|
|
1178
|
+
})(P || (P = {}));
|
|
1065
1179
|
var ii;
|
|
1066
1180
|
(function(i) {
|
|
1067
1181
|
i.mergeShapes = (e, t) => ({
|
|
@@ -1070,7 +1184,7 @@ var ii;
|
|
|
1070
1184
|
// second overwrites first
|
|
1071
1185
|
});
|
|
1072
1186
|
})(ii || (ii = {}));
|
|
1073
|
-
const
|
|
1187
|
+
const f = P.arrayToEnum([
|
|
1074
1188
|
"string",
|
|
1075
1189
|
"nan",
|
|
1076
1190
|
"number",
|
|
@@ -1094,25 +1208,25 @@ const g = N.arrayToEnum([
|
|
|
1094
1208
|
]), Me = (i) => {
|
|
1095
1209
|
switch (typeof i) {
|
|
1096
1210
|
case "undefined":
|
|
1097
|
-
return
|
|
1211
|
+
return f.undefined;
|
|
1098
1212
|
case "string":
|
|
1099
|
-
return
|
|
1213
|
+
return f.string;
|
|
1100
1214
|
case "number":
|
|
1101
|
-
return isNaN(i) ?
|
|
1215
|
+
return isNaN(i) ? f.nan : f.number;
|
|
1102
1216
|
case "boolean":
|
|
1103
|
-
return
|
|
1217
|
+
return f.boolean;
|
|
1104
1218
|
case "function":
|
|
1105
|
-
return
|
|
1219
|
+
return f.function;
|
|
1106
1220
|
case "bigint":
|
|
1107
|
-
return
|
|
1221
|
+
return f.bigint;
|
|
1108
1222
|
case "symbol":
|
|
1109
|
-
return
|
|
1223
|
+
return f.symbol;
|
|
1110
1224
|
case "object":
|
|
1111
|
-
return Array.isArray(i) ?
|
|
1225
|
+
return Array.isArray(i) ? f.array : i === null ? f.null : i.then && typeof i.then == "function" && i.catch && typeof i.catch == "function" ? f.promise : typeof Map < "u" && i instanceof Map ? f.map : typeof Set < "u" && i instanceof Set ? f.set : typeof Date < "u" && i instanceof Date ? f.date : f.object;
|
|
1112
1226
|
default:
|
|
1113
|
-
return
|
|
1227
|
+
return f.unknown;
|
|
1114
1228
|
}
|
|
1115
|
-
}, m =
|
|
1229
|
+
}, m = P.arrayToEnum([
|
|
1116
1230
|
"invalid_type",
|
|
1117
1231
|
"invalid_literal",
|
|
1118
1232
|
"custom",
|
|
@@ -1129,7 +1243,7 @@ const g = N.arrayToEnum([
|
|
|
1129
1243
|
"invalid_intersection_types",
|
|
1130
1244
|
"not_multiple_of",
|
|
1131
1245
|
"not_finite"
|
|
1132
|
-
]),
|
|
1246
|
+
]), Kr = (i) => JSON.stringify(i, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
1133
1247
|
class le extends Error {
|
|
1134
1248
|
constructor(e) {
|
|
1135
1249
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -1170,7 +1284,7 @@ class le extends Error {
|
|
|
1170
1284
|
return this.message;
|
|
1171
1285
|
}
|
|
1172
1286
|
get message() {
|
|
1173
|
-
return JSON.stringify(this.issues,
|
|
1287
|
+
return JSON.stringify(this.issues, P.jsonStringifyReplacer, 2);
|
|
1174
1288
|
}
|
|
1175
1289
|
get isEmpty() {
|
|
1176
1290
|
return this.issues.length === 0;
|
|
@@ -1190,22 +1304,22 @@ const It = (i, e) => {
|
|
|
1190
1304
|
let t;
|
|
1191
1305
|
switch (i.code) {
|
|
1192
1306
|
case m.invalid_type:
|
|
1193
|
-
i.received ===
|
|
1307
|
+
i.received === f.undefined ? t = "Required" : t = `Expected ${i.expected}, received ${i.received}`;
|
|
1194
1308
|
break;
|
|
1195
1309
|
case m.invalid_literal:
|
|
1196
|
-
t = `Invalid literal value, expected ${JSON.stringify(i.expected,
|
|
1310
|
+
t = `Invalid literal value, expected ${JSON.stringify(i.expected, P.jsonStringifyReplacer)}`;
|
|
1197
1311
|
break;
|
|
1198
1312
|
case m.unrecognized_keys:
|
|
1199
|
-
t = `Unrecognized key(s) in object: ${
|
|
1313
|
+
t = `Unrecognized key(s) in object: ${P.joinValues(i.keys, ", ")}`;
|
|
1200
1314
|
break;
|
|
1201
1315
|
case m.invalid_union:
|
|
1202
1316
|
t = "Invalid input";
|
|
1203
1317
|
break;
|
|
1204
1318
|
case m.invalid_union_discriminator:
|
|
1205
|
-
t = `Invalid discriminator value. Expected ${
|
|
1319
|
+
t = `Invalid discriminator value. Expected ${P.joinValues(i.options)}`;
|
|
1206
1320
|
break;
|
|
1207
1321
|
case m.invalid_enum_value:
|
|
1208
|
-
t = `Invalid enum value. Expected ${
|
|
1322
|
+
t = `Invalid enum value. Expected ${P.joinValues(i.options)}, received '${i.received}'`;
|
|
1209
1323
|
break;
|
|
1210
1324
|
case m.invalid_arguments:
|
|
1211
1325
|
t = "Invalid function arguments";
|
|
@@ -1217,7 +1331,7 @@ const It = (i, e) => {
|
|
|
1217
1331
|
t = "Invalid date";
|
|
1218
1332
|
break;
|
|
1219
1333
|
case m.invalid_string:
|
|
1220
|
-
typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` :
|
|
1334
|
+
typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : P.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
|
|
1221
1335
|
break;
|
|
1222
1336
|
case m.too_small:
|
|
1223
1337
|
i.type === "array" ? t = `Array must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "more than"} ${i.minimum} element(s)` : i.type === "string" ? t = `String must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "over"} ${i.minimum} character(s)` : i.type === "number" ? t = `Number must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${i.minimum}` : i.type === "date" ? t = `Date must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(i.minimum))}` : t = "Invalid input";
|
|
@@ -1238,16 +1352,16 @@ const It = (i, e) => {
|
|
|
1238
1352
|
t = "Number must be finite";
|
|
1239
1353
|
break;
|
|
1240
1354
|
default:
|
|
1241
|
-
t = e.defaultError,
|
|
1355
|
+
t = e.defaultError, P.assertNever(i);
|
|
1242
1356
|
}
|
|
1243
1357
|
return { message: t };
|
|
1244
1358
|
};
|
|
1245
|
-
let
|
|
1246
|
-
function
|
|
1247
|
-
|
|
1359
|
+
let Ns = It;
|
|
1360
|
+
function Jr(i) {
|
|
1361
|
+
Ns = i;
|
|
1248
1362
|
}
|
|
1249
1363
|
function pn() {
|
|
1250
|
-
return
|
|
1364
|
+
return Ns;
|
|
1251
1365
|
}
|
|
1252
1366
|
const mn = (i) => {
|
|
1253
1367
|
const { data: e, path: t, errorMaps: n, issueData: s } = i, r = [...t, ...s.path || []], a = {
|
|
@@ -1263,7 +1377,7 @@ const mn = (i) => {
|
|
|
1263
1377
|
path: r,
|
|
1264
1378
|
message: s.message || o
|
|
1265
1379
|
};
|
|
1266
|
-
},
|
|
1380
|
+
}, Qr = [];
|
|
1267
1381
|
function y(i, e) {
|
|
1268
1382
|
const t = mn({
|
|
1269
1383
|
issueData: e,
|
|
@@ -1279,7 +1393,7 @@ function y(i, e) {
|
|
|
1279
1393
|
});
|
|
1280
1394
|
i.common.issues.push(t);
|
|
1281
1395
|
}
|
|
1282
|
-
class
|
|
1396
|
+
class G {
|
|
1283
1397
|
constructor() {
|
|
1284
1398
|
this.value = "valid";
|
|
1285
1399
|
}
|
|
@@ -1305,7 +1419,7 @@ class Y {
|
|
|
1305
1419
|
key: await s.key,
|
|
1306
1420
|
value: await s.value
|
|
1307
1421
|
});
|
|
1308
|
-
return
|
|
1422
|
+
return G.mergeObjectSync(e, n);
|
|
1309
1423
|
}
|
|
1310
1424
|
static mergeObjectSync(e, t) {
|
|
1311
1425
|
const n = {};
|
|
@@ -1320,7 +1434,7 @@ class Y {
|
|
|
1320
1434
|
}
|
|
1321
1435
|
const S = Object.freeze({
|
|
1322
1436
|
status: "aborted"
|
|
1323
|
-
}),
|
|
1437
|
+
}), Ps = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }), si = (i) => i.status === "aborted", ri = (i) => i.status === "dirty", Ot = (i) => i.status === "valid", gn = (i) => typeof Promise < "u" && i instanceof Promise;
|
|
1324
1438
|
var x;
|
|
1325
1439
|
(function(i) {
|
|
1326
1440
|
i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
@@ -1378,7 +1492,7 @@ class I {
|
|
|
1378
1492
|
}
|
|
1379
1493
|
_processInputParams(e) {
|
|
1380
1494
|
return {
|
|
1381
|
-
status: new
|
|
1495
|
+
status: new G(),
|
|
1382
1496
|
ctx: {
|
|
1383
1497
|
common: e.parent.common,
|
|
1384
1498
|
data: e.data,
|
|
@@ -1391,7 +1505,7 @@ class I {
|
|
|
1391
1505
|
}
|
|
1392
1506
|
_parseSync(e) {
|
|
1393
1507
|
const t = this._parse(e);
|
|
1394
|
-
if (
|
|
1508
|
+
if (gn(t))
|
|
1395
1509
|
throw new Error("Synchronous parse encountered promise.");
|
|
1396
1510
|
return t;
|
|
1397
1511
|
}
|
|
@@ -1439,7 +1553,7 @@ class I {
|
|
|
1439
1553
|
parent: null,
|
|
1440
1554
|
data: e,
|
|
1441
1555
|
parsedType: Me(e)
|
|
1442
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), r = await (
|
|
1556
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), r = await (gn(s) ? s : Promise.resolve(s));
|
|
1443
1557
|
return cs(n, r);
|
|
1444
1558
|
}
|
|
1445
1559
|
refine(e, t) {
|
|
@@ -1469,7 +1583,7 @@ class I {
|
|
|
1469
1583
|
return $e.create(this, this._def);
|
|
1470
1584
|
}
|
|
1471
1585
|
nullable() {
|
|
1472
|
-
return
|
|
1586
|
+
return Ge.create(this, this._def);
|
|
1473
1587
|
}
|
|
1474
1588
|
nullish() {
|
|
1475
1589
|
return this.nullable().optional();
|
|
@@ -1481,7 +1595,7 @@ class I {
|
|
|
1481
1595
|
return ht.create(this, this._def);
|
|
1482
1596
|
}
|
|
1483
1597
|
or(e) {
|
|
1484
|
-
return
|
|
1598
|
+
return Pt.create([this, e], this._def);
|
|
1485
1599
|
}
|
|
1486
1600
|
and(e) {
|
|
1487
1601
|
return jt.create(this, e, this._def);
|
|
@@ -1539,27 +1653,27 @@ class I {
|
|
|
1539
1653
|
return this.safeParse(null).success;
|
|
1540
1654
|
}
|
|
1541
1655
|
}
|
|
1542
|
-
const
|
|
1656
|
+
const Yr = /^c[^\s-]{8,}$/i, Gr = /^[a-z][a-z0-9]*$/, Xr = /^[0-9A-HJKMNP-TV-Z]{26}$/, ea = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ta = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, na = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1543
1657
|
let ti;
|
|
1544
|
-
const
|
|
1545
|
-
function
|
|
1546
|
-
return !!((e === "v4" || !e) &&
|
|
1658
|
+
const ia = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, sa = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ra = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
1659
|
+
function aa(i, e) {
|
|
1660
|
+
return !!((e === "v4" || !e) && ia.test(i) || (e === "v6" || !e) && sa.test(i));
|
|
1547
1661
|
}
|
|
1548
1662
|
class oe extends I {
|
|
1549
1663
|
_parse(e) {
|
|
1550
|
-
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !==
|
|
1664
|
+
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
1551
1665
|
const s = this._getOrReturnCtx(e);
|
|
1552
1666
|
return y(
|
|
1553
1667
|
s,
|
|
1554
1668
|
{
|
|
1555
1669
|
code: m.invalid_type,
|
|
1556
|
-
expected:
|
|
1670
|
+
expected: f.string,
|
|
1557
1671
|
received: s.parsedType
|
|
1558
1672
|
}
|
|
1559
1673
|
//
|
|
1560
1674
|
), S;
|
|
1561
1675
|
}
|
|
1562
|
-
const t = new
|
|
1676
|
+
const t = new G();
|
|
1563
1677
|
let n;
|
|
1564
1678
|
for (const s of this._def.checks)
|
|
1565
1679
|
if (s.kind === "min")
|
|
@@ -1598,25 +1712,25 @@ class oe extends I {
|
|
|
1598
1712
|
message: s.message
|
|
1599
1713
|
}), t.dirty());
|
|
1600
1714
|
} else if (s.kind === "email")
|
|
1601
|
-
|
|
1715
|
+
ta.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1602
1716
|
validation: "email",
|
|
1603
1717
|
code: m.invalid_string,
|
|
1604
1718
|
message: s.message
|
|
1605
1719
|
}), t.dirty());
|
|
1606
1720
|
else if (s.kind === "emoji")
|
|
1607
|
-
ti || (ti = new RegExp(
|
|
1721
|
+
ti || (ti = new RegExp(na, "u")), ti.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1608
1722
|
validation: "emoji",
|
|
1609
1723
|
code: m.invalid_string,
|
|
1610
1724
|
message: s.message
|
|
1611
1725
|
}), t.dirty());
|
|
1612
1726
|
else if (s.kind === "uuid")
|
|
1613
|
-
|
|
1727
|
+
ea.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1614
1728
|
validation: "uuid",
|
|
1615
1729
|
code: m.invalid_string,
|
|
1616
1730
|
message: s.message
|
|
1617
1731
|
}), t.dirty());
|
|
1618
1732
|
else if (s.kind === "cuid")
|
|
1619
|
-
|
|
1733
|
+
Yr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1620
1734
|
validation: "cuid",
|
|
1621
1735
|
code: m.invalid_string,
|
|
1622
1736
|
message: s.message
|
|
@@ -1628,7 +1742,7 @@ class oe extends I {
|
|
|
1628
1742
|
message: s.message
|
|
1629
1743
|
}), t.dirty());
|
|
1630
1744
|
else if (s.kind === "ulid")
|
|
1631
|
-
|
|
1745
|
+
Xr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1632
1746
|
validation: "ulid",
|
|
1633
1747
|
code: m.invalid_string,
|
|
1634
1748
|
message: s.message
|
|
@@ -1660,15 +1774,15 @@ class oe extends I {
|
|
|
1660
1774
|
code: m.invalid_string,
|
|
1661
1775
|
validation: { endsWith: s.value },
|
|
1662
1776
|
message: s.message
|
|
1663
|
-
}), t.dirty()) : s.kind === "datetime" ?
|
|
1777
|
+
}), t.dirty()) : s.kind === "datetime" ? ra(s).test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1664
1778
|
code: m.invalid_string,
|
|
1665
1779
|
validation: "datetime",
|
|
1666
1780
|
message: s.message
|
|
1667
|
-
}), t.dirty()) : s.kind === "ip" ?
|
|
1781
|
+
}), t.dirty()) : s.kind === "ip" ? aa(e.data, s.version) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1668
1782
|
validation: "ip",
|
|
1669
1783
|
code: m.invalid_string,
|
|
1670
1784
|
message: s.message
|
|
1671
|
-
}), t.dirty()) :
|
|
1785
|
+
}), t.dirty()) : P.assertNever(s);
|
|
1672
1786
|
return { status: t.value, value: e.data };
|
|
1673
1787
|
}
|
|
1674
1788
|
_regex(e, t, n) {
|
|
@@ -1846,27 +1960,27 @@ oe.create = (i) => {
|
|
|
1846
1960
|
...A(i)
|
|
1847
1961
|
});
|
|
1848
1962
|
};
|
|
1849
|
-
function
|
|
1963
|
+
function oa(i, e) {
|
|
1850
1964
|
const t = (i.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, r = parseInt(i.toFixed(s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
|
|
1851
1965
|
return r % a / Math.pow(10, s);
|
|
1852
1966
|
}
|
|
1853
|
-
class
|
|
1967
|
+
class Ne extends I {
|
|
1854
1968
|
constructor() {
|
|
1855
1969
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1856
1970
|
}
|
|
1857
1971
|
_parse(e) {
|
|
1858
|
-
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !==
|
|
1972
|
+
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== f.number) {
|
|
1859
1973
|
const s = this._getOrReturnCtx(e);
|
|
1860
1974
|
return y(s, {
|
|
1861
1975
|
code: m.invalid_type,
|
|
1862
|
-
expected:
|
|
1976
|
+
expected: f.number,
|
|
1863
1977
|
received: s.parsedType
|
|
1864
1978
|
}), S;
|
|
1865
1979
|
}
|
|
1866
1980
|
let t;
|
|
1867
|
-
const n = new
|
|
1981
|
+
const n = new G();
|
|
1868
1982
|
for (const s of this._def.checks)
|
|
1869
|
-
s.kind === "int" ?
|
|
1983
|
+
s.kind === "int" ? P.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), y(t, {
|
|
1870
1984
|
code: m.invalid_type,
|
|
1871
1985
|
expected: "integer",
|
|
1872
1986
|
received: "float",
|
|
@@ -1885,14 +1999,14 @@ class Pe extends I {
|
|
|
1885
1999
|
inclusive: s.inclusive,
|
|
1886
2000
|
exact: !1,
|
|
1887
2001
|
message: s.message
|
|
1888
|
-
}), n.dirty()) : s.kind === "multipleOf" ?
|
|
2002
|
+
}), n.dirty()) : s.kind === "multipleOf" ? oa(e.data, s.value) !== 0 && (t = this._getOrReturnCtx(e, t), y(t, {
|
|
1889
2003
|
code: m.not_multiple_of,
|
|
1890
2004
|
multipleOf: s.value,
|
|
1891
2005
|
message: s.message
|
|
1892
2006
|
}), n.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), y(t, {
|
|
1893
2007
|
code: m.not_finite,
|
|
1894
2008
|
message: s.message
|
|
1895
|
-
}), n.dirty()) :
|
|
2009
|
+
}), n.dirty()) : P.assertNever(s);
|
|
1896
2010
|
return { status: n.value, value: e.data };
|
|
1897
2011
|
}
|
|
1898
2012
|
gte(e, t) {
|
|
@@ -1908,7 +2022,7 @@ class Pe extends I {
|
|
|
1908
2022
|
return this.setLimit("max", e, !1, x.toString(t));
|
|
1909
2023
|
}
|
|
1910
2024
|
setLimit(e, t, n, s) {
|
|
1911
|
-
return new
|
|
2025
|
+
return new Ne({
|
|
1912
2026
|
...this._def,
|
|
1913
2027
|
checks: [
|
|
1914
2028
|
...this._def.checks,
|
|
@@ -1922,7 +2036,7 @@ class Pe extends I {
|
|
|
1922
2036
|
});
|
|
1923
2037
|
}
|
|
1924
2038
|
_addCheck(e) {
|
|
1925
|
-
return new
|
|
2039
|
+
return new Ne({
|
|
1926
2040
|
...this._def,
|
|
1927
2041
|
checks: [...this._def.checks, e]
|
|
1928
2042
|
});
|
|
@@ -2004,7 +2118,7 @@ class Pe extends I {
|
|
|
2004
2118
|
return e;
|
|
2005
2119
|
}
|
|
2006
2120
|
get isInt() {
|
|
2007
|
-
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" &&
|
|
2121
|
+
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && P.isInteger(e.value));
|
|
2008
2122
|
}
|
|
2009
2123
|
get isFinite() {
|
|
2010
2124
|
let e = null, t = null;
|
|
@@ -2016,27 +2130,27 @@ class Pe extends I {
|
|
|
2016
2130
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
2017
2131
|
}
|
|
2018
2132
|
}
|
|
2019
|
-
|
|
2133
|
+
Ne.create = (i) => new Ne({
|
|
2020
2134
|
checks: [],
|
|
2021
2135
|
typeName: T.ZodNumber,
|
|
2022
2136
|
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
2023
2137
|
...A(i)
|
|
2024
2138
|
});
|
|
2025
|
-
class
|
|
2139
|
+
class Pe extends I {
|
|
2026
2140
|
constructor() {
|
|
2027
2141
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2028
2142
|
}
|
|
2029
2143
|
_parse(e) {
|
|
2030
|
-
if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !==
|
|
2144
|
+
if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== f.bigint) {
|
|
2031
2145
|
const s = this._getOrReturnCtx(e);
|
|
2032
2146
|
return y(s, {
|
|
2033
2147
|
code: m.invalid_type,
|
|
2034
|
-
expected:
|
|
2148
|
+
expected: f.bigint,
|
|
2035
2149
|
received: s.parsedType
|
|
2036
2150
|
}), S;
|
|
2037
2151
|
}
|
|
2038
2152
|
let t;
|
|
2039
|
-
const n = new
|
|
2153
|
+
const n = new G();
|
|
2040
2154
|
for (const s of this._def.checks)
|
|
2041
2155
|
s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), y(t, {
|
|
2042
2156
|
code: m.too_small,
|
|
@@ -2054,7 +2168,7 @@ class Ne extends I {
|
|
|
2054
2168
|
code: m.not_multiple_of,
|
|
2055
2169
|
multipleOf: s.value,
|
|
2056
2170
|
message: s.message
|
|
2057
|
-
}), n.dirty()) :
|
|
2171
|
+
}), n.dirty()) : P.assertNever(s);
|
|
2058
2172
|
return { status: n.value, value: e.data };
|
|
2059
2173
|
}
|
|
2060
2174
|
gte(e, t) {
|
|
@@ -2070,7 +2184,7 @@ class Ne extends I {
|
|
|
2070
2184
|
return this.setLimit("max", e, !1, x.toString(t));
|
|
2071
2185
|
}
|
|
2072
2186
|
setLimit(e, t, n, s) {
|
|
2073
|
-
return new
|
|
2187
|
+
return new Pe({
|
|
2074
2188
|
...this._def,
|
|
2075
2189
|
checks: [
|
|
2076
2190
|
...this._def.checks,
|
|
@@ -2084,7 +2198,7 @@ class Ne extends I {
|
|
|
2084
2198
|
});
|
|
2085
2199
|
}
|
|
2086
2200
|
_addCheck(e) {
|
|
2087
|
-
return new
|
|
2201
|
+
return new Pe({
|
|
2088
2202
|
...this._def,
|
|
2089
2203
|
checks: [...this._def.checks, e]
|
|
2090
2204
|
});
|
|
@@ -2141,9 +2255,9 @@ class Ne extends I {
|
|
|
2141
2255
|
return e;
|
|
2142
2256
|
}
|
|
2143
2257
|
}
|
|
2144
|
-
|
|
2258
|
+
Pe.create = (i) => {
|
|
2145
2259
|
var e;
|
|
2146
|
-
return new
|
|
2260
|
+
return new Pe({
|
|
2147
2261
|
checks: [],
|
|
2148
2262
|
typeName: T.ZodBigInt,
|
|
2149
2263
|
coerce: (e = i == null ? void 0 : i.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -2152,11 +2266,11 @@ Ne.create = (i) => {
|
|
|
2152
2266
|
};
|
|
2153
2267
|
class Mt extends I {
|
|
2154
2268
|
_parse(e) {
|
|
2155
|
-
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !==
|
|
2269
|
+
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
|
|
2156
2270
|
const t = this._getOrReturnCtx(e);
|
|
2157
2271
|
return y(t, {
|
|
2158
2272
|
code: m.invalid_type,
|
|
2159
|
-
expected:
|
|
2273
|
+
expected: f.boolean,
|
|
2160
2274
|
received: t.parsedType
|
|
2161
2275
|
}), S;
|
|
2162
2276
|
}
|
|
@@ -2168,13 +2282,13 @@ Mt.create = (i) => new Mt({
|
|
|
2168
2282
|
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
2169
2283
|
...A(i)
|
|
2170
2284
|
});
|
|
2171
|
-
class
|
|
2285
|
+
class Qe extends I {
|
|
2172
2286
|
_parse(e) {
|
|
2173
|
-
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !==
|
|
2287
|
+
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
2174
2288
|
const s = this._getOrReturnCtx(e);
|
|
2175
2289
|
return y(s, {
|
|
2176
2290
|
code: m.invalid_type,
|
|
2177
|
-
expected:
|
|
2291
|
+
expected: f.date,
|
|
2178
2292
|
received: s.parsedType
|
|
2179
2293
|
}), S;
|
|
2180
2294
|
}
|
|
@@ -2184,7 +2298,7 @@ class Ge extends I {
|
|
|
2184
2298
|
code: m.invalid_date
|
|
2185
2299
|
}), S;
|
|
2186
2300
|
}
|
|
2187
|
-
const t = new
|
|
2301
|
+
const t = new G();
|
|
2188
2302
|
let n;
|
|
2189
2303
|
for (const s of this._def.checks)
|
|
2190
2304
|
s.kind === "min" ? e.data.getTime() < s.value && (n = this._getOrReturnCtx(e, n), y(n, {
|
|
@@ -2201,14 +2315,14 @@ class Ge extends I {
|
|
|
2201
2315
|
exact: !1,
|
|
2202
2316
|
maximum: s.value,
|
|
2203
2317
|
type: "date"
|
|
2204
|
-
}), t.dirty()) :
|
|
2318
|
+
}), t.dirty()) : P.assertNever(s);
|
|
2205
2319
|
return {
|
|
2206
2320
|
status: t.value,
|
|
2207
2321
|
value: new Date(e.data.getTime())
|
|
2208
2322
|
};
|
|
2209
2323
|
}
|
|
2210
2324
|
_addCheck(e) {
|
|
2211
|
-
return new
|
|
2325
|
+
return new Qe({
|
|
2212
2326
|
...this._def,
|
|
2213
2327
|
checks: [...this._def.checks, e]
|
|
2214
2328
|
});
|
|
@@ -2240,36 +2354,36 @@ class Ge extends I {
|
|
|
2240
2354
|
return e != null ? new Date(e) : null;
|
|
2241
2355
|
}
|
|
2242
2356
|
}
|
|
2243
|
-
|
|
2357
|
+
Qe.create = (i) => new Qe({
|
|
2244
2358
|
checks: [],
|
|
2245
2359
|
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
2246
2360
|
typeName: T.ZodDate,
|
|
2247
2361
|
...A(i)
|
|
2248
2362
|
});
|
|
2249
|
-
class
|
|
2363
|
+
class fn extends I {
|
|
2250
2364
|
_parse(e) {
|
|
2251
|
-
if (this._getType(e) !==
|
|
2365
|
+
if (this._getType(e) !== f.symbol) {
|
|
2252
2366
|
const t = this._getOrReturnCtx(e);
|
|
2253
2367
|
return y(t, {
|
|
2254
2368
|
code: m.invalid_type,
|
|
2255
|
-
expected:
|
|
2369
|
+
expected: f.symbol,
|
|
2256
2370
|
received: t.parsedType
|
|
2257
2371
|
}), S;
|
|
2258
2372
|
}
|
|
2259
2373
|
return ee(e.data);
|
|
2260
2374
|
}
|
|
2261
2375
|
}
|
|
2262
|
-
|
|
2376
|
+
fn.create = (i) => new fn({
|
|
2263
2377
|
typeName: T.ZodSymbol,
|
|
2264
2378
|
...A(i)
|
|
2265
2379
|
});
|
|
2266
2380
|
class Rt extends I {
|
|
2267
2381
|
_parse(e) {
|
|
2268
|
-
if (this._getType(e) !==
|
|
2382
|
+
if (this._getType(e) !== f.undefined) {
|
|
2269
2383
|
const t = this._getOrReturnCtx(e);
|
|
2270
2384
|
return y(t, {
|
|
2271
2385
|
code: m.invalid_type,
|
|
2272
|
-
expected:
|
|
2386
|
+
expected: f.undefined,
|
|
2273
2387
|
received: t.parsedType
|
|
2274
2388
|
}), S;
|
|
2275
2389
|
}
|
|
@@ -2280,24 +2394,24 @@ Rt.create = (i) => new Rt({
|
|
|
2280
2394
|
typeName: T.ZodUndefined,
|
|
2281
2395
|
...A(i)
|
|
2282
2396
|
});
|
|
2283
|
-
class
|
|
2397
|
+
class Nt extends I {
|
|
2284
2398
|
_parse(e) {
|
|
2285
|
-
if (this._getType(e) !==
|
|
2399
|
+
if (this._getType(e) !== f.null) {
|
|
2286
2400
|
const t = this._getOrReturnCtx(e);
|
|
2287
2401
|
return y(t, {
|
|
2288
2402
|
code: m.invalid_type,
|
|
2289
|
-
expected:
|
|
2403
|
+
expected: f.null,
|
|
2290
2404
|
received: t.parsedType
|
|
2291
2405
|
}), S;
|
|
2292
2406
|
}
|
|
2293
2407
|
return ee(e.data);
|
|
2294
2408
|
}
|
|
2295
2409
|
}
|
|
2296
|
-
|
|
2410
|
+
Nt.create = (i) => new Nt({
|
|
2297
2411
|
typeName: T.ZodNull,
|
|
2298
2412
|
...A(i)
|
|
2299
2413
|
});
|
|
2300
|
-
class
|
|
2414
|
+
class ut extends I {
|
|
2301
2415
|
constructor() {
|
|
2302
2416
|
super(...arguments), this._any = !0;
|
|
2303
2417
|
}
|
|
@@ -2305,7 +2419,7 @@ class dt extends I {
|
|
|
2305
2419
|
return ee(e.data);
|
|
2306
2420
|
}
|
|
2307
2421
|
}
|
|
2308
|
-
|
|
2422
|
+
ut.create = (i) => new ut({
|
|
2309
2423
|
typeName: T.ZodAny,
|
|
2310
2424
|
...A(i)
|
|
2311
2425
|
});
|
|
@@ -2326,7 +2440,7 @@ class Te extends I {
|
|
|
2326
2440
|
const t = this._getOrReturnCtx(e);
|
|
2327
2441
|
return y(t, {
|
|
2328
2442
|
code: m.invalid_type,
|
|
2329
|
-
expected:
|
|
2443
|
+
expected: f.never,
|
|
2330
2444
|
received: t.parsedType
|
|
2331
2445
|
}), S;
|
|
2332
2446
|
}
|
|
@@ -2337,11 +2451,11 @@ Te.create = (i) => new Te({
|
|
|
2337
2451
|
});
|
|
2338
2452
|
class yn extends I {
|
|
2339
2453
|
_parse(e) {
|
|
2340
|
-
if (this._getType(e) !==
|
|
2454
|
+
if (this._getType(e) !== f.undefined) {
|
|
2341
2455
|
const t = this._getOrReturnCtx(e);
|
|
2342
2456
|
return y(t, {
|
|
2343
2457
|
code: m.invalid_type,
|
|
2344
|
-
expected:
|
|
2458
|
+
expected: f.void,
|
|
2345
2459
|
received: t.parsedType
|
|
2346
2460
|
}), S;
|
|
2347
2461
|
}
|
|
@@ -2355,10 +2469,10 @@ yn.create = (i) => new yn({
|
|
|
2355
2469
|
class ce extends I {
|
|
2356
2470
|
_parse(e) {
|
|
2357
2471
|
const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
|
|
2358
|
-
if (t.parsedType !==
|
|
2472
|
+
if (t.parsedType !== f.array)
|
|
2359
2473
|
return y(t, {
|
|
2360
2474
|
code: m.invalid_type,
|
|
2361
|
-
expected:
|
|
2475
|
+
expected: f.array,
|
|
2362
2476
|
received: t.parsedType
|
|
2363
2477
|
}), S;
|
|
2364
2478
|
if (s.exactLength !== null) {
|
|
@@ -2388,9 +2502,9 @@ class ce extends I {
|
|
|
2388
2502
|
exact: !1,
|
|
2389
2503
|
message: s.maxLength.message
|
|
2390
2504
|
}), n.dirty()), t.common.async)
|
|
2391
|
-
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ye(t, a, t.path, o)))).then((a) =>
|
|
2505
|
+
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ye(t, a, t.path, o)))).then((a) => G.mergeArray(n, a));
|
|
2392
2506
|
const r = [...t.data].map((a, o) => s.type._parseSync(new ye(t, a, t.path, o)));
|
|
2393
|
-
return
|
|
2507
|
+
return G.mergeArray(n, r);
|
|
2394
2508
|
}
|
|
2395
2509
|
get element() {
|
|
2396
2510
|
return this._def.type;
|
|
@@ -2440,7 +2554,7 @@ function ot(i) {
|
|
|
2440
2554
|
return i instanceof ce ? new ce({
|
|
2441
2555
|
...i._def,
|
|
2442
2556
|
type: ot(i.element)
|
|
2443
|
-
}) : i instanceof $e ? $e.create(ot(i.unwrap())) : i instanceof
|
|
2557
|
+
}) : i instanceof $e ? $e.create(ot(i.unwrap())) : i instanceof Ge ? Ge.create(ot(i.unwrap())) : i instanceof ve ? ve.create(i.items.map((e) => ot(e))) : i;
|
|
2444
2558
|
}
|
|
2445
2559
|
class F extends I {
|
|
2446
2560
|
constructor() {
|
|
@@ -2449,15 +2563,15 @@ class F extends I {
|
|
|
2449
2563
|
_getCached() {
|
|
2450
2564
|
if (this._cached !== null)
|
|
2451
2565
|
return this._cached;
|
|
2452
|
-
const e = this._def.shape(), t =
|
|
2566
|
+
const e = this._def.shape(), t = P.objectKeys(e);
|
|
2453
2567
|
return this._cached = { shape: e, keys: t };
|
|
2454
2568
|
}
|
|
2455
2569
|
_parse(e) {
|
|
2456
|
-
if (this._getType(e) !==
|
|
2570
|
+
if (this._getType(e) !== f.object) {
|
|
2457
2571
|
const l = this._getOrReturnCtx(e);
|
|
2458
2572
|
return y(l, {
|
|
2459
2573
|
code: m.invalid_type,
|
|
2460
|
-
expected:
|
|
2574
|
+
expected: f.object,
|
|
2461
2575
|
received: l.parsedType
|
|
2462
2576
|
}), S;
|
|
2463
2577
|
}
|
|
@@ -2467,10 +2581,10 @@ class F extends I {
|
|
|
2467
2581
|
r.includes(l) || a.push(l);
|
|
2468
2582
|
const o = [];
|
|
2469
2583
|
for (const l of r) {
|
|
2470
|
-
const d = s[l],
|
|
2584
|
+
const d = s[l], u = n.data[l];
|
|
2471
2585
|
o.push({
|
|
2472
2586
|
key: { status: "valid", value: l },
|
|
2473
|
-
value: d._parse(new ye(n,
|
|
2587
|
+
value: d._parse(new ye(n, u, n.path, l)),
|
|
2474
2588
|
alwaysSet: l in n.data
|
|
2475
2589
|
});
|
|
2476
2590
|
}
|
|
@@ -2492,11 +2606,11 @@ class F extends I {
|
|
|
2492
2606
|
} else {
|
|
2493
2607
|
const l = this._def.catchall;
|
|
2494
2608
|
for (const d of a) {
|
|
2495
|
-
const
|
|
2609
|
+
const u = n.data[d];
|
|
2496
2610
|
o.push({
|
|
2497
2611
|
key: { status: "valid", value: d },
|
|
2498
2612
|
value: l._parse(
|
|
2499
|
-
new ye(n,
|
|
2613
|
+
new ye(n, u, n.path, d)
|
|
2500
2614
|
//, ctx.child(key), value, getParsedType(value)
|
|
2501
2615
|
),
|
|
2502
2616
|
alwaysSet: d in n.data
|
|
@@ -2506,15 +2620,15 @@ class F extends I {
|
|
|
2506
2620
|
return n.common.async ? Promise.resolve().then(async () => {
|
|
2507
2621
|
const l = [];
|
|
2508
2622
|
for (const d of o) {
|
|
2509
|
-
const
|
|
2623
|
+
const u = await d.key;
|
|
2510
2624
|
l.push({
|
|
2511
|
-
key:
|
|
2625
|
+
key: u,
|
|
2512
2626
|
value: await d.value,
|
|
2513
2627
|
alwaysSet: d.alwaysSet
|
|
2514
2628
|
});
|
|
2515
2629
|
}
|
|
2516
2630
|
return l;
|
|
2517
|
-
}).then((l) =>
|
|
2631
|
+
}).then((l) => G.mergeObjectSync(t, l)) : G.mergeObjectSync(t, o);
|
|
2518
2632
|
}
|
|
2519
2633
|
get shape() {
|
|
2520
2634
|
return this._def.shape();
|
|
@@ -2657,7 +2771,7 @@ class F extends I {
|
|
|
2657
2771
|
}
|
|
2658
2772
|
pick(e) {
|
|
2659
2773
|
const t = {};
|
|
2660
|
-
return
|
|
2774
|
+
return P.objectKeys(e).forEach((n) => {
|
|
2661
2775
|
e[n] && this.shape[n] && (t[n] = this.shape[n]);
|
|
2662
2776
|
}), new F({
|
|
2663
2777
|
...this._def,
|
|
@@ -2666,7 +2780,7 @@ class F extends I {
|
|
|
2666
2780
|
}
|
|
2667
2781
|
omit(e) {
|
|
2668
2782
|
const t = {};
|
|
2669
|
-
return
|
|
2783
|
+
return P.objectKeys(this.shape).forEach((n) => {
|
|
2670
2784
|
e[n] || (t[n] = this.shape[n]);
|
|
2671
2785
|
}), new F({
|
|
2672
2786
|
...this._def,
|
|
@@ -2681,7 +2795,7 @@ class F extends I {
|
|
|
2681
2795
|
}
|
|
2682
2796
|
partial(e) {
|
|
2683
2797
|
const t = {};
|
|
2684
|
-
return
|
|
2798
|
+
return P.objectKeys(this.shape).forEach((n) => {
|
|
2685
2799
|
const s = this.shape[n];
|
|
2686
2800
|
e && !e[n] ? t[n] = s : t[n] = s.optional();
|
|
2687
2801
|
}), new F({
|
|
@@ -2691,7 +2805,7 @@ class F extends I {
|
|
|
2691
2805
|
}
|
|
2692
2806
|
required(e) {
|
|
2693
2807
|
const t = {};
|
|
2694
|
-
return
|
|
2808
|
+
return P.objectKeys(this.shape).forEach((n) => {
|
|
2695
2809
|
if (e && !e[n])
|
|
2696
2810
|
t[n] = this.shape[n];
|
|
2697
2811
|
else {
|
|
@@ -2706,7 +2820,7 @@ class F extends I {
|
|
|
2706
2820
|
});
|
|
2707
2821
|
}
|
|
2708
2822
|
keyof() {
|
|
2709
|
-
return js(
|
|
2823
|
+
return js(P.objectKeys(this.shape));
|
|
2710
2824
|
}
|
|
2711
2825
|
}
|
|
2712
2826
|
F.create = (i, e) => new F({
|
|
@@ -2730,7 +2844,7 @@ F.lazycreate = (i, e) => new F({
|
|
|
2730
2844
|
typeName: T.ZodObject,
|
|
2731
2845
|
...A(e)
|
|
2732
2846
|
});
|
|
2733
|
-
class
|
|
2847
|
+
class Pt extends I {
|
|
2734
2848
|
_parse(e) {
|
|
2735
2849
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2736
2850
|
function s(r) {
|
|
@@ -2776,14 +2890,14 @@ class Nt extends I {
|
|
|
2776
2890
|
issues: []
|
|
2777
2891
|
},
|
|
2778
2892
|
parent: null
|
|
2779
|
-
},
|
|
2893
|
+
}, u = l._parseSync({
|
|
2780
2894
|
data: t.data,
|
|
2781
2895
|
path: t.path,
|
|
2782
2896
|
parent: d
|
|
2783
2897
|
});
|
|
2784
|
-
if (
|
|
2785
|
-
return
|
|
2786
|
-
|
|
2898
|
+
if (u.status === "valid")
|
|
2899
|
+
return u;
|
|
2900
|
+
u.status === "dirty" && !r && (r = { result: u, ctx: d }), d.common.issues.length && a.push(d.common.issues);
|
|
2787
2901
|
}
|
|
2788
2902
|
if (r)
|
|
2789
2903
|
return t.common.issues.push(...r.ctx.common.issues), r.result;
|
|
@@ -2798,19 +2912,19 @@ class Nt extends I {
|
|
|
2798
2912
|
return this._def.options;
|
|
2799
2913
|
}
|
|
2800
2914
|
}
|
|
2801
|
-
|
|
2915
|
+
Pt.create = (i, e) => new Pt({
|
|
2802
2916
|
options: i,
|
|
2803
2917
|
typeName: T.ZodUnion,
|
|
2804
2918
|
...A(e)
|
|
2805
2919
|
});
|
|
2806
|
-
const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof de ? rn(i.innerType()) : i instanceof Lt ? [i.value] : i instanceof je ? i.options : i instanceof Dt ? Object.keys(i.enum) : i instanceof Ut ? rn(i._def.innerType) : i instanceof Rt ? [void 0] : i instanceof
|
|
2807
|
-
class
|
|
2920
|
+
const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof de ? rn(i.innerType()) : i instanceof Lt ? [i.value] : i instanceof je ? i.options : i instanceof Dt ? Object.keys(i.enum) : i instanceof Ut ? rn(i._def.innerType) : i instanceof Rt ? [void 0] : i instanceof Nt ? [null] : null;
|
|
2921
|
+
class Nn extends I {
|
|
2808
2922
|
_parse(e) {
|
|
2809
2923
|
const { ctx: t } = this._processInputParams(e);
|
|
2810
|
-
if (t.parsedType !==
|
|
2924
|
+
if (t.parsedType !== f.object)
|
|
2811
2925
|
return y(t, {
|
|
2812
2926
|
code: m.invalid_type,
|
|
2813
|
-
expected:
|
|
2927
|
+
expected: f.object,
|
|
2814
2928
|
received: t.parsedType
|
|
2815
2929
|
}), S;
|
|
2816
2930
|
const n = this.discriminator, s = t.data[n], r = this.optionsMap.get(s);
|
|
@@ -2857,7 +2971,7 @@ class Rn extends I {
|
|
|
2857
2971
|
s.set(o, r);
|
|
2858
2972
|
}
|
|
2859
2973
|
}
|
|
2860
|
-
return new
|
|
2974
|
+
return new Nn({
|
|
2861
2975
|
typeName: T.ZodDiscriminatedUnion,
|
|
2862
2976
|
discriminator: e,
|
|
2863
2977
|
options: t,
|
|
@@ -2870,8 +2984,8 @@ function ai(i, e) {
|
|
|
2870
2984
|
const t = Me(i), n = Me(e);
|
|
2871
2985
|
if (i === e)
|
|
2872
2986
|
return { valid: !0, data: i };
|
|
2873
|
-
if (t ===
|
|
2874
|
-
const s =
|
|
2987
|
+
if (t === f.object && n === f.object) {
|
|
2988
|
+
const s = P.objectKeys(e), r = P.objectKeys(i).filter((o) => s.indexOf(o) !== -1), a = { ...i, ...e };
|
|
2875
2989
|
for (const o of r) {
|
|
2876
2990
|
const l = ai(i[o], e[o]);
|
|
2877
2991
|
if (!l.valid)
|
|
@@ -2879,7 +2993,7 @@ function ai(i, e) {
|
|
|
2879
2993
|
a[o] = l.data;
|
|
2880
2994
|
}
|
|
2881
2995
|
return { valid: !0, data: a };
|
|
2882
|
-
} else if (t ===
|
|
2996
|
+
} else if (t === f.array && n === f.array) {
|
|
2883
2997
|
if (i.length !== e.length)
|
|
2884
2998
|
return { valid: !1 };
|
|
2885
2999
|
const s = [];
|
|
@@ -2891,7 +3005,7 @@ function ai(i, e) {
|
|
|
2891
3005
|
}
|
|
2892
3006
|
return { valid: !0, data: s };
|
|
2893
3007
|
} else
|
|
2894
|
-
return t ===
|
|
3008
|
+
return t === f.date && n === f.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
|
|
2895
3009
|
}
|
|
2896
3010
|
class jt extends I {
|
|
2897
3011
|
_parse(e) {
|
|
@@ -2934,10 +3048,10 @@ jt.create = (i, e, t) => new jt({
|
|
|
2934
3048
|
class ve extends I {
|
|
2935
3049
|
_parse(e) {
|
|
2936
3050
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2937
|
-
if (n.parsedType !==
|
|
3051
|
+
if (n.parsedType !== f.array)
|
|
2938
3052
|
return y(n, {
|
|
2939
3053
|
code: m.invalid_type,
|
|
2940
|
-
expected:
|
|
3054
|
+
expected: f.array,
|
|
2941
3055
|
received: n.parsedType
|
|
2942
3056
|
}), S;
|
|
2943
3057
|
if (n.data.length < this._def.items.length)
|
|
@@ -2959,7 +3073,7 @@ class ve extends I {
|
|
|
2959
3073
|
const o = this._def.items[a] || this._def.rest;
|
|
2960
3074
|
return o ? o._parse(new ye(n, r, n.path, a)) : null;
|
|
2961
3075
|
}).filter((r) => !!r);
|
|
2962
|
-
return n.common.async ? Promise.all(s).then((r) =>
|
|
3076
|
+
return n.common.async ? Promise.all(s).then((r) => G.mergeArray(t, r)) : G.mergeArray(t, s);
|
|
2963
3077
|
}
|
|
2964
3078
|
get items() {
|
|
2965
3079
|
return this._def.items;
|
|
@@ -2990,10 +3104,10 @@ class zt extends I {
|
|
|
2990
3104
|
}
|
|
2991
3105
|
_parse(e) {
|
|
2992
3106
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2993
|
-
if (n.parsedType !==
|
|
3107
|
+
if (n.parsedType !== f.object)
|
|
2994
3108
|
return y(n, {
|
|
2995
3109
|
code: m.invalid_type,
|
|
2996
|
-
expected:
|
|
3110
|
+
expected: f.object,
|
|
2997
3111
|
received: n.parsedType
|
|
2998
3112
|
}), S;
|
|
2999
3113
|
const s = [], r = this._def.keyType, a = this._def.valueType;
|
|
@@ -3002,7 +3116,7 @@ class zt extends I {
|
|
|
3002
3116
|
key: r._parse(new ye(n, o, n.path, o)),
|
|
3003
3117
|
value: a._parse(new ye(n, n.data[o], n.path, o))
|
|
3004
3118
|
});
|
|
3005
|
-
return n.common.async ?
|
|
3119
|
+
return n.common.async ? G.mergeObjectAsync(t, s) : G.mergeObjectSync(t, s);
|
|
3006
3120
|
}
|
|
3007
3121
|
get element() {
|
|
3008
3122
|
return this._def.valueType;
|
|
@@ -3030,10 +3144,10 @@ class vn extends I {
|
|
|
3030
3144
|
}
|
|
3031
3145
|
_parse(e) {
|
|
3032
3146
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
3033
|
-
if (n.parsedType !==
|
|
3147
|
+
if (n.parsedType !== f.map)
|
|
3034
3148
|
return y(n, {
|
|
3035
3149
|
code: m.invalid_type,
|
|
3036
|
-
expected:
|
|
3150
|
+
expected: f.map,
|
|
3037
3151
|
received: n.parsedType
|
|
3038
3152
|
}), S;
|
|
3039
3153
|
const s = this._def.keyType, r = this._def.valueType, a = [...n.data.entries()].map(([o, l], d) => ({
|
|
@@ -3044,20 +3158,20 @@ class vn extends I {
|
|
|
3044
3158
|
const o = /* @__PURE__ */ new Map();
|
|
3045
3159
|
return Promise.resolve().then(async () => {
|
|
3046
3160
|
for (const l of a) {
|
|
3047
|
-
const d = await l.key,
|
|
3048
|
-
if (d.status === "aborted" ||
|
|
3161
|
+
const d = await l.key, u = await l.value;
|
|
3162
|
+
if (d.status === "aborted" || u.status === "aborted")
|
|
3049
3163
|
return S;
|
|
3050
|
-
(d.status === "dirty" ||
|
|
3164
|
+
(d.status === "dirty" || u.status === "dirty") && t.dirty(), o.set(d.value, u.value);
|
|
3051
3165
|
}
|
|
3052
3166
|
return { status: t.value, value: o };
|
|
3053
3167
|
});
|
|
3054
3168
|
} else {
|
|
3055
3169
|
const o = /* @__PURE__ */ new Map();
|
|
3056
3170
|
for (const l of a) {
|
|
3057
|
-
const d = l.key,
|
|
3058
|
-
if (d.status === "aborted" ||
|
|
3171
|
+
const d = l.key, u = l.value;
|
|
3172
|
+
if (d.status === "aborted" || u.status === "aborted")
|
|
3059
3173
|
return S;
|
|
3060
|
-
(d.status === "dirty" ||
|
|
3174
|
+
(d.status === "dirty" || u.status === "dirty") && t.dirty(), o.set(d.value, u.value);
|
|
3061
3175
|
}
|
|
3062
3176
|
return { status: t.value, value: o };
|
|
3063
3177
|
}
|
|
@@ -3069,13 +3183,13 @@ vn.create = (i, e, t) => new vn({
|
|
|
3069
3183
|
typeName: T.ZodMap,
|
|
3070
3184
|
...A(t)
|
|
3071
3185
|
});
|
|
3072
|
-
class
|
|
3186
|
+
class Ye extends I {
|
|
3073
3187
|
_parse(e) {
|
|
3074
3188
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
3075
|
-
if (n.parsedType !==
|
|
3189
|
+
if (n.parsedType !== f.set)
|
|
3076
3190
|
return y(n, {
|
|
3077
3191
|
code: m.invalid_type,
|
|
3078
|
-
expected:
|
|
3192
|
+
expected: f.set,
|
|
3079
3193
|
received: n.parsedType
|
|
3080
3194
|
}), S;
|
|
3081
3195
|
const s = this._def;
|
|
@@ -3097,10 +3211,10 @@ class Qe extends I {
|
|
|
3097
3211
|
const r = this._def.valueType;
|
|
3098
3212
|
function a(l) {
|
|
3099
3213
|
const d = /* @__PURE__ */ new Set();
|
|
3100
|
-
for (const
|
|
3101
|
-
if (
|
|
3214
|
+
for (const u of l) {
|
|
3215
|
+
if (u.status === "aborted")
|
|
3102
3216
|
return S;
|
|
3103
|
-
|
|
3217
|
+
u.status === "dirty" && t.dirty(), d.add(u.value);
|
|
3104
3218
|
}
|
|
3105
3219
|
return { status: t.value, value: d };
|
|
3106
3220
|
}
|
|
@@ -3108,13 +3222,13 @@ class Qe extends I {
|
|
|
3108
3222
|
return n.common.async ? Promise.all(o).then((l) => a(l)) : a(o);
|
|
3109
3223
|
}
|
|
3110
3224
|
min(e, t) {
|
|
3111
|
-
return new
|
|
3225
|
+
return new Ye({
|
|
3112
3226
|
...this._def,
|
|
3113
3227
|
minSize: { value: e, message: x.toString(t) }
|
|
3114
3228
|
});
|
|
3115
3229
|
}
|
|
3116
3230
|
max(e, t) {
|
|
3117
|
-
return new
|
|
3231
|
+
return new Ye({
|
|
3118
3232
|
...this._def,
|
|
3119
3233
|
maxSize: { value: e, message: x.toString(t) }
|
|
3120
3234
|
});
|
|
@@ -3126,7 +3240,7 @@ class Qe extends I {
|
|
|
3126
3240
|
return this.min(1, e);
|
|
3127
3241
|
}
|
|
3128
3242
|
}
|
|
3129
|
-
|
|
3243
|
+
Ye.create = (i, e) => new Ye({
|
|
3130
3244
|
valueType: i,
|
|
3131
3245
|
minSize: null,
|
|
3132
3246
|
maxSize: null,
|
|
@@ -3139,10 +3253,10 @@ class lt extends I {
|
|
|
3139
3253
|
}
|
|
3140
3254
|
_parse(e) {
|
|
3141
3255
|
const { ctx: t } = this._processInputParams(e);
|
|
3142
|
-
if (t.parsedType !==
|
|
3256
|
+
if (t.parsedType !== f.function)
|
|
3143
3257
|
return y(t, {
|
|
3144
3258
|
code: m.invalid_type,
|
|
3145
|
-
expected:
|
|
3259
|
+
expected: f.function,
|
|
3146
3260
|
received: t.parsedType
|
|
3147
3261
|
}), S;
|
|
3148
3262
|
function n(o, l) {
|
|
@@ -3181,9 +3295,9 @@ class lt extends I {
|
|
|
3181
3295
|
if (this._def.returns instanceof ht) {
|
|
3182
3296
|
const o = this;
|
|
3183
3297
|
return ee(async function(...l) {
|
|
3184
|
-
const d = new le([]),
|
|
3298
|
+
const d = new le([]), u = await o._def.args.parseAsync(l, r).catch((c) => {
|
|
3185
3299
|
throw d.addIssue(n(l, c)), d;
|
|
3186
|
-
}), p = await Reflect.apply(a, this,
|
|
3300
|
+
}), p = await Reflect.apply(a, this, u);
|
|
3187
3301
|
return await o._def.returns._def.type.parseAsync(p, r).catch((c) => {
|
|
3188
3302
|
throw d.addIssue(s(p, c)), d;
|
|
3189
3303
|
});
|
|
@@ -3194,9 +3308,9 @@ class lt extends I {
|
|
|
3194
3308
|
const d = o._def.args.safeParse(l, r);
|
|
3195
3309
|
if (!d.success)
|
|
3196
3310
|
throw new le([n(l, d.error)]);
|
|
3197
|
-
const
|
|
3311
|
+
const u = Reflect.apply(a, this, d.data), p = o._def.returns.safeParse(u, r);
|
|
3198
3312
|
if (!p.success)
|
|
3199
|
-
throw new le([s(
|
|
3313
|
+
throw new le([s(u, p.error)]);
|
|
3200
3314
|
return p.data;
|
|
3201
3315
|
});
|
|
3202
3316
|
}
|
|
@@ -3281,7 +3395,7 @@ class je extends I {
|
|
|
3281
3395
|
if (typeof e.data != "string") {
|
|
3282
3396
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
3283
3397
|
return y(t, {
|
|
3284
|
-
expected:
|
|
3398
|
+
expected: P.joinValues(n),
|
|
3285
3399
|
received: t.parsedType,
|
|
3286
3400
|
code: m.invalid_type
|
|
3287
3401
|
}), S;
|
|
@@ -3327,17 +3441,17 @@ class je extends I {
|
|
|
3327
3441
|
je.create = js;
|
|
3328
3442
|
class Dt extends I {
|
|
3329
3443
|
_parse(e) {
|
|
3330
|
-
const t =
|
|
3331
|
-
if (n.parsedType !==
|
|
3332
|
-
const s =
|
|
3444
|
+
const t = P.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3445
|
+
if (n.parsedType !== f.string && n.parsedType !== f.number) {
|
|
3446
|
+
const s = P.objectValues(t);
|
|
3333
3447
|
return y(n, {
|
|
3334
|
-
expected:
|
|
3448
|
+
expected: P.joinValues(s),
|
|
3335
3449
|
received: n.parsedType,
|
|
3336
3450
|
code: m.invalid_type
|
|
3337
3451
|
}), S;
|
|
3338
3452
|
}
|
|
3339
3453
|
if (t.indexOf(e.data) === -1) {
|
|
3340
|
-
const s =
|
|
3454
|
+
const s = P.objectValues(t);
|
|
3341
3455
|
return y(n, {
|
|
3342
3456
|
received: n.data,
|
|
3343
3457
|
code: m.invalid_enum_value,
|
|
@@ -3361,13 +3475,13 @@ class ht extends I {
|
|
|
3361
3475
|
}
|
|
3362
3476
|
_parse(e) {
|
|
3363
3477
|
const { ctx: t } = this._processInputParams(e);
|
|
3364
|
-
if (t.parsedType !==
|
|
3478
|
+
if (t.parsedType !== f.promise && t.common.async === !1)
|
|
3365
3479
|
return y(t, {
|
|
3366
3480
|
code: m.invalid_type,
|
|
3367
|
-
expected:
|
|
3481
|
+
expected: f.promise,
|
|
3368
3482
|
received: t.parsedType
|
|
3369
3483
|
}), S;
|
|
3370
|
-
const n = t.parsedType ===
|
|
3484
|
+
const n = t.parsedType === f.promise ? t.data : Promise.resolve(t.data);
|
|
3371
3485
|
return ee(n.then((s) => this._def.type.parseAsync(s, {
|
|
3372
3486
|
path: t.path,
|
|
3373
3487
|
errorMap: t.common.contextualErrorMap
|
|
@@ -3444,7 +3558,7 @@ class de extends I {
|
|
|
3444
3558
|
return { status: t.value, value: o };
|
|
3445
3559
|
} else
|
|
3446
3560
|
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => Ot(a) ? Promise.resolve(s.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
|
|
3447
|
-
|
|
3561
|
+
P.assertNever(s);
|
|
3448
3562
|
}
|
|
3449
3563
|
}
|
|
3450
3564
|
de.create = (i, e, t) => new de({
|
|
@@ -3461,7 +3575,7 @@ de.createWithPreprocess = (i, e, t) => new de({
|
|
|
3461
3575
|
});
|
|
3462
3576
|
class $e extends I {
|
|
3463
3577
|
_parse(e) {
|
|
3464
|
-
return this._getType(e) ===
|
|
3578
|
+
return this._getType(e) === f.undefined ? ee(void 0) : this._def.innerType._parse(e);
|
|
3465
3579
|
}
|
|
3466
3580
|
unwrap() {
|
|
3467
3581
|
return this._def.innerType;
|
|
@@ -3472,15 +3586,15 @@ $e.create = (i, e) => new $e({
|
|
|
3472
3586
|
typeName: T.ZodOptional,
|
|
3473
3587
|
...A(e)
|
|
3474
3588
|
});
|
|
3475
|
-
class
|
|
3589
|
+
class Ge extends I {
|
|
3476
3590
|
_parse(e) {
|
|
3477
|
-
return this._getType(e) ===
|
|
3591
|
+
return this._getType(e) === f.null ? ee(null) : this._def.innerType._parse(e);
|
|
3478
3592
|
}
|
|
3479
3593
|
unwrap() {
|
|
3480
3594
|
return this._def.innerType;
|
|
3481
3595
|
}
|
|
3482
3596
|
}
|
|
3483
|
-
|
|
3597
|
+
Ge.create = (i, e) => new Ge({
|
|
3484
3598
|
innerType: i,
|
|
3485
3599
|
typeName: T.ZodNullable,
|
|
3486
3600
|
...A(e)
|
|
@@ -3489,7 +3603,7 @@ class Ut extends I {
|
|
|
3489
3603
|
_parse(e) {
|
|
3490
3604
|
const { ctx: t } = this._processInputParams(e);
|
|
3491
3605
|
let n = t.data;
|
|
3492
|
-
return t.parsedType ===
|
|
3606
|
+
return t.parsedType === f.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
3493
3607
|
data: n,
|
|
3494
3608
|
path: t.path,
|
|
3495
3609
|
parent: t
|
|
@@ -3520,7 +3634,7 @@ class bn extends I {
|
|
|
3520
3634
|
...n
|
|
3521
3635
|
}
|
|
3522
3636
|
});
|
|
3523
|
-
return
|
|
3637
|
+
return gn(s) ? s.then((r) => ({
|
|
3524
3638
|
status: "valid",
|
|
3525
3639
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
3526
3640
|
get error() {
|
|
@@ -3550,11 +3664,11 @@ bn.create = (i, e) => new bn({
|
|
|
3550
3664
|
});
|
|
3551
3665
|
class wn extends I {
|
|
3552
3666
|
_parse(e) {
|
|
3553
|
-
if (this._getType(e) !==
|
|
3667
|
+
if (this._getType(e) !== f.nan) {
|
|
3554
3668
|
const t = this._getOrReturnCtx(e);
|
|
3555
3669
|
return y(t, {
|
|
3556
3670
|
code: m.invalid_type,
|
|
3557
|
-
expected:
|
|
3671
|
+
expected: f.nan,
|
|
3558
3672
|
received: t.parsedType
|
|
3559
3673
|
}), S;
|
|
3560
3674
|
}
|
|
@@ -3565,7 +3679,7 @@ wn.create = (i) => new wn({
|
|
|
3565
3679
|
typeName: T.ZodNaN,
|
|
3566
3680
|
...A(i)
|
|
3567
3681
|
});
|
|
3568
|
-
const
|
|
3682
|
+
const la = Symbol("zod_brand");
|
|
3569
3683
|
class zs extends I {
|
|
3570
3684
|
_parse(e) {
|
|
3571
3685
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -3589,7 +3703,7 @@ class Ft extends I {
|
|
|
3589
3703
|
path: n.path,
|
|
3590
3704
|
parent: n
|
|
3591
3705
|
});
|
|
3592
|
-
return s.status === "aborted" ? S : s.status === "dirty" ? (t.dirty(),
|
|
3706
|
+
return s.status === "aborted" ? S : s.status === "dirty" ? (t.dirty(), Ps(s.value)) : this._def.out._parseAsync({
|
|
3593
3707
|
data: s.value,
|
|
3594
3708
|
path: n.path,
|
|
3595
3709
|
parent: n
|
|
@@ -3630,77 +3744,77 @@ xn.create = (i, e) => new xn({
|
|
|
3630
3744
|
typeName: T.ZodReadonly,
|
|
3631
3745
|
...A(e)
|
|
3632
3746
|
});
|
|
3633
|
-
const Zs = (i, e = {}, t) => i ?
|
|
3747
|
+
const Zs = (i, e = {}, t) => i ? ut.create().superRefine((n, s) => {
|
|
3634
3748
|
var r, a;
|
|
3635
3749
|
if (!i(n)) {
|
|
3636
3750
|
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (a = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && a !== void 0 ? a : !0, d = typeof o == "string" ? { message: o } : o;
|
|
3637
3751
|
s.addIssue({ code: "custom", ...d, fatal: l });
|
|
3638
3752
|
}
|
|
3639
|
-
}) :
|
|
3753
|
+
}) : ut.create(), ca = {
|
|
3640
3754
|
object: F.lazycreate
|
|
3641
3755
|
};
|
|
3642
3756
|
var T;
|
|
3643
3757
|
(function(i) {
|
|
3644
3758
|
i.ZodString = "ZodString", i.ZodNumber = "ZodNumber", i.ZodNaN = "ZodNaN", i.ZodBigInt = "ZodBigInt", i.ZodBoolean = "ZodBoolean", i.ZodDate = "ZodDate", i.ZodSymbol = "ZodSymbol", i.ZodUndefined = "ZodUndefined", i.ZodNull = "ZodNull", i.ZodAny = "ZodAny", i.ZodUnknown = "ZodUnknown", i.ZodNever = "ZodNever", i.ZodVoid = "ZodVoid", i.ZodArray = "ZodArray", i.ZodObject = "ZodObject", i.ZodUnion = "ZodUnion", i.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", i.ZodIntersection = "ZodIntersection", i.ZodTuple = "ZodTuple", i.ZodRecord = "ZodRecord", i.ZodMap = "ZodMap", i.ZodSet = "ZodSet", i.ZodFunction = "ZodFunction", i.ZodLazy = "ZodLazy", i.ZodLiteral = "ZodLiteral", i.ZodEnum = "ZodEnum", i.ZodEffects = "ZodEffects", i.ZodNativeEnum = "ZodNativeEnum", i.ZodOptional = "ZodOptional", i.ZodNullable = "ZodNullable", i.ZodDefault = "ZodDefault", i.ZodCatch = "ZodCatch", i.ZodPromise = "ZodPromise", i.ZodBranded = "ZodBranded", i.ZodPipeline = "ZodPipeline", i.ZodReadonly = "ZodReadonly";
|
|
3645
3759
|
})(T || (T = {}));
|
|
3646
|
-
const
|
|
3760
|
+
const da = (i, e = {
|
|
3647
3761
|
message: `Input not instance of ${i.name}`
|
|
3648
|
-
}) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds =
|
|
3762
|
+
}) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Ne.create, ua = wn.create, ha = Pe.create, Us = Mt.create, pa = Qe.create, ma = fn.create, ga = Rt.create, fa = Nt.create, ya = ut.create, va = qe.create, ba = Te.create, wa = yn.create, xa = ce.create, _a = F.create, ka = F.strictCreate, $a = Pt.create, Ta = Nn.create, Ea = jt.create, Sa = ve.create, Ca = zt.create, Aa = vn.create, Ia = Ye.create, Oa = lt.create, Ma = Zt.create, Ra = Lt.create, Na = je.create, Pa = Dt.create, ja = ht.create, ds = de.create, za = $e.create, Za = Ge.create, La = de.createWithPreprocess, Da = Ft.create, Ua = () => Ls().optional(), Ha = () => Ds().optional(), Ba = () => Us().optional(), Wa = {
|
|
3649
3763
|
string: (i) => oe.create({ ...i, coerce: !0 }),
|
|
3650
|
-
number: (i) =>
|
|
3764
|
+
number: (i) => Ne.create({ ...i, coerce: !0 }),
|
|
3651
3765
|
boolean: (i) => Mt.create({
|
|
3652
3766
|
...i,
|
|
3653
3767
|
coerce: !0
|
|
3654
3768
|
}),
|
|
3655
|
-
bigint: (i) =>
|
|
3656
|
-
date: (i) =>
|
|
3657
|
-
},
|
|
3769
|
+
bigint: (i) => Pe.create({ ...i, coerce: !0 }),
|
|
3770
|
+
date: (i) => Qe.create({ ...i, coerce: !0 })
|
|
3771
|
+
}, Fa = S;
|
|
3658
3772
|
var w = /* @__PURE__ */ Object.freeze({
|
|
3659
3773
|
__proto__: null,
|
|
3660
3774
|
defaultErrorMap: It,
|
|
3661
|
-
setErrorMap:
|
|
3775
|
+
setErrorMap: Jr,
|
|
3662
3776
|
getErrorMap: pn,
|
|
3663
3777
|
makeIssue: mn,
|
|
3664
|
-
EMPTY_PATH:
|
|
3778
|
+
EMPTY_PATH: Qr,
|
|
3665
3779
|
addIssueToContext: y,
|
|
3666
|
-
ParseStatus:
|
|
3780
|
+
ParseStatus: G,
|
|
3667
3781
|
INVALID: S,
|
|
3668
|
-
DIRTY:
|
|
3782
|
+
DIRTY: Ps,
|
|
3669
3783
|
OK: ee,
|
|
3670
3784
|
isAborted: si,
|
|
3671
3785
|
isDirty: ri,
|
|
3672
3786
|
isValid: Ot,
|
|
3673
|
-
isAsync:
|
|
3787
|
+
isAsync: gn,
|
|
3674
3788
|
get util() {
|
|
3675
|
-
return
|
|
3789
|
+
return P;
|
|
3676
3790
|
},
|
|
3677
3791
|
get objectUtil() {
|
|
3678
3792
|
return ii;
|
|
3679
3793
|
},
|
|
3680
|
-
ZodParsedType:
|
|
3794
|
+
ZodParsedType: f,
|
|
3681
3795
|
getParsedType: Me,
|
|
3682
3796
|
ZodType: I,
|
|
3683
3797
|
ZodString: oe,
|
|
3684
|
-
ZodNumber:
|
|
3685
|
-
ZodBigInt:
|
|
3798
|
+
ZodNumber: Ne,
|
|
3799
|
+
ZodBigInt: Pe,
|
|
3686
3800
|
ZodBoolean: Mt,
|
|
3687
|
-
ZodDate:
|
|
3688
|
-
ZodSymbol:
|
|
3801
|
+
ZodDate: Qe,
|
|
3802
|
+
ZodSymbol: fn,
|
|
3689
3803
|
ZodUndefined: Rt,
|
|
3690
|
-
ZodNull:
|
|
3691
|
-
ZodAny:
|
|
3804
|
+
ZodNull: Nt,
|
|
3805
|
+
ZodAny: ut,
|
|
3692
3806
|
ZodUnknown: qe,
|
|
3693
3807
|
ZodNever: Te,
|
|
3694
3808
|
ZodVoid: yn,
|
|
3695
3809
|
ZodArray: ce,
|
|
3696
3810
|
ZodObject: F,
|
|
3697
|
-
ZodUnion:
|
|
3698
|
-
ZodDiscriminatedUnion:
|
|
3811
|
+
ZodUnion: Pt,
|
|
3812
|
+
ZodDiscriminatedUnion: Nn,
|
|
3699
3813
|
ZodIntersection: jt,
|
|
3700
3814
|
ZodTuple: ve,
|
|
3701
3815
|
ZodRecord: zt,
|
|
3702
3816
|
ZodMap: vn,
|
|
3703
|
-
ZodSet:
|
|
3817
|
+
ZodSet: Ye,
|
|
3704
3818
|
ZodFunction: lt,
|
|
3705
3819
|
ZodLazy: Zt,
|
|
3706
3820
|
ZodLiteral: Lt,
|
|
@@ -3710,64 +3824,64 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3710
3824
|
ZodEffects: de,
|
|
3711
3825
|
ZodTransformer: de,
|
|
3712
3826
|
ZodOptional: $e,
|
|
3713
|
-
ZodNullable:
|
|
3827
|
+
ZodNullable: Ge,
|
|
3714
3828
|
ZodDefault: Ut,
|
|
3715
3829
|
ZodCatch: bn,
|
|
3716
3830
|
ZodNaN: wn,
|
|
3717
|
-
BRAND:
|
|
3831
|
+
BRAND: la,
|
|
3718
3832
|
ZodBranded: zs,
|
|
3719
3833
|
ZodPipeline: Ft,
|
|
3720
3834
|
ZodReadonly: xn,
|
|
3721
3835
|
custom: Zs,
|
|
3722
3836
|
Schema: I,
|
|
3723
3837
|
ZodSchema: I,
|
|
3724
|
-
late:
|
|
3838
|
+
late: ca,
|
|
3725
3839
|
get ZodFirstPartyTypeKind() {
|
|
3726
3840
|
return T;
|
|
3727
3841
|
},
|
|
3728
|
-
coerce:
|
|
3729
|
-
any:
|
|
3730
|
-
array:
|
|
3731
|
-
bigint:
|
|
3842
|
+
coerce: Wa,
|
|
3843
|
+
any: ya,
|
|
3844
|
+
array: xa,
|
|
3845
|
+
bigint: ha,
|
|
3732
3846
|
boolean: Us,
|
|
3733
|
-
date:
|
|
3734
|
-
discriminatedUnion:
|
|
3847
|
+
date: pa,
|
|
3848
|
+
discriminatedUnion: Ta,
|
|
3735
3849
|
effect: ds,
|
|
3736
|
-
enum:
|
|
3737
|
-
function:
|
|
3738
|
-
instanceof:
|
|
3739
|
-
intersection:
|
|
3740
|
-
lazy:
|
|
3741
|
-
literal:
|
|
3742
|
-
map:
|
|
3743
|
-
nan:
|
|
3744
|
-
nativeEnum:
|
|
3745
|
-
never:
|
|
3746
|
-
null:
|
|
3747
|
-
nullable:
|
|
3850
|
+
enum: Na,
|
|
3851
|
+
function: Oa,
|
|
3852
|
+
instanceof: da,
|
|
3853
|
+
intersection: Ea,
|
|
3854
|
+
lazy: Ma,
|
|
3855
|
+
literal: Ra,
|
|
3856
|
+
map: Aa,
|
|
3857
|
+
nan: ua,
|
|
3858
|
+
nativeEnum: Pa,
|
|
3859
|
+
never: ba,
|
|
3860
|
+
null: fa,
|
|
3861
|
+
nullable: Za,
|
|
3748
3862
|
number: Ds,
|
|
3749
|
-
object:
|
|
3750
|
-
oboolean:
|
|
3751
|
-
onumber:
|
|
3752
|
-
optional:
|
|
3753
|
-
ostring:
|
|
3754
|
-
pipeline:
|
|
3755
|
-
preprocess:
|
|
3756
|
-
promise:
|
|
3757
|
-
record:
|
|
3758
|
-
set:
|
|
3759
|
-
strictObject:
|
|
3863
|
+
object: _a,
|
|
3864
|
+
oboolean: Ba,
|
|
3865
|
+
onumber: Ha,
|
|
3866
|
+
optional: za,
|
|
3867
|
+
ostring: Ua,
|
|
3868
|
+
pipeline: Da,
|
|
3869
|
+
preprocess: La,
|
|
3870
|
+
promise: ja,
|
|
3871
|
+
record: Ca,
|
|
3872
|
+
set: Ia,
|
|
3873
|
+
strictObject: ka,
|
|
3760
3874
|
string: Ls,
|
|
3761
|
-
symbol:
|
|
3875
|
+
symbol: ma,
|
|
3762
3876
|
transformer: ds,
|
|
3763
|
-
tuple:
|
|
3764
|
-
undefined:
|
|
3765
|
-
union:
|
|
3766
|
-
unknown:
|
|
3767
|
-
void:
|
|
3768
|
-
NEVER:
|
|
3877
|
+
tuple: Sa,
|
|
3878
|
+
undefined: ga,
|
|
3879
|
+
union: $a,
|
|
3880
|
+
unknown: va,
|
|
3881
|
+
void: wa,
|
|
3882
|
+
NEVER: Fa,
|
|
3769
3883
|
ZodIssueCode: m,
|
|
3770
|
-
quotelessJson:
|
|
3884
|
+
quotelessJson: Kr,
|
|
3771
3885
|
ZodError: le
|
|
3772
3886
|
});
|
|
3773
3887
|
const Pn = w.object({
|
|
@@ -3831,15 +3945,15 @@ const Pn = w.object({
|
|
|
3831
3945
|
).default({})
|
|
3832
3946
|
}).default({})
|
|
3833
3947
|
});
|
|
3834
|
-
var
|
|
3835
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
3948
|
+
var Va = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Vt = (i, e, t, n) => {
|
|
3949
|
+
for (var s = n > 1 ? void 0 : n ? qa(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
3836
3950
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
3837
|
-
return n && s &&
|
|
3951
|
+
return n && s && Va(e, t, s), s;
|
|
3838
3952
|
};
|
|
3839
3953
|
let Xe = class extends ne {
|
|
3840
3954
|
constructor() {
|
|
3841
3955
|
super(...arguments), this.isOpen = !1, this.onResizeHandler = () => {
|
|
3842
|
-
this.isOpen && window.innerWidth < 768 ?
|
|
3956
|
+
this.isOpen && window.innerWidth < 768 ? Fr(this) : os(this);
|
|
3843
3957
|
};
|
|
3844
3958
|
}
|
|
3845
3959
|
connectedCallback() {
|
|
@@ -3911,7 +4025,7 @@ Vt([
|
|
|
3911
4025
|
V({ type: Object })
|
|
3912
4026
|
], Xe.prototype, "options", 2);
|
|
3913
4027
|
Vt([
|
|
3914
|
-
|
|
4028
|
+
gt()
|
|
3915
4029
|
], Xe.prototype, "isOpen", 2);
|
|
3916
4030
|
Vt([
|
|
3917
4031
|
An("iai-chat")
|
|
@@ -3923,7 +4037,7 @@ Xe = Vt([
|
|
|
3923
4037
|
Ee("iai-chat-popup")
|
|
3924
4038
|
], Xe);
|
|
3925
4039
|
const bi = "https://api-dev.ai.inhabit.work";
|
|
3926
|
-
async function
|
|
4040
|
+
async function Ka(i, e = {}) {
|
|
3927
4041
|
return (await fetch(`${bi}/threads`, {
|
|
3928
4042
|
method: "POST",
|
|
3929
4043
|
headers: {
|
|
@@ -3932,7 +4046,7 @@ async function Va(i, e = {}) {
|
|
|
3932
4046
|
body: JSON.stringify({ assistantId: i, params: e })
|
|
3933
4047
|
})).json();
|
|
3934
4048
|
}
|
|
3935
|
-
async function
|
|
4049
|
+
async function Ja(i, e) {
|
|
3936
4050
|
return (await fetch(`${bi}/threads/${i}/messages`, {
|
|
3937
4051
|
method: "POST",
|
|
3938
4052
|
headers: {
|
|
@@ -3941,7 +4055,7 @@ async function qa(i, e) {
|
|
|
3941
4055
|
body: JSON.stringify({ content: e })
|
|
3942
4056
|
})).json();
|
|
3943
4057
|
}
|
|
3944
|
-
async function
|
|
4058
|
+
async function Qa(i, e, t, n = !1) {
|
|
3945
4059
|
return (await fetch(`${bi}/threads/${i}/functions/${e}`, {
|
|
3946
4060
|
method: "POST",
|
|
3947
4061
|
headers: {
|
|
@@ -3950,7 +4064,7 @@ async function Ka(i, e, t, n = !1) {
|
|
|
3950
4064
|
body: JSON.stringify({ params: t, rerunLLM: n })
|
|
3951
4065
|
})).json();
|
|
3952
4066
|
}
|
|
3953
|
-
function
|
|
4067
|
+
function Ya(i) {
|
|
3954
4068
|
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
3955
4069
|
var n = i.get(e);
|
|
3956
4070
|
n ? n.push(t) : i.set(e, [t]);
|
|
@@ -4000,7 +4114,7 @@ class Ga {
|
|
|
4000
4114
|
simulateDelays: !1,
|
|
4001
4115
|
historyKey: "main",
|
|
4002
4116
|
...t
|
|
4003
|
-
}, this._emitter =
|
|
4117
|
+
}, this._emitter = Ya(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), t.events && Object.entries(t.events).forEach(([n, s]) => {
|
|
4004
4118
|
this._emitter.on(n, s);
|
|
4005
4119
|
}), t.historyKey) {
|
|
4006
4120
|
this._messages = this.storageGet("messageHistory", []);
|
|
@@ -4059,7 +4173,7 @@ class Ga {
|
|
|
4059
4173
|
async startChat() {
|
|
4060
4174
|
if (this.chatStarted)
|
|
4061
4175
|
return;
|
|
4062
|
-
const { id: e, inactivityWaitTime: t, inactivityWarningTime: n } = await
|
|
4176
|
+
const { id: e, inactivityWaitTime: t, inactivityWarningTime: n } = await Ka(this.assistantId, this.params);
|
|
4063
4177
|
if (!e)
|
|
4064
4178
|
throw new Error("Could not start chat");
|
|
4065
4179
|
this.setConversationDetails({ threadId: e, inactivityWaitTime: t, inactivityWarningTime: n });
|
|
@@ -4081,7 +4195,7 @@ class Ga {
|
|
|
4081
4195
|
const s = this.simulateDelay(2e3);
|
|
4082
4196
|
this.keepAlive(), await this.insertMessagesWithSimulatedDelays(
|
|
4083
4197
|
Promise.all([
|
|
4084
|
-
|
|
4198
|
+
Qa(this.threadId, e, t, n),
|
|
4085
4199
|
s
|
|
4086
4200
|
]).then(([r]) => r)
|
|
4087
4201
|
);
|
|
@@ -4105,7 +4219,7 @@ class Ga {
|
|
|
4105
4219
|
this.keepAlive();
|
|
4106
4220
|
const { messages: n, functions: s } = await this.insertMessagesWithSimulatedDelays(
|
|
4107
4221
|
Promise.all([
|
|
4108
|
-
|
|
4222
|
+
Ja(this.threadId, e),
|
|
4109
4223
|
t
|
|
4110
4224
|
]).then(([r]) => r)
|
|
4111
4225
|
);
|
|
@@ -4196,7 +4310,7 @@ class Ga {
|
|
|
4196
4310
|
function Re(i, e, t) {
|
|
4197
4311
|
return i ? e(i) : t == null ? void 0 : t(i);
|
|
4198
4312
|
}
|
|
4199
|
-
function
|
|
4313
|
+
function Xa(i) {
|
|
4200
4314
|
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4201
4315
|
var n = i.get(e);
|
|
4202
4316
|
n ? n.push(t) : i.set(e, [t]);
|
|
@@ -4224,7 +4338,7 @@ const Ht = z`
|
|
|
4224
4338
|
<path
|
|
4225
4339
|
d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
|
|
4226
4340
|
</svg>
|
|
4227
|
-
`,
|
|
4341
|
+
`, eo = z`
|
|
4228
4342
|
<svg
|
|
4229
4343
|
xmlns="http://www.w3.org/2000/svg"
|
|
4230
4344
|
viewBox="0 0 24 24"
|
|
@@ -4236,7 +4350,7 @@ const Ht = z`
|
|
|
4236
4350
|
<path
|
|
4237
4351
|
d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z"/>
|
|
4238
4352
|
</svg>
|
|
4239
|
-
`,
|
|
4353
|
+
`, to = z`
|
|
4240
4354
|
<svg
|
|
4241
4355
|
xmlns="http://www.w3.org/2000/svg"
|
|
4242
4356
|
viewBox="0 0 24 24"
|
|
@@ -4247,7 +4361,7 @@ const Ht = z`
|
|
|
4247
4361
|
<title>send</title>
|
|
4248
4362
|
<path d="M2,21L23,12L2,3V10L17,12L2,14V21Z"/>
|
|
4249
4363
|
</svg>
|
|
4250
|
-
`,
|
|
4364
|
+
`, no = z`
|
|
4251
4365
|
<svg
|
|
4252
4366
|
xmlns="http://www.w3.org/2000/svg"
|
|
4253
4367
|
viewBox="0 0 24 24"
|
|
@@ -4259,21 +4373,21 @@ const Ht = z`
|
|
|
4259
4373
|
<path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" />
|
|
4260
4374
|
</svg>
|
|
4261
4375
|
`;
|
|
4262
|
-
var
|
|
4263
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
4376
|
+
var io = Object.defineProperty, so = Object.getOwnPropertyDescriptor, ue = (i, e, t, n) => {
|
|
4377
|
+
for (var s = n > 1 ? void 0 : n ? so(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
4264
4378
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
4265
|
-
return n && s &&
|
|
4379
|
+
return n && s && io(e, t, s), s;
|
|
4266
4380
|
}, Hs = (i, e, t) => {
|
|
4267
4381
|
if (!e.has(i))
|
|
4268
4382
|
throw TypeError("Cannot " + t);
|
|
4269
|
-
}, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)),
|
|
4383
|
+
}, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)), us = (i, e, t) => {
|
|
4270
4384
|
if (e.has(i))
|
|
4271
4385
|
throw TypeError("Cannot add the same private member more than once");
|
|
4272
4386
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
4273
|
-
},
|
|
4387
|
+
}, hs = (i, e, t, n) => (Hs(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Oe, an;
|
|
4274
4388
|
let ie = class extends ne {
|
|
4275
4389
|
constructor() {
|
|
4276
|
-
super(),
|
|
4390
|
+
super(), us(this, Oe, void 0), us(this, an, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Xa(), this._emitter.on("*", (i, e) => this.dispatchEvent(
|
|
4277
4391
|
new CustomEvent(`iai-chat-${i.toString()}`, {
|
|
4278
4392
|
bubbles: !0,
|
|
4279
4393
|
// Allow events to be reached through other elements
|
|
@@ -4288,7 +4402,7 @@ let ie = class extends ne {
|
|
|
4288
4402
|
connectedCallback() {
|
|
4289
4403
|
super.connectedCallback(), this.cleanOptions = Pn.parse(this.options || {});
|
|
4290
4404
|
const { assistantId: i, params: e, config: t } = this.cleanOptions;
|
|
4291
|
-
|
|
4405
|
+
hs(this, Oe, new Ga(i, {
|
|
4292
4406
|
params: e,
|
|
4293
4407
|
simulateDelays: t.simulateDelays,
|
|
4294
4408
|
historyKey: t.historyKey,
|
|
@@ -4356,7 +4470,7 @@ let ie = class extends ne {
|
|
|
4356
4470
|
class="mr-2 h-6"
|
|
4357
4471
|
@click="${this.resetChat}"
|
|
4358
4472
|
>
|
|
4359
|
-
${
|
|
4473
|
+
${no}
|
|
4360
4474
|
</button>
|
|
4361
4475
|
|
|
4362
4476
|
${Re(n, () => z`
|
|
@@ -4401,7 +4515,7 @@ let ie = class extends ne {
|
|
|
4401
4515
|
class="button rounded-lg p-2 disabled:opacity-50 h-9"
|
|
4402
4516
|
.disabled="${this.isSubmitDisabled}"
|
|
4403
4517
|
>
|
|
4404
|
-
${
|
|
4518
|
+
${to}
|
|
4405
4519
|
</button>
|
|
4406
4520
|
</div>
|
|
4407
4521
|
</form>
|
|
@@ -4465,7 +4579,7 @@ let ie = class extends ne {
|
|
|
4465
4579
|
message: this.inputValue
|
|
4466
4580
|
},
|
|
4467
4581
|
cancelable: !0
|
|
4468
|
-
})) && (await rt(this, an),
|
|
4582
|
+
})) && (await rt(this, an), hs(this, an, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.inputElement && (this.inputElement.style.height = "auto"), this.internalDisableInput = !1, setTimeout(() => {
|
|
4469
4583
|
this.focusOnInput();
|
|
4470
4584
|
}, 0));
|
|
4471
4585
|
}
|
|
@@ -4542,37 +4656,37 @@ ie.styles = [Se, nt`
|
|
|
4542
4656
|
color: #8c8c8c;
|
|
4543
4657
|
}
|
|
4544
4658
|
`];
|
|
4545
|
-
|
|
4659
|
+
ue([
|
|
4546
4660
|
V({ type: Object })
|
|
4547
4661
|
], ie.prototype, "options", 2);
|
|
4548
|
-
|
|
4662
|
+
ue([
|
|
4549
4663
|
V()
|
|
4550
4664
|
], ie.prototype, "disableInput", 2);
|
|
4551
|
-
|
|
4665
|
+
ue([
|
|
4552
4666
|
V()
|
|
4553
4667
|
], ie.prototype, "showTyping", 2);
|
|
4554
|
-
|
|
4555
|
-
|
|
4668
|
+
ue([
|
|
4669
|
+
gt()
|
|
4556
4670
|
], ie.prototype, "messages", 2);
|
|
4557
|
-
|
|
4558
|
-
|
|
4671
|
+
ue([
|
|
4672
|
+
gt()
|
|
4559
4673
|
], ie.prototype, "inputValue", 2);
|
|
4560
|
-
|
|
4561
|
-
|
|
4674
|
+
ue([
|
|
4675
|
+
gt()
|
|
4562
4676
|
], ie.prototype, "internalDisableInput", 2);
|
|
4563
|
-
|
|
4564
|
-
|
|
4677
|
+
ue([
|
|
4678
|
+
gt()
|
|
4565
4679
|
], ie.prototype, "internalShowTyping", 2);
|
|
4566
|
-
|
|
4680
|
+
ue([
|
|
4567
4681
|
An("#chat-container")
|
|
4568
4682
|
], ie.prototype, "chatContainer", 2);
|
|
4569
|
-
|
|
4683
|
+
ue([
|
|
4570
4684
|
An("#message-input")
|
|
4571
4685
|
], ie.prototype, "inputElement", 2);
|
|
4572
|
-
|
|
4686
|
+
ue([
|
|
4573
4687
|
vi.debounce(1)
|
|
4574
4688
|
], ie.prototype, "scrollChatToBottom", 1);
|
|
4575
|
-
ie =
|
|
4689
|
+
ie = ue([
|
|
4576
4690
|
Ee("iai-chat")
|
|
4577
4691
|
], ie);
|
|
4578
4692
|
var Bs = { exports: {} };
|
|
@@ -4580,12 +4694,12 @@ var Bs = { exports: {} };
|
|
|
4580
4694
|
(function(e) {
|
|
4581
4695
|
if (typeof window > "u")
|
|
4582
4696
|
return;
|
|
4583
|
-
var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null,
|
|
4697
|
+
var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null, u = window.requestAnimationFrame, p = Object.freeze({
|
|
4584
4698
|
max: 1,
|
|
4585
4699
|
scroll: 1,
|
|
4586
4700
|
bodyScroll: 1,
|
|
4587
4701
|
documentElementScroll: 1
|
|
4588
|
-
}), c = {},
|
|
4702
|
+
}), c = {}, g = null, O = Object.freeze({
|
|
4589
4703
|
autoResize: !0,
|
|
4590
4704
|
bodyBackground: null,
|
|
4591
4705
|
bodyMargin: null,
|
|
@@ -4633,58 +4747,58 @@ var Bs = { exports: {} };
|
|
|
4633
4747
|
function H() {
|
|
4634
4748
|
return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
4635
4749
|
}
|
|
4636
|
-
function J(
|
|
4637
|
-
|
|
4750
|
+
function J(h, v, M) {
|
|
4751
|
+
h.addEventListener(v, M, !1);
|
|
4638
4752
|
}
|
|
4639
|
-
function Ce(
|
|
4640
|
-
|
|
4753
|
+
function Ce(h, v, M) {
|
|
4754
|
+
h.removeEventListener(v, M, !1);
|
|
4641
4755
|
}
|
|
4642
|
-
function
|
|
4643
|
-
var
|
|
4644
|
-
for (v = 0; v <
|
|
4645
|
-
|
|
4646
|
-
|
|
4756
|
+
function Qt() {
|
|
4757
|
+
var h = ["moz", "webkit", "o", "ms"], v;
|
|
4758
|
+
for (v = 0; v < h.length && !u; v += 1)
|
|
4759
|
+
u = window[h[v] + "RequestAnimationFrame"];
|
|
4760
|
+
u ? u = u.bind(window) : N("setup", "RequestAnimationFrame not supported");
|
|
4647
4761
|
}
|
|
4648
|
-
function
|
|
4649
|
-
var v = "Host page: " +
|
|
4650
|
-
return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " +
|
|
4762
|
+
function Yt(h) {
|
|
4763
|
+
var v = "Host page: " + h;
|
|
4764
|
+
return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + h : "Nested host page: " + h), v;
|
|
4651
4765
|
}
|
|
4652
|
-
function
|
|
4653
|
-
return o + "[" +
|
|
4766
|
+
function Gt(h) {
|
|
4767
|
+
return o + "[" + Yt(h) + "]";
|
|
4654
4768
|
}
|
|
4655
|
-
function st(
|
|
4656
|
-
return c[
|
|
4769
|
+
function st(h) {
|
|
4770
|
+
return c[h] ? c[h].log : n;
|
|
4657
4771
|
}
|
|
4658
|
-
function
|
|
4659
|
-
Zn("log",
|
|
4772
|
+
function N(h, v) {
|
|
4773
|
+
Zn("log", h, v, st(h));
|
|
4660
4774
|
}
|
|
4661
|
-
function Ci(
|
|
4662
|
-
Zn("info",
|
|
4775
|
+
function Ci(h, v) {
|
|
4776
|
+
Zn("info", h, v, st(h));
|
|
4663
4777
|
}
|
|
4664
|
-
function se(
|
|
4665
|
-
Zn("warn",
|
|
4778
|
+
function se(h, v) {
|
|
4779
|
+
Zn("warn", h, v, !0);
|
|
4666
4780
|
}
|
|
4667
|
-
function Zn(
|
|
4668
|
-
|
|
4781
|
+
function Zn(h, v, M, _) {
|
|
4782
|
+
_ === !0 && typeof window.console == "object" && console[h](Gt(v), M);
|
|
4669
4783
|
}
|
|
4670
|
-
function or(
|
|
4784
|
+
function or(h) {
|
|
4671
4785
|
function v() {
|
|
4672
4786
|
function b() {
|
|
4673
|
-
|
|
4787
|
+
Ni(j), Oi(E), Le("onResized", j);
|
|
4674
4788
|
}
|
|
4675
|
-
Z("Height"), Z("Width"),
|
|
4789
|
+
Z("Height"), Z("Width"), Pi(b, j, "init");
|
|
4676
4790
|
}
|
|
4677
4791
|
function M() {
|
|
4678
4792
|
var b = ae.slice(l).split(":"), C = b[1] ? parseInt(b[1], 10) : 0, U = c[b[0]] && c[b[0]].iframe, B = getComputedStyle(U);
|
|
4679
4793
|
return {
|
|
4680
4794
|
iframe: U,
|
|
4681
4795
|
id: b[0],
|
|
4682
|
-
height: C +
|
|
4796
|
+
height: C + _(B) + R(B),
|
|
4683
4797
|
width: b[2],
|
|
4684
4798
|
type: b[3]
|
|
4685
4799
|
};
|
|
4686
4800
|
}
|
|
4687
|
-
function
|
|
4801
|
+
function _(b) {
|
|
4688
4802
|
if (b.boxSizing !== "border-box")
|
|
4689
4803
|
return 0;
|
|
4690
4804
|
var C = b.paddingTop ? parseInt(b.paddingTop, 10) : 0, U = b.paddingBottom ? parseInt(b.paddingBottom, 10) : 0;
|
|
@@ -4697,14 +4811,14 @@ var Bs = { exports: {} };
|
|
|
4697
4811
|
return C + U;
|
|
4698
4812
|
}
|
|
4699
4813
|
function Z(b) {
|
|
4700
|
-
var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]), B = b.toLowerCase(),
|
|
4701
|
-
|
|
4814
|
+
var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]), B = b.toLowerCase(), Q = Number(j[B]);
|
|
4815
|
+
N(E, "Checking " + B + " is in range " + U + "-" + C), Q < U && (Q = U, N(E, "Set " + B + " to min value")), Q > C && (Q = C, N(E, "Set " + B + " to max value")), j[B] = "" + Q;
|
|
4702
4816
|
}
|
|
4703
4817
|
function pe() {
|
|
4704
4818
|
function b() {
|
|
4705
4819
|
function B() {
|
|
4706
4820
|
var X = 0, xe = !1;
|
|
4707
|
-
for (
|
|
4821
|
+
for (N(
|
|
4708
4822
|
E,
|
|
4709
4823
|
"Checking connection is from allowed list of origins: " + U
|
|
4710
4824
|
); X < U.length; X++)
|
|
@@ -4714,16 +4828,16 @@ var Bs = { exports: {} };
|
|
|
4714
4828
|
}
|
|
4715
4829
|
return xe;
|
|
4716
4830
|
}
|
|
4717
|
-
function
|
|
4831
|
+
function Q() {
|
|
4718
4832
|
var X = c[E] && c[E].remoteHost;
|
|
4719
|
-
return
|
|
4833
|
+
return N(E, "Checking connection is from: " + X), C === X;
|
|
4720
4834
|
}
|
|
4721
|
-
return U.constructor === Array ? B() :
|
|
4835
|
+
return U.constructor === Array ? B() : Q();
|
|
4722
4836
|
}
|
|
4723
|
-
var C =
|
|
4837
|
+
var C = h.origin, U = c[E] && c[E].checkOrigin;
|
|
4724
4838
|
if (U && "" + C != "null" && !b())
|
|
4725
4839
|
throw new Error(
|
|
4726
|
-
"Unexpected message received from: " + C + " for " + j.iframe.id + ". Message was: " +
|
|
4840
|
+
"Unexpected message received from: " + C + " for " + j.iframe.id + ". Message was: " + h.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains."
|
|
4727
4841
|
);
|
|
4728
4842
|
return !0;
|
|
4729
4843
|
}
|
|
@@ -4732,19 +4846,19 @@ var Bs = { exports: {} };
|
|
|
4732
4846
|
}
|
|
4733
4847
|
function be() {
|
|
4734
4848
|
var b = j.type in { true: 1, false: 1, undefined: 1 };
|
|
4735
|
-
return b &&
|
|
4849
|
+
return b && N(E, "Ignoring init message from meta parent page"), b;
|
|
4736
4850
|
}
|
|
4737
4851
|
function we(b) {
|
|
4738
4852
|
return ae.slice(ae.indexOf(":") + a + b);
|
|
4739
4853
|
}
|
|
4740
4854
|
function Ae(b) {
|
|
4741
|
-
|
|
4855
|
+
N(
|
|
4742
4856
|
E,
|
|
4743
4857
|
"onMessage passed: {iframe: " + j.iframe.id + ", message: " + b + "}"
|
|
4744
4858
|
), Le("onMessage", {
|
|
4745
4859
|
iframe: j.iframe,
|
|
4746
4860
|
message: JSON.parse(b)
|
|
4747
|
-
}),
|
|
4861
|
+
}), N(E, "--");
|
|
4748
4862
|
}
|
|
4749
4863
|
function Wn() {
|
|
4750
4864
|
var b = document.body.getBoundingClientRect(), C = j.iframe.getBoundingClientRect();
|
|
@@ -4771,17 +4885,17 @@ var Bs = { exports: {} };
|
|
|
4771
4885
|
}
|
|
4772
4886
|
function Xt(b, C) {
|
|
4773
4887
|
function U() {
|
|
4774
|
-
|
|
4888
|
+
he("Send Page Info", "pageInfo:" + Wn(), b, C);
|
|
4775
4889
|
}
|
|
4776
4890
|
cr(U, 32, C);
|
|
4777
4891
|
}
|
|
4778
4892
|
function Fn() {
|
|
4779
|
-
function b(
|
|
4893
|
+
function b(Q, X) {
|
|
4780
4894
|
function xe() {
|
|
4781
4895
|
c[B] ? Xt(c[B].iframe, B) : C();
|
|
4782
4896
|
}
|
|
4783
4897
|
["scroll", "resize"].forEach(function(Di) {
|
|
4784
|
-
|
|
4898
|
+
N(B, Q + Di + " listener for sendPageInfo"), X(window, Di, xe);
|
|
4785
4899
|
});
|
|
4786
4900
|
}
|
|
4787
4901
|
function C() {
|
|
@@ -4800,7 +4914,7 @@ var Bs = { exports: {} };
|
|
|
4800
4914
|
var b = !0;
|
|
4801
4915
|
return j.iframe === null && (se(E, "IFrame (" + j.id + ") not found"), b = !1), b;
|
|
4802
4916
|
}
|
|
4803
|
-
function
|
|
4917
|
+
function k(b) {
|
|
4804
4918
|
var C = b.getBoundingClientRect();
|
|
4805
4919
|
return Ii(E), {
|
|
4806
4920
|
x: Math.floor(Number(C.left) + Number(d.x)),
|
|
@@ -4809,12 +4923,12 @@ var Bs = { exports: {} };
|
|
|
4809
4923
|
}
|
|
4810
4924
|
function $(b) {
|
|
4811
4925
|
function C() {
|
|
4812
|
-
d = X, K(),
|
|
4926
|
+
d = X, K(), N(E, "--");
|
|
4813
4927
|
}
|
|
4814
4928
|
function U() {
|
|
4815
4929
|
return {
|
|
4816
|
-
x: Number(j.width) +
|
|
4817
|
-
y: Number(j.height) +
|
|
4930
|
+
x: Number(j.width) + Q.x,
|
|
4931
|
+
y: Number(j.height) + Q.y
|
|
4818
4932
|
};
|
|
4819
4933
|
}
|
|
4820
4934
|
function B() {
|
|
@@ -4826,34 +4940,34 @@ var Bs = { exports: {} };
|
|
|
4826
4940
|
"Unable to scroll to requested position, window.parentIFrame not found"
|
|
4827
4941
|
);
|
|
4828
4942
|
}
|
|
4829
|
-
var
|
|
4830
|
-
|
|
4943
|
+
var Q = b ? k(j.iframe) : { x: 0, y: 0 }, X = U();
|
|
4944
|
+
N(
|
|
4831
4945
|
E,
|
|
4832
|
-
"Reposition requested from iFrame (offset x:" +
|
|
4946
|
+
"Reposition requested from iFrame (offset x:" + Q.x + " y:" + Q.y + ")"
|
|
4833
4947
|
), window.top === window.self ? C() : B();
|
|
4834
4948
|
}
|
|
4835
4949
|
function K() {
|
|
4836
4950
|
Le("onScroll", d) === !1 ? Mi() : Oi(E);
|
|
4837
4951
|
}
|
|
4838
|
-
function
|
|
4952
|
+
function Y(b) {
|
|
4839
4953
|
function C() {
|
|
4840
|
-
var xe =
|
|
4841
|
-
|
|
4954
|
+
var xe = k(X);
|
|
4955
|
+
N(
|
|
4842
4956
|
E,
|
|
4843
4957
|
"Moving to in page link (#" + B + ") at x: " + xe.x + " y: " + xe.y
|
|
4844
4958
|
), d = {
|
|
4845
4959
|
x: xe.x,
|
|
4846
4960
|
y: xe.y
|
|
4847
|
-
}, K(),
|
|
4961
|
+
}, K(), N(E, "--");
|
|
4848
4962
|
}
|
|
4849
4963
|
function U() {
|
|
4850
|
-
window.parentIFrame ? window.parentIFrame.moveToAnchor(B) :
|
|
4964
|
+
window.parentIFrame ? window.parentIFrame.moveToAnchor(B) : N(
|
|
4851
4965
|
E,
|
|
4852
4966
|
"In page link #" + B + " not found and window.parentIFrame not found"
|
|
4853
4967
|
);
|
|
4854
4968
|
}
|
|
4855
|
-
var B = b.split("#")[1] || "",
|
|
4856
|
-
X ? C() : window.top === window.self ?
|
|
4969
|
+
var B = b.split("#")[1] || "", Q = decodeURIComponent(B), X = document.getElementById(Q) || document.getElementsByName(Q)[0];
|
|
4970
|
+
X ? C() : window.top === window.self ? N(E, "In page link #" + B + " not found") : U();
|
|
4857
4971
|
}
|
|
4858
4972
|
function re(b) {
|
|
4859
4973
|
var C = {};
|
|
@@ -4879,7 +4993,7 @@ var Bs = { exports: {} };
|
|
|
4879
4993
|
return Ln(E, b, C);
|
|
4880
4994
|
}
|
|
4881
4995
|
function Kn() {
|
|
4882
|
-
switch (c[E] && c[E].firstRun &&
|
|
4996
|
+
switch (c[E] && c[E].firstRun && Yn(), j.type) {
|
|
4883
4997
|
case "close": {
|
|
4884
4998
|
Dn(j.iframe);
|
|
4885
4999
|
break;
|
|
@@ -4920,7 +5034,7 @@ var Bs = { exports: {} };
|
|
|
4920
5034
|
break;
|
|
4921
5035
|
}
|
|
4922
5036
|
case "inPageLink": {
|
|
4923
|
-
|
|
5037
|
+
Y(we(9));
|
|
4924
5038
|
break;
|
|
4925
5039
|
}
|
|
4926
5040
|
case "reset": {
|
|
@@ -4943,240 +5057,240 @@ var Bs = { exports: {} };
|
|
|
4943
5057
|
j.type + " No settings for " + b + ". Message was: " + ae
|
|
4944
5058
|
)), C;
|
|
4945
5059
|
}
|
|
4946
|
-
function
|
|
5060
|
+
function Qn() {
|
|
4947
5061
|
for (var b in c)
|
|
4948
|
-
|
|
5062
|
+
he(
|
|
4949
5063
|
"iFrame requested init",
|
|
4950
5064
|
ji(b),
|
|
4951
5065
|
c[b].iframe,
|
|
4952
5066
|
b
|
|
4953
5067
|
);
|
|
4954
5068
|
}
|
|
4955
|
-
function
|
|
5069
|
+
function Yn() {
|
|
4956
5070
|
c[E] && (c[E].firstRun = !1);
|
|
4957
5071
|
}
|
|
4958
|
-
var ae =
|
|
4959
|
-
ae === "[iFrameResizerChild]Ready" ?
|
|
4960
|
-
}
|
|
4961
|
-
function Ln(
|
|
4962
|
-
var
|
|
4963
|
-
if (c[
|
|
4964
|
-
if (
|
|
4965
|
-
R =
|
|
5072
|
+
var ae = h.data, j = {}, E = null;
|
|
5073
|
+
ae === "[iFrameResizerChild]Ready" ? Qn() : Ze() ? (j = M(), E = j.id, c[E] && (c[E].loaded = !0), !be() && Jn(E) && (N(E, "Received: " + ae), qn() && pe() && Kn())) : Ci(E, "Ignored: " + ae);
|
|
5074
|
+
}
|
|
5075
|
+
function Ln(h, v, M) {
|
|
5076
|
+
var _ = null, R = null;
|
|
5077
|
+
if (c[h])
|
|
5078
|
+
if (_ = c[h][v], typeof _ == "function")
|
|
5079
|
+
R = _(M);
|
|
4966
5080
|
else
|
|
4967
5081
|
throw new TypeError(
|
|
4968
|
-
v + " on iFrame[" +
|
|
5082
|
+
v + " on iFrame[" + h + "] is not a function"
|
|
4969
5083
|
);
|
|
4970
5084
|
return R;
|
|
4971
5085
|
}
|
|
4972
|
-
function Ai(
|
|
4973
|
-
var v =
|
|
5086
|
+
function Ai(h) {
|
|
5087
|
+
var v = h.id;
|
|
4974
5088
|
delete c[v];
|
|
4975
5089
|
}
|
|
4976
|
-
function Dn(
|
|
4977
|
-
var v =
|
|
5090
|
+
function Dn(h) {
|
|
5091
|
+
var v = h.id;
|
|
4978
5092
|
if (Ln(v, "onClose", v) === !1) {
|
|
4979
|
-
|
|
5093
|
+
N(v, "Close iframe cancelled by onClose event");
|
|
4980
5094
|
return;
|
|
4981
5095
|
}
|
|
4982
|
-
|
|
5096
|
+
N(v, "Removing iFrame: " + v);
|
|
4983
5097
|
try {
|
|
4984
|
-
|
|
5098
|
+
h.parentNode && h.parentNode.removeChild(h);
|
|
4985
5099
|
} catch (M) {
|
|
4986
5100
|
se(M);
|
|
4987
5101
|
}
|
|
4988
|
-
Ln(v, "onClosed", v),
|
|
5102
|
+
Ln(v, "onClosed", v), N(v, "--"), Ai(h);
|
|
4989
5103
|
}
|
|
4990
|
-
function Ii(
|
|
5104
|
+
function Ii(h) {
|
|
4991
5105
|
d === null && (d = {
|
|
4992
5106
|
x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
|
|
4993
5107
|
y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
|
|
4994
|
-
},
|
|
4995
|
-
|
|
5108
|
+
}, N(
|
|
5109
|
+
h,
|
|
4996
5110
|
"Get page position: " + d.x + "," + d.y
|
|
4997
5111
|
));
|
|
4998
5112
|
}
|
|
4999
|
-
function Oi(
|
|
5000
|
-
d !== null && (window.scrollTo(d.x, d.y),
|
|
5001
|
-
|
|
5113
|
+
function Oi(h) {
|
|
5114
|
+
d !== null && (window.scrollTo(d.x, d.y), N(
|
|
5115
|
+
h,
|
|
5002
5116
|
"Set page position: " + d.x + "," + d.y
|
|
5003
5117
|
), Mi());
|
|
5004
5118
|
}
|
|
5005
5119
|
function Mi() {
|
|
5006
5120
|
d = null;
|
|
5007
5121
|
}
|
|
5008
|
-
function Ri(
|
|
5122
|
+
function Ri(h) {
|
|
5009
5123
|
function v() {
|
|
5010
|
-
|
|
5124
|
+
Ni(h), he("reset", "reset", h.iframe, h.id);
|
|
5011
5125
|
}
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
"Size reset requested by " + (
|
|
5015
|
-
), Ii(
|
|
5126
|
+
N(
|
|
5127
|
+
h.id,
|
|
5128
|
+
"Size reset requested by " + (h.type === "init" ? "host page" : "iFrame")
|
|
5129
|
+
), Ii(h.id), Pi(v, h, "reset");
|
|
5016
5130
|
}
|
|
5017
|
-
function
|
|
5131
|
+
function Ni(h) {
|
|
5018
5132
|
function v(Z) {
|
|
5019
|
-
if (!
|
|
5020
|
-
|
|
5133
|
+
if (!h.id) {
|
|
5134
|
+
N("undefined", "messageData id not set");
|
|
5021
5135
|
return;
|
|
5022
5136
|
}
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
"IFrame (" + R + ") " + Z + " set to " +
|
|
5137
|
+
h.iframe.style[Z] = h[Z] + "px", N(
|
|
5138
|
+
h.id,
|
|
5139
|
+
"IFrame (" + R + ") " + Z + " set to " + h[Z] + "px"
|
|
5026
5140
|
);
|
|
5027
5141
|
}
|
|
5028
5142
|
function M(Z) {
|
|
5029
|
-
!s &&
|
|
5143
|
+
!s && h[Z] === "0" && (s = !0, N(R, "Hidden iFrame detected, creating visibility listener"), dr());
|
|
5030
5144
|
}
|
|
5031
|
-
function
|
|
5145
|
+
function _(Z) {
|
|
5032
5146
|
v(Z), M(Z);
|
|
5033
5147
|
}
|
|
5034
|
-
var R =
|
|
5035
|
-
c[R] && (c[R].sizeHeight &&
|
|
5148
|
+
var R = h.iframe.id;
|
|
5149
|
+
c[R] && (c[R].sizeHeight && _("height"), c[R].sizeWidth && _("width"));
|
|
5036
5150
|
}
|
|
5037
|
-
function
|
|
5038
|
-
M !== v.type &&
|
|
5039
|
-
!window.jasmine ? (
|
|
5151
|
+
function Pi(h, v, M) {
|
|
5152
|
+
M !== v.type && u && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
|
5153
|
+
!window.jasmine ? (N(v.id, "Requesting animation frame"), u(h)) : h();
|
|
5040
5154
|
}
|
|
5041
|
-
function
|
|
5155
|
+
function he(h, v, M, _, R) {
|
|
5042
5156
|
function Z() {
|
|
5043
|
-
var Ae = c[
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
"[" +
|
|
5157
|
+
var Ae = c[_] && c[_].targetOrigin;
|
|
5158
|
+
N(
|
|
5159
|
+
_,
|
|
5160
|
+
"[" + h + "] Sending msg to iframe[" + _ + "] (" + v + ") targetOrigin: " + Ae
|
|
5047
5161
|
), M.contentWindow.postMessage(o + v, Ae);
|
|
5048
5162
|
}
|
|
5049
5163
|
function pe() {
|
|
5050
|
-
se(
|
|
5164
|
+
se(_, "[" + h + "] IFrame(" + _ + ") not found");
|
|
5051
5165
|
}
|
|
5052
5166
|
function Ze() {
|
|
5053
5167
|
M && "contentWindow" in M && M.contentWindow !== null ? Z() : pe();
|
|
5054
5168
|
}
|
|
5055
5169
|
function be() {
|
|
5056
5170
|
function Ae() {
|
|
5057
|
-
c[
|
|
5058
|
-
|
|
5059
|
-
"IFrame has not responded within " + c[
|
|
5171
|
+
c[_] && !c[_].loaded && !we && (we = !0, se(
|
|
5172
|
+
_,
|
|
5173
|
+
"IFrame has not responded within " + c[_].warningTimeout / 1e3 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."
|
|
5060
5174
|
));
|
|
5061
5175
|
}
|
|
5062
|
-
R && c[
|
|
5176
|
+
R && c[_] && c[_].warningTimeout && (c[_].msgTimeout = setTimeout(
|
|
5063
5177
|
Ae,
|
|
5064
|
-
c[
|
|
5178
|
+
c[_].warningTimeout
|
|
5065
5179
|
));
|
|
5066
5180
|
}
|
|
5067
5181
|
var we = !1;
|
|
5068
|
-
|
|
5182
|
+
_ = _ || M.id, c[_] && (Ze(), be());
|
|
5069
5183
|
}
|
|
5070
|
-
function ji(
|
|
5071
|
-
return
|
|
5184
|
+
function ji(h) {
|
|
5185
|
+
return h + ":" + c[h].bodyMarginV1 + ":" + c[h].sizeWidth + ":" + c[h].log + ":" + c[h].interval + ":" + c[h].enablePublicMethods + ":" + c[h].autoResize + ":" + c[h].bodyMargin + ":" + c[h].heightCalculationMethod + ":" + c[h].bodyBackground + ":" + c[h].bodyPadding + ":" + c[h].tolerance + ":" + c[h].inPageLinks + ":" + c[h].resizeFrom + ":" + c[h].widthCalculationMethod + ":" + c[h].mouseEvents;
|
|
5072
5186
|
}
|
|
5073
|
-
function lr(
|
|
5074
|
-
return typeof
|
|
5187
|
+
function lr(h) {
|
|
5188
|
+
return typeof h == "number";
|
|
5075
5189
|
}
|
|
5076
|
-
function zi(
|
|
5190
|
+
function zi(h, v) {
|
|
5077
5191
|
function M() {
|
|
5078
|
-
function $(
|
|
5079
|
-
var re = c[
|
|
5080
|
-
re !== 1 / 0 && re !== 0 && (
|
|
5192
|
+
function $(Y) {
|
|
5193
|
+
var re = c[k][Y];
|
|
5194
|
+
re !== 1 / 0 && re !== 0 && (h.style[Y] = lr(re) ? re + "px" : re, N(k, "Set " + Y + " = " + h.style[Y]));
|
|
5081
5195
|
}
|
|
5082
|
-
function K(
|
|
5083
|
-
if (c[
|
|
5196
|
+
function K(Y) {
|
|
5197
|
+
if (c[k]["min" + Y] > c[k]["max" + Y])
|
|
5084
5198
|
throw new Error(
|
|
5085
|
-
"Value for min" +
|
|
5199
|
+
"Value for min" + Y + " can not be greater than max" + Y
|
|
5086
5200
|
);
|
|
5087
5201
|
}
|
|
5088
5202
|
K("Height"), K("Width"), $("maxHeight"), $("minHeight"), $("maxWidth"), $("minWidth");
|
|
5089
5203
|
}
|
|
5090
|
-
function
|
|
5204
|
+
function _() {
|
|
5091
5205
|
var $ = v && v.id || O.id + t++;
|
|
5092
5206
|
return document.getElementById($) !== null && ($ += t++), $;
|
|
5093
5207
|
}
|
|
5094
5208
|
function R($) {
|
|
5095
5209
|
if (typeof $ != "string")
|
|
5096
5210
|
throw new TypeError("Invaild id for iFrame. Expected String");
|
|
5097
|
-
return $ === "" && (
|
|
5211
|
+
return $ === "" && (h.id = $ = _(), n = (v || {}).log, N(
|
|
5098
5212
|
$,
|
|
5099
|
-
"Added missing iframe ID: " + $ + " (" +
|
|
5213
|
+
"Added missing iframe ID: " + $ + " (" + h.src + ")"
|
|
5100
5214
|
)), $;
|
|
5101
5215
|
}
|
|
5102
5216
|
function Z() {
|
|
5103
|
-
switch (
|
|
5104
|
-
|
|
5105
|
-
"IFrame scrolling " + (c[
|
|
5106
|
-
),
|
|
5217
|
+
switch (N(
|
|
5218
|
+
k,
|
|
5219
|
+
"IFrame scrolling " + (c[k] && c[k].scrolling ? "enabled" : "disabled") + " for " + k
|
|
5220
|
+
), h.style.overflow = (c[k] && c[k].scrolling) === !1 ? "hidden" : "auto", c[k] && c[k].scrolling) {
|
|
5107
5221
|
case "omit":
|
|
5108
5222
|
break;
|
|
5109
5223
|
case !0: {
|
|
5110
|
-
|
|
5224
|
+
h.scrolling = "yes";
|
|
5111
5225
|
break;
|
|
5112
5226
|
}
|
|
5113
5227
|
case !1: {
|
|
5114
|
-
|
|
5228
|
+
h.scrolling = "no";
|
|
5115
5229
|
break;
|
|
5116
5230
|
}
|
|
5117
5231
|
default:
|
|
5118
|
-
|
|
5232
|
+
h.scrolling = c[k] ? c[k].scrolling : "no";
|
|
5119
5233
|
}
|
|
5120
5234
|
}
|
|
5121
5235
|
function pe() {
|
|
5122
|
-
(typeof (c[
|
|
5236
|
+
(typeof (c[k] && c[k].bodyMargin) == "number" || (c[k] && c[k].bodyMargin) === "0") && (c[k].bodyMarginV1 = c[k].bodyMargin, c[k].bodyMargin = "" + c[k].bodyMargin + "px");
|
|
5123
5237
|
}
|
|
5124
5238
|
function Ze() {
|
|
5125
|
-
var $ = c[
|
|
5126
|
-
!$ && K && Ri({ iframe:
|
|
5239
|
+
var $ = c[k] && c[k].firstRun, K = c[k] && c[k].heightCalculationMethod in p;
|
|
5240
|
+
!$ && K && Ri({ iframe: h, height: 0, width: 0, type: "init" });
|
|
5127
5241
|
}
|
|
5128
5242
|
function be() {
|
|
5129
|
-
c[
|
|
5130
|
-
close: Dn.bind(null, c[
|
|
5243
|
+
c[k] && (c[k].iframe.iFrameResizer = {
|
|
5244
|
+
close: Dn.bind(null, c[k].iframe),
|
|
5131
5245
|
removeListeners: Ai.bind(
|
|
5132
5246
|
null,
|
|
5133
|
-
c[
|
|
5247
|
+
c[k].iframe
|
|
5134
5248
|
),
|
|
5135
|
-
resize:
|
|
5249
|
+
resize: he.bind(
|
|
5136
5250
|
null,
|
|
5137
5251
|
"Window resize",
|
|
5138
5252
|
"resize",
|
|
5139
|
-
c[
|
|
5253
|
+
c[k].iframe
|
|
5140
5254
|
),
|
|
5141
5255
|
moveToAnchor: function($) {
|
|
5142
|
-
|
|
5256
|
+
he(
|
|
5143
5257
|
"Move to anchor",
|
|
5144
5258
|
"moveToAnchor:" + $,
|
|
5145
|
-
c[
|
|
5146
|
-
|
|
5259
|
+
c[k].iframe,
|
|
5260
|
+
k
|
|
5147
5261
|
);
|
|
5148
5262
|
},
|
|
5149
5263
|
sendMessage: function($) {
|
|
5150
|
-
$ = JSON.stringify($),
|
|
5264
|
+
$ = JSON.stringify($), he(
|
|
5151
5265
|
"Send Message",
|
|
5152
5266
|
"message:" + $,
|
|
5153
|
-
c[
|
|
5154
|
-
|
|
5267
|
+
c[k].iframe,
|
|
5268
|
+
k
|
|
5155
5269
|
);
|
|
5156
5270
|
}
|
|
5157
5271
|
});
|
|
5158
5272
|
}
|
|
5159
5273
|
function we($) {
|
|
5160
5274
|
function K() {
|
|
5161
|
-
|
|
5275
|
+
he("iFrame.onload", $, h, e, !0), Ze();
|
|
5162
5276
|
}
|
|
5163
|
-
function
|
|
5164
|
-
if (
|
|
5277
|
+
function Y(Le) {
|
|
5278
|
+
if (h.parentNode) {
|
|
5165
5279
|
var Kn = new Le(function(Jn) {
|
|
5166
|
-
Jn.forEach(function(
|
|
5167
|
-
var
|
|
5168
|
-
|
|
5169
|
-
ae ===
|
|
5280
|
+
Jn.forEach(function(Qn) {
|
|
5281
|
+
var Yn = Array.prototype.slice.call(Qn.removedNodes);
|
|
5282
|
+
Yn.forEach(function(ae) {
|
|
5283
|
+
ae === h && Dn(h);
|
|
5170
5284
|
});
|
|
5171
5285
|
});
|
|
5172
5286
|
});
|
|
5173
|
-
Kn.observe(
|
|
5287
|
+
Kn.observe(h.parentNode, {
|
|
5174
5288
|
childList: !0
|
|
5175
5289
|
});
|
|
5176
5290
|
}
|
|
5177
5291
|
}
|
|
5178
5292
|
var re = H();
|
|
5179
|
-
re &&
|
|
5293
|
+
re && Y(re), J(h, "load", K), he("init", $, h, e, !0);
|
|
5180
5294
|
}
|
|
5181
5295
|
function Ae($) {
|
|
5182
5296
|
if (typeof $ != "object")
|
|
@@ -5184,7 +5298,7 @@ var Bs = { exports: {} };
|
|
|
5184
5298
|
}
|
|
5185
5299
|
function Wn($) {
|
|
5186
5300
|
for (var K in O)
|
|
5187
|
-
Object.prototype.hasOwnProperty.call(O, K) && (c[
|
|
5301
|
+
Object.prototype.hasOwnProperty.call(O, K) && (c[k][K] = Object.prototype.hasOwnProperty.call(
|
|
5188
5302
|
$,
|
|
5189
5303
|
K
|
|
5190
5304
|
) ? $[K] : O[K]);
|
|
@@ -5195,35 +5309,35 @@ var Bs = { exports: {} };
|
|
|
5195
5309
|
function Fn($) {
|
|
5196
5310
|
var K = $.split("Callback");
|
|
5197
5311
|
if (K.length === 2) {
|
|
5198
|
-
var
|
|
5199
|
-
this[
|
|
5200
|
-
|
|
5201
|
-
"Deprecated: '" + $ + "' has been renamed '" +
|
|
5312
|
+
var Y = "on" + K[0].charAt(0).toUpperCase() + K[0].slice(1);
|
|
5313
|
+
this[Y] = this[$], delete this[$], se(
|
|
5314
|
+
k,
|
|
5315
|
+
"Deprecated: '" + $ + "' has been renamed '" + Y + "'. The old method will be removed in the next major version."
|
|
5202
5316
|
);
|
|
5203
5317
|
}
|
|
5204
5318
|
}
|
|
5205
5319
|
function Vn($) {
|
|
5206
|
-
$ = $ || {}, c[
|
|
5320
|
+
$ = $ || {}, c[k] = /* @__PURE__ */ Object.create(null), c[k].iframe = h, c[k].firstRun = !0, c[k].remoteHost = h.src && h.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(Fn, $), Wn($), c[k] && (c[k].targetOrigin = c[k].checkOrigin === !0 ? Xt(c[k].remoteHost) : "*");
|
|
5207
5321
|
}
|
|
5208
5322
|
function qn() {
|
|
5209
|
-
return
|
|
5323
|
+
return k in c && "iFrameResizer" in h;
|
|
5210
5324
|
}
|
|
5211
|
-
var
|
|
5212
|
-
qn() ? se(
|
|
5325
|
+
var k = R(h.id);
|
|
5326
|
+
qn() ? se(k, "Ignored iFrame, already setup.") : (Vn(v), Z(), M(), pe(), we(ji(k)), be());
|
|
5213
5327
|
}
|
|
5214
|
-
function Un(
|
|
5215
|
-
|
|
5216
|
-
|
|
5328
|
+
function Un(h, v) {
|
|
5329
|
+
g === null && (g = setTimeout(function() {
|
|
5330
|
+
g = null, h();
|
|
5217
5331
|
}, v));
|
|
5218
5332
|
}
|
|
5219
5333
|
var Hn = {};
|
|
5220
|
-
function cr(
|
|
5334
|
+
function cr(h, v, M) {
|
|
5221
5335
|
Hn[M] || (Hn[M] = setTimeout(function() {
|
|
5222
|
-
Hn[M] = null,
|
|
5336
|
+
Hn[M] = null, h();
|
|
5223
5337
|
}, v));
|
|
5224
5338
|
}
|
|
5225
5339
|
function dr() {
|
|
5226
|
-
function
|
|
5340
|
+
function h() {
|
|
5227
5341
|
function R(Z) {
|
|
5228
5342
|
function pe(be) {
|
|
5229
5343
|
return (c[Z] && c[Z].iframe.style[be]) === "0px";
|
|
@@ -5231,7 +5345,7 @@ var Bs = { exports: {} };
|
|
|
5231
5345
|
function Ze(be) {
|
|
5232
5346
|
return be.offsetParent !== null;
|
|
5233
5347
|
}
|
|
5234
|
-
c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) &&
|
|
5348
|
+
c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) && he(
|
|
5235
5349
|
"Visibility change",
|
|
5236
5350
|
"resize",
|
|
5237
5351
|
c[Z].iframe,
|
|
@@ -5243,10 +5357,10 @@ var Bs = { exports: {} };
|
|
|
5243
5357
|
});
|
|
5244
5358
|
}
|
|
5245
5359
|
function v(R) {
|
|
5246
|
-
|
|
5360
|
+
N(
|
|
5247
5361
|
"window",
|
|
5248
5362
|
"Mutation observed: " + R[0].target + " " + R[0].type
|
|
5249
|
-
), Un(
|
|
5363
|
+
), Un(h, 16);
|
|
5250
5364
|
}
|
|
5251
5365
|
function M() {
|
|
5252
5366
|
var R = document.querySelector("body"), Z = {
|
|
@@ -5256,39 +5370,39 @@ var Bs = { exports: {} };
|
|
|
5256
5370
|
characterDataOldValue: !1,
|
|
5257
5371
|
childList: !0,
|
|
5258
5372
|
subtree: !0
|
|
5259
|
-
}, pe = new
|
|
5373
|
+
}, pe = new _(v);
|
|
5260
5374
|
pe.observe(R, Z);
|
|
5261
5375
|
}
|
|
5262
|
-
var
|
|
5263
|
-
|
|
5376
|
+
var _ = H();
|
|
5377
|
+
_ && M();
|
|
5264
5378
|
}
|
|
5265
|
-
function
|
|
5379
|
+
function ur(h) {
|
|
5266
5380
|
function v() {
|
|
5267
|
-
Li("Window " +
|
|
5381
|
+
Li("Window " + h, "resize");
|
|
5268
5382
|
}
|
|
5269
|
-
|
|
5383
|
+
N("window", "Trigger event: " + h), Un(v, 16);
|
|
5270
5384
|
}
|
|
5271
5385
|
function Zi() {
|
|
5272
|
-
function
|
|
5386
|
+
function h() {
|
|
5273
5387
|
Li("Tab Visible", "resize");
|
|
5274
5388
|
}
|
|
5275
|
-
document.visibilityState !== "hidden" && (
|
|
5389
|
+
document.visibilityState !== "hidden" && (N("document", "Trigger event: Visibility change"), Un(h, 16));
|
|
5276
5390
|
}
|
|
5277
|
-
function Li(
|
|
5278
|
-
function M(
|
|
5279
|
-
return c[
|
|
5391
|
+
function Li(h, v) {
|
|
5392
|
+
function M(_) {
|
|
5393
|
+
return c[_] && c[_].resizeFrom === "parent" && c[_].autoResize && !c[_].firstRun;
|
|
5280
5394
|
}
|
|
5281
|
-
Object.keys(c).forEach(function(
|
|
5282
|
-
M(
|
|
5395
|
+
Object.keys(c).forEach(function(_) {
|
|
5396
|
+
M(_) && he(h, v, c[_].iframe, _);
|
|
5283
5397
|
});
|
|
5284
5398
|
}
|
|
5285
|
-
function
|
|
5399
|
+
function hr() {
|
|
5286
5400
|
J(window, "message", or), J(window, "resize", function() {
|
|
5287
|
-
|
|
5401
|
+
ur("resize");
|
|
5288
5402
|
}), J(document, "visibilitychange", Zi), J(document, "-webkit-visibilitychange", Zi);
|
|
5289
5403
|
}
|
|
5290
5404
|
function Bn() {
|
|
5291
|
-
function
|
|
5405
|
+
function h(_, R) {
|
|
5292
5406
|
function Z() {
|
|
5293
5407
|
if (R.tagName) {
|
|
5294
5408
|
if (R.tagName.toUpperCase() !== "IFRAME")
|
|
@@ -5298,26 +5412,26 @@ var Bs = { exports: {} };
|
|
|
5298
5412
|
} else
|
|
5299
5413
|
throw new TypeError("Object is not a valid DOM element");
|
|
5300
5414
|
}
|
|
5301
|
-
R && (Z(), zi(R,
|
|
5415
|
+
R && (Z(), zi(R, _), M.push(R));
|
|
5302
5416
|
}
|
|
5303
|
-
function v(
|
|
5304
|
-
|
|
5417
|
+
function v(_) {
|
|
5418
|
+
_ && _.enablePublicMethods && se(
|
|
5305
5419
|
"enablePublicMethods option has been removed, public methods are now always available in the iFrame"
|
|
5306
5420
|
);
|
|
5307
5421
|
}
|
|
5308
5422
|
var M;
|
|
5309
|
-
return
|
|
5310
|
-
switch (M = [], v(
|
|
5423
|
+
return Qt(), hr(), function(_, R) {
|
|
5424
|
+
switch (M = [], v(_), typeof R) {
|
|
5311
5425
|
case "undefined":
|
|
5312
5426
|
case "string": {
|
|
5313
5427
|
Array.prototype.forEach.call(
|
|
5314
5428
|
document.querySelectorAll(R || "iframe"),
|
|
5315
|
-
|
|
5429
|
+
h.bind(e, _)
|
|
5316
5430
|
);
|
|
5317
5431
|
break;
|
|
5318
5432
|
}
|
|
5319
5433
|
case "object": {
|
|
5320
|
-
|
|
5434
|
+
h(_, R);
|
|
5321
5435
|
break;
|
|
5322
5436
|
}
|
|
5323
5437
|
default:
|
|
@@ -5326,9 +5440,9 @@ var Bs = { exports: {} };
|
|
|
5326
5440
|
return M;
|
|
5327
5441
|
};
|
|
5328
5442
|
}
|
|
5329
|
-
function pr(
|
|
5330
|
-
|
|
5331
|
-
function M(
|
|
5443
|
+
function pr(h) {
|
|
5444
|
+
h.fn ? h.fn.iFrameResize || (h.fn.iFrameResize = function(v) {
|
|
5445
|
+
function M(_, R) {
|
|
5332
5446
|
zi(R, v);
|
|
5333
5447
|
}
|
|
5334
5448
|
return this.filter("iframe").each(M).end();
|
|
@@ -5337,19 +5451,19 @@ var Bs = { exports: {} };
|
|
|
5337
5451
|
window.jQuery !== e && pr(window.jQuery), typeof e == "function" && e.amd ? e([], Bn) : i.exports = Bn(), window.iFrameResize = window.iFrameResize || Bn();
|
|
5338
5452
|
})();
|
|
5339
5453
|
})(Bs);
|
|
5340
|
-
var
|
|
5341
|
-
const
|
|
5342
|
-
var
|
|
5343
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
5454
|
+
var ro = Bs.exports;
|
|
5455
|
+
const ao = /* @__PURE__ */ qr(ro);
|
|
5456
|
+
var oo = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, wi = (i, e, t, n) => {
|
|
5457
|
+
for (var s = n > 1 ? void 0 : n ? lo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5344
5458
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
5345
|
-
return n && s &&
|
|
5459
|
+
return n && s && oo(e, t, s), s;
|
|
5346
5460
|
};
|
|
5347
5461
|
let Bt = class extends ne {
|
|
5348
5462
|
constructor() {
|
|
5349
5463
|
super(...arguments), this.src = "", this.showCloseButton = !1;
|
|
5350
5464
|
}
|
|
5351
5465
|
async onLoad(i) {
|
|
5352
|
-
|
|
5466
|
+
ao({
|
|
5353
5467
|
log: !1,
|
|
5354
5468
|
heightCalculationMethod: "max",
|
|
5355
5469
|
onMessage: ({ message: e }) => {
|
|
@@ -5392,10 +5506,10 @@ wi([
|
|
|
5392
5506
|
Bt = wi([
|
|
5393
5507
|
Ee("iai-chat-iframe")
|
|
5394
5508
|
], Bt);
|
|
5395
|
-
var
|
|
5396
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
5509
|
+
var co = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, ft = (i, e, t, n) => {
|
|
5510
|
+
for (var s = n > 1 ? void 0 : n ? uo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5397
5511
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
5398
|
-
return n && s &&
|
|
5512
|
+
return n && s && co(e, t, s), s;
|
|
5399
5513
|
};
|
|
5400
5514
|
let ze = class extends ne {
|
|
5401
5515
|
constructor() {
|
|
@@ -5450,22 +5564,22 @@ ze.styles = [Se, nt`
|
|
|
5450
5564
|
height: 50px;
|
|
5451
5565
|
}
|
|
5452
5566
|
`];
|
|
5453
|
-
|
|
5567
|
+
ft([
|
|
5454
5568
|
V({ type: String })
|
|
5455
5569
|
], ze.prototype, "title", 2);
|
|
5456
|
-
|
|
5570
|
+
ft([
|
|
5457
5571
|
V({ type: String })
|
|
5458
5572
|
], ze.prototype, "src", 2);
|
|
5459
|
-
|
|
5573
|
+
ft([
|
|
5460
5574
|
V({ type: String })
|
|
5461
5575
|
], ze.prototype, "width", 2);
|
|
5462
|
-
|
|
5576
|
+
ft([
|
|
5463
5577
|
V({ type: String })
|
|
5464
5578
|
], ze.prototype, "height", 2);
|
|
5465
|
-
|
|
5579
|
+
ft([
|
|
5466
5580
|
V({ type: Boolean })
|
|
5467
5581
|
], ze.prototype, "showHeader", 2);
|
|
5468
|
-
ze =
|
|
5582
|
+
ze = ft([
|
|
5469
5583
|
Ee("iai-chat-iframe-modal")
|
|
5470
5584
|
], ze);
|
|
5471
5585
|
/**
|
|
@@ -5481,7 +5595,7 @@ class oi extends Mn {
|
|
|
5481
5595
|
render(e) {
|
|
5482
5596
|
if (e === q || e == null)
|
|
5483
5597
|
return this._t = void 0, this.it = e;
|
|
5484
|
-
if (e ===
|
|
5598
|
+
if (e === fe)
|
|
5485
5599
|
return e;
|
|
5486
5600
|
if (typeof e != "string")
|
|
5487
5601
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
@@ -5512,33 +5626,33 @@ let it = xi();
|
|
|
5512
5626
|
function Fs(i) {
|
|
5513
5627
|
it = i;
|
|
5514
5628
|
}
|
|
5515
|
-
const Vs = /[&<>"']/,
|
|
5629
|
+
const Vs = /[&<>"']/, ho = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, po = new RegExp(qs.source, "g"), mo = {
|
|
5516
5630
|
"&": "&",
|
|
5517
5631
|
"<": "<",
|
|
5518
5632
|
">": ">",
|
|
5519
5633
|
'"': """,
|
|
5520
5634
|
"'": "'"
|
|
5521
|
-
}, ps = (i) =>
|
|
5635
|
+
}, ps = (i) => mo[i];
|
|
5522
5636
|
function te(i, e) {
|
|
5523
5637
|
if (e) {
|
|
5524
5638
|
if (Vs.test(i))
|
|
5525
|
-
return i.replace(
|
|
5639
|
+
return i.replace(ho, ps);
|
|
5526
5640
|
} else if (qs.test(i))
|
|
5527
|
-
return i.replace(
|
|
5641
|
+
return i.replace(po, ps);
|
|
5528
5642
|
return i;
|
|
5529
5643
|
}
|
|
5530
|
-
const
|
|
5531
|
-
function
|
|
5532
|
-
return i.replace(
|
|
5644
|
+
const go = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
5645
|
+
function fo(i) {
|
|
5646
|
+
return i.replace(go, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
|
|
5533
5647
|
}
|
|
5534
|
-
const
|
|
5648
|
+
const yo = /(^|[^\[])\^/g;
|
|
5535
5649
|
function D(i, e) {
|
|
5536
5650
|
let t = typeof i == "string" ? i : i.source;
|
|
5537
5651
|
e = e || "";
|
|
5538
5652
|
const n = {
|
|
5539
5653
|
replace: (s, r) => {
|
|
5540
5654
|
let a = typeof r == "string" ? r : r.source;
|
|
5541
|
-
return a = a.replace(
|
|
5655
|
+
return a = a.replace(yo, "$1"), t = t.replace(s, a), n;
|
|
5542
5656
|
},
|
|
5543
5657
|
getRegex: () => new RegExp(t, e)
|
|
5544
5658
|
};
|
|
@@ -5552,8 +5666,8 @@ function ms(i) {
|
|
|
5552
5666
|
}
|
|
5553
5667
|
return i;
|
|
5554
5668
|
}
|
|
5555
|
-
const
|
|
5556
|
-
function
|
|
5669
|
+
const kt = { exec: () => null };
|
|
5670
|
+
function gs(i, e) {
|
|
5557
5671
|
const t = i.replace(/\|/g, (r, a, o) => {
|
|
5558
5672
|
let l = !1, d = a;
|
|
5559
5673
|
for (; --d >= 0 && o[d] === "\\"; )
|
|
@@ -5587,7 +5701,7 @@ function tn(i, e, t) {
|
|
|
5587
5701
|
}
|
|
5588
5702
|
return i.slice(0, n - s);
|
|
5589
5703
|
}
|
|
5590
|
-
function
|
|
5704
|
+
function vo(i, e) {
|
|
5591
5705
|
if (i.indexOf(e[1]) === -1)
|
|
5592
5706
|
return -1;
|
|
5593
5707
|
let t = 0;
|
|
@@ -5600,7 +5714,7 @@ function go(i, e) {
|
|
|
5600
5714
|
return n;
|
|
5601
5715
|
return -1;
|
|
5602
5716
|
}
|
|
5603
|
-
function
|
|
5717
|
+
function fs(i, e, t, n) {
|
|
5604
5718
|
const s = e.href, r = e.title ? te(e.title) : null, a = i[1].replace(/\\([\[\]])/g, "$1");
|
|
5605
5719
|
if (i[0].charAt(0) !== "!") {
|
|
5606
5720
|
n.state.inLink = !0;
|
|
@@ -5622,7 +5736,7 @@ function gs(i, e, t, n) {
|
|
|
5622
5736
|
text: te(a)
|
|
5623
5737
|
};
|
|
5624
5738
|
}
|
|
5625
|
-
function
|
|
5739
|
+
function bo(i, e) {
|
|
5626
5740
|
const t = i.match(/^(\s+)(?:```)/);
|
|
5627
5741
|
if (t === null)
|
|
5628
5742
|
return e;
|
|
@@ -5637,7 +5751,7 @@ function yo(i, e) {
|
|
|
5637
5751
|
}).join(`
|
|
5638
5752
|
`);
|
|
5639
5753
|
}
|
|
5640
|
-
class
|
|
5754
|
+
class _n {
|
|
5641
5755
|
// set by the lexer
|
|
5642
5756
|
constructor(e) {
|
|
5643
5757
|
W(this, "options"), W(this, "rules"), W(this, "lexer"), this.options = e || it;
|
|
@@ -5666,7 +5780,7 @@ class kn {
|
|
|
5666
5780
|
fences(e) {
|
|
5667
5781
|
const t = this.rules.block.fences.exec(e);
|
|
5668
5782
|
if (t) {
|
|
5669
|
-
const n = t[0], s =
|
|
5783
|
+
const n = t[0], s = bo(n, t[3] || "");
|
|
5670
5784
|
return {
|
|
5671
5785
|
type: "code",
|
|
5672
5786
|
raw: n,
|
|
@@ -5734,34 +5848,34 @@ class kn {
|
|
|
5734
5848
|
const a = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
|
|
5735
5849
|
let o = "", l = "", d = !1;
|
|
5736
5850
|
for (; e; ) {
|
|
5737
|
-
let
|
|
5851
|
+
let u = !1;
|
|
5738
5852
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e))
|
|
5739
5853
|
break;
|
|
5740
5854
|
o = t[0], e = e.substring(o.length);
|
|
5741
5855
|
let p = t[2].split(`
|
|
5742
5856
|
`, 1)[0].replace(/^\t+/, (Ce) => " ".repeat(3 * Ce.length)), c = e.split(`
|
|
5743
|
-
`, 1)[0],
|
|
5744
|
-
this.options.pedantic ? (
|
|
5857
|
+
`, 1)[0], g = 0;
|
|
5858
|
+
this.options.pedantic ? (g = 2, l = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, l = p.slice(g), g += t[1].length);
|
|
5745
5859
|
let O = !1;
|
|
5746
5860
|
if (!p && /^ *$/.test(c) && (o += c + `
|
|
5747
|
-
`, e = e.substring(c.length + 1),
|
|
5748
|
-
const Ce = new RegExp(`^ {0,${Math.min(3,
|
|
5861
|
+
`, e = e.substring(c.length + 1), u = !0), !u) {
|
|
5862
|
+
const Ce = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Qt = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Yt = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), Gt = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
|
|
5749
5863
|
for (; e; ) {
|
|
5750
5864
|
const st = e.split(`
|
|
5751
5865
|
`, 1)[0];
|
|
5752
|
-
if (c = st, this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")),
|
|
5866
|
+
if (c = st, this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), Yt.test(c) || Gt.test(c) || Ce.test(c) || Qt.test(e))
|
|
5753
5867
|
break;
|
|
5754
|
-
if (c.search(/[^ ]/) >=
|
|
5868
|
+
if (c.search(/[^ ]/) >= g || !c.trim())
|
|
5755
5869
|
l += `
|
|
5756
|
-
` + c.slice(
|
|
5870
|
+
` + c.slice(g);
|
|
5757
5871
|
else {
|
|
5758
|
-
if (O || p.search(/[^ ]/) >= 4 ||
|
|
5872
|
+
if (O || p.search(/[^ ]/) >= 4 || Yt.test(p) || Gt.test(p) || Qt.test(p))
|
|
5759
5873
|
break;
|
|
5760
5874
|
l += `
|
|
5761
5875
|
` + c;
|
|
5762
5876
|
}
|
|
5763
5877
|
!O && !c.trim() && (O = !0), o += st + `
|
|
5764
|
-
`, e = e.substring(st.length + 1), p = c.slice(
|
|
5878
|
+
`, e = e.substring(st.length + 1), p = c.slice(g);
|
|
5765
5879
|
}
|
|
5766
5880
|
}
|
|
5767
5881
|
r.loose || (d ? r.loose = !0 : /\n *\n *$/.test(o) && (d = !0));
|
|
@@ -5777,14 +5891,14 @@ class kn {
|
|
|
5777
5891
|
}), r.raw += o;
|
|
5778
5892
|
}
|
|
5779
5893
|
r.items[r.items.length - 1].raw = o.trimEnd(), r.items[r.items.length - 1].text = l.trimEnd(), r.raw = r.raw.trimEnd();
|
|
5780
|
-
for (let
|
|
5781
|
-
if (this.lexer.state.top = !1, r.items[
|
|
5782
|
-
const p = r.items[
|
|
5894
|
+
for (let u = 0; u < r.items.length; u++)
|
|
5895
|
+
if (this.lexer.state.top = !1, r.items[u].tokens = this.lexer.blockTokens(r.items[u].text, []), !r.loose) {
|
|
5896
|
+
const p = r.items[u].tokens.filter((g) => g.type === "space"), c = p.length > 0 && p.some((g) => /\n.*\n/.test(g.raw));
|
|
5783
5897
|
r.loose = c;
|
|
5784
5898
|
}
|
|
5785
5899
|
if (r.loose)
|
|
5786
|
-
for (let
|
|
5787
|
-
r.items[
|
|
5900
|
+
for (let u = 0; u < r.items.length; u++)
|
|
5901
|
+
r.items[u].loose = !0;
|
|
5788
5902
|
return r;
|
|
5789
5903
|
}
|
|
5790
5904
|
}
|
|
@@ -5816,7 +5930,7 @@ class kn {
|
|
|
5816
5930
|
const t = this.rules.block.table.exec(e);
|
|
5817
5931
|
if (!t || !/[:|]/.test(t[2]))
|
|
5818
5932
|
return;
|
|
5819
|
-
const n =
|
|
5933
|
+
const n = gs(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
|
|
5820
5934
|
`) : [], a = {
|
|
5821
5935
|
type: "table",
|
|
5822
5936
|
raw: t[0],
|
|
@@ -5833,7 +5947,7 @@ class kn {
|
|
|
5833
5947
|
tokens: this.lexer.inline(o)
|
|
5834
5948
|
});
|
|
5835
5949
|
for (const o of r)
|
|
5836
|
-
a.rows.push(
|
|
5950
|
+
a.rows.push(gs(o, a.header.length).map((l) => ({
|
|
5837
5951
|
text: l,
|
|
5838
5952
|
tokens: this.lexer.inline(l)
|
|
5839
5953
|
})));
|
|
@@ -5906,7 +6020,7 @@ class kn {
|
|
|
5906
6020
|
if ((n.length - a.length) % 2 === 0)
|
|
5907
6021
|
return;
|
|
5908
6022
|
} else {
|
|
5909
|
-
const a =
|
|
6023
|
+
const a = vo(t[2], "()");
|
|
5910
6024
|
if (a > -1) {
|
|
5911
6025
|
const o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a;
|
|
5912
6026
|
t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
@@ -5918,7 +6032,7 @@ class kn {
|
|
|
5918
6032
|
a && (s = a[1], r = a[3]);
|
|
5919
6033
|
} else
|
|
5920
6034
|
r = t[3] ? t[3].slice(1, -1) : "";
|
|
5921
|
-
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
6035
|
+
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), fs(t, {
|
|
5922
6036
|
href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
5923
6037
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
5924
6038
|
}, t[0], this.lexer);
|
|
@@ -5936,7 +6050,7 @@ class kn {
|
|
|
5936
6050
|
text: a
|
|
5937
6051
|
};
|
|
5938
6052
|
}
|
|
5939
|
-
return
|
|
6053
|
+
return fs(n, r, n[0], this.lexer);
|
|
5940
6054
|
}
|
|
5941
6055
|
}
|
|
5942
6056
|
emStrong(e, t, n = "") {
|
|
@@ -5944,8 +6058,8 @@ class kn {
|
|
|
5944
6058
|
if (!(!s || s[3] && n.match(/[\p{L}\p{N}]/u)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
5945
6059
|
const r = [...s[0]].length - 1;
|
|
5946
6060
|
let a, o, l = r, d = 0;
|
|
5947
|
-
const
|
|
5948
|
-
for (
|
|
6061
|
+
const u = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
6062
|
+
for (u.lastIndex = 0, t = t.slice(-1 * e.length + r); (s = u.exec(t)) != null; ) {
|
|
5949
6063
|
if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a)
|
|
5950
6064
|
continue;
|
|
5951
6065
|
if (o = [...a].length, s[3] || s[4]) {
|
|
@@ -5968,12 +6082,12 @@ class kn {
|
|
|
5968
6082
|
tokens: this.lexer.inlineTokens(O)
|
|
5969
6083
|
};
|
|
5970
6084
|
}
|
|
5971
|
-
const
|
|
6085
|
+
const g = c.slice(2, -2);
|
|
5972
6086
|
return {
|
|
5973
6087
|
type: "strong",
|
|
5974
6088
|
raw: c,
|
|
5975
|
-
text:
|
|
5976
|
-
tokens: this.lexer.inlineTokens(
|
|
6089
|
+
text: g,
|
|
6090
|
+
tokens: this.lexer.inlineTokens(g)
|
|
5977
6091
|
};
|
|
5978
6092
|
}
|
|
5979
6093
|
}
|
|
@@ -6068,83 +6182,83 @@ class kn {
|
|
|
6068
6182
|
}
|
|
6069
6183
|
}
|
|
6070
6184
|
}
|
|
6071
|
-
const
|
|
6072
|
-
blockquote:
|
|
6073
|
-
code:
|
|
6074
|
-
def:
|
|
6075
|
-
fences:
|
|
6076
|
-
heading:
|
|
6185
|
+
const wo = /^(?: *(?:\n|$))+/, xo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, _o = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ko = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = D(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ks).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), _i = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, $o = /^[^\n]+/, ki = /(?!\s*\])(?:\\.|[^\[\]\\])+/, To = D(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ki).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Eo = D(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ks).getRegex(), jn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", $i = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, So = D("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", $i).replace("tag", jn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Qs = D(_i).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex(), Co = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qs).getRegex(), Ti = {
|
|
6186
|
+
blockquote: Co,
|
|
6187
|
+
code: xo,
|
|
6188
|
+
def: To,
|
|
6189
|
+
fences: _o,
|
|
6190
|
+
heading: ko,
|
|
6077
6191
|
hr: qt,
|
|
6078
|
-
html:
|
|
6192
|
+
html: So,
|
|
6079
6193
|
lheading: Js,
|
|
6080
|
-
list:
|
|
6081
|
-
newline:
|
|
6082
|
-
paragraph:
|
|
6083
|
-
table:
|
|
6084
|
-
text:
|
|
6085
|
-
}, ys = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",
|
|
6194
|
+
list: Eo,
|
|
6195
|
+
newline: wo,
|
|
6196
|
+
paragraph: Qs,
|
|
6197
|
+
table: kt,
|
|
6198
|
+
text: $o
|
|
6199
|
+
}, ys = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex(), Ao = {
|
|
6086
6200
|
...Ti,
|
|
6087
6201
|
table: ys,
|
|
6088
|
-
paragraph: D(
|
|
6089
|
-
},
|
|
6202
|
+
paragraph: D(_i).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ys).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex()
|
|
6203
|
+
}, Io = {
|
|
6090
6204
|
...Ti,
|
|
6091
6205
|
html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", $i).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
6092
6206
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
6093
6207
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
6094
|
-
fences:
|
|
6208
|
+
fences: kt,
|
|
6095
6209
|
// fences not supported
|
|
6096
6210
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
6097
|
-
paragraph: D(
|
|
6211
|
+
paragraph: D(_i).replace("hr", qt).replace("heading", ` *#{1,6} *[^
|
|
6098
6212
|
]`).replace("lheading", Js).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
6099
|
-
},
|
|
6100
|
-
_backpedal:
|
|
6213
|
+
}, Ys = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Oo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Gs = /^( {2,}|\\)\n(?!\s*$)/, Mo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", Ro = D(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(), No = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Po = D(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), jo = D("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), zo = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), Zo = D(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), Lo = D(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Do = D($i).replace("(?:-->|$)", "-->").getRegex(), Uo = D("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Do).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ho = D(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", kn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", kn).replace("ref", ki).getRegex(), er = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", ki).getRegex(), Bo = D("reflink|nolink(?!\\()", "g").replace("reflink", Xs).replace("nolink", er).getRegex(), Ei = {
|
|
6214
|
+
_backpedal: kt,
|
|
6101
6215
|
// only used for GFM url
|
|
6102
|
-
anyPunctuation:
|
|
6103
|
-
autolink:
|
|
6104
|
-
blockSkip:
|
|
6105
|
-
br:
|
|
6106
|
-
code:
|
|
6107
|
-
del:
|
|
6108
|
-
emStrongLDelim:
|
|
6109
|
-
emStrongRDelimAst:
|
|
6110
|
-
emStrongRDelimUnd:
|
|
6111
|
-
escape:
|
|
6112
|
-
link:
|
|
6216
|
+
anyPunctuation: Zo,
|
|
6217
|
+
autolink: Lo,
|
|
6218
|
+
blockSkip: No,
|
|
6219
|
+
br: Gs,
|
|
6220
|
+
code: Oo,
|
|
6221
|
+
del: kt,
|
|
6222
|
+
emStrongLDelim: Po,
|
|
6223
|
+
emStrongRDelimAst: jo,
|
|
6224
|
+
emStrongRDelimUnd: zo,
|
|
6225
|
+
escape: Ys,
|
|
6226
|
+
link: Ho,
|
|
6113
6227
|
nolink: er,
|
|
6114
|
-
punctuation:
|
|
6228
|
+
punctuation: Ro,
|
|
6115
6229
|
reflink: Xs,
|
|
6116
|
-
reflinkSearch:
|
|
6117
|
-
tag:
|
|
6118
|
-
text:
|
|
6119
|
-
url:
|
|
6120
|
-
},
|
|
6230
|
+
reflinkSearch: Bo,
|
|
6231
|
+
tag: Uo,
|
|
6232
|
+
text: Mo,
|
|
6233
|
+
url: kt
|
|
6234
|
+
}, Wo = {
|
|
6121
6235
|
...Ei,
|
|
6122
|
-
link: D(/^!?\[(label)\]\((.*?)\)/).replace("label",
|
|
6123
|
-
reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",
|
|
6236
|
+
link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", kn).getRegex(),
|
|
6237
|
+
reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kn).getRegex()
|
|
6124
6238
|
}, li = {
|
|
6125
6239
|
...Ei,
|
|
6126
|
-
escape: D(
|
|
6240
|
+
escape: D(Ys).replace("])", "~|])").getRegex(),
|
|
6127
6241
|
url: D(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
6128
6242
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
6129
6243
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
6130
6244
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
6131
|
-
},
|
|
6245
|
+
}, Fo = {
|
|
6132
6246
|
...li,
|
|
6133
|
-
br: D(
|
|
6247
|
+
br: D(Gs).replace("{2,}", "*").getRegex(),
|
|
6134
6248
|
text: D(li.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
6135
6249
|
}, nn = {
|
|
6136
6250
|
normal: Ti,
|
|
6137
|
-
gfm:
|
|
6138
|
-
pedantic:
|
|
6251
|
+
gfm: Ao,
|
|
6252
|
+
pedantic: Io
|
|
6139
6253
|
}, bt = {
|
|
6140
6254
|
normal: Ei,
|
|
6141
6255
|
gfm: li,
|
|
6142
|
-
breaks:
|
|
6143
|
-
pedantic:
|
|
6256
|
+
breaks: Fo,
|
|
6257
|
+
pedantic: Wo
|
|
6144
6258
|
};
|
|
6145
6259
|
class me {
|
|
6146
6260
|
constructor(e) {
|
|
6147
|
-
W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || it, this.options.tokenizer = this.options.tokenizer || new
|
|
6261
|
+
W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || it, this.options.tokenizer = this.options.tokenizer || new _n(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
6148
6262
|
inLink: !1,
|
|
6149
6263
|
inRawBlock: !1,
|
|
6150
6264
|
top: !0
|
|
@@ -6249,8 +6363,8 @@ class me {
|
|
|
6249
6363
|
let o = 1 / 0;
|
|
6250
6364
|
const l = e.slice(1);
|
|
6251
6365
|
let d;
|
|
6252
|
-
this.options.extensions.startBlock.forEach((
|
|
6253
|
-
d =
|
|
6366
|
+
this.options.extensions.startBlock.forEach((u) => {
|
|
6367
|
+
d = u.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (o = Math.min(o, d));
|
|
6254
6368
|
}), o < 1 / 0 && o >= 0 && (r = e.substring(0, o + 1));
|
|
6255
6369
|
}
|
|
6256
6370
|
if (this.state.top && (n = this.tokenizer.paragraph(r))) {
|
|
@@ -6285,17 +6399,17 @@ class me {
|
|
|
6285
6399
|
inlineTokens(e, t = []) {
|
|
6286
6400
|
let n, s, r, a = e, o, l, d;
|
|
6287
6401
|
if (this.tokens.links) {
|
|
6288
|
-
const
|
|
6289
|
-
if (
|
|
6402
|
+
const u = Object.keys(this.tokens.links);
|
|
6403
|
+
if (u.length > 0)
|
|
6290
6404
|
for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; )
|
|
6291
|
-
|
|
6405
|
+
u.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
6292
6406
|
}
|
|
6293
6407
|
for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; )
|
|
6294
6408
|
a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
6295
6409
|
for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; )
|
|
6296
6410
|
a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
6297
6411
|
for (; e; )
|
|
6298
|
-
if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((
|
|
6412
|
+
if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((u) => (n = u.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
|
|
6299
6413
|
if (n = this.tokenizer.escape(e)) {
|
|
6300
6414
|
e = e.substring(n.raw.length), t.push(n);
|
|
6301
6415
|
continue;
|
|
@@ -6337,24 +6451,24 @@ class me {
|
|
|
6337
6451
|
continue;
|
|
6338
6452
|
}
|
|
6339
6453
|
if (r = e, this.options.extensions && this.options.extensions.startInline) {
|
|
6340
|
-
let
|
|
6454
|
+
let u = 1 / 0;
|
|
6341
6455
|
const p = e.slice(1);
|
|
6342
6456
|
let c;
|
|
6343
|
-
this.options.extensions.startInline.forEach((
|
|
6344
|
-
c =
|
|
6345
|
-
}),
|
|
6457
|
+
this.options.extensions.startInline.forEach((g) => {
|
|
6458
|
+
c = g.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
|
|
6459
|
+
}), u < 1 / 0 && u >= 0 && (r = e.substring(0, u + 1));
|
|
6346
6460
|
}
|
|
6347
6461
|
if (n = this.tokenizer.inlineText(r)) {
|
|
6348
6462
|
e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (d = n.raw.slice(-1)), l = !0, s = t[t.length - 1], s && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
|
|
6349
6463
|
continue;
|
|
6350
6464
|
}
|
|
6351
6465
|
if (e) {
|
|
6352
|
-
const
|
|
6466
|
+
const u = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
6353
6467
|
if (this.options.silent) {
|
|
6354
|
-
console.error(
|
|
6468
|
+
console.error(u);
|
|
6355
6469
|
break;
|
|
6356
6470
|
} else
|
|
6357
|
-
throw new Error(
|
|
6471
|
+
throw new Error(u);
|
|
6358
6472
|
}
|
|
6359
6473
|
}
|
|
6360
6474
|
return t;
|
|
@@ -6490,7 +6604,7 @@ class Si {
|
|
|
6490
6604
|
return "";
|
|
6491
6605
|
}
|
|
6492
6606
|
}
|
|
6493
|
-
class
|
|
6607
|
+
class ge {
|
|
6494
6608
|
constructor(e) {
|
|
6495
6609
|
W(this, "options"), W(this, "renderer"), W(this, "textRenderer"), this.options = e || it, this.options.renderer = this.options.renderer || new $n(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Si();
|
|
6496
6610
|
}
|
|
@@ -6498,13 +6612,13 @@ class fe {
|
|
|
6498
6612
|
* Static Parse Method
|
|
6499
6613
|
*/
|
|
6500
6614
|
static parse(e, t) {
|
|
6501
|
-
return new
|
|
6615
|
+
return new ge(t).parse(e);
|
|
6502
6616
|
}
|
|
6503
6617
|
/**
|
|
6504
6618
|
* Static Parse Inline Method
|
|
6505
6619
|
*/
|
|
6506
6620
|
static parseInline(e, t) {
|
|
6507
|
-
return new
|
|
6621
|
+
return new ge(t).parseInline(e);
|
|
6508
6622
|
}
|
|
6509
6623
|
/**
|
|
6510
6624
|
* Parse Loop
|
|
@@ -6529,7 +6643,7 @@ class fe {
|
|
|
6529
6643
|
}
|
|
6530
6644
|
case "heading": {
|
|
6531
6645
|
const a = r;
|
|
6532
|
-
n += this.renderer.heading(this.parseInline(a.tokens), a.depth,
|
|
6646
|
+
n += this.renderer.heading(this.parseInline(a.tokens), a.depth, fo(this.parseInline(a.tokens, this.textRenderer)));
|
|
6533
6647
|
continue;
|
|
6534
6648
|
}
|
|
6535
6649
|
case "code": {
|
|
@@ -6540,12 +6654,12 @@ class fe {
|
|
|
6540
6654
|
case "table": {
|
|
6541
6655
|
const a = r;
|
|
6542
6656
|
let o = "", l = "";
|
|
6543
|
-
for (let
|
|
6544
|
-
l += this.renderer.tablecell(this.parseInline(a.header[
|
|
6657
|
+
for (let u = 0; u < a.header.length; u++)
|
|
6658
|
+
l += this.renderer.tablecell(this.parseInline(a.header[u].tokens), { header: !0, align: a.align[u] });
|
|
6545
6659
|
o += this.renderer.tablerow(l);
|
|
6546
6660
|
let d = "";
|
|
6547
|
-
for (let
|
|
6548
|
-
const p = a.rows[
|
|
6661
|
+
for (let u = 0; u < a.rows.length; u++) {
|
|
6662
|
+
const p = a.rows[u];
|
|
6549
6663
|
l = "";
|
|
6550
6664
|
for (let c = 0; c < p.length; c++)
|
|
6551
6665
|
l += this.renderer.tablecell(this.parseInline(p[c].tokens), { header: !1, align: a.align[c] });
|
|
@@ -6561,20 +6675,20 @@ class fe {
|
|
|
6561
6675
|
}
|
|
6562
6676
|
case "list": {
|
|
6563
6677
|
const a = r, o = a.ordered, l = a.start, d = a.loose;
|
|
6564
|
-
let
|
|
6678
|
+
let u = "";
|
|
6565
6679
|
for (let p = 0; p < a.items.length; p++) {
|
|
6566
|
-
const c = a.items[p],
|
|
6680
|
+
const c = a.items[p], g = c.checked, O = c.task;
|
|
6567
6681
|
let H = "";
|
|
6568
6682
|
if (c.task) {
|
|
6569
|
-
const J = this.renderer.checkbox(!!
|
|
6683
|
+
const J = this.renderer.checkbox(!!g);
|
|
6570
6684
|
d ? c.tokens.length > 0 && c.tokens[0].type === "paragraph" ? (c.tokens[0].text = J + " " + c.tokens[0].text, c.tokens[0].tokens && c.tokens[0].tokens.length > 0 && c.tokens[0].tokens[0].type === "text" && (c.tokens[0].tokens[0].text = J + " " + c.tokens[0].tokens[0].text)) : c.tokens.unshift({
|
|
6571
6685
|
type: "text",
|
|
6572
6686
|
text: J + " "
|
|
6573
6687
|
}) : H += J + " ";
|
|
6574
6688
|
}
|
|
6575
|
-
H += this.parse(c.tokens, d),
|
|
6689
|
+
H += this.parse(c.tokens, d), u += this.renderer.listitem(H, O, !!g);
|
|
6576
6690
|
}
|
|
6577
|
-
n += this.renderer.list(
|
|
6691
|
+
n += this.renderer.list(u, o, l);
|
|
6578
6692
|
continue;
|
|
6579
6693
|
}
|
|
6580
6694
|
case "html": {
|
|
@@ -6710,9 +6824,9 @@ W($t, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
6710
6824
|
"processAllTokens"
|
|
6711
6825
|
]));
|
|
6712
6826
|
var on, ci, di, vs;
|
|
6713
|
-
class
|
|
6827
|
+
class Vo {
|
|
6714
6828
|
constructor(...e) {
|
|
6715
|
-
|
|
6829
|
+
Hi(this, on), Hi(this, di), W(this, "defaults", xi()), W(this, "options", this.setOptions), W(this, "parse", ni(this, on, ci).call(this, me.lex, ge.parse)), W(this, "parseInline", ni(this, on, ci).call(this, me.lexInline, ge.parseInline)), W(this, "Parser", ge), W(this, "Renderer", $n), W(this, "TextRenderer", Si), W(this, "Lexer", me), W(this, "Tokenizer", _n), W(this, "Hooks", $t), this.use(...e);
|
|
6716
6830
|
}
|
|
6717
6831
|
/**
|
|
6718
6832
|
* Run callback for every token
|
|
@@ -6775,24 +6889,24 @@ class Wo {
|
|
|
6775
6889
|
if (a === "options")
|
|
6776
6890
|
continue;
|
|
6777
6891
|
const o = a, l = n.renderer[o], d = r[o];
|
|
6778
|
-
r[o] = (...
|
|
6779
|
-
let p = l.apply(r,
|
|
6780
|
-
return p === !1 && (p = d.apply(r,
|
|
6892
|
+
r[o] = (...u) => {
|
|
6893
|
+
let p = l.apply(r, u);
|
|
6894
|
+
return p === !1 && (p = d.apply(r, u)), p || "";
|
|
6781
6895
|
};
|
|
6782
6896
|
}
|
|
6783
6897
|
s.renderer = r;
|
|
6784
6898
|
}
|
|
6785
6899
|
if (n.tokenizer) {
|
|
6786
|
-
const r = this.defaults.tokenizer || new
|
|
6900
|
+
const r = this.defaults.tokenizer || new _n(this.defaults);
|
|
6787
6901
|
for (const a in n.tokenizer) {
|
|
6788
6902
|
if (!(a in r))
|
|
6789
6903
|
throw new Error(`tokenizer '${a}' does not exist`);
|
|
6790
6904
|
if (["options", "rules", "lexer"].includes(a))
|
|
6791
6905
|
continue;
|
|
6792
6906
|
const o = a, l = n.tokenizer[o], d = r[o];
|
|
6793
|
-
r[o] = (...
|
|
6794
|
-
let p = l.apply(r,
|
|
6795
|
-
return p === !1 && (p = d.apply(r,
|
|
6907
|
+
r[o] = (...u) => {
|
|
6908
|
+
let p = l.apply(r, u);
|
|
6909
|
+
return p === !1 && (p = d.apply(r, u)), p;
|
|
6796
6910
|
};
|
|
6797
6911
|
}
|
|
6798
6912
|
s.tokenizer = r;
|
|
@@ -6805,14 +6919,14 @@ class Wo {
|
|
|
6805
6919
|
if (a === "options")
|
|
6806
6920
|
continue;
|
|
6807
6921
|
const o = a, l = n.hooks[o], d = r[o];
|
|
6808
|
-
$t.passThroughHooks.has(a) ? r[o] = (
|
|
6922
|
+
$t.passThroughHooks.has(a) ? r[o] = (u) => {
|
|
6809
6923
|
if (this.defaults.async)
|
|
6810
|
-
return Promise.resolve(l.call(r,
|
|
6811
|
-
const p = l.call(r,
|
|
6924
|
+
return Promise.resolve(l.call(r, u)).then((c) => d.call(r, c));
|
|
6925
|
+
const p = l.call(r, u);
|
|
6812
6926
|
return d.call(r, p);
|
|
6813
|
-
} : r[o] = (...
|
|
6814
|
-
let p = l.apply(r,
|
|
6815
|
-
return p === !1 && (p = d.apply(r,
|
|
6927
|
+
} : r[o] = (...u) => {
|
|
6928
|
+
let p = l.apply(r, u);
|
|
6929
|
+
return p === !1 && (p = d.apply(r, u)), p;
|
|
6816
6930
|
};
|
|
6817
6931
|
}
|
|
6818
6932
|
s.hooks = r;
|
|
@@ -6834,7 +6948,7 @@ class Wo {
|
|
|
6834
6948
|
return me.lex(e, t ?? this.defaults);
|
|
6835
6949
|
}
|
|
6836
6950
|
parser(e, t) {
|
|
6837
|
-
return
|
|
6951
|
+
return ge.parse(e, t ?? this.defaults);
|
|
6838
6952
|
}
|
|
6839
6953
|
}
|
|
6840
6954
|
on = /* @__PURE__ */ new WeakSet(), ci = function(i, e) {
|
|
@@ -6870,7 +6984,7 @@ Please report this to https://github.com/markedjs/marked.`, i) {
|
|
|
6870
6984
|
throw t;
|
|
6871
6985
|
};
|
|
6872
6986
|
};
|
|
6873
|
-
const et = new
|
|
6987
|
+
const et = new Vo();
|
|
6874
6988
|
function L(i, e) {
|
|
6875
6989
|
return et.parse(i, e);
|
|
6876
6990
|
}
|
|
@@ -6886,13 +7000,13 @@ L.walkTokens = function(i, e) {
|
|
|
6886
7000
|
return et.walkTokens(i, e);
|
|
6887
7001
|
};
|
|
6888
7002
|
L.parseInline = et.parseInline;
|
|
6889
|
-
L.Parser =
|
|
6890
|
-
L.parser =
|
|
7003
|
+
L.Parser = ge;
|
|
7004
|
+
L.parser = ge.parse;
|
|
6891
7005
|
L.Renderer = $n;
|
|
6892
7006
|
L.TextRenderer = Si;
|
|
6893
7007
|
L.Lexer = me;
|
|
6894
7008
|
L.lexer = me.lex;
|
|
6895
|
-
L.Tokenizer =
|
|
7009
|
+
L.Tokenizer = _n;
|
|
6896
7010
|
L.Hooks = $t;
|
|
6897
7011
|
L.parse = L;
|
|
6898
7012
|
L.options;
|
|
@@ -6900,18 +7014,18 @@ L.setOptions;
|
|
|
6900
7014
|
L.use;
|
|
6901
7015
|
L.walkTokens;
|
|
6902
7016
|
L.parseInline;
|
|
6903
|
-
|
|
7017
|
+
ge.parse;
|
|
6904
7018
|
me.lex;
|
|
6905
|
-
function
|
|
7019
|
+
function qo(i) {
|
|
6906
7020
|
return i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
6907
7021
|
}
|
|
6908
7022
|
function tr(i, e = "") {
|
|
6909
7023
|
return Object.keys(i).reduce((t, n) => {
|
|
6910
|
-
const s =
|
|
7024
|
+
const s = qo(n), r = e ? `${e}-${s}` : s;
|
|
6911
7025
|
return typeof i[n] == "object" && i[n] !== null ? Object.assign(t, tr(i[n], r)) : t[r] = i[n], t;
|
|
6912
7026
|
}, {});
|
|
6913
7027
|
}
|
|
6914
|
-
function
|
|
7028
|
+
function Ko(i) {
|
|
6915
7029
|
const e = {
|
|
6916
7030
|
"&": "&",
|
|
6917
7031
|
"<": "<",
|
|
@@ -6922,13 +7036,13 @@ function Vo(i) {
|
|
|
6922
7036
|
return i.replace(/[&<>"']/g, (t) => e[t]);
|
|
6923
7037
|
}
|
|
6924
7038
|
function nr(i) {
|
|
6925
|
-
const e =
|
|
7039
|
+
const e = Ko(i);
|
|
6926
7040
|
return L.parse(e);
|
|
6927
7041
|
}
|
|
6928
|
-
var
|
|
6929
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7042
|
+
var Jo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ir = (i, e, t, n) => {
|
|
7043
|
+
for (var s = n > 1 ? void 0 : n ? Qo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
6930
7044
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
6931
|
-
return n && s &&
|
|
7045
|
+
return n && s && Jo(e, t, s), s;
|
|
6932
7046
|
};
|
|
6933
7047
|
let Tn = class extends ne {
|
|
6934
7048
|
constructor() {
|
|
@@ -6959,14 +7073,14 @@ ir([
|
|
|
6959
7073
|
Tn = ir([
|
|
6960
7074
|
Ee("iai-chat-message-assistant")
|
|
6961
7075
|
], Tn);
|
|
6962
|
-
async function
|
|
7076
|
+
async function Yo(i, e) {
|
|
6963
7077
|
const { type: t, params: n } = i, s = e[t];
|
|
6964
7078
|
if (!s)
|
|
6965
7079
|
throw new Error(`No handler for enhanced content type ${t}`);
|
|
6966
7080
|
return s({ params: n, html: z });
|
|
6967
7081
|
}
|
|
6968
|
-
var Go = Object.defineProperty,
|
|
6969
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7082
|
+
var Go = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Jt = (i, e, t, n) => {
|
|
7083
|
+
for (var s = n > 1 ? void 0 : n ? Xo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
6970
7084
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
6971
7085
|
return n && s && Go(e, t, s), s;
|
|
6972
7086
|
};
|
|
@@ -6977,7 +7091,7 @@ let tt = class extends ne {
|
|
|
6977
7091
|
async connectedCallback() {
|
|
6978
7092
|
if (super.connectedCallback(), this.enhancedContent)
|
|
6979
7093
|
try {
|
|
6980
|
-
this.contentHtmlTemplate = await
|
|
7094
|
+
this.contentHtmlTemplate = await Yo(this.enhancedContent, this.options.handlers.enhancedContent);
|
|
6981
7095
|
} catch (i) {
|
|
6982
7096
|
console.warn("Error processing enhanced content", i);
|
|
6983
7097
|
}
|
|
@@ -7007,10 +7121,10 @@ Jt([
|
|
|
7007
7121
|
tt = Jt([
|
|
7008
7122
|
Ee("iai-chat-message-system")
|
|
7009
7123
|
], tt);
|
|
7010
|
-
var
|
|
7011
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7124
|
+
var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, sr = (i, e, t, n) => {
|
|
7125
|
+
for (var s = n > 1 ? void 0 : n ? tl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7012
7126
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7013
|
-
return n && s &&
|
|
7127
|
+
return n && s && el(e, t, s), s;
|
|
7014
7128
|
};
|
|
7015
7129
|
let En = class extends ne {
|
|
7016
7130
|
constructor() {
|
|
@@ -7038,12 +7152,12 @@ sr([
|
|
|
7038
7152
|
En = sr([
|
|
7039
7153
|
Ee("iai-chat-message-user")
|
|
7040
7154
|
], En);
|
|
7041
|
-
var
|
|
7042
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7155
|
+
var nl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, zn = (i, e, t, n) => {
|
|
7156
|
+
for (var s = n > 1 ? void 0 : n ? il(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7043
7157
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7044
|
-
return n && s &&
|
|
7158
|
+
return n && s && nl(e, t, s), s;
|
|
7045
7159
|
};
|
|
7046
|
-
let
|
|
7160
|
+
let pt = class extends ne {
|
|
7047
7161
|
constructor() {
|
|
7048
7162
|
super(...arguments), this.isChatWindowOpen = !1, this.isCtaOpen = !0;
|
|
7049
7163
|
}
|
|
@@ -7082,7 +7196,7 @@ let ut = class extends ne {
|
|
|
7082
7196
|
() => z`
|
|
7083
7197
|
<div class="button rounded-full flex items-center justify-center" style=${a}>
|
|
7084
7198
|
<div class="h-3/5 w-3/5">
|
|
7085
|
-
${Re(this.isChatWindowOpen, () => Ht, () =>
|
|
7199
|
+
${Re(this.isChatWindowOpen, () => Ht, () => eo)}
|
|
7086
7200
|
</div>
|
|
7087
7201
|
</div>
|
|
7088
7202
|
`
|
|
@@ -7095,25 +7209,25 @@ let ut = class extends ne {
|
|
|
7095
7209
|
this.dispatchEvent(new CustomEvent("toggle-chat"));
|
|
7096
7210
|
}
|
|
7097
7211
|
};
|
|
7098
|
-
|
|
7212
|
+
pt.styles = [Se, nt`
|
|
7099
7213
|
.button {
|
|
7100
7214
|
background-color: var(--iai-chat-i-ocb-bg);
|
|
7101
7215
|
color: var(--iai-chat-i-ocb-fg);
|
|
7102
7216
|
}
|
|
7103
7217
|
`];
|
|
7104
|
-
|
|
7218
|
+
zn([
|
|
7105
7219
|
V({ type: Object })
|
|
7106
|
-
],
|
|
7107
|
-
|
|
7220
|
+
], pt.prototype, "options", 2);
|
|
7221
|
+
zn([
|
|
7108
7222
|
V({ type: Boolean })
|
|
7109
|
-
],
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
],
|
|
7113
|
-
|
|
7223
|
+
], pt.prototype, "isChatWindowOpen", 2);
|
|
7224
|
+
zn([
|
|
7225
|
+
gt()
|
|
7226
|
+
], pt.prototype, "isCtaOpen", 2);
|
|
7227
|
+
pt = zn([
|
|
7114
7228
|
Ee("iai-chat-open-chat-button")
|
|
7115
|
-
],
|
|
7116
|
-
class
|
|
7229
|
+
], pt);
|
|
7230
|
+
class sl {
|
|
7117
7231
|
constructor(e) {
|
|
7118
7232
|
this.widget = null, this.options = Pn.parse(e);
|
|
7119
7233
|
const t = document.createElement("iai-chat-popup");
|
|
@@ -7134,121 +7248,6 @@ class nl {
|
|
|
7134
7248
|
(e = this.widget) == null || e.remove(), this.widget = null;
|
|
7135
7249
|
}
|
|
7136
7250
|
}
|
|
7137
|
-
var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, zn = (i, e, t, n) => {
|
|
7138
|
-
for (var s = n > 1 ? void 0 : n ? sl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7139
|
-
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7140
|
-
return n && s && il(e, t, s), s;
|
|
7141
|
-
};
|
|
7142
|
-
let pt = class extends ne {
|
|
7143
|
-
constructor() {
|
|
7144
|
-
super(...arguments), this.activeIndex = 0, this.items = [];
|
|
7145
|
-
}
|
|
7146
|
-
render() {
|
|
7147
|
-
return z`
|
|
7148
|
-
<div>
|
|
7149
|
-
<div
|
|
7150
|
-
id="carousel"
|
|
7151
|
-
class="flex overflow-x-auto snap-x snap-mandatory overflow-scrolling-touch m-0 p-0"
|
|
7152
|
-
@scroll="${this.onScroll}"
|
|
7153
|
-
>
|
|
7154
|
-
<slot @slotchange=${this.onSlotChange}>zzz</slot>
|
|
7155
|
-
</div>
|
|
7156
|
-
|
|
7157
|
-
<div class="flex justify-between items-center">
|
|
7158
|
-
<button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(-1)}>
|
|
7159
|
-
|
|
7160
|
-
<svg
|
|
7161
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7162
|
-
viewBox="0 0 24 24"
|
|
7163
|
-
width="100%"
|
|
7164
|
-
height="100%"
|
|
7165
|
-
fill="currentColor"
|
|
7166
|
-
>
|
|
7167
|
-
<title>arrow-left</title>
|
|
7168
|
-
<path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
|
|
7169
|
-
</svg>
|
|
7170
|
-
</button>
|
|
7171
|
-
|
|
7172
|
-
<div class="flex justify-center space-x-2">
|
|
7173
|
-
${Is(this.items, (i, e) => e, (i, e) => z`
|
|
7174
|
-
<span
|
|
7175
|
-
class="h-2.5 w-2.5 bg-gray-400 rounded-full inline-block ${this.activeIndex === e ? "bg-gray-600" : ""}"
|
|
7176
|
-
@click=${() => this.scrollToIndex(e)}
|
|
7177
|
-
/>
|
|
7178
|
-
`)}
|
|
7179
|
-
</div>
|
|
7180
|
-
|
|
7181
|
-
<button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(1)}>
|
|
7182
|
-
<svg
|
|
7183
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7184
|
-
viewBox="0 0 24 24"
|
|
7185
|
-
width="100%"
|
|
7186
|
-
height="100%"
|
|
7187
|
-
fill="currentColor"
|
|
7188
|
-
>
|
|
7189
|
-
<title>arrow-right</title>
|
|
7190
|
-
<path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
|
|
7191
|
-
</svg>
|
|
7192
|
-
</button>
|
|
7193
|
-
</div>
|
|
7194
|
-
</div>
|
|
7195
|
-
`;
|
|
7196
|
-
}
|
|
7197
|
-
onSlotChange(i) {
|
|
7198
|
-
const e = i.target;
|
|
7199
|
-
this.items = (e == null ? void 0 : e.assignedElements()) || [];
|
|
7200
|
-
}
|
|
7201
|
-
onScroll() {
|
|
7202
|
-
const { carousel: i } = this;
|
|
7203
|
-
if (!i)
|
|
7204
|
-
return;
|
|
7205
|
-
let e = 0, t = 1 / 0;
|
|
7206
|
-
this.items.forEach((n, s) => {
|
|
7207
|
-
const r = Math.abs(n.offsetLeft - i.scrollLeft);
|
|
7208
|
-
r < t && (t = r, e = s);
|
|
7209
|
-
}), this.activeIndex = e;
|
|
7210
|
-
}
|
|
7211
|
-
scrollCarousel(i) {
|
|
7212
|
-
this.scrollToIndex(this.activeIndex + i);
|
|
7213
|
-
}
|
|
7214
|
-
scrollToIndex(i) {
|
|
7215
|
-
i !== this.activeIndex && (this.activeIndex = Math.max(0, Math.min(i, this.items.length - 1)), this.scrollToActiveItem());
|
|
7216
|
-
}
|
|
7217
|
-
scrollToActiveItem() {
|
|
7218
|
-
const { carousel: i, items: e, activeIndex: t } = this;
|
|
7219
|
-
if (!i)
|
|
7220
|
-
return;
|
|
7221
|
-
const n = e[t];
|
|
7222
|
-
n && i.scrollTo({
|
|
7223
|
-
left: n.offsetLeft - i.clientWidth / 2 + n.clientWidth / 2,
|
|
7224
|
-
behavior: "smooth"
|
|
7225
|
-
});
|
|
7226
|
-
}
|
|
7227
|
-
};
|
|
7228
|
-
pt.styles = [Se, nt`
|
|
7229
|
-
::slotted(div) {
|
|
7230
|
-
flex: 0 0 auto;
|
|
7231
|
-
scroll-snap-align: start;
|
|
7232
|
-
width: 100%;
|
|
7233
|
-
padding: 1rem;
|
|
7234
|
-
background-color: #f8f9fa;
|
|
7235
|
-
border: 1px solid rgba(0, 0, 0, 0.125);
|
|
7236
|
-
border-radius: 0.25rem;
|
|
7237
|
-
margin-right: 1rem;
|
|
7238
|
-
}
|
|
7239
|
-
`];
|
|
7240
|
-
zn([
|
|
7241
|
-
V({ type: Number })
|
|
7242
|
-
], pt.prototype, "activeIndex", 2);
|
|
7243
|
-
zn([
|
|
7244
|
-
V({ type: Array })
|
|
7245
|
-
], pt.prototype, "items", 2);
|
|
7246
|
-
zn([
|
|
7247
|
-
An("#carousel")
|
|
7248
|
-
], pt.prototype, "carousel", 2);
|
|
7249
|
-
pt = zn([
|
|
7250
|
-
Ee("iai-chat-carousel")
|
|
7251
|
-
], pt);
|
|
7252
7251
|
function rl({ html: i, params: e }) {
|
|
7253
7252
|
return i`
|
|
7254
7253
|
<div>
|
|
@@ -7283,18 +7282,18 @@ function al(i) {
|
|
|
7283
7282
|
}, a = document.createElement("iai-chat-iframe-modal");
|
|
7284
7283
|
a.title = "Schedule a Tour", a.src = `${i}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
|
|
7285
7284
|
const o = () => {
|
|
7286
|
-
a.remove(), window.removeEventListener("beforeunload",
|
|
7285
|
+
a.remove(), window.removeEventListener("beforeunload", u), s.setInputDisabled(!1);
|
|
7287
7286
|
}, l = async ({ detail: p }) => {
|
|
7288
7287
|
if (p.type !== "tourScheduled")
|
|
7289
7288
|
return;
|
|
7290
|
-
const { tourType: c, tourDate:
|
|
7289
|
+
const { tourType: c, tourDate: g, tourTime: O } = p;
|
|
7291
7290
|
o(), s.addMessage({
|
|
7292
7291
|
role: "system",
|
|
7293
7292
|
content: "Your tour has been scheduled!"
|
|
7294
7293
|
}), await s.sendFunctionCallResponse(t, {
|
|
7295
7294
|
status: "scheduled",
|
|
7296
7295
|
tourType: c,
|
|
7297
|
-
tourDate:
|
|
7296
|
+
tourDate: g,
|
|
7298
7297
|
tourTime: O
|
|
7299
7298
|
}, !0);
|
|
7300
7299
|
}, d = async () => {
|
|
@@ -7304,13 +7303,13 @@ function al(i) {
|
|
|
7304
7303
|
}), await s.sendFunctionCallResponse(t, {
|
|
7305
7304
|
status: "canceled"
|
|
7306
7305
|
}, !0);
|
|
7307
|
-
},
|
|
7306
|
+
}, u = async () => {
|
|
7308
7307
|
o(), s.addMessage({
|
|
7309
7308
|
role: "system",
|
|
7310
7309
|
content: "Tour Scheduler Closed"
|
|
7311
7310
|
});
|
|
7312
7311
|
};
|
|
7313
|
-
a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload",
|
|
7312
|
+
a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload", u), document.body.appendChild(a), s.addMessage({
|
|
7314
7313
|
role: "system",
|
|
7315
7314
|
content: "Tour Scheduler Opened"
|
|
7316
7315
|
});
|
|
@@ -7378,14 +7377,14 @@ var Sn;
|
|
|
7378
7377
|
})(i.ConversationStatus || (i.ConversationStatus = {}));
|
|
7379
7378
|
})(Sn || (Sn = {}));
|
|
7380
7379
|
const ll = Sn.AcknowledgeType, cl = "Anyone Home", dl = "IB Chat Leasing - Development";
|
|
7381
|
-
let
|
|
7382
|
-
const
|
|
7383
|
-
var
|
|
7380
|
+
let ul = "https://five9.ah.inhabit.work";
|
|
7381
|
+
const hl = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
|
|
7382
|
+
var _e, We;
|
|
7384
7383
|
const Et = class Et {
|
|
7385
7384
|
constructor() {
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this,
|
|
7385
|
+
Gn(this, _e, void 0);
|
|
7386
|
+
Gn(this, We, void 0);
|
|
7387
|
+
this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this, _e, null), Ie(this, We, null), this.conversationStarted = !1;
|
|
7389
7388
|
}
|
|
7390
7389
|
serialize() {
|
|
7391
7390
|
return JSON.stringify({
|
|
@@ -7410,10 +7409,10 @@ const Et = class Et {
|
|
|
7410
7409
|
},
|
|
7411
7410
|
body: JSON.stringify({ tenantName: cl })
|
|
7412
7411
|
});
|
|
7413
|
-
return Ie(this,
|
|
7412
|
+
return Ie(this, _e, await e.json()), en(this, _e);
|
|
7414
7413
|
}
|
|
7415
7414
|
setSession(e) {
|
|
7416
|
-
Ie(this,
|
|
7415
|
+
Ie(this, _e, e);
|
|
7417
7416
|
}
|
|
7418
7417
|
setConversationId(e) {
|
|
7419
7418
|
Ie(this, We, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
|
|
@@ -7429,7 +7428,7 @@ const Et = class Et {
|
|
|
7429
7428
|
if (!this.conversationId)
|
|
7430
7429
|
throw new Error("Conversation not started");
|
|
7431
7430
|
this.five9WebSocket && this.five9WebSocket.destroy();
|
|
7432
|
-
const e = new ol(`${
|
|
7431
|
+
const e = new ol(`${hl}/conversations/${this.conversationId}/ws`);
|
|
7433
7432
|
e.on("*", (t, n) => {
|
|
7434
7433
|
this._emitter.emit(t, n);
|
|
7435
7434
|
}), e.on("conversationCreated", (t) => {
|
|
@@ -7497,7 +7496,7 @@ const Et = class Et {
|
|
|
7497
7496
|
...e,
|
|
7498
7497
|
campaignName: dl,
|
|
7499
7498
|
tenantId: this.tenantId,
|
|
7500
|
-
callbackUrl:
|
|
7499
|
+
callbackUrl: ul
|
|
7501
7500
|
};
|
|
7502
7501
|
console.log("body", n);
|
|
7503
7502
|
const s = await this.authenticatedFetch("/conversations", {
|
|
@@ -7545,11 +7544,11 @@ const Et = class Et {
|
|
|
7545
7544
|
}), this.destroy();
|
|
7546
7545
|
}
|
|
7547
7546
|
destroy() {
|
|
7548
|
-
this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this,
|
|
7547
|
+
this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this, _e, null), Ie(this, We, null);
|
|
7549
7548
|
}
|
|
7550
7549
|
// Getters
|
|
7551
7550
|
get sessionToken() {
|
|
7552
|
-
return en(this,
|
|
7551
|
+
return en(this, _e);
|
|
7553
7552
|
}
|
|
7554
7553
|
get conversationId() {
|
|
7555
7554
|
return en(this, We);
|
|
@@ -7575,7 +7574,7 @@ const Et = class Et {
|
|
|
7575
7574
|
return (e = this.sessionToken) == null ? void 0 : e.context.farmId;
|
|
7576
7575
|
}
|
|
7577
7576
|
};
|
|
7578
|
-
|
|
7577
|
+
_e = new WeakMap(), We = new WeakMap();
|
|
7579
7578
|
let Cn = Et;
|
|
7580
7579
|
function Tt(i) {
|
|
7581
7580
|
return `any-${i || "main"}-chatSession`;
|
|
@@ -7729,7 +7728,7 @@ function ar(i, e) {
|
|
|
7729
7728
|
};
|
|
7730
7729
|
i.cleanOptions.config.disclaimerMessage = "You are chatting with a live agent", i.addEventListener("iai-chat-send-user-message", t), i.addEventListener("iai-chat-reset", s), i.addEventListener("iai-chat-destroy", n);
|
|
7731
7730
|
}
|
|
7732
|
-
class
|
|
7731
|
+
class gl {
|
|
7733
7732
|
constructor(e, t) {
|
|
7734
7733
|
const n = Pn.parse({
|
|
7735
7734
|
assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
|
|
@@ -7739,7 +7738,7 @@ class bl {
|
|
|
7739
7738
|
styles: e.styles || {}
|
|
7740
7739
|
}
|
|
7741
7740
|
});
|
|
7742
|
-
n.handlers.functionCalls.transferToLiveAgent = pl, n.handlers.functionCalls.showScheduleTourWidget = al(t.schedulerUrl), n.handlers.enhancedContent.unitList = rl, this.chatWidget = new
|
|
7741
|
+
n.handlers.functionCalls.transferToLiveAgent = pl, n.handlers.functionCalls.showScheduleTourWidget = al(t.schedulerUrl), n.handlers.enhancedContent.unitList = rl, this.chatWidget = new sl(n);
|
|
7743
7742
|
const s = localStorage.getItem(Tt(n.config.historyKey));
|
|
7744
7743
|
if (s) {
|
|
7745
7744
|
const r = Cn.deserialize(s);
|
|
@@ -7753,5 +7752,5 @@ class bl {
|
|
|
7753
7752
|
}
|
|
7754
7753
|
}
|
|
7755
7754
|
export {
|
|
7756
|
-
|
|
7755
|
+
gl as AnyChatWidget
|
|
7757
7756
|
};
|