@vandeurenglenn/lite-elements 0.3.35 → 0.3.37

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.
Files changed (75) hide show
  1. package/exports/bundle/banner.js +1 -1
  2. package/exports/bundle/button.js +1 -1
  3. package/exports/bundle/card.js +1 -1
  4. package/exports/bundle/code.js +1 -1
  5. package/exports/bundle/{column-D2XB0lDz.js → column-CNOGwAhj.js} +1 -1
  6. package/exports/bundle/demo-elements.js +1 -1
  7. package/exports/bundle/demo-icons.js +2 -2
  8. package/exports/bundle/demo-shell.js +1 -1
  9. package/exports/bundle/demo.js +1 -1
  10. package/exports/bundle/dialog.js +1 -1
  11. package/exports/bundle/divider.js +1 -1
  12. package/exports/bundle/drawer-button.js +2 -6
  13. package/exports/bundle/drawer-item.js +1 -1
  14. package/exports/bundle/drawer-layout.js +2 -2
  15. package/exports/bundle/drawer.js +2 -2
  16. package/exports/bundle/dropdown-menu.js +2 -2
  17. package/exports/bundle/dropdown.js +1 -1
  18. package/exports/bundle/elements.js +1 -1
  19. package/exports/bundle/elevation.js +1 -1
  20. package/exports/bundle/fab.js +2 -2
  21. package/exports/bundle/icon-button.js +3 -3
  22. package/exports/bundle/icon-set.js +1 -1
  23. package/exports/bundle/icon.js +2 -2
  24. package/exports/bundle/input.js +1 -1
  25. package/exports/bundle/list-item.js +1 -1
  26. package/exports/bundle/menu.js +1 -1
  27. package/exports/bundle/minute-field.js +1 -1
  28. package/exports/bundle/notification.js +3 -3
  29. package/exports/bundle/notifications.js +1 -1
  30. package/exports/bundle/pages.js +1 -1
  31. package/exports/bundle/pane.js +4 -5
  32. package/exports/bundle/property-BhmaXNYq.js +39 -0
  33. package/exports/bundle/property-D-Y1CFIF.js +11 -0
  34. package/exports/bundle/rail.js +1 -1
  35. package/exports/bundle/root.js +1 -1
  36. package/exports/bundle/row-BHK6Zell.js +28 -0
  37. package/exports/bundle/section.js +1 -1
  38. package/exports/bundle/section2.js +1 -1
  39. package/exports/bundle/select-mixin.js +1 -1
  40. package/exports/bundle/selector-mixin.js +1 -1
  41. package/exports/bundle/selector.js +1 -1
  42. package/exports/bundle/summary-mirror.js +1 -1
  43. package/exports/bundle/summary.js +1 -1
  44. package/exports/bundle/supporting-pane.js +2 -2
  45. package/exports/bundle/tab.js +1 -1
  46. package/exports/bundle/tabs.js +1 -1
  47. package/exports/bundle/text-field.js +1 -1
  48. package/exports/bundle/theme.js +1 -1
  49. package/exports/bundle/time-picker.js +1 -1
  50. package/exports/bundle/toggle-button.js +1 -1
  51. package/exports/bundle/toggle.js +1 -1
  52. package/exports/bundle/top-app-bar.js +4 -4
  53. package/exports/bundle/typography.js +1 -1
  54. package/exports/bundle/upload-file.js +1 -1
  55. package/exports/bundle/upload-image.js +142 -147
  56. package/exports/drawer/drawer-button.d.ts +1 -2
  57. package/exports/drawer/drawer-layout.d.ts +2 -0
  58. package/exports/drawer-button.js +4 -7
  59. package/exports/drawer-layout.js +16 -3
  60. package/exports/drawer.js +1 -0
  61. package/exports/dropdown-menu.js +1 -1
  62. package/exports/icon/icon.d.ts +1 -1
  63. package/exports/icon.js +2 -2
  64. package/exports/notifications.js +1 -0
  65. package/exports/pane/pane.d.ts +1 -1
  66. package/exports/pane.js +5 -5
  67. package/exports/rail.js +1 -0
  68. package/exports/supporting-pane.js +1 -0
  69. package/exports/theme/theme.d.ts +2 -1
  70. package/exports/theme.js +26 -14
  71. package/package.json +2 -2
  72. package/exports/bundle/index-B3uz3f8C.js +0 -1
  73. package/exports/bundle/property-Do5-bKhz.js +0 -11
  74. package/exports/bundle/property-DyuvULjI.js +0 -44
  75. package/exports/bundle/row-DNgwBcX5.js +0 -33
@@ -1,6 +1,5 @@
1
1
  import { LiteElement } from '@vandeurenglenn/lite';
