@m3e/dialog 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19,33 +19,30 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
19
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
-
25
-
26
- function __decorate(decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- 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;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- }
32
-
33
- function __classPrivateFieldGet(receiver, state, kind, f) {
34
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
35
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
36
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
37
- }
38
-
39
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
40
- if (kind === "m") throw new TypeError("Private method is not writable");
41
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
42
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
43
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
44
- }
45
-
46
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
47
- var e = new Error(message);
48
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
+
25
+ function __decorate(decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ d;
29
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);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;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ }
32
+ function __classPrivateFieldGet(receiver, state, kind, f) {
33
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
34
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
35
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
36
+ }
37
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
38
+ if (kind === "m") throw new TypeError("Private method is not writable");
39
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
40
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
41
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
42
+ }
43
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
44
+ var e = new Error(message);
45
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
49
46
  };
50
47
 
51
48
  /**
@@ -53,45 +50,408 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
53
50
  * Copyright 2017 Google LLC
54
51
  * SPDX-License-Identifier: BSD-3-Clause
55
52
  */
56
- const t$2=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
53
+ const t$2 = t => (e, o) => {
54
+ void 0 !== o ? o.addInitializer(() => {
55
+ customElements.define(t, e);
56
+ }) : customElements.define(t, e);
57
+ };
57
58
 
58
59
  /**
59
60
  * @license
60
61
  * Copyright 2019 Google LLC
61
62
  * SPDX-License-Identifier: BSD-3-Clause
62
63
  */
63
- const t$1=globalThis,e$4=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1=Symbol(),o$4=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$4.set(s,t));}return t}toString(){return this.cssText}};const r$4=t=>new n$3("string"==typeof t?t:t+"",void 0,s$1),S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$4(e)})(t):t;
64
+ const t$1 = globalThis,
65
+ e$4 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
66
+ s$1 = Symbol(),
67
+ o$4 = new WeakMap();
68
+ let n$3 = class n {
69
+ constructor(t, e, o) {
70
+ if (this._$cssResult$ = true, o !== s$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
71
+ this.cssText = t, this.t = e;
72
+ }
73
+ get styleSheet() {
74
+ let t = this.o;
75
+ const s = this.t;
76
+ if (e$4 && void 0 === t) {
77
+ const e = void 0 !== s && 1 === s.length;
78
+ e && (t = o$4.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$4.set(s, t));
79
+ }
80
+ return t;
81
+ }
82
+ toString() {
83
+ return this.cssText;
84
+ }
85
+ };
86
+ const r$4 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$1),
87
+ S$1 = (s, o) => {
88
+ if (e$4) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
89
+ const o = document.createElement("style"),
90
+ n = t$1.litNonce;
91
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
92
+ }
93
+ },
94
+ c$2 = e$4 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
95
+ let e = "";
96
+ for (const s of t.cssRules) e += s.cssText;
97
+ return r$4(e);
98
+ })(t) : t;
64
99
 
