urnovl-web-components 0.0.129 → 0.0.130

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.
@@ -608,12 +608,12 @@ const UrDialog = class {
608
608
  this.closeOnOverlayClick = true;
609
609
  }
610
610
  componentDidLoad() {
611
- this.dialogElement = this.el.shadowRoot.querySelector(".my-dialog");
611
+ this.dialogElement = this.el.shadowRoot.querySelector(".inner-dialog");
612
612
  }
613
- openDialog() {
613
+ async openDialog() {
614
614
  this.dialogElement.open = true;
615
615
  }
616
- closeDialog() {
616
+ async closeDialog() {
617
617
  this.dialogElement.open = false;
618
618
  }
619
619
  handleConfirm() {
@@ -621,7 +621,7 @@ const UrDialog = class {
621
621
  this.closeDialog();
622
622
  }
623
623
  render() {
624
- return (index$1.h(index$1.Host, { key: '6fc0fdbb15e8953f3adce6938191f9f0547bd45c' }, index$1.h("mdui-dialog", { key: 'd64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "my-dialog" }, index$1.h("div", { key: 'c5a727dc01f279d4376740dcde9e6da495415446', class: "title" }, this.headline), index$1.h("div", { key: 'fb628321aa016da40ff28681d7670563ed871399', class: "description" }, this.description), index$1.h("div", { key: '5e6a4f32ed040251d4a580b5f031851d26e4ee5c', class: "actions" }, index$1.h("ur-button", { key: '25ead0f6c3914bb57a5758f76951ef4bd0fc96a6', onClick: () => this.handleConfirm() }, "Confirm"), index$1.h("ur-button", { key: '102723d0b778765b32de33c26e4b7c876997e6f4', onClick: () => this.closeDialog() }, "Cancel"))), index$1.h("ur-button", { key: '04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90', onClick: () => this.openDialog() }, "Open Dialog")));
624
+ return (index$1.h(index$1.Host, { key: 'b5c3f0ff29a99e329d9a076615f7f4056670f46c' }, index$1.h("mdui-dialog", { key: 'a358b6430c99e86f39602dfd0cc737d9b725520e', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "inner-dialog" }, index$1.h("div", { key: '3f508fce39fcfa00a05a2b59a61cf547b0466b29', class: "title" }, this.headline), index$1.h("div", { key: 'e34efaadc5ddd5669a473418f53a3a532d2ddd50', class: "description" }, this.description), index$1.h("div", { key: '97563974675c73ae2d273c24e262452002eb82a6', class: "actions" }, index$1.h("ur-button", { key: 'ec3e45a40117667f6149e2353d271f3ca186300a', onClick: () => this.handleConfirm() }, "Confirm"), index$1.h("ur-button", { key: 'c86582eb6834e16471386c7bc83a73579b277d70', onClick: () => this.closeDialog() }, "Cancel"))), index$1.h("ur-button", { key: '4f31529d61bbf8b9973bee58f101e9ee661624e1', onClick: () => this.openDialog() }, "Open Dialog")));
625
625
  }
626
626
  get el() { return index$1.getElement(this); }
627
627
  };
@@ -1586,7 +1586,7 @@ const UrSelect = class {
1586
1586
  this.selectedValue = this.value;
1587
1587
  }
1588
1588
  render() {
1589
- return (index$1.h(index$1.Host, { key: 'ed416c8053b6e0d32ad916cb99a8e933b4726879' }, index$1.h("mdui-select", { key: 'ad9f46e88ec5b520e288132b39d7bd48bac3a888', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (index$1.h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1589
+ return (index$1.h(index$1.Host, { key: 'b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d' }, index$1.h("mdui-select", { key: '7263e4611efb2823f0fa3fa739e87013e0e37781', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (index$1.h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1590
1590
  }
1591
1591
  static get watchers() { return {
1592
1592
  "value": ["valueChanged"]
@@ -1,6 +1,3 @@
1
1
  :host {
2
- display: block;
2
+ display: block;
3
3
  }
4
-
5
- :host mdui-checkbox {
6
- }
@@ -11,12 +11,12 @@ export class UrDialog {
11
11
  this.closeOnOverlayClick = true;
12
12
  }
13
13
  componentDidLoad() {
14
- this.dialogElement = this.el.shadowRoot.querySelector(".my-dialog");
14
+ this.dialogElement = this.el.shadowRoot.querySelector(".inner-dialog");
15
15
  }
16
- openDialog() {
16
+ async openDialog() {
17
17
  this.dialogElement.open = true;
18
18
  }
19
- closeDialog() {
19
+ async closeDialog() {
20
20
  this.dialogElement.open = false;
21
21
  }
22
22
  handleConfirm() {
@@ -24,7 +24,7 @@ export class UrDialog {
24
24
  this.closeDialog();
25
25
  }
26
26
  render() {
27
- return (h(Host, { key: '6fc0fdbb15e8953f3adce6938191f9f0547bd45c' }, h("mdui-dialog", { key: 'd64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "my-dialog" }, h("div", { key: 'c5a727dc01f279d4376740dcde9e6da495415446', class: "title" }, this.headline), h("div", { key: 'fb628321aa016da40ff28681d7670563ed871399', class: "description" }, this.description), h("div", { key: '5e6a4f32ed040251d4a580b5f031851d26e4ee5c', class: "actions" }, h("ur-button", { key: '25ead0f6c3914bb57a5758f76951ef4bd0fc96a6', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: '102723d0b778765b32de33c26e4b7c876997e6f4', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90', onClick: () => this.openDialog() }, "Open Dialog")));
27
+ return (h(Host, { key: 'b5c3f0ff29a99e329d9a076615f7f4056670f46c' }, h("mdui-dialog", { key: 'a358b6430c99e86f39602dfd0cc737d9b725520e', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "inner-dialog" }, h("div", { key: '3f508fce39fcfa00a05a2b59a61cf547b0466b29', class: "title" }, this.headline), h("div", { key: 'e34efaadc5ddd5669a473418f53a3a532d2ddd50', class: "description" }, this.description), h("div", { key: '97563974675c73ae2d273c24e262452002eb82a6', class: "actions" }, h("ur-button", { key: 'ec3e45a40117667f6149e2353d271f3ca186300a', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: 'c86582eb6834e16471386c7bc83a73579b277d70', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '4f31529d61bbf8b9973bee58f101e9ee661624e1', onClick: () => this.openDialog() }, "Open Dialog")));
28
28
  }
29
29
  static get is() { return "ur-dialog"; }
30
30
  static get encapsulation() { return "shadow"; }
@@ -192,7 +192,12 @@ export class UrDialog {
192
192
  "complexType": {
193
193
  "signature": "() => Promise<void>",
194
194
  "parameters": [],
195
- "references": {},
195
+ "references": {
196
+ "Promise": {
197
+ "location": "global",
198
+ "id": "global::Promise"
199
+ }
200
+ },
196
201
  "return": "Promise<void>"
197
202
  },
198
203
  "docs": {
@@ -204,7 +209,12 @@ export class UrDialog {
204
209
  "complexType": {
205
210
  "signature": "() => Promise<void>",
206
211
  "parameters": [],
207
- "references": {},
212
+ "references": {
213
+ "Promise": {
214
+ "location": "global",
215
+ "id": "global::Promise"
216
+ }
217
+ },
208
218
  "return": "Promise<void>"
209
219
  },
210
220
  "docs": {
@@ -46,7 +46,7 @@ export class UrSelect {
46
46
  this.selectedValue = this.value;
47
47
  }
48
48
  render() {
49
- return (h(Host, { key: 'ed416c8053b6e0d32ad916cb99a8e933b4726879' }, h("mdui-select", { key: 'ad9f46e88ec5b520e288132b39d7bd48bac3a888', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
49
+ return (h(Host, { key: 'b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d' }, h("mdui-select", { key: '7263e4611efb2823f0fa3fa739e87013e0e37781', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
50
50
  }
51
51
  static get is() { return "ur-select"; }
52
52
  static get encapsulation() { return "shadow"; }
@@ -607,12 +607,12 @@ const UrDialog$1 = /*@__PURE__*/ proxyCustomElement(class UrDialog extends H {
607
607
  this.closeOnOverlayClick = true;
608
608
  }
609
609
  componentDidLoad() {
610
- this.dialogElement = this.el.shadowRoot.querySelector(".my-dialog");
610
+ this.dialogElement = this.el.shadowRoot.querySelector(".inner-dialog");
611
611
  }
612
- openDialog() {
612
+ async openDialog() {
613
613
  this.dialogElement.open = true;
614
614
  }
615
- closeDialog() {
615
+ async closeDialog() {
616
616
  this.dialogElement.open = false;
617
617
  }
618
618
  handleConfirm() {
@@ -620,7 +620,7 @@ const UrDialog$1 = /*@__PURE__*/ proxyCustomElement(class UrDialog extends H {
620
620
  this.closeDialog();
621
621
  }
622
622
  render() {
623
- return (h(Host, { key: '6fc0fdbb15e8953f3adce6938191f9f0547bd45c' }, h("mdui-dialog", { key: 'd64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "my-dialog" }, h("div", { key: 'c5a727dc01f279d4376740dcde9e6da495415446', class: "title" }, this.headline), h("div", { key: 'fb628321aa016da40ff28681d7670563ed871399', class: "description" }, this.description), h("div", { key: '5e6a4f32ed040251d4a580b5f031851d26e4ee5c', class: "actions" }, h("ur-button", { key: '25ead0f6c3914bb57a5758f76951ef4bd0fc96a6', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: '102723d0b778765b32de33c26e4b7c876997e6f4', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90', onClick: () => this.openDialog() }, "Open Dialog")));
623
+ return (h(Host, { key: 'b5c3f0ff29a99e329d9a076615f7f4056670f46c' }, h("mdui-dialog", { key: 'a358b6430c99e86f39602dfd0cc737d9b725520e', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "inner-dialog" }, h("div", { key: '3f508fce39fcfa00a05a2b59a61cf547b0466b29', class: "title" }, this.headline), h("div", { key: 'e34efaadc5ddd5669a473418f53a3a532d2ddd50', class: "description" }, this.description), h("div", { key: '97563974675c73ae2d273c24e262452002eb82a6', class: "actions" }, h("ur-button", { key: 'ec3e45a40117667f6149e2353d271f3ca186300a', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: 'c86582eb6834e16471386c7bc83a73579b277d70', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '4f31529d61bbf8b9973bee58f101e9ee661624e1', onClick: () => this.openDialog() }, "Open Dialog")));
624
624
  }
625
625
  get el() { return this; }
626
626
  static get style() { return UrDialogStyle0; }
@@ -1574,7 +1574,7 @@ const UrSelect$1 = /*@__PURE__*/ proxyCustomElement(class UrSelect extends H {
1574
1574
  this.selectedValue = this.value;
1575
1575
  }
1576
1576
  render() {
1577
- return (h(Host, { key: 'ed416c8053b6e0d32ad916cb99a8e933b4726879' }, h("mdui-select", { key: 'ad9f46e88ec5b520e288132b39d7bd48bac3a888', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1577
+ return (h(Host, { key: 'b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d' }, h("mdui-select", { key: '7263e4611efb2823f0fa3fa739e87013e0e37781', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1578
1578
  }
1579
1579
  static get watchers() { return {
1580
1580
  "value": ["valueChanged"]
@@ -604,12 +604,12 @@ const UrDialog = class {
604
604
  this.closeOnOverlayClick = true;
605
605
  }
606
606
  componentDidLoad() {
607
- this.dialogElement = this.el.shadowRoot.querySelector(".my-dialog");
607
+ this.dialogElement = this.el.shadowRoot.querySelector(".inner-dialog");
608
608
  }
609
- openDialog() {
609
+ async openDialog() {
610
610
  this.dialogElement.open = true;
611
611
  }
612
- closeDialog() {
612
+ async closeDialog() {
613
613
  this.dialogElement.open = false;
614
614
  }
615
615
  handleConfirm() {
@@ -617,7 +617,7 @@ const UrDialog = class {
617
617
  this.closeDialog();
618
618
  }
619
619
  render() {
620
- return (h(Host, { key: '6fc0fdbb15e8953f3adce6938191f9f0547bd45c' }, h("mdui-dialog", { key: 'd64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "my-dialog" }, h("div", { key: 'c5a727dc01f279d4376740dcde9e6da495415446', class: "title" }, this.headline), h("div", { key: 'fb628321aa016da40ff28681d7670563ed871399', class: "description" }, this.description), h("div", { key: '5e6a4f32ed040251d4a580b5f031851d26e4ee5c', class: "actions" }, h("ur-button", { key: '25ead0f6c3914bb57a5758f76951ef4bd0fc96a6', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: '102723d0b778765b32de33c26e4b7c876997e6f4', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90', onClick: () => this.openDialog() }, "Open Dialog")));
620
+ return (h(Host, { key: 'b5c3f0ff29a99e329d9a076615f7f4056670f46c' }, h("mdui-dialog", { key: 'a358b6430c99e86f39602dfd0cc737d9b725520e', open: this.open, "close-on-overlay-click": this.closeOnOverlayClick, "close-on-esc": this.closeOnEsc, fullscreen: this.fullscreen, class: "inner-dialog" }, h("div", { key: '3f508fce39fcfa00a05a2b59a61cf547b0466b29', class: "title" }, this.headline), h("div", { key: 'e34efaadc5ddd5669a473418f53a3a532d2ddd50', class: "description" }, this.description), h("div", { key: '97563974675c73ae2d273c24e262452002eb82a6', class: "actions" }, h("ur-button", { key: 'ec3e45a40117667f6149e2353d271f3ca186300a', onClick: () => this.handleConfirm() }, "Confirm"), h("ur-button", { key: 'c86582eb6834e16471386c7bc83a73579b277d70', onClick: () => this.closeDialog() }, "Cancel"))), h("ur-button", { key: '4f31529d61bbf8b9973bee58f101e9ee661624e1', onClick: () => this.openDialog() }, "Open Dialog")));
621
621
  }
622
622
  get el() { return getElement(this); }
623
623
  };
@@ -1582,7 +1582,7 @@ const UrSelect = class {
1582
1582
  this.selectedValue = this.value;
1583
1583
  }
1584
1584
  render() {
1585
- return (h(Host, { key: 'ed416c8053b6e0d32ad916cb99a8e933b4726879' }, h("mdui-select", { key: 'ad9f46e88ec5b520e288132b39d7bd48bac3a888', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1585
+ return (h(Host, { key: 'b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d' }, h("mdui-select", { key: '7263e4611efb2823f0fa3fa739e87013e0e37781', label: this.label, name: this.name, value: this.selectedValue, placeholder: this.placeholder, helper: this.helper, readonly: this.readonly, disabled: this.disabled, clearable: this.clearable, multiple: this.multiple, "end-aligned": this.endAligned, variant: this.variant, placement: this.placement, icon: this.icon, "end-icon": this.endIcon, form: this.form }, this.items.map(([label, value, disabled]) => (h("ur-menu-item", { value: value, label: label, disabled: disabled, onItemClicked: (event) => this.handleItemClicked(event) }))))));
1586
1586
  }
1587
1587
  static get watchers() { return {
1588
1588
  "value": ["valueChanged"]
@@ -2,7 +2,6 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import 'mdui/components/dialog.js';
3
3
  export declare class UrDialog {
4
4
  el: HTMLElement;
5
- private urDialog;
6
5
  private dialogElement;
7
6
  icon: string;
8
7
  headline: string;
@@ -13,8 +12,8 @@ export declare class UrDialog {
13
12
  closeOnOverlayClick: boolean;
14
13
  dialogConfirmed: EventEmitter<void>;
15
14
  componentDidLoad(): void;
16
- openDialog(): void;
17
- closeDialog(): void;
15
+ openDialog(): Promise<void>;
16
+ closeDialog(): Promise<void>;
18
17
  handleConfirm(): void;
19
18
  render(): any;
20
19
  }
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s}from"./p-782012c9.js";import"./p-0571ebea.js";import{i as h,c as n,_ as o,n as r,b as a,t as l,M as c,a as d,e as u,f as m,k as p,K as f,$ as b,J as v,u as g,T as y,g as w,d as $,H as k,D as x}from"./p-a79a137e.js";import{r as C,F as j}from"./p-2f04e32a.js";import{o as O}from"./p-ff443927.js";import{t as S}from"./p-8410d797.js";import{a as D,o as E}from"./p-c30736fe.js";import{n as I}from"./p-cb1f5d6c.js";import{F as B,f as T}from"./p-ccaeac43.js";import{d as M}from"./p-cce55daf.js";import{o as V}from"./p-3d163c89.js";import"./p-34388ac0.js";import{w as A}from"./p-8994d758.js";import{g as K,a as P,s as z,b as F}from"./p-bddd6a75.js";import"./p-3fda3ec3.js";import"./p-c5180928.js";import"./p-8511f124.js";import"./p-e65a0f4a.js";import"./p-3db231e7.js";import"./p-c9791cda.js";import"./p-01994b35.js";import"./p-e4f27de6.js";import"./p-23fd0f5c.js";import"./p-a01434f1.js";function N(t){return H(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var i;return(null==t||null==(i=t.ownerDocument)?void 0:i.defaultView)||window}function H(t){return t instanceof Node||t instanceof _(t).Node}function q(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof _(t).ShadowRoot)}function L(t){const{overflow:i,overflowX:e,overflowY:s,display:h}=function(t){return _(t).getComputedStyle(t)}(t);return/auto|scroll|overlay|hidden|clip/.test(i+s+e)&&!["inline","contents"].includes(h)}function U(t){const i=function(t){if("html"===N(t))return t;const i=t.assignedSlot||t.parentNode||q(t)&&t.host||function(t){var i;return null==(i=(H(t)?t.ownerDocument:t.document)||window.document)?void 0:i.documentElement}(t);return q(i)?i.host:i}(t);return function(t){return["html","body","#document"].includes(N(t))}(i)?t.ownerDocument?t.ownerDocument.body:t.body:((e=i)instanceof HTMLElement||e instanceof _(e).HTMLElement)&&L(i)?i:U(i);var e}function R(t,i,e){var s;void 0===i&&(i=[]),void 0===e&&(e=!0);const h=U(t),n=h===(null==(s=t.ownerDocument)?void 0:s.body),o=_(h);if(n){const t=function(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}(o);return i.concat(o,o.visualViewport||[],L(h)?h:[],t&&e?R(t):[])}return i.concat(h,R(h,[],e))}const W=h`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let X=class extends c{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=d(),this.definedController=new u(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const t=this.hasUpdated;if(!this.open&&!t)return;await this.definedController.whenDefined(),t||await this.updateComplete;const i=K(this,"linear"),e=K(this,"emphasized-decelerate"),s=K(this,"emphasized-accelerate");if(this.open){if(t&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find((t=>m(t.focus)));setTimeout((()=>{s?.focus()}));const h=P(this,"medium4");await z(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:t?h:0,easing:e}),F(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:t?h:0,easing:i})]),t&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const t=P(this,"short4");await z(this.panelRef.value),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:t,easing:s}),F(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:t,easing:i})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=R(this.triggerElement),this.overflowAncestors.forEach((t=>{t.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=V(this.triggerElement,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((t=>{t.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(t){super.firstUpdated(t),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)}))}render(){return p`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${f(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(t){if(this.disabled||!this.open)return;const i=t.composedPath();i.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&i.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(t){!this.disabled&&this.open&&("Escape"!==t.key?"Tab"===t.key&&(!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&t.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(t){return this.trigger.split(" ").includes(t)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(t){this.disabled||t.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!this.open)}onPanelClick(t){this.disabled||this.stayOpenOnClick||!b(t.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(t){!this.disabled&&this.hasTrigger("contextmenu")&&(t.preventDefault(),this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const t=b(this.panelRef.value),i=b(window),e=this.panelElements,s=Math.max(...e?.map((t=>t.offsetWidth))??[]),h=e?.map((t=>t.offsetHeight)).reduce(((t,i)=>t+i),0),n=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+n.top,left:this.pointerOffsetX+n.left,width:0,height:0}:n;let r,a,l,c,d=this.placement;if("auto"===d){const t=i.width(),e=i.height();let n,r;n=e-o.top-o.height>h+8?"bottom":o.top>h+8?"top":t-o.left-o.width>s+8?"right":o.left>s+8?"left":"bottom",r=["top","bottom"].includes(n)?t-o.left>s+8?"start":o.left+o.width/2>s/2+8&&t-o.left-o.width/2>s/2+8?void 0:o.left+o.width>s+8?"end":"start":e-o.top>h+8?"start":o.top+o.height/2>h/2+8&&e-o.top-o.height/2>h/2+8?void 0:o.top+o.height>h+8?"end":"start",d=r?[n,r].join("-"):n}const[u,m]=d.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":a="bottom",l=o.top-h;break;case"bottom":a="top",l=o.top+o.height;break;default:switch(a="center",m){case"start":l=o.top;break;case"end":l=o.top+o.height-h;break;default:l=o.top+o.height/2-h/2}}switch(u){case"left":r="right",c=o.left-s;break;case"right":r="left",c=o.left+o.width;break;default:switch(r="center",m){case"start":c=o.left;break;case"end":c=o.left+o.width-s;break;default:c=o.left+o.width/2-s/2}}t.css({top:l,left:c,transformOrigin:[r,a].join(" ")})}};X.styles=[n,W],o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"open",void 0),o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"disabled",void 0),o([r({reflect:!0})],X.prototype,"trigger",void 0),o([r({reflect:!0})],X.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"stay-open-on-click"})],X.prototype,"stayOpenOnClick",void 0),o([r({type:Number,reflect:!0,attribute:"open-delay"})],X.prototype,"openDelay",void 0),o([r({type:Number,reflect:!0,attribute:"close-delay"})],X.prototype,"closeDelay",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"open-on-pointer"})],X.prototype,"openOnPointer",void 0),o([O({slot:"trigger",flatten:!0})],X.prototype,"triggerElements",void 0),o([O({flatten:!0})],X.prototype,"panelElements",void 0),o([A("placement",!0),A("openOnPointer",!0)],X.prototype,"onPositionChange",null),o([A("open")],X.prototype,"onOpenChange",null),X=o([l("mdui-dropdown")],X),b.fn.add=function(t){return new v(g(y(this.get(),b(t).get())))};const Y=h`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let J=class extends c{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get items(){return b(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((t=>!t.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!b(this).parent().length}get lastActiveItem(){return this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]}set lastActiveItem(t){this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]=t}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((t=>{t.dense=this.dense,t.selects=this.selects,t.submenuTrigger=this.submenuTrigger,t.submenuOpenDelay=this.submenuOpenDelay,t.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const t=this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).map((t=>t.value));this.setValue(this.isMultiple?t:t[0]||void 0),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const t=(this.isSingle||w(this.value)?[this.value]:this.value).filter((t=>t));if(t.length)if(this.isSingle){const i=this.itemsEnabled.find((i=>i.value===t[0]));this.setSelectedKeys(i?[i.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((i=>t.includes(i.value))).map((t=>t.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(t){this.lastActiveItem&&this.focusOne(this.lastActiveItem,t)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(t){super.firstUpdated(t),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((t=>t.focusable))})),this.addEventListener("submenu-open",(t=>{const i=b(t.target),e=i.children("mdui-menu-item:not([disabled])").get(),s=i.parents("mdui-menu-item").length+1;e.length&&(this.lastActiveItems[s]=e[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))})),this.addEventListener("submenu-close",(t=>{const i=b(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===i&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[i-1]&&this.focusOne(this.lastActiveItems[i-1]))}))}render(){return p`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(t){D(this.selectedKeys,t)||(this.selectedKeys=t)}setValue(t){this.isSingle||$(this.value)||$(t)?this.value=t:D(this.value,t)||(this.value=t)}getSiblingsItems(t,i=!1){return b(t).parent().children("mdui-menu-item"+(i?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((t=>{t.focusable=t.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((t=>{t.focusable=this.selectedKeys.includes(t.key)}));else if(this.isMultiple){const t=this.items.find((t=>t.focusable));t?.key&&this.selectedKeys.includes(t.key)||this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).forEach(((t,i)=>t.focusable=!i))}}else this.itemsEnabled.forEach(((t,i)=>{t.focusable=!i}))}updateSelected(){this.items.forEach((t=>{t.selected=this.selectedKeys.includes(t.key)}))}selectOne(t){if(this.isMultiple){const i=[...this.selectedKeys];i.includes(t.key)?i.splice(i.indexOf(t.key),1):i.push(t.key),this.setSelectedKeys(i)}this.isSingle&&(this.selectedKeys.includes(t.key)?this.setSelectedKeys([]):this.setSelectedKeys([t.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(t){this.items.forEach((i=>i.focusable=i.key===t.key)),await((t=0)=>new Promise((i=>setTimeout(i,t))))()}focusOne(t,i){t.focus(i)}async onClick(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(t.button)return;const i=t.target.closest("mdui-menu-item");i&&!i.disabled&&(this.lastActiveItem=i,this.isSelectable&&i.value&&this.selectOne(i),await this.focusableOne(i),this.focusOne(i))}async onKeyDown(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const i=t.target;if("Enter"===t.key&&(t.preventDefault(),i.click())," "===t.key&&(t.preventDefault(),this.isSelectable&&i.value&&(this.selectOne(i),await this.focusableOne(i),this.focusOne(i))),["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getSiblingsItems(i,!0),s=e.find((t=>t.focusable));let h=s?e.indexOf(s):0;if(e.length>0)return t.preventDefault(),"ArrowDown"===t.key?h++:"ArrowUp"===t.key?h--:"Home"===t.key?h=0:"End"===t.key&&(h=e.length-1),h<0&&(h=e.length-1),h>e.length-1&&(h=0),this.lastActiveItem=e[h],await this.focusableOne(e[h]),void this.focusOne(e[h])}}};J.styles=[n,Y],o([r({reflect:!0})],J.prototype,"selects",void 0),o([r()],J.prototype,"value",void 0),o([r({type:Boolean,reflect:!0,converter:a})],J.prototype,"dense",void 0),o([r({reflect:!0,attribute:"submenu-trigger"})],J.prototype,"submenuTrigger",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-open-delay"})],J.prototype,"submenuOpenDelay",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-close-delay"})],J.prototype,"submenuCloseDelay",void 0),o([C()],J.prototype,"selectedKeys",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],J.prototype,"childrenItems",void 0),o([A("dense"),A("selects"),A("submenuTrigger"),A("submenuOpenDelay"),A("submenuCloseDelay")],J.prototype,"onSlotChange",null),o([A("selects",!0)],J.prototype,"onSelectsChange",null),o([A("selectedKeys",!0)],J.prototype,"onSelectedKeysChange",null),o([A("value")],J.prototype,"onValueChange",null),J=o([l("mdui-menu")],J);const G=h`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let Q=class extends(j(c)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=d(),this.textFieldRef=d(),this.hiddenInputRef=d(),this.formController=new B(this),this.hasSlotController=new k(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&w(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()})),this.updateComplete.then((()=>{this.observeResize=V(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const t=this.hiddenInputRef.value.checkValidity();return t||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),t}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(t){this.hiddenInputRef.value.setCustomValidity(t),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const t=this.multiple?!!this.value.length:!!this.value;return p`${this.multiple?p`<select ${f(this.hiddenInputRef)} class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${E(this.value,(t=>p`<option selected="selected" value="${t}"></option>`))}</select>`:p`<input ${f(this.hiddenInputRef)} type="radio" class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${t}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${"top"===this.placement?"top-start":"bottom"===this.placement?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${f(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map((t=>`${t}:text-field__${t}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${E(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(t=>this.hasSlotController.test(t)?p`<slot name="${t}" slot="${t}"></slot>`:x))} ${I(this.multiple&&this.value.length,(()=>p`<div slot="input" class="chips" part="chips">${E(this.value,(t=>p`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map((t=>`${t}:chip__${t}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`))}</div>`))}</mdui-text-field><mdui-menu ${f(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(t){return this.menuItems.length&&this.menuItems.find((i=>i.value===t))?.textContent?.trim()||t}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(t){const i=t.target;this.value=this.multiple?i.value.map((t=>t??"")):i.value??"",await this.updateComplete;const e=this.formController.getForm();e&&T.get(e)?.has(this)?(this.invalid=!1,T.get(e).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(t){const i=[...this.value];i.includes(t)&&i.splice(i.indexOf(t),1),this.value=i}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(t){"Enter"===t.key&&(t.preventDefault(),this.textFieldRef.value.click())}};Q.styles=[n,G],o([r({reflect:!0})],Q.prototype,"variant",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"multiple",void 0),o([r({reflect:!0})],Q.prototype,"name",void 0),o([r()],Q.prototype,"value",void 0),o([M()],Q.prototype,"defaultValue",void 0),o([r({reflect:!0})],Q.prototype,"label",void 0),o([r({reflect:!0})],Q.prototype,"placeholder",void 0),o([r({reflect:!0})],Q.prototype,"helper",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"clearable",void 0),o([r({reflect:!0,attribute:"clear-icon"})],Q.prototype,"clearIcon",void 0),o([r({reflect:!0})],Q.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"end-aligned"})],Q.prototype,"endAligned",void 0),o([r({reflect:!0})],Q.prototype,"prefix",void 0),o([r({reflect:!0})],Q.prototype,"suffix",void 0),o([r({reflect:!0})],Q.prototype,"icon",void 0),o([r({reflect:!0,attribute:"end-icon"})],Q.prototype,"endIcon",void 0),o([r({reflect:!0,attribute:"error-icon"})],Q.prototype,"errorIcon",void 0),o([r({reflect:!0})],Q.prototype,"form",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"readonly",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"disabled",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"required",void 0),o([C()],Q.prototype,"invalid",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],Q.prototype,"menuItems",void 0),Q=o([l("mdui-select")],Q);const Z=class{constructor(e){t(this,e),this.itemClicked=i(this,"itemClicked",7),this.label="Text Field",this.name="",this.value="",this.placeholder=null,this.helper=null,this.readonly=!1,this.disabled=!1,this.clearable=!1,this.multiple=!1,this.endAligned=!1,this.variant="filled",this.placement="auto",this.icon=null,this.endIcon=null,this.form=null,this.items=[],this.selectedValue=this.multiple?[]:""}valueChanged(t){this.selectedValue=t}handleItemClicked(t){const i=t.detail;if(this.multiple){const t=Array.isArray(this.selectedValue)?[...this.selectedValue]:[],e=t.indexOf(i);e>-1?t.splice(e,1):t.push(i),this.selectedValue=t}else this.selectedValue=i;this.itemClicked.emit(this.selectedValue)}componentWillLoad(){this.selectedValue=this.value}render(){return e(s,{key:"ed416c8053b6e0d32ad916cb99a8e933b4726879"},e("mdui-select",{key:"ad9f46e88ec5b520e288132b39d7bd48bac3a888",label:this.label,name:this.name,value:this.selectedValue,placeholder:this.placeholder,helper:this.helper,readonly:this.readonly,disabled:this.disabled,clearable:this.clearable,multiple:this.multiple,"end-aligned":this.endAligned,variant:this.variant,placement:this.placement,icon:this.icon,"end-icon":this.endIcon,form:this.form},this.items.map((([t,i,s])=>e("ur-menu-item",{value:i,label:t,disabled:s,onItemClicked:t=>this.handleItemClicked(t)})))))}static get watchers(){return{value:["valueChanged"]}}};Z.style=":host{display:block}";export{Z as ur_select}
1
+ import{r as t,c as i,h as e,H as s}from"./p-782012c9.js";import"./p-0571ebea.js";import{i as h,c as n,_ as o,n as r,b as a,t as l,M as c,a as d,e as u,f as m,k as p,K as f,$ as b,J as v,u as g,T as y,g as w,d as $,H as k,D as x}from"./p-a79a137e.js";import{r as C,F as j}from"./p-2f04e32a.js";import{o as O}from"./p-ff443927.js";import{t as S}from"./p-8410d797.js";import{a as D,o as E}from"./p-c30736fe.js";import{n as I}from"./p-cb1f5d6c.js";import{F as B,f as T}from"./p-ccaeac43.js";import{d as M}from"./p-cce55daf.js";import{o as V}from"./p-3d163c89.js";import"./p-34388ac0.js";import{w as A}from"./p-8994d758.js";import{g as K,a as P,s as z,b as F}from"./p-bddd6a75.js";import"./p-3fda3ec3.js";import"./p-c5180928.js";import"./p-8511f124.js";import"./p-e65a0f4a.js";import"./p-3db231e7.js";import"./p-c9791cda.js";import"./p-01994b35.js";import"./p-e4f27de6.js";import"./p-23fd0f5c.js";import"./p-a01434f1.js";function N(t){return H(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var i;return(null==t||null==(i=t.ownerDocument)?void 0:i.defaultView)||window}function H(t){return t instanceof Node||t instanceof _(t).Node}function q(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof _(t).ShadowRoot)}function L(t){const{overflow:i,overflowX:e,overflowY:s,display:h}=function(t){return _(t).getComputedStyle(t)}(t);return/auto|scroll|overlay|hidden|clip/.test(i+s+e)&&!["inline","contents"].includes(h)}function U(t){const i=function(t){if("html"===N(t))return t;const i=t.assignedSlot||t.parentNode||q(t)&&t.host||function(t){var i;return null==(i=(H(t)?t.ownerDocument:t.document)||window.document)?void 0:i.documentElement}(t);return q(i)?i.host:i}(t);return function(t){return["html","body","#document"].includes(N(t))}(i)?t.ownerDocument?t.ownerDocument.body:t.body:((e=i)instanceof HTMLElement||e instanceof _(e).HTMLElement)&&L(i)?i:U(i);var e}function R(t,i,e){var s;void 0===i&&(i=[]),void 0===e&&(e=!0);const h=U(t),n=h===(null==(s=t.ownerDocument)?void 0:s.body),o=_(h);if(n){const t=function(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}(o);return i.concat(o,o.visualViewport||[],L(h)?h:[],t&&e?R(t):[])}return i.concat(h,R(h,[],e))}const W=h`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let X=class extends c{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=d(),this.definedController=new u(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const t=this.hasUpdated;if(!this.open&&!t)return;await this.definedController.whenDefined(),t||await this.updateComplete;const i=K(this,"linear"),e=K(this,"emphasized-decelerate"),s=K(this,"emphasized-accelerate");if(this.open){if(t&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find((t=>m(t.focus)));setTimeout((()=>{s?.focus()}));const h=P(this,"medium4");await z(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:t?h:0,easing:e}),F(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:t?h:0,easing:i})]),t&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const t=P(this,"short4");await z(this.panelRef.value),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:t,easing:s}),F(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:t,easing:i})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=R(this.triggerElement),this.overflowAncestors.forEach((t=>{t.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=V(this.triggerElement,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((t=>{t.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(t){super.firstUpdated(t),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)}))}render(){return p`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${f(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(t){if(this.disabled||!this.open)return;const i=t.composedPath();i.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&i.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(t){!this.disabled&&this.open&&("Escape"!==t.key?"Tab"===t.key&&(!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&t.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(t){return this.trigger.split(" ").includes(t)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(t){this.disabled||t.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!this.open)}onPanelClick(t){this.disabled||this.stayOpenOnClick||!b(t.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(t){!this.disabled&&this.hasTrigger("contextmenu")&&(t.preventDefault(),this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const t=b(this.panelRef.value),i=b(window),e=this.panelElements,s=Math.max(...e?.map((t=>t.offsetWidth))??[]),h=e?.map((t=>t.offsetHeight)).reduce(((t,i)=>t+i),0),n=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+n.top,left:this.pointerOffsetX+n.left,width:0,height:0}:n;let r,a,l,c,d=this.placement;if("auto"===d){const t=i.width(),e=i.height();let n,r;n=e-o.top-o.height>h+8?"bottom":o.top>h+8?"top":t-o.left-o.width>s+8?"right":o.left>s+8?"left":"bottom",r=["top","bottom"].includes(n)?t-o.left>s+8?"start":o.left+o.width/2>s/2+8&&t-o.left-o.width/2>s/2+8?void 0:o.left+o.width>s+8?"end":"start":e-o.top>h+8?"start":o.top+o.height/2>h/2+8&&e-o.top-o.height/2>h/2+8?void 0:o.top+o.height>h+8?"end":"start",d=r?[n,r].join("-"):n}const[u,m]=d.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":a="bottom",l=o.top-h;break;case"bottom":a="top",l=o.top+o.height;break;default:switch(a="center",m){case"start":l=o.top;break;case"end":l=o.top+o.height-h;break;default:l=o.top+o.height/2-h/2}}switch(u){case"left":r="right",c=o.left-s;break;case"right":r="left",c=o.left+o.width;break;default:switch(r="center",m){case"start":c=o.left;break;case"end":c=o.left+o.width-s;break;default:c=o.left+o.width/2-s/2}}t.css({top:l,left:c,transformOrigin:[r,a].join(" ")})}};X.styles=[n,W],o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"open",void 0),o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"disabled",void 0),o([r({reflect:!0})],X.prototype,"trigger",void 0),o([r({reflect:!0})],X.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"stay-open-on-click"})],X.prototype,"stayOpenOnClick",void 0),o([r({type:Number,reflect:!0,attribute:"open-delay"})],X.prototype,"openDelay",void 0),o([r({type:Number,reflect:!0,attribute:"close-delay"})],X.prototype,"closeDelay",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"open-on-pointer"})],X.prototype,"openOnPointer",void 0),o([O({slot:"trigger",flatten:!0})],X.prototype,"triggerElements",void 0),o([O({flatten:!0})],X.prototype,"panelElements",void 0),o([A("placement",!0),A("openOnPointer",!0)],X.prototype,"onPositionChange",null),o([A("open")],X.prototype,"onOpenChange",null),X=o([l("mdui-dropdown")],X),b.fn.add=function(t){return new v(g(y(this.get(),b(t).get())))};const Y=h`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let J=class extends c{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get items(){return b(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((t=>!t.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!b(this).parent().length}get lastActiveItem(){return this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]}set lastActiveItem(t){this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]=t}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((t=>{t.dense=this.dense,t.selects=this.selects,t.submenuTrigger=this.submenuTrigger,t.submenuOpenDelay=this.submenuOpenDelay,t.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const t=this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).map((t=>t.value));this.setValue(this.isMultiple?t:t[0]||void 0),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const t=(this.isSingle||w(this.value)?[this.value]:this.value).filter((t=>t));if(t.length)if(this.isSingle){const i=this.itemsEnabled.find((i=>i.value===t[0]));this.setSelectedKeys(i?[i.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((i=>t.includes(i.value))).map((t=>t.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(t){this.lastActiveItem&&this.focusOne(this.lastActiveItem,t)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(t){super.firstUpdated(t),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((t=>t.focusable))})),this.addEventListener("submenu-open",(t=>{const i=b(t.target),e=i.children("mdui-menu-item:not([disabled])").get(),s=i.parents("mdui-menu-item").length+1;e.length&&(this.lastActiveItems[s]=e[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))})),this.addEventListener("submenu-close",(t=>{const i=b(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===i&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[i-1]&&this.focusOne(this.lastActiveItems[i-1]))}))}render(){return p`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(t){D(this.selectedKeys,t)||(this.selectedKeys=t)}setValue(t){this.isSingle||$(this.value)||$(t)?this.value=t:D(this.value,t)||(this.value=t)}getSiblingsItems(t,i=!1){return b(t).parent().children("mdui-menu-item"+(i?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((t=>{t.focusable=t.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((t=>{t.focusable=this.selectedKeys.includes(t.key)}));else if(this.isMultiple){const t=this.items.find((t=>t.focusable));t?.key&&this.selectedKeys.includes(t.key)||this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).forEach(((t,i)=>t.focusable=!i))}}else this.itemsEnabled.forEach(((t,i)=>{t.focusable=!i}))}updateSelected(){this.items.forEach((t=>{t.selected=this.selectedKeys.includes(t.key)}))}selectOne(t){if(this.isMultiple){const i=[...this.selectedKeys];i.includes(t.key)?i.splice(i.indexOf(t.key),1):i.push(t.key),this.setSelectedKeys(i)}this.isSingle&&(this.selectedKeys.includes(t.key)?this.setSelectedKeys([]):this.setSelectedKeys([t.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(t){this.items.forEach((i=>i.focusable=i.key===t.key)),await((t=0)=>new Promise((i=>setTimeout(i,t))))()}focusOne(t,i){t.focus(i)}async onClick(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(t.button)return;const i=t.target.closest("mdui-menu-item");i&&!i.disabled&&(this.lastActiveItem=i,this.isSelectable&&i.value&&this.selectOne(i),await this.focusableOne(i),this.focusOne(i))}async onKeyDown(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const i=t.target;if("Enter"===t.key&&(t.preventDefault(),i.click())," "===t.key&&(t.preventDefault(),this.isSelectable&&i.value&&(this.selectOne(i),await this.focusableOne(i),this.focusOne(i))),["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getSiblingsItems(i,!0),s=e.find((t=>t.focusable));let h=s?e.indexOf(s):0;if(e.length>0)return t.preventDefault(),"ArrowDown"===t.key?h++:"ArrowUp"===t.key?h--:"Home"===t.key?h=0:"End"===t.key&&(h=e.length-1),h<0&&(h=e.length-1),h>e.length-1&&(h=0),this.lastActiveItem=e[h],await this.focusableOne(e[h]),void this.focusOne(e[h])}}};J.styles=[n,Y],o([r({reflect:!0})],J.prototype,"selects",void 0),o([r()],J.prototype,"value",void 0),o([r({type:Boolean,reflect:!0,converter:a})],J.prototype,"dense",void 0),o([r({reflect:!0,attribute:"submenu-trigger"})],J.prototype,"submenuTrigger",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-open-delay"})],J.prototype,"submenuOpenDelay",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-close-delay"})],J.prototype,"submenuCloseDelay",void 0),o([C()],J.prototype,"selectedKeys",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],J.prototype,"childrenItems",void 0),o([A("dense"),A("selects"),A("submenuTrigger"),A("submenuOpenDelay"),A("submenuCloseDelay")],J.prototype,"onSlotChange",null),o([A("selects",!0)],J.prototype,"onSelectsChange",null),o([A("selectedKeys",!0)],J.prototype,"onSelectedKeysChange",null),o([A("value")],J.prototype,"onValueChange",null),J=o([l("mdui-menu")],J);const G=h`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let Q=class extends(j(c)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=d(),this.textFieldRef=d(),this.hiddenInputRef=d(),this.formController=new B(this),this.hasSlotController=new k(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&w(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()})),this.updateComplete.then((()=>{this.observeResize=V(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const t=this.hiddenInputRef.value.checkValidity();return t||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),t}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(t){this.hiddenInputRef.value.setCustomValidity(t),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const t=this.multiple?!!this.value.length:!!this.value;return p`${this.multiple?p`<select ${f(this.hiddenInputRef)} class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${E(this.value,(t=>p`<option selected="selected" value="${t}"></option>`))}</select>`:p`<input ${f(this.hiddenInputRef)} type="radio" class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${t}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${"top"===this.placement?"top-start":"bottom"===this.placement?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${f(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map((t=>`${t}:text-field__${t}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${E(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(t=>this.hasSlotController.test(t)?p`<slot name="${t}" slot="${t}"></slot>`:x))} ${I(this.multiple&&this.value.length,(()=>p`<div slot="input" class="chips" part="chips">${E(this.value,(t=>p`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map((t=>`${t}:chip__${t}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`))}</div>`))}</mdui-text-field><mdui-menu ${f(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(t){return this.menuItems.length&&this.menuItems.find((i=>i.value===t))?.textContent?.trim()||t}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(t){const i=t.target;this.value=this.multiple?i.value.map((t=>t??"")):i.value??"",await this.updateComplete;const e=this.formController.getForm();e&&T.get(e)?.has(this)?(this.invalid=!1,T.get(e).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(t){const i=[...this.value];i.includes(t)&&i.splice(i.indexOf(t),1),this.value=i}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(t){"Enter"===t.key&&(t.preventDefault(),this.textFieldRef.value.click())}};Q.styles=[n,G],o([r({reflect:!0})],Q.prototype,"variant",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"multiple",void 0),o([r({reflect:!0})],Q.prototype,"name",void 0),o([r()],Q.prototype,"value",void 0),o([M()],Q.prototype,"defaultValue",void 0),o([r({reflect:!0})],Q.prototype,"label",void 0),o([r({reflect:!0})],Q.prototype,"placeholder",void 0),o([r({reflect:!0})],Q.prototype,"helper",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"clearable",void 0),o([r({reflect:!0,attribute:"clear-icon"})],Q.prototype,"clearIcon",void 0),o([r({reflect:!0})],Q.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"end-aligned"})],Q.prototype,"endAligned",void 0),o([r({reflect:!0})],Q.prototype,"prefix",void 0),o([r({reflect:!0})],Q.prototype,"suffix",void 0),o([r({reflect:!0})],Q.prototype,"icon",void 0),o([r({reflect:!0,attribute:"end-icon"})],Q.prototype,"endIcon",void 0),o([r({reflect:!0,attribute:"error-icon"})],Q.prototype,"errorIcon",void 0),o([r({reflect:!0})],Q.prototype,"form",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"readonly",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"disabled",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"required",void 0),o([C()],Q.prototype,"invalid",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],Q.prototype,"menuItems",void 0),Q=o([l("mdui-select")],Q);const Z=class{constructor(e){t(this,e),this.itemClicked=i(this,"itemClicked",7),this.label="Text Field",this.name="",this.value="",this.placeholder=null,this.helper=null,this.readonly=!1,this.disabled=!1,this.clearable=!1,this.multiple=!1,this.endAligned=!1,this.variant="filled",this.placement="auto",this.icon=null,this.endIcon=null,this.form=null,this.items=[],this.selectedValue=this.multiple?[]:""}valueChanged(t){this.selectedValue=t}handleItemClicked(t){const i=t.detail;if(this.multiple){const t=Array.isArray(this.selectedValue)?[...this.selectedValue]:[],e=t.indexOf(i);e>-1?t.splice(e,1):t.push(i),this.selectedValue=t}else this.selectedValue=i;this.itemClicked.emit(this.selectedValue)}componentWillLoad(){this.selectedValue=this.value}render(){return e(s,{key:"b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d"},e("mdui-select",{key:"7263e4611efb2823f0fa3fa739e87013e0e37781",label:this.label,name:this.name,value:this.selectedValue,placeholder:this.placeholder,helper:this.helper,readonly:this.readonly,disabled:this.disabled,clearable:this.clearable,multiple:this.multiple,"end-aligned":this.endAligned,variant:this.variant,placement:this.placement,icon:this.icon,"end-icon":this.endIcon,form:this.form},this.items.map((([t,i,s])=>e("ur-menu-item",{value:i,label:t,disabled:s,onItemClicked:t=>this.handleItemClicked(t)})))))}static get watchers(){return{value:["valueChanged"]}}};Z.style=":host{display:block}";export{Z as ur_select}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as s,g as o}from"./p-782012c9.js";import{L as a,h as n,$ as r,f as c,g as d,N as l,l as h,O as p,P as u,Q as f,j as m,d as y,i as b,c as v,_ as g,n as x,b as k,t as w,M as $,a as j,H as z,e as C,k as O,K as Y,R as A}from"./p-a79a137e.js";import{o as B}from"./p-ff443927.js";import{n as D}from"./p-cb1f5d6c.js";import{w as E}from"./p-8994d758.js";import{g as F,s as H,a as P,b as S}from"./p-bddd6a75.js";import{n as K}from"./p-8511f124.js";import{o as L}from"./p-23fd0f5c.js";function M(e){const t=a(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&null!==e.offsetParent&&"hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i))}let T,q=[];class I{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){q.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){q=q.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return q[q.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>M(e)))??null,end:t.reverse().find((e=>M(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}n(["before","after"],((e,t)=>{r.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,s)=>{const o=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;n(o,(e=>{let o;o=(e=>d(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?r(l(e,"div")):i&&h(e)?r(e.cloneNode(!0)):r(e),o[t?"insertAfter":"insertBefore"](s)}))}))}})),r.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},n(["prepend","append"],((e,t)=>{r.fn[e]=function(...e){return this.each(((i,s)=>{const o=s.childNodes,a=o.length,n=a?o[t?a-1:0]:p("div");a||u(s,n);let l=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;i&&(l=l.map((e=>d(e)?e:r(e).clone()))),r(n)[t?"after":"before"](...l),a||f(n)}))}}));const U=e=>{if(y(document))return 0;if(e||void 0===T){const e=r("<div>").css({width:"100%",height:"200px"}),t=r("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let s=e[0].offsetWidth;i===s&&(s=t[0].clientWidth),t.remove(),T=i-s}return T},_=new WeakMap,N="mdui-lock-screen",Q=(e,t)=>{const i=m();t??=i.documentElement;const s=_.get(t);s&&(s.delete(e),0===s.size&&(_.delete(t),r(t).removeClass(N).width("")))},R=b`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let W=class extends ${constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=j(),this.panelRef=j(),this.bodyRef=j(),this.hasSlotController=new z(this,"header","icon","headline","description","action","[default]"),this.definedController=new C(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=F(this,"linear"),s=F(this,"emphasized-decelerate"),o=F(this,"emphasized-accelerate"),a=()=>Promise.all([H(this.overlayRef.value),H(this.panelRef.value),...t.map((e=>H(e)))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const o=this.topAppBarElements??[];if(o.length){const e=o[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),((e,t)=>{const i=m();t??=i.documentElement,_.has(t)||_.set(t,new Set),_.get(t).add(e);const s=r(t);(e=>e.scrollHeight>e.clientHeight)(t)&&s.css("width",`calc(100% - ${U()}px)`),s.addClass(N)})(this),await a(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const n=P(this,"medium4");await Promise.all([S(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?n:0,easing:i}),S(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?n:0,easing:s}),S(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?n:0,easing:i}),...t.map((t=>S(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?n:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await a();const e=P(this,"short4");await Promise.all([S(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),S(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:o}),S(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>S(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Q(this);const s=this.originalTrigger;"function"==typeof s?.focus&&setTimeout((()=>s.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Q(this),L(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new I(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),s=!!this.headline||this.hasSlotController.test("headline"),o=!!this.description||this.hasSlotController.test("description"),a=i||s||this.hasSlotController.test("header"),n=o||t;return O`<div ${Y(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${Y(this.panelRef)} part="panel" class="panel ${A({"has-icon":i,"has-description":o,"has-default":t})}" tabindex="0">${D(a,(()=>O`<slot name="header" part="header" class="header">${D(i,(()=>this.renderIcon()))} ${D(s,(()=>this.renderHeadline()))}</slot>`))} ${D(n,(()=>O`<div ${Y(this.bodyRef)} part="body" class="body">${D(o,(()=>this.renderDescription()))}<slot></slot></div>`))} ${D(e,(()=>O`<slot name="action" part="action" class="action"></slot>`))}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return O`<slot name="icon" part="icon" class="icon">${this.icon?O`<mdui-icon name="${this.icon}"></mdui-icon>`:K}</slot>`}renderHeadline(){return O`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return O`<slot name="description" part="description" class="description">${this.description}</slot>`}};W.styles=[v,R],g([x({reflect:!0})],W.prototype,"icon",void 0),g([x({reflect:!0})],W.prototype,"headline",void 0),g([x({reflect:!0})],W.prototype,"description",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"open",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"fullscreen",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-esc"})],W.prototype,"closeOnEsc",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-overlay-click"})],W.prototype,"closeOnOverlayClick",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"stacked-actions"})],W.prototype,"stackedActions",void 0),g([B({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],W.prototype,"topAppBarElements",void 0),g([E("open")],W.prototype,"onOpenChange",null),W=g([w("mdui-dialog")],W);const G=class{constructor(i){e(this,i),this.dialogConfirmed=t(this,"dialogConfirmed",7),this.icon=null,this.headline=null,this.description=null,this.open=!1,this.fullscreen=!1,this.closeOnEsc=!0,this.closeOnOverlayClick=!0}componentDidLoad(){this.dialogElement=this.el.shadowRoot.querySelector(".my-dialog")}openDialog(){this.dialogElement.open=!0}closeDialog(){this.dialogElement.open=!1}handleConfirm(){this.dialogConfirmed.emit(),this.closeDialog()}render(){return i(s,{key:"6fc0fdbb15e8953f3adce6938191f9f0547bd45c"},i("mdui-dialog",{key:"d64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f",open:this.open,"close-on-overlay-click":this.closeOnOverlayClick,"close-on-esc":this.closeOnEsc,fullscreen:this.fullscreen,class:"my-dialog"},i("div",{key:"c5a727dc01f279d4376740dcde9e6da495415446",class:"title"},this.headline),i("div",{key:"fb628321aa016da40ff28681d7670563ed871399",class:"description"},this.description),i("div",{key:"5e6a4f32ed040251d4a580b5f031851d26e4ee5c",class:"actions"},i("ur-button",{key:"25ead0f6c3914bb57a5758f76951ef4bd0fc96a6",onClick:()=>this.handleConfirm()},"Confirm"),i("ur-button",{key:"102723d0b778765b32de33c26e4b7c876997e6f4",onClick:()=>this.closeDialog()},"Cancel"))),i("ur-button",{key:"04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90",onClick:()=>this.openDialog()},"Open Dialog"))}get el(){return o(this)}};G.style=":host{--ur-color-on-background:var(--mdui-color-on-background)}:host .dialog{display:block;width:auto}:host .title{font-size:20px;display:flex;justify-content:center}:host .description{display:flex;justify-content:center;font-size:12px}:host .actions{display:flex;justify-content:center;gap:16px;padding-top:12px}:host .actions ur-button{padding:8px 20px;font-size:14px;border:none;color:rgb(var(--ur-color-on-background));border-radius:4px;cursor:pointer}";export{G as ur_dialog}
1
+ import{r as e,c as t,h as i,H as s,g as o}from"./p-782012c9.js";import{L as a,h as n,$ as r,f as c,g as l,N as d,l as h,O as p,P as u,Q as f,j as m,d as y,i as b,c as v,_ as g,n as x,b as k,t as w,M as $,a as j,H as z,e as C,k as O,K as Y,R as A}from"./p-a79a137e.js";import{o as B}from"./p-ff443927.js";import{n as D}from"./p-cb1f5d6c.js";import{w as E}from"./p-8994d758.js";import{g as F,s as H,a as P,b as S}from"./p-bddd6a75.js";import{n as K}from"./p-8511f124.js";import{o as L}from"./p-23fd0f5c.js";function M(e){const t=a(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&null!==e.offsetParent&&"hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i))}let T,q=[];class I{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){q.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){q=q.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return q[q.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>M(e)))??null,end:t.reverse().find((e=>M(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}n(["before","after"],((e,t)=>{r.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,s)=>{const o=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;n(o,(e=>{let o;o=(e=>l(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?r(d(e,"div")):i&&h(e)?r(e.cloneNode(!0)):r(e),o[t?"insertAfter":"insertBefore"](s)}))}))}})),r.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},n(["prepend","append"],((e,t)=>{r.fn[e]=function(...e){return this.each(((i,s)=>{const o=s.childNodes,a=o.length,n=a?o[t?a-1:0]:p("div");a||u(s,n);let d=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;i&&(d=d.map((e=>l(e)?e:r(e).clone()))),r(n)[t?"after":"before"](...d),a||f(n)}))}}));const U=e=>{if(y(document))return 0;if(e||void 0===T){const e=r("<div>").css({width:"100%",height:"200px"}),t=r("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let s=e[0].offsetWidth;i===s&&(s=t[0].clientWidth),t.remove(),T=i-s}return T},_=new WeakMap,N="mdui-lock-screen",Q=(e,t)=>{const i=m();t??=i.documentElement;const s=_.get(t);s&&(s.delete(e),0===s.size&&(_.delete(t),r(t).removeClass(N).width("")))},R=b`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let W=class extends ${constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=j(),this.panelRef=j(),this.bodyRef=j(),this.hasSlotController=new z(this,"header","icon","headline","description","action","[default]"),this.definedController=new C(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=F(this,"linear"),s=F(this,"emphasized-decelerate"),o=F(this,"emphasized-accelerate"),a=()=>Promise.all([H(this.overlayRef.value),H(this.panelRef.value),...t.map((e=>H(e)))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const o=this.topAppBarElements??[];if(o.length){const e=o[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),((e,t)=>{const i=m();t??=i.documentElement,_.has(t)||_.set(t,new Set),_.get(t).add(e);const s=r(t);(e=>e.scrollHeight>e.clientHeight)(t)&&s.css("width",`calc(100% - ${U()}px)`),s.addClass(N)})(this),await a(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const n=P(this,"medium4");await Promise.all([S(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?n:0,easing:i}),S(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?n:0,easing:s}),S(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?n:0,easing:i}),...t.map((t=>S(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?n:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await a();const e=P(this,"short4");await Promise.all([S(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),S(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:o}),S(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>S(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Q(this);const s=this.originalTrigger;"function"==typeof s?.focus&&setTimeout((()=>s.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Q(this),L(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new I(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),s=!!this.headline||this.hasSlotController.test("headline"),o=!!this.description||this.hasSlotController.test("description"),a=i||s||this.hasSlotController.test("header"),n=o||t;return O`<div ${Y(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${Y(this.panelRef)} part="panel" class="panel ${A({"has-icon":i,"has-description":o,"has-default":t})}" tabindex="0">${D(a,(()=>O`<slot name="header" part="header" class="header">${D(i,(()=>this.renderIcon()))} ${D(s,(()=>this.renderHeadline()))}</slot>`))} ${D(n,(()=>O`<div ${Y(this.bodyRef)} part="body" class="body">${D(o,(()=>this.renderDescription()))}<slot></slot></div>`))} ${D(e,(()=>O`<slot name="action" part="action" class="action"></slot>`))}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return O`<slot name="icon" part="icon" class="icon">${this.icon?O`<mdui-icon name="${this.icon}"></mdui-icon>`:K}</slot>`}renderHeadline(){return O`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return O`<slot name="description" part="description" class="description">${this.description}</slot>`}};W.styles=[v,R],g([x({reflect:!0})],W.prototype,"icon",void 0),g([x({reflect:!0})],W.prototype,"headline",void 0),g([x({reflect:!0})],W.prototype,"description",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"open",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"fullscreen",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-esc"})],W.prototype,"closeOnEsc",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-overlay-click"})],W.prototype,"closeOnOverlayClick",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"stacked-actions"})],W.prototype,"stackedActions",void 0),g([B({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],W.prototype,"topAppBarElements",void 0),g([E("open")],W.prototype,"onOpenChange",null),W=g([w("mdui-dialog")],W);const G=class{constructor(i){e(this,i),this.dialogConfirmed=t(this,"dialogConfirmed",7),this.icon=null,this.headline=null,this.description=null,this.open=!1,this.fullscreen=!1,this.closeOnEsc=!0,this.closeOnOverlayClick=!0}componentDidLoad(){this.dialogElement=this.el.shadowRoot.querySelector(".inner-dialog")}async openDialog(){this.dialogElement.open=!0}async closeDialog(){this.dialogElement.open=!1}handleConfirm(){this.dialogConfirmed.emit(),this.closeDialog()}render(){return i(s,{key:"b5c3f0ff29a99e329d9a076615f7f4056670f46c"},i("mdui-dialog",{key:"a358b6430c99e86f39602dfd0cc737d9b725520e",open:this.open,"close-on-overlay-click":this.closeOnOverlayClick,"close-on-esc":this.closeOnEsc,fullscreen:this.fullscreen,class:"inner-dialog"},i("div",{key:"3f508fce39fcfa00a05a2b59a61cf547b0466b29",class:"title"},this.headline),i("div",{key:"e34efaadc5ddd5669a473418f53a3a532d2ddd50",class:"description"},this.description),i("div",{key:"97563974675c73ae2d273c24e262452002eb82a6",class:"actions"},i("ur-button",{key:"ec3e45a40117667f6149e2353d271f3ca186300a",onClick:()=>this.handleConfirm()},"Confirm"),i("ur-button",{key:"c86582eb6834e16471386c7bc83a73579b277d70",onClick:()=>this.closeDialog()},"Cancel"))),i("ur-button",{key:"4f31529d61bbf8b9973bee58f101e9ee661624e1",onClick:()=>this.openDialog()},"Open Dialog"))}get el(){return o(this)}};G.style=":host{--ur-color-on-background:var(--mdui-color-on-background)}:host .dialog{display:block;width:auto}:host .title{font-size:20px;display:flex;justify-content:center}:host .description{display:flex;justify-content:center;font-size:12px}:host .actions{display:flex;justify-content:center;gap:16px;padding-top:12px}:host .actions ur-button{padding:8px 20px;font-size:14px;border:none;color:rgb(var(--ur-color-on-background));border-radius:4px;cursor:pointer}";export{G as ur_dialog}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-4d1afe53",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-7e255f77",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));
1
+ import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-a7977d7c",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-38369b00",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "urnovl-web-components",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "description": "Web components for Urnovl",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s}from"./p-782012c9.js";import"./p-0571ebea.js";import{i as h,c as n,_ as o,n as r,b as a,t as l,M as c,a as d,e as u,f as m,k as p,K as f,$ as b,J as v,u as g,T as y,g as w,d as $,H as k,D as x}from"./p-a79a137e.js";import{r as C,F as j}from"./p-2f04e32a.js";import{o as O}from"./p-ff443927.js";import{t as S}from"./p-8410d797.js";import{a as D,o as E}from"./p-c30736fe.js";import{n as I}from"./p-cb1f5d6c.js";import{F as B,f as T}from"./p-ccaeac43.js";import{d as M}from"./p-cce55daf.js";import{o as V}from"./p-3d163c89.js";import"./p-34388ac0.js";import{w as A}from"./p-8994d758.js";import{g as K,a as P,s as z,b as F}from"./p-bddd6a75.js";import"./p-3fda3ec3.js";import"./p-c5180928.js";import"./p-8511f124.js";import"./p-e65a0f4a.js";import"./p-3db231e7.js";import"./p-c9791cda.js";import"./p-01994b35.js";import"./p-e4f27de6.js";import"./p-23fd0f5c.js";import"./p-a01434f1.js";function N(t){return H(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var i;return(null==t||null==(i=t.ownerDocument)?void 0:i.defaultView)||window}function H(t){return t instanceof Node||t instanceof _(t).Node}function q(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof _(t).ShadowRoot)}function L(t){const{overflow:i,overflowX:e,overflowY:s,display:h}=function(t){return _(t).getComputedStyle(t)}(t);return/auto|scroll|overlay|hidden|clip/.test(i+s+e)&&!["inline","contents"].includes(h)}function U(t){const i=function(t){if("html"===N(t))return t;const i=t.assignedSlot||t.parentNode||q(t)&&t.host||function(t){var i;return null==(i=(H(t)?t.ownerDocument:t.document)||window.document)?void 0:i.documentElement}(t);return q(i)?i.host:i}(t);return function(t){return["html","body","#document"].includes(N(t))}(i)?t.ownerDocument?t.ownerDocument.body:t.body:((e=i)instanceof HTMLElement||e instanceof _(e).HTMLElement)&&L(i)?i:U(i);var e}function R(t,i,e){var s;void 0===i&&(i=[]),void 0===e&&(e=!0);const h=U(t),n=h===(null==(s=t.ownerDocument)?void 0:s.body),o=_(h);if(n){const t=function(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}(o);return i.concat(o,o.visualViewport||[],L(h)?h:[],t&&e?R(t):[])}return i.concat(h,R(h,[],e))}const W=h`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let X=class extends c{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=d(),this.definedController=new u(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const t=this.hasUpdated;if(!this.open&&!t)return;await this.definedController.whenDefined(),t||await this.updateComplete;const i=K(this,"linear"),e=K(this,"emphasized-decelerate"),s=K(this,"emphasized-accelerate");if(this.open){if(t&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find((t=>m(t.focus)));setTimeout((()=>{s?.focus()}));const h=P(this,"medium4");await z(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:t?h:0,easing:e}),F(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:t?h:0,easing:i})]),t&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const t=P(this,"short4");await z(this.panelRef.value),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:t,easing:s}),F(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:t,easing:i})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=R(this.triggerElement),this.overflowAncestors.forEach((t=>{t.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=V(this.triggerElement,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((t=>{t.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(t){super.firstUpdated(t),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)}))}render(){return p`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${f(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(t){if(this.disabled||!this.open)return;const i=t.composedPath();i.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&i.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(t){!this.disabled&&this.open&&("Escape"!==t.key?"Tab"===t.key&&(!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&t.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(t){return this.trigger.split(" ").includes(t)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(t){this.disabled||t.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!this.open)}onPanelClick(t){this.disabled||this.stayOpenOnClick||!b(t.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(t){!this.disabled&&this.hasTrigger("contextmenu")&&(t.preventDefault(),this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const t=b(this.panelRef.value),i=b(window),e=this.panelElements,s=Math.max(...e?.map((t=>t.offsetWidth))??[]),h=e?.map((t=>t.offsetHeight)).reduce(((t,i)=>t+i),0),n=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+n.top,left:this.pointerOffsetX+n.left,width:0,height:0}:n;let r,a,l,c,d=this.placement;if("auto"===d){const t=i.width(),e=i.height();let n,r;n=e-o.top-o.height>h+8?"bottom":o.top>h+8?"top":t-o.left-o.width>s+8?"right":o.left>s+8?"left":"bottom",r=["top","bottom"].includes(n)?t-o.left>s+8?"start":o.left+o.width/2>s/2+8&&t-o.left-o.width/2>s/2+8?void 0:o.left+o.width>s+8?"end":"start":e-o.top>h+8?"start":o.top+o.height/2>h/2+8&&e-o.top-o.height/2>h/2+8?void 0:o.top+o.height>h+8?"end":"start",d=r?[n,r].join("-"):n}const[u,m]=d.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":a="bottom",l=o.top-h;break;case"bottom":a="top",l=o.top+o.height;break;default:switch(a="center",m){case"start":l=o.top;break;case"end":l=o.top+o.height-h;break;default:l=o.top+o.height/2-h/2}}switch(u){case"left":r="right",c=o.left-s;break;case"right":r="left",c=o.left+o.width;break;default:switch(r="center",m){case"start":c=o.left;break;case"end":c=o.left+o.width-s;break;default:c=o.left+o.width/2-s/2}}t.css({top:l,left:c,transformOrigin:[r,a].join(" ")})}};X.styles=[n,W],o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"open",void 0),o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"disabled",void 0),o([r({reflect:!0})],X.prototype,"trigger",void 0),o([r({reflect:!0})],X.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"stay-open-on-click"})],X.prototype,"stayOpenOnClick",void 0),o([r({type:Number,reflect:!0,attribute:"open-delay"})],X.prototype,"openDelay",void 0),o([r({type:Number,reflect:!0,attribute:"close-delay"})],X.prototype,"closeDelay",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"open-on-pointer"})],X.prototype,"openOnPointer",void 0),o([O({slot:"trigger",flatten:!0})],X.prototype,"triggerElements",void 0),o([O({flatten:!0})],X.prototype,"panelElements",void 0),o([A("placement",!0),A("openOnPointer",!0)],X.prototype,"onPositionChange",null),o([A("open")],X.prototype,"onOpenChange",null),X=o([l("mdui-dropdown")],X),b.fn.add=function(t){return new v(g(y(this.get(),b(t).get())))};const Y=h`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let J=class extends c{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get items(){return b(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((t=>!t.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!b(this).parent().length}get lastActiveItem(){return this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]}set lastActiveItem(t){this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]=t}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((t=>{t.dense=this.dense,t.selects=this.selects,t.submenuTrigger=this.submenuTrigger,t.submenuOpenDelay=this.submenuOpenDelay,t.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const t=this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).map((t=>t.value));this.setValue(this.isMultiple?t:t[0]||void 0),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const t=(this.isSingle||w(this.value)?[this.value]:this.value).filter((t=>t));if(t.length)if(this.isSingle){const i=this.itemsEnabled.find((i=>i.value===t[0]));this.setSelectedKeys(i?[i.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((i=>t.includes(i.value))).map((t=>t.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(t){this.lastActiveItem&&this.focusOne(this.lastActiveItem,t)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(t){super.firstUpdated(t),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((t=>t.focusable))})),this.addEventListener("submenu-open",(t=>{const i=b(t.target),e=i.children("mdui-menu-item:not([disabled])").get(),s=i.parents("mdui-menu-item").length+1;e.length&&(this.lastActiveItems[s]=e[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))})),this.addEventListener("submenu-close",(t=>{const i=b(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===i&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[i-1]&&this.focusOne(this.lastActiveItems[i-1]))}))}render(){return p`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(t){D(this.selectedKeys,t)||(this.selectedKeys=t)}setValue(t){this.isSingle||$(this.value)||$(t)?this.value=t:D(this.value,t)||(this.value=t)}getSiblingsItems(t,i=!1){return b(t).parent().children("mdui-menu-item"+(i?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((t=>{t.focusable=t.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((t=>{t.focusable=this.selectedKeys.includes(t.key)}));else if(this.isMultiple){const t=this.items.find((t=>t.focusable));t?.key&&this.selectedKeys.includes(t.key)||this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).forEach(((t,i)=>t.focusable=!i))}}else this.itemsEnabled.forEach(((t,i)=>{t.focusable=!i}))}updateSelected(){this.items.forEach((t=>{t.selected=this.selectedKeys.includes(t.key)}))}selectOne(t){if(this.isMultiple){const i=[...this.selectedKeys];i.includes(t.key)?i.splice(i.indexOf(t.key),1):i.push(t.key),this.setSelectedKeys(i)}this.isSingle&&(this.selectedKeys.includes(t.key)?this.setSelectedKeys([]):this.setSelectedKeys([t.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(t){this.items.forEach((i=>i.focusable=i.key===t.key)),await((t=0)=>new Promise((i=>setTimeout(i,t))))()}focusOne(t,i){t.focus(i)}async onClick(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(t.button)return;const i=t.target.closest("mdui-menu-item");i&&!i.disabled&&(this.lastActiveItem=i,this.isSelectable&&i.value&&this.selectOne(i),await this.focusableOne(i),this.focusOne(i))}async onKeyDown(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const i=t.target;if("Enter"===t.key&&(t.preventDefault(),i.click())," "===t.key&&(t.preventDefault(),this.isSelectable&&i.value&&(this.selectOne(i),await this.focusableOne(i),this.focusOne(i))),["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getSiblingsItems(i,!0),s=e.find((t=>t.focusable));let h=s?e.indexOf(s):0;if(e.length>0)return t.preventDefault(),"ArrowDown"===t.key?h++:"ArrowUp"===t.key?h--:"Home"===t.key?h=0:"End"===t.key&&(h=e.length-1),h<0&&(h=e.length-1),h>e.length-1&&(h=0),this.lastActiveItem=e[h],await this.focusableOne(e[h]),void this.focusOne(e[h])}}};J.styles=[n,Y],o([r({reflect:!0})],J.prototype,"selects",void 0),o([r()],J.prototype,"value",void 0),o([r({type:Boolean,reflect:!0,converter:a})],J.prototype,"dense",void 0),o([r({reflect:!0,attribute:"submenu-trigger"})],J.prototype,"submenuTrigger",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-open-delay"})],J.prototype,"submenuOpenDelay",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-close-delay"})],J.prototype,"submenuCloseDelay",void 0),o([C()],J.prototype,"selectedKeys",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],J.prototype,"childrenItems",void 0),o([A("dense"),A("selects"),A("submenuTrigger"),A("submenuOpenDelay"),A("submenuCloseDelay")],J.prototype,"onSlotChange",null),o([A("selects",!0)],J.prototype,"onSelectsChange",null),o([A("selectedKeys",!0)],J.prototype,"onSelectedKeysChange",null),o([A("value")],J.prototype,"onValueChange",null),J=o([l("mdui-menu")],J);const G=h`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let Q=class extends(j(c)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=d(),this.textFieldRef=d(),this.hiddenInputRef=d(),this.formController=new B(this),this.hasSlotController=new k(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&w(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()})),this.updateComplete.then((()=>{this.observeResize=V(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const t=this.hiddenInputRef.value.checkValidity();return t||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),t}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(t){this.hiddenInputRef.value.setCustomValidity(t),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const t=this.multiple?!!this.value.length:!!this.value;return p`${this.multiple?p`<select ${f(this.hiddenInputRef)} class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${E(this.value,(t=>p`<option selected="selected" value="${t}"></option>`))}</select>`:p`<input ${f(this.hiddenInputRef)} type="radio" class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${t}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${"top"===this.placement?"top-start":"bottom"===this.placement?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${f(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map((t=>`${t}:text-field__${t}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${E(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(t=>this.hasSlotController.test(t)?p`<slot name="${t}" slot="${t}"></slot>`:x))} ${I(this.multiple&&this.value.length,(()=>p`<div slot="input" class="chips" part="chips">${E(this.value,(t=>p`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map((t=>`${t}:chip__${t}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`))}</div>`))}</mdui-text-field><mdui-menu ${f(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(t){return this.menuItems.length&&this.menuItems.find((i=>i.value===t))?.textContent?.trim()||t}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(t){const i=t.target;this.value=this.multiple?i.value.map((t=>t??"")):i.value??"",await this.updateComplete;const e=this.formController.getForm();e&&T.get(e)?.has(this)?(this.invalid=!1,T.get(e).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(t){const i=[...this.value];i.includes(t)&&i.splice(i.indexOf(t),1),this.value=i}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(t){"Enter"===t.key&&(t.preventDefault(),this.textFieldRef.value.click())}};Q.styles=[n,G],o([r({reflect:!0})],Q.prototype,"variant",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"multiple",void 0),o([r({reflect:!0})],Q.prototype,"name",void 0),o([r()],Q.prototype,"value",void 0),o([M()],Q.prototype,"defaultValue",void 0),o([r({reflect:!0})],Q.prototype,"label",void 0),o([r({reflect:!0})],Q.prototype,"placeholder",void 0),o([r({reflect:!0})],Q.prototype,"helper",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"clearable",void 0),o([r({reflect:!0,attribute:"clear-icon"})],Q.prototype,"clearIcon",void 0),o([r({reflect:!0})],Q.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"end-aligned"})],Q.prototype,"endAligned",void 0),o([r({reflect:!0})],Q.prototype,"prefix",void 0),o([r({reflect:!0})],Q.prototype,"suffix",void 0),o([r({reflect:!0})],Q.prototype,"icon",void 0),o([r({reflect:!0,attribute:"end-icon"})],Q.prototype,"endIcon",void 0),o([r({reflect:!0,attribute:"error-icon"})],Q.prototype,"errorIcon",void 0),o([r({reflect:!0})],Q.prototype,"form",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"readonly",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"disabled",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"required",void 0),o([C()],Q.prototype,"invalid",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],Q.prototype,"menuItems",void 0),Q=o([l("mdui-select")],Q);const Z=class{constructor(e){t(this,e),this.itemClicked=i(this,"itemClicked",7),this.label="Text Field",this.name="",this.value="",this.placeholder=null,this.helper=null,this.readonly=!1,this.disabled=!1,this.clearable=!1,this.multiple=!1,this.endAligned=!1,this.variant="filled",this.placement="auto",this.icon=null,this.endIcon=null,this.form=null,this.items=[],this.selectedValue=this.multiple?[]:""}valueChanged(t){this.selectedValue=t}handleItemClicked(t){const i=t.detail;if(this.multiple){const t=Array.isArray(this.selectedValue)?[...this.selectedValue]:[],e=t.indexOf(i);e>-1?t.splice(e,1):t.push(i),this.selectedValue=t}else this.selectedValue=i;this.itemClicked.emit(this.selectedValue)}componentWillLoad(){this.selectedValue=this.value}render(){return e(s,{key:"ed416c8053b6e0d32ad916cb99a8e933b4726879"},e("mdui-select",{key:"ad9f46e88ec5b520e288132b39d7bd48bac3a888",label:this.label,name:this.name,value:this.selectedValue,placeholder:this.placeholder,helper:this.helper,readonly:this.readonly,disabled:this.disabled,clearable:this.clearable,multiple:this.multiple,"end-aligned":this.endAligned,variant:this.variant,placement:this.placement,icon:this.icon,"end-icon":this.endIcon,form:this.form},this.items.map((([t,i,s])=>e("ur-menu-item",{value:i,label:t,disabled:s,onItemClicked:t=>this.handleItemClicked(t)})))))}static get watchers(){return{value:["valueChanged"]}}};Z.style=":host{display:block}";export{Z as ur_select}
1
+ import{r as t,c as i,h as e,H as s}from"./p-782012c9.js";import"./p-0571ebea.js";import{i as h,c as n,_ as o,n as r,b as a,t as l,M as c,a as d,e as u,f as m,k as p,K as f,$ as b,J as v,u as g,T as y,g as w,d as $,H as k,D as x}from"./p-a79a137e.js";import{r as C,F as j}from"./p-2f04e32a.js";import{o as O}from"./p-ff443927.js";import{t as S}from"./p-8410d797.js";import{a as D,o as E}from"./p-c30736fe.js";import{n as I}from"./p-cb1f5d6c.js";import{F as B,f as T}from"./p-ccaeac43.js";import{d as M}from"./p-cce55daf.js";import{o as V}from"./p-3d163c89.js";import"./p-34388ac0.js";import{w as A}from"./p-8994d758.js";import{g as K,a as P,s as z,b as F}from"./p-bddd6a75.js";import"./p-3fda3ec3.js";import"./p-c5180928.js";import"./p-8511f124.js";import"./p-e65a0f4a.js";import"./p-3db231e7.js";import"./p-c9791cda.js";import"./p-01994b35.js";import"./p-e4f27de6.js";import"./p-23fd0f5c.js";import"./p-a01434f1.js";function N(t){return H(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var i;return(null==t||null==(i=t.ownerDocument)?void 0:i.defaultView)||window}function H(t){return t instanceof Node||t instanceof _(t).Node}function q(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof _(t).ShadowRoot)}function L(t){const{overflow:i,overflowX:e,overflowY:s,display:h}=function(t){return _(t).getComputedStyle(t)}(t);return/auto|scroll|overlay|hidden|clip/.test(i+s+e)&&!["inline","contents"].includes(h)}function U(t){const i=function(t){if("html"===N(t))return t;const i=t.assignedSlot||t.parentNode||q(t)&&t.host||function(t){var i;return null==(i=(H(t)?t.ownerDocument:t.document)||window.document)?void 0:i.documentElement}(t);return q(i)?i.host:i}(t);return function(t){return["html","body","#document"].includes(N(t))}(i)?t.ownerDocument?t.ownerDocument.body:t.body:((e=i)instanceof HTMLElement||e instanceof _(e).HTMLElement)&&L(i)?i:U(i);var e}function R(t,i,e){var s;void 0===i&&(i=[]),void 0===e&&(e=!0);const h=U(t),n=h===(null==(s=t.ownerDocument)?void 0:s.body),o=_(h);if(n){const t=function(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}(o);return i.concat(o,o.visualViewport||[],L(h)?h:[],t&&e?R(t):[])}return i.concat(h,R(h,[],e))}const W=h`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let X=class extends c{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=d(),this.definedController=new u(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const t=this.hasUpdated;if(!this.open&&!t)return;await this.definedController.whenDefined(),t||await this.updateComplete;const i=K(this,"linear"),e=K(this,"emphasized-decelerate"),s=K(this,"emphasized-accelerate");if(this.open){if(t&&!this.emit("open",{cancelable:!0}))return;const s=this.panelElements.find((t=>m(t.focus)));setTimeout((()=>{s?.focus()}));const h=P(this,"medium4");await z(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:t?h:0,easing:e}),F(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:t?h:0,easing:i})]),t&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const t=P(this,"short4");await z(this.panelRef.value),await Promise.all([F(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:t,easing:s}),F(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:t,easing:i})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=R(this.triggerElement),this.overflowAncestors.forEach((t=>{t.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=V(this.triggerElement,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((t=>{t.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(t){super.firstUpdated(t),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)}))}render(){return p`<slot name="trigger" part="trigger" class="trigger"></slot><slot ${f(this.panelRef)} part="panel" class="panel" hidden @click="${this.onPanelClick}"></slot>`}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(t){if(this.disabled||!this.open)return;const i=t.composedPath();i.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&i.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(t){!this.disabled&&this.open&&("Escape"!==t.key?"Tab"===t.key&&(!this.hasTrigger("focus")&&m(this.triggerElement?.focus)&&t.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(t){return this.trigger.split(" ").includes(t)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(t){this.disabled||t.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!this.open)}onPanelClick(t){this.disabled||this.stayOpenOnClick||!b(t.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(t){!this.disabled&&this.hasTrigger("contextmenu")&&(t.preventDefault(),this.pointerOffsetX=t.offsetX,this.pointerOffsetY=t.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const t=b(this.panelRef.value),i=b(window),e=this.panelElements,s=Math.max(...e?.map((t=>t.offsetWidth))??[]),h=e?.map((t=>t.offsetHeight)).reduce(((t,i)=>t+i),0),n=this.triggerElement.getBoundingClientRect(),o=this.openOnPointer?{top:this.pointerOffsetY+n.top,left:this.pointerOffsetX+n.left,width:0,height:0}:n;let r,a,l,c,d=this.placement;if("auto"===d){const t=i.width(),e=i.height();let n,r;n=e-o.top-o.height>h+8?"bottom":o.top>h+8?"top":t-o.left-o.width>s+8?"right":o.left>s+8?"left":"bottom",r=["top","bottom"].includes(n)?t-o.left>s+8?"start":o.left+o.width/2>s/2+8&&t-o.left-o.width/2>s/2+8?void 0:o.left+o.width>s+8?"end":"start":e-o.top>h+8?"start":o.top+o.height/2>h/2+8&&e-o.top-o.height/2>h/2+8?void 0:o.top+o.height>h+8?"end":"start",d=r?[n,r].join("-"):n}const[u,m]=d.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":a="bottom",l=o.top-h;break;case"bottom":a="top",l=o.top+o.height;break;default:switch(a="center",m){case"start":l=o.top;break;case"end":l=o.top+o.height-h;break;default:l=o.top+o.height/2-h/2}}switch(u){case"left":r="right",c=o.left-s;break;case"right":r="left",c=o.left+o.width;break;default:switch(r="center",m){case"start":c=o.left;break;case"end":c=o.left+o.width-s;break;default:c=o.left+o.width/2-s/2}}t.css({top:l,left:c,transformOrigin:[r,a].join(" ")})}};X.styles=[n,W],o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"open",void 0),o([r({type:Boolean,reflect:!0,converter:a})],X.prototype,"disabled",void 0),o([r({reflect:!0})],X.prototype,"trigger",void 0),o([r({reflect:!0})],X.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"stay-open-on-click"})],X.prototype,"stayOpenOnClick",void 0),o([r({type:Number,reflect:!0,attribute:"open-delay"})],X.prototype,"openDelay",void 0),o([r({type:Number,reflect:!0,attribute:"close-delay"})],X.prototype,"closeDelay",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"open-on-pointer"})],X.prototype,"openOnPointer",void 0),o([O({slot:"trigger",flatten:!0})],X.prototype,"triggerElements",void 0),o([O({flatten:!0})],X.prototype,"panelElements",void 0),o([A("placement",!0),A("openOnPointer",!0)],X.prototype,"onPositionChange",null),o([A("open")],X.prototype,"onOpenChange",null),X=o([l("mdui-dropdown")],X),b.fn.add=function(t){return new v(g(y(this.get(),b(t).get())))};const Y=h`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let J=class extends c{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get items(){return b(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((t=>!t.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!b(this).parent().length}get lastActiveItem(){return this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]}set lastActiveItem(t){this.lastActiveItems[this.lastActiveItems.length?this.lastActiveItems.length-1:0]=t}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((t=>{t.dense=this.dense,t.selects=this.selects,t.submenuTrigger=this.submenuTrigger,t.submenuOpenDelay=this.submenuOpenDelay,t.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const t=this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).map((t=>t.value));this.setValue(this.isMultiple?t:t[0]||void 0),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const t=(this.isSingle||w(this.value)?[this.value]:this.value).filter((t=>t));if(t.length)if(this.isSingle){const i=this.itemsEnabled.find((i=>i.value===t[0]));this.setSelectedKeys(i?[i.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((i=>t.includes(i.value))).map((t=>t.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(t){this.lastActiveItem&&this.focusOne(this.lastActiveItem,t)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(t){super.firstUpdated(t),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((t=>t.focusable))})),this.addEventListener("submenu-open",(t=>{const i=b(t.target),e=i.children("mdui-menu-item:not([disabled])").get(),s=i.parents("mdui-menu-item").length+1;e.length&&(this.lastActiveItems[s]=e[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[s]))})),this.addEventListener("submenu-close",(t=>{const i=b(t.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===i&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[i-1]&&this.focusOne(this.lastActiveItems[i-1]))}))}render(){return p`<slot @slotchange="${this.onSlotChange}" @click="${this.onClick}" @keydown="${this.onKeyDown}"></slot>`}setSelectedKeys(t){D(this.selectedKeys,t)||(this.selectedKeys=t)}setValue(t){this.isSingle||$(this.value)||$(t)?this.value=t:D(this.value,t)||(this.value=t)}getSiblingsItems(t,i=!1){return b(t).parent().children("mdui-menu-item"+(i?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((t=>{t.focusable=t.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((t=>{t.focusable=this.selectedKeys.includes(t.key)}));else if(this.isMultiple){const t=this.items.find((t=>t.focusable));t?.key&&this.selectedKeys.includes(t.key)||this.itemsEnabled.filter((t=>this.selectedKeys.includes(t.key))).forEach(((t,i)=>t.focusable=!i))}}else this.itemsEnabled.forEach(((t,i)=>{t.focusable=!i}))}updateSelected(){this.items.forEach((t=>{t.selected=this.selectedKeys.includes(t.key)}))}selectOne(t){if(this.isMultiple){const i=[...this.selectedKeys];i.includes(t.key)?i.splice(i.indexOf(t.key),1):i.push(t.key),this.setSelectedKeys(i)}this.isSingle&&(this.selectedKeys.includes(t.key)?this.setSelectedKeys([]):this.setSelectedKeys([t.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(t){this.items.forEach((i=>i.focusable=i.key===t.key)),await((t=0)=>new Promise((i=>setTimeout(i,t))))()}focusOne(t,i){t.focus(i)}async onClick(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(t.button)return;const i=t.target.closest("mdui-menu-item");i&&!i.disabled&&(this.lastActiveItem=i,this.isSelectable&&i.value&&this.selectOne(i),await this.focusableOne(i),this.focusOne(i))}async onKeyDown(t){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const i=t.target;if("Enter"===t.key&&(t.preventDefault(),i.click())," "===t.key&&(t.preventDefault(),this.isSelectable&&i.value&&(this.selectOne(i),await this.focusableOne(i),this.focusOne(i))),["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getSiblingsItems(i,!0),s=e.find((t=>t.focusable));let h=s?e.indexOf(s):0;if(e.length>0)return t.preventDefault(),"ArrowDown"===t.key?h++:"ArrowUp"===t.key?h--:"Home"===t.key?h=0:"End"===t.key&&(h=e.length-1),h<0&&(h=e.length-1),h>e.length-1&&(h=0),this.lastActiveItem=e[h],await this.focusableOne(e[h]),void this.focusOne(e[h])}}};J.styles=[n,Y],o([r({reflect:!0})],J.prototype,"selects",void 0),o([r()],J.prototype,"value",void 0),o([r({type:Boolean,reflect:!0,converter:a})],J.prototype,"dense",void 0),o([r({reflect:!0,attribute:"submenu-trigger"})],J.prototype,"submenuTrigger",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-open-delay"})],J.prototype,"submenuOpenDelay",void 0),o([r({type:Number,reflect:!0,attribute:"submenu-close-delay"})],J.prototype,"submenuCloseDelay",void 0),o([C()],J.prototype,"selectedKeys",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],J.prototype,"childrenItems",void 0),o([A("dense"),A("selects"),A("submenuTrigger"),A("submenuOpenDelay"),A("submenuCloseDelay")],J.prototype,"onSlotChange",null),o([A("selects",!0)],J.prototype,"onSelectsChange",null),o([A("selectedKeys",!0)],J.prototype,"onSelectedKeysChange",null),o([A("value")],J.prototype,"onValueChange",null),J=o([l("mdui-menu")],J);const G=h`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let Q=class extends(j(c)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=d(),this.textFieldRef=d(),this.hiddenInputRef=d(),this.formController=new B(this),this.hasSlotController=new k(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new u(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&w(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()})),this.updateComplete.then((()=>{this.observeResize=V(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const t=this.hiddenInputRef.value.checkValidity();return t||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),t}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(t){this.hiddenInputRef.value.setCustomValidity(t),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const t=this.multiple?!!this.value.length:!!this.value;return p`${this.multiple?p`<select ${f(this.hiddenInputRef)} class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" multiple="multiple" tabindex="-1">${E(this.value,(t=>p`<option selected="selected" value="${t}"></option>`))}</select>`:p`<input ${f(this.hiddenInputRef)} type="radio" class="hidden-input" name="${S(this.name)}" value="${S(this.value)}" .required="${this.required}" .disabled="${this.disabled}" .checked="${t}" tabindex="-1">`}<mdui-dropdown .stayOpenOnClick="${this.multiple}" .disabled="${this.readonly||this.disabled}" .placement="${"top"===this.placement?"top-start":"bottom"===this.placement?"bottom-start":"auto"}" @open="${this.onDropdownOpen}" @close="${this.onDropdownClose}"><mdui-text-field ${f(this.textFieldRef)} slot="trigger" part="text-field" class="text-field" exportparts="${["container","icon","end-icon","error-icon","prefix","suffix","label","input","clear-button","clear-icon","supporting","helper","error"].map((t=>`${t}:text-field__${t}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${t=>t.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${E(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(t=>this.hasSlotController.test(t)?p`<slot name="${t}" slot="${t}"></slot>`:x))} ${I(this.multiple&&this.value.length,(()=>p`<div slot="input" class="chips" part="chips">${E(this.value,(t=>p`<mdui-chip class="chip" part="chip" exportparts="${["button","label","delete-icon"].map((t=>`${t}:chip__${t}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(t)}">${this.getMenuItemLabelByValue(t)}</mdui-chip>`))}</div>`))}</mdui-text-field><mdui-menu ${f(this.menuRef)} part="menu" .selects="${this.multiple?"multiple":"single"}" .value="${this.value}" @change="${this.onValueChange}"><slot></slot></mdui-menu></mdui-dropdown>`}getMenuItemLabelByValue(t){return this.menuItems.length&&this.menuItems.find((i=>i.value===t))?.textContent?.trim()||t}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(t){const i=t.target;this.value=this.multiple?i.value.map((t=>t??"")):i.value??"",await this.updateComplete;const e=this.formController.getForm();e&&T.get(e)?.has(this)?(this.invalid=!1,T.get(e).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(t){const i=[...this.value];i.includes(t)&&i.splice(i.indexOf(t),1),this.value=i}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(t){"Enter"===t.key&&(t.preventDefault(),this.textFieldRef.value.click())}};Q.styles=[n,G],o([r({reflect:!0})],Q.prototype,"variant",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"multiple",void 0),o([r({reflect:!0})],Q.prototype,"name",void 0),o([r()],Q.prototype,"value",void 0),o([M()],Q.prototype,"defaultValue",void 0),o([r({reflect:!0})],Q.prototype,"label",void 0),o([r({reflect:!0})],Q.prototype,"placeholder",void 0),o([r({reflect:!0})],Q.prototype,"helper",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"clearable",void 0),o([r({reflect:!0,attribute:"clear-icon"})],Q.prototype,"clearIcon",void 0),o([r({reflect:!0})],Q.prototype,"placement",void 0),o([r({type:Boolean,reflect:!0,converter:a,attribute:"end-aligned"})],Q.prototype,"endAligned",void 0),o([r({reflect:!0})],Q.prototype,"prefix",void 0),o([r({reflect:!0})],Q.prototype,"suffix",void 0),o([r({reflect:!0})],Q.prototype,"icon",void 0),o([r({reflect:!0,attribute:"end-icon"})],Q.prototype,"endIcon",void 0),o([r({reflect:!0,attribute:"error-icon"})],Q.prototype,"errorIcon",void 0),o([r({reflect:!0})],Q.prototype,"form",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"readonly",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"disabled",void 0),o([r({type:Boolean,reflect:!0,converter:a})],Q.prototype,"required",void 0),o([C()],Q.prototype,"invalid",void 0),o([O({flatten:!0,selector:"mdui-menu-item"})],Q.prototype,"menuItems",void 0),Q=o([l("mdui-select")],Q);const Z=class{constructor(e){t(this,e),this.itemClicked=i(this,"itemClicked",7),this.label="Text Field",this.name="",this.value="",this.placeholder=null,this.helper=null,this.readonly=!1,this.disabled=!1,this.clearable=!1,this.multiple=!1,this.endAligned=!1,this.variant="filled",this.placement="auto",this.icon=null,this.endIcon=null,this.form=null,this.items=[],this.selectedValue=this.multiple?[]:""}valueChanged(t){this.selectedValue=t}handleItemClicked(t){const i=t.detail;if(this.multiple){const t=Array.isArray(this.selectedValue)?[...this.selectedValue]:[],e=t.indexOf(i);e>-1?t.splice(e,1):t.push(i),this.selectedValue=t}else this.selectedValue=i;this.itemClicked.emit(this.selectedValue)}componentWillLoad(){this.selectedValue=this.value}render(){return e(s,{key:"b8f3af0cd689cc3fc0d11835843c3ec0deb0ad9d"},e("mdui-select",{key:"7263e4611efb2823f0fa3fa739e87013e0e37781",label:this.label,name:this.name,value:this.selectedValue,placeholder:this.placeholder,helper:this.helper,readonly:this.readonly,disabled:this.disabled,clearable:this.clearable,multiple:this.multiple,"end-aligned":this.endAligned,variant:this.variant,placement:this.placement,icon:this.icon,"end-icon":this.endIcon,form:this.form},this.items.map((([t,i,s])=>e("ur-menu-item",{value:i,label:t,disabled:s,onItemClicked:t=>this.handleItemClicked(t)})))))}static get watchers(){return{value:["valueChanged"]}}};Z.style=":host{display:block}";export{Z as ur_select}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as s,g as o}from"./p-782012c9.js";import{L as a,h as n,$ as r,f as c,g as d,N as l,l as h,O as p,P as u,Q as f,j as m,d as y,i as b,c as v,_ as g,n as x,b as k,t as w,M as $,a as j,H as z,e as C,k as O,K as Y,R as A}from"./p-a79a137e.js";import{o as B}from"./p-ff443927.js";import{n as D}from"./p-cb1f5d6c.js";import{w as E}from"./p-8994d758.js";import{g as F,s as H,a as P,b as S}from"./p-bddd6a75.js";import{n as K}from"./p-8511f124.js";import{o as L}from"./p-23fd0f5c.js";function M(e){const t=a(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&null!==e.offsetParent&&"hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i))}let T,q=[];class I{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){q.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){q=q.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return q[q.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>M(e)))??null,end:t.reverse().find((e=>M(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}n(["before","after"],((e,t)=>{r.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,s)=>{const o=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;n(o,(e=>{let o;o=(e=>d(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?r(l(e,"div")):i&&h(e)?r(e.cloneNode(!0)):r(e),o[t?"insertAfter":"insertBefore"](s)}))}))}})),r.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},n(["prepend","append"],((e,t)=>{r.fn[e]=function(...e){return this.each(((i,s)=>{const o=s.childNodes,a=o.length,n=a?o[t?a-1:0]:p("div");a||u(s,n);let l=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;i&&(l=l.map((e=>d(e)?e:r(e).clone()))),r(n)[t?"after":"before"](...l),a||f(n)}))}}));const U=e=>{if(y(document))return 0;if(e||void 0===T){const e=r("<div>").css({width:"100%",height:"200px"}),t=r("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let s=e[0].offsetWidth;i===s&&(s=t[0].clientWidth),t.remove(),T=i-s}return T},_=new WeakMap,N="mdui-lock-screen",Q=(e,t)=>{const i=m();t??=i.documentElement;const s=_.get(t);s&&(s.delete(e),0===s.size&&(_.delete(t),r(t).removeClass(N).width("")))},R=b`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let W=class extends ${constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=j(),this.panelRef=j(),this.bodyRef=j(),this.hasSlotController=new z(this,"header","icon","headline","description","action","[default]"),this.definedController=new C(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=F(this,"linear"),s=F(this,"emphasized-decelerate"),o=F(this,"emphasized-accelerate"),a=()=>Promise.all([H(this.overlayRef.value),H(this.panelRef.value),...t.map((e=>H(e)))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const o=this.topAppBarElements??[];if(o.length){const e=o[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),((e,t)=>{const i=m();t??=i.documentElement,_.has(t)||_.set(t,new Set),_.get(t).add(e);const s=r(t);(e=>e.scrollHeight>e.clientHeight)(t)&&s.css("width",`calc(100% - ${U()}px)`),s.addClass(N)})(this),await a(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const n=P(this,"medium4");await Promise.all([S(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?n:0,easing:i}),S(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?n:0,easing:s}),S(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?n:0,easing:i}),...t.map((t=>S(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?n:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await a();const e=P(this,"short4");await Promise.all([S(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),S(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:o}),S(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>S(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Q(this);const s=this.originalTrigger;"function"==typeof s?.focus&&setTimeout((()=>s.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Q(this),L(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new I(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),s=!!this.headline||this.hasSlotController.test("headline"),o=!!this.description||this.hasSlotController.test("description"),a=i||s||this.hasSlotController.test("header"),n=o||t;return O`<div ${Y(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${Y(this.panelRef)} part="panel" class="panel ${A({"has-icon":i,"has-description":o,"has-default":t})}" tabindex="0">${D(a,(()=>O`<slot name="header" part="header" class="header">${D(i,(()=>this.renderIcon()))} ${D(s,(()=>this.renderHeadline()))}</slot>`))} ${D(n,(()=>O`<div ${Y(this.bodyRef)} part="body" class="body">${D(o,(()=>this.renderDescription()))}<slot></slot></div>`))} ${D(e,(()=>O`<slot name="action" part="action" class="action"></slot>`))}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return O`<slot name="icon" part="icon" class="icon">${this.icon?O`<mdui-icon name="${this.icon}"></mdui-icon>`:K}</slot>`}renderHeadline(){return O`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return O`<slot name="description" part="description" class="description">${this.description}</slot>`}};W.styles=[v,R],g([x({reflect:!0})],W.prototype,"icon",void 0),g([x({reflect:!0})],W.prototype,"headline",void 0),g([x({reflect:!0})],W.prototype,"description",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"open",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"fullscreen",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-esc"})],W.prototype,"closeOnEsc",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-overlay-click"})],W.prototype,"closeOnOverlayClick",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"stacked-actions"})],W.prototype,"stackedActions",void 0),g([B({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],W.prototype,"topAppBarElements",void 0),g([E("open")],W.prototype,"onOpenChange",null),W=g([w("mdui-dialog")],W);const G=class{constructor(i){e(this,i),this.dialogConfirmed=t(this,"dialogConfirmed",7),this.icon=null,this.headline=null,this.description=null,this.open=!1,this.fullscreen=!1,this.closeOnEsc=!0,this.closeOnOverlayClick=!0}componentDidLoad(){this.dialogElement=this.el.shadowRoot.querySelector(".my-dialog")}openDialog(){this.dialogElement.open=!0}closeDialog(){this.dialogElement.open=!1}handleConfirm(){this.dialogConfirmed.emit(),this.closeDialog()}render(){return i(s,{key:"6fc0fdbb15e8953f3adce6938191f9f0547bd45c"},i("mdui-dialog",{key:"d64c5ee7a3c0aa0cfac3155feabfeb1968f52c5f",open:this.open,"close-on-overlay-click":this.closeOnOverlayClick,"close-on-esc":this.closeOnEsc,fullscreen:this.fullscreen,class:"my-dialog"},i("div",{key:"c5a727dc01f279d4376740dcde9e6da495415446",class:"title"},this.headline),i("div",{key:"fb628321aa016da40ff28681d7670563ed871399",class:"description"},this.description),i("div",{key:"5e6a4f32ed040251d4a580b5f031851d26e4ee5c",class:"actions"},i("ur-button",{key:"25ead0f6c3914bb57a5758f76951ef4bd0fc96a6",onClick:()=>this.handleConfirm()},"Confirm"),i("ur-button",{key:"102723d0b778765b32de33c26e4b7c876997e6f4",onClick:()=>this.closeDialog()},"Cancel"))),i("ur-button",{key:"04f5cf32ccf19f4641ce3f6962a6fba1ab69fc90",onClick:()=>this.openDialog()},"Open Dialog"))}get el(){return o(this)}};G.style=":host{--ur-color-on-background:var(--mdui-color-on-background)}:host .dialog{display:block;width:auto}:host .title{font-size:20px;display:flex;justify-content:center}:host .description{display:flex;justify-content:center;font-size:12px}:host .actions{display:flex;justify-content:center;gap:16px;padding-top:12px}:host .actions ur-button{padding:8px 20px;font-size:14px;border:none;color:rgb(var(--ur-color-on-background));border-radius:4px;cursor:pointer}";export{G as ur_dialog}
1
+ import{r as e,c as t,h as i,H as s,g as o}from"./p-782012c9.js";import{L as a,h as n,$ as r,f as c,g as l,N as d,l as h,O as p,P as u,Q as f,j as m,d as y,i as b,c as v,_ as g,n as x,b as k,t as w,M as $,a as j,H as z,e as C,k as O,K as Y,R as A}from"./p-a79a137e.js";import{o as B}from"./p-ff443927.js";import{n as D}from"./p-cb1f5d6c.js";import{w as E}from"./p-8994d758.js";import{g as F,s as H,a as P,b as S}from"./p-bddd6a75.js";import{n as K}from"./p-8511f124.js";import{o as L}from"./p-23fd0f5c.js";function M(e){const t=a(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&null!==e.offsetParent&&"hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i))}let T,q=[];class I{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){q.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){q=q.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return q[q.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>M(e)))??null,end:t.reverse().find((e=>M(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}n(["before","after"],((e,t)=>{r.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,s)=>{const o=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;n(o,(e=>{let o;o=(e=>l(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?r(d(e,"div")):i&&h(e)?r(e.cloneNode(!0)):r(e),o[t?"insertAfter":"insertBefore"](s)}))}))}})),r.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},n(["prepend","append"],((e,t)=>{r.fn[e]=function(...e){return this.each(((i,s)=>{const o=s.childNodes,a=o.length,n=a?o[t?a-1:0]:p("div");a||u(s,n);let d=c(e[0])?[e[0].call(s,i,s.innerHTML)]:e;i&&(d=d.map((e=>l(e)?e:r(e).clone()))),r(n)[t?"after":"before"](...d),a||f(n)}))}}));const U=e=>{if(y(document))return 0;if(e||void 0===T){const e=r("<div>").css({width:"100%",height:"200px"}),t=r("<div>").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let s=e[0].offsetWidth;i===s&&(s=t[0].clientWidth),t.remove(),T=i-s}return T},_=new WeakMap,N="mdui-lock-screen",Q=(e,t)=>{const i=m();t??=i.documentElement;const s=_.get(t);s&&(s.delete(e),0===s.size&&(_.delete(t),r(t).removeClass(N).width("")))},R=b`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let W=class extends ${constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=j(),this.panelRef=j(),this.bodyRef=j(),this.hasSlotController=new z(this,"header","icon","headline","description","action","[default]"),this.definedController=new C(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=F(this,"linear"),s=F(this,"emphasized-decelerate"),o=F(this,"emphasized-accelerate"),a=()=>Promise.all([H(this.overlayRef.value),H(this.panelRef.value),...t.map((e=>H(e)))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const o=this.topAppBarElements??[];if(o.length){const e=o[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),((e,t)=>{const i=m();t??=i.documentElement,_.has(t)||_.set(t,new Set),_.get(t).add(e);const s=r(t);(e=>e.scrollHeight>e.clientHeight)(t)&&s.css("width",`calc(100% - ${U()}px)`),s.addClass(N)})(this),await a(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const n=P(this,"medium4");await Promise.all([S(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?n:0,easing:i}),S(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?n:0,easing:s}),S(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?n:0,easing:i}),...t.map((t=>S(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?n:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await a();const e=P(this,"short4");await Promise.all([S(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),S(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:o}),S(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>S(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Q(this);const s=this.originalTrigger;"function"==typeof s?.focus&&setTimeout((()=>s.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Q(this),L(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new I(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),s=!!this.headline||this.hasSlotController.test("headline"),o=!!this.description||this.hasSlotController.test("description"),a=i||s||this.hasSlotController.test("header"),n=o||t;return O`<div ${Y(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}" tabindex="-1"></div><div ${Y(this.panelRef)} part="panel" class="panel ${A({"has-icon":i,"has-description":o,"has-default":t})}" tabindex="0">${D(a,(()=>O`<slot name="header" part="header" class="header">${D(i,(()=>this.renderIcon()))} ${D(s,(()=>this.renderHeadline()))}</slot>`))} ${D(n,(()=>O`<div ${Y(this.bodyRef)} part="body" class="body">${D(o,(()=>this.renderDescription()))}<slot></slot></div>`))} ${D(e,(()=>O`<slot name="action" part="action" class="action"></slot>`))}</div>`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return O`<slot name="icon" part="icon" class="icon">${this.icon?O`<mdui-icon name="${this.icon}"></mdui-icon>`:K}</slot>`}renderHeadline(){return O`<slot name="headline" part="headline" class="headline">${this.headline}</slot>`}renderDescription(){return O`<slot name="description" part="description" class="description">${this.description}</slot>`}};W.styles=[v,R],g([x({reflect:!0})],W.prototype,"icon",void 0),g([x({reflect:!0})],W.prototype,"headline",void 0),g([x({reflect:!0})],W.prototype,"description",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"open",void 0),g([x({type:Boolean,reflect:!0,converter:k})],W.prototype,"fullscreen",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-esc"})],W.prototype,"closeOnEsc",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"close-on-overlay-click"})],W.prototype,"closeOnOverlayClick",void 0),g([x({type:Boolean,reflect:!0,converter:k,attribute:"stacked-actions"})],W.prototype,"stackedActions",void 0),g([B({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],W.prototype,"topAppBarElements",void 0),g([E("open")],W.prototype,"onOpenChange",null),W=g([w("mdui-dialog")],W);const G=class{constructor(i){e(this,i),this.dialogConfirmed=t(this,"dialogConfirmed",7),this.icon=null,this.headline=null,this.description=null,this.open=!1,this.fullscreen=!1,this.closeOnEsc=!0,this.closeOnOverlayClick=!0}componentDidLoad(){this.dialogElement=this.el.shadowRoot.querySelector(".inner-dialog")}async openDialog(){this.dialogElement.open=!0}async closeDialog(){this.dialogElement.open=!1}handleConfirm(){this.dialogConfirmed.emit(),this.closeDialog()}render(){return i(s,{key:"b5c3f0ff29a99e329d9a076615f7f4056670f46c"},i("mdui-dialog",{key:"a358b6430c99e86f39602dfd0cc737d9b725520e",open:this.open,"close-on-overlay-click":this.closeOnOverlayClick,"close-on-esc":this.closeOnEsc,fullscreen:this.fullscreen,class:"inner-dialog"},i("div",{key:"3f508fce39fcfa00a05a2b59a61cf547b0466b29",class:"title"},this.headline),i("div",{key:"e34efaadc5ddd5669a473418f53a3a532d2ddd50",class:"description"},this.description),i("div",{key:"97563974675c73ae2d273c24e262452002eb82a6",class:"actions"},i("ur-button",{key:"ec3e45a40117667f6149e2353d271f3ca186300a",onClick:()=>this.handleConfirm()},"Confirm"),i("ur-button",{key:"c86582eb6834e16471386c7bc83a73579b277d70",onClick:()=>this.closeDialog()},"Cancel"))),i("ur-button",{key:"4f31529d61bbf8b9973bee58f101e9ee661624e1",onClick:()=>this.openDialog()},"Open Dialog"))}get el(){return o(this)}};G.style=":host{--ur-color-on-background:var(--mdui-color-on-background)}:host .dialog{display:block;width:auto}:host .title{font-size:20px;display:flex;justify-content:center}:host .description{display:flex;justify-content:center;font-size:12px}:host .actions{display:flex;justify-content:center;gap:16px;padding-top:12px}:host .actions ur-button{padding:8px 20px;font-size:14px;border:none;color:rgb(var(--ur-color-on-background));border-radius:4px;cursor:pointer}";export{G as ur_dialog}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-4d1afe53",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-7e255f77",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));
1
+ import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-a7977d7c",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-38369b00",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-4d1afe53",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-7e255f77",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));
1
+ import{p as e,b as o}from"./p-782012c9.js";export{s as setNonce}from"./p-782012c9.js";import{g as a}from"./p-e1255160.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-e0d935ad",[[1,"ur-novl-carousel",{novls:[16],breakpoints:[16],grid:[16],slidesPerView:[8,"slides-per-view"],spaceBetween:[8,"space-between"],navigation:[4]}]]],["p-8277b7b5",[[1,"ur-page-profile",{avatar:[8],name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],stories:[2],views:[2],following:[2],followers:[2],members:[2],showFollow:[4,"show-follow"],showBecomeMember:[4,"show-become-member"],showDonate:[4,"show-donate"],showSendMessage:[4,"show-send-message"],languages:[1],genres:[1],literatureTypes:[1,"literature-types"],pageCreatorName:[8,"page-creator-name"],pageCreatorImage:[8,"page-creator-image"],pageCreationDate:[8,"page-creation-date"]}]]],["p-a7977d7c",[[1,"ur-dialog",{icon:[1],headline:[1],description:[1],open:[4],fullscreen:[4],closeOnEsc:[4,"close-on-esc"],closeOnOverlayClick:[4,"close-on-overlay-click"],openDialog:[64],closeDialog:[64]}]]],["p-53c66061",[[1,"ur-page",{pageTitle:[1,"page-title"],pageCover:[8,"page-cover"],pageCoverFallback:[1,"page-cover-fallback"],followers:[2],showStats:[4,"show-stats"],pageDescription:[8,"page-description"]}]]],["p-38369b00",[[1,"ur-select",{label:[1],name:[1],value:[1],placeholder:[1],helper:[1],readonly:[4],disabled:[4],clearable:[4],multiple:[4],endAligned:[4,"end-aligned"],variant:[1],placement:[1],icon:[1],endIcon:[1,"end-icon"],form:[1],items:[16],selectedValue:[32]},null,{value:["valueChanged"]}]]],["p-493b4625",[[1,"ur-user",{userTitle:[1,"user-title"],userCover:[8,"user-cover"],userCoverFallback:[1,"user-cover-fallback"],followers:[2],showStats:[4,"show-stats"],userDescription:[8,"user-description"]}]]],["p-8d702607",[[1,"ur-button-icon",{disabled:[4],loading:[4],variant:[1],icon:[1],selectedIcon:[1,"selected-icon"],selected:[4]}]]],["p-700b6bd0",[[1,"ur-checkbox",{disabled:[4],checked:[4]}]]],["p-26027c52",[[0,"ur-chip",{label:[1],border:[1],radius:[1],size:[1],backColor:[1,"back-color"],fontColor:[1,"font-color"],loading:[4],disabled:[4]}]]],["p-54ab08cc",[[1,"ur-loader"]]],["p-42b2ef95",[[1,"ur-locale-filter-button",{count:[2]}]]],["p-13a91f97",[[1,"ur-locale-filter-panel",{showHeader:[4,"show-header"],showFooter:[4,"show-footer"],locales:[16]}]]],["p-b0b7a6ca",[[1,"ur-profile",{name:[8],description:[8],location:[8],facebook_url:[8],twitter_url:[8],linkedin_url:[8],email:[8],phone:[8],website:[8],show_follow:[4],show_donate:[4],show_become_member:[4],show_send_message:[4],show_stats:[4],stories_count:[2],views_count:[2],followers_count:[2],writers_count:[2],show_languages:[4],languages:[1],show_genres:[4],genres:[1],show_member_since:[4],member_since:[1]}]]],["p-b40658ec",[[1,"ur-radio-button",{disabled:[4],checked:[4],text:[1]}]]],["p-94aa67ff",[[1,"ur-segment-button",{likeLabel:[1,"like-label"]}]]],["p-56a2cd02",[[1,"ur-switch",{disabled:[4],checked:[4]}]]],["p-53c3189d",[[1,"ur-tabs",{tabs:[16],panels:[16]}]]],["p-cf101b9e",[[1,"ur-text-field",{label:[1],placeholder:[1],helper:[1],disabled:[4],variant:[1],value:[1],endIcon:[8,"end-icon"]}]]],["p-8c221276",[[1,"ur-user-profile"]]],["p-70ff05ca",[[1,"ur-avatar",{size:[1],src:[1],name:[1],border:[1],radius:[1]}]]],["p-fe102dbb",[[1,"ur-menu-item",{value:[1],label:[1],disabled:[4]}]]],["p-9f833e7d",[[1,"ur-novl",{novlTitle:[1,"novl-title"],novlCover:[8,"novl-cover"],novlCoverFallback:[1,"novl-cover-fallback"],likes:[2],views:[2],showStats:[4,"show-stats"],novlDescription:[8,"novl-description"],authorAvatar:[8,"author-avatar"],authorName:[8,"author-name"],published:[4],price:[1],publisherAvatar:[1,"publisher-avatar"],publisherName:[1,"publisher-name"]}]]],["p-69be7225",[[1,"ur-button-arrow-left"],[1,"ur-button-arrow-right"]]],["p-1a660d96",[[1,"ur-button",{disabled:[4],variant:[1],icon:[8],endIcon:[8,"end-icon"]}]]]],e))));