2
- import '../icon/icon.js';
3
- import '../button/button.js';
2
+ import '../button/icon-button.js';
4
3
  export declare class CustomDrawerButton extends LiteElement {
5
4
  accessor mobile: boolean;
6
5
  accessor drawerOpen: boolean;
@@ -12,6 +12,8 @@ export declare class CustomDrawerLayout extends LiteElement {
12
12
  accessor drawerType: 'modal' | undefined;
13
13
  accessor appBarType: AppBarTypes;
14
14
  accessor mainDrawerId: string;
15
+ accessor mobileTrigger: string;
16
+ onChange(propertyKey: string, value: any): void;
15
17
  connectedCallback(): void;
16
18
  _onnarrow({ detail }: CustomEvent): boolean;
17
19
  private _click;
@@ -1,9 +1,10 @@
1
1
  import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-CFl_-KPR.js';
2
2
  import { customElement, property, css, html, LiteElement } from '@vandeurenglenn/lite';
3
- import './icon.js';
3
+ import './icon-button.js';
4
4
  import './button.js';
5
- import '@vandeurenglenn/little-pubsub';
6
5
  import './elevation.js';
6
+ import './icon.js';
7
+ import '@vandeurenglenn/little-pubsub';
7
8
 
8
9
  let CustomDrawerButton = (() => {
9
10
  let _classDecorators = [customElement('custom-drawer-button')];
@@ -63,11 +64,7 @@ let CustomDrawerButton = (() => {
63
64
  `
64
65
  ];
65
66
  render() {
66
- return html `
67
- <custom-button @click=${() => this.openPane()}>
68
- <custom-icon slot="icon">menu</custom-icon>
69
- </custom-button>
70
- `;
67
+ return html ` <custom-icon-button @click=${() => this.openPane()} icon="menu"> </custom-icon-button> `;
71
68
  }
72
69
  constructor() {
73
70
  super(...arguments);
@@ -8,6 +8,7 @@ import '@vandeurenglenn/flex-elements/column.js';
8
8
  import './elevation.js';
9
9
  import './button.js';
10
10
  import './pane.js';
11
+ import './icon-button.js';
11
12
  import './icon.js';
12
13
  import '@vandeurenglenn/little-pubsub';
13
14
  import '@vandeurenglenn/flex-elements/it.js';
@@ -38,6 +39,9 @@ let CustomDrawerLayout = (() => {
38
39
  let _mainDrawerId_decorators;
39
40
  let _mainDrawerId_initializers = [];
40
41
  let _mainDrawerId_extraInitializers = [];
42
+ let _mobileTrigger_decorators;
43
+ let _mobileTrigger_initializers = [];
44
+ let _mobileTrigger_extraInitializers = [];
41
45
  (class extends _classSuper {
42
46
  static { _classThis = this; }
43
47
  static {
@@ -48,12 +52,14 @@ let CustomDrawerLayout = (() => {
48
52
  _drawerType_decorators = [property({ type: String })];
49
53
  _appBarType_decorators = [property({ type: String })];
50
54
  _mainDrawerId_decorators = [property({ type: String })];
55
+ _mobileTrigger_decorators = [property()];
51
56
  __esDecorate(this, null, _drawerOpen_decorators, { kind: "accessor", name: "drawerOpen", static: false, private: false, access: { has: obj => "drawerOpen" in obj, get: obj => obj.drawerOpen, set: (obj, value) => { obj.drawerOpen = value; } }, metadata: _metadata }, _drawerOpen_initializers, _drawerOpen_extraInitializers);
52
57
  __esDecorate(this, null, _keepClosed_decorators, { kind: "accessor", name: "keepClosed", static: false, private: false, access: { has: obj => "keepClosed" in obj, get: obj => obj.keepClosed, set: (obj, value) => { obj.keepClosed = value; } }, metadata: _metadata }, _keepClosed_initializers, _keepClosed_extraInitializers);
53
58
  __esDecorate(this, null, _narrow_decorators, { kind: "accessor", name: "narrow", static: false, private: false, access: { has: obj => "narrow" in obj, get: obj => obj.narrow, set: (obj, value) => { obj.narrow = value; } }, metadata: _metadata }, _narrow_initializers, _narrow_extraInitializers);
54
59
  __esDecorate(this, null, _drawerType_decorators, { kind: "accessor", name: "drawerType", static: false, private: false, access: { has: obj => "drawerType" in obj, get: obj => obj.drawerType, set: (obj, value) => { obj.drawerType = value; } }, metadata: _metadata }, _drawerType_initializers, _drawerType_extraInitializers);
55
60
  __esDecorate(this, null, _appBarType_decorators, { kind: "accessor", name: "appBarType", static: false, private: false, access: { has: obj => "appBarType" in obj, get: obj => obj.appBarType, set: (obj, value) => { obj.appBarType = value; } }, metadata: _metadata }, _appBarType_initializers, _appBarType_extraInitializers);
56
61
  __esDecorate(this, null, _mainDrawerId_decorators, { kind: "accessor", name: "mainDrawerId", static: false, private: false, access: { has: obj => "mainDrawerId" in obj, get: obj => obj.mainDrawerId, set: (obj, value) => { obj.mainDrawerId = value; } }, metadata: _metadata }, _mainDrawerId_initializers, _mainDrawerId_extraInitializers);
62
+ __esDecorate(this, null, _mobileTrigger_decorators, { kind: "accessor", name: "mobileTrigger", static: false, private: false, access: { has: obj => "mobileTrigger" in obj, get: obj => obj.mobileTrigger, set: (obj, value) => { obj.mobileTrigger = value; } }, metadata: _metadata }, _mobileTrigger_initializers, _mobileTrigger_extraInitializers);
57
63
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
58
64
  _classThis = _classDescriptor.value;
59
65
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -78,9 +84,16 @@ let CustomDrawerLayout = (() => {
78
84
  #mainDrawerId_accessor_storage = (__runInitializers(this, _appBarType_extraInitializers), __runInitializers(this, _mainDrawerId_initializers, crypto.randomUUID()));
79
85
  get mainDrawerId() { return this.#mainDrawerId_accessor_storage; }
80
86
  set mainDrawerId(value) { this.#mainDrawerId_accessor_storage = value; }
87
+ #mobileTrigger_accessor_storage = (__runInitializers(this, _mainDrawerId_extraInitializers), __runInitializers(this, _mobileTrigger_initializers, '(max-width: 860px)'));
88
+ get mobileTrigger() { return this.#mobileTrigger_accessor_storage; }
89
+ set mobileTrigger(value) { this.#mobileTrigger_accessor_storage = value; }
90
+ onChange(propertyKey, value) {
91
+ if (propertyKey === 'mobileTrigger') {
92
+ const media = matchMedia(value);
93
+ this._onnarrow({ detail: media.matches });
94
+ }
95
+ }
81
96
  connectedCallback() {
82
- const media = matchMedia('(max-width: 860px)');
83
- this._onnarrow({ detail: media.matches });
84
97
  document.addEventListener('custom-pane-close', ({ detail }) => {
85
98
  if (this.mainDrawerId === detail)
86
99
  this.drawerOpen = false;
@@ -100,7 +113,7 @@ let CustomDrawerLayout = (() => {
100
113
  else
101
114
  this.drawerOpen = true;
102
115
  }
103
- _click = (__runInitializers(this, _mainDrawerId_extraInitializers), () => {
116
+ _click = (__runInitializers(this, _mobileTrigger_extraInitializers), () => {
104
117
  if (this.narrow)
105
118
  this.drawerOpen = !this.drawerOpen;
106
119
  });
package/exports/drawer.js CHANGED
@@ -3,6 +3,7 @@ import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite
3
3
  import './elevation.js';
4
4
  import './button.js';
5
5
  import './pane.js';
6
+ import './icon-button.js';
6
7
  import './icon.js';
7
8
  import '@vandeurenglenn/little-pubsub';
8
9
 
@@ -151,7 +151,7 @@ let CustomDropdownMenu = (() => {
151
151
  <span class="scrim" @click=${this._scrimClick}></span>
152
152
 
153
153
  <custom-button part="button" @click=${() => (this.open = !this.open)}>
154
- <custom-icon slot="icon" icon=${this.icon}>more_vert</custom-icon>
154
+ <custom-icon slot="icon" .icon=${this.icon}></custom-icon>
155
155
  </custom-button>
156
156
 
157
157
  <custom-dropdown part="dropdown" .open=${this.open} ?right=${this.right} ?bottom=${this.bottom}>
@@ -1,7 +1,7 @@
1
1
  import { LiteElement } from '@vandeurenglenn/lite';
2
2
  export declare class CustomIcon extends LiteElement {
3
3
  accessor host: any;
4
- accessor icon: string;
4
+ accessor icon: any;
5
5
  accessor setName: any;
6
6
  accessor _icon: any;
7
7
  onChange(propertyKey: any, value: any): void;
package/exports/icon.js CHANGED
@@ -26,7 +26,7 @@ let CustomIcon = (() => {
26
26
  static {
27
27
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
28
28
  _host_decorators = [property()];
29
- _icon_decorators = [property({ attribute: 'icon' })];
29
+ _icon_decorators = [property({ attribute: true, reflect: true })];
30
30
  _setName_decorators = [property()];
31
31
  __icon_decorators = [property()];
32
32
  __esDecorate(this, null, _host_decorators, { kind: "accessor", name: "host", static: false, private: false, access: { has: obj => "host" in obj, get: obj => obj.host, set: (obj, value) => { obj.host = value; } }, metadata: _metadata }, _host_initializers, _host_extraInitializers);
@@ -40,7 +40,7 @@ let CustomIcon = (() => {
40
40
  #host_accessor_storage = __runInitializers(this, _host_initializers, void 0);
41
41
  get host() { return this.#host_accessor_storage; }
42
42
  set host(value) { this.#host_accessor_storage = value; }
43
- #icon_accessor_storage = (__runInitializers(this, _host_extraInitializers), __runInitializers(this, _icon_initializers, this.innerHTML));
43
+ #icon_accessor_storage = (__runInitializers(this, _host_extraInitializers), __runInitializers(this, _icon_initializers, void 0));
44
44
  get icon() { return this.#icon_accessor_storage; }
45
45
  set icon(value) { this.#icon_accessor_storage = value; }
46
46
  #setName_accessor_storage = (__runInitializers(this, _icon_extraInitializers), __runInitializers(this, _setName_initializers, void 0));
@@ -9,6 +9,7 @@ import 'lit/decorators.js';
9
9
  import '@vandeurenglenn/flex-elements/column.js';
10
10
  import '@vandeurenglenn/little-pubsub';
11
11
  import './elevation.js';
12
+ import './icon-button.js';
12
13
  import './button.js';
13
14
 
14
15
  let CustomNotifications = (() => {
@@ -1,6 +1,6 @@
1
1
  import { LiteElement } from '@vandeurenglenn/lite';
2
2
  import '../elevation/elevation.js';
3
- import '../button/button.js';
3
+ import '../button/icon-button.js';
4
4
  import '../icon/icon.js';
5
5
  export declare class CustomPane extends LiteElement {
6
6
  accessor open: boolean;
package/exports/pane.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-CFl_-KPR.js';
2
2
  import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite';
3
3
  import './elevation.js';
4
- import './button.js';
4
+ import './icon-button.js';
5
5
  import './icon.js';
6
+ import './button.js';
6
7
  import '@vandeurenglenn/little-pubsub';
7
8
 
8
9
  let CustomPane = (() => {
@@ -148,7 +149,7 @@ let CustomPane = (() => {
148
149
  height: 54px;
149
150
  }
150
151
 
151
- :host([right]) custom-button {
152
+ :host([right]) custom-icon-button {
152
153
  transform: rotateZ(180deg);
153
154
  }
154
155
  </style>
@@ -158,9 +159,8 @@ let CustomPane = (() => {
158
159
  <flex-row center>
159
160
  <slot name="headline"></slot>
160
161
  <flex-it></flex-it>
161
- <custom-button @click=${(e) => this.closePane(e)} .id=${this.id}>
162
- <custom-icon slot="icon">menu_open</custom-icon>
163
- </custom-button>
162
+ <custom-icon-button @click=${(e) => this.closePane(e)} .id=${this.id} icon="menu_open">
163
+ </custom-icon-button>
164
164
  </flex-row>
165
165
  </slot>
166
166
  <flex-column class="content">
package/exports/rail.js CHANGED
@@ -2,6 +2,7 @@ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-CFl_-KPR.
2
2
  import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite';
3
3
  import './pane.js';
4
4
  import './elevation.js';
5
+ import './icon-button.js';
5
6
  import './button.js';
6
7
  import './icon.js';
7
8
  import '@vandeurenglenn/little-pubsub';
@@ -2,6 +2,7 @@ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-CFl_-KPR.
2
2
  import { customElement, property, query, html, LiteElement } from '@vandeurenglenn/lite';
3
3
  import './pane.js';
4
4
  import './elevation.js';
5
+ import './icon-button.js';
5
6
  import './button.js';
6
7
  import './icon.js';
7
8
  import '@vandeurenglenn/little-pubsub';
@@ -3,8 +3,9 @@ export declare class CustomTheme extends LiteElement {
3
3
  #private;
4
4
  accessor loadFont: boolean;
5
5
  accessor loadSymbols: boolean;
6
- accessor narrowTrigger: string;
6
+ accessor mobileTrigger: string;
7
7
  accessor narrow: boolean;
8
+ onChange(propertyKey: string, value: any): void;
8
9
  connectedCallback(): void;
9
10
  set language(value: string);
10
11
  get language(): string;
package/exports/theme.js CHANGED
@@ -14,9 +14,9 @@ let CustomTheme = (() => {
14
14
  let _loadSymbols_decorators;
15
15
  let _loadSymbols_initializers = [];
16
16
  let _loadSymbols_extraInitializers = [];
17
- let _narrowTrigger_decorators;
18
- let _narrowTrigger_initializers = [];
19
- let _narrowTrigger_extraInitializers = [];
17
+ let _mobileTrigger_decorators;
18
+ let _mobileTrigger_initializers = [];
19
+ let _mobileTrigger_extraInitializers = [];
20
20
  let _narrow_decorators;
21
21
  let _narrow_initializers = [];
22
22
  let _narrow_extraInitializers = [];
@@ -26,27 +26,28 @@ let CustomTheme = (() => {
26
26
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
27
27
  _loadFont_decorators = [property({ type: Boolean, attribute: 'load-font' })];
28
28
  _loadSymbols_decorators = [property({ type: Boolean, attribute: 'load-symbols' })];
29
- _narrowTrigger_decorators = [property({ type: String, attribute: 'mobile-trigger' })];
29
+ _mobileTrigger_decorators = [property({ type: String, attribute: 'mobile-trigger' })];
30
30
  _narrow_decorators = [property({ type: Boolean })];
31
31
  __esDecorate(this, null, _loadFont_decorators, { kind: "accessor", name: "loadFont", static: false, private: false, access: { has: obj => "loadFont" in obj, get: obj => obj.loadFont, set: (obj, value) => { obj.loadFont = value; } }, metadata: _metadata }, _loadFont_initializers, _loadFont_extraInitializers);
32
32
  __esDecorate(this, null, _loadSymbols_decorators, { kind: "accessor", name: "loadSymbols", static: false, private: false, access: { has: obj => "loadSymbols" in obj, get: obj => obj.loadSymbols, set: (obj, value) => { obj.loadSymbols = value; } }, metadata: _metadata }, _loadSymbols_initializers, _loadSymbols_extraInitializers);
33
- __esDecorate(this, null, _narrowTrigger_decorators, { kind: "accessor", name: "narrowTrigger", static: false, private: false, access: { has: obj => "narrowTrigger" in obj, get: obj => obj.narrowTrigger, set: (obj, value) => { obj.narrowTrigger = value; } }, metadata: _metadata }, _narrowTrigger_initializers, _narrowTrigger_extraInitializers);
33
+ __esDecorate(this, null, _mobileTrigger_decorators, { kind: "accessor", name: "mobileTrigger", static: false, private: false, access: { has: obj => "mobileTrigger" in obj, get: obj => obj.mobileTrigger, set: (obj, value) => { obj.mobileTrigger = value; } }, metadata: _metadata }, _mobileTrigger_initializers, _mobileTrigger_extraInitializers);
34
34
  __esDecorate(this, null, _narrow_decorators, { kind: "accessor", name: "narrow", static: false, private: false, access: { has: obj => "narrow" in obj, get: obj => obj.narrow, set: (obj, value) => { obj.narrow = value; } }, metadata: _metadata }, _narrow_initializers, _narrow_extraInitializers);
35
35
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
36
36
  _classThis = _classDescriptor.value;
37
37
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
38
38
  __runInitializers(_classThis, _classExtraInitializers);
39
39
  }
40
+ #mediaListener;
40
41
  #loadFont_accessor_storage = __runInitializers(this, _loadFont_initializers, true);
41
42
  get loadFont() { return this.#loadFont_accessor_storage; }
42
43
  set loadFont(value) { this.#loadFont_accessor_storage = value; }
43
44
  #loadSymbols_accessor_storage = (__runInitializers(this, _loadFont_extraInitializers), __runInitializers(this, _loadSymbols_initializers, true));
44
45
  get loadSymbols() { return this.#loadSymbols_accessor_storage; }
45
46
  set loadSymbols(value) { this.#loadSymbols_accessor_storage = value; }
46
- #narrowTrigger_accessor_storage = (__runInitializers(this, _loadSymbols_extraInitializers), __runInitializers(this, _narrowTrigger_initializers, '(max-width: 860px)'));
47
- get narrowTrigger() { return this.#narrowTrigger_accessor_storage; }
48
- set narrowTrigger(value) { this.#narrowTrigger_accessor_storage = value; }
49
- #narrow_accessor_storage = (__runInitializers(this, _narrowTrigger_extraInitializers), __runInitializers(this, _narrow_initializers, void 0));
47
+ #mobileTrigger_accessor_storage = (__runInitializers(this, _loadSymbols_extraInitializers), __runInitializers(this, _mobileTrigger_initializers, '(max-width: 860px)'));
48
+ get mobileTrigger() { return this.#mobileTrigger_accessor_storage; }
49
+ set mobileTrigger(value) { this.#mobileTrigger_accessor_storage = value; }
50
+ #narrow_accessor_storage = (__runInitializers(this, _mobileTrigger_extraInitializers), __runInitializers(this, _narrow_initializers, void 0));
50
51
  get narrow() { return this.#narrow_accessor_storage; }
51
52
  set narrow(value) { this.#narrow_accessor_storage = value; }
52
53
  #loadLink(href, rel, attributes) {
@@ -67,10 +68,17 @@ let CustomTheme = (() => {
67
68
  }
68
69
  return link;
69
70
  }
71
+ onChange(propertyKey, value) {
72
+ if (propertyKey === 'mobileTrigger') {
73
+ this.#setupMediaListener();
74
+ }
75
+ }
76
+ #setupMediaListener() {
77
+ this.#mediaListener = matchMedia(this.mobileTrigger);
78
+ this.#mediaListener.onchange = this.#mediaQueryChange;
79
+ this.#mediaQueryChange({ matches: this.#mediaListener.matches });
80
+ }
70
81
  connectedCallback() {
71
- const media = matchMedia('(max-width: 860px)');
72
- media.onchange = this.#mediaQueryChange;
73
- this.#mediaQueryChange({ matches: media.matches });
74
82
  // this.load('./themes/default/tokens.js')
75
83
  this.load('./themes/default/theme.css');
76
84
  const style = document.createElement('style');
@@ -92,10 +100,10 @@ let CustomTheme = (() => {
92
100
  if (this.loadSymbols)
93
101
  this.#loadLink(this.#generateSymbolsLink(), 'stylesheet');
94
102
  }
95
- #mediaQueryChange = (__runInitializers(this, _narrow_extraInitializers), ({ matches }) => {
103
+ #mediaQueryChange({ matches }) {
96
104
  this.narrow = matches;
97
105
  document.dispatchEvent(new CustomEvent('custom-theme-narrow', { detail: this.narrow }));
98
- });
106
+ }
99
107
  set language(value) {
100
108
  this.setAttribute('language', value);
101
109
  }
@@ -122,6 +130,10 @@ let CustomTheme = (() => {
122
130
  document.head.appendChild(link);
123
131
  }
124
132
  }
133
+ constructor() {
134
+ super(...arguments);
135
+ __runInitializers(this, _narrow_extraInitializers);
136
+ }
125
137
  });
126
138
  return _classThis;
127
139
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vandeurenglenn/lite-elements",
3
- "version": "0.3.35",
3
+ "version": "0.3.37",
4
4
  "description": "set of lite elements following Material Design 3 spec",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "@material-symbols/svg-400": "^0.17.0",
22
22
  "@material/web": "^1.3.0",
23
23
  "@vandeurenglenn/flex-elements": "^1.2.5",
24
- "@vandeurenglenn/lite": "^0.2.33",
24
+ "@vandeurenglenn/lite": "^0.2.37",
25
25
  "custom-element-decorator": "^0.6.0"
26
26
  },
27
27
  "devDependencies": {
@@ -1 +0,0 @@
1
- class LittlePubSub{subscribers={};verbose;constructor(s){this.verbose=s}_handleContext(s,e){return void 0===e&&(e=s),e}hasSubscribers(s){return!!this.subscribers[s]}subscribe(s,e,r){this.hasSubscribers(s)||(this.subscribers[s]={handlers:[],value:void 0}),r=this._handleContext(e,r),this.subscribers[s].handlers.push(e.bind(r))}unsubscribe(s,e,r){if(!this.hasSubscribers(s))return;r=this._handleContext(e,r);const i=this.subscribers[s].handlers.indexOf(e.bind(r));this.subscribers[s].handlers.splice(i),0===this.subscribers[s].handlers.length&&delete this.subscribers[s]}publish(s,e,r){this.hasSubscribers(s)||(this.subscribers[s]={handlers:[]});const i=this.subscribers[s]?.value;if(this.verbose||r||i!==e){this.subscribers[s].value=e;for(const r of this.subscribers[s].handlers)r(e,i)}}publishVerbose(s,e){this.publish(s,e,!0)}once(s){return new Promise((e=>{const r=i=>{e(i),this.unsubscribe(s,r)};this.subscribe(s,r)}))}}export{LittlePubSub as L};
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=globalThis,e=t.trustedTypes,s=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,i="$lit$",r=`lit$${(Math.random()+"").slice(9)}$`,n="?"+r,o=`<${n}>`,h=document,l=()=>h.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,c="[ \t\n\f\r]",d=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,p=/>/g,$=RegExp(`>|${c}(?:([^\\s"'>=/]+)(${c}*=${c}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_=/'/g,A=/"/g,g=/^(?:script|style|textarea|title)$/i,v=(t,...e)=>({_$litType$:1,strings:t,values:e}),m=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),f=new WeakMap,S=h.createTreeWalker(h,129);function x(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,n=[];let h,l=2===e?"<svg>":"",a=d;for(let e=0;e<s;e++){const s=t[e];let u,c,v=-1,m=0;for(;m<s.length&&(a.lastIndex=m,c=a.exec(s),null!==c);)m=a.lastIndex,a===d?"!--"===c[1]?a=b:void 0!==c[1]?a=p:void 0!==c[2]?(g.test(c[2])&&(h=RegExp("</"+c[2],"g")),a=$):void 0!==c[3]&&(a=$):a===$?">"===c[0]?(a=h??d,v=-1):void 0===c[1]?v=-2:(v=a.lastIndex-c[2].length,u=c[1],a=void 0===c[3]?$:'"'===c[3]?A:_):a===A||a===_?a=$:a===b||a===p?a=d:(a=$,h=void 0);const y=a===$&&t[e+1].startsWith("/>")?" ":"";l+=a===d?s+o:v>=0?(n.push(u),s.slice(0,v)+i+s.slice(v)+r+y):s+r+(-2===v?e:y)}return[x(t,l+(t[s]||"<?>")+(2===e?"</svg>":"")),n]};class N{constructor({strings:t,_$litType$:s},o){let h;this.parts=[];let a=0,u=0;const c=t.length-1,d=this.parts,[b,p]=T(t,s);if(this.el=N.createElement(b,o),S.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(h=S.nextNode())&&d.length<c;){if(1===h.nodeType){if(h.hasAttributes())for(const t of h.getAttributeNames())if(t.endsWith(i)){const e=p[u++],s=h.getAttribute(t).split(r),i=/([.?@])?(.*)/.exec(e);d.push({type:1,index:a,name:i[2],strings:s,ctor:"."===i[1]?M:"?"===i[1]?E:"@"===i[1]?I:R}),h.removeAttribute(t)}else t.startsWith(r)&&(d.push({type:6,index:a}),h.removeAttribute(t));if(g.test(h.tagName)){const t=h.textContent.split(r),s=t.length-1;if(s>0){h.textContent=e?e.emptyScript:"";for(let e=0;e<s;e++)h.append(t[e],l()),S.nextNode(),d.push({type:2,index:++a});h.append(t[s],l())}}}else if(8===h.nodeType)if(h.data===n)d.push({type:2,index:a});else{let t=-1;for(;-1!==(t=h.data.indexOf(r,t+1));)d.push({type:7,index:a}),t+=r.length-1}a++}}static createElement(t,e){const s=h.createElement("template");return s.innerHTML=t,s}}function H(t,e,s=t,i){if(e===m)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=a(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=H(t,r._$AS(t,e.values),r,i)),e}class C{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??h).importNode(e,!0);S.currentNode=i;let r=S.nextNode(),n=0,o=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new w(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new U(r,this,t)),this._$AV.push(e),l=s[++o]}n!==l?.index&&(r=S.nextNode(),n++)}return S.currentNode=h,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class w{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=H(this,t,e),a(t)?t===y||null==t||""===t?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==m&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>u(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==y&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(h.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(x(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new C(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=f.get(t.strings);return void 0===e&&f.set(t.strings,e=new N(t)),e}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new w(this.S(l()),this.S(l()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=H(this,t,e,0),n=!a(t)||t!==this._$AH&&t!==m,n&&(this._$AH=t);else{const i=t;let o,h;for(t=r[0],o=0;o<r.length-1;o++)h=H(this,i[s+o],e,o),h===m&&(h=this._$AH[o]),n||=!a(h)||h!==this._$AH[o],h===y?t=y:t!==y&&(t+=(h??"")+r[o+1]),this._$AH[o]=h}n&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class E extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class I extends R{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??y)===m)return;const s=this._$AH,i=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const k=t.litHtmlPolyfillSupport;k?.(N,w),(t.litHtmlVersions??=[]).push("3.1.2");const W=globalThis,B=W.ShadowRoot&&(void 0===W.ShadyCSS||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,P=Symbol(),j=new WeakMap;
7
- /**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */class O{constructor(t,e,s){if(this._$cssResult$=!0,s!==P)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=j.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&j.set(e,t))}return t}toString(){return this.cssText}}const L=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new O(s,t,P)};Symbol.metadata??=Symbol("metadata");class D extends HTMLElement{static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,s){this[t]=s}constructor(){super(),this.renderedOnce=!1,this.rendered=new Promise((t=>{this.renderResolve=t})),this.attachShadow({mode:"open"});const t=customElements.get(this.localName);this.shadowRoot.adoptedStyleSheets=t.styles?t.styles.map((t=>t.styleSheet??t)):[],this.requestRender()}render(){return v`<slot></slot>`}requestRender(){((t,e,s)=>{const i=e;let r=i._$litPart$;if(void 0===r){const t=null;i._$litPart$=r=new w(e.insertBefore(l(),t),t,void 0,{})}r._$AI(t)})(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}globalThis.pubsub=globalThis.pubsub||new class{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}subscribe(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0}),s=this._handleContext(e,s),this.subscribers[t].handlers.push(e.bind(s))}unsubscribe(t,e,s){if(!this.hasSubscribers(t))return;s=this._handleContext(e,s);const i=this.subscribers[t].handlers.indexOf(e.bind(s));this.subscribers[t].handlers.splice(i),0===this.subscribers[t].handlers.length&&delete this.subscribers[t]}publish(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const i=this.subscribers[t]?.value;if(this.verbose||s||i!==e){this.subscribers[t].value=e;for(const s of this.subscribers[t].handlers)s(e,i)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t){return new Promise((e=>{const s=i=>{e(i),this.unsubscribe(t,s)};this.subscribe(t,s)}))}};const V={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},q=(t,e)=>{let s=t;return e===Boolean?s=Boolean("true"===t):e===Number?s=Number(t):e===Uint8Array?s=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(s=JSON.parse(t),e===Map&&(s=new Map(t)),e===WeakMap&&(s=new WeakMap(t))),s},z=t=>{t={...V,...t};let e=0;return function(s,{kind:i,name:r,addInitializer:n,access:o,metadata:h}){const{type:l,reflect:a,attribute:u,renders:c,batches:d,batchDelay:b,consumer:p,provider:$,temporaryRender:_}=t,A=String(r),g=u&&"string"==typeof u?u:A,v=l===Boolean,m=p||"boolean"==typeof t.consumes?g:t.consumes,y=$||"boolean"==typeof t.provides?g:t.provides;if(t.provider&&console.warn(`${A}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${A}: 'options.consumer' is deprecated, used options.consumes instead`),n((async function(){"accessor"!==i&&console.warn(`${this.localName}: @property(${t}) ${A} ${i} is not supported`),(u||a)&&(h||(h={}),h.observedAttributes||(h.observedAttributes=new Map),h.observedAttributes.set(A,g)),m&&globalThis.pubsub.subscribe(m,(async t=>{this[r]=t}))})),"accessor"===i)return{get(){return f.call(this)},set(t){return S.call(this,t)},init(t){return this.hasAttribute(g)&&(t=v?this.hasAttribute(g):q(this.getAttribute(g),l)),void 0!==t&&S.call(this,t),m&&globalThis.pubsub.subscribers?.[m]?.value&&S.call(this,globalThis.pubsub.subscribers[m].value),this[r]}};function f(){const t=a||u?v?this.hasAttribute(g):q(this.getAttribute(g),l):this[`__${A}`]?this[`__${A}`]:this[`_${A}`];return m&&!this[`__${A}`]&&globalThis.pubsub.subscribers?.[m]?.value?(t!==globalThis.pubsub.subscribers[m].value&&S.call(this,globalThis.pubsub.subscribers[m].value),globalThis.pubsub.subscribers[m].value):t}async function S(t){if(y&&globalThis.pubsub.publish(y,t),this[`_${A}`]!==t){this.willChange&&(this[`__${A}`]=await this.willChange(r,t)),a||u?v?t||this[`__${A}`]?this.setAttribute(g,""):this.removeAttribute(g):t||this[`__${A}`]?this.setAttribute(g,((t,e)=>{let s=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let i;t!==Map&&t!==WeakMap||(i=Object(e).entries()),s=JSON.stringify(i)}return s})(l,this[`__${A}`]??t)):this.removeAttribute(g):this[`_${A}`]=t;const s=()=>{e=0,this.requestRender&&c&&this.requestRender(),this.onChange&&this.onChange(r,this[`__${A}`]??t)};d?(e===_&&s(),this[`_${A}_timeout`]&&clearTimeout(this[`_${A}_timeout`]),this[`_${A}_timeout`]=setTimeout(s,b)):s()}}}};export{D,L as j,z as t,v};
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new WeakMap;let o=class n{constructor(t,e,r){if(this._$cssResult$=!0,r!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=r.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&r.set(i,t))}return t}toString(){return this.cssText}};const h=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t
7
- /**
8
- * @license
9
- * Copyright 2017 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */,{is:a,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,$=globalThis,_=$.trustedTypes,f=_?_.emptyScript:"",y=$.reactiveElementPolyfillSupport,m=(t,e)=>t,g={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},A=(t,e)=>!a(t,e),E={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:A};Symbol.metadata??=Symbol("metadata"),$.litPropertyMetadata??=new WeakMap;let v=class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=E){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&l(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const h=r?.call(this);o.call(this,e),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??E}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,r)=>{if(e)i.adoptedStyleSheets=r.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of r){const r=document.createElement("style"),o=t.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=e.cssText,i.appendChild(r)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:g).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:g;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??A)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[m("elementProperties")]=new Map,v[m("finalized")]=new Map,y?.({ReactiveElement:v}),($.reactiveElementVersions??=[]).push("2.0.4");
12
- /**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */
17
- const w=globalThis,P=w.trustedTypes,U=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",O=`lit$${(Math.random()+"").slice(9)}$`,x="?"+O,T=`<${x}>`,N=document,z=()=>N.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,B="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,J=/>/g,K=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,F=/"/g,G=/^(?:script|style|textarea|title)$/i,Q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),X=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),tt=new WeakMap,et=N.createTreeWalker(N,129);function st(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==U?U.createHTML(e):e}const it=(t,e)=>{const i=t.length-1,r=[];let o,h=2===e?"<svg>":"",a=W;for(let e=0;e<i;e++){const i=t[e];let l,c,d=-1,p=0;for(;p<i.length&&(a.lastIndex=p,c=a.exec(i),null!==c);)p=a.lastIndex,a===W?"!--"===c[1]?a=q:void 0!==c[1]?a=J:void 0!==c[2]?(G.test(c[2])&&(o=RegExp("</"+c[2],"g")),a=K):void 0!==c[3]&&(a=K):a===K?">"===c[0]?(a=o??W,d=-1):void 0===c[1]?d=-2:(d=a.lastIndex-c[2].length,l=c[1],a=void 0===c[3]?K:'"'===c[3]?F:Z):a===F||a===Z?a=K:a===q||a===J?a=W:(a=K,o=void 0);const u=a===K&&t[e+1].startsWith("/>")?" ":"";h+=a===W?i+T:d>=0?(r.push(l),i.slice(0,d)+C+i.slice(d)+O+u):i+O+(-2===d?e:u)}return[st(t,h+(t[i]||"<?>")+(2===e?"</svg>":"")),r]};class V{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,h=0;const a=t.length-1,l=this.parts,[c,d]=it(t,e);if(this.el=V.createElement(c,i),et.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=et.nextNode())&&l.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(C)){const e=d[h++],i=r.getAttribute(t).split(O),a=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:a[2],strings:i,ctor:"."===a[1]?k:"?"===a[1]?H:"@"===a[1]?I:R}),r.removeAttribute(t)}else t.startsWith(O)&&(l.push({type:6,index:o}),r.removeAttribute(t));if(G.test(r.tagName)){const t=r.textContent.split(O),e=t.length-1;if(e>0){r.textContent=P?P.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],z()),et.nextNode(),l.push({type:2,index:++o});r.append(t[e],z())}}}else if(8===r.nodeType)if(r.data===x)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(O,t+1));)l.push({type:7,index:o}),t+=O.length-1}o++}}static createElement(t,e){const i=N.createElement("template");return i.innerHTML=t,i}}function rt(t,e,i=t,r){if(e===X)return e;let o=void 0!==r?i._$Co?.[r]:i._$Cl;const h=j(e)?void 0:e._$litDirective$;return o?.constructor!==h&&(o?._$AO?.(!1),void 0===h?o=void 0:(o=new h(t),o._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=o:i._$Cl=o),void 0!==o&&(e=rt(t,o._$AS(t,e.values),o,r)),e}let ot=class S{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??N).importNode(e,!0);et.currentNode=r;let o=et.nextNode(),h=0,a=0,l=i[0];for(;void 0!==l;){if(h===l.index){let e;2===l.type?e=new M(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new L(o,this,t)),this._$AV.push(e),l=i[++a]}h!==l?.index&&(o=et.nextNode(),h++)}return et.currentNode=N,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),j(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>D(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==Y&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=V.createElement(st(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new ot(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=tt.get(t.strings);return void 0===e&&tt.set(t.strings,e=new V(t)),e}k(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new M(this.S(z()),this.S(z()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,r){const o=this.strings;let h=!1;if(void 0===o)t=rt(this,t,e,0),h=!j(t)||t!==this._$AH&&t!==X,h&&(this._$AH=t);else{const r=t;let a,l;for(t=o[0],a=0;a<o.length-1;a++)l=rt(this,r[i+a],e,a),l===X&&(l=this._$AH[a]),h||=!j(l)||l!==this._$AH[a],l===Y?t=Y:t!==Y&&(t+=(l??"")+o[a+1]),this._$AH[a]=l}h&&!r&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}}class I extends R{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=rt(this,t,e,0)??Y)===X)return;const i=this._$AH,r=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}}const nt=w.litHtmlPolyfillSupport;nt?.(V,M),(w.litHtmlVersions??=[]).push("3.1.2");const ht=(t,e,i)=>{const r=i?.renderBefore??e;let o=r._$litPart$;if(void 0===o){const t=i?.renderBefore??null;r._$litPart$=o=new M(e.insertBefore(z(),t),t,void 0,i??{})}return o._$AI(t),o
18
- /**
19
- * @license
20
- * Copyright 2019 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */},at=globalThis,lt=at.ShadowRoot&&(void 0===at.ShadyCSS||at.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),dt=new WeakMap;let pt=class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(lt&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=dt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&dt.set(e,t))}return t}toString(){return this.cssText}};const ut=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new pt(i,t,ct)},$t=lt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new pt("string"==typeof t?t:t+"",void 0,ct))(e)})(t):t
23
- /**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */,{is:_t,defineProperty:ft,getOwnPropertyDescriptor:yt,getOwnPropertyNames:mt,getOwnPropertySymbols:gt,getPrototypeOf:At}=Object,Et=globalThis,St=Et.trustedTypes,vt=St?St.emptyScript:"",bt=Et.reactiveElementPolyfillSupport,wt=(t,e)=>t,Pt={toAttribute(t,e){switch(e){case Boolean:t=t?vt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Ut=(t,e)=>!_t(t,e),Ct={attribute:!0,type:String,converter:Pt,reflect:!1,hasChanged:Ut};Symbol.metadata??=Symbol("metadata"),Et.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&ft(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=yt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const h=r?.call(this);o.call(this,e),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ct}static _$Ei(){if(this.hasOwnProperty(wt("elementProperties")))return;const t=At(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(wt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(wt("properties"))){const t=this.properties,e=[...mt(t),...gt(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift($t(t))}else void 0!==t&&e.push($t(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(lt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=at.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:Pt).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Pt;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??Ut)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[wt("elementProperties")]=new Map,b[wt("finalized")]=new Map,bt?.({ReactiveElement:b}),(Et.reactiveElementVersions??=[]).push("2.0.4");
28
- /**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */
33
- class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}s._$litElement$=!0,s.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const Ot=globalThis.litElementPolyfillSupport;Ot?.({LitElement:s}),(globalThis.litElementVersions??=[]).push("4.0.4");
34
- /**
35
- * @license
36
- * Copyright 2017 Google LLC
37
- * SPDX-License-Identifier: BSD-3-Clause
38
- */
39
- const Rt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
40
- /**
41
- * @license
42
- * Copyright 2017 Google LLC
43
- * SPDX-License-Identifier: BSD-3-Clause
44
- */,xt={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:A},Mt=(t=xt,e,i)=>{const{kind:r,metadata:o}=i;let h=globalThis.litPropertyMetadata.get(o);if(void 0===h&&globalThis.litPropertyMetadata.set(o,h=new Map),h.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=i;return function(i){const o=this[r];e.call(this,i),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function Tt(t){return(e,i)=>"object"==typeof i?Mt(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}export{Y as T,ut as i,ht as j,Tt as n,s,Rt as t,X as w,Q as x};
@@ -1,33 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=globalThis,e=t.trustedTypes,s=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,i="$lit$",r=`lit$${(Math.random()+"").slice(9)}$`,n="?"+r,a=`<${n}>`,o=document,h=()=>o.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,l=Array.isArray,d="[ \t\n\f\r]",u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,p=/-->/g,g=/>/g,_=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),b=/'/g,m=/"/g,$=/^(?:script|style|textarea|title)$/i,A=(t,...e)=>({_$litType$:1,strings:t,values:e}),f=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),v=new WeakMap,x=o.createTreeWalker(o,129);function S(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,n=[];let o,h=2===e?"<svg>":"",c=u;for(let e=0;e<s;e++){const s=t[e];let l,d,A=-1,f=0;for(;f<s.length&&(c.lastIndex=f,d=c.exec(s),null!==d);)f=c.lastIndex,c===u?"!--"===d[1]?c=p:void 0!==d[1]?c=g:void 0!==d[2]?($.test(d[2])&&(o=RegExp("</"+d[2],"g")),c=_):void 0!==d[3]&&(c=_):c===_?">"===d[0]?(c=o??u,A=-1):void 0===d[1]?A=-2:(A=c.lastIndex-d[2].length,l=d[1],c=void 0===d[3]?_:'"'===d[3]?m:b):c===m||c===b?c=_:c===p||c===g?c=u:(c=_,o=void 0);const y=c===_&&t[e+1].startsWith("/>")?" ":"";h+=c===u?s+a:A>=0?(n.push(l),s.slice(0,A)+i+s.slice(A)+r+y):s+r+(-2===A?e:y)}return[S(t,h+(t[s]||"<?>")+(2===e?"</svg>":"")),n]};class N{constructor({strings:t,_$litType$:s},a){let o;this.parts=[];let c=0,l=0;const d=t.length-1,u=this.parts,[p,g]=T(t,s);if(this.el=N.createElement(p,a),x.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=x.nextNode())&&u.length<d;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(i)){const e=g[l++],s=o.getAttribute(t).split(r),i=/([.?@])?(.*)/.exec(e);u.push({type:1,index:c,name:i[2],strings:s,ctor:"."===i[1]?M:"?"===i[1]?E:"@"===i[1]?I:R}),o.removeAttribute(t)}else t.startsWith(r)&&(u.push({type:6,index:c}),o.removeAttribute(t));if($.test(o.tagName)){const t=o.textContent.split(r),s=t.length-1;if(s>0){o.textContent=e?e.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],h()),x.nextNode(),u.push({type:2,index:++c});o.append(t[s],h())}}}else if(8===o.nodeType)if(o.data===n)u.push({type:2,index:c});else{let t=-1;for(;-1!==(t=o.data.indexOf(r,t+1));)u.push({type:7,index:c}),t+=r.length-1}c++}}static createElement(t,e){const s=o.createElement("template");return s.innerHTML=t,s}}function H(t,e,s=t,i){if(e===f)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=c(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=H(t,r._$AS(t,e.values),r,i)),e}class C{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??o).importNode(e,!0);x.currentNode=i;let r=x.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new w(r,r.nextSibling,this,t):1===h.type?e=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(e=new U(r,this,t)),this._$AV.push(e),h=s[++a]}n!==h?.index&&(r=x.nextNode(),n++)}return x.currentNode=o,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class w{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=H(this,t,e),c(t)?t===y||null==t||""===t?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==f&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>l(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==y&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(o.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(S(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new C(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=v.get(t.strings);return void 0===e&&v.set(t.strings,e=new N(t)),e}k(t){l(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new w(this.S(h()),this.S(h()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=H(this,t,e,0),n=!c(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=H(this,i[s+a],e,a),o===f&&(o=this._$AH[a]),n||=!c(o)||o!==this._$AH[a],o===y?t=y:t!==y&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class E extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class I extends R{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??y)===f)return;const s=this._$AH,i=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const W=t.litHtmlPolyfillSupport;W?.(N,w),(t.litHtmlVersions??=[]).push("3.1.2");const j=globalThis;j.ShadowRoot&&(void 0===j.ShadyCSS||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&CSSStyleSheet.prototype,Symbol.metadata??=Symbol("metadata");class D extends HTMLElement{static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,s){this[t]=s}constructor(){super(),this.renderedOnce=!1,this.rendered=new Promise((t=>{this.renderResolve=t})),this.attachShadow({mode:"open"});const t=customElements.get(this.localName);this.shadowRoot.adoptedStyleSheets=t.styles?t.styles.map((t=>t.styleSheet??t)):[],this.requestRender()}render(){return A`<slot></slot>`}requestRender(){((t,e,s)=>{const i=e;let r=i._$litPart$;if(void 0===r){const t=null;i._$litPart$=r=new w(e.insertBefore(h(),t),t,void 0,{})}r._$AI(t)})(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}globalThis.pubsub=globalThis.pubsub||new class{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}subscribe(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0}),s=this._handleContext(e,s),this.subscribers[t].handlers.push(e.bind(s))}unsubscribe(t,e,s){if(!this.hasSubscribers(t))return;s=this._handleContext(e,s);const i=this.subscribers[t].handlers.indexOf(e.bind(s));this.subscribers[t].handlers.splice(i),0===this.subscribers[t].handlers.length&&delete this.subscribers[t]}publish(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const i=this.subscribers[t]?.value;if(this.verbose||s||i!==e){this.subscribers[t].value=e;for(const s of this.subscribers[t].handlers)s(e,i)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t){return new Promise((e=>{const s=i=>{e(i),this.unsubscribe(t,s)};this.subscribe(t,s)}))}};const k={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},O=(t,e)=>{let s=t;return e===Boolean?s=Boolean("true"===t):e===Number?s=Number(t):e===Uint8Array?s=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(s=JSON.parse(t),e===Map&&(s=new Map(t)),e===WeakMap&&(s=new WeakMap(t))),s},z=t=>{t={...k,...t};let e=0;return function(s,{kind:i,name:r,addInitializer:n,access:a,metadata:o}){const{type:h,reflect:c,attribute:l,renders:d,batches:u,batchDelay:p,consumer:g,provider:_,temporaryRender:b}=t,m=String(r),$=l&&"string"==typeof l?l:m,A=h===Boolean,f=g||"boolean"==typeof t.consumes?$:t.consumes,y=_||"boolean"==typeof t.provides?$:t.provides;if(t.provider&&console.warn(`${m}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${m}: 'options.consumer' is deprecated, used options.consumes instead`),n((async function(){"accessor"!==i&&console.warn(`${this.localName}: @property(${t}) ${m} ${i} is not supported`),(l||c)&&(o||(o={}),o.observedAttributes||(o.observedAttributes=new Map),o.observedAttributes.set(m,$)),f&&globalThis.pubsub.subscribe(f,(async t=>{this[r]=t}))})),"accessor"===i)return{get(){return v.call(this)},set(t){return x.call(this,t)},init(t){return this.hasAttribute($)&&(t=A?this.hasAttribute($):O(this.getAttribute($),h)),void 0!==t&&x.call(this,t),f&&globalThis.pubsub.subscribers?.[f]?.value&&x.call(this,globalThis.pubsub.subscribers[f].value),this[r]}};function v(){const t=c||l?A?this.hasAttribute($):O(this.getAttribute($),h):this[`__${m}`]?this[`__${m}`]:this[`_${m}`];return f&&!this[`__${m}`]&&globalThis.pubsub.subscribers?.[f]?.value?(t!==globalThis.pubsub.subscribers[f].value&&x.call(this,globalThis.pubsub.subscribers[f].value),globalThis.pubsub.subscribers[f].value):t}async function x(t){if(y&&globalThis.pubsub.publish(y,t),this[`_${m}`]!==t){this.willChange&&(this[`__${m}`]=await this.willChange(r,t)),c||l?A?t||this[`__${m}`]?this.setAttribute($,""):this.removeAttribute($):t||this[`__${m}`]?this.setAttribute($,((t,e)=>{let s=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let i;t!==Map&&t!==WeakMap||(i=Object(e).entries()),s=JSON.stringify(i)}return s})(h,this[`__${m}`]??t)):this.removeAttribute($):this[`_${m}`]=t;const s=()=>{e=0,this.requestRender&&d&&this.requestRender(),this.onChange&&this.onChange(r,this[`__${m}`]??t)};u?(e===b&&s(),this[`_${m}_timeout`]&&clearTimeout(this[`_${m}_timeout`]),this[`_${m}_timeout`]=setTimeout(s,p)):s()}}}};var B=function(t,e,s,i,r,n){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var o,h=i.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!e&&t?i.static?t:t.prototype:null,d=e||(l?Object.getOwnPropertyDescriptor(l,i.name):{}),u=!1,p=s.length-1;p>=0;p--){var g={};for(var _ in i)g[_]="access"===_?{}:i[_];for(var _ in i.access)g.access[_]=i.access[_];g.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");n.push(a(t||null))};var b=(0,s[p])("accessor"===h?{get:d.get,set:d.set}:d[c],g);if("accessor"===h){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(o=a(b.get))&&(d.get=o),(o=a(b.set))&&(d.set=o),(o=a(b.init))&&r.unshift(o)}else(o=a(b))&&("field"===h?r.unshift(o):d[c]=o)}l&&Object.defineProperty(l,i.name,d),u=!0},P=function(t,e,s){for(var i=arguments.length>2,r=0;r<e.length;r++)s=i?e[r].call(t,s):e[r].call(t);return i?s:void 0};let L=(()=>{let t,e,s,i,r,n,a,o,h,c,l=D,d=[],u=[],p=[],g=[],_=[],b=[],m=[],$=[],f=[],y=[],v=[];return class FlexDisplay extends l{static{const A="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;t=[z({type:String})],e=[z({type:String})],s=[z({type:String})],i=[z({type:String})],r=[z({type:String,reflect:!0})],n=[z({type:Boolean,reflect:!0})],a=[z({type:Boolean,reflect:!0,attribute:"center-center"})],o=[z({type:String})],h=[z({type:String})],c=[z({type:String})],B(this,null,t,{kind:"accessor",name:"padding",static:!1,private:!1,access:{has:t=>"padding"in t,get:t=>t.padding,set:(t,e)=>{t.padding=e}},metadata:A},u,d),B(this,null,e,{kind:"accessor",name:"minWidth",static:!1,private:!1,access:{has:t=>"minWidth"in t,get:t=>t.minWidth,set:(t,e)=>{t.minWidth=e}},metadata:A},p,d),B(this,null,s,{kind:"accessor",name:"maxWidth",static:!1,private:!1,access:{has:t=>"maxWidth"in t,get:t=>t.maxWidth,set:(t,e)=>{t.maxWidth=e}},metadata:A},g,d),B(this,null,i,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:A},_,d),B(this,null,r,{kind:"accessor",name:"direction",static:!1,private:!1,access:{has:t=>"direction"in t,get:t=>t.direction,set:(t,e)=>{t.direction=e}},metadata:A},b,d),B(this,null,n,{kind:"accessor",name:"center",static:!1,private:!1,access:{has:t=>"center"in t,get:t=>t.center,set:(t,e)=>{t.center=e}},metadata:A},m,d),B(this,null,a,{kind:"accessor",name:"centerCenter",static:!1,private:!1,access:{has:t=>"centerCenter"in t,get:t=>t.centerCenter,set:(t,e)=>{t.centerCenter=e}},metadata:A},$,d),B(this,null,o,{kind:"accessor",name:"justifyContent",static:!1,private:!1,access:{has:t=>"justifyContent"in t,get:t=>t.justifyContent,set:(t,e)=>{t.justifyContent=e}},metadata:A},f,d),B(this,null,h,{kind:"accessor",name:"alignItems",static:!1,private:!1,access:{has:t=>"alignItems"in t,get:t=>t.alignItems,set:(t,e)=>{t.alignItems=e}},metadata:A},y,d),B(this,null,c,{kind:"accessor",name:"boxSizing",static:!1,private:!1,access:{has:t=>"boxSizing"in t,get:t=>t.boxSizing,set:(t,e)=>{t.boxSizing=e}},metadata:A},v,d),A&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:A})}#t=(P(this,d),P(this,u,"0"));get padding(){return this.#t}set padding(t){this.#t=t}#e=P(this,p,"auto");get minWidth(){return this.#e}set minWidth(t){this.#e=t}#s=P(this,g,"auto");get maxWidth(){return this.#s}set maxWidth(t){this.#s=t}#i=P(this,_,"100%");get width(){return this.#i}set width(t){this.#i=t}#r=P(this,b,"row");get direction(){return this.#r}set direction(t){this.#r=t}#n=P(this,m,void 0);get center(){return this.#n}set center(t){this.#n=t}#a=P(this,$,void 0);get centerCenter(){return this.#a}set centerCenter(t){this.#a=t}#o=P(this,f,"flex-start");get justifyContent(){return this.#o}set justifyContent(t){this.#o=t}#h=P(this,y,"flex-start");get alignItems(){return this.#h}set alignItems(t){this.#h=t}#c=P(this,v,"border-box");get boxSizing(){return this.#c}set boxSizing(t){this.#c=t}render(){return A`
7
- <style>
8
- :host {
9
- display: flex;
10
- box-sizing: var(--flex-display-box-sizing, ${this.boxSizing});
11
- max-width: var(--flex-display-max-width, ${this.maxWidth});
12
- min-width: var(--flex-display-min-width, ${this.minWidth});
13
- width: var(--flex-display-width, ${this.width});
14
- flex-direction: var(--flex-display-direction, ${this.direction});
15
- justify-content: var(
16
- --flex-display-justify-content,
17
- ${this.justifyContent}
18
- );
19
- align-items: var(--flex-display-align-items, ${this.alignItems});
20
- padding: var(--flex-display-padding, ${this.padding});
21
- }
22
-
23
- :host([center]) {
24
- align-items: center;
25
- }
26
-
27
- :host([center-center]) {
28
- align-items: center;
29
- justify-content: center;
30
- }
31
- </style>
32
- <slot></slot>
33
- `}}})();customElements.define("flex-row",class FlexRow extends L{constructor(){super(),this.direction="row",this.width="auto"}});export{L as F};