65
100
  /**
66
101
  * @license
67
102
  * Copyright 2017 Google LLC
68
103
  * SPDX-License-Identifier: BSD-3-Clause
69
- */const{is:i$1,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$3,getOwnPropertySymbols:o$3,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){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$1=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$3(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d$1("elementProperties")]=new Map,y[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y}),(a$1.reactiveElementVersions??=[]).push("2.1.1");
104
+ */
105
+ const {
106
+ is: i$1,
107
+ defineProperty: e$3,
108
+ getOwnPropertyDescriptor: h$1,
109
+ getOwnPropertyNames: r$3,
110
+ getOwnPropertySymbols: o$3,
111
+ getPrototypeOf: n$2
112
+ } = Object,
113
+ a$1 = globalThis,
114
+ c$1 = a$1.trustedTypes,
115
+ l$1 = c$1 ? c$1.emptyScript : "",
116
+ p$1 = a$1.reactiveElementPolyfillSupport,
117
+ d$1 = (t, s) => t,
118
+ u$1 = {
119
+ toAttribute(t, s) {
120
+ switch (s) {
121
+ case Boolean:
122
+ t = t ? l$1 : null;
123
+ break;
124
+ case Object:
125
+ case Array:
126
+ t = null == t ? t : JSON.stringify(t);
127
+ }
128
+ return t;
129
+ },
130
+ fromAttribute(t, s) {
131
+ let i = t;
132
+ switch (s) {
133
+ case Boolean:
134
+ i = null !== t;
135
+ break;
136
+ case Number:
137
+ i = null === t ? null : Number(t);
138
+ break;
139
+ case Object:
140
+ case Array:
141
+ try {
142
+ i = JSON.parse(t);
143
+ } catch (t) {
144
+ i = null;
145
+ }
146
+ }
147
+ return i;
148
+ }
149
+ },
150
+ f$1 = (t, s) => !i$1(t, s),
151
+ b = {
152
+ attribute: true,
153
+ type: String,
154
+ converter: u$1,
155
+ reflect: false,
156
+ useDefault: false,
157
+ hasChanged: f$1
158
+ };
159
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
160
+ class y extends HTMLElement {
161
+ static addInitializer(t) {
162
+ this._$Ei(), (this.l ??= []).push(t);
163
+ }
164
+ static get observedAttributes() {
165
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
166
+ }
167
+ static createProperty(t, s = b) {
168
+ if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
169
+ const i = Symbol(),
170
+ h = this.getPropertyDescriptor(t, i, s);
171
+ void 0 !== h && e$3(this.prototype, t, h);
172
+ }
173
+ }
174
+ static getPropertyDescriptor(t, s, i) {
175
+ const {
176
+ get: e,
177
+ set: r
178
+ } = h$1(this.prototype, t) ?? {
179
+ get() {
180
+ return this[s];
181
+ },
182
+ set(t) {
183
+ this[s] = t;
184
+ }
185
+ };
186
+ return {
187
+ get: e,
188
+ set(s) {
189
+ const h = e?.call(this);
190
+ r?.call(this, s), this.requestUpdate(t, h, i);
191
+ },
192
+ configurable: true,
193
+ enumerable: true
194
+ };
195
+ }
196
+ static getPropertyOptions(t) {
197
+ return this.elementProperties.get(t) ?? b;
198
+ }
199
+ static _$Ei() {
200
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
201
+ const t = n$2(this);
202
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
203
+ }
204
+ static finalize() {
205
+ if (this.hasOwnProperty(d$1("finalized"))) return;
206
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
207
+ const t = this.properties,
208
+ s = [...r$3(t), ...o$3(t)];
209
+ for (const i of s) this.createProperty(i, t[i]);
210
+ }
211
+ const t = this[Symbol.metadata];
212
+ if (null !== t) {
213
+ const s = litPropertyMetadata.get(t);
214
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
215
+ }
216
+ this._$Eh = new Map();
217
+ for (const [t, s] of this.elementProperties) {
218
+ const i = this._$Eu(t, s);
219
+ void 0 !== i && this._$Eh.set(i, t);
220
+ }
221
+ this.elementStyles = this.finalizeStyles(this.styles);
222
+ }
223
+ static finalizeStyles(s) {
224
+ const i = [];
225
+ if (Array.isArray(s)) {
226
+ const e = new Set(s.flat(1 / 0).reverse());
227
+ for (const s of e) i.unshift(c$2(s));
228
+ } else void 0 !== s && i.push(c$2(s));
229
+ return i;
230
+ }
231
+ static _$Eu(t, s) {
232
+ const i = s.attribute;
233
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
234
+ }
235
+ constructor() {
236
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
237
+ }
238
+ _$Ev() {
239
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
240
+ }
241
+ addController(t) {
242
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
243
+ }
244
+ removeController(t) {
245
+ this._$EO?.delete(t);
246
+ }
247
+ _$E_() {
248
+ const t = new Map(),
249
+ s = this.constructor.elementProperties;
250
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
251
+ t.size > 0 && (this._$Ep = t);
252
+ }
253
+ createRenderRoot() {
254
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
255
+ return S$1(t, this.constructor.elementStyles), t;
256
+ }
257
+ connectedCallback() {
258
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
259
+ }
260
+ enableUpdating(t) {}
261
+ disconnectedCallback() {
262
+ this._$EO?.forEach(t => t.hostDisconnected?.());
263
+ }
264
+ attributeChangedCallback(t, s, i) {
265
+ this._$AK(t, i);
266
+ }
267
+ _$ET(t, s) {
268
+ const i = this.constructor.elementProperties.get(t),
269
+ e = this.constructor._$Eu(t, i);
270
+ if (void 0 !== e && true === i.reflect) {
271
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
272
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
273
+ }
274
+ }
275
+ _$AK(t, s) {
276
+ const i = this.constructor,
277
+ e = i._$Eh.get(t);
278
+ if (void 0 !== e && this._$Em !== e) {
279
+ const t = i.getPropertyOptions(e),
280
+ h = "function" == typeof t.converter ? {
281
+ fromAttribute: t.converter
282
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
283
+ this._$Em = e;
284
+ const r = h.fromAttribute(s, t.type);
285
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
286
+ }
287
+ }
288
+ requestUpdate(t, s, i) {
289
+ if (void 0 !== t) {
290
+ const e = this.constructor,
291
+ h = this[t];
292
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
293
+ this.C(t, s, i);
294
+ }
295
+ false === this.isUpdatePending && (this._$ES = this._$EP());
296
+ }
297
+ C(t, s, {
298
+ useDefault: i,
299
+ reflect: e,
300
+ wrapped: h
301
+ }, r) {
302
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
303
+ }
304
+ async _$EP() {
305
+ this.isUpdatePending = true;
306
+ try {
307
+ await this._$ES;
308
+ } catch (t) {
309
+ Promise.reject(t);
310
+ }
311
+ const t = this.scheduleUpdate();
312
+ return null != t && (await t), !this.isUpdatePending;
313
+ }
314
+ scheduleUpdate() {
315
+ return this.performUpdate();
316
+ }
317
+ performUpdate() {
318
+ if (!this.isUpdatePending) return;
319
+ if (!this.hasUpdated) {
320
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
321
+ for (const [t, s] of this._$Ep) this[t] = s;
322
+ this._$Ep = void 0;
323
+ }
324
+ const t = this.constructor.elementProperties;
325
+ if (t.size > 0) for (const [s, i] of t) {
326
+ const {
327
+ wrapped: t
328
+ } = i,
329
+ e = this[s];
330
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
331
+ }
332
+ }
333
+ let t = false;
334
+ const s = this._$AL;
335
+ try {
336
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
337
+ } catch (s) {
338
+ throw t = false, this._$EM(), s;
339
+ }
340
+ t && this._$AE(s);
341
+ }
342
+ willUpdate(t) {}
343
+ _$AE(t) {
344
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
345
+ }
346
+ _$EM() {
347
+ this._$AL = new Map(), this.isUpdatePending = false;
348
+ }
349
+ get updateComplete() {
350
+ return this.getUpdateComplete();
351
+ }
352
+ getUpdateComplete() {
353
+ return this._$ES;
354
+ }
355
+ shouldUpdate(t) {
356
+ return true;
357
+ }
358
+ update(t) {
359
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
360
+ }
361
+ updated(t) {}
362
+ firstUpdated(t) {}
363
+ }
364
+ y.elementStyles = [], y.shadowRootOptions = {
365
+ mode: "open"
366
+ }, y[d$1("elementProperties")] = new Map(), y[d$1("finalized")] = new Map(), p$1?.({
367
+ ReactiveElement: y
368
+ }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
70
369
 
71
370
  /**
72
371
  * @license
73
372
  * Copyright 2017 Google LLC
74
373
  * SPDX-License-Identifier: BSD-3-Clause
75
- */const o$2={attribute:true,type:String,converter:u$1,reflect:false,hasChanged:f$1},r$2=(t=o$2,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n$1(t){return (e,o)=>"object"==typeof o?r$2(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
374
+ */
375
+ const o$2 = {
376
+ attribute: true,
377
+ type: String,
378
+ converter: u$1,
379
+ reflect: false,
380
+ hasChanged: f$1
381
+ },
382
+ r$2 = (t = o$2, e, r) => {
383
+ const {
384
+ kind: n,
385
+ metadata: i
386
+ } = r;
387
+ let s = globalThis.litPropertyMetadata.get(i);
388
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
389
+ const {
390
+ name: o
391
+ } = r;
392
+ return {
393
+ set(r) {
394
+ const n = e.get.call(this);
395
+ e.set.call(this, r), this.requestUpdate(o, n, t);
396
+ },
397
+ init(e) {
398
+ return void 0 !== e && this.C(o, void 0, t, e), e;
399
+ }
400
+ };
401
+ }
402
+ if ("setter" === n) {
403
+ const {
404
+ name: o
405
+ } = r;
406
+ return function (r) {
407
+ const n = this[o];
408
+ e.call(this, r), this.requestUpdate(o, n, t);
409
+ };
410
+ }
411
+ throw Error("Unsupported decorator location: " + n);
412
+ };
413
+ function n$1(t) {
414
+ return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
415
+ const r = e.hasOwnProperty(o);
416
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
417
+ })(t, e, o);
418
+ }
76
419
 
77
420
  /**
78
421
  * @license
79
422
  * Copyright 2017 Google LLC
80
423
  * SPDX-License-Identifier: BSD-3-Clause
81
- */function r$1(r){return n$1({...r,state:true,attribute:false})}
424
+ */
425
+ function r$1(r) {
426
+ return n$1({
427
+ ...r,
428
+ state: true,
429
+ attribute: false
430
+ });
431
+ }
82
432
 
83
433
  /**
84
434
  * @license
85
435
  * Copyright 2017 Google LLC
86
436
  * SPDX-License-Identifier: BSD-3-Clause
87
437
  */
88
- const e$2=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
438
+ const e$2 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
89
439
 
90
440
  /**
91
441
  * @license
92
442
  * Copyright 2017 Google LLC
93
443
  * SPDX-License-Identifier: BSD-3-Clause
94
- */function e$1(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$2(n,s,{get(){return o(this)}})}}
444
+ */
445
+ function e$1(e, r) {
446
+ return (n, s, i) => {
447
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
448
+ return e$2(n, s, {
449
+ get() {
450
+ return o(this);
451
+ }
452
+ });
453
+ };
454
+ }
95
455
 
