@fluid-topics/ft-snap-scroll 0.0.88

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 ADDED
@@ -0,0 +1,25 @@
1
+ Vertical or horizontal container with snap scrolling.
2
+
3
+ ## Install
4
+
5
+ ```shell
6
+ npm install @fluid-topics/ft-snap-scroll
7
+ yarn add @fluid-topics/ft-snap-scroll
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ ```typescript
13
+ import { html } from "lit"
14
+ import "@fluid-topics/ft-snap-scroll"
15
+
16
+ function render() {
17
+ return html`
18
+ <div class="limited-size">
19
+ <ft-snap-scroll>
20
+ ...
21
+ </ft-snap-scroll>
22
+ </div>
23
+ `
24
+ }
25
+ ```
@@ -0,0 +1,65 @@
1
+ import { PropertyValues } from "lit";
2
+ import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
+ export interface FtSnapScrollProperties {
4
+ hideScrollbar: boolean;
5
+ controls: boolean;
6
+ horizontal: boolean;
7
+ limitSize: boolean;
8
+ }
9
+ export interface FtSnapScrollCssVariables {
10
+ "--ft-color-surface"?: string;
11
+ "--ft-snap-scroll-buttons-color"?: string;
12
+ "--ft-snap-scroll-buttons-z-index"?: string;
13
+ "--ft-snap-scroll-gap"?: string;
14
+ }
15
+ export declare class CurrentElementChange extends CustomEvent<{
16
+ index: number;
17
+ element: HTMLElement;
18
+ }> {
19
+ constructor(index: number, element: HTMLElement);
20
+ }
21
+ export declare class FtSnapScroll extends FtLitElement implements FtSnapScrollProperties {
22
+ static elementDefinitions: ElementDefinitionsMap;
23
+ protected getStyles(): import("lit").CSSResult;
24
+ horizontal: boolean;
25
+ hideScrollbar: boolean;
26
+ controls: boolean;
27
+ limitSize: boolean;
28
+ private elements;
29
+ private currentElement;
30
+ private withScroll;
31
+ private startReached;
32
+ private endReached;
33
+ private contentSlot?;
34
+ private offsetAttribute;
35
+ private scrollAttribute;
36
+ private sizeAttribute;
37
+ private scrollSizeAttribute;
38
+ scrollToIndex(index: number): void;
39
+ scrollIndexIntoView(index: number): void;
40
+ previous(): void;
41
+ next(): void;
42
+ protected getTemplate(): import("lit-html").TemplateResult<1>;
43
+ private listenedContainer?;
44
+ private updateScrollCallback;
45
+ private resizeObserver;
46
+ protected updated(props: PropertyValues): void;
47
+ private scrollDebouncer;
48
+ private onScroll;
49
+ private snap;
50
+ private scrollToElement;
51
+ private onSlotChange;
52
+ private closestElementFromStart;
53
+ private closestIndexFromStart;
54
+ private updateScrollDebouncer;
55
+ private scheduleUpdateScroll;
56
+ private updateScroll;
57
+ private get lastElement();
58
+ private get firstElementOffset();
59
+ private get controlsSize();
60
+ private get nextSize();
61
+ private get prevSize();
62
+ private getOffset;
63
+ private getDistanceFromStart;
64
+ }
65
+ //# sourceMappingURL=ft-snap-scroll.d.ts.map
@@ -0,0 +1,374 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html } from "lit";
8
+ import { property, query, state } from "lit/decorators.js";
9
+ import { customElement, Debouncer, FtLitElement, isSafari } from "@fluid-topics/ft-wc-utils";
10
+ import { FtButton } from "@fluid-topics/ft-button";
11
+ import { classMap } from "lit/directives/class-map.js";
12
+ export class CurrentElementChange extends CustomEvent {
13
+ constructor(index, element) {
14
+ super("current-element-change", { detail: { index, element } });
15
+ }
16
+ }
17
+ let FtSnapScroll = class FtSnapScroll extends FtLitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.horizontal = false;
21
+ this.hideScrollbar = false;
22
+ this.controls = false;
23
+ this.limitSize = false;
24
+ this.elements = [];
25
+ this.currentElement = 0;
26
+ this.withScroll = false;
27
+ this.startReached = true;
28
+ this.endReached = true;
29
+ this.offsetAttribute = "offsetTop";
30
+ this.scrollAttribute = "scrollTop";
31
+ this.sizeAttribute = "clientHeight";
32
+ this.scrollSizeAttribute = "scrollHeight";
33
+ this.updateScrollCallback = () => this.onScroll();
34
+ this.resizeObserver = new ResizeObserver(() => this.scheduleUpdateScroll());
35
+ this.scrollDebouncer = new Debouncer(200);
36
+ this.updateScrollDebouncer = new Debouncer(100);
37
+ }
38
+ // language=CSS
39
+ getStyles() {
40
+ return css `
41
+ .ft-snap-scroll {
42
+ box-sizing: border-box;
43
+ position: relative;
44
+ display: flex;
45
+
46
+ --ft-snap-scroll-transparent-color: transparent;
47
+ }
48
+
49
+ .ft-snap-scroll.ft-snap-scroll--safari-fix {
50
+ /* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
51
+ /* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
52
+ --ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
53
+ }
54
+
55
+ .ft-snap-scroll,
56
+ .ft-snap-scroll--content {
57
+ overflow: hidden;
58
+ }
59
+
60
+ .ft-snap-scroll--limit-size,
61
+ .ft-snap-scroll--limit-size .ft-snap-scroll--content {
62
+ width: 100%;
63
+ height: 100%;
64
+ }
65
+
66
+ .ft-snap-scroll--content {
67
+ flex-grow: 1;
68
+ flex-shrink: 1;
69
+ box-sizing: border-box;
70
+ scroll-snap-align: start;
71
+ display: flex;
72
+ flex-wrap: nowrap;
73
+ align-items: flex-start;
74
+ justify-content: flex-start;
75
+ gap: var(--ft-snap-scroll-gap, 0);
76
+ }
77
+
78
+ .ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
79
+ display: none;
80
+ }
81
+
82
+ .ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
83
+ -ms-overflow-style: none;
84
+ scrollbar-width: none;
85
+ }
86
+
87
+ .ft-snap-scroll--content::slotted(*) {
88
+ flex-shrink: 0;
89
+ flex-grow: 1;
90
+ max-height: 100%;
91
+ max-width: 100%;
92
+ }
93
+
94
+ .ft-snap-scroll--horizontal,
95
+ .ft-snap-scroll--horizontal .ft-snap-scroll--content {
96
+ width: 100%;
97
+ }
98
+
99
+ .ft-snap-scroll--vertical,
100
+ .ft-snap-scroll--vertical .ft-snap-scroll--content {
101
+ height: 100%;
102
+ }
103
+
104
+ .ft-snap-scroll--horizontal .ft-snap-scroll--content {
105
+ flex-direction: row;
106
+ overflow-x: auto;
107
+ }
108
+
109
+ .ft-snap-scroll--vertical .ft-snap-scroll--content {
110
+ flex-direction: column;
111
+ overflow-y: auto;
112
+ }
113
+
114
+ .ft-snap-scroll--previous,
115
+ .ft-snap-scroll--next {
116
+ position: absolute;
117
+ display: flex;
118
+ z-index: var(--ft-snap-scroll-buttons-z-index, 1);
119
+ opacity: 1;
120
+ transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
121
+ --ft-button-background-color: transparent;
122
+ --ft-button-color: var(--ft-snap-scroll-buttons-color, var(--ft-color-primary, #2196F3));
123
+ }
124
+
125
+ .ft-snap-scroll--previous[hidden],
126
+ .ft-snap-scroll--next[hidden] {
127
+ z-index: -1;
128
+ opacity: 0;
129
+ }
130
+
131
+ .ft-snap-scroll--horizontal .ft-snap-scroll--previous {
132
+ top: 0;
133
+ left: -1px;
134
+ bottom: 0;
135
+ background: linear-gradient(to right, var(--ft-color-surface, #FFFFFF) 50%, var(--ft-snap-scroll-transparent-color));
136
+ }
137
+
138
+ .ft-snap-scroll--vertical .ft-snap-scroll--previous {
139
+ top: -1px;
140
+ left: 0;
141
+ right: 0;
142
+ background: linear-gradient(to bottom, var(--ft-color-surface, #FFFFFF) 50%, var(--ft-snap-scroll-transparent-color));
143
+ }
144
+
145
+ .ft-snap-scroll--horizontal .ft-snap-scroll--next {
146
+ top: 0;
147
+ right: -1px;
148
+ bottom: 0;
149
+ background: linear-gradient(to left, var(--ft-color-surface, #FFFFFF) 50%, var(--ft-snap-scroll-transparent-color));
150
+ }
151
+
152
+ .ft-snap-scroll--vertical .ft-snap-scroll--next {
153
+ left: 0;
154
+ right: 0;
155
+ bottom: -1px;
156
+ background: linear-gradient(to top, var(--ft-color-surface, #FFFFFF) 50%, var(--ft-snap-scroll-transparent-color));
157
+ }
158
+
159
+ .ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
160
+ .ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
161
+ .ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
162
+ .ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
163
+ background-color: var(--ft-color-surface, #FFFFFF);
164
+ }
165
+ `;
166
+ }
167
+ scrollToIndex(index) {
168
+ this.scrollToElement(this.elements[index]);
169
+ }
170
+ scrollIndexIntoView(index) {
171
+ let element = this.elements[index];
172
+ if (element) {
173
+ const endLimit = this.contentSlot[this.scrollAttribute] + this.contentSlot[this.sizeAttribute] - this.nextSize;
174
+ const startLimit = this.contentSlot[this.scrollAttribute] + this.prevSize;
175
+ const outOfView = element[this.offsetAttribute] < startLimit || element[this.offsetAttribute] + element[this.sizeAttribute] > endLimit;
176
+ if (outOfView) {
177
+ this.scrollToElement(element);
178
+ }
179
+ }
180
+ }
181
+ previous() {
182
+ this.scrollToElement(this.elements[Math.max(0, this.closestIndexFromStart() - 1)]);
183
+ }
184
+ next() {
185
+ this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart() + 1, this.elements.length - 1)]);
186
+ }
187
+ getTemplate() {
188
+ const classes = classMap({
189
+ "ft-snap-scroll": true,
190
+ "ft-snap-scroll--horizontal": this.horizontal,
191
+ "ft-snap-scroll--vertical": !this.horizontal,
192
+ "ft-snap-scroll--hide-scrollbar": this.hideScrollbar,
193
+ "ft-snap-scroll--limit-size": this.limitSize,
194
+ "ft-snap-scroll--safari-fix": isSafari,
195
+ });
196
+ const showControls = this.controls && this.withScroll;
197
+ return html `
198
+ <div part="container" class="${classes}">
199
+ <ft-button
200
+ class="ft-snap-scroll--previous"
201
+ part="controls"
202
+ primary
203
+ icon="${this.horizontal ? "arrow_back_ios_new" : "expand_less"}"
204
+ ?hidden=${!showControls || this.startReached}
205
+ ?disabled=${!showControls || this.startReached}
206
+ @click=${this.previous}
207
+ ></ft-button>
208
+ <slot class="ft-snap-scroll--content"
209
+ part="content"
210
+ @slotchange=${this.onSlotChange}></slot>
211
+ <ft-button
212
+ class="ft-snap-scroll--next"
213
+ part="controls"
214
+ primary
215
+ icon="${this.horizontal ? "arrow_forward_ios" : "expand_more"}"
216
+ ?hidden=${!showControls || this.endReached}
217
+ ?disabled=${!showControls || this.endReached}
218
+ @click=${this.next}
219
+ ></ft-button>
220
+ </div>
221
+ `;
222
+ }
223
+ updated(props) {
224
+ var _a;
225
+ super.updated(props);
226
+ if (this.contentSlot) {
227
+ this.resizeObserver.observe(this.contentSlot);
228
+ if (this.listenedContainer !== this.contentSlot) {
229
+ if (this.listenedContainer) {
230
+ this.listenedContainer.removeEventListener("scroll", this.updateScrollCallback);
231
+ }
232
+ this.listenedContainer = this.contentSlot;
233
+ (_a = this.listenedContainer) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", this.updateScrollCallback);
234
+ }
235
+ }
236
+ if (props.has("horizontal")) {
237
+ if (this.horizontal) {
238
+ this.offsetAttribute = "offsetLeft";
239
+ this.scrollAttribute = "scrollLeft";
240
+ this.sizeAttribute = "clientWidth";
241
+ this.scrollSizeAttribute = "scrollWidth";
242
+ }
243
+ else {
244
+ this.offsetAttribute = "offsetTop";
245
+ this.scrollAttribute = "scrollTop";
246
+ this.sizeAttribute = "clientHeight";
247
+ this.scrollSizeAttribute = "scrollHeight";
248
+ }
249
+ }
250
+ if (props.has("currentElement")) {
251
+ this.dispatchEvent(new CurrentElementChange(this.currentElement, this.elements[this.currentElement]));
252
+ }
253
+ }
254
+ onScroll() {
255
+ this.scrollDebouncer.run(() => this.snap());
256
+ this.scheduleUpdateScroll();
257
+ }
258
+ snap() {
259
+ let target = this.closestElementFromStart();
260
+ if (target != null) {
261
+ const distanceToClosestElement = this.getDistanceFromStart(target);
262
+ const distanceToEnd = Math.abs(this.contentSlot[this.scrollAttribute] + this.contentSlot[this.sizeAttribute] - this.contentSlot[this.scrollSizeAttribute]);
263
+ if (distanceToEnd < distanceToClosestElement) {
264
+ target = this.lastElement;
265
+ }
266
+ this.scrollToElement(target);
267
+ }
268
+ }
269
+ scrollToElement(element) {
270
+ var _a, _b;
271
+ if (element) {
272
+ if (this.horizontal) {
273
+ (_a = this.contentSlot) === null || _a === void 0 ? void 0 : _a.scrollTo({ left: this.getOffset(element) - this.controlsSize, behavior: "smooth" });
274
+ }
275
+ else {
276
+ (_b = this.contentSlot) === null || _b === void 0 ? void 0 : _b.scrollTo({ top: this.getOffset(element) - this.controlsSize, behavior: "smooth" });
277
+ }
278
+ this.currentElement = this.elements.indexOf(element);
279
+ }
280
+ }
281
+ onSlotChange() {
282
+ var _a, _b;
283
+ this.elements = (_b = (_a = this.contentSlot) === null || _a === void 0 ? void 0 : _a.assignedElements().map(e => e)) !== null && _b !== void 0 ? _b : [];
284
+ this.scheduleUpdateScroll();
285
+ }
286
+ closestElementFromStart() {
287
+ return this.elements[this.closestIndexFromStart()];
288
+ }
289
+ closestIndexFromStart() {
290
+ let closestIndex = -1;
291
+ for (let i = 0; i < this.elements.length; i++) {
292
+ if (closestIndex < 0 || this.getDistanceFromStart(this.elements[i]) < this.getDistanceFromStart(this.elements[closestIndex])) {
293
+ closestIndex = i;
294
+ }
295
+ }
296
+ return closestIndex;
297
+ }
298
+ scheduleUpdateScroll() {
299
+ this.updateScrollDebouncer.run(() => this.updateScroll());
300
+ }
301
+ updateScroll() {
302
+ if (this.contentSlot != null) {
303
+ this.withScroll = this.contentSlot[this.scrollSizeAttribute] > this.contentSlot[this.sizeAttribute];
304
+ this.startReached = this.contentSlot[this.scrollAttribute] === 0;
305
+ this.endReached = this.contentSlot[this.scrollAttribute] + this.contentSlot[this.sizeAttribute] + 1 >= this.contentSlot[this.scrollSizeAttribute];
306
+ }
307
+ else {
308
+ this.withScroll = false;
309
+ this.startReached = true;
310
+ this.endReached = true;
311
+ }
312
+ }
313
+ get lastElement() {
314
+ return this.elements[this.elements.length - 1];
315
+ }
316
+ get firstElementOffset() {
317
+ let first = this.elements[0];
318
+ return first ? first[this.offsetAttribute] : 0;
319
+ }
320
+ get controlsSize() {
321
+ return this.controls ? 36 : 0;
322
+ }
323
+ get nextSize() {
324
+ return this.endReached ? 0 : this.controlsSize;
325
+ }
326
+ get prevSize() {
327
+ return this.startReached ? 0 : this.controlsSize;
328
+ }
329
+ getOffset(element) {
330
+ return element[this.offsetAttribute] - this.firstElementOffset;
331
+ }
332
+ getDistanceFromStart(element) {
333
+ const offset = element === this.elements[0] ? 0 : this.controlsSize;
334
+ return Math.abs(this.getOffset(element) - this.contentSlot[this.scrollAttribute] - offset);
335
+ }
336
+ };
337
+ FtSnapScroll.elementDefinitions = {
338
+ "ft-button": FtButton,
339
+ };
340
+ __decorate([
341
+ property({ type: Boolean })
342
+ ], FtSnapScroll.prototype, "horizontal", void 0);
343
+ __decorate([
344
+ property({ type: Boolean })
345
+ ], FtSnapScroll.prototype, "hideScrollbar", void 0);
346
+ __decorate([
347
+ property({ type: Boolean })
348
+ ], FtSnapScroll.prototype, "controls", void 0);
349
+ __decorate([
350
+ property({ type: Boolean })
351
+ ], FtSnapScroll.prototype, "limitSize", void 0);
352
+ __decorate([
353
+ state()
354
+ ], FtSnapScroll.prototype, "elements", void 0);
355
+ __decorate([
356
+ state()
357
+ ], FtSnapScroll.prototype, "currentElement", void 0);
358
+ __decorate([
359
+ state()
360
+ ], FtSnapScroll.prototype, "withScroll", void 0);
361
+ __decorate([
362
+ state()
363
+ ], FtSnapScroll.prototype, "startReached", void 0);
364
+ __decorate([
365
+ state()
366
+ ], FtSnapScroll.prototype, "endReached", void 0);
367
+ __decorate([
368
+ query(".ft-snap-scroll--content")
369
+ ], FtSnapScroll.prototype, "contentSlot", void 0);
370
+ FtSnapScroll = __decorate([
371
+ customElement("ft-snap-scroll")
372
+ ], FtSnapScroll);
373
+ export { FtSnapScroll };
374
+ //# sourceMappingURL=ft-snap-scroll.js.map
@@ -0,0 +1,340 @@
1
+ !function(t){
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new Map;class o{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return e&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const n=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new o(r,i)},s=(t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),r=window.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",i))(e)})(t):t
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */;var l;const c=window.trustedTypes,p=c?c.emptyScript:"",d=window.reactiveElementPolyfillSupport,h={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,e)=>e!==t&&(e==e||t==t),u={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:f};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Eh(i,e);void 0!==r&&(this._$Eu.set(r,i),t.push(r))})),t}static createProperty(t,e=u){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||u}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=u){var r,o;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const s=(null!==(o=null===(r=i.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==o?o:h.toAttribute)(e,i.type);this._$Ei=t,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Ei=null}}_$AK(t,e){var i,r,o;const n=this.constructor,s=n._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=n.getPropertyOptions(s),a=t.converter,l=null!==(o=null!==(r=null===(i=a)||void 0===i?void 0:i.fromAttribute)&&void 0!==r?r:"function"==typeof a?a:null)&&void 0!==o?o:h.fromAttribute;this._$Ei=s,this[s]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ var m;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,w="?"+b,x=`<${w}>`,k=document,S=(t="")=>k.createComment(t),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,T=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,j=/'/g,C=/"/g,_=/^(?:script|style|textarea|title)$/i,M=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),R=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),I=new WeakMap,B=k.createTreeWalker(k,129,null,!1),H=(t,e)=>{const i=t.length-1,r=[];let o,n=2===e?"<svg>":"",s=O;for(let e=0;e<i;e++){const i=t[e];let a,l,c=-1,p=0;for(;p<i.length&&(s.lastIndex=p,l=s.exec(i),null!==l);)p=s.lastIndex,s===O?"!--"===l[1]?s=A:void 0!==l[1]?s=T:void 0!==l[2]?(_.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=E):void 0!==l[3]&&(s=E):s===E?">"===l[0]?(s=null!=o?o:O,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?E:'"'===l[3]?C:j):s===C||s===j?s=E:s===A||s===T?s=O:(s=E,o=void 0);const d=s===E&&t[e+1].startsWith("/>")?" ":"";n+=s===O?i+x:c>=0?(r.push(a),i.slice(0,c)+"$lit$"+i.slice(c)+b+d):i+b+(-2===c?(r.push(void 0),e):d)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(a):a,r]};class D{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,n=0;const s=t.length-1,a=this.parts,[l,c]=H(t,e);if(this.el=D.createElement(l,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=B.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(b)){const i=c[n++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(b),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?V:"?"===e[1]?G:"@"===e[1]?W:P})}else a.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(_.test(r.tagName)){const t=r.textContent.split(b),e=t.length-1;if(e>0){r.textContent=y?y.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],S()),B.nextNode(),a.push({type:2,index:++o});r.append(t[e],S())}}}else if(8===r.nodeType)if(r.data===w)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(b,t+1));)a.push({type:7,index:o}),t+=b.length-1}o++}}static createElement(t,e){const i=k.createElement("template");return i.innerHTML=t,i}}function U(t,e,i=t,r){var o,n,s,a;if(e===R)return e;let l=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const c=z(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,i,r)),void 0!==r?(null!==(s=(a=i)._$Cl)&&void 0!==s?s:a._$Cl=[])[r]=l:i._$Cu=l),void 0!==l&&(e=U(t,l._$AS(t,e.values),l,r)),e}class N{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:k).importNode(i,!0);B.currentNode=o;let n=B.nextNode(),s=0,a=0,l=r[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new L(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Z(n,this,t)),this.v.push(e),l=r[++a]}s!==(null==l?void 0:l.index)&&(n=B.nextNode(),s++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class L{constructor(t,e,i,r){var o;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),z(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==R&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return $(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==F&&z(this._$AH)?this._$AA.nextSibling.data=t:this.S(k.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=D.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new N(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new D(t)),e}A(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new L(this.M(S()),this.M(S()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class P{constructor(t,e,i,r,o){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let n=!1;if(void 0===o)t=U(this,t,e,0),n=!z(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const r=t;let s,a;for(t=o[0],s=0;s<o.length-1;s++)a=U(this,r[i+s],e,s),a===R&&(a=this._$AH[s]),n||(n=!z(a)||a!==this._$AH[s]),a===F?t=F:t!==F&&(t+=(null!=a?a:"")+o[s+1]),this._$AH[s]=a}n&&!r&&this.k(t)}k(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends P{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===F?void 0:t}}const q=y?y.emptyScript:"";class G extends P{constructor(){super(...arguments),this.type=4}k(t){t&&t!==F?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class W extends P{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=U(this,t,e,0))&&void 0!==i?i:F)===R)return;const r=this._$AH,o=t===F&&r!==F||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==F&&(r===F||o);o&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const J=window.litHtmlPolyfillSupport;
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+ var K,X;null==J||J(D,L),(null!==(m=globalThis.litHtmlVersions)&&void 0!==m?m:globalThis.litHtmlVersions=[]).push("2.1.3");class Y extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var r,o;const n=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let s=n._$litPart$;if(void 0===s){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;n._$litPart$=s=new L(e.insertBefore(S(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return R}}Y.finalized=!0,Y._$litElement$=!0,null===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:Y});const Q=globalThis.litElementPolyfillSupport;null==Q||Q({LitElement:Y}),(null!==(X=globalThis.litElementVersions)&&void 0!==X?X:globalThis.litElementVersions=[]).push("3.1.2");
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+ const tt=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:r}=e;return{kind:i,elements:r,finisher(e){window.customElements.define(t,e)}}})(t,e)
31
+ /**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */,et=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function it(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):et(t,e)
36
+ /**
37
+ * @license
38
+ * Copyright 2017 Google LLC
39
+ * SPDX-License-Identifier: BSD-3-Clause
40
+ */}function rt(t){return it({...t,state:!0})}
41
+ /**
42
+ * @license
43
+ * Copyright 2017 Google LLC
44
+ * SPDX-License-Identifier: BSD-3-Clause
45
+ */const ot=({finisher:t,descriptor:e})=>(i,r)=>{var o;if(void 0===r){const r=null!==(o=i.originalKey)&&void 0!==o?o:i.key,n=null!=e?{kind:"method",placement:"prototype",key:r,descriptor:e(i.key)}:{...i,key:r};return null!=t&&(n.finisher=function(e){t(e,r)}),n}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,r,e(r)),null==t||t(o,r)}}
46
+ /**
47
+ * @license
48
+ * Copyright 2017 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ */;function nt(t,e){return ot({descriptor:i=>{const r={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;r.get=function(){var i,r;return void 0===this[e]&&(this[e]=null!==(r=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==r?r:null),this[e]}}return r}})}
51
+ /**
52
+ * @license
53
+ * Copyright 2021 Google LLC
54
+ * SPDX-License-Identifier: BSD-3-Clause
55
+ */var st;const at=null!=(null===(st=window.HTMLSlotElement)||void 0===st?void 0:st.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,r=[];!(i=t.next()).done;)r.push(i.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var o,n=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),s=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,i,r){return e=t(e,i),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=r(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var a;t:{var l={};try{l.__proto__={a:!0},a=l.a;break t}catch(t){}a=!1}o=a?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var c=o;if(!ShadowRoot.prototype.createElement){var p,d=window.HTMLElement,h=window.customElements.define,f=window.customElements.get,u=window.customElements,v=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,i){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=i.prototype.attributeChangedCallback,o=new Set(i.observedAttributes||[]);if(w(i,o,r),r={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,r),this.o.set(i,r),(o=f.call(u,t))||(o=b(t),h.call(u,t,o)),this===window.customElements&&(y.set(i,r),r.s=o),o=this.h.get(t)){this.h.delete(t);for(var n=(o=e(o)).next();!n.done;n=o.next())n=n.value,m.delete(n),k(n,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){z.push(this),u.upgrade.apply(u,arguments),z.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var r=this.h.get(e);r||this.h.set(e,r=new Set),i?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=p;if(t)return p=void 0,t;var e=y.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(d,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,e),t},window.HTMLElement.prototype=d.prototype;var b=function(t){function e(){var e=Reflect.construct(d,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=z[z.length-1])instanceof CustomElementRegistry){var r=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(r=g.get(i))?void 0:r.getRootNode())||document)}r=i.customElements}return(i=(r=r||window.customElements).j(t))?k(e,i):m.set(e,r),e}return n.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=v.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):m.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=v.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):m.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=v.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=v.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},w=function(t,e,i){if(0!==e.size&&void 0!==i){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),e.has(t)){var n=this.getAttribute(t);r.call(this,t,o),i.call(this,t,n,o)}else r.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);o.call(this,t),i.call(this,t,r,null)}else o.call(this,t)})}},x=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===d?Object.setPrototypeOf(t,window.HTMLElement):x(e)},k=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),v.set(t,e),p=t;try{new e.g}catch(t){x(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},S=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=S.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var z=[document],$=function(t,e,i){var r=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){z.push(this);var t=r.apply(i||this,arguments);return void 0!==t&&g.set(t,this),z.pop(),t}};$(ShadowRoot,"createElement",document),$(ShadowRoot,"importNode",document),$(Element,"insertAdjacentHTML");var O=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){z.push(this),e.set.call(this,t),z.pop()}}))};if(O(Element),O(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var A=new WeakMap,T=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=T.call.apply(T,[this].concat(i(e))),A.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],o=0;o<arguments.length;++o)e[o]=arguments[o];if(o=A.get(this),!0!==v.get(o).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(i(e)))}}));var E=function(t){var e=s(Array,[].concat(i(t)),this.constructor);return e.h=t,e},j=E,C=Array;if(j.prototype=r(C.prototype),j.prototype.constructor=j,c)c(j,C);else for(var _ in C)if("prototype"!=_)if(Object.defineProperties){var M=Object.getOwnPropertyDescriptor(C,_);M&&Object.defineProperty(j,_,M)}else j[_]=C[_];j.u=C.prototype,n.Object.defineProperty(E.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var R=function(t){var e=this,i=new Map;t.forEach((function(t,r){var o=t.getAttribute("name"),n=i.get(o)||[];e[+r]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new E(t))}))};R.prototype.namedItem=function(t){return this[t]};var F=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=F.get.call(this,[]),i=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var o=v.get(r);o&&!0!==o.formAssociated||i.push(r)}return new R(i)}})}}}).call(self);try{window.customElements.define("custom-element",null)}catch(vt){const t=window.customElements.define;window.customElements.define=(e,i,r)=>{try{t.bind(window.customElements)(e,i,r)}catch(t){console.warn(e,i,r,t)}}}class lt{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}const ct=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)}
56
+ /**
57
+ * @license
58
+ * Copyright 2021 Google LLC
59
+ * SPDX-License-Identifier: BSD-3-Clause
60
+ */;class pt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return s(o,this.constructor.elementStyles),o}}}(Y)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),M`${t.map((t=>M`<style>${t}</style>`))} ${this.getTemplate()}`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}
61
+ /**
62
+ * @license
63
+ * Copyright 2017 Google LLC
64
+ * SPDX-License-Identifier: BSD-3-Clause
65
+ */const dt=1,ht=2,ft=t=>(...e)=>({_$litDirective$:t,values:e});class ut{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
66
+ /**
67
+ * @license
68
+ * Copyright 2017 Google LLC
69
+ * SPDX-License-Identifier: BSD-3-Clause
70
+ */class vt extends ut{constructor(t){if(super(t),this.it=F,t.type!==ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===F||null==t)return this.vt=void 0,this.it=t;if(t===R)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}var mt,yt,gt;vt.directiveName="unsafeHTML",vt.resultType=1;const bt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(gt=null===(yt=null===(mt=window.safari)||void 0===mt?void 0:mt.pushNotification)||void 0===yt?void 0:yt.toString())&&void 0!==gt?gt:""),wt=ft(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,r;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const o=t.element.classList;this.st.forEach((t=>{t in e||(o.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(r=this.et)||void 0===r?void 0:r.has(t))||(i?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return R}});
71
+ /**
72
+ * @license
73
+ * Copyright 2018 Google LLC
74
+ * SPDX-License-Identifier: BSD-3-Clause
75
+ */
76
+ /*! *****************************************************************************
77
+ Copyright (c) Microsoft Corporation.
78
+
79
+ Permission to use, copy, modify, and/or distribute this software for any
80
+ purpose with or without fee is hereby granted.
81
+
82
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
83
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
84
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
85
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
86
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
87
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
88
+ PERFORMANCE OF THIS SOFTWARE.
89
+ ***************************************************************************** */
90
+ var xt=function(t,e){return xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},xt(t,e)};var kt=function(){return kt=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},kt.apply(this,arguments)};function St(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}function zt(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
91
+ /**
92
+ * @license
93
+ * Copyright 2018 Google Inc.
94
+ *
95
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
96
+ * of this software and associated documentation files (the "Software"), to deal
97
+ * in the Software without restriction, including without limitation the rights
98
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
+ * copies of the Software, and to permit persons to whom the Software is
100
+ * furnished to do so, subject to the following conditions:
101
+ *
102
+ * The above copyright notice and this permission notice shall be included in
103
+ * all copies or substantial portions of the Software.
104
+ *
105
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
106
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
107
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
108
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
109
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
111
+ * THE SOFTWARE.
112
+ */
113
+ /**
114
+ * @license
115
+ * Copyright 2018 Google LLC
116
+ * SPDX-License-Identifier: Apache-2.0
117
+ */
118
+ const $t=()=>{},Ot={get passive(){return!1}};document.addEventListener("x",$t,Ot),document.removeEventListener("x",$t);
119
+ /**
120
+ * @license
121
+ * Copyright 2018 Google LLC
122
+ * SPDX-License-Identifier: Apache-2.0
123
+ */
124
+ class At extends Y{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
125
+ /**
126
+ * @license
127
+ * Copyright 2016 Google Inc.
128
+ *
129
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
130
+ * of this software and associated documentation files (the "Software"), to deal
131
+ * in the Software without restriction, including without limitation the rights
132
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
133
+ * copies of the Software, and to permit persons to whom the Software is
134
+ * furnished to do so, subject to the following conditions:
135
+ *
136
+ * The above copyright notice and this permission notice shall be included in
137
+ * all copies or substantial portions of the Software.
138
+ *
139
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
140
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
141
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
142
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
143
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
144
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
145
+ * THE SOFTWARE.
146
+ */var Tt=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Et={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},jt={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ct={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
147
+ /**
148
+ * @license
149
+ * Copyright 2016 Google Inc.
150
+ *
151
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
152
+ * of this software and associated documentation files (the "Software"), to deal
153
+ * in the Software without restriction, including without limitation the rights
154
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
155
+ * copies of the Software, and to permit persons to whom the Software is
156
+ * furnished to do so, subject to the following conditions:
157
+ *
158
+ * The above copyright notice and this permission notice shall be included in
159
+ * all copies or substantial portions of the Software.
160
+ *
161
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
162
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
163
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
164
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
165
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
166
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
167
+ * THE SOFTWARE.
168
+ */
169
+ /**
170
+ * @license
171
+ * Copyright 2016 Google Inc.
172
+ *
173
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
174
+ * of this software and associated documentation files (the "Software"), to deal
175
+ * in the Software without restriction, including without limitation the rights
176
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
177
+ * copies of the Software, and to permit persons to whom the Software is
178
+ * furnished to do so, subject to the following conditions:
179
+ *
180
+ * The above copyright notice and this permission notice shall be included in
181
+ * all copies or substantial portions of the Software.
182
+ *
183
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
184
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
185
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
186
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
187
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
188
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
189
+ * THE SOFTWARE.
190
+ */
191
+ var _t=["touchstart","pointerdown","mousedown","keydown"],Mt=["touchend","pointerup","mouseup","contextmenu"],Rt=[],Ft=function(t){function e(i){var r=t.call(this,kt(kt({},e.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Et},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return jt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ct},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,o=r.ROOT,n=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(n),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=zt(_t),o=r.next();!o.done;o=r.next()){var n=o.value;this.adapter.registerInteractionHandler(n,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=zt(Mt),o=r.next();!o.done;o=r.next()){var n=o.value;this.adapter.registerDocumentInteractionHandler(n,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=zt(_t),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=zt(Mt),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&Rt.length>0&&Rt.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(Rt.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Rt=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,o=i.VAR_FG_TRANSLATE_END,n=e.cssClasses,s=n.FG_DEACTIVATION,a=n.FG_ACTIVATION,l=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",p="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),h=d.startPoint,f=d.endPoint;c=h.x+"px, "+h.y+"px",p=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(r,c),this.adapter.updateCssVariable(o,p),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(s),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),l)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,o,n=e.x,s=e.y,a=n+i.left,l=s+i.top;if("touchstart"===t.type){var c=t;r=c.changedTouches[0].pageX-a,o=c.changedTouches[0].pageY-l}else{var p=t;r=p.pageX-a,o=p.pageY-l}return{x:r,y:o}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:t={x:t.x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,o=r.hasDeactivationUXRun,n=r.isActivated;(o||!n)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),Ct.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=kt({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,o=t.VAR_TOP,n=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(n,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(Tt),It=Ft;
192
+ /**
193
+ * @license
194
+ * Copyright 2018 Google LLC
195
+ * SPDX-License-Identifier: BSD-3-Clause
196
+ */
197
+ const Bt=ft(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const r=t[i];return null==r?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?i.setProperty(t,r):i[t]=r)}return R}});
198
+ /**
199
+ * @license
200
+ * Copyright 2018 Google LLC
201
+ * SPDX-License-Identifier: Apache-2.0
202
+ */class Ht extends At{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=It}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return M`<div class="mdc-ripple-surface mdc-ripple-upgraded ${wt(i)}" style="${Bt({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}St([nt(".mdc-ripple-surface")],Ht.prototype,"mdcRoot",void 0),St([it({type:Boolean})],Ht.prototype,"primary",void 0),St([it({type:Boolean})],Ht.prototype,"accent",void 0),St([it({type:Boolean})],Ht.prototype,"unbounded",void 0),St([it({type:Boolean})],Ht.prototype,"disabled",void 0),St([it({type:Boolean})],Ht.prototype,"activated",void 0),St([it({type:Boolean})],Ht.prototype,"selected",void 0),St([it({type:Boolean})],Ht.prototype,"internalUseStateLayerCustomProperties",void 0),St([rt()],Ht.prototype,"hovering",void 0),St([rt()],Ht.prototype,"bgFocused",void 0),St([rt()],Ht.prototype,"fgActivation",void 0),St([rt()],Ht.prototype,"fgDeactivation",void 0),St([rt()],Ht.prototype,"fgScale",void 0),St([rt()],Ht.prototype,"fgSize",void 0),St([rt()],Ht.prototype,"translateStart",void 0),St([rt()],Ht.prototype,"translateEnd",void 0),St([rt()],Ht.prototype,"leftPos",void 0),St([rt()],Ht.prototype,"topPos",void 0);
203
+ /**
204
+ * @license
205
+ * Copyright 2021 Google LLC
206
+ * SPDX-LIcense-Identifier: Apache-2.0
207
+ */
208
+ const Dt=n`.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::after,.mdc-ripple-surface--primary::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--primary--activated::after,.mdc-ripple-surface--primary--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--primary--selected::after,.mdc-ripple-surface--primary--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::after,.mdc-ripple-surface--accent::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--accent--activated::after,.mdc-ripple-surface--accent--activated::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--accent--selected::after,.mdc-ripple-surface--accent--selected::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::after,.mdc-ripple-surface--internal-use-state-layer-custom-properties::before{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color,#000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-state-layer-opacity,.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
209
+ /**
210
+ * @license
211
+ * Copyright 2018 Google LLC
212
+ * SPDX-License-Identifier: Apache-2.0
213
+ */;let Ut=class extends Ht{};Ut.styles=[Dt],Ut=St([tt("mwc-ripple")],Ut);
214
+ /**
215
+ * @license
216
+ * Copyright 2020 Google LLC
217
+ * SPDX-License-Identifier: Apache-2.0
218
+ */
219
+ class Nt{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}var Lt=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};let Pt=class extends pt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return n`:host{display:contents;--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-content, #000));--mdc-ripple-press-opacity:var(--ft-opacity-color-content-on-surface-pressed, 0.1);--mdc-ripple-hover-opacity:var(--ft-opacity-color-content-on-surface-hover, 0.04);--mdc-ripple-focus-opacity:var(--ft-opacity-color-content-on-surface-focused, 0.12);--mdc-ripple-selected-opacity:var(--ft-opacity-color-content-on-surface-selected, 0.08);--mdc-ripple-activated-opacity:var(--ft-opacity-color-content-on-surface-dragged, 0.08)}mwc-ripple.ft-ripple--secondary{--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-secondary, #FFCC80))}mwc-ripple.ft-ripple--primary{--mdc-ripple-color:var(--ft-ripple-color, var(--ft-color-primary, #2196F3))}`}getTemplate(){return M`<mwc-ripple class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}" ?unbounded="${this.unbounded}" ?activated="${this.activated}" ?selected="${this.selected}" ?disabled="${this.disabled}"></mwc-ripple>`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Nt((async()=>this.mwcRipple)),i=e=>i=>{window.addEventListener(e,t.endPress,{once:!0}),t.startPress(i)},r=i("mouseup"),o=i("touchend"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",n),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",n),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Pt.elementDefinitions={"mwc-ripple":Ut},Lt([it({type:Boolean})],Pt.prototype,"primary",void 0),Lt([it({type:Boolean})],Pt.prototype,"secondary",void 0),Lt([it({type:Boolean})],Pt.prototype,"unbounded",void 0),Lt([it({type:Boolean})],Pt.prototype,"activated",void 0),Lt([it({type:Boolean})],Pt.prototype,"selected",void 0),Lt([it({type:Boolean})],Pt.prototype,"disabled",void 0),Lt([nt("mwc-ripple")],Pt.prototype,"mwcRipple",void 0),Pt=Lt([ct("ft-ripple")],Pt);
220
+ /**
221
+ * @license
222
+ * Copyright 2020 Google LLC
223
+ * SPDX-License-Identifier: BSD-3-Clause
224
+ */
225
+ const Vt=t=>({_$litStatic$:t}),qt=new Map,Gt=(t=>(e,...i)=>{var r;const o=i.length;let n,s;const a=[],l=[];let c,p=0,d=!1;for(;p<o;){for(c=e[p];p<o&&void 0!==(s=i[p],n=null===(r=s)||void 0===r?void 0:r._$litStatic$);)c+=n+e[++p],d=!0;l.push(s),a.push(c),p++}if(p===o&&a.push(e[o]),d){const t=a.join("$$lit$$");void 0===(e=qt.get(t))&&(a.raw=a,qt.set(t,e=a)),i=l}return t(e,...i)})(M);var Wt,Zt=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Wt||(Wt={}));const Jt=n`
226
+ .ft-typography--title {
227
+ font-family: var(--ft-typography-title-font-family, var(--ft-typography-font-family, var(--ft-title-font, Ubuntu))), system-ui, sans-serif;
228
+ font-size: var(--ft-typography-title-font-size, var(--ft-typography-font-size, 20px));
229
+ font-weight: var(--ft-typography-title-font-weight, var(--ft-typography-font-weight, normal));
230
+ letter-spacing: var(--ft-typography-title-letter-spacing, var(--ft-typography-letter-spacing, 0.15px));
231
+ line-height: var(--ft-typography-title-line-height, var(--ft-typography-line-height, 24px));
232
+ text-transform: var(--ft-typography-title-text-transform, var(--ft-typography-text-transform, inherit));
233
+ }
234
+ `,Kt=n`
235
+ .ft-typography--title-dense {
236
+ font-family: var(--ft-typography-title-dense-font-family, var(--ft-typography-font-family, var(--ft-title-font, Ubuntu))), system-ui, sans-serif;
237
+ font-size: var(--ft-typography-title-dense-font-size, var(--ft-typography-font-size, 14px));
238
+ font-weight: var(--ft-typography-title-dense-font-weight, var(--ft-typography-font-weight, normal));
239
+ letter-spacing: var(--ft-typography-title-dense-letter-spacing, var(--ft-typography-letter-spacing, 0.105px));
240
+ line-height: var(--ft-typography-title-dense-line-height, var(--ft-typography-line-height, 24px));
241
+ text-transform: var(--ft-typography-title-dense-text-transform, var(--ft-typography-text-transform, inherit));
242
+ }
243
+ `,Xt=n`
244
+ .ft-typography--subtitle1 {
245
+ font-family: var(--ft-typography-subtitle1-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
246
+ font-size: var(--ft-typography-subtitle1-font-size, var(--ft-typography-font-size, 16px));
247
+ font-weight: var(--ft-typography-subtitle1-font-weight, var(--ft-typography-font-weight, 600));
248
+ letter-spacing: var(--ft-typography-subtitle1-letter-spacing, var(--ft-typography-letter-spacing, 0.144px));
249
+ line-height: var(--ft-typography-subtitle1-line-height, var(--ft-typography-line-height, 24px));
250
+ text-transform: var(--ft-typography-subtitle1-text-transform, var(--ft-typography-text-transform, inherit));
251
+ }
252
+ `,Yt=n`
253
+ .ft-typography--subtitle2 {
254
+ font-family: var(--ft-typography-subtitle2-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
255
+ font-size: var(--ft-typography-subtitle2-font-size, var(--ft-typography-font-size, 14px));
256
+ font-weight: var(--ft-typography-subtitle2-font-weight, var(--ft-typography-font-weight, normal));
257
+ letter-spacing: var(--ft-typography-subtitle2-letter-spacing, var(--ft-typography-letter-spacing, 0.098px));
258
+ line-height: var(--ft-typography-subtitle2-line-height, var(--ft-typography-line-height, 24px));
259
+ text-transform: var(--ft-typography-subtitle2-text-transform, var(--ft-typography-text-transform, inherit));
260
+ }
261
+
262
+ `,Qt=n`
263
+ .ft-typography--body1 {
264
+ font-family: var(--ft-typography-body1-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
265
+ font-size: var(--ft-typography-body1-font-size, var(--ft-typography-font-size, 16px));
266
+ font-weight: var(--ft-typography-body1-font-weight, var(--ft-typography-font-weight, normal));
267
+ letter-spacing: var(--ft-typography-body1-letter-spacing, var(--ft-typography-letter-spacing, 0.496px));
268
+ line-height: var(--ft-typography-body1-line-height, var(--ft-typography-line-height, 24px));
269
+ text-transform: var(--ft-typography-body1-text-transform, var(--ft-typography-text-transform, inherit));
270
+ }
271
+ `,te=n`
272
+ .ft-typography--body2 {
273
+ font-family: var(--ft-typography-body2-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
274
+ font-size: var(--ft-typography-body2-font-size, var(--ft-typography-font-size, 14px));
275
+ font-weight: var(--ft-typography-body2-font-weight, var(--ft-typography-font-weight, normal));
276
+ letter-spacing: var(--ft-typography-body2-letter-spacing, var(--ft-typography-letter-spacing, 0.252px));
277
+ line-height: var(--ft-typography-body2-line-height, var(--ft-typography-line-height, 20px));
278
+ text-transform: var(--ft-typography-body2-text-transform, var(--ft-typography-text-transform, inherit));
279
+ }
280
+ `,ee=n`
281
+ .ft-typography--caption {
282
+ font-family: var(--ft-typography-caption-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
283
+ font-size: var(--ft-typography-caption-font-size, var(--ft-typography-font-size, 12px));
284
+ font-weight: var(--ft-typography-caption-font-weight, var(--ft-typography-font-weight, normal));
285
+ letter-spacing: var(--ft-typography-caption-letter-spacing, var(--ft-typography-letter-spacing, 0.396px));
286
+ line-height: var(--ft-typography-caption-line-height, var(--ft-typography-line-height, 16px));
287
+ text-transform: var(--ft-typography-caption-text-transform, var(--ft-typography-text-transform, inherit));
288
+ }
289
+ `,ie=n`
290
+ .ft-typography--breadcrumb {
291
+ font-family: var(--ft-typography-breadcrumb-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
292
+ font-size: var(--ft-typography-breadcrumb-font-size, var(--ft-typography-font-size, 10px));
293
+ font-weight: var(--ft-typography-breadcrumb-font-weight, var(--ft-typography-font-weight, normal));
294
+ letter-spacing: var(--ft-typography-breadcrumb-letter-spacing, var(--ft-typography-letter-spacing, 0.33px));
295
+ line-height: var(--ft-typography-breadcrumb-line-height, var(--ft-typography-line-height, 16px));
296
+ text-transform: var(--ft-typography-breadcrumb-text-transform, var(--ft-typography-text-transform, inherit));
297
+ }
298
+ `,re=n`
299
+ .ft-typography--overline {
300
+ font-family: var(--ft-typography-overline-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
301
+ font-size: var(--ft-typography-overline-font-size, var(--ft-typography-font-size, 10px));
302
+ font-weight: var(--ft-typography-overline-font-weight, var(--ft-typography-font-weight, normal));
303
+ letter-spacing: var(--ft-typography-overline-letter-spacing, var(--ft-typography-letter-spacing, 1.5px));
304
+ line-height: var(--ft-typography-overline-line-height, var(--ft-typography-line-height, 16px));
305
+ text-transform: var(--ft-typography-overline-text-transform, var(--ft-typography-text-transform, uppercase));
306
+ }
307
+ `,oe=n`
308
+ .ft-typography--button {
309
+ font-family: var(--ft-typography-button-font-family, var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans'))), system-ui, sans-serif;
310
+ font-size: var(--ft-typography-button-font-size, var(--ft-typography-font-size, 14px));
311
+ font-weight: var(--ft-typography-button-font-weight, var(--ft-typography-font-weight, 600));
312
+ letter-spacing: var(--ft-typography-button-letter-spacing, var(--ft-typography-letter-spacing, 1.246px));
313
+ line-height: var(--ft-typography-button-line-height, var(--ft-typography-line-height, 16px));
314
+ text-transform: var(--ft-typography-button-text-transform, var(--ft-typography-text-transform, uppercase));
315
+ }
316
+ `;let ne=class extends pt{constructor(){super(...arguments),this.variant=Wt.body1}getStyles(){return[Jt,Kt,Xt,Yt,Qt,te,ee,ie,re,oe]}getTemplate(){return this.element?Gt`
317
+ <${Vt(this.element)}
318
+ class="ft-typography ft-typography--${this.variant}">
319
+ <slot></slot>
320
+ </${Vt(this.element)}>
321
+ `:Gt`
322
+ <slot class="ft-typography ft-typography--${this.variant}"></slot>
323
+ `}};Zt([it()],ne.prototype,"element",void 0),Zt([it()],ne.prototype,"variant",void 0),ne=Zt([ct("ft-typography")],ne);
324
+ /**
325
+ * @license
326
+ * Copyright 2021 Google LLC
327
+ * SPDX-LIcense-Identifier: Apache-2.0
328
+ */
329
+ const se=n`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
330
+ /**
331
+ * @license
332
+ * Copyright 2018 Google LLC
333
+ * SPDX-License-Identifier: Apache-2.0
334
+ */;let ae=class extends Y{render(){return M`<span><slot></slot></span>`}};ae.styles=[se],ae=St([tt("mwc-icon")],ae);var le=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};let ce=class extends pt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new lt,this.revealDebouncer=new lt}getStyles(){return n`.ft-tooltip--container{display:block;position:relative}.ft-tooltip--inline{display:inline-block;max-width:100%}.ft-tooltip{position:absolute;box-sizing:border-box;overflow:hidden;width:max-content;max-width:150px;text-align:center;padding:var(--ft-tooltip-distance,4px);z-index:var(--ft-tooltip-z-index,1)}.ft-tooltip--content{padding:4px 8px;border-radius:var(--ft-border-radius-S,4px);background-color:var(--ft-tooltip-background-color,#666);color:var(--ft-tooltip-color,#fff);top:-500px;left:-500px;position:relative;word-break:break-word}`}getTemplate(){return M`<div part="container" class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}" @mouseenter="${this.onHover}" @mouseleave="${this.onOut}" @focusin="${this.onHover}" @focusout="${this.onOut}" @touchstart="${this.onTouch}"><div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden="${!this.visible}"><div part="tooltip-content" class="ft-tooltip--content"><ft-typography variant="caption">${this.text}</ft-typography></div></div><slot></slot></div>`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,r=(e.width-this.tooltip.clientWidth)/2,o=this.tooltip.style;switch(this.position){case"top":o.top=-this.tooltip.clientHeight+"px",o.left=r+"px";break;case"bottom":o.top=e.height+"px",o.left=r+"px";break;case"left":o.top=i+"px",o.left=-this.tooltip.clientWidth+"px";break;case"right":o.top=i+"px",o.left=e.width+"px"}o.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}};ce.elementDefinitions={"ft-typography":ne},le([it()],ce.prototype,"text",void 0),le([it({type:Boolean})],ce.prototype,"manual",void 0),le([it({type:Boolean})],ce.prototype,"inline",void 0),le([it({type:Number})],ce.prototype,"delay",void 0),le([it()],ce.prototype,"position",void 0),le([
335
+ /**
336
+ * @license
337
+ * Copyright 2017 Google LLC
338
+ * SPDX-License-Identifier: BSD-3-Clause
339
+ */
340
+ function(t,e,i){let r,o=t;return"object"==typeof t?(o=t.slot,r=t):r={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return ot({descriptor:r=>({get(){var r;const o="slot"+(e?`[name=${e}]`:":not([name])"),n=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(o),s=null!=n?at(n,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:o,flatten:e,selector:i}):ot({descriptor:t=>({get(){var t,e;const i="slot"+(o?`[name=${o}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(r))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],ce.prototype,"slotNodes",void 0),le([nt(".ft-tooltip--container")],ce.prototype,"container",void 0),le([nt("slot")],ce.prototype,"target",void 0),le([nt(".ft-tooltip")],ce.prototype,"tooltip",void 0),le([nt(".ft-tooltip--content")],ce.prototype,"tooltipContent",void 0),le([rt()],ce.prototype,"visible",void 0),ce=le([ct("ft-tooltip")],ce);var pe=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};let de=class extends pt{getStyles(){return n`:host{line-height:0}.ft-loader{display:inline-block;position:relative;width:var(--ft-loader-size,80px);height:var(--ft-loader-size,80px)}.ft-loader div{position:absolute;top:37.5%;width:25%;height:25%;border-radius:50%;background:var(--ft-loader-color,var(--ft-color-primary,#2196f3));animation-timing-function:cubic-bezier(0,1,1,0)}.ft-loader div:nth-child(1){left:2.5%;animation:appear .6s infinite}.ft-loader div:nth-child(2){left:2.5%;animation:move .6s infinite}.ft-loader div:nth-child(3){left:37.5%;animation:move .6s infinite}.ft-loader div:nth-child(4){left:72.5%;animation:disappear .6s infinite}@keyframes appear{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes disappear{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes move{0%{transform:translate(0,0)}100%{transform:translate(calc(.35 * var(--ft-loader-size,80px)),0)}}`}getTemplate(){return M`<div class="ft-loader"><div></div><div></div><div></div><div></div></div>`}};de=pe([ct("ft-loader")],de);var he=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};let fe=class extends pt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}getStyles(){return n`:host{display:inline-block;max-width:100%}button{box-shadow:0 0 0 transparent;border:0 solid transparent;text-shadow:0 0 0 transparent}button:hover{box-shadow:0 0 0 transparent;border:0 solid transparent;text-shadow:0 0 0 transparent}button:active{outline:0;border:none}button:focus{outline:0}.ft-button{position:relative;display:flex;justify-content:center;align-items:center;width:100%;overflow:hidden;box-sizing:border-box;border:none;--ft-button-internal-font-size:var(--ft-typography-button-font-size, 14px);--ft-button-internal-line-height:var(--ft-typography-button-line-height, calc(var(--ft-button-internal-font-size) + 2px));--ft-button-internal-color:var(--ft-button-color, var(--ft-color-primary, #2196F3));--mdc-icon-size:var(--ft-button-icon-size, 24px);--ft-button-internal-vertical-padding:6px;--ft-button-internal-horizontal-padding:8px;--ft-ripple-color:var(--ft-button-ripple-color, var(--ft-button-internal-color));--ft-button-internal-content-height:max(var(--ft-button-internal-line-height), var(--mdc-icon-size));border-radius:var(--ft-button-border-radius,var(--ft-border-radius-L,12px));padding:var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);background-color:var(--ft-button-background-color,var(--ft-color-surface,#fff));color:var(--ft-button-internal-color);-webkit-mask-image:radial-gradient(white,#000)}.ft-button:not([disabled]):hover{cursor:pointer}.ft-button--dense{--ft-button-internal-vertical-padding:2px;--ft-button-internal-horizontal-padding:4px;border-radius:var(--ft-button-border-radius,var(--ft-border-radius-M,8px))}.ft-button--round{border-radius:calc(var(--ft-button-internal-content-height)/ 2 + var(--ft-button-internal-vertical-padding))}.ft-button[disabled]{filter:grayscale(1);opacity:var(--ft-color-opacity-disabled,.38)}.ft-button.ft-button--primary{background-color:var(--ft-button-background-color,var(--ft-color-primary,#2196f3));--ft-button-internal-color:var(--ft-button-color, var(--ft-color-on-primary, #FFFFFF))}.ft-button.ft-button--outlined{border:1px solid var(--ft-button-internal-color);padding:calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px)}.ft-button:focus{outline:0}.ft-button--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;margin:0 var(--ft-button-internal-horizontal-padding);--ft-typography-button-line-height:var(--ft-button-internal-content-height)}.ft-button--safari-fix .ft-button--label{margin-right:0}.ft-button--safari-fix .ft-button--label:after{content:"\\0000a0";display:inline-block;width:0}.ft-button--label[hidden]{display:none}mwc-icon{flex-shrink:0;width:var(--mdc-icon-size)}.ft-button--label[hidden]+mwc-icon{margin:0 calc(var(--ft-button-internal-horizontal-padding) * -1);padding:0 var(--ft-button-internal-vertical-padding)}.ft-button:not(.ft-button--trailing-icon) ft-loader,.ft-button:not(.ft-button--trailing-icon) mwc-icon{order:-1}ft-loader{--ft-loader-size:var(--ft-button-icon-size, 24px);--ft-loader-color:var(--ft-button-internal-color)}`}getTemplate(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":bt};return this.addTooltip(M`<button class="${wt(t)}" aria-label="${this.getLabel()}" ?disabled="${this.isDisabled()}"><ft-ripple ?disabled="${this.isDisabled()}"></ft-ripple><ft-typography variant="button" class="ft-button--label" ?hidden="${!this.hasTextContent()}"><slot @slotchange="${this.onSlotchange}"></slot></ft-typography>${this.resolveIcon()}</button>`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:M`<ft-tooltip text="${this.getLabel()}" position="${this.tooltipPosition}">${t}</ft-tooltip>`}resolveIcon(){return this.loading?M`<ft-loader></ft-loader>`:this.icon?M`<mwc-icon>${this.icon}</mwc-icon>`:F}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};fe.elementDefinitions={"ft-ripple":Pt,"ft-tooltip":ce,"ft-typography":ne,"mwc-icon":ae,"ft-loader":de},he([it({type:Boolean})],fe.prototype,"primary",void 0),he([it({type:Boolean})],fe.prototype,"outlined",void 0),he([it({type:Boolean})],fe.prototype,"disabled",void 0),he([it({type:Boolean})],fe.prototype,"dense",void 0),he([it({type:Boolean})],fe.prototype,"round",void 0),he([it({type:String})],fe.prototype,"label",void 0),he([it({type:String})],fe.prototype,"icon",void 0),he([it({type:Boolean})],fe.prototype,"trailingIcon",void 0),he([it({type:Boolean})],fe.prototype,"loading",void 0),he([it({type:String})],fe.prototype,"tooltipPosition",void 0),he([nt(".ft-button")],fe.prototype,"button",void 0),he([nt(".ft-button--label slot")],fe.prototype,"slottedContent",void 0),fe=he([ct("ft-button")],fe);var ue=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class ve extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}t.FtSnapScroll=class extends pt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new lt(200),this.updateScrollDebouncer=new lt(100)}getStyles(){return n`.ft-snap-scroll{box-sizing:border-box;position:relative;display:flex;--ft-snap-scroll-transparent-color:transparent}.ft-snap-scroll.ft-snap-scroll--safari-fix{--ft-snap-scroll-transparent-color:rgba(255, 255, 255, 0)}.ft-snap-scroll,.ft-snap-scroll--content{overflow:hidden}.ft-snap-scroll--limit-size,.ft-snap-scroll--limit-size .ft-snap-scroll--content{width:100%;height:100%}.ft-snap-scroll--content{flex-grow:1;flex-shrink:1;box-sizing:border-box;scroll-snap-align:start;display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:var(--ft-snap-scroll-gap,0)}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar{display:none}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content{-ms-overflow-style:none;scrollbar-width:none}.ft-snap-scroll--content::slotted(*){flex-shrink:0;flex-grow:1;max-height:100%;max-width:100%}.ft-snap-scroll--horizontal,.ft-snap-scroll--horizontal .ft-snap-scroll--content{width:100%}.ft-snap-scroll--vertical,.ft-snap-scroll--vertical .ft-snap-scroll--content{height:100%}.ft-snap-scroll--horizontal .ft-snap-scroll--content{flex-direction:row;overflow-x:auto}.ft-snap-scroll--vertical .ft-snap-scroll--content{flex-direction:column;overflow-y:auto}.ft-snap-scroll--next,.ft-snap-scroll--previous{position:absolute;display:flex;z-index:var(--ft-snap-scroll-buttons-z-index,1);opacity:1;transition:background-color .5s ease-in-out,opacity .5s ease-in-out,z-index .5s ease-in-out;--ft-button-background-color:transparent;--ft-button-color:var(--ft-snap-scroll-buttons-color, var(--ft-color-primary, #2196F3))}.ft-snap-scroll--next[hidden],.ft-snap-scroll--previous[hidden]{z-index:-1;opacity:0}.ft-snap-scroll--horizontal .ft-snap-scroll--previous{top:0;left:-1px;bottom:0;background:linear-gradient(to right,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--previous{top:-1px;left:0;right:0;background:linear-gradient(to bottom,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next{top:0;right:-1px;bottom:0;background:linear-gradient(to left,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--next{left:0;right:0;bottom:-1px;background:linear-gradient(to top,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,.ft-snap-scroll--vertical .ft-snap-scroll--next:hover,.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover{background-color:var(--ft-color-surface,#fff)}`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}getTemplate(){const t=wt({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":bt}),e=this.controls&&this.withScroll;return M`<div part="container" class="${t}"><ft-button class="ft-snap-scroll--previous" part="controls" primary icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}" ?hidden="${!e||this.startReached}" ?disabled="${!e||this.startReached}" @click="${this.previous}"></ft-button><slot class="ft-snap-scroll--content" part="content" @slotchange="${this.onSlotChange}"></slot><ft-button class="ft-snap-scroll--next" part="controls" primary icon="${this.horizontal?"arrow_forward_ios":"expand_more"}" ?hidden="${!e||this.endReached}" ?disabled="${!e||this.endReached}" @click="${this.next}"></ft-button></div>`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new ve(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}},t.FtSnapScroll.elementDefinitions={"ft-button":fe},ue([it({type:Boolean})],t.FtSnapScroll.prototype,"horizontal",void 0),ue([it({type:Boolean})],t.FtSnapScroll.prototype,"hideScrollbar",void 0),ue([it({type:Boolean})],t.FtSnapScroll.prototype,"controls",void 0),ue([it({type:Boolean})],t.FtSnapScroll.prototype,"limitSize",void 0),ue([rt()],t.FtSnapScroll.prototype,"elements",void 0),ue([rt()],t.FtSnapScroll.prototype,"currentElement",void 0),ue([rt()],t.FtSnapScroll.prototype,"withScroll",void 0),ue([rt()],t.FtSnapScroll.prototype,"startReached",void 0),ue([rt()],t.FtSnapScroll.prototype,"endReached",void 0),ue([nt(".ft-snap-scroll--content")],t.FtSnapScroll.prototype,"contentSlot",void 0),t.FtSnapScroll=ue([ct("ft-snap-scroll")],t.FtSnapScroll),t.CurrentElementChange=ve,Object.defineProperty(t,"t",{value:!0})}({});
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@fluid-topics/ft-snap-scroll",
3
+ "version": "0.0.88",
4
+ "description": "Vertical or horizontal container with snap scrolling.",
5
+ "keywords": [
6
+ "Lit"
7
+ ],
8
+ "author": "Fluid Topics <devtopics@antidot.net>",
9
+ "license": "ISC",
10
+ "main": "build/ft-snap-scroll.js",
11
+ "web": "build/ft-snap-scroll.min.js",
12
+ "typings": "build/ft-snap-scroll",
13
+ "files": [
14
+ "build/*.ts",
15
+ "build/*.js"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
+ },
21
+ "dependencies": {
22
+ "@fluid-topics/ft-button": "^0.0.88",
23
+ "@fluid-topics/ft-wc-utils": "^0.0.88",
24
+ "lit": "^2.0.2"
25
+ },
26
+ "gitHead": "220e53dba55dfa1de1560abbc30067555f72198c"
27
+ }