@justeattakeaway/pie-modal 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/{types/packages/components/pie-modal/src/index.d.ts → index.d.ts} +241 -126
- package/dist/index.js +965 -567
- package/dist/react.d.ts +249 -0
- package/dist/react.js +213 -206
- package/package.json +10 -2
- package/src/index.ts +11 -6
- package/src/modal.scss +1 -0
- package/.eslintignore +0 -6
- package/.turbo/turbo-build.log +0 -14
- package/CHANGELOG.md +0 -199
- package/dist/types/index.d.ts +0 -1
- package/dist/types/packages/components/pie-modal/src/defs.d.ts +0 -110
- package/dist/types/packages/components/pie-modal/src/defs.d.ts.map +0 -1
- package/dist/types/packages/components/pie-modal/src/index.d.ts.map +0 -1
- package/dist/types/packages/components/pie-modal/src/react.d.ts +0 -8
- package/dist/types/packages/components/pie-modal/src/react.d.ts.map +0 -1
- package/dist/types/react.d.ts +0 -1
- package/playwright/index.html +0 -56
- package/playwright/index.ts +0 -1
- package/playwright-lit-visual.config.ts +0 -4
- package/playwright-lit.config.ts +0 -4
- package/test/component/pie-modal.spec.ts +0 -816
- package/test/helpers/index.ts +0 -31
- package/test/visual/pie-modal.spec.ts +0 -494
- package/tsconfig.json +0 -8
- package/vite.config.js +0 -3
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { nothing as
|
|
2
|
-
import { html as
|
|
3
|
-
import { property as
|
|
4
|
-
import { property as
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
(
|
|
8
|
-
return
|
|
1
|
+
import { nothing as b, unsafeCSS as at, LitElement as lt } from "lit";
|
|
2
|
+
import { html as _, unsafeStatic as dt } from "lit/static-html.js";
|
|
3
|
+
import { property as v, query as ct } from "lit/decorators.js";
|
|
4
|
+
import { property as ht } from "lit/decorators/property.js";
|
|
5
|
+
var ut = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, ft = (i, e, t, o) => {
|
|
6
|
+
for (var n = o > 1 ? void 0 : o ? pt(e, t) : e, r = i.length - 1, s; r >= 0; r--)
|
|
7
|
+
(s = i[r]) && (n = (o ? s(e, t, n) : s(n)) || n);
|
|
8
|
+
return o && n && ut(e, t, n), n;
|
|
9
9
|
};
|
|
10
|
-
const
|
|
11
|
-
class e extends
|
|
10
|
+
const gt = (i) => {
|
|
11
|
+
class e extends i {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments), this.dir = "ltr";
|
|
14
14
|
}
|
|
@@ -22,76 +22,76 @@ const ot = (n) => {
|
|
|
22
22
|
* will not be reactive and is only computed once
|
|
23
23
|
*/
|
|
24
24
|
get isRTL() {
|
|
25
|
-
var
|
|
26
|
-
return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((
|
|
25
|
+
var o;
|
|
26
|
+
return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((o = window == null ? void 0 : window.getComputedStyle(this)) == null ? void 0 : o.direction) === "rtl";
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
return
|
|
30
|
-
|
|
29
|
+
return ft([
|
|
30
|
+
ht({ type: String, reflect: !0 })
|
|
31
31
|
], e.prototype, "dir", 2), e;
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
Object.defineProperty(
|
|
32
|
+
}, _e = (i, e, t) => function(n, r) {
|
|
33
|
+
const s = `#${r}`;
|
|
34
|
+
Object.defineProperty(n, r, {
|
|
35
35
|
get() {
|
|
36
|
-
return this[
|
|
36
|
+
return this[s];
|
|
37
37
|
},
|
|
38
|
-
set(
|
|
39
|
-
const
|
|
40
|
-
e.includes(
|
|
41
|
-
`<${
|
|
38
|
+
set(l) {
|
|
39
|
+
const a = this[s];
|
|
40
|
+
e.includes(l) ? this[s] = l : (console.error(
|
|
41
|
+
`<${i}> Invalid value "${l}" provided for property "${r}".`,
|
|
42
42
|
`Must be one of: ${e.join(" | ")}.`,
|
|
43
43
|
`Falling back to default value: "${t}"`
|
|
44
|
-
), this[
|
|
44
|
+
), this[s] = t), this.requestUpdate(r, a);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
},
|
|
48
|
-
const
|
|
49
|
-
Object.defineProperty(t,
|
|
47
|
+
}, vt = (i) => function(t, o) {
|
|
48
|
+
const n = `#${o}`;
|
|
49
|
+
Object.defineProperty(t, o, {
|
|
50
50
|
get() {
|
|
51
|
-
return this[
|
|
51
|
+
return this[n];
|
|
52
52
|
},
|
|
53
|
-
set(
|
|
54
|
-
const
|
|
55
|
-
(
|
|
53
|
+
set(r) {
|
|
54
|
+
const s = this[n];
|
|
55
|
+
(r == null || typeof r == "string" && r.trim() === "") && console.error(`<${i}> Missing required attribute "${o}"`), this[n] = r, this.requestUpdate(o, s);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
function
|
|
60
|
-
if (Array.isArray(
|
|
61
|
-
for (var e = 0, t = Array(
|
|
62
|
-
t[e] =
|
|
59
|
+
function mt(i) {
|
|
60
|
+
if (Array.isArray(i)) {
|
|
61
|
+
for (var e = 0, t = Array(i.length); e < i.length; e++)
|
|
62
|
+
t[e] = i[e];
|
|
63
63
|
return t;
|
|
64
64
|
} else
|
|
65
|
-
return Array.from(
|
|
65
|
+
return Array.from(i);
|
|
66
66
|
}
|
|
67
|
-
var
|
|
67
|
+
var we = !1;
|
|
68
68
|
if (typeof window < "u") {
|
|
69
|
-
var
|
|
69
|
+
var xe = {
|
|
70
70
|
get passive() {
|
|
71
|
-
|
|
71
|
+
we = !0;
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
window.addEventListener("testPassive", null,
|
|
74
|
+
window.addEventListener("testPassive", null, xe), window.removeEventListener("testPassive", null, xe);
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
return
|
|
76
|
+
var Q = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), x = [], ee = !1, qe = -1, R = void 0, S = void 0, H = void 0, We = function(e) {
|
|
77
|
+
return x.some(function(t) {
|
|
78
78
|
return !!(t.options.allowTouchMove && t.options.allowTouchMove(e));
|
|
79
79
|
});
|
|
80
|
-
},
|
|
80
|
+
}, te = function(e) {
|
|
81
81
|
var t = e || window.event;
|
|
82
|
-
return
|
|
83
|
-
},
|
|
84
|
-
if (
|
|
85
|
-
var t = !!e && e.reserveScrollBarGap === !0,
|
|
86
|
-
if (t &&
|
|
87
|
-
var
|
|
88
|
-
|
|
82
|
+
return We(t.target) || t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
83
|
+
}, bt = function(e) {
|
|
84
|
+
if (H === void 0) {
|
|
85
|
+
var t = !!e && e.reserveScrollBarGap === !0, o = window.innerWidth - document.documentElement.clientWidth;
|
|
86
|
+
if (t && o > 0) {
|
|
87
|
+
var n = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
88
|
+
H = document.body.style.paddingRight, document.body.style.paddingRight = n + o + "px";
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
},
|
|
91
|
+
R === void 0 && (R = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
92
|
+
}, yt = function() {
|
|
93
|
+
H !== void 0 && (document.body.style.paddingRight = H, H = void 0), R !== void 0 && (document.body.style.overflow = R, R = void 0);
|
|
94
|
+
}, _t = function() {
|
|
95
95
|
return window.requestAnimationFrame(function() {
|
|
96
96
|
if (S === void 0) {
|
|
97
97
|
S = {
|
|
@@ -99,79 +99,79 @@ var X = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
99
99
|
top: document.body.style.top,
|
|
100
100
|
left: document.body.style.left
|
|
101
101
|
};
|
|
102
|
-
var e = window, t = e.scrollY,
|
|
103
|
-
document.body.style.position = "fixed", document.body.style.top = -t, document.body.style.left = -
|
|
102
|
+
var e = window, t = e.scrollY, o = e.scrollX, n = e.innerHeight;
|
|
103
|
+
document.body.style.position = "fixed", document.body.style.top = -t, document.body.style.left = -o, setTimeout(function() {
|
|
104
104
|
return window.requestAnimationFrame(function() {
|
|
105
|
-
var
|
|
106
|
-
|
|
105
|
+
var r = n - window.innerHeight;
|
|
106
|
+
r && t >= n && (document.body.style.top = -(t + r));
|
|
107
107
|
});
|
|
108
108
|
}, 300);
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
},
|
|
111
|
+
}, wt = function() {
|
|
112
112
|
if (S !== void 0) {
|
|
113
113
|
var e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
|
|
114
114
|
document.body.style.position = S.position, document.body.style.top = S.top, document.body.style.left = S.left, window.scrollTo(t, e), S = void 0;
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, $t = function(e) {
|
|
117
117
|
return e ? e.scrollHeight - e.scrollTop <= e.clientHeight : !1;
|
|
118
|
-
},
|
|
119
|
-
var
|
|
120
|
-
return
|
|
121
|
-
},
|
|
118
|
+
}, At = function(e, t) {
|
|
119
|
+
var o = e.targetTouches[0].clientY - qe;
|
|
120
|
+
return We(e.target) ? !1 : t && t.scrollTop === 0 && o > 0 || $t(t) && o < 0 ? te(e) : (e.stopPropagation(), !0);
|
|
121
|
+
}, Et = function(e, t) {
|
|
122
122
|
if (!e) {
|
|
123
123
|
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
if (!
|
|
127
|
-
return
|
|
126
|
+
if (!x.some(function(n) {
|
|
127
|
+
return n.targetElement === e;
|
|
128
128
|
})) {
|
|
129
|
-
var
|
|
129
|
+
var o = {
|
|
130
130
|
targetElement: e,
|
|
131
131
|
options: t || {}
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}, e.ontouchmove = function(
|
|
136
|
-
|
|
137
|
-
},
|
|
133
|
+
x = [].concat(mt(x), [o]), Q ? _t() : bt(t), Q && (e.ontouchstart = function(n) {
|
|
134
|
+
n.targetTouches.length === 1 && (qe = n.targetTouches[0].clientY);
|
|
135
|
+
}, e.ontouchmove = function(n) {
|
|
136
|
+
n.targetTouches.length === 1 && At(n, e);
|
|
137
|
+
}, ee || (document.addEventListener("touchmove", te, we ? { passive: !1 } : void 0), ee = !0));
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, St = function(e) {
|
|
140
140
|
if (!e) {
|
|
141
141
|
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
x = x.filter(function(t) {
|
|
145
145
|
return t.targetElement !== e;
|
|
146
|
-
}),
|
|
146
|
+
}), Q && (e.ontouchstart = null, e.ontouchmove = null, ee && x.length === 0 && (document.removeEventListener("touchmove", te, we ? { passive: !1 } : void 0), ee = !1)), Q ? wt() : yt();
|
|
147
147
|
};
|
|
148
|
-
function
|
|
149
|
-
var
|
|
148
|
+
function w(i, e, t, o) {
|
|
149
|
+
var n = arguments.length, r = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
|
|
150
150
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
151
|
-
|
|
151
|
+
r = Reflect.decorate(i, e, t, o);
|
|
152
152
|
else
|
|
153
|
-
for (var
|
|
154
|
-
(
|
|
155
|
-
return
|
|
153
|
+
for (var l = i.length - 1; l >= 0; l--)
|
|
154
|
+
(s = i[l]) && (r = (n < 3 ? s(r) : n > 3 ? s(e, t, r) : s(e, t)) || r);
|
|
155
|
+
return n > 3 && r && Object.defineProperty(e, t, r), r;
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* @license
|
|
159
159
|
* Copyright 2019 Google LLC
|
|
160
160
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
161
161
|
*/
|
|
162
|
-
const
|
|
163
|
-
let
|
|
164
|
-
constructor(e, t,
|
|
165
|
-
if (this._$cssResult$ = !0,
|
|
162
|
+
const J = window, $e = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ae = Symbol(), Ce = /* @__PURE__ */ new WeakMap();
|
|
163
|
+
let Ke = class {
|
|
164
|
+
constructor(e, t, o) {
|
|
165
|
+
if (this._$cssResult$ = !0, o !== Ae)
|
|
166
166
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
167
167
|
this.cssText = e, this.t = t;
|
|
168
168
|
}
|
|
169
169
|
get styleSheet() {
|
|
170
170
|
let e = this.o;
|
|
171
171
|
const t = this.t;
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
|
|
172
|
+
if ($e && e === void 0) {
|
|
173
|
+
const o = t !== void 0 && t.length === 1;
|
|
174
|
+
o && (e = Ce.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), o && Ce.set(t, e));
|
|
175
175
|
}
|
|
176
176
|
return e;
|
|
177
177
|
}
|
|
@@ -179,62 +179,62 @@ let De = class {
|
|
|
179
179
|
return this.cssText;
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
const
|
|
183
|
-
const t =
|
|
184
|
-
if (
|
|
185
|
-
return
|
|
186
|
-
if (typeof
|
|
187
|
-
return
|
|
188
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
189
|
-
})(
|
|
190
|
-
return new
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
182
|
+
const kt = (i) => new Ke(typeof i == "string" ? i : i + "", void 0, Ae), Ee = (i, ...e) => {
|
|
183
|
+
const t = i.length === 1 ? i[0] : e.reduce((o, n, r) => o + ((s) => {
|
|
184
|
+
if (s._$cssResult$ === !0)
|
|
185
|
+
return s.cssText;
|
|
186
|
+
if (typeof s == "number")
|
|
187
|
+
return s;
|
|
188
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
189
|
+
})(n) + i[r + 1], i[0]);
|
|
190
|
+
return new Ke(t, i, Ae);
|
|
191
|
+
}, xt = (i, e) => {
|
|
192
|
+
$e ? i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
|
193
|
+
const o = document.createElement("style"), n = J.litNonce;
|
|
194
|
+
n !== void 0 && o.setAttribute("nonce", n), o.textContent = t.cssText, i.appendChild(o);
|
|
195
195
|
});
|
|
196
|
-
},
|
|
196
|
+
}, Me = $e ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
197
197
|
let t = "";
|
|
198
|
-
for (const
|
|
199
|
-
t +=
|
|
200
|
-
return
|
|
201
|
-
})(
|
|
198
|
+
for (const o of e.cssRules)
|
|
199
|
+
t += o.cssText;
|
|
200
|
+
return kt(t);
|
|
201
|
+
})(i) : i;
|
|
202
202
|
/**
|
|
203
203
|
* @license
|
|
204
204
|
* Copyright 2017 Google LLC
|
|
205
205
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
206
206
|
*/
|
|
207
|
-
var
|
|
208
|
-
const
|
|
207
|
+
var ae;
|
|
208
|
+
const ie = window, ze = ie.trustedTypes, Ct = ze ? ze.emptyScript : "", Oe = ie.reactiveElementPolyfillSupport, me = { toAttribute(i, e) {
|
|
209
209
|
switch (e) {
|
|
210
210
|
case Boolean:
|
|
211
|
-
|
|
211
|
+
i = i ? Ct : null;
|
|
212
212
|
break;
|
|
213
213
|
case Object:
|
|
214
214
|
case Array:
|
|
215
|
-
|
|
215
|
+
i = i == null ? i : JSON.stringify(i);
|
|
216
216
|
}
|
|
217
|
-
return
|
|
218
|
-
}, fromAttribute(
|
|
219
|
-
let t =
|
|
217
|
+
return i;
|
|
218
|
+
}, fromAttribute(i, e) {
|
|
219
|
+
let t = i;
|
|
220
220
|
switch (e) {
|
|
221
221
|
case Boolean:
|
|
222
|
-
t =
|
|
222
|
+
t = i !== null;
|
|
223
223
|
break;
|
|
224
224
|
case Number:
|
|
225
|
-
t =
|
|
225
|
+
t = i === null ? null : Number(i);
|
|
226
226
|
break;
|
|
227
227
|
case Object:
|
|
228
228
|
case Array:
|
|
229
229
|
try {
|
|
230
|
-
t = JSON.parse(
|
|
230
|
+
t = JSON.parse(i);
|
|
231
231
|
} catch {
|
|
232
232
|
t = null;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
return t;
|
|
236
|
-
} },
|
|
237
|
-
let
|
|
236
|
+
} }, Ye = (i, e) => e !== i && (e == e || i == i), le = { attribute: !0, type: String, converter: me, reflect: !1, hasChanged: Ye }, be = "finalized";
|
|
237
|
+
let O = class extends HTMLElement {
|
|
238
238
|
constructor() {
|
|
239
239
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
240
240
|
}
|
|
@@ -245,61 +245,61 @@ let z = class extends HTMLElement {
|
|
|
245
245
|
static get observedAttributes() {
|
|
246
246
|
this.finalize();
|
|
247
247
|
const e = [];
|
|
248
|
-
return this.elementProperties.forEach((t,
|
|
249
|
-
const
|
|
250
|
-
|
|
248
|
+
return this.elementProperties.forEach((t, o) => {
|
|
249
|
+
const n = this._$Ep(o, t);
|
|
250
|
+
n !== void 0 && (this._$Ev.set(n, o), e.push(n));
|
|
251
251
|
}), e;
|
|
252
252
|
}
|
|
253
|
-
static createProperty(e, t =
|
|
253
|
+
static createProperty(e, t = le) {
|
|
254
254
|
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
255
|
-
const
|
|
256
|
-
|
|
255
|
+
const o = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, o, t);
|
|
256
|
+
n !== void 0 && Object.defineProperty(this.prototype, e, n);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
static getPropertyDescriptor(e, t,
|
|
259
|
+
static getPropertyDescriptor(e, t, o) {
|
|
260
260
|
return { get() {
|
|
261
261
|
return this[t];
|
|
262
|
-
}, set(
|
|
263
|
-
const
|
|
264
|
-
this[t] =
|
|
262
|
+
}, set(n) {
|
|
263
|
+
const r = this[e];
|
|
264
|
+
this[t] = n, this.requestUpdate(e, r, o);
|
|
265
265
|
}, configurable: !0, enumerable: !0 };
|
|
266
266
|
}
|
|
267
267
|
static getPropertyOptions(e) {
|
|
268
|
-
return this.elementProperties.get(e) ||
|
|
268
|
+
return this.elementProperties.get(e) || le;
|
|
269
269
|
}
|
|
270
270
|
static finalize() {
|
|
271
|
-
if (this.hasOwnProperty(
|
|
271
|
+
if (this.hasOwnProperty(be))
|
|
272
272
|
return !1;
|
|
273
|
-
this[
|
|
273
|
+
this[be] = !0;
|
|
274
274
|
const e = Object.getPrototypeOf(this);
|
|
275
275
|
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
276
|
-
const t = this.properties,
|
|
277
|
-
for (const
|
|
278
|
-
this.createProperty(
|
|
276
|
+
const t = this.properties, o = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
277
|
+
for (const n of o)
|
|
278
|
+
this.createProperty(n, t[n]);
|
|
279
279
|
}
|
|
280
280
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
281
281
|
}
|
|
282
282
|
static finalizeStyles(e) {
|
|
283
283
|
const t = [];
|
|
284
284
|
if (Array.isArray(e)) {
|
|
285
|
-
const
|
|
286
|
-
for (const
|
|
287
|
-
t.unshift(
|
|
285
|
+
const o = new Set(e.flat(1 / 0).reverse());
|
|
286
|
+
for (const n of o)
|
|
287
|
+
t.unshift(Me(n));
|
|
288
288
|
} else
|
|
289
|
-
e !== void 0 && t.push(
|
|
289
|
+
e !== void 0 && t.push(Me(e));
|
|
290
290
|
return t;
|
|
291
291
|
}
|
|
292
292
|
static _$Ep(e, t) {
|
|
293
|
-
const
|
|
294
|
-
return
|
|
293
|
+
const o = t.attribute;
|
|
294
|
+
return o === !1 ? void 0 : typeof o == "string" ? o : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
295
295
|
}
|
|
296
296
|
u() {
|
|
297
297
|
var e;
|
|
298
298
|
this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
|
|
299
299
|
}
|
|
300
300
|
addController(e) {
|
|
301
|
-
var t,
|
|
302
|
-
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((
|
|
301
|
+
var t, o;
|
|
302
|
+
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((o = e.hostConnected) === null || o === void 0 || o.call(e));
|
|
303
303
|
}
|
|
304
304
|
removeController(e) {
|
|
305
305
|
var t;
|
|
@@ -313,13 +313,13 @@ let z = class extends HTMLElement {
|
|
|
313
313
|
createRenderRoot() {
|
|
314
314
|
var e;
|
|
315
315
|
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
316
|
-
return
|
|
316
|
+
return xt(t, this.constructor.elementStyles), t;
|
|
317
317
|
}
|
|
318
318
|
connectedCallback() {
|
|
319
319
|
var e;
|
|
320
320
|
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
321
|
-
var
|
|
322
|
-
return (
|
|
321
|
+
var o;
|
|
322
|
+
return (o = t.hostConnected) === null || o === void 0 ? void 0 : o.call(t);
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
enableUpdating(e) {
|
|
@@ -327,32 +327,32 @@ let z = class extends HTMLElement {
|
|
|
327
327
|
disconnectedCallback() {
|
|
328
328
|
var e;
|
|
329
329
|
(e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
330
|
-
var
|
|
331
|
-
return (
|
|
330
|
+
var o;
|
|
331
|
+
return (o = t.hostDisconnected) === null || o === void 0 ? void 0 : o.call(t);
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
attributeChangedCallback(e, t,
|
|
335
|
-
this._$AK(e,
|
|
334
|
+
attributeChangedCallback(e, t, o) {
|
|
335
|
+
this._$AK(e, o);
|
|
336
336
|
}
|
|
337
|
-
_$EO(e, t,
|
|
338
|
-
var
|
|
339
|
-
const
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
this._$El = e,
|
|
337
|
+
_$EO(e, t, o = le) {
|
|
338
|
+
var n;
|
|
339
|
+
const r = this.constructor._$Ep(e, o);
|
|
340
|
+
if (r !== void 0 && o.reflect === !0) {
|
|
341
|
+
const s = (((n = o.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? o.converter : me).toAttribute(t, o.type);
|
|
342
|
+
this._$El = e, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$El = null;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
_$AK(e, t) {
|
|
346
|
-
var
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
const
|
|
350
|
-
this._$El =
|
|
346
|
+
var o;
|
|
347
|
+
const n = this.constructor, r = n._$Ev.get(e);
|
|
348
|
+
if (r !== void 0 && this._$El !== r) {
|
|
349
|
+
const s = n.getPropertyOptions(r), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((o = s.converter) === null || o === void 0 ? void 0 : o.fromAttribute) !== void 0 ? s.converter : me;
|
|
350
|
+
this._$El = r, this[r] = l.fromAttribute(t, s.type), this._$El = null;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
requestUpdate(e, t,
|
|
354
|
-
let
|
|
355
|
-
e !== void 0 && (((
|
|
353
|
+
requestUpdate(e, t, o) {
|
|
354
|
+
let n = !0;
|
|
355
|
+
e !== void 0 && (((o = o || this.constructor.getPropertyOptions(e)).hasChanged || Ye)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), o.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, o))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
356
356
|
}
|
|
357
357
|
async _$Ej() {
|
|
358
358
|
this.isUpdatePending = !0;
|
|
@@ -371,26 +371,26 @@ let z = class extends HTMLElement {
|
|
|
371
371
|
var e;
|
|
372
372
|
if (!this.isUpdatePending)
|
|
373
373
|
return;
|
|
374
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((
|
|
374
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
|
|
375
375
|
let t = !1;
|
|
376
|
-
const
|
|
376
|
+
const o = this._$AL;
|
|
377
377
|
try {
|
|
378
|
-
t = this.shouldUpdate(
|
|
379
|
-
var
|
|
380
|
-
return (
|
|
381
|
-
}), this.update(
|
|
382
|
-
} catch (
|
|
383
|
-
throw t = !1, this._$Ek(),
|
|
378
|
+
t = this.shouldUpdate(o), t ? (this.willUpdate(o), (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
|
|
379
|
+
var r;
|
|
380
|
+
return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
|
|
381
|
+
}), this.update(o)) : this._$Ek();
|
|
382
|
+
} catch (n) {
|
|
383
|
+
throw t = !1, this._$Ek(), n;
|
|
384
384
|
}
|
|
385
|
-
t && this._$AE(
|
|
385
|
+
t && this._$AE(o);
|
|
386
386
|
}
|
|
387
387
|
willUpdate(e) {
|
|
388
388
|
}
|
|
389
389
|
_$AE(e) {
|
|
390
390
|
var t;
|
|
391
|
-
(t = this._$ES) === null || t === void 0 || t.forEach((
|
|
392
|
-
var
|
|
393
|
-
return (
|
|
391
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((o) => {
|
|
392
|
+
var n;
|
|
393
|
+
return (n = o.hostUpdated) === null || n === void 0 ? void 0 : n.call(o);
|
|
394
394
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
395
395
|
}
|
|
396
396
|
_$Ek() {
|
|
@@ -406,98 +406,98 @@ let z = class extends HTMLElement {
|
|
|
406
406
|
return !0;
|
|
407
407
|
}
|
|
408
408
|
update(e) {
|
|
409
|
-
this._$EC !== void 0 && (this._$EC.forEach((t,
|
|
409
|
+
this._$EC !== void 0 && (this._$EC.forEach((t, o) => this._$EO(o, this[o], t)), this._$EC = void 0), this._$Ek();
|
|
410
410
|
}
|
|
411
411
|
updated(e) {
|
|
412
412
|
}
|
|
413
413
|
firstUpdated(e) {
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
|
-
|
|
416
|
+
O[be] = !0, O.elementProperties = /* @__PURE__ */ new Map(), O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, Oe == null || Oe({ ReactiveElement: O }), ((ae = ie.reactiveElementVersions) !== null && ae !== void 0 ? ae : ie.reactiveElementVersions = []).push("1.6.2");
|
|
417
417
|
/**
|
|
418
418
|
* @license
|
|
419
419
|
* Copyright 2017 Google LLC
|
|
420
420
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
421
421
|
*/
|
|
422
|
-
var
|
|
423
|
-
const
|
|
424
|
-
\f\r]`,
|
|
425
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
426
|
-
const t =
|
|
427
|
-
let
|
|
428
|
-
for (let
|
|
429
|
-
const
|
|
430
|
-
let
|
|
431
|
-
for (; m <
|
|
432
|
-
m =
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
const
|
|
437
|
-
if (!Array.isArray(
|
|
422
|
+
var de;
|
|
423
|
+
const oe = window, D = oe.trustedTypes, Pe = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, Ze = "?" + $, Mt = `<${Ze}>`, M = document, F = () => M.createComment(""), j = (i) => i === null || typeof i != "object" && typeof i != "function", Xe = Array.isArray, zt = (i) => Xe(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ce = `[
|
|
424
|
+
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, De = /-->/g, Le = />/g, E = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
|
|
425
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Te = /'/g, Ie = /"/g, Ge = /^(?:script|style|textarea|title)$/i, Ot = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), Se = Ot(1), L = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Be = /* @__PURE__ */ new WeakMap(), k = M.createTreeWalker(M, 129, null, !1), Pt = (i, e) => {
|
|
426
|
+
const t = i.length - 1, o = [];
|
|
427
|
+
let n, r = e === 2 ? "<svg>" : "", s = N;
|
|
428
|
+
for (let a = 0; a < t; a++) {
|
|
429
|
+
const d = i[a];
|
|
430
|
+
let y, h, u = -1, m = 0;
|
|
431
|
+
for (; m < d.length && (s.lastIndex = m, h = s.exec(d), h !== null); )
|
|
432
|
+
m = s.lastIndex, s === N ? h[1] === "!--" ? s = De : h[1] !== void 0 ? s = Le : h[2] !== void 0 ? (Ge.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = E) : h[3] !== void 0 && (s = E) : s === E ? h[0] === ">" ? (s = n ?? N, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, y = h[1], s = h[3] === void 0 ? E : h[3] === '"' ? Ie : Te) : s === Ie || s === Te ? s = E : s === De || s === Le ? s = N : (s = E, n = void 0);
|
|
433
|
+
const A = s === E && i[a + 1].startsWith("/>") ? " " : "";
|
|
434
|
+
r += s === N ? d + Mt : u >= 0 ? (o.push(y), d.slice(0, u) + ye + d.slice(u) + $ + A) : d + $ + (u === -2 ? (o.push(void 0), a) : A);
|
|
435
|
+
}
|
|
436
|
+
const l = r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
|
437
|
+
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
438
438
|
throw Error("invalid template strings array");
|
|
439
|
-
return [
|
|
439
|
+
return [Pe !== void 0 ? Pe.createHTML(l) : l, o];
|
|
440
440
|
};
|
|
441
|
-
class
|
|
442
|
-
constructor({ strings: e, _$litType$: t },
|
|
443
|
-
let
|
|
441
|
+
class V {
|
|
442
|
+
constructor({ strings: e, _$litType$: t }, o) {
|
|
443
|
+
let n;
|
|
444
444
|
this.parts = [];
|
|
445
|
-
let
|
|
446
|
-
const
|
|
447
|
-
if (this.el =
|
|
448
|
-
const
|
|
449
|
-
|
|
445
|
+
let r = 0, s = 0;
|
|
446
|
+
const l = e.length - 1, a = this.parts, [d, y] = Pt(e, t);
|
|
447
|
+
if (this.el = V.createElement(d, o), k.currentNode = this.el.content, t === 2) {
|
|
448
|
+
const h = this.el.content, u = h.firstChild;
|
|
449
|
+
u.remove(), h.append(...u.childNodes);
|
|
450
450
|
}
|
|
451
|
-
for (; (
|
|
452
|
-
if (
|
|
453
|
-
if (
|
|
454
|
-
const
|
|
455
|
-
for (const
|
|
456
|
-
if (
|
|
457
|
-
const m =
|
|
458
|
-
if (
|
|
459
|
-
const
|
|
460
|
-
|
|
451
|
+
for (; (n = k.nextNode()) !== null && a.length < l; ) {
|
|
452
|
+
if (n.nodeType === 1) {
|
|
453
|
+
if (n.hasAttributes()) {
|
|
454
|
+
const h = [];
|
|
455
|
+
for (const u of n.getAttributeNames())
|
|
456
|
+
if (u.endsWith(ye) || u.startsWith($)) {
|
|
457
|
+
const m = y[s++];
|
|
458
|
+
if (h.push(u), m !== void 0) {
|
|
459
|
+
const A = n.getAttribute(m.toLowerCase() + ye).split($), X = /([.?@])?(.*)/.exec(m);
|
|
460
|
+
a.push({ type: 1, index: r, name: X[2], strings: A, ctor: X[1] === "." ? Lt : X[1] === "?" ? It : X[1] === "@" ? Bt : se });
|
|
461
461
|
} else
|
|
462
|
-
|
|
462
|
+
a.push({ type: 6, index: r });
|
|
463
463
|
}
|
|
464
|
-
for (const
|
|
465
|
-
|
|
464
|
+
for (const u of h)
|
|
465
|
+
n.removeAttribute(u);
|
|
466
466
|
}
|
|
467
|
-
if (
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
470
|
-
|
|
471
|
-
for (let m = 0; m <
|
|
472
|
-
|
|
473
|
-
|
|
467
|
+
if (Ge.test(n.tagName)) {
|
|
468
|
+
const h = n.textContent.split($), u = h.length - 1;
|
|
469
|
+
if (u > 0) {
|
|
470
|
+
n.textContent = D ? D.emptyScript : "";
|
|
471
|
+
for (let m = 0; m < u; m++)
|
|
472
|
+
n.append(h[m], F()), k.nextNode(), a.push({ type: 2, index: ++r });
|
|
473
|
+
n.append(h[u], F());
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
} else if (
|
|
477
|
-
if (
|
|
478
|
-
|
|
476
|
+
} else if (n.nodeType === 8)
|
|
477
|
+
if (n.data === Ze)
|
|
478
|
+
a.push({ type: 2, index: r });
|
|
479
479
|
else {
|
|
480
|
-
let
|
|
481
|
-
for (; (
|
|
482
|
-
|
|
480
|
+
let h = -1;
|
|
481
|
+
for (; (h = n.data.indexOf($, h + 1)) !== -1; )
|
|
482
|
+
a.push({ type: 7, index: r }), h += $.length - 1;
|
|
483
483
|
}
|
|
484
|
-
|
|
484
|
+
r++;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
static createElement(e, t) {
|
|
488
|
-
const
|
|
489
|
-
return
|
|
488
|
+
const o = M.createElement("template");
|
|
489
|
+
return o.innerHTML = e, o;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
var
|
|
494
|
-
if (e ===
|
|
492
|
+
function T(i, e, t = i, o) {
|
|
493
|
+
var n, r, s, l;
|
|
494
|
+
if (e === L)
|
|
495
495
|
return e;
|
|
496
|
-
let
|
|
497
|
-
const
|
|
498
|
-
return (
|
|
496
|
+
let a = o !== void 0 ? (n = t._$Co) === null || n === void 0 ? void 0 : n[o] : t._$Cl;
|
|
497
|
+
const d = j(e) ? void 0 : e._$litDirective$;
|
|
498
|
+
return (a == null ? void 0 : a.constructor) !== d && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), d === void 0 ? a = void 0 : (a = new d(i), a._$AT(i, t, o)), o !== void 0 ? ((s = (l = t)._$Co) !== null && s !== void 0 ? s : l._$Co = [])[o] = a : t._$Cl = a), a !== void 0 && (e = T(i, a._$AS(i, e.values), a, o)), e;
|
|
499
499
|
}
|
|
500
|
-
class
|
|
500
|
+
class Dt {
|
|
501
501
|
constructor(e, t) {
|
|
502
502
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
503
503
|
}
|
|
@@ -509,28 +509,28 @@ class _t {
|
|
|
509
509
|
}
|
|
510
510
|
u(e) {
|
|
511
511
|
var t;
|
|
512
|
-
const { el: { content:
|
|
513
|
-
|
|
514
|
-
let
|
|
515
|
-
for (;
|
|
516
|
-
if (
|
|
517
|
-
let
|
|
518
|
-
|
|
512
|
+
const { el: { content: o }, parts: n } = this._$AD, r = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : M).importNode(o, !0);
|
|
513
|
+
k.currentNode = r;
|
|
514
|
+
let s = k.nextNode(), l = 0, a = 0, d = n[0];
|
|
515
|
+
for (; d !== void 0; ) {
|
|
516
|
+
if (l === d.index) {
|
|
517
|
+
let y;
|
|
518
|
+
d.type === 2 ? y = new q(s, s.nextSibling, this, e) : d.type === 1 ? y = new d.ctor(s, d.name, d.strings, this, e) : d.type === 6 && (y = new Nt(s, this, e)), this._$AV.push(y), d = n[++a];
|
|
519
519
|
}
|
|
520
|
-
|
|
520
|
+
l !== (d == null ? void 0 : d.index) && (s = k.nextNode(), l++);
|
|
521
521
|
}
|
|
522
|
-
return
|
|
522
|
+
return k.currentNode = M, r;
|
|
523
523
|
}
|
|
524
524
|
v(e) {
|
|
525
525
|
let t = 0;
|
|
526
|
-
for (const
|
|
527
|
-
|
|
526
|
+
for (const o of this._$AV)
|
|
527
|
+
o !== void 0 && (o.strings !== void 0 ? (o._$AI(e, o, t), t += o.strings.length - 2) : o._$AI(e[t])), t++;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
class
|
|
531
|
-
constructor(e, t,
|
|
532
|
-
var
|
|
533
|
-
this.type = 2, this._$AH =
|
|
530
|
+
class q {
|
|
531
|
+
constructor(e, t, o, n) {
|
|
532
|
+
var r;
|
|
533
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = o, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
|
|
534
534
|
}
|
|
535
535
|
get _$AU() {
|
|
536
536
|
var e, t;
|
|
@@ -548,7 +548,7 @@ class N {
|
|
|
548
548
|
return this._$AB;
|
|
549
549
|
}
|
|
550
550
|
_$AI(e, t = this) {
|
|
551
|
-
e =
|
|
551
|
+
e = T(this, e, t), j(e) ? e === p || e == null || e === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : e !== this._$AH && e !== L && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : zt(e) ? this.T(e) : this._(e);
|
|
552
552
|
}
|
|
553
553
|
k(e) {
|
|
554
554
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -557,35 +557,35 @@ class N {
|
|
|
557
557
|
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
|
558
558
|
}
|
|
559
559
|
_(e) {
|
|
560
|
-
this._$AH !==
|
|
560
|
+
this._$AH !== p && j(this._$AH) ? this._$AA.nextSibling.data = e : this.$(M.createTextNode(e)), this._$AH = e;
|
|
561
561
|
}
|
|
562
562
|
g(e) {
|
|
563
563
|
var t;
|
|
564
|
-
const { values:
|
|
565
|
-
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) ===
|
|
566
|
-
this._$AH.v(
|
|
564
|
+
const { values: o, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = V.createElement(n.h, this.options)), n);
|
|
565
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r)
|
|
566
|
+
this._$AH.v(o);
|
|
567
567
|
else {
|
|
568
|
-
const
|
|
569
|
-
|
|
568
|
+
const s = new Dt(r, this), l = s.u(this.options);
|
|
569
|
+
s.v(o), this.$(l), this._$AH = s;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
_$AC(e) {
|
|
573
|
-
let t =
|
|
574
|
-
return t === void 0 &&
|
|
573
|
+
let t = Be.get(e.strings);
|
|
574
|
+
return t === void 0 && Be.set(e.strings, t = new V(e)), t;
|
|
575
575
|
}
|
|
576
576
|
T(e) {
|
|
577
|
-
|
|
577
|
+
Xe(this._$AH) || (this._$AH = [], this._$AR());
|
|
578
578
|
const t = this._$AH;
|
|
579
|
-
let
|
|
580
|
-
for (const
|
|
581
|
-
|
|
582
|
-
|
|
579
|
+
let o, n = 0;
|
|
580
|
+
for (const r of e)
|
|
581
|
+
n === t.length ? t.push(o = new q(this.k(F()), this.k(F()), this, this.options)) : o = t[n], o._$AI(r), n++;
|
|
582
|
+
n < t.length && (this._$AR(o && o._$AB.nextSibling, n), t.length = n);
|
|
583
583
|
}
|
|
584
584
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
585
|
-
var
|
|
586
|
-
for ((
|
|
587
|
-
const
|
|
588
|
-
e.remove(), e =
|
|
585
|
+
var o;
|
|
586
|
+
for ((o = this._$AP) === null || o === void 0 || o.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
|
587
|
+
const n = e.nextSibling;
|
|
588
|
+
e.remove(), e = n;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
591
|
setConnected(e) {
|
|
@@ -593,9 +593,9 @@ class N {
|
|
|
593
593
|
this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
class
|
|
597
|
-
constructor(e, t,
|
|
598
|
-
this.type = 1, this._$AH =
|
|
596
|
+
class se {
|
|
597
|
+
constructor(e, t, o, n, r) {
|
|
598
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = r, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = p;
|
|
599
599
|
}
|
|
600
600
|
get tagName() {
|
|
601
601
|
return this.element.tagName;
|
|
@@ -603,97 +603,97 @@ class ie {
|
|
|
603
603
|
get _$AU() {
|
|
604
604
|
return this._$AM._$AU;
|
|
605
605
|
}
|
|
606
|
-
_$AI(e, t = this,
|
|
607
|
-
const
|
|
608
|
-
let
|
|
609
|
-
if (
|
|
610
|
-
e =
|
|
606
|
+
_$AI(e, t = this, o, n) {
|
|
607
|
+
const r = this.strings;
|
|
608
|
+
let s = !1;
|
|
609
|
+
if (r === void 0)
|
|
610
|
+
e = T(this, e, t, 0), s = !j(e) || e !== this._$AH && e !== L, s && (this._$AH = e);
|
|
611
611
|
else {
|
|
612
|
-
const
|
|
613
|
-
let
|
|
614
|
-
for (e =
|
|
615
|
-
|
|
612
|
+
const l = e;
|
|
613
|
+
let a, d;
|
|
614
|
+
for (e = r[0], a = 0; a < r.length - 1; a++)
|
|
615
|
+
d = T(this, l[o + a], t, a), d === L && (d = this._$AH[a]), s || (s = !j(d) || d !== this._$AH[a]), d === p ? e = p : e !== p && (e += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
616
616
|
}
|
|
617
|
-
|
|
617
|
+
s && !n && this.j(e);
|
|
618
618
|
}
|
|
619
619
|
j(e) {
|
|
620
|
-
e ===
|
|
620
|
+
e === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
class
|
|
623
|
+
class Lt extends se {
|
|
624
624
|
constructor() {
|
|
625
625
|
super(...arguments), this.type = 3;
|
|
626
626
|
}
|
|
627
627
|
j(e) {
|
|
628
|
-
this.element[this.name] = e ===
|
|
628
|
+
this.element[this.name] = e === p ? void 0 : e;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
const
|
|
632
|
-
class
|
|
631
|
+
const Tt = D ? D.emptyScript : "";
|
|
632
|
+
class It extends se {
|
|
633
633
|
constructor() {
|
|
634
634
|
super(...arguments), this.type = 4;
|
|
635
635
|
}
|
|
636
636
|
j(e) {
|
|
637
|
-
e && e !==
|
|
637
|
+
e && e !== p ? this.element.setAttribute(this.name, Tt) : this.element.removeAttribute(this.name);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
class
|
|
641
|
-
constructor(e, t,
|
|
642
|
-
super(e, t,
|
|
640
|
+
class Bt extends se {
|
|
641
|
+
constructor(e, t, o, n, r) {
|
|
642
|
+
super(e, t, o, n, r), this.type = 5;
|
|
643
643
|
}
|
|
644
644
|
_$AI(e, t = this) {
|
|
645
|
-
var
|
|
646
|
-
if ((e = (
|
|
645
|
+
var o;
|
|
646
|
+
if ((e = (o = T(this, e, t, 0)) !== null && o !== void 0 ? o : p) === L)
|
|
647
647
|
return;
|
|
648
|
-
const
|
|
649
|
-
|
|
648
|
+
const n = this._$AH, r = e === p && n !== p || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, s = e !== p && (n === p || r);
|
|
649
|
+
r && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
650
650
|
}
|
|
651
651
|
handleEvent(e) {
|
|
652
|
-
var t,
|
|
653
|
-
typeof this._$AH == "function" ? this._$AH.call((
|
|
652
|
+
var t, o;
|
|
653
|
+
typeof this._$AH == "function" ? this._$AH.call((o = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && o !== void 0 ? o : this.element, e) : this._$AH.handleEvent(e);
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
class
|
|
657
|
-
constructor(e, t,
|
|
658
|
-
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options =
|
|
656
|
+
class Nt {
|
|
657
|
+
constructor(e, t, o) {
|
|
658
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = o;
|
|
659
659
|
}
|
|
660
660
|
get _$AU() {
|
|
661
661
|
return this._$AM._$AU;
|
|
662
662
|
}
|
|
663
663
|
_$AI(e) {
|
|
664
|
-
|
|
664
|
+
T(this, e);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
var
|
|
671
|
-
const
|
|
672
|
-
let
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
}
|
|
677
|
-
return
|
|
667
|
+
const Ne = oe.litHtmlPolyfillSupport;
|
|
668
|
+
Ne == null || Ne(V, q), ((de = oe.litHtmlVersions) !== null && de !== void 0 ? de : oe.litHtmlVersions = []).push("2.7.4");
|
|
669
|
+
const Rt = (i, e, t) => {
|
|
670
|
+
var o, n;
|
|
671
|
+
const r = (o = t == null ? void 0 : t.renderBefore) !== null && o !== void 0 ? o : e;
|
|
672
|
+
let s = r._$litPart$;
|
|
673
|
+
if (s === void 0) {
|
|
674
|
+
const l = (n = t == null ? void 0 : t.renderBefore) !== null && n !== void 0 ? n : null;
|
|
675
|
+
r._$litPart$ = s = new q(e.insertBefore(F(), l), l, void 0, t ?? {});
|
|
676
|
+
}
|
|
677
|
+
return s._$AI(i), s;
|
|
678
678
|
};
|
|
679
679
|
/**
|
|
680
680
|
* @license
|
|
681
681
|
* Copyright 2017 Google LLC
|
|
682
682
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
683
683
|
*/
|
|
684
|
-
var
|
|
685
|
-
class C extends
|
|
684
|
+
var he, ue;
|
|
685
|
+
class C extends O {
|
|
686
686
|
constructor() {
|
|
687
687
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
688
688
|
}
|
|
689
689
|
createRenderRoot() {
|
|
690
690
|
var e, t;
|
|
691
|
-
const
|
|
692
|
-
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore =
|
|
691
|
+
const o = super.createRenderRoot();
|
|
692
|
+
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = o.firstChild), o;
|
|
693
693
|
}
|
|
694
694
|
update(e) {
|
|
695
695
|
const t = this.render();
|
|
696
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
696
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Rt(t, this.renderRoot, this.renderOptions);
|
|
697
697
|
}
|
|
698
698
|
connectedCallback() {
|
|
699
699
|
var e;
|
|
@@ -704,46 +704,46 @@ class C extends z {
|
|
|
704
704
|
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
|
705
705
|
}
|
|
706
706
|
render() {
|
|
707
|
-
return
|
|
707
|
+
return L;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
C.finalized = !0, C._$litElement$ = !0, (
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
((
|
|
710
|
+
C.finalized = !0, C._$litElement$ = !0, (he = globalThis.litElementHydrateSupport) === null || he === void 0 || he.call(globalThis, { LitElement: C });
|
|
711
|
+
const Re = globalThis.litElementPolyfillSupport;
|
|
712
|
+
Re == null || Re({ LitElement: C });
|
|
713
|
+
((ue = globalThis.litElementVersions) !== null && ue !== void 0 ? ue : globalThis.litElementVersions = []).push("3.3.2");
|
|
714
714
|
/**
|
|
715
715
|
* @license
|
|
716
716
|
* Copyright 2017 Google LLC
|
|
717
717
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
718
718
|
*/
|
|
719
|
-
const
|
|
720
|
-
t.createProperty(e.key,
|
|
719
|
+
const Ht = (i, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
|
|
720
|
+
t.createProperty(e.key, i);
|
|
721
721
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
|
|
722
722
|
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
|
|
723
723
|
}, finisher(t) {
|
|
724
|
-
t.createProperty(e.key,
|
|
725
|
-
} },
|
|
726
|
-
e.constructor.createProperty(t,
|
|
724
|
+
t.createProperty(e.key, i);
|
|
725
|
+
} }, Ut = (i, e, t) => {
|
|
726
|
+
e.constructor.createProperty(t, i);
|
|
727
727
|
};
|
|
728
|
-
function
|
|
729
|
-
return (e, t) => t !== void 0 ?
|
|
728
|
+
function B(i) {
|
|
729
|
+
return (e, t) => t !== void 0 ? Ut(i, e, t) : Ht(i, e);
|
|
730
730
|
}
|
|
731
731
|
/**
|
|
732
732
|
* @license
|
|
733
733
|
* Copyright 2017 Google LLC
|
|
734
734
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
735
735
|
*/
|
|
736
|
-
const
|
|
737
|
-
var
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
return
|
|
741
|
-
|
|
742
|
-
}),
|
|
736
|
+
const Ft = ({ finisher: i, descriptor: e }) => (t, o) => {
|
|
737
|
+
var n;
|
|
738
|
+
if (o === void 0) {
|
|
739
|
+
const r = (n = t.originalKey) !== null && n !== void 0 ? n : t.key, s = e != null ? { kind: "method", placement: "prototype", key: r, descriptor: e(t.key) } : { ...t, key: r };
|
|
740
|
+
return i != null && (s.finisher = function(l) {
|
|
741
|
+
i(l, r);
|
|
742
|
+
}), s;
|
|
743
743
|
}
|
|
744
744
|
{
|
|
745
|
-
const
|
|
746
|
-
e !== void 0 && Object.defineProperty(t,
|
|
745
|
+
const r = t.constructor;
|
|
746
|
+
e !== void 0 && Object.defineProperty(t, o, e(o)), i == null || i(r, o);
|
|
747
747
|
}
|
|
748
748
|
};
|
|
749
749
|
/**
|
|
@@ -751,20 +751,20 @@ const Ot = ({ finisher: n, descriptor: e }) => (t, i) => {
|
|
|
751
751
|
* Copyright 2017 Google LLC
|
|
752
752
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
753
753
|
*/
|
|
754
|
-
function
|
|
755
|
-
return
|
|
756
|
-
const
|
|
757
|
-
var
|
|
758
|
-
return (
|
|
754
|
+
function ke(i, e) {
|
|
755
|
+
return Ft({ descriptor: (t) => {
|
|
756
|
+
const o = { get() {
|
|
757
|
+
var n, r;
|
|
758
|
+
return (r = (n = this.renderRoot) === null || n === void 0 ? void 0 : n.querySelector(i)) !== null && r !== void 0 ? r : null;
|
|
759
759
|
}, enumerable: !0, configurable: !0 };
|
|
760
760
|
if (e) {
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
var
|
|
764
|
-
return this[
|
|
761
|
+
const n = typeof t == "symbol" ? Symbol() : "__" + t;
|
|
762
|
+
o.get = function() {
|
|
763
|
+
var r, s;
|
|
764
|
+
return this[n] === void 0 && (this[n] = (s = (r = this.renderRoot) === null || r === void 0 ? void 0 : r.querySelector(i)) !== null && s !== void 0 ? s : null), this[n];
|
|
765
765
|
};
|
|
766
766
|
}
|
|
767
|
-
return
|
|
767
|
+
return o;
|
|
768
768
|
} });
|
|
769
769
|
}
|
|
770
770
|
/**
|
|
@@ -772,69 +772,69 @@ function _e(n, e) {
|
|
|
772
772
|
* Copyright 2021 Google LLC
|
|
773
773
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
774
774
|
*/
|
|
775
|
-
var
|
|
776
|
-
((
|
|
777
|
-
const
|
|
775
|
+
var pe;
|
|
776
|
+
((pe = window.HTMLSlotElement) === null || pe === void 0 ? void 0 : pe.prototype.assignedElements) != null;
|
|
777
|
+
const ne = {
|
|
778
778
|
xs: 16,
|
|
779
779
|
s: 20,
|
|
780
780
|
m: 24,
|
|
781
781
|
l: 28,
|
|
782
782
|
xl: 32,
|
|
783
783
|
xxl: 40
|
|
784
|
-
},
|
|
785
|
-
function
|
|
786
|
-
const
|
|
787
|
-
return
|
|
784
|
+
}, Je = Object.keys(ne), Qe = "xs", et = 8, re = 32;
|
|
785
|
+
function jt(i, e, t) {
|
|
786
|
+
const o = parseInt(i, 10), n = o % t === 0;
|
|
787
|
+
return o >= e && n;
|
|
788
788
|
}
|
|
789
|
-
const
|
|
790
|
-
large: (
|
|
791
|
-
regular: (
|
|
789
|
+
const tt = {
|
|
790
|
+
large: (i) => jt(i, re, et),
|
|
791
|
+
regular: (i) => Je.includes(i)
|
|
792
792
|
};
|
|
793
|
-
function
|
|
794
|
-
const e =
|
|
795
|
-
return { isValid: e, size: e ?
|
|
793
|
+
function Vt(i) {
|
|
794
|
+
const e = tt.large(i);
|
|
795
|
+
return { isValid: e, size: e ? i : re };
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
const e =
|
|
797
|
+
function qt(i) {
|
|
798
|
+
const e = tt.regular(i), t = e ? ne[i] : ne[Qe];
|
|
799
799
|
return { isValid: e, size: t };
|
|
800
800
|
}
|
|
801
|
-
const
|
|
802
|
-
const
|
|
803
|
-
let
|
|
801
|
+
const I = (i, e, t, o) => {
|
|
802
|
+
const n = i.endsWith("Large") || i.endsWith("-large");
|
|
803
|
+
let r, s;
|
|
804
804
|
if (t) {
|
|
805
|
-
if ({ isValid:
|
|
806
|
-
const
|
|
807
|
-
console.error(
|
|
805
|
+
if ({ isValid: r, size: s } = n ? Vt(t) : qt(t), !r) {
|
|
806
|
+
const l = n ? `Invalid prop "size" value supplied to "${o}". The prop value should be a number equal or greater than ${re} and multiple of ${et}.` : `Invalid prop "size" value supplied to "${o}". The prop value should be one of the following values: ${Je.join(", ")}.`;
|
|
807
|
+
console.error(l);
|
|
808
808
|
}
|
|
809
809
|
} else
|
|
810
|
-
|
|
810
|
+
s = n ? re : ne[Qe];
|
|
811
811
|
return {
|
|
812
|
-
class: [
|
|
813
|
-
width:
|
|
814
|
-
height:
|
|
812
|
+
class: [i, e].filter(Boolean).join(" "),
|
|
813
|
+
width: s,
|
|
814
|
+
height: s
|
|
815
815
|
};
|
|
816
|
-
},
|
|
817
|
-
class
|
|
816
|
+
}, He = "icon-close";
|
|
817
|
+
class W extends C {
|
|
818
818
|
constructor() {
|
|
819
819
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--close";
|
|
820
820
|
}
|
|
821
821
|
connectedCallback() {
|
|
822
|
-
var e, t,
|
|
822
|
+
var e, t, o;
|
|
823
823
|
if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
|
|
824
|
-
const
|
|
825
|
-
(t = this._svg) === null || t === void 0 || t.setAttribute("width",
|
|
824
|
+
const n = I("c-pieIcon c-pieIcon--close", "", null, "IconClose");
|
|
825
|
+
(t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
updated(e) {
|
|
829
|
-
var t,
|
|
830
|
-
let
|
|
831
|
-
e.has("size") && (
|
|
829
|
+
var t, o;
|
|
830
|
+
let n;
|
|
831
|
+
e.has("size") && (n = I("c-pieIcon c-pieIcon--close", "", this.size, "IconClose"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
832
832
|
}
|
|
833
833
|
render() {
|
|
834
|
-
return
|
|
834
|
+
return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--close"><path d="M11.868 3.205 8 7.072 4.133 3.205l-.928.927L7.073 8l-3.868 3.867.928.928L8 8.927l3.868 3.868.927-.928L8.928 8l3.867-3.868-.927-.927Z"></path></svg>`;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
|
|
837
|
+
W.styles = Ee`
|
|
838
838
|
:host-context(pie-icon-button) svg,
|
|
839
839
|
:host-context(pie-button) svg {
|
|
840
840
|
display: block;
|
|
@@ -842,38 +842,38 @@ j.styles = ye`
|
|
|
842
842
|
height: var(--btn-icon-size);
|
|
843
843
|
}
|
|
844
844
|
`;
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
],
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
],
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
],
|
|
854
|
-
customElements.get(
|
|
855
|
-
const
|
|
856
|
-
class
|
|
845
|
+
w([
|
|
846
|
+
B({ type: String, reflect: !0 })
|
|
847
|
+
], W.prototype, "size", void 0);
|
|
848
|
+
w([
|
|
849
|
+
B({ type: String, reflect: !0 })
|
|
850
|
+
], W.prototype, "class", void 0);
|
|
851
|
+
w([
|
|
852
|
+
ke("svg")
|
|
853
|
+
], W.prototype, "_svg", void 0);
|
|
854
|
+
customElements.get(He) === void 0 && customElements.define(He, W);
|
|
855
|
+
const Ue = "icon-chevron-left";
|
|
856
|
+
class K extends C {
|
|
857
857
|
constructor() {
|
|
858
858
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronLeft";
|
|
859
859
|
}
|
|
860
860
|
connectedCallback() {
|
|
861
|
-
var e, t,
|
|
861
|
+
var e, t, o;
|
|
862
862
|
if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
|
|
863
|
-
const
|
|
864
|
-
(t = this._svg) === null || t === void 0 || t.setAttribute("width",
|
|
863
|
+
const n = I("c-pieIcon c-pieIcon--chevronLeft", "", null, "IconChevronLeft");
|
|
864
|
+
(t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
updated(e) {
|
|
868
|
-
var t,
|
|
869
|
-
let
|
|
870
|
-
e.has("size") && (
|
|
868
|
+
var t, o;
|
|
869
|
+
let n;
|
|
870
|
+
e.has("size") && (n = I("c-pieIcon c-pieIcon--chevronLeft", "", this.size, "IconChevronLeft"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
871
871
|
}
|
|
872
872
|
render() {
|
|
873
|
-
return
|
|
873
|
+
return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronLeft"><path d="M10.96 2.82 5.605 8l5.399 5.197-.875.963-5.565-5.364a1.164 1.164 0 0 1 0-1.671l5.495-5.25.901.945Z"></path></svg>`;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
|
|
876
|
+
K.styles = Ee`
|
|
877
877
|
:host-context(pie-icon-button) svg,
|
|
878
878
|
:host-context(pie-button) svg {
|
|
879
879
|
display: block;
|
|
@@ -881,38 +881,38 @@ F.styles = ye`
|
|
|
881
881
|
height: var(--btn-icon-size);
|
|
882
882
|
}
|
|
883
883
|
`;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
],
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
],
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
],
|
|
893
|
-
customElements.get(
|
|
894
|
-
const
|
|
895
|
-
class
|
|
884
|
+
w([
|
|
885
|
+
B({ type: String, reflect: !0 })
|
|
886
|
+
], K.prototype, "size", void 0);
|
|
887
|
+
w([
|
|
888
|
+
B({ type: String, reflect: !0 })
|
|
889
|
+
], K.prototype, "class", void 0);
|
|
890
|
+
w([
|
|
891
|
+
ke("svg")
|
|
892
|
+
], K.prototype, "_svg", void 0);
|
|
893
|
+
customElements.get(Ue) === void 0 && customElements.define(Ue, K);
|
|
894
|
+
const Fe = "icon-chevron-right";
|
|
895
|
+
class Y extends C {
|
|
896
896
|
constructor() {
|
|
897
897
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronRight";
|
|
898
898
|
}
|
|
899
899
|
connectedCallback() {
|
|
900
|
-
var e, t,
|
|
900
|
+
var e, t, o;
|
|
901
901
|
if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
|
|
902
|
-
const
|
|
903
|
-
(t = this._svg) === null || t === void 0 || t.setAttribute("width",
|
|
902
|
+
const n = I("c-pieIcon c-pieIcon--chevronRight", "", null, "IconChevronRight");
|
|
903
|
+
(t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
updated(e) {
|
|
907
|
-
var t,
|
|
908
|
-
let
|
|
909
|
-
e.has("size") && (
|
|
907
|
+
var t, o;
|
|
908
|
+
let n;
|
|
909
|
+
e.has("size") && (n = I("c-pieIcon c-pieIcon--chevronRight", "", this.size, "IconChevronRight"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
910
910
|
}
|
|
911
911
|
render() {
|
|
912
|
-
return
|
|
912
|
+
return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronRight"><path d="M5.044 13.18 10.399 8 5 2.82l.875-.962 5.539 5.346a1.164 1.164 0 0 1 0 1.636l-5.469 5.285-.901-.945Z"></path></svg>`;
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
|
|
915
|
+
Y.styles = Ee`
|
|
916
916
|
:host-context(pie-icon-button) svg,
|
|
917
917
|
:host-context(pie-button) svg {
|
|
918
918
|
display: block;
|
|
@@ -920,41 +920,436 @@ V.styles = ye`
|
|
|
920
920
|
height: var(--btn-icon-size);
|
|
921
921
|
}
|
|
922
922
|
`;
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
],
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
],
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
],
|
|
932
|
-
customElements.get(
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
923
|
+
w([
|
|
924
|
+
B({ type: String, reflect: !0 })
|
|
925
|
+
], Y.prototype, "size", void 0);
|
|
926
|
+
w([
|
|
927
|
+
B({ type: String, reflect: !0 })
|
|
928
|
+
], Y.prototype, "class", void 0);
|
|
929
|
+
w([
|
|
930
|
+
ke("svg")
|
|
931
|
+
], Y.prototype, "_svg", void 0);
|
|
932
|
+
customElements.get(Fe) === void 0 && customElements.define(Fe, Y);
|
|
933
|
+
var P = window.CustomEvent;
|
|
934
|
+
(!P || typeof P == "object") && (P = function(e, t) {
|
|
935
|
+
t = t || {};
|
|
936
|
+
var o = document.createEvent("CustomEvent");
|
|
937
|
+
return o.initCustomEvent(e, !!t.bubbles, !!t.cancelable, t.detail || null), o;
|
|
938
|
+
}, P.prototype = window.Event.prototype);
|
|
939
|
+
function it(i, e) {
|
|
940
|
+
var t = "on" + e.type.toLowerCase();
|
|
941
|
+
return typeof i[t] == "function" && i[t](e), i.dispatchEvent(e);
|
|
942
|
+
}
|
|
943
|
+
function Wt(i) {
|
|
944
|
+
for (; i && i !== document.body; ) {
|
|
945
|
+
var e = window.getComputedStyle(i), t = function(o, n) {
|
|
946
|
+
return !(e[o] === void 0 || e[o] === n);
|
|
947
|
+
};
|
|
948
|
+
if (e.opacity < 1 || t("zIndex", "auto") || t("transform", "none") || t("mixBlendMode", "normal") || t("filter", "none") || t("perspective", "none") || e.isolation === "isolate" || e.position === "fixed" || e.webkitOverflowScrolling === "touch")
|
|
949
|
+
return !0;
|
|
950
|
+
i = i.parentElement;
|
|
951
|
+
}
|
|
952
|
+
return !1;
|
|
953
|
+
}
|
|
954
|
+
function U(i) {
|
|
955
|
+
for (; i; ) {
|
|
956
|
+
if (i.localName === "dialog")
|
|
957
|
+
return (
|
|
958
|
+
/** @type {HTMLDialogElement} */
|
|
959
|
+
i
|
|
960
|
+
);
|
|
961
|
+
i.parentElement ? i = i.parentElement : i.parentNode ? i = i.parentNode.host : i = null;
|
|
962
|
+
}
|
|
963
|
+
return null;
|
|
964
|
+
}
|
|
965
|
+
function ot(i) {
|
|
966
|
+
for (; i && i.shadowRoot && i.shadowRoot.activeElement; )
|
|
967
|
+
i = i.shadowRoot.activeElement;
|
|
968
|
+
i && i.blur && i !== document.body && i.blur();
|
|
969
|
+
}
|
|
970
|
+
function Kt(i, e) {
|
|
971
|
+
for (var t = 0; t < i.length; ++t)
|
|
972
|
+
if (i[t] === e)
|
|
973
|
+
return !0;
|
|
974
|
+
return !1;
|
|
975
|
+
}
|
|
976
|
+
function fe(i) {
|
|
977
|
+
return !i || !i.hasAttribute("method") ? !1 : i.getAttribute("method").toLowerCase() === "dialog";
|
|
978
|
+
}
|
|
979
|
+
function nt(i) {
|
|
980
|
+
var e = ["button", "input", "keygen", "select", "textarea"], t = e.map(function(s) {
|
|
981
|
+
return s + ":not([disabled])";
|
|
982
|
+
});
|
|
983
|
+
t.push('[tabindex]:not([disabled]):not([tabindex=""])');
|
|
984
|
+
var o = i.querySelector(t.join(", "));
|
|
985
|
+
if (!o && "attachShadow" in Element.prototype)
|
|
986
|
+
for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o = nt(n[r].shadowRoot), o)); r++)
|
|
987
|
+
;
|
|
988
|
+
return o;
|
|
989
|
+
}
|
|
990
|
+
function je(i) {
|
|
991
|
+
return i.isConnected || document.body.contains(i);
|
|
992
|
+
}
|
|
993
|
+
function rt(i) {
|
|
994
|
+
if (i.submitter)
|
|
995
|
+
return i.submitter;
|
|
996
|
+
var e = i.target;
|
|
997
|
+
if (!(e instanceof HTMLFormElement))
|
|
998
|
+
return null;
|
|
999
|
+
var t = c.formSubmitter;
|
|
1000
|
+
if (!t) {
|
|
1001
|
+
var o = i.target, n = "getRootNode" in o && o.getRootNode() || document;
|
|
1002
|
+
t = n.activeElement;
|
|
1003
|
+
}
|
|
1004
|
+
return !t || t.form !== e ? null : t;
|
|
1005
|
+
}
|
|
1006
|
+
function Yt(i) {
|
|
1007
|
+
if (!i.defaultPrevented) {
|
|
1008
|
+
var e = (
|
|
1009
|
+
/** @type {!HTMLFormElement} */
|
|
1010
|
+
i.target
|
|
1011
|
+
), t = c.imagemapUseValue, o = rt(i);
|
|
1012
|
+
t === null && o && (t = o.value);
|
|
1013
|
+
var n = U(e);
|
|
1014
|
+
if (n) {
|
|
1015
|
+
var r = o && o.getAttribute("formmethod") || e.getAttribute("method");
|
|
1016
|
+
r === "dialog" && (i.preventDefault(), t != null ? n.close(t) : n.close());
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
function st(i) {
|
|
1021
|
+
if (this.dialog_ = i, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, i.hasAttribute("role") || i.setAttribute("role", "dialog"), i.show = this.show.bind(this), i.showModal = this.showModal.bind(this), i.close = this.close.bind(this), i.addEventListener("submit", Yt, !1), "returnValue" in i || (i.returnValue = ""), "MutationObserver" in window) {
|
|
1022
|
+
var e = new MutationObserver(this.maybeHideModal.bind(this));
|
|
1023
|
+
e.observe(i, { attributes: !0, attributeFilter: ["open"] });
|
|
1024
|
+
} else {
|
|
1025
|
+
var t = !1, o = function() {
|
|
1026
|
+
t ? this.downgradeModal() : this.maybeHideModal(), t = !1;
|
|
1027
|
+
}.bind(this), n, r = function(s) {
|
|
1028
|
+
if (s.target === i) {
|
|
1029
|
+
var l = "DOMNodeRemoved";
|
|
1030
|
+
t |= s.type.substr(0, l.length) === l, window.clearTimeout(n), n = window.setTimeout(o, 0);
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
["DOMAttrModified", "DOMNodeRemoved", "DOMNodeRemovedFromDocument"].forEach(function(s) {
|
|
1034
|
+
i.addEventListener(s, r);
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
Object.defineProperty(i, "open", {
|
|
1038
|
+
set: this.setOpen.bind(this),
|
|
1039
|
+
get: i.hasAttribute.bind(i, "open")
|
|
1040
|
+
}), this.backdrop_ = document.createElement("div"), this.backdrop_.className = "backdrop", this.backdrop_.addEventListener("mouseup", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("mousedown", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("click", this.backdropMouseEvent_.bind(this));
|
|
1041
|
+
}
|
|
1042
|
+
st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
1043
|
+
{
|
|
1044
|
+
get dialog() {
|
|
1045
|
+
return this.dialog_;
|
|
1046
|
+
},
|
|
1047
|
+
/**
|
|
1048
|
+
* Maybe remove this dialog from the modal top layer. This is called when
|
|
1049
|
+
* a modal dialog may no longer be tenable, e.g., when the dialog is no
|
|
1050
|
+
* longer open or is no longer part of the DOM.
|
|
1051
|
+
*/
|
|
1052
|
+
maybeHideModal: function() {
|
|
1053
|
+
this.dialog_.hasAttribute("open") && je(this.dialog_) || this.downgradeModal();
|
|
1054
|
+
},
|
|
1055
|
+
/**
|
|
1056
|
+
* Remove this dialog from the modal top layer, leaving it as a non-modal.
|
|
1057
|
+
*/
|
|
1058
|
+
downgradeModal: function() {
|
|
1059
|
+
this.openAsModal_ && (this.openAsModal_ = !1, this.dialog_.style.zIndex = "", this.replacedStyleTop_ && (this.dialog_.style.top = "", this.replacedStyleTop_ = !1), this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_), c.dm.removeDialog(this));
|
|
1060
|
+
},
|
|
1061
|
+
/**
|
|
1062
|
+
* @param {boolean} value whether to open or close this dialog
|
|
1063
|
+
*/
|
|
1064
|
+
setOpen: function(i) {
|
|
1065
|
+
i ? this.dialog_.hasAttribute("open") || this.dialog_.setAttribute("open", "") : (this.dialog_.removeAttribute("open"), this.maybeHideModal());
|
|
1066
|
+
},
|
|
1067
|
+
/**
|
|
1068
|
+
* Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
|
|
1069
|
+
* they were on the dialog itself.
|
|
1070
|
+
*
|
|
1071
|
+
* @param {!Event} e to redirect
|
|
1072
|
+
*/
|
|
1073
|
+
backdropMouseEvent_: function(i) {
|
|
1074
|
+
if (this.dialog_.hasAttribute("tabindex"))
|
|
1075
|
+
this.dialog_.focus();
|
|
1076
|
+
else {
|
|
1077
|
+
var e = document.createElement("div");
|
|
1078
|
+
this.dialog_.insertBefore(e, this.dialog_.firstChild), e.tabIndex = -1, e.focus(), this.dialog_.removeChild(e);
|
|
1079
|
+
}
|
|
1080
|
+
var t = document.createEvent("MouseEvents");
|
|
1081
|
+
t.initMouseEvent(
|
|
1082
|
+
i.type,
|
|
1083
|
+
i.bubbles,
|
|
1084
|
+
i.cancelable,
|
|
1085
|
+
window,
|
|
1086
|
+
i.detail,
|
|
1087
|
+
i.screenX,
|
|
1088
|
+
i.screenY,
|
|
1089
|
+
i.clientX,
|
|
1090
|
+
i.clientY,
|
|
1091
|
+
i.ctrlKey,
|
|
1092
|
+
i.altKey,
|
|
1093
|
+
i.shiftKey,
|
|
1094
|
+
i.metaKey,
|
|
1095
|
+
i.button,
|
|
1096
|
+
i.relatedTarget
|
|
1097
|
+
), this.dialog_.dispatchEvent(t), i.stopPropagation();
|
|
1098
|
+
},
|
|
1099
|
+
/**
|
|
1100
|
+
* Focuses on the first focusable element within the dialog. This will always blur the current
|
|
1101
|
+
* focus, even if nothing within the dialog is found.
|
|
1102
|
+
*/
|
|
1103
|
+
focus_: function() {
|
|
1104
|
+
var i = this.dialog_.querySelector("[autofocus]:not([disabled])");
|
|
1105
|
+
!i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i = nt(this.dialog_)), ot(document.activeElement), i && i.focus();
|
|
1106
|
+
},
|
|
1107
|
+
/**
|
|
1108
|
+
* Sets the zIndex for the backdrop and dialog.
|
|
1109
|
+
*
|
|
1110
|
+
* @param {number} dialogZ
|
|
1111
|
+
* @param {number} backdropZ
|
|
1112
|
+
*/
|
|
1113
|
+
updateZIndex: function(i, e) {
|
|
1114
|
+
if (i < e)
|
|
1115
|
+
throw new Error("dialogZ should never be < backdropZ");
|
|
1116
|
+
this.dialog_.style.zIndex = i, this.backdrop_.style.zIndex = e;
|
|
1117
|
+
},
|
|
1118
|
+
/**
|
|
1119
|
+
* Shows the dialog. If the dialog is already open, this does nothing.
|
|
1120
|
+
*/
|
|
1121
|
+
show: function() {
|
|
1122
|
+
this.dialog_.open || (this.setOpen(!0), this.focus_());
|
|
1123
|
+
},
|
|
1124
|
+
/**
|
|
1125
|
+
* Show this dialog modally.
|
|
1126
|
+
*/
|
|
1127
|
+
showModal: function() {
|
|
1128
|
+
if (this.dialog_.hasAttribute("open"))
|
|
1129
|
+
throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");
|
|
1130
|
+
if (!je(this.dialog_))
|
|
1131
|
+
throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
|
|
1132
|
+
if (!c.dm.pushDialog(this))
|
|
1133
|
+
throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
|
|
1134
|
+
Wt(this.dialog_.parentElement) && console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"), this.setOpen(!0), this.openAsModal_ = !0, c.needsCentering(this.dialog_) ? (c.reposition(this.dialog_), this.replacedStyleTop_ = !0) : this.replacedStyleTop_ = !1, this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling), this.focus_();
|
|
1135
|
+
},
|
|
1136
|
+
/**
|
|
1137
|
+
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
|
1138
|
+
* attribute, however this fires a 'close' event.
|
|
1139
|
+
*
|
|
1140
|
+
* @param {string=} opt_returnValue to use as the returnValue
|
|
1141
|
+
*/
|
|
1142
|
+
close: function(i) {
|
|
1143
|
+
if (!this.dialog_.hasAttribute("open"))
|
|
1144
|
+
throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
|
|
1145
|
+
this.setOpen(!1), i !== void 0 && (this.dialog_.returnValue = i);
|
|
1146
|
+
var e = new P("close", {
|
|
1147
|
+
bubbles: !1,
|
|
1148
|
+
cancelable: !1
|
|
1149
|
+
});
|
|
1150
|
+
it(this.dialog_, e);
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
var c = {};
|
|
1154
|
+
c.reposition = function(i) {
|
|
1155
|
+
var e = document.body.scrollTop || document.documentElement.scrollTop, t = e + (window.innerHeight - i.offsetHeight) / 2;
|
|
1156
|
+
i.style.top = Math.max(e, t) + "px";
|
|
1157
|
+
};
|
|
1158
|
+
c.isInlinePositionSetByStylesheet = function(i) {
|
|
1159
|
+
for (var e = 0; e < document.styleSheets.length; ++e) {
|
|
1160
|
+
var t = document.styleSheets[e], o = null;
|
|
1161
|
+
try {
|
|
1162
|
+
o = t.cssRules;
|
|
1163
|
+
} catch {
|
|
1164
|
+
}
|
|
1165
|
+
if (o)
|
|
1166
|
+
for (var n = 0; n < o.length; ++n) {
|
|
1167
|
+
var r = o[n], s = null;
|
|
1168
|
+
try {
|
|
1169
|
+
s = document.querySelectorAll(r.selectorText);
|
|
1170
|
+
} catch {
|
|
1171
|
+
}
|
|
1172
|
+
if (!(!s || !Kt(s, i))) {
|
|
1173
|
+
var l = r.style.getPropertyValue("top"), a = r.style.getPropertyValue("bottom");
|
|
1174
|
+
if (l && l !== "auto" || a && a !== "auto")
|
|
1175
|
+
return !0;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
return !1;
|
|
1180
|
+
};
|
|
1181
|
+
c.needsCentering = function(i) {
|
|
1182
|
+
var e = window.getComputedStyle(i);
|
|
1183
|
+
return e.position !== "absolute" || i.style.top !== "auto" && i.style.top !== "" || i.style.bottom !== "auto" && i.style.bottom !== "" ? !1 : !c.isInlinePositionSetByStylesheet(i);
|
|
1184
|
+
};
|
|
1185
|
+
c.forceRegisterDialog = function(i) {
|
|
1186
|
+
if ((window.HTMLDialogElement || i.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", i), i.localName !== "dialog")
|
|
1187
|
+
throw new Error("Failed to register dialog: The element is not a dialog.");
|
|
1188
|
+
new st(
|
|
1189
|
+
/** @type {!HTMLDialogElement} */
|
|
1190
|
+
i
|
|
1191
|
+
);
|
|
1192
|
+
};
|
|
1193
|
+
c.registerDialog = function(i) {
|
|
1194
|
+
i.showModal || c.forceRegisterDialog(i);
|
|
1195
|
+
};
|
|
1196
|
+
c.DialogManager = function() {
|
|
1197
|
+
this.pendingDialogStack = [];
|
|
1198
|
+
var i = this.checkDOM_.bind(this);
|
|
1199
|
+
this.overlay = document.createElement("div"), this.overlay.className = "_dialog_overlay", this.overlay.addEventListener("click", function(e) {
|
|
1200
|
+
this.forwardTab_ = void 0, e.stopPropagation(), i([]);
|
|
1201
|
+
}.bind(this)), this.handleKey_ = this.handleKey_.bind(this), this.handleFocus_ = this.handleFocus_.bind(this), this.zIndexLow_ = 1e5, this.zIndexHigh_ = 1e5 + 150, this.forwardTab_ = void 0, "MutationObserver" in window && (this.mo_ = new MutationObserver(function(e) {
|
|
1202
|
+
var t = [];
|
|
1203
|
+
e.forEach(function(o) {
|
|
1204
|
+
for (var n = 0, r; r = o.removedNodes[n]; ++n) {
|
|
1205
|
+
if (r instanceof Element)
|
|
1206
|
+
r.localName === "dialog" && t.push(r);
|
|
1207
|
+
else
|
|
1208
|
+
continue;
|
|
1209
|
+
t = t.concat(r.querySelectorAll("dialog"));
|
|
1210
|
+
}
|
|
1211
|
+
}), t.length && i(t);
|
|
1212
|
+
}));
|
|
1213
|
+
};
|
|
1214
|
+
c.DialogManager.prototype.blockDocument = function() {
|
|
1215
|
+
document.documentElement.addEventListener("focus", this.handleFocus_, !0), document.addEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.observe(document, { childList: !0, subtree: !0 });
|
|
1216
|
+
};
|
|
1217
|
+
c.DialogManager.prototype.unblockDocument = function() {
|
|
1218
|
+
document.documentElement.removeEventListener("focus", this.handleFocus_, !0), document.removeEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.disconnect();
|
|
1219
|
+
};
|
|
1220
|
+
c.DialogManager.prototype.updateStacking = function() {
|
|
1221
|
+
for (var i = this.zIndexHigh_, e = 0, t; t = this.pendingDialogStack[e]; ++e)
|
|
1222
|
+
t.updateZIndex(--i, --i), e === 0 && (this.overlay.style.zIndex = --i);
|
|
1223
|
+
var o = this.pendingDialogStack[0];
|
|
1224
|
+
if (o) {
|
|
1225
|
+
var n = o.dialog.parentNode || document.body;
|
|
1226
|
+
n.appendChild(this.overlay);
|
|
1227
|
+
} else
|
|
1228
|
+
this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
|
|
939
1229
|
};
|
|
940
|
-
|
|
941
|
-
|
|
1230
|
+
c.DialogManager.prototype.containedByTopDialog_ = function(i) {
|
|
1231
|
+
for (; i = U(i); ) {
|
|
1232
|
+
for (var e = 0, t; t = this.pendingDialogStack[e]; ++e)
|
|
1233
|
+
if (t.dialog === i)
|
|
1234
|
+
return e === 0;
|
|
1235
|
+
i = i.parentElement;
|
|
1236
|
+
}
|
|
1237
|
+
return !1;
|
|
1238
|
+
};
|
|
1239
|
+
c.DialogManager.prototype.handleFocus_ = function(i) {
|
|
1240
|
+
var e = i.composedPath ? i.composedPath()[0] : i.target;
|
|
1241
|
+
if (!this.containedByTopDialog_(e) && document.activeElement !== document.documentElement && (i.preventDefault(), i.stopPropagation(), ot(
|
|
1242
|
+
/** @type {Element} */
|
|
1243
|
+
e
|
|
1244
|
+
), this.forwardTab_ !== void 0)) {
|
|
1245
|
+
var t = this.pendingDialogStack[0], o = t.dialog, n = o.compareDocumentPosition(e);
|
|
1246
|
+
return n & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ? t.focus_() : e !== document.documentElement && document.documentElement.focus()), !1;
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
c.DialogManager.prototype.handleKey_ = function(i) {
|
|
1250
|
+
if (this.forwardTab_ = void 0, i.keyCode === 27) {
|
|
1251
|
+
i.preventDefault(), i.stopPropagation();
|
|
1252
|
+
var e = new P("cancel", {
|
|
1253
|
+
bubbles: !1,
|
|
1254
|
+
cancelable: !0
|
|
1255
|
+
}), t = this.pendingDialogStack[0];
|
|
1256
|
+
t && it(t.dialog, e) && t.dialog.close();
|
|
1257
|
+
} else
|
|
1258
|
+
i.keyCode === 9 && (this.forwardTab_ = !i.shiftKey);
|
|
1259
|
+
};
|
|
1260
|
+
c.DialogManager.prototype.checkDOM_ = function(i) {
|
|
1261
|
+
var e = this.pendingDialogStack.slice();
|
|
1262
|
+
e.forEach(function(t) {
|
|
1263
|
+
i.indexOf(t.dialog) !== -1 ? t.downgradeModal() : t.maybeHideModal();
|
|
1264
|
+
});
|
|
1265
|
+
};
|
|
1266
|
+
c.DialogManager.prototype.pushDialog = function(i) {
|
|
1267
|
+
var e = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
|
|
1268
|
+
return this.pendingDialogStack.length >= e ? !1 : (this.pendingDialogStack.unshift(i) === 1 && this.blockDocument(), this.updateStacking(), !0);
|
|
1269
|
+
};
|
|
1270
|
+
c.DialogManager.prototype.removeDialog = function(i) {
|
|
1271
|
+
var e = this.pendingDialogStack.indexOf(i);
|
|
1272
|
+
e !== -1 && (this.pendingDialogStack.splice(e, 1), this.pendingDialogStack.length === 0 && this.unblockDocument(), this.updateStacking());
|
|
1273
|
+
};
|
|
1274
|
+
c.dm = new c.DialogManager();
|
|
1275
|
+
c.formSubmitter = null;
|
|
1276
|
+
c.imagemapUseValue = null;
|
|
1277
|
+
if (window.HTMLDialogElement === void 0) {
|
|
1278
|
+
var Ve = document.createElement("form");
|
|
1279
|
+
if (Ve.setAttribute("method", "dialog"), Ve.method !== "dialog") {
|
|
1280
|
+
var z = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
|
|
1281
|
+
if (z) {
|
|
1282
|
+
var Zt = z.get;
|
|
1283
|
+
z.get = function() {
|
|
1284
|
+
return fe(this) ? "dialog" : Zt.call(this);
|
|
1285
|
+
};
|
|
1286
|
+
var Xt = z.set;
|
|
1287
|
+
z.set = function(i) {
|
|
1288
|
+
return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) : Xt.call(this, i);
|
|
1289
|
+
}, Object.defineProperty(HTMLFormElement.prototype, "method", z);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
document.addEventListener("click", function(i) {
|
|
1293
|
+
if (c.formSubmitter = null, c.imagemapUseValue = null, !i.defaultPrevented) {
|
|
1294
|
+
var e = (
|
|
1295
|
+
/** @type {Element} */
|
|
1296
|
+
i.target
|
|
1297
|
+
);
|
|
1298
|
+
if ("composedPath" in i) {
|
|
1299
|
+
var t = i.composedPath();
|
|
1300
|
+
e = t.shift() || e;
|
|
1301
|
+
}
|
|
1302
|
+
if (!(!e || !fe(e.form))) {
|
|
1303
|
+
var o = e.type === "submit" && ["button", "input"].indexOf(e.localName) > -1;
|
|
1304
|
+
if (!o) {
|
|
1305
|
+
if (!(e.localName === "input" && e.type === "image"))
|
|
1306
|
+
return;
|
|
1307
|
+
c.imagemapUseValue = i.offsetX + "," + i.offsetY;
|
|
1308
|
+
}
|
|
1309
|
+
var n = U(e);
|
|
1310
|
+
n && (c.formSubmitter = e);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}, !1), document.addEventListener("submit", function(i) {
|
|
1314
|
+
var e = i.target, t = U(e);
|
|
1315
|
+
if (!t) {
|
|
1316
|
+
var o = rt(i), n = o && o.getAttribute("formmethod") || e.getAttribute("method");
|
|
1317
|
+
n === "dialog" && i.preventDefault();
|
|
1318
|
+
}
|
|
1319
|
+
});
|
|
1320
|
+
var Gt = HTMLFormElement.prototype.submit, Jt = function() {
|
|
1321
|
+
if (!fe(this))
|
|
1322
|
+
return Gt.call(this);
|
|
1323
|
+
var i = U(this);
|
|
1324
|
+
i && i.close();
|
|
1325
|
+
};
|
|
1326
|
+
HTMLFormElement.prototype.submit = Jt;
|
|
1327
|
+
}
|
|
1328
|
+
const Qt = `dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:white;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}*,*:before,*:after{box-sizing:border-box}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-modal{--modal-size-s: 450px;--modal-size-m: 600px;--modal-size-l: 1080px;--modal-border-radius: var(--dt-radius-rounded-d);--modal-font: var(--dt-font-interactive-m-family);--modal-bg-color: var(--dt-color-container-default);--modal-elevation: var(--dt-elevation-04);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;border-radius:var(--modal-border-radius);border:none;box-shadow:var(--modal-elevation);font-family:var(--modal-font);background-color:var(--modal-bg-color);padding:0;--modal-margin-none: var(--dt-spacing-none);--modal-margin-small: var(--dt-spacing-g);--modal-margin-large: var(--dt-spacing-j);--modal-margin-block: var(--modal-margin-small);--modal-block-size: fit-content;--modal-inline-size: 75%;--modal-max-block-size: calc(100vh - calc(var(--modal-margin-block) * 2));--modal-max-inline-size: var(--modal-size-m);block-size:var(--modal-block-size);inline-size:var(--modal-inline-size);max-block-size:var(--modal-max-block-size);max-inline-size:var(--modal-max-inline-size)}.c-modal:focus-visible{outline:none}@media (max-width: 768px){.c-modal pie-icon-button{--btn-dimension: 40px}}.c-modal[open]{display:flex;flex-direction:column}@media (min-width: 768px){.c-modal{--modal-margin-block: var(--modal-margin-large)}}.c-modal[size=small]{--modal-max-inline-size: var(--modal-size-s)}@media (min-width: 768px){.c-modal[size=small]{--modal-margin-block: var(--modal-margin-large)}}@media (max-width: 767px){.c-modal[size=medium][isfullwidthbelowmid]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%;--modal-max-inline-size: 100%}}.c-modal[size=large]{--modal-inline-size: 75%;--modal-max-inline-size: var(--modal-size-l);--modal-margin-block: var(--modal-margin-large)}@media (max-width: 767px){.c-modal[size=large]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%}}.c-modal[position=top]{margin-block-start:var(--dt-spacing-j)}@media (max-width: 767px){.c-modal[position=top][isfullwidthbelowmid]{margin-block-start:var(--dt-spacing-none)}}.c-modal::backdrop{background:rgba(0,0,0,.5)}.c-modal .c-modal-footer{--modal-button-spacing: var(--dt-spacing-d);--modal-footer-padding: var(--dt-spacing-d);display:flex;flex-flow:row-reverse;flex-wrap:wrap;gap:var(--modal-button-spacing);padding:var(--modal-footer-padding)}@media (min-width: 768px){.c-modal .c-modal-footer{--modal-footer-padding: var(--dt-spacing-e)}}@media (max-width: 767px){.c-modal[hasstackedactions] .c-modal-footer{flex-direction:column}}.c-modal .c-modal-header{padding-inline:var(--dt-spacing-d);padding-block:14px;display:grid;grid-template-areas:"back heading close" ". heading .";grid-template-columns:minmax(0,max-content) minmax(0,1fr) minmax(0,max-content);align-items:center}@media (min-width: 768px){.c-modal .c-modal-header{padding-inline:var(--dt-spacing-e);padding-block:20px}}.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-end:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-end:var(--dt-spacing-c)}}.c-modal .c-modal-heading{--modal-header-font-size: calc(var(--dt-font-heading-m-size--wide) * 1px);--modal-header-font-line-height: calc(var(--dt-font-heading-m-line-height--wide) * 1px);--modal-header-font-weight: var(--dt-font-heading-m-weight);font-size:var(--modal-header-font-size);line-height:var(--modal-header-font-line-height);font-weight:var(--modal-header-font-weight);margin:0;grid-area:heading}.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-d)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-e)}}.c-modal .c-modal-backBtn{grid-area:back}.c-modal .c-modal-closeBtn{grid-area:close}.c-modal[isfooterpinned] .c-modal-content,.c-modal .c-modal-scrollContainer{overflow-y:auto}.c-modal .c-modal-scrollContainer{--bg-scroll-start: linear-gradient(var(--dt-color-container-default) 30%, rgba(255, 255, 255, 0));--bg-scroll-end: linear-gradient(rgba(255, 255, 255, 0), var(--dt-color-container-default) 70%) 0 100%;--bg-scroll-top: radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0));--bg-scroll-bottom: radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)) 0 100%;--bg-size-scroll-start: 100% 40px;--bg-size-scroll-end: 100% 40px;--bg-size-scroll-top: 100% 16px;--bg-size-scroll-bottom: 100% 16px;background:var(--bg-scroll-start),var(--bg-scroll-end),var(--bg-scroll-top),var(--bg-scroll-bottom);background-repeat:no-repeat;background-color:var(--dt-color-container-default);background-size:var(--bg-size-scroll-start),var(--bg-size-scroll-end),var(--bg-size-scroll-top),var(--bg-size-scroll-bottom);background-attachment:local,local,scroll,scroll}.c-modal .c-modal-content{--modal-content-font-size: calc(var(--dt-font-size-16) * 1px);--modal-content-font-weight: var(--dt-font-weight-regular);--modal-content-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--modal-content-padding: var(--dt-spacing-e);--modal-content-padding-block: var(--dt-spacing-a);--spinner-size: 48px;--spinner-border-width: 6px;--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l);--spinner-left-color-opacity: .35;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), var(--spinner-left-color-opacity));--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-animation-duration: 1.15s;--spinner-animation-timing-function: linear;--spinner-animation-iteration-count: infinite;position:relative;min-block-size:var(--dt-spacing-j);font-size:var(--modal-content-font-size);line-height:var(--modal-content-line-height);font-weight:var(--modal-content-font-weight);padding-inline:var(--modal-content-padding);padding-block:var(--modal-content-padding-block)}.c-modal .c-modal-content--scrollable{background:linear-gradient(to bottom,transparent,var(--dt-color-container-default) 75%) center bottom,linear-gradient(transparent,var(--dt-color-border-strong)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 12px;background-attachment:local,scroll}.c-modal .c-modal-content:before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;height:var(--spinner-size);width:var(--spinner-size);display:block;background-color:transparent;border-radius:50%;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);border-width:var(--spinner-border-width);border-style:solid;will-change:transform;opacity:0}.c-modal[isLoading] .c-modal-content:before{animation:rotate360 var(--spinner-animation-duration) var(--spinner-animation-timing-function) var(--spinner-animation-iteration-count);opacity:1}.c-modal[isLoading] .c-modal-content .c-modal-contentInner{opacity:0}
|
|
1329
|
+
`, ei = ["h1", "h2", "h3", "h4", "h5", "h6"], ti = ["small", "medium", "large"], ii = ["top", "center"], ge = "pie-modal-close", G = "pie-modal-open", ve = "pie-modal-back";
|
|
1330
|
+
var oi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, g = (i, e, t, o) => {
|
|
1331
|
+
for (var n = o > 1 ? void 0 : o ? ni(e, t) : e, r = i.length - 1, s; r >= 0; r--)
|
|
1332
|
+
(s = i[r]) && (n = (o ? s(e, t, n) : s(n)) || n);
|
|
1333
|
+
return o && n && oi(e, t, n), n;
|
|
1334
|
+
};
|
|
1335
|
+
const Z = "pie-modal";
|
|
1336
|
+
class f extends gt(lt) {
|
|
942
1337
|
constructor() {
|
|
943
1338
|
super(), this.headingLevel = "h2", this.hasBackButton = !1, this.hasStackedActions = !1, this.isDismissible = !1, this.isFooterPinned = !0, this.isFullWidthBelowMid = !1, this.isLoading = !1, this.isOpen = !1, this.position = "center", this.size = "medium", this._backButtonClicked = !1, this._handleDialogCancelEvent = (e) => {
|
|
944
1339
|
this.isDismissible || e.preventDefault();
|
|
945
1340
|
}, this._handleDialogLightDismiss = (e) => {
|
|
946
|
-
var
|
|
1341
|
+
var a;
|
|
947
1342
|
if (!this.isDismissible)
|
|
948
1343
|
return;
|
|
949
|
-
const t = (
|
|
950
|
-
top:
|
|
951
|
-
bottom:
|
|
952
|
-
left:
|
|
953
|
-
right:
|
|
1344
|
+
const t = (a = this._dialog) == null ? void 0 : a.getBoundingClientRect(), {
|
|
1345
|
+
top: o = 0,
|
|
1346
|
+
bottom: n = 0,
|
|
1347
|
+
left: r = 0,
|
|
1348
|
+
right: s = 0
|
|
954
1349
|
} = t || {};
|
|
955
|
-
if (
|
|
1350
|
+
if (o === 0 && n === 0 && r === 0 && s === 0)
|
|
956
1351
|
return;
|
|
957
|
-
(e.clientY <
|
|
1352
|
+
(e.clientY < o || e.clientY > n || e.clientX < r || e.clientX > s) && (this.isOpen = !1);
|
|
958
1353
|
}, this._dispatchModalCustomEvent = (e) => {
|
|
959
1354
|
const t = new CustomEvent(e, {
|
|
960
1355
|
bubbles: !0,
|
|
@@ -964,16 +1359,15 @@ class p extends ot(Ge) {
|
|
|
964
1359
|
}, this.addEventListener("click", (e) => this._handleDialogLightDismiss(e));
|
|
965
1360
|
}
|
|
966
1361
|
connectedCallback() {
|
|
967
|
-
super.connectedCallback(), document.addEventListener(
|
|
1362
|
+
super.connectedCallback(), document.addEventListener(G, this._handleModalOpened.bind(this)), document.addEventListener(ge, this._handleModalClosed.bind(this)), document.addEventListener(ve, this._handleModalClosed.bind(this));
|
|
968
1363
|
}
|
|
969
1364
|
disconnectedCallback() {
|
|
970
|
-
document.removeEventListener(
|
|
1365
|
+
document.removeEventListener(G, this._handleModalOpened.bind(this)), document.removeEventListener(ge, this._handleModalClosed.bind(this)), document.removeEventListener(ve, this._handleModalClosed.bind(this)), super.disconnectedCallback();
|
|
971
1366
|
}
|
|
972
1367
|
firstUpdated(e) {
|
|
973
|
-
|
|
974
|
-
(t = this._dialog) == null || t.addEventListener("cancel", (o) => this._handleDialogCancelEvent(o)), this._handleModalOpenStateOnFirstRender(e), (i = this._dialog) == null || i.addEventListener("close", () => {
|
|
1368
|
+
this._dialog && (c.registerDialog(this._dialog), this._dialog.addEventListener("cancel", (t) => this._handleDialogCancelEvent(t)), this._dialog.addEventListener("close", () => {
|
|
975
1369
|
this.isOpen = !1;
|
|
976
|
-
});
|
|
1370
|
+
})), this._handleModalOpenStateOnFirstRender(e);
|
|
977
1371
|
}
|
|
978
1372
|
updated(e) {
|
|
979
1373
|
this._handleModalOpenStateChanged(e);
|
|
@@ -982,33 +1376,33 @@ class p extends ot(Ge) {
|
|
|
982
1376
|
* Opens the dialog element and disables page scrolling
|
|
983
1377
|
*/
|
|
984
1378
|
_handleModalOpened() {
|
|
985
|
-
var e, t,
|
|
986
|
-
|
|
1379
|
+
var e, t, o;
|
|
1380
|
+
Et(this), !((e = this._dialog) != null && e.hasAttribute("open") || !((t = this._dialog) != null && t.isConnected)) && ((o = this._dialog) == null || o.showModal());
|
|
987
1381
|
}
|
|
988
1382
|
/**
|
|
989
1383
|
* Closes the dialog element and re-enables page scrolling
|
|
990
1384
|
*/
|
|
991
1385
|
_handleModalClosed() {
|
|
992
1386
|
var e;
|
|
993
|
-
|
|
1387
|
+
St(this), (e = this._dialog) == null || e.close(), this._returnFocus();
|
|
994
1388
|
}
|
|
995
1389
|
// Handles the value of the isOpen property on first render of the component
|
|
996
1390
|
_handleModalOpenStateOnFirstRender(e) {
|
|
997
|
-
e.get("isOpen") === void 0 && this.isOpen && this._dispatchModalCustomEvent(
|
|
1391
|
+
e.get("isOpen") === void 0 && this.isOpen && this._dispatchModalCustomEvent(G);
|
|
998
1392
|
}
|
|
999
1393
|
// Handles changes to the modal isOpen property by dispatching any appropriate events
|
|
1000
1394
|
_handleModalOpenStateChanged(e) {
|
|
1001
1395
|
const t = e.get("isOpen");
|
|
1002
|
-
t !== void 0 && (t ? this._backButtonClicked ? (this._backButtonClicked = !1, this._dispatchModalCustomEvent(
|
|
1396
|
+
t !== void 0 && (t ? this._backButtonClicked ? (this._backButtonClicked = !1, this._dispatchModalCustomEvent(ve)) : this._dispatchModalCustomEvent(ge) : this._dispatchModalCustomEvent(G));
|
|
1003
1397
|
}
|
|
1004
1398
|
/**
|
|
1005
1399
|
* Return focus to the specified element, providing the selector is valid
|
|
1006
1400
|
* and the chosen element can be found.
|
|
1007
1401
|
*/
|
|
1008
1402
|
_returnFocus() {
|
|
1009
|
-
var t,
|
|
1403
|
+
var t, o;
|
|
1010
1404
|
const e = (t = this.returnFocusAfterCloseSelector) == null ? void 0 : t.trim();
|
|
1011
|
-
e && ((
|
|
1405
|
+
e && ((o = document.querySelector(e)) == null || o.focus());
|
|
1012
1406
|
}
|
|
1013
1407
|
/**
|
|
1014
1408
|
* Template for the close button element. Called within the
|
|
@@ -1018,14 +1412,14 @@ class p extends ot(Ge) {
|
|
|
1018
1412
|
*/
|
|
1019
1413
|
renderCloseButton() {
|
|
1020
1414
|
var e;
|
|
1021
|
-
return
|
|
1415
|
+
return _`
|
|
1022
1416
|
<pie-icon-button
|
|
1023
1417
|
@click="${() => {
|
|
1024
1418
|
this.isOpen = !1;
|
|
1025
1419
|
}}"
|
|
1026
1420
|
variant="ghost-secondary"
|
|
1027
1421
|
class="c-modal-closeBtn"
|
|
1028
|
-
aria-label="${((e = this.aria) == null ? void 0 : e.close) ||
|
|
1422
|
+
aria-label="${((e = this.aria) == null ? void 0 : e.close) || b}"
|
|
1029
1423
|
data-test-id="modal-close-button">
|
|
1030
1424
|
<icon-close></icon-close>
|
|
1031
1425
|
</pie-icon-button>`;
|
|
@@ -1038,16 +1432,16 @@ class p extends ot(Ge) {
|
|
|
1038
1432
|
*/
|
|
1039
1433
|
renderBackButton() {
|
|
1040
1434
|
var e;
|
|
1041
|
-
return
|
|
1435
|
+
return _`
|
|
1042
1436
|
<pie-icon-button
|
|
1043
1437
|
@click="${() => {
|
|
1044
1438
|
this._backButtonClicked = !0, this.isOpen = !1;
|
|
1045
1439
|
}}"
|
|
1046
1440
|
variant="ghost-secondary"
|
|
1047
1441
|
class="c-modal-backBtn"
|
|
1048
|
-
aria-label="${((e = this.aria) == null ? void 0 : e.back) ||
|
|
1442
|
+
aria-label="${((e = this.aria) == null ? void 0 : e.back) || b}"
|
|
1049
1443
|
data-test-id="modal-back-button">
|
|
1050
|
-
${this.isRTL ?
|
|
1444
|
+
${this.isRTL ? _`<icon-chevron-right></icon-chevron-right>` : _`<icon-chevron-left></icon-chevron-left>`}
|
|
1051
1445
|
</pie-icon-button>
|
|
1052
1446
|
`;
|
|
1053
1447
|
}
|
|
@@ -1061,21 +1455,21 @@ class p extends ot(Ge) {
|
|
|
1061
1455
|
* @private
|
|
1062
1456
|
*/
|
|
1063
1457
|
renderLeadingAction() {
|
|
1064
|
-
const { text: e, variant: t = "primary", ariaLabel:
|
|
1065
|
-
return e ?
|
|
1458
|
+
const { text: e, variant: t = "primary", ariaLabel: o } = this.leadingAction;
|
|
1459
|
+
return e ? _`
|
|
1066
1460
|
<pie-button
|
|
1067
1461
|
variant="${t}"
|
|
1068
|
-
aria-label="${
|
|
1462
|
+
aria-label="${o || b}"
|
|
1069
1463
|
type="submit"
|
|
1070
1464
|
?isFullWidth="${this.hasStackedActions}"
|
|
1071
1465
|
@click="${() => {
|
|
1072
|
-
var
|
|
1073
|
-
return (
|
|
1466
|
+
var n;
|
|
1467
|
+
return (n = this._dialog) == null ? void 0 : n.close("leading");
|
|
1074
1468
|
}}"
|
|
1075
1469
|
data-test-id="modal-leading-action">
|
|
1076
1470
|
${e}
|
|
1077
1471
|
</pie-button>
|
|
1078
|
-
` :
|
|
1472
|
+
` : b;
|
|
1079
1473
|
}
|
|
1080
1474
|
/**
|
|
1081
1475
|
* Render supportingAction button depending on prop availability.
|
|
@@ -1089,79 +1483,79 @@ class p extends ot(Ge) {
|
|
|
1089
1483
|
* @private
|
|
1090
1484
|
*/
|
|
1091
1485
|
renderSupportingAction() {
|
|
1092
|
-
const { text: e, variant: t = "ghost", ariaLabel:
|
|
1093
|
-
return e ? this.leadingAction ?
|
|
1486
|
+
const { text: e, variant: t = "ghost", ariaLabel: o } = this.supportingAction;
|
|
1487
|
+
return e ? this.leadingAction ? _`
|
|
1094
1488
|
<pie-button
|
|
1095
1489
|
variant="${t}"
|
|
1096
|
-
aria-label="${
|
|
1490
|
+
aria-label="${o || b}"
|
|
1097
1491
|
type="reset"
|
|
1098
1492
|
?isFullWidth="${this.hasStackedActions}"
|
|
1099
1493
|
@click="${() => {
|
|
1100
|
-
var
|
|
1101
|
-
return (
|
|
1494
|
+
var n;
|
|
1495
|
+
return (n = this._dialog) == null ? void 0 : n.close("supporting");
|
|
1102
1496
|
}}"
|
|
1103
1497
|
data-test-id="modal-supporting-action">
|
|
1104
1498
|
${e}
|
|
1105
1499
|
</pie-button>
|
|
1106
|
-
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."),
|
|
1500
|
+
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."), b) : b;
|
|
1107
1501
|
}
|
|
1108
1502
|
/**
|
|
1109
1503
|
* Renders the modal inner content and footer of the modal.
|
|
1110
1504
|
* @private
|
|
1111
1505
|
*/
|
|
1112
1506
|
renderModalContentAndFooter() {
|
|
1113
|
-
return
|
|
1507
|
+
return _`
|
|
1114
1508
|
<article class="c-modal-content c-modal-content--scrollable">
|
|
1115
1509
|
<div class="c-modal-contentInner">
|
|
1116
1510
|
<slot></slot>
|
|
1117
1511
|
</div>
|
|
1118
1512
|
</article>
|
|
1119
1513
|
<footer class="c-modal-footer">
|
|
1120
|
-
${this.leadingAction ? this.renderLeadingAction() :
|
|
1121
|
-
${this.supportingAction ? this.renderSupportingAction() :
|
|
1514
|
+
${this.leadingAction ? this.renderLeadingAction() : b}
|
|
1515
|
+
${this.supportingAction ? this.renderSupportingAction() : b}
|
|
1122
1516
|
</footer>`;
|
|
1123
1517
|
}
|
|
1124
1518
|
render() {
|
|
1125
1519
|
const {
|
|
1126
1520
|
aria: e,
|
|
1127
1521
|
hasBackButton: t,
|
|
1128
|
-
hasStackedActions:
|
|
1129
|
-
heading:
|
|
1130
|
-
headingLevel:
|
|
1131
|
-
isDismissible:
|
|
1132
|
-
isFooterPinned:
|
|
1133
|
-
isFullWidthBelowMid:
|
|
1134
|
-
isLoading:
|
|
1135
|
-
leadingAction:
|
|
1136
|
-
position:
|
|
1137
|
-
size:
|
|
1522
|
+
hasStackedActions: o,
|
|
1523
|
+
heading: n,
|
|
1524
|
+
headingLevel: r = "h2",
|
|
1525
|
+
isDismissible: s,
|
|
1526
|
+
isFooterPinned: l,
|
|
1527
|
+
isFullWidthBelowMid: a,
|
|
1528
|
+
isLoading: d,
|
|
1529
|
+
leadingAction: y,
|
|
1530
|
+
position: h,
|
|
1531
|
+
size: u,
|
|
1138
1532
|
supportingAction: m
|
|
1139
|
-
} = this,
|
|
1140
|
-
return
|
|
1533
|
+
} = this, A = dt(r);
|
|
1534
|
+
return _`
|
|
1141
1535
|
<dialog
|
|
1142
1536
|
id="dialog"
|
|
1143
1537
|
class="c-modal"
|
|
1144
|
-
size="${
|
|
1145
|
-
position="${
|
|
1146
|
-
?hasActions=${
|
|
1538
|
+
size="${u}"
|
|
1539
|
+
position="${h}"
|
|
1540
|
+
?hasActions=${y || m}
|
|
1147
1541
|
?hasBackButton=${t}
|
|
1148
|
-
?hasStackedActions=${
|
|
1149
|
-
?isDismissible=${
|
|
1150
|
-
?isFooterPinned=${
|
|
1151
|
-
?isFullWidthBelowMid=${
|
|
1152
|
-
?isLoading=${
|
|
1153
|
-
aria-busy="${
|
|
1154
|
-
aria-label="${
|
|
1542
|
+
?hasStackedActions=${o}
|
|
1543
|
+
?isDismissible=${s}
|
|
1544
|
+
?isFooterPinned=${l}
|
|
1545
|
+
?isFullWidthBelowMid=${a}
|
|
1546
|
+
?isLoading=${d}
|
|
1547
|
+
aria-busy="${d ? "true" : "false"}"
|
|
1548
|
+
aria-label="${d && (e == null ? void 0 : e.loading) || b}"
|
|
1155
1549
|
data-test-id="pie-modal">
|
|
1156
1550
|
<header class="c-modal-header">
|
|
1157
|
-
${t ? this.renderBackButton() :
|
|
1158
|
-
<${
|
|
1159
|
-
${
|
|
1160
|
-
</${
|
|
1161
|
-
${
|
|
1551
|
+
${t ? this.renderBackButton() : b}
|
|
1552
|
+
<${A} class="c-modal-heading">
|
|
1553
|
+
${n}
|
|
1554
|
+
</${A}>
|
|
1555
|
+
${s ? this.renderCloseButton() : b}
|
|
1162
1556
|
</header>
|
|
1163
1557
|
${// We need to wrap the remaining content in a shared scrollable container if the footer is not pinned
|
|
1164
|
-
|
|
1558
|
+
l ? this.renderModalContentAndFooter() : _`
|
|
1165
1559
|
<div class="c-modal-scrollContainer">
|
|
1166
1560
|
${this.renderModalContentAndFooter()}
|
|
1167
1561
|
</div>
|
|
@@ -1169,62 +1563,66 @@ class p extends ot(Ge) {
|
|
|
1169
1563
|
</dialog>`;
|
|
1170
1564
|
}
|
|
1171
1565
|
}
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
],
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
],
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
],
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
],
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
],
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
],
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
],
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
],
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
],
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
],
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
],
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
],
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
],
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
],
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
],
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
],
|
|
1225
|
-
customElements.define(
|
|
1566
|
+
f.styles = at(Qt);
|
|
1567
|
+
g([
|
|
1568
|
+
v({ type: Object })
|
|
1569
|
+
], f.prototype, "aria", 2);
|
|
1570
|
+
g([
|
|
1571
|
+
v({ type: String }),
|
|
1572
|
+
vt(Z)
|
|
1573
|
+
], f.prototype, "heading", 2);
|
|
1574
|
+
g([
|
|
1575
|
+
v(),
|
|
1576
|
+
_e(Z, ei, "h2")
|
|
1577
|
+
], f.prototype, "headingLevel", 2);
|
|
1578
|
+
g([
|
|
1579
|
+
v({ type: Boolean })
|
|
1580
|
+
], f.prototype, "hasBackButton", 2);
|
|
1581
|
+
g([
|
|
1582
|
+
v({ type: Boolean })
|
|
1583
|
+
], f.prototype, "hasStackedActions", 2);
|
|
1584
|
+
g([
|
|
1585
|
+
v({ type: Boolean, reflect: !0 })
|
|
1586
|
+
], f.prototype, "isDismissible", 2);
|
|
1587
|
+
g([
|
|
1588
|
+
v({ type: Boolean })
|
|
1589
|
+
], f.prototype, "isFooterPinned", 2);
|
|
1590
|
+
g([
|
|
1591
|
+
v({ type: Boolean })
|
|
1592
|
+
], f.prototype, "isFullWidthBelowMid", 2);
|
|
1593
|
+
g([
|
|
1594
|
+
v({ type: Boolean, reflect: !0 })
|
|
1595
|
+
], f.prototype, "isLoading", 2);
|
|
1596
|
+
g([
|
|
1597
|
+
v({ type: Boolean })
|
|
1598
|
+
], f.prototype, "isOpen", 2);
|
|
1599
|
+
g([
|
|
1600
|
+
v({ type: Object })
|
|
1601
|
+
], f.prototype, "leadingAction", 2);
|
|
1602
|
+
g([
|
|
1603
|
+
v(),
|
|
1604
|
+
_e(Z, ii, "center")
|
|
1605
|
+
], f.prototype, "position", 2);
|
|
1606
|
+
g([
|
|
1607
|
+
v()
|
|
1608
|
+
], f.prototype, "returnFocusAfterCloseSelector", 2);
|
|
1609
|
+
g([
|
|
1610
|
+
v(),
|
|
1611
|
+
_e(Z, ti, "medium")
|
|
1612
|
+
], f.prototype, "size", 2);
|
|
1613
|
+
g([
|
|
1614
|
+
v({ type: Object })
|
|
1615
|
+
], f.prototype, "supportingAction", 2);
|
|
1616
|
+
g([
|
|
1617
|
+
ct("dialog")
|
|
1618
|
+
], f.prototype, "_dialog", 2);
|
|
1619
|
+
customElements.define(Z, f);
|
|
1226
1620
|
export {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1621
|
+
ve as ON_MODAL_BACK_EVENT,
|
|
1622
|
+
ge as ON_MODAL_CLOSE_EVENT,
|
|
1623
|
+
G as ON_MODAL_OPEN_EVENT,
|
|
1624
|
+
f as PieModal,
|
|
1625
|
+
ei as headingLevels,
|
|
1626
|
+
ii as positions,
|
|
1627
|
+
ti as sizes
|
|
1230
1628
|
};
|