96
456
  var _M3eDialogActionElement_clickHandler;
97
457
  /**
@@ -101,61 +461,341 @@ var _M3eDialogActionElement_clickHandler;
101
461
  * @attr return-value - The value to return from the dialog.
102
462
  */
103
463
  let M3eDialogActionElement = class M3eDialogActionElement extends AttachInternals(LitElement) {
104
- constructor() {
105
- super(...arguments);
106
- /**
107
- * The value to return from the dialog.
108
- * @default ""
109
- */
110
- this.returnValue = "";
111
- /** @private */
112
- _M3eDialogActionElement_clickHandler.set(this, (e) => {
113
- if (!e.defaultPrevented) {
114
- this.closest("m3e-dialog")?.hide(this.returnValue);
115
- }
116
- });
117
- }
118
- /** @inheritdoc */
119
- connectedCallback() {
120
- super.connectedCallback();
121
- this.parentElement?.addEventListener("click", __classPrivateFieldGet(this, _M3eDialogActionElement_clickHandler, "f"));
122
- }
123
- /** @inheritdoc */
124
- disconnectedCallback() {
125
- super.disconnectedCallback();
126
- this.parentElement?.removeEventListener("click", __classPrivateFieldGet(this, _M3eDialogActionElement_clickHandler, "f"));
127
- }
128
- /** @inheritdoc */
129
- render() {
130
- return html `<slot></slot>`;
131
- }
464
+ constructor() {
465
+ super(...arguments);
466
+ /**
467
+ * The value to return from the dialog.
468
+ * @default ""
469
+ */
470
+ this.returnValue = "";
471
+ /** @private */
472
+ _M3eDialogActionElement_clickHandler.set(this, e => {
473
+ if (!e.defaultPrevented) {
474
+ this.closest("m3e-dialog")?.hide(this.returnValue);
475
+ }
476
+ });
477
+ }
478
+ /** @inheritdoc */
479
+ connectedCallback() {
480
+ super.connectedCallback();
481
+ this.parentElement?.addEventListener("click", __classPrivateFieldGet(this, _M3eDialogActionElement_clickHandler, "f"));
482
+ }
483
+ /** @inheritdoc */
484
+ disconnectedCallback() {
485
+ super.disconnectedCallback();
486
+ this.parentElement?.removeEventListener("click", __classPrivateFieldGet(this, _M3eDialogActionElement_clickHandler, "f"));
487
+ }
488
+ /** @inheritdoc */
489
+ render() {
490
+ return html`<slot></slot>`;
491
+ }
132
492
  };
133
493
  _M3eDialogActionElement_clickHandler = new WeakMap();
134
494
  /** The styles of the element. */
135
- M3eDialogActionElement.styles = css `
136
- :host {
137
- display: contents;
138
- }
139
- `;
140
- __decorate([
141
- n$1({ attribute: "return-value" })
142
- ], M3eDialogActionElement.prototype, "returnValue", void 0);
143
- M3eDialogActionElement = __decorate([
144
- t$2("m3e-dialog-action")
145
- ], M3eDialogActionElement);
495
+ M3eDialogActionElement.styles = css`:host { display: contents; }`;
496
+ __decorate([n$1({
497
+ attribute: "return-value"
498
+ })], M3eDialogActionElement.prototype, "returnValue", void 0);
499
+ M3eDialogActionElement = __decorate([t$2("m3e-dialog-action")], M3eDialogActionElement);
146
500
 
147
501
  /**
148
502
  * @license
149
503
  * Copyright 2017 Google LLC
150
504
  * SPDX-License-Identifier: BSD-3-Clause
151
505
  */
152
- const t=globalThis,i=t.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$1="?"+h,n=`<${o$1}>`,r=document,l=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$1)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push("3.3.1");
506
+ const t = globalThis,
507
+ i = t.trustedTypes,
508
+ s = i ? i.createPolicy("lit-html", {
509
+ createHTML: t => t
510
+ }) : void 0,
511
+ e = "$lit$",
512
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
513
+ o$1 = "?" + h,
514
+ n = `<${o$1}>`,
515
+ r = document,
516
+ l = () => r.createComment(""),
517
+ c = t => null === t || "object" != typeof t && "function" != typeof t,
518
+ a = Array.isArray,
519
+ u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
520
+ d = "[ \t\n\f\r]",
521
+ f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
522
+ v = /-->/g,
523
+ _ = />/g,
524
+ m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
525
+ p = /'/g,
526
+ g = /"/g,
527
+ $ = /^(?:script|style|textarea|title)$/i,
528
+ T = Symbol.for("lit-noChange"),
529
+ E = Symbol.for("lit-nothing"),
530
+ A = new WeakMap(),
531
+ C = r.createTreeWalker(r, 129);
532
+ function P(t, i) {
533
+ if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
534
+ return void 0 !== s ? s.createHTML(i) : i;
535
+ }
536
+ const V = (t, i) => {
537
+ const s = t.length - 1,
538
+ o = [];
539
+ let r,
540
+ l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
541
+ c = f;
542
+ for (let i = 0; i < s; i++) {
543
+ const s = t[i];
544
+ let a,
545
+ u,
546
+ d = -1,
547
+ y = 0;
548
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
549
+ const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
550
+ l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
551
+ }
552
+ return [P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), o];
553
+ };
554
+ class N {
555
+ constructor({
556
+ strings: t,
557
+ _$litType$: s
558
+ }, n) {
559
+ let r;
560
+ this.parts = [];
561
+ let c = 0,
562
+ a = 0;
563
+ const u = t.length - 1,
564
+ d = this.parts,
565
+ [f, v] = V(t, s);
566
+ if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
567
+ const t = this.el.content.firstChild;
568
+ t.replaceWith(...t.childNodes);
569
+ }
570
+ for (; null !== (r = C.nextNode()) && d.length < u;) {
571
+ if (1 === r.nodeType) {
572
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
573
+ const i = v[a++],
574
+ s = r.getAttribute(t).split(h),
575
+ e = /([.?@])?(.*)/.exec(i);
576
+ d.push({
577
+ type: 1,
578
+ index: c,
579
+ name: e[2],
580
+ strings: s,
581
+ ctor: "." === e[1] ? H : "?" === e[1] ? I : "@" === e[1] ? L : k
582
+ }), r.removeAttribute(t);
583
+ } else t.startsWith(h) && (d.push({
584
+ type: 6,
585
+ index: c
586
+ }), r.removeAttribute(t));
587
+ if ($.test(r.tagName)) {
588
+ const t = r.textContent.split(h),
589
+ s = t.length - 1;
590
+ if (s > 0) {
591
+ r.textContent = i ? i.emptyScript : "";
592
+ for (let i = 0; i < s; i++) r.append(t[i], l()), C.nextNode(), d.push({
593
+ type: 2,
594
+ index: ++c
595
+ });
596
+ r.append(t[s], l());
597
+ }
598
+ }
599
+ } else if (8 === r.nodeType) if (r.data === o$1) d.push({
600
+ type: 2,
601
+ index: c
602
+ });else {
603
+ let t = -1;
604
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
605
+ type: 7,
606
+ index: c
607
+ }), t += h.length - 1;
608
+ }
609
+ c++;
610
+ }
611
+ }
612
+ static createElement(t, i) {
613
+ const s = r.createElement("template");
614
+ return s.innerHTML = t, s;
615
+ }
616
+ }
617
+ function S(t, i, s = t, e) {
618
+ if (i === T) return i;
619
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
620
+ const o = c(i) ? void 0 : i._$litDirective$;
621
+ return h?.constructor !== o && (h?._$AO?.(false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
622
+ }
623
+ class M {
624
+ constructor(t, i) {
625
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
626
+ }
627
+ get parentNode() {
628
+ return this._$AM.parentNode;
629
+ }
630
+ get _$AU() {
631
+ return this._$AM._$AU;
632
+ }
633
+ u(t) {
634
+ const {
635
+ el: {
636
+ content: i
637
+ },
638
+ parts: s
639
+ } = this._$AD,
640
+ e = (t?.creationScope ?? r).importNode(i, true);
641
+ C.currentNode = e;
642
+ let h = C.nextNode(),
643
+ o = 0,
644
+ n = 0,
645
+ l = s[0];
646
+ for (; void 0 !== l;) {
647
+ if (o === l.index) {
648
+ let i;
649
+ 2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
650
+ }
651
+ o !== l?.index && (h = C.nextNode(), o++);
652
+ }
653
+ return C.currentNode = r, e;
654
+ }
655
+ p(t) {
656
+ let i = 0;
657
+ for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
658
+ }
659
+ }
660
+ class R {
661
+ get _$AU() {
662
+ return this._$AM?._$AU ?? this._$Cv;
663
+ }
664
+ constructor(t, i, s, e) {
665
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? true;
666
+ }
667
+ get parentNode() {
668
+ let t = this._$AA.parentNode;
669
+ const i = this._$AM;
670
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
671
+ }
672
+ get startNode() {
673
+ return this._$AA;
674
+ }
675
+ get endNode() {
676
+ return this._$AB;
677
+ }
678
+ _$AI(t, i = this) {
679
+ t = S(this, t, i), c(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
680
+ }
681
+ O(t) {
682
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
683
+ }
684
+ T(t) {
685
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
686
+ }
687
+ _(t) {
688
+ this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r.createTextNode(t)), this._$AH = t;
689
+ }
690
+ $(t) {
691
+ const {
692
+ values: i,
693
+ _$litType$: s
694
+ } = t,
695
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
696
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
697
+ const t = new M(e, this),
698
+ s = t.u(this.options);
699
+ t.p(i), this.T(s), this._$AH = t;
700
+ }
701
+ }
702
+ _$AC(t) {
703
+ let i = A.get(t.strings);
704
+ return void 0 === i && A.set(t.strings, i = new N(t)), i;
705
+ }
706
+ k(t) {
707
+ a(this._$AH) || (this._$AH = [], this._$AR());
708
+ const i = this._$AH;
709
+ let s,
710
+ e = 0;
711
+ for (const h of t) e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
712
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
713
+ }
714
+ _$AR(t = this._$AA.nextSibling, i) {
715
+ for (this._$AP?.(false, true, i); t !== this._$AB;) {
716
+ const i = t.nextSibling;
717
+ t.remove(), t = i;
718
+ }
719
+ }
720
+ setConnected(t) {
721
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
722
+ }
723
+ }
724
+ class k {
725
+ get tagName() {
726
+ return this.element.tagName;
727
+ }
728
+ get _$AU() {
729
+ return this._$AM._$AU;
730
+ }
731
+ constructor(t, i, s, e, h) {
732
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = E;
733
+ }
734
+ _$AI(t, i = this, s, e) {
735
+ const h = this.strings;
736
+ let o = false;
737
+ if (void 0 === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);else {
738
+ const e = t;
739
+ let n, r;
740
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = S(this, e[s + n], i, n), r === T && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === E ? t = E : t !== E && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
741
+ }
742
+ o && !e && this.j(t);
743
+ }
744
+ j(t) {
745
+ t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
746
+ }
747
+ }
748
+ class H extends k {
749
+ constructor() {
750
+ super(...arguments), this.type = 3;
751
+ }
752
+ j(t) {
753
+ this.element[this.name] = t === E ? void 0 : t;
754
+ }
755
+ }
756
+ class I extends k {
757
+ constructor() {
758
+ super(...arguments), this.type = 4;
759
+ }
760
+ j(t) {
761
+ this.element.toggleAttribute(this.name, !!t && t !== E);
762
+ }
763
+ }
764
+ class L extends k {
765
+ constructor(t, i, s, e, h) {
766
+ super(t, i, s, e, h), this.type = 5;
767
+ }
768
+ _$AI(t, i = this) {
769
+ if ((t = S(this, t, i, 0) ?? E) === T) return;
770
+ const s = this._$AH,
771
+ e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
772
+ h = t !== E && (s === E || e);
773
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
774
+ }
775
+ handleEvent(t) {
776
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
777
+ }
778
+ }
779
+ class z {
780
+ constructor(t, i, s) {
781
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
782
+ }
783
+ get _$AU() {
784
+ return this._$AM._$AU;
785
+ }
786
+ _$AI(t) {
787
+ S(this, t);
788
+ }
789
+ }
790
+ const j = t.litHtmlPolyfillSupport;
791
+ j?.(N, R), (t.litHtmlVersions ??= []).push("3.3.1");
153
792
 
154
793
  /**
155
794
  * @license
156
795
  * Copyright 2018 Google LLC
157
796
  * SPDX-License-Identifier: BSD-3-Clause
158
- */const o=o=>o??E;
797
+ */
798
+ const o = o => o ?? E;
159
799
 
160
800
  var _M3eDialogElement_instances, _M3eDialogElement_id, _M3eDialogElement_open, _M3eDialogElement_escapePressedWithoutCancel, _M3eDialogElement_renderCloseButton, _M3eDialogElement_handleClose, _M3eDialogElement_handleCancel, _M3eDialogElement_handleClick, _M3eDialogElement_handleKeyDown, _M3eDialogElement_handleActionsSlotChange;
161
801
  var M3eDialogElement_1;
@@ -221,358 +861,209 @@ var M3eDialogElement_1;
221
861
  * @cssprop --m3e-dialog-content-tracking - Letter spacing for the dialog content.
222
862
  */
223
863
  let M3eDialogElement = M3eDialogElement_1 = class M3eDialogElement extends EventAttribute(LitElement, "opening", "opened", "cancel", "closing", "closed") {
224
- constructor() {
225
- super(...arguments);
226
- _M3eDialogElement_instances.add(this);
227
- /** @private */ _M3eDialogElement_id.set(this, M3eDialogElement_1.__nextId++);
228
- /** @private */ _M3eDialogElement_open.set(this, false);
229
- /** @private */ _M3eDialogElement_escapePressedWithoutCancel.set(this, false);
230
- /** @private */ this._hasActions = false;
231
- /**
232
- * Whether the dialog is an alert.
233
- * @default false
234
- */
235
- this.alert = false;
236
- /**
237
- * Whether a button is presented that can be used to close the dialog.
238
- * @default false
239
- */
240
- this.dismissible = false;
241
- /**
242
- * Whether users cannot click the backdrop or press ESC to dismiss the dialog.
243
- * @default false
244
- */
245
- this.disableClose = false;
246
- /**
247
- * Whether to disable focus trapping, which keeps keyboard `Tab` navigation within the dialog.
248
- * @default false
249
- */
250
- this.noFocusTrap = false;
251
- /**
252
- * The accessible label given to the button used to dismiss the dialog.
253
- * @default "Close"
254
- */
255
- this.closeLabel = "Close";
256
- /**
257
- * The return value of the dialog.
258
- * @default ""
259
- */
260
- this.returnValue = "";
261
- }
864
+ constructor() {
865
+ super(...arguments);
866
+ _M3eDialogElement_instances.add(this);
867
+ /** @private */
868
+ _M3eDialogElement_id.set(this, M3eDialogElement_1.__nextId++);
869
+ /** @private */
870
+ _M3eDialogElement_open.set(this, false);
871
+ /** @private */
872
+ _M3eDialogElement_escapePressedWithoutCancel.set(this, false);
873
+ /** @private */
874
+ this._hasActions = false;
262
875
  /**
263
- * Whether the dialog is open.
876
+ * Whether the dialog is an alert.
264
877
  * @default false
265
878
  */
266
- get open() {
267
- return __classPrivateFieldGet(this, _M3eDialogElement_open, "f");
268
- }
269
- set open(value) {
270
- if (value === __classPrivateFieldGet(this, _M3eDialogElement_open, "f"))
271
- return;
272
- __classPrivateFieldSet(this, _M3eDialogElement_open, value, "f");
273
- if (__classPrivateFieldGet(this, _M3eDialogElement_open, "f")) {
274
- this.show();
275
- }
276
- else {
277
- this.hide();
278
- }
279
- }
879
+ this.alert = false;
280
880
  /**
281
- * Asynchronously opens the dialog.
282
- * @returns {Promise<void>} A `Promise` that resolves when the dialog is open.
881
+ * Whether a button is presented that can be used to close the dialog.
882
+ * @default false
283
883
  */
284
- async show() {
285
- await this.updateComplete;
286
- if (this._base.open) {
287
- return;
288
- }
289
- if (!this.dispatchEvent(new Event("opening", { cancelable: true }))) {
290
- this.open = false;
291
- return;
292
- }
293
- this._base.showModal();
294
- this._content.scrollTop = 0;
295
- const focusable = this.querySelector("[autofocus]");
296
- if (focusable) {
297
- if (!prefersReducedMotion()) {
298
- this._base.addEventListener("transitionend", () => focusable.focus(), {
299
- once: true,
300
- });
301
- }
302
- else {
303
- focusable.focus();
304
- }
305
- }
306
- this.dispatchEvent(new Event("opened"));
307
- }
884
+ this.dismissible = false;
308
885
  /**
309
- * Asynchronously closes the dialog.
310
- * @param {string} returnValue The value to return.
311
- * @returns {Promise<void>} A `Promise` that resolves when the dialog is closed.
886
+ * Whether users cannot click the backdrop or press ESC to dismiss the dialog.
887
+ * @default false
312
888
  */
313
- async hide(returnValue = this.returnValue) {
314
- if (!this.isConnected) {
315
- this.open = false;
316
- return;
317
- }
318
- await this.updateComplete;
319
- if (!this._base.open) {
320
- this.open = false;
321
- return;
322
- }
323
- const prevReturnValue = this.returnValue;
324
- this.returnValue = returnValue;
325
- if (!this.dispatchEvent(new Event("closing", { cancelable: true }))) {
326
- this.returnValue = prevReturnValue;
327
- return;
328
- }
329
- this.open = false;
330
- this._base.close(returnValue);
331
- this.dispatchEvent(new Event("closed"));
889
+ this.disableClose = false;
890
+ /**
891
+ * Whether to disable focus trapping, which keeps keyboard `Tab` navigation within the dialog.
892
+ * @default false
893
+ */
894
+ this.noFocusTrap = false;
895
+ /**
896
+ * The accessible label given to the button used to dismiss the dialog.
897
+ * @default "Close"
898
+ */
899
+ this.closeLabel = "Close";
900
+ /**
901
+ * The return value of the dialog.
902
+ * @default ""
903
+ */
904
+ this.returnValue = "";
905
+ }
906
+ /**
907
+ * Whether the dialog is open.
908
+ * @default false
909
+ */
910
+ get open() {
911
+ return __classPrivateFieldGet(this, _M3eDialogElement_open, "f");
912
+ }
913
+ set open(value) {
914
+ if (value === __classPrivateFieldGet(this, _M3eDialogElement_open, "f")) return;
915
+ __classPrivateFieldSet(this, _M3eDialogElement_open, value, "f");
916
+ if (__classPrivateFieldGet(this, _M3eDialogElement_open, "f")) {
917
+ this.show();
918
+ } else {
919
+ this.hide();
920
+ }
921
+ }
922
+ /**
923
+ * Asynchronously opens the dialog.
924
+ * @returns {Promise<void>} A `Promise` that resolves when the dialog is open.
925
+ */
926
+ async show() {
927
+ await this.updateComplete;
928
+ if (this._base.open) {
929
+ return;
930
+ }
931
+ if (!this.dispatchEvent(new Event("opening", {
932
+ cancelable: true
933
+ }))) {
934
+ this.open = false;
935
+ return;
332
936
  }
333
- /** @inheritdoc */
334
- render() {
335
- return html `<dialog
336
- class="base"
337
- role="${o(this.alert ? "alertdialog" : undefined)}"
338
- aria-labelledby="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header"
339
- .returnValue="${this.returnValue}"
340
- @close="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClose)}"
341
- @cancel="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleCancel)}"
342
- @click="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClick)}"
343
- @keydown="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleKeyDown)}"
344
- >
345
- <m3e-elevation level="3"></m3e-elevation>
346
- <m3e-focus-trap ?disabled="${this.noFocusTrap}">
347
- <div class="header">
348
- <slot name="header" id="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header"></slot>
349
- ${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_renderCloseButton).call(this)}
350
- </div>
351
- <m3e-scroll-container class="content" dividers="${this._hasActions ? "above-below" : "above"}">
352
- <slot></slot>
353
- </m3e-scroll-container>
354
- <slot name="actions" @slotchange="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleActionsSlotChange)}"></slot>
355
- </m3e-focus-trap>
356
- </dialog>`;
937
+ this._base.showModal();
938
+ this._content.scrollTop = 0;
939
+ const focusable = this.querySelector("[autofocus]");
940
+ if (focusable) {
941
+ if (!prefersReducedMotion()) {
942
+ this._base.addEventListener("transitionend", () => focusable.focus(), {
943
+ once: true
944
+ });
945
+ } else {
946
+ focusable.focus();
947
+ }
948
+ }
949
+ this.dispatchEvent(new Event("opened"));
950
+ }
951
+ /**
952
+ * Asynchronously closes the dialog.
953
+ * @param {string} returnValue The value to return.
954
+ * @returns {Promise<void>} A `Promise` that resolves when the dialog is closed.
955
+ */
956
+ async hide(returnValue = this.returnValue) {
957
+ if (!this.isConnected) {
958
+ this.open = false;
959
+ return;
960
+ }
961
+ await this.updateComplete;
962
+ if (!this._base.open) {
963
+ this.open = false;
964
+ return;
357
965
  }
966
+ const prevReturnValue = this.returnValue;
967
+ this.returnValue = returnValue;
968
+ if (!this.dispatchEvent(new Event("closing", {
969
+ cancelable: true
970
+ }))) {
971
+ this.returnValue = prevReturnValue;
972
+ return;
973
+ }
974
+ this.open = false;
975
+ this._base.close(returnValue);
976
+ this.dispatchEvent(new Event("closed"));
977
+ }
978
+ /** @inheritdoc */
979
+ render() {
980
+ return html`<dialog class="base" role="${o(this.alert ? "alertdialog" : undefined)}" aria-labelledby="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header" .returnvalue="${this.returnValue}" @close="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClose)}" @cancel="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleCancel)}" @click="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleClick)}" @keydown="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleKeyDown)}"><m3e-elevation level="3"></m3e-elevation><m3e-focus-trap ?disabled="${this.noFocusTrap}"><div class="header"><slot name="header" id="m3e-dialog-${__classPrivateFieldGet(this, _M3eDialogElement_id, "f")}-header"></slot>${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_renderCloseButton).call(this)}</div><m3e-scroll-container class="content" dividers="${this._hasActions ? "above-below" : "above"}"><slot></slot></m3e-scroll-container><slot name="actions" @slotchange="${__classPrivateFieldGet(this, _M3eDialogElement_instances, "m", _M3eDialogElement_handleActionsSlotChange)}"></slot></m3e-focus-trap></dialog>`;
981
+ }
358
982
  };
359
983
  _M3eDialogElement_id = new WeakMap();
360
984
  _M3eDialogElement_open = new WeakMap();
361
985
  _M3eDialogElement_escapePressedWithoutCancel = new WeakMap();
362
986
  _M3eDialogElement_instances = new WeakSet();
363
987
  _M3eDialogElement_renderCloseButton = function _M3eDialogElement_renderCloseButton() {
364
- return !this.dismissible
365
- ? nothing
366
- : html `<m3e-icon-button aria-label="${this.closeLabel}" class="close" @click="${this.hide}">
367
- <slot name="close-icon">
368
- <svg class="close-icon" viewBox="0 -960 960 960" fill="currentColor">
369
- <path
370
- d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"
371
- />
372
- </svg>
373
- </slot>
374
- </m3e-icon-button>`;
988
+ return !this.dismissible ? nothing : html`<m3e-icon-button aria-label="${this.closeLabel}" class="close" @click="${this.hide}"><slot name="close-icon"><svg class="close-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg></slot></m3e-icon-button>`;
375
989
  };
376
990
  _M3eDialogElement_handleClose = function _M3eDialogElement_handleClose() {
377
- if (!__classPrivateFieldGet(this, _M3eDialogElement_escapePressedWithoutCancel, "f")) {
378
- return;
379
- }
380
- __classPrivateFieldSet(this, _M3eDialogElement_escapePressedWithoutCancel, true, "f");
381
- this._base?.dispatchEvent(new Event("cancel", { cancelable: true }));
991
+ if (!__classPrivateFieldGet(this, _M3eDialogElement_escapePressedWithoutCancel, "f")) {
992
+ return;
993
+ }
994
+ __classPrivateFieldSet(this, _M3eDialogElement_escapePressedWithoutCancel, true, "f");
995
+ this._base?.dispatchEvent(new Event("cancel", {
996
+ cancelable: true
997
+ }));
382
998
  };
383
999
  _M3eDialogElement_handleCancel = function _M3eDialogElement_handleCancel(e) {
384
- if (e.target !== this._base)
385
- return;
386
- __classPrivateFieldSet(this, _M3eDialogElement_escapePressedWithoutCancel, false, "f");
387
- e.preventDefault();
388
- if (!this.dispatchEvent(new Event("cancel", { cancelable: true }))) {
389
- this.hide();
390
- }
1000
+ if (e.target !== this._base) return;
1001
+ __classPrivateFieldSet(this, _M3eDialogElement_escapePressedWithoutCancel, false, "f");
1002
+ e.preventDefault();
1003
+ if (!this.dispatchEvent(new Event("cancel", {
1004
+ cancelable: true
1005
+ }))) {
1006
+ this.hide();
1007
+ }
391
1008
  };
392
1009
  _M3eDialogElement_handleClick = function _M3eDialogElement_handleClick(e) {
393
- if (!this.disableClose && e.target === this._base) {
394
- this.hide();
395
- }
1010
+ if (!this.disableClose && e.target === this._base) {
1011
+ this.hide();
1012
+ }
396
1013
  };
397
1014
  _M3eDialogElement_handleKeyDown = function _M3eDialogElement_handleKeyDown(e) {
398
- if (e.key === "Escape" && !e.shiftKey && !e.ctrlKey) {
399
- e.preventDefault();
400
- if (!this.disableClose) {
401
- this.hide();
402
- }
1015
+ if (e.key === "Escape" && !e.shiftKey && !e.ctrlKey) {
1016
+ e.preventDefault();
1017
+ if (!this.disableClose) {
1018
+ this.hide();
403
1019
  }
1020
+ }
404
1021
  };
405
1022
  _M3eDialogElement_handleActionsSlotChange = function _M3eDialogElement_handleActionsSlotChange(e) {
406
- this._hasActions = e.target.assignedNodes({ flatten: true }).length > 0;
407
- this.classList.toggle("-has-actions", this._hasActions);
1023
+ this._hasActions = e.target.assignedNodes({
1024
+ flatten: true
1025
+ }).length > 0;
1026
+ this.classList.toggle("-has-actions", this._hasActions);
408
1027
  };
409
1028
  /** The styles of the element. */
410
- M3eDialogElement.styles = css `
411
- :host {
412
- display: contents;
413
- }
414
- .base {
415
- font: inherit;
416
- border: unset;
417
- outline: unset;
418
- padding: unset;
419
- display: flex;
420
- flex-direction: column;
421
- position: fixed;
422
- overflow: visible;
423
- border-radius: var(--m3e-dialog-shape, ${DesignToken.shape.corner.extraLarge});
424
- min-width: var(--m3e-dialog-min-width, 17.5rem);
425
- max-width: var(--m3e-dialog-max-width, 35rem);
426
- color: var(--m3e-dialog-color, ${DesignToken.color.onSurface});
427
- background-color: var(--m3e-dialog-container-color, ${DesignToken.color.surfaceContainerHigh});
428
- visibility: hidden;
429
- opacity: 0;
430
- transform-origin: top;
431
- transform: translateY(-3.125rem) scaleY(0.8);
432
- }
433
- .base::backdrop {
434
- background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) 0%, transparent);
435
- margin-right: -20px;
436
- }
437
- .base:not([open]) {
438
- visibility: hidden;
439
- opacity: 0;
440
- transform: translateY(-3.125rem) scaleY(0.8);
441
- transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized},
442
- transform ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized},
443
- overlay ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized} allow-discrete,
444
- visibility ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized} allow-discrete`)};
445
- }
446
- .base[open] {
447
- visibility: visible;
448
- opacity: 1;
449
- transform: translateY(0) scaleY(1);
450
- transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized},
451
- transform ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized},
452
- overlay ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized} allow-discrete,
453
- visibility ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized} allow-discrete`)};
454
- }
455
- .base:not([open])::backdrop {
456
- transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard},
457
- overlay ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard} allow-discrete,
458
- visibility ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard} allow-discrete`)};
459
- }
460
- .base[open]::backdrop {
461
- background-color: color-mix(
462
- in srgb,
463
- var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) var(--m3e-dialog-scrim-opacity, 32%),
464
- transparent
465
- );
466
- transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard},
467
- overlay ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard} allow-discrete,
468
- visibility ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard} allow-discrete`)};
469
- }
470
- @starting-style {
471
- .base[open] {
472
- opacity: 0;
473
- transform: translateY(-3.125rem) scaleY(0.8);
474
- }
475
- .base[open]::backdrop {
476
- background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) 0%, transparent);
477
- }
478
- }
479
- .header {
480
- flex: none;
481
- display: flex;
482
- align-items: center;
483
- padding: 1.5rem 1.5rem 1rem 1.5rem;
484
- background-color: var(--m3e-dialog-header-container-color, transparent);
485
- }
486
- ::slotted([slot="header"]) {
487
- margin: unset;
488
- flex: 1 1 auto;
489
- color: var(--m3e-dialog-header-color, inherit);
490
- font-size: var(--m3e-dialog-header-font-size, ${DesignToken.typescale.standard.headline.small.fontSize});
491
- font-weight: var(--m3e-dialog-header-font-weight, ${DesignToken.typescale.standard.headline.small.fontWeight});
492
- line-height: var(--m3e-dialog-header-line-height, ${DesignToken.typescale.standard.headline.small.lineHeight});
493
- letter-spacing: var(--m3e-dialog-header-tracking, ${DesignToken.typescale.standard.headline.small.tracking});
494
- }
495
- .content {
496
- padding-inline: 1.5rem;
497
- color: var(--m3e-dialog-content-color, ${DesignToken.color.onSurfaceVariant});
498
- font-size: var(--m3e-dialog-content-font-size, ${DesignToken.typescale.standard.body.medium.fontSize});
499
- font-weight: var(--m3e-dialog-content-font-weight, ${DesignToken.typescale.standard.body.medium.fontWeight});
500
- line-height: var(--m3e-dialog-content-line-height, ${DesignToken.typescale.standard.body.medium.lineHeight});
501
- letter-spacing: var(--m3e-dialog-content-tracking, ${DesignToken.typescale.standard.body.medium.tracking});
502
- }
503
- ::slotted([slot="actions"]) {
504
- flex: none;
505
- display: flex;
506
- align-items: center;
507
- min-height: 1.5rem;
508
- padding: 1.5rem;
509
- column-gap: 0.5rem;
510
- }
511
- ::slotted([slot="actions"][end]) {
512
- justify-content: flex-end;
513
- }
514
- :host(:not(.-has-actions)) .content {
515
- margin-bottom: 1.5rem;
516
- }
517
- .close {
518
- margin-left: 0.5rem;
519
- }
520
- ::slotted([slot="close-icon"]),
521
- .close-icon {
522
- width: 1em;
523
- font-size: var(--m3e-icon-button-icon-size, 1.5rem) !important;
524
- }
525
- @media (forced-colors: active) {
526
- .base:not([open])::backdrop,
527
- .base[open]::backdrop {
528
- transition: none;
529
- }
530
- .base {
531
- border-style: solid;
532
- border-width: 1px;
533
- border-color: CanvasText;
534
- }
535
- }
536
- @media (prefers-reduced-motion) {
537
- .base:not([open]),
538
- .base[open],
539
- .base:not([open])::backdrop,
540
- .base[open]::backdrop {
541
- transition: none;
542
- }
543
- }
544
- `;
545
- /** @private */ M3eDialogElement.__nextId = 0;
546
- __decorate([
547
- r$1()
548
- ], M3eDialogElement.prototype, "_hasActions", void 0);
549
- __decorate([
550
- e$1(".base")
551
- ], M3eDialogElement.prototype, "_base", void 0);
552
- __decorate([
553
- e$1(".content")
554
- ], M3eDialogElement.prototype, "_content", void 0);
555
- __decorate([
556
- n$1({ type: Boolean })
557
- ], M3eDialogElement.prototype, "alert", void 0);
558
- __decorate([
559
- n$1({ type: Boolean, reflect: true })
560
- ], M3eDialogElement.prototype, "open", null);
561
- __decorate([
562
- n$1({ type: Boolean })
563
- ], M3eDialogElement.prototype, "dismissible", void 0);
564
- __decorate([
565
- n$1({ attribute: "disable-close", type: Boolean })
566
- ], M3eDialogElement.prototype, "disableClose", void 0);
567
- __decorate([
568
- n$1({ attribute: "no-focus-trap", type: Boolean })
569
- ], M3eDialogElement.prototype, "noFocusTrap", void 0);
570
- __decorate([
571
- n$1({ attribute: "close-label" })
572
- ], M3eDialogElement.prototype, "closeLabel", void 0);
573
- M3eDialogElement = M3eDialogElement_1 = __decorate([
574
- t$2("m3e-dialog")
575
- ], M3eDialogElement);
1029
+ M3eDialogElement.styles = css`:host { display: contents; } .base { font: inherit; border: unset; outline: unset; padding: unset; display: flex; flex-direction: column; position: fixed; overflow: visible; border-radius: var(--m3e-dialog-shape, ${DesignToken.shape.corner.extraLarge}); min-width: var(--m3e-dialog-min-width, 17.5rem); max-width: var(--m3e-dialog-max-width, 35rem); color: var(--m3e-dialog-color, ${DesignToken.color.onSurface}); background-color: var(--m3e-dialog-container-color, ${DesignToken.color.surfaceContainerHigh}); visibility: hidden; opacity: 0; transform-origin: top; transform: translateY(-3.125rem) scaleY(0.8); } .base::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) 0%, transparent); margin-inline-end: -20px; } .base:not([open]) { visibility: hidden; opacity: 0; transform: translateY(-3.125rem) scaleY(0.8); transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized},
1030
+ transform ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized},
1031
+ overlay ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized} allow-discrete,
1032
+ visibility ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.emphasized} allow-discrete`)}; } .base[open] { visibility: visible; opacity: 1; transform: translateY(0) scaleY(1); transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized},
1033
+ transform ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized},
1034
+ overlay ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized} allow-discrete,
1035
+ visibility ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.emphasized} allow-discrete`)}; } .base:not([open])::backdrop { transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard},
1036
+ overlay ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard} allow-discrete,
1037
+ visibility ${DesignToken.motion.duration.short3} ${DesignToken.motion.easing.standard} allow-discrete`)}; } .base[open]::backdrop { background-color: color-mix( in srgb, var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) var(--m3e-dialog-scrim-opacity, 32%), transparent ); transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard},
1038
+ overlay ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard} allow-discrete,
1039
+ visibility ${DesignToken.motion.duration.long2} ${DesignToken.motion.easing.standard} allow-discrete`)}; } @starting-style { .base[open] { opacity: 0; transform: translateY(-3.125rem) scaleY(0.8); } .base[open]::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${DesignToken.color.scrim}) 0%, transparent); } } .header { flex: none; display: flex; align-items: center; padding: 1.5rem 1.5rem 1rem 1.5rem; background-color: var(--m3e-dialog-header-container-color, transparent); } ::slotted([slot="header"]) { margin: unset; flex: 1 1 auto; color: var(--m3e-dialog-header-color, inherit); font-size: var(--m3e-dialog-header-font-size, ${DesignToken.typescale.standard.headline.small.fontSize}); font-weight: var(--m3e-dialog-header-font-weight, ${DesignToken.typescale.standard.headline.small.fontWeight}); line-height: var(--m3e-dialog-header-line-height, ${DesignToken.typescale.standard.headline.small.lineHeight}); letter-spacing: var(--m3e-dialog-header-tracking, ${DesignToken.typescale.standard.headline.small.tracking}); } .content { padding-inline: 1.5rem; color: var(--m3e-dialog-content-color, ${DesignToken.color.onSurfaceVariant}); font-size: var(--m3e-dialog-content-font-size, ${DesignToken.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-dialog-content-font-weight, ${DesignToken.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-dialog-content-line-height, ${DesignToken.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-dialog-content-tracking, ${DesignToken.typescale.standard.body.medium.tracking}); } ::slotted([slot="actions"]) { flex: none; display: flex; align-items: center; min-height: 1.5rem; padding: 1.5rem; column-gap: 0.5rem; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } :host(:not(.-has-actions)) .content { margin-bottom: 1.5rem; } .close { margin-inline-start: 0.5rem; } ::slotted([slot="close-icon"]), .close-icon { width: 1em; font-size: var(--m3e-icon-button-icon-size, 1.5rem) !important; } @media (forced-colors: active) { .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } .base { border-style: solid; border-width: 1px; border-color: CanvasText; } } @media (prefers-reduced-motion) { .base:not([open]), .base[open], .base:not([open])::backdrop, .base[open]::backdrop { transition: none; } }`;
1040
+ /** @private */
1041
+ M3eDialogElement.__nextId = 0;
1042
+ __decorate([r$1()], M3eDialogElement.prototype, "_hasActions", void 0);
1043
+ __decorate([e$1(".base")], M3eDialogElement.prototype, "_base", void 0);
1044
+ __decorate([e$1(".content")], M3eDialogElement.prototype, "_content", void 0);
1045
+ __decorate([n$1({
1046
+ type: Boolean
1047
+ })], M3eDialogElement.prototype, "alert", void 0);
1048
+ __decorate([n$1({
1049
+ type: Boolean,
1050
+ reflect: true
1051
+ })], M3eDialogElement.prototype, "open", null);
1052
+ __decorate([n$1({
1053
+ type: Boolean
1054
+ })], M3eDialogElement.prototype, "dismissible", void 0);
1055
+ __decorate([n$1({
1056
+ attribute: "disable-close",
1057
+ type: Boolean
1058
+ })], M3eDialogElement.prototype, "disableClose", void 0);
1059
+ __decorate([n$1({
1060
+ attribute: "no-focus-trap",
1061
+ type: Boolean
1062
+ })], M3eDialogElement.prototype, "noFocusTrap", void 0);
1063
+ __decorate([n$1({
1064
+ attribute: "close-label"
1065
+ })], M3eDialogElement.prototype, "closeLabel", void 0);
1066
+ M3eDialogElement = M3eDialogElement_1 = __decorate([t$2("m3e-dialog")], M3eDialogElement);
576
1067
 
577
1068
  var _M3eDialogTriggerElement_clickHandler;
578
1069
  /**
@@ -580,46 +1071,40 @@ var _M3eDialogTriggerElement_clickHandler;
580
1071
  * @tag m3e-dialog-trigger
581
1072
  */
582
1073
  let M3eDialogTriggerElement = class M3eDialogTriggerElement extends HtmlFor(AttachInternals(LitElement)) {
583
- constructor() {
584
- super(...arguments);
585
- /** @private */
586
- _M3eDialogTriggerElement_clickHandler.set(this, (e) => {
587
- if (!e.defaultPrevented && this.control instanceof M3eDialogElement) {
588
- this.control.show();
589
- }
590
- });
591
- }
592
- /** @inheritdoc */
593
- connectedCallback() {
594
- super.connectedCallback();
595
- if (this.parentElement) {
596
- this.parentElement.addEventListener("click", __classPrivateFieldGet(this, _M3eDialogTriggerElement_clickHandler, "f"));
597
- this.parentElement.ariaHasPopup = "dialog";
598
- }
599
- }
600
- /** @inheritdoc */
601
- disconnectedCallback() {
602
- super.disconnectedCallback();
603
- if (this.parentElement) {
604
- this.parentElement.removeEventListener("click", __classPrivateFieldGet(this, _M3eDialogTriggerElement_clickHandler, "f"));
605
- this.parentElement.ariaHasPopup = null;
606
- }
1074
+ constructor() {
1075
+ super(...arguments);
1076
+ /** @private */
1077
+ _M3eDialogTriggerElement_clickHandler.set(this, e => {
1078
+ if (!e.defaultPrevented && this.control instanceof M3eDialogElement) {
1079
+ this.control.show();
1080
+ }
1081
+ });
1082
+ }
1083
+ /** @inheritdoc */
1084
+ connectedCallback() {
1085
+ super.connectedCallback();
1086
+ if (this.parentElement) {
1087
+ this.parentElement.addEventListener("click", __classPrivateFieldGet(this, _M3eDialogTriggerElement_clickHandler, "f"));
1088
+ this.parentElement.ariaHasPopup = "dialog";
607
1089
  }
608
- /** @inheritdoc */
609
- render() {
610
- return html `<slot></slot>`;
1090
+ }
1091
+ /** @inheritdoc */
1092
+ disconnectedCallback() {
1093
+ super.disconnectedCallback();
1094
+ if (this.parentElement) {
1095
+ this.parentElement.removeEventListener("click", __classPrivateFieldGet(this, _M3eDialogTriggerElement_clickHandler, "f"));
1096
+ this.parentElement.ariaHasPopup = null;
611
1097
  }
1098
+ }
1099
+ /** @inheritdoc */
1100
+ render() {
1101
+ return html`<slot></slot>`;
1102
+ }
612
1103
  };
613
1104
  _M3eDialogTriggerElement_clickHandler = new WeakMap();
614
1105
  /** The styles of the element. */
615
- M3eDialogTriggerElement.styles = css `
616
- :host {
617
- display: contents;
618
- }
619
- `;
620
- M3eDialogTriggerElement = __decorate([
621
- t$2("m3e-dialog-trigger")
622
- ], M3eDialogTriggerElement);
1106
+ M3eDialogTriggerElement.styles = css`:host { display: contents; }`;
1107
+ M3eDialogTriggerElement = __decorate([t$2("m3e-dialog-trigger")], M3eDialogTriggerElement);
623
1108
 
624
1109
  export { M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement };
625
1110
  //# sourceMappingURL=index.js.map