screenreader-speech-capture 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +24 -91
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js +179 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js +4 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js +34 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.D_WMpF1j.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.D_WMpF1j.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.D_WMpF1j.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{0.CJdYHfX8.js → 0.kO9a4iA1.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.Y_rJeHBb.js +50 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.Y_rJeHBb.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.Y_rJeHBb.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js +5 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +39 -5
- package/dist/ui/server/_app/immutable/assets/_page.CK2Biket.css +1 -0
- package/dist/ui/server/chunks/bridge-api.js +12 -2
- package/dist/ui/server/chunks/bridge-api.js.map +1 -1
- package/dist/ui/server/chunks/composition.js +2615 -2
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/icon-button.js +31 -2389
- package/dist/ui/server/chunks/icon-button.js.map +1 -1
- package/dist/ui/server/chunks/index-server.js +2 -0
- package/dist/ui/server/chunks/instance.js +3 -3
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/chunks/outlined-text-field.js +1864 -0
- package/dist/ui/server/chunks/outlined-text-field.js.map +1 -0
- package/dist/ui/server/chunks/src.js +24 -5
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/chunks/state.js +1 -0
- package/dist/ui/server/chunks/state.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +34 -0
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +1 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js +2 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +46 -1904
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.svelte.js +99 -3
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
- package/dist/ui/server/manifest-full.js +8 -1
- package/dist/ui/server/manifest.js +8 -1
- package/dist/ui/server/nodes/0.js +1 -1
- package/dist/ui/server/nodes/2.js +1 -1
- package/dist/ui/server/nodes/3.js +2 -2
- package/dist/ui/server/server.js +8 -1
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/3.BKNNVeb3.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/3.BKNNVeb3.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.BKNNVeb3.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CEzmqEHD.js +0 -37
- package/dist/ui/client/ui/_app/immutable/chunks/CEzmqEHD.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CEzmqEHD.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/vjU7Kh7P.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/vjU7Kh7P.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/vjU7Kh7P.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.DkG_UKpo.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.DkG_UKpo.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.DkG_UKpo.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CJdYHfX8.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CJdYHfX8.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CKUmeq5l.js +0 -228
- package/dist/ui/client/ui/_app/immutable/nodes/2.CKUmeq5l.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CKUmeq5l.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.D74ClOwr.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/3.D74ClOwr.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.D74ClOwr.js.gz +0 -0
- package/dist/ui/server/_app/immutable/assets/_page.BKNNVeb3.css +0 -1
|
@@ -1,6 +1,2498 @@
|
|
|
1
1
|
import { mt as resolve } from "./internal.js";
|
|
2
|
-
import { a as SpeechEntrySchema, c as SessionListSchema, n as checkDto, o as SpeechListSchema, r as StatusSchema, u as StartSessionResponseSchema } from "./src.js";
|
|
2
|
+
import { a as SpeechEntrySchema, c as SessionListSchema, d as ConfigOverridesSchema, n as checkDto, o as SpeechListSchema, p as ConfigSchema, r as StatusSchema, u as StartSessionResponseSchema } from "./src.js";
|
|
3
3
|
import "./server2.js";
|
|
4
|
+
// ../../node_modules/.pnpm/tslib@2.9.1/node_modules/tslib/tslib.es6.mjs
|
|
5
|
+
function __decorate(decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
}
|
|
11
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/custom-element.js
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
var t$3 = (t) => (e, o) => {
|
|
18
|
+
void 0 !== o ? o.addInitializer(() => {
|
|
19
|
+
customElements.define(t, e);
|
|
20
|
+
}) : customElements.define(t, e);
|
|
21
|
+
};
|
|
22
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2023 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/
|
|
28
|
+
var ElementInternalsShim = class ElementInternals {
|
|
29
|
+
get shadowRoot() {
|
|
30
|
+
return this.__host.__shadowRoot;
|
|
31
|
+
}
|
|
32
|
+
constructor(_host) {
|
|
33
|
+
this.ariaActiveDescendantElement = null;
|
|
34
|
+
this.ariaAtomic = "";
|
|
35
|
+
this.ariaAutoComplete = "";
|
|
36
|
+
this.ariaBrailleLabel = "";
|
|
37
|
+
this.ariaBrailleRoleDescription = "";
|
|
38
|
+
this.ariaBusy = "";
|
|
39
|
+
this.ariaChecked = "";
|
|
40
|
+
this.ariaColCount = "";
|
|
41
|
+
this.ariaColIndex = "";
|
|
42
|
+
this.ariaColIndexText = "";
|
|
43
|
+
this.ariaColSpan = "";
|
|
44
|
+
this.ariaControlsElements = null;
|
|
45
|
+
this.ariaCurrent = "";
|
|
46
|
+
this.ariaDescribedByElements = null;
|
|
47
|
+
this.ariaDescription = "";
|
|
48
|
+
this.ariaDetailsElements = null;
|
|
49
|
+
this.ariaDisabled = "";
|
|
50
|
+
this.ariaErrorMessageElements = null;
|
|
51
|
+
this.ariaExpanded = "";
|
|
52
|
+
this.ariaFlowToElements = null;
|
|
53
|
+
this.ariaHasPopup = "";
|
|
54
|
+
this.ariaHidden = "";
|
|
55
|
+
this.ariaInvalid = "";
|
|
56
|
+
this.ariaKeyShortcuts = "";
|
|
57
|
+
this.ariaLabel = "";
|
|
58
|
+
this.ariaLabelledByElements = null;
|
|
59
|
+
this.ariaLevel = "";
|
|
60
|
+
this.ariaLive = "";
|
|
61
|
+
this.ariaModal = "";
|
|
62
|
+
this.ariaMultiLine = "";
|
|
63
|
+
this.ariaMultiSelectable = "";
|
|
64
|
+
this.ariaOrientation = "";
|
|
65
|
+
this.ariaOwnsElements = null;
|
|
66
|
+
this.ariaPlaceholder = "";
|
|
67
|
+
this.ariaPosInSet = "";
|
|
68
|
+
this.ariaPressed = "";
|
|
69
|
+
this.ariaReadOnly = "";
|
|
70
|
+
this.ariaRelevant = "";
|
|
71
|
+
this.ariaRequired = "";
|
|
72
|
+
this.ariaRoleDescription = "";
|
|
73
|
+
this.ariaRowCount = "";
|
|
74
|
+
this.ariaRowIndex = "";
|
|
75
|
+
this.ariaRowIndexText = "";
|
|
76
|
+
this.ariaRowSpan = "";
|
|
77
|
+
this.ariaSelected = "";
|
|
78
|
+
this.ariaSetSize = "";
|
|
79
|
+
this.ariaSort = "";
|
|
80
|
+
this.ariaValueMax = "";
|
|
81
|
+
this.ariaValueMin = "";
|
|
82
|
+
this.ariaValueNow = "";
|
|
83
|
+
this.ariaValueText = "";
|
|
84
|
+
this.role = "";
|
|
85
|
+
this.form = null;
|
|
86
|
+
this.labels = [];
|
|
87
|
+
this.states = /* @__PURE__ */ new Set();
|
|
88
|
+
this.validationMessage = "";
|
|
89
|
+
this.validity = {};
|
|
90
|
+
this.willValidate = true;
|
|
91
|
+
this.__host = _host;
|
|
92
|
+
}
|
|
93
|
+
checkValidity() {
|
|
94
|
+
console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true.");
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
reportValidity() {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
setFormValue() {}
|
|
101
|
+
setValidity() {}
|
|
102
|
+
};
|
|
103
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
|
|
104
|
+
/**
|
|
105
|
+
* @license
|
|
106
|
+
* Copyright 2023 Google LLC
|
|
107
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
108
|
+
*/
|
|
109
|
+
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
110
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
111
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
112
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
113
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
114
|
+
};
|
|
115
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
116
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
117
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
118
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
119
|
+
};
|
|
120
|
+
var _Event_cancelable;
|
|
121
|
+
var _Event_bubbles;
|
|
122
|
+
var _Event_composed;
|
|
123
|
+
var _Event_defaultPrevented;
|
|
124
|
+
var _Event_timestamp;
|
|
125
|
+
var _Event_propagationStopped;
|
|
126
|
+
var _Event_type;
|
|
127
|
+
var _Event_target;
|
|
128
|
+
var _Event_isBeingDispatched;
|
|
129
|
+
var _a$1;
|
|
130
|
+
var _CustomEvent_detail;
|
|
131
|
+
var _b;
|
|
132
|
+
var NONE = 0;
|
|
133
|
+
var CAPTURING_PHASE = 1;
|
|
134
|
+
var AT_TARGET = 2;
|
|
135
|
+
var BUBBLING_PHASE = 3;
|
|
136
|
+
var enumerableProperty$1 = { __proto__: null };
|
|
137
|
+
enumerableProperty$1.enumerable = true;
|
|
138
|
+
Object.freeze(enumerableProperty$1);
|
|
139
|
+
var EventShim = (_a$1 = class Event {
|
|
140
|
+
constructor(type, options = {}) {
|
|
141
|
+
_Event_cancelable.set(this, false);
|
|
142
|
+
_Event_bubbles.set(this, false);
|
|
143
|
+
_Event_composed.set(this, false);
|
|
144
|
+
_Event_defaultPrevented.set(this, false);
|
|
145
|
+
_Event_timestamp.set(this, Date.now());
|
|
146
|
+
_Event_propagationStopped.set(this, false);
|
|
147
|
+
_Event_type.set(this, void 0);
|
|
148
|
+
_Event_target.set(this, void 0);
|
|
149
|
+
_Event_isBeingDispatched.set(this, void 0);
|
|
150
|
+
this.NONE = NONE;
|
|
151
|
+
this.CAPTURING_PHASE = CAPTURING_PHASE;
|
|
152
|
+
this.AT_TARGET = AT_TARGET;
|
|
153
|
+
this.BUBBLING_PHASE = BUBBLING_PHASE;
|
|
154
|
+
if (arguments.length === 0) throw new Error(`The type argument must be specified`);
|
|
155
|
+
if (typeof options !== "object" || !options) throw new Error(`The "options" argument must be an object`);
|
|
156
|
+
const { bubbles, cancelable, composed } = options;
|
|
157
|
+
__classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
|
|
158
|
+
__classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
|
|
159
|
+
__classPrivateFieldSet(this, _Event_composed, !!composed, "f");
|
|
160
|
+
__classPrivateFieldSet(this, _Event_type, `${type}`, "f");
|
|
161
|
+
__classPrivateFieldSet(this, _Event_target, null, "f");
|
|
162
|
+
__classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
|
|
163
|
+
}
|
|
164
|
+
initEvent(_type, _bubbles, _cancelable) {
|
|
165
|
+
throw new Error("Method not implemented.");
|
|
166
|
+
}
|
|
167
|
+
stopImmediatePropagation() {
|
|
168
|
+
this.stopPropagation();
|
|
169
|
+
}
|
|
170
|
+
preventDefault() {
|
|
171
|
+
__classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
|
|
172
|
+
}
|
|
173
|
+
get target() {
|
|
174
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
175
|
+
}
|
|
176
|
+
get currentTarget() {
|
|
177
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
178
|
+
}
|
|
179
|
+
get srcElement() {
|
|
180
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
181
|
+
}
|
|
182
|
+
get type() {
|
|
183
|
+
return __classPrivateFieldGet(this, _Event_type, "f");
|
|
184
|
+
}
|
|
185
|
+
get cancelable() {
|
|
186
|
+
return __classPrivateFieldGet(this, _Event_cancelable, "f");
|
|
187
|
+
}
|
|
188
|
+
get defaultPrevented() {
|
|
189
|
+
return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
190
|
+
}
|
|
191
|
+
get timeStamp() {
|
|
192
|
+
return __classPrivateFieldGet(this, _Event_timestamp, "f");
|
|
193
|
+
}
|
|
194
|
+
composedPath() {
|
|
195
|
+
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
|
|
196
|
+
}
|
|
197
|
+
get returnValue() {
|
|
198
|
+
return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
199
|
+
}
|
|
200
|
+
get bubbles() {
|
|
201
|
+
return __classPrivateFieldGet(this, _Event_bubbles, "f");
|
|
202
|
+
}
|
|
203
|
+
get composed() {
|
|
204
|
+
return __classPrivateFieldGet(this, _Event_composed, "f");
|
|
205
|
+
}
|
|
206
|
+
get eventPhase() {
|
|
207
|
+
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a$1.AT_TARGET : _a$1.NONE;
|
|
208
|
+
}
|
|
209
|
+
get cancelBubble() {
|
|
210
|
+
return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
|
|
211
|
+
}
|
|
212
|
+
set cancelBubble(value) {
|
|
213
|
+
if (value) __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
214
|
+
}
|
|
215
|
+
stopPropagation() {
|
|
216
|
+
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
217
|
+
}
|
|
218
|
+
get isTrusted() {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
}, _Event_cancelable = /* @__PURE__ */ new WeakMap(), _Event_bubbles = /* @__PURE__ */ new WeakMap(), _Event_composed = /* @__PURE__ */ new WeakMap(), _Event_defaultPrevented = /* @__PURE__ */ new WeakMap(), _Event_timestamp = /* @__PURE__ */ new WeakMap(), _Event_propagationStopped = /* @__PURE__ */ new WeakMap(), _Event_type = /* @__PURE__ */ new WeakMap(), _Event_target = /* @__PURE__ */ new WeakMap(), _Event_isBeingDispatched = /* @__PURE__ */ new WeakMap(), _a$1.NONE = NONE, _a$1.CAPTURING_PHASE = CAPTURING_PHASE, _a$1.AT_TARGET = AT_TARGET, _a$1.BUBBLING_PHASE = BUBBLING_PHASE, _a$1);
|
|
222
|
+
Object.defineProperties(EventShim.prototype, {
|
|
223
|
+
initEvent: enumerableProperty$1,
|
|
224
|
+
stopImmediatePropagation: enumerableProperty$1,
|
|
225
|
+
preventDefault: enumerableProperty$1,
|
|
226
|
+
target: enumerableProperty$1,
|
|
227
|
+
currentTarget: enumerableProperty$1,
|
|
228
|
+
srcElement: enumerableProperty$1,
|
|
229
|
+
type: enumerableProperty$1,
|
|
230
|
+
cancelable: enumerableProperty$1,
|
|
231
|
+
defaultPrevented: enumerableProperty$1,
|
|
232
|
+
timeStamp: enumerableProperty$1,
|
|
233
|
+
composedPath: enumerableProperty$1,
|
|
234
|
+
returnValue: enumerableProperty$1,
|
|
235
|
+
bubbles: enumerableProperty$1,
|
|
236
|
+
composed: enumerableProperty$1,
|
|
237
|
+
eventPhase: enumerableProperty$1,
|
|
238
|
+
cancelBubble: enumerableProperty$1,
|
|
239
|
+
stopPropagation: enumerableProperty$1,
|
|
240
|
+
isTrusted: enumerableProperty$1
|
|
241
|
+
});
|
|
242
|
+
var CustomEventShim = (_b = class CustomEvent extends EventShim {
|
|
243
|
+
constructor(type, options = {}) {
|
|
244
|
+
super(type, options);
|
|
245
|
+
_CustomEvent_detail.set(this, void 0);
|
|
246
|
+
__classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
|
|
247
|
+
}
|
|
248
|
+
initCustomEvent(_type, _bubbles, _cancelable, _detail) {
|
|
249
|
+
throw new Error("Method not implemented.");
|
|
250
|
+
}
|
|
251
|
+
get detail() {
|
|
252
|
+
return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
|
|
253
|
+
}
|
|
254
|
+
}, _CustomEvent_detail = /* @__PURE__ */ new WeakMap(), _b);
|
|
255
|
+
Object.defineProperties(CustomEventShim.prototype, { detail: enumerableProperty$1 });
|
|
256
|
+
var EventShimWithRealType = EventShim;
|
|
257
|
+
var CustomEventShimWithRealType = CustomEventShim;
|
|
258
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
|
|
259
|
+
/**
|
|
260
|
+
* @license
|
|
261
|
+
* Copyright 2024 Google LLC
|
|
262
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
|
+
*/
|
|
264
|
+
var _a = class CSSRule {
|
|
265
|
+
constructor() {
|
|
266
|
+
this.STYLE_RULE = 1;
|
|
267
|
+
this.CHARSET_RULE = 2;
|
|
268
|
+
this.IMPORT_RULE = 3;
|
|
269
|
+
this.MEDIA_RULE = 4;
|
|
270
|
+
this.FONT_FACE_RULE = 5;
|
|
271
|
+
this.PAGE_RULE = 6;
|
|
272
|
+
this.NAMESPACE_RULE = 10;
|
|
273
|
+
this.KEYFRAMES_RULE = 7;
|
|
274
|
+
this.KEYFRAME_RULE = 8;
|
|
275
|
+
this.SUPPORTS_RULE = 12;
|
|
276
|
+
this.COUNTER_STYLE_RULE = 11;
|
|
277
|
+
this.FONT_FEATURE_VALUES_RULE = 14;
|
|
278
|
+
this.MARGIN_RULE = 9;
|
|
279
|
+
this.__parentStyleSheet = null;
|
|
280
|
+
this.cssText = "";
|
|
281
|
+
}
|
|
282
|
+
get parentRule() {
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
get parentStyleSheet() {
|
|
286
|
+
return this.__parentStyleSheet;
|
|
287
|
+
}
|
|
288
|
+
get type() {
|
|
289
|
+
return 0;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
_a.STYLE_RULE = 1, _a.CHARSET_RULE = 2, _a.IMPORT_RULE = 3, _a.MEDIA_RULE = 4, _a.FONT_FACE_RULE = 5, _a.PAGE_RULE = 6, _a.NAMESPACE_RULE = 10, _a.KEYFRAMES_RULE = 7, _a.KEYFRAME_RULE = 8, _a.SUPPORTS_RULE = 12, _a.COUNTER_STYLE_RULE = 11, _a.FONT_FEATURE_VALUES_RULE = 14, _a.MARGIN_RULE = 9;
|
|
293
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/index.js
|
|
294
|
+
/**
|
|
295
|
+
* @license
|
|
296
|
+
* Copyright 2019 Google LLC
|
|
297
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
298
|
+
*/
|
|
299
|
+
globalThis.Event ??= EventShimWithRealType;
|
|
300
|
+
globalThis.CustomEvent ??= CustomEventShimWithRealType;
|
|
301
|
+
var constructionToken = Symbol();
|
|
302
|
+
var isCaptureEventListener = (options) => typeof options === "boolean" ? options : options?.capture ?? false;
|
|
303
|
+
var enumerableProperty = { __proto__: null };
|
|
304
|
+
enumerableProperty.enumerable = true;
|
|
305
|
+
Object.freeze(enumerableProperty);
|
|
306
|
+
/**
|
|
307
|
+
* This is a basic implementation of an EventTarget.
|
|
308
|
+
*
|
|
309
|
+
* This is not fully spec compliant (e.g. validation),
|
|
310
|
+
* but should work well enough for our use cases.
|
|
311
|
+
*
|
|
312
|
+
* @see https://dom.spec.whatwg.org/#eventtarget
|
|
313
|
+
*
|
|
314
|
+
* Example Event Path
|
|
315
|
+
* ------------------
|
|
316
|
+
*
|
|
317
|
+
* Note that this depends on the logic in `packages/labs/ssr/src/lib/render-value.ts`.
|
|
318
|
+
* Any element that is not a custom element or a slot element is skipped in the chain.
|
|
319
|
+
*
|
|
320
|
+
* <main>
|
|
321
|
+
* <my-el1>
|
|
322
|
+
* #shadow-dom (open)
|
|
323
|
+
* <div>
|
|
324
|
+
* <slot></slot>
|
|
325
|
+
* <my-el2>
|
|
326
|
+
* #shadow-dom (closed)
|
|
327
|
+
* <slot></slot>
|
|
328
|
+
* <event-dispatcher3></event-dispatcher3>
|
|
329
|
+
* <slot name="nested"></slot>
|
|
330
|
+
* </my-el2>
|
|
331
|
+
* </div>
|
|
332
|
+
* <event-dispatcher1></event-dispatcher1>
|
|
333
|
+
* <event-dispatcher2 slot="nested"></event-dispatcher2>
|
|
334
|
+
* </my-el1>
|
|
335
|
+
* </main>
|
|
336
|
+
*
|
|
337
|
+
* Given the previous structure, the event path of this shim would be as follows,
|
|
338
|
+
* for the given dispatcher with an event that bubbles (document-fragment
|
|
339
|
+
* represents a ShadowRoot/#shadow-dom instance):
|
|
340
|
+
*
|
|
341
|
+
* <event-dispatcher1>:
|
|
342
|
+
* [event-dispatcher1, slot{my-el1}, document-fragment{my-el1}, my-el1, document]
|
|
343
|
+
*
|
|
344
|
+
* <event-dispatcher2>:
|
|
345
|
+
* [
|
|
346
|
+
* event-dispatcher2,
|
|
347
|
+
* slot[name="nested"]{my-el1},
|
|
348
|
+
* slot{my-el2},
|
|
349
|
+
* document-fragment{my-el2},
|
|
350
|
+
* my-el2,
|
|
351
|
+
* document-fragment{my-el1},
|
|
352
|
+
* my-el1,
|
|
353
|
+
* document
|
|
354
|
+
* ]
|
|
355
|
+
*
|
|
356
|
+
* <event-dispatcher3> (without composed):
|
|
357
|
+
* [event-dispatcher3, document-fragment{my-el2}]
|
|
358
|
+
*
|
|
359
|
+
* <event-dispatcher3> (composed):
|
|
360
|
+
* [
|
|
361
|
+
* event-dispatcher3,
|
|
362
|
+
* document-fragment{my-el2},
|
|
363
|
+
* my-el2,
|
|
364
|
+
* document-fragment{my-el1},
|
|
365
|
+
* my-el1,
|
|
366
|
+
* document
|
|
367
|
+
* ]
|
|
368
|
+
*/
|
|
369
|
+
var EventTarget$1 = class {
|
|
370
|
+
constructor() {
|
|
371
|
+
this.__eventListeners = /* @__PURE__ */ new Map();
|
|
372
|
+
this.__captureEventListeners = /* @__PURE__ */ new Map();
|
|
373
|
+
}
|
|
374
|
+
addEventListener(type, callback, options) {
|
|
375
|
+
if (callback === void 0 || callback === null) return;
|
|
376
|
+
const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
|
|
377
|
+
let eventListeners = eventListenersMap.get(type);
|
|
378
|
+
if (eventListeners === void 0) {
|
|
379
|
+
eventListeners = /* @__PURE__ */ new Map();
|
|
380
|
+
eventListenersMap.set(type, eventListeners);
|
|
381
|
+
} else if (eventListeners.has(callback)) return;
|
|
382
|
+
const normalizedOptions = typeof options === "object" && options ? options : {};
|
|
383
|
+
normalizedOptions.signal?.addEventListener("abort", () => this.removeEventListener(type, callback, options));
|
|
384
|
+
eventListeners.set(callback, normalizedOptions ?? {});
|
|
385
|
+
}
|
|
386
|
+
removeEventListener(type, callback, options) {
|
|
387
|
+
if (callback === void 0 || callback === null) return;
|
|
388
|
+
const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
|
|
389
|
+
const eventListeners = eventListenersMap.get(type);
|
|
390
|
+
if (eventListeners !== void 0) {
|
|
391
|
+
eventListeners.delete(callback);
|
|
392
|
+
if (!eventListeners.size) eventListenersMap.delete(type);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
dispatchEvent(event) {
|
|
396
|
+
let composedPath = this.__resolveFullEventPath();
|
|
397
|
+
if (!event.composed && this.__host) composedPath = composedPath.slice(0, composedPath.indexOf(this.__host));
|
|
398
|
+
let stopPropagation = false;
|
|
399
|
+
let stopImmediatePropagation = false;
|
|
400
|
+
let eventPhase = EventShimWithRealType.NONE;
|
|
401
|
+
let target = null;
|
|
402
|
+
let tmpTarget = null;
|
|
403
|
+
let currentTarget = null;
|
|
404
|
+
const originalStopPropagation = event.stopPropagation;
|
|
405
|
+
const originalStopImmediatePropagation = event.stopImmediatePropagation;
|
|
406
|
+
Object.defineProperties(event, {
|
|
407
|
+
target: {
|
|
408
|
+
get() {
|
|
409
|
+
return target ?? tmpTarget;
|
|
410
|
+
},
|
|
411
|
+
...enumerableProperty
|
|
412
|
+
},
|
|
413
|
+
srcElement: {
|
|
414
|
+
get() {
|
|
415
|
+
return event.target;
|
|
416
|
+
},
|
|
417
|
+
...enumerableProperty
|
|
418
|
+
},
|
|
419
|
+
currentTarget: {
|
|
420
|
+
get() {
|
|
421
|
+
return currentTarget;
|
|
422
|
+
},
|
|
423
|
+
...enumerableProperty
|
|
424
|
+
},
|
|
425
|
+
eventPhase: {
|
|
426
|
+
get() {
|
|
427
|
+
return eventPhase;
|
|
428
|
+
},
|
|
429
|
+
...enumerableProperty
|
|
430
|
+
},
|
|
431
|
+
composedPath: {
|
|
432
|
+
value: () => composedPath,
|
|
433
|
+
...enumerableProperty
|
|
434
|
+
},
|
|
435
|
+
stopPropagation: {
|
|
436
|
+
value: () => {
|
|
437
|
+
stopPropagation = true;
|
|
438
|
+
originalStopPropagation.call(event);
|
|
439
|
+
},
|
|
440
|
+
...enumerableProperty
|
|
441
|
+
},
|
|
442
|
+
stopImmediatePropagation: {
|
|
443
|
+
value: () => {
|
|
444
|
+
stopImmediatePropagation = true;
|
|
445
|
+
originalStopImmediatePropagation.call(event);
|
|
446
|
+
},
|
|
447
|
+
...enumerableProperty
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
const invokeEventListener = (listener, options, eventListenerMap) => {
|
|
451
|
+
if (typeof listener === "function") listener(event);
|
|
452
|
+
else if (typeof listener?.handleEvent === "function") listener.handleEvent(event);
|
|
453
|
+
if (options.once) eventListenerMap.delete(listener);
|
|
454
|
+
};
|
|
455
|
+
const finishDispatch = () => {
|
|
456
|
+
currentTarget = null;
|
|
457
|
+
eventPhase = EventShimWithRealType.NONE;
|
|
458
|
+
return !event.defaultPrevented;
|
|
459
|
+
};
|
|
460
|
+
const captureEventPath = composedPath.slice().reverse();
|
|
461
|
+
target = !this.__host || !event.composed ? this : null;
|
|
462
|
+
const retarget = (eventTargets) => {
|
|
463
|
+
tmpTarget = this;
|
|
464
|
+
while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) tmpTarget = tmpTarget.__host;
|
|
465
|
+
};
|
|
466
|
+
for (const eventTarget of captureEventPath) {
|
|
467
|
+
if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
|
|
468
|
+
currentTarget = eventTarget;
|
|
469
|
+
eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.CAPTURING_PHASE;
|
|
470
|
+
const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
|
|
471
|
+
if (captureEventListeners) for (const [listener, options] of captureEventListeners) {
|
|
472
|
+
invokeEventListener(listener, options, captureEventListeners);
|
|
473
|
+
if (stopImmediatePropagation) return finishDispatch();
|
|
474
|
+
}
|
|
475
|
+
if (stopPropagation) return finishDispatch();
|
|
476
|
+
}
|
|
477
|
+
const bubbleEventPath = event.bubbles ? composedPath : [this];
|
|
478
|
+
tmpTarget = null;
|
|
479
|
+
for (const eventTarget of bubbleEventPath) {
|
|
480
|
+
if (!target && (!tmpTarget || eventTarget === tmpTarget.__host)) retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
|
|
481
|
+
currentTarget = eventTarget;
|
|
482
|
+
eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.BUBBLING_PHASE;
|
|
483
|
+
const eventListeners = eventTarget.__eventListeners.get(event.type);
|
|
484
|
+
if (eventListeners) for (const [listener, options] of eventListeners) {
|
|
485
|
+
invokeEventListener(listener, options, eventListeners);
|
|
486
|
+
if (stopImmediatePropagation) return finishDispatch();
|
|
487
|
+
}
|
|
488
|
+
if (stopPropagation) return finishDispatch();
|
|
489
|
+
}
|
|
490
|
+
return finishDispatch();
|
|
491
|
+
}
|
|
492
|
+
__resolveFullEventPath() {
|
|
493
|
+
if (this.__eventPathCache) return this.__eventPathCache;
|
|
494
|
+
else if (!this.__eventTargetParent) return this.__eventPathCache = [
|
|
495
|
+
this,
|
|
496
|
+
documentShim,
|
|
497
|
+
windowShim
|
|
498
|
+
];
|
|
499
|
+
else return this.__eventPathCache = [this, ...this.__eventTargetParent.__resolveFullEventPath()];
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
var attributes = /* @__PURE__ */ new WeakMap();
|
|
503
|
+
var attributesForElement = (element) => {
|
|
504
|
+
let attrs = attributes.get(element);
|
|
505
|
+
if (attrs === void 0) attributes.set(element, attrs = /* @__PURE__ */ new Map());
|
|
506
|
+
return attrs;
|
|
507
|
+
};
|
|
508
|
+
var NodeShim = class Node extends EventTarget$1 {
|
|
509
|
+
getRootNode(options) {
|
|
510
|
+
if (options?.composed) return document$1;
|
|
511
|
+
return this.__host?.__shadowRoot ?? document$1;
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
var DocumentShim = class Document extends NodeShim {
|
|
515
|
+
get adoptedStyleSheets() {
|
|
516
|
+
return [];
|
|
517
|
+
}
|
|
518
|
+
createTreeWalker() {
|
|
519
|
+
return {};
|
|
520
|
+
}
|
|
521
|
+
createTextNode() {
|
|
522
|
+
return {};
|
|
523
|
+
}
|
|
524
|
+
createElement() {
|
|
525
|
+
return {};
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
var documentShim = new DocumentShim();
|
|
529
|
+
var document$1 = documentShim;
|
|
530
|
+
var WindowShim = class Window extends NodeShim {
|
|
531
|
+
constructor(token) {
|
|
532
|
+
super();
|
|
533
|
+
if (token !== constructionToken) throw new TypeError("Illegal constructor");
|
|
534
|
+
Object.assign(this, globalThis, {
|
|
535
|
+
CustomElementRegistry,
|
|
536
|
+
customElements: customElements$1,
|
|
537
|
+
document: document$1,
|
|
538
|
+
Document: DocumentShim,
|
|
539
|
+
Element: ElementShim,
|
|
540
|
+
EventTarget: EventTarget$1,
|
|
541
|
+
HTMLElement: HTMLElementShim,
|
|
542
|
+
Node: NodeShim,
|
|
543
|
+
ShadowRoot: ShadowRootShim,
|
|
544
|
+
window: this,
|
|
545
|
+
Window: WindowShim
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var ElementShim = class Element extends NodeShim {
|
|
550
|
+
constructor() {
|
|
551
|
+
super(...arguments);
|
|
552
|
+
this.__shadowRootMode = null;
|
|
553
|
+
this.__shadowRoot = null;
|
|
554
|
+
this.__internals = null;
|
|
555
|
+
}
|
|
556
|
+
get attributes() {
|
|
557
|
+
return Array.from(attributesForElement(this)).map(([name, value]) => ({
|
|
558
|
+
name,
|
|
559
|
+
value
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
562
|
+
get shadowRoot() {
|
|
563
|
+
if (this.__shadowRootMode === "closed") return null;
|
|
564
|
+
return this.__shadowRoot;
|
|
565
|
+
}
|
|
566
|
+
get localName() {
|
|
567
|
+
return this.constructor.__localName;
|
|
568
|
+
}
|
|
569
|
+
get tagName() {
|
|
570
|
+
return this.localName?.toUpperCase();
|
|
571
|
+
}
|
|
572
|
+
setAttribute(name, value) {
|
|
573
|
+
attributesForElement(this).set(name, String(value));
|
|
574
|
+
}
|
|
575
|
+
removeAttribute(name) {
|
|
576
|
+
attributesForElement(this).delete(name);
|
|
577
|
+
}
|
|
578
|
+
toggleAttribute(name, force) {
|
|
579
|
+
if (this.hasAttribute(name)) {
|
|
580
|
+
if (force === void 0 || !force) {
|
|
581
|
+
this.removeAttribute(name);
|
|
582
|
+
return false;
|
|
583
|
+
}
|
|
584
|
+
} else if (force === void 0 || force) {
|
|
585
|
+
this.setAttribute(name, "");
|
|
586
|
+
return true;
|
|
587
|
+
} else return false;
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
hasAttribute(name) {
|
|
591
|
+
return attributesForElement(this).has(name);
|
|
592
|
+
}
|
|
593
|
+
attachShadow(init) {
|
|
594
|
+
this.__shadowRootMode = init.mode;
|
|
595
|
+
const shadowRoot = new ShadowRootShim(constructionToken, init);
|
|
596
|
+
shadowRoot.__eventTargetParent = this;
|
|
597
|
+
shadowRoot.__host = this;
|
|
598
|
+
return this.__shadowRoot = shadowRoot;
|
|
599
|
+
}
|
|
600
|
+
attachInternals() {
|
|
601
|
+
if (this.__internals !== null) throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
|
|
602
|
+
const internals = new ElementInternalsShim(this);
|
|
603
|
+
this.__internals = internals;
|
|
604
|
+
return internals;
|
|
605
|
+
}
|
|
606
|
+
getAttribute(name) {
|
|
607
|
+
return attributesForElement(this).get(name) ?? null;
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
var HTMLElementShim = class HTMLElement extends ElementShim {};
|
|
611
|
+
var HTMLElementShimWithRealType = HTMLElementShim;
|
|
612
|
+
var ShadowRootShim = class ShadowRoot extends NodeShim {
|
|
613
|
+
get host() {
|
|
614
|
+
return this.__host;
|
|
615
|
+
}
|
|
616
|
+
constructor(constructionToken, init) {
|
|
617
|
+
super();
|
|
618
|
+
if (constructionToken !== constructionToken) throw new TypeError("Illegal constructor");
|
|
619
|
+
this.mode = init.mode;
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), "localName", { get() {
|
|
623
|
+
return "lit-server-root";
|
|
624
|
+
} });
|
|
625
|
+
function promiseWithResolvers() {
|
|
626
|
+
let resolve;
|
|
627
|
+
let reject;
|
|
628
|
+
return {
|
|
629
|
+
promise: new Promise((res, rej) => {
|
|
630
|
+
resolve = res;
|
|
631
|
+
reject = rej;
|
|
632
|
+
}),
|
|
633
|
+
resolve,
|
|
634
|
+
reject
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
var CustomElementRegistry = class {
|
|
638
|
+
constructor() {
|
|
639
|
+
this.__definitions = /* @__PURE__ */ new Map();
|
|
640
|
+
this.__reverseDefinitions = /* @__PURE__ */ new Map();
|
|
641
|
+
this.__pendingWhenDefineds = /* @__PURE__ */ new Map();
|
|
642
|
+
}
|
|
643
|
+
define(name, ctor) {
|
|
644
|
+
if (this.__definitions.has(name)) {
|
|
645
|
+
if (process.env.NODE_ENV === "development") console.warn(`'CustomElementRegistry' already has "${name}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`);
|
|
646
|
+
else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${name}" has already been used with this registry`);
|
|
647
|
+
}
|
|
648
|
+
if (this.__reverseDefinitions.has(ctor)) throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(ctor)}`);
|
|
649
|
+
ctor.__localName = name;
|
|
650
|
+
this.__definitions.set(name, {
|
|
651
|
+
ctor,
|
|
652
|
+
observedAttributes: ctor.observedAttributes ?? []
|
|
653
|
+
});
|
|
654
|
+
this.__reverseDefinitions.set(ctor, name);
|
|
655
|
+
this.__pendingWhenDefineds.get(name)?.resolve(ctor);
|
|
656
|
+
this.__pendingWhenDefineds.delete(name);
|
|
657
|
+
}
|
|
658
|
+
get(name) {
|
|
659
|
+
return this.__definitions.get(name)?.ctor;
|
|
660
|
+
}
|
|
661
|
+
getName(ctor) {
|
|
662
|
+
return this.__reverseDefinitions.get(ctor) ?? null;
|
|
663
|
+
}
|
|
664
|
+
initialize(_root) {
|
|
665
|
+
throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.");
|
|
666
|
+
}
|
|
667
|
+
upgrade(_element) {
|
|
668
|
+
throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.");
|
|
669
|
+
}
|
|
670
|
+
async whenDefined(name) {
|
|
671
|
+
const definition = this.__definitions.get(name);
|
|
672
|
+
if (definition) return definition.ctor;
|
|
673
|
+
let withResolvers = this.__pendingWhenDefineds.get(name);
|
|
674
|
+
if (!withResolvers) {
|
|
675
|
+
withResolvers = promiseWithResolvers();
|
|
676
|
+
this.__pendingWhenDefineds.set(name, withResolvers);
|
|
677
|
+
}
|
|
678
|
+
return withResolvers.promise;
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
var customElements$1 = new CustomElementRegistry();
|
|
682
|
+
var windowShim = new WindowShim(constructionToken);
|
|
683
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
|
|
684
|
+
/**
|
|
685
|
+
* @license
|
|
686
|
+
* Copyright 2019 Google LLC
|
|
687
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
688
|
+
*/
|
|
689
|
+
var t$2 = globalThis;
|
|
690
|
+
var e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
691
|
+
var s$2 = Symbol();
|
|
692
|
+
var o$5 = /* @__PURE__ */ new WeakMap();
|
|
693
|
+
var n$4 = class {
|
|
694
|
+
constructor(t, e, o) {
|
|
695
|
+
if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
696
|
+
this.cssText = t, this.t = e;
|
|
697
|
+
}
|
|
698
|
+
get styleSheet() {
|
|
699
|
+
let t = this.o;
|
|
700
|
+
const s = this.t;
|
|
701
|
+
if (e$5 && void 0 === t) {
|
|
702
|
+
const e = void 0 !== s && 1 === s.length;
|
|
703
|
+
e && (t = o$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$5.set(s, t));
|
|
704
|
+
}
|
|
705
|
+
return t;
|
|
706
|
+
}
|
|
707
|
+
toString() {
|
|
708
|
+
return this.cssText;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
var r$4 = (t) => new n$4("string" == typeof t ? t : t + "", void 0, s$2);
|
|
712
|
+
var i$4 = (t, ...e) => {
|
|
713
|
+
return new n$4(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
|
|
714
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
715
|
+
if ("number" == typeof t) return t;
|
|
716
|
+
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.");
|
|
717
|
+
})(s) + t[o + 1], t[0]), t, s$2);
|
|
718
|
+
};
|
|
719
|
+
var S$1 = (s, o) => {
|
|
720
|
+
if (e$5) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
721
|
+
else for (const e of o) {
|
|
722
|
+
const o = document.createElement("style"), n = t$2.litNonce;
|
|
723
|
+
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
var c$3 = e$5 || void 0 === t$2.CSSStyleSheet ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
|
|
727
|
+
let e = "";
|
|
728
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
729
|
+
return r$4(e);
|
|
730
|
+
})(t) : t;
|
|
731
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/reactive-element.js
|
|
732
|
+
var { is: h$1, defineProperty: r$3, getOwnPropertyDescriptor: o$4, getOwnPropertyNames: n$3, getOwnPropertySymbols: a$2, getPrototypeOf: c$2 } = Object, l$2 = globalThis;
|
|
733
|
+
l$2.customElements ??= customElements$1;
|
|
734
|
+
var p$1 = l$2.trustedTypes;
|
|
735
|
+
var d$1 = p$1 ? p$1.emptyScript : "";
|
|
736
|
+
var u$2 = l$2.reactiveElementPolyfillSupport;
|
|
737
|
+
var f$1 = (t, s) => t;
|
|
738
|
+
var b$1 = {
|
|
739
|
+
toAttribute(t, s) {
|
|
740
|
+
switch (s) {
|
|
741
|
+
case Boolean:
|
|
742
|
+
t = t ? d$1 : null;
|
|
743
|
+
break;
|
|
744
|
+
case Object:
|
|
745
|
+
case Array: t = null == t ? t : JSON.stringify(t);
|
|
746
|
+
}
|
|
747
|
+
return t;
|
|
748
|
+
},
|
|
749
|
+
fromAttribute(t, s) {
|
|
750
|
+
let i = t;
|
|
751
|
+
switch (s) {
|
|
752
|
+
case Boolean:
|
|
753
|
+
i = null !== t;
|
|
754
|
+
break;
|
|
755
|
+
case Number:
|
|
756
|
+
i = null === t ? null : Number(t);
|
|
757
|
+
break;
|
|
758
|
+
case Object:
|
|
759
|
+
case Array: try {
|
|
760
|
+
i = JSON.parse(t);
|
|
761
|
+
} catch (t) {
|
|
762
|
+
i = null;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return i;
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
var m$1 = (t, s) => !h$1(t, s);
|
|
769
|
+
var y$1 = {
|
|
770
|
+
attribute: !0,
|
|
771
|
+
type: String,
|
|
772
|
+
converter: b$1,
|
|
773
|
+
reflect: !1,
|
|
774
|
+
useDefault: !1,
|
|
775
|
+
hasChanged: m$1
|
|
776
|
+
};
|
|
777
|
+
Symbol.metadata ??= Symbol("metadata"), l$2.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
778
|
+
var g$1 = class extends (globalThis.HTMLElement ?? HTMLElementShimWithRealType) {
|
|
779
|
+
static addInitializer(t) {
|
|
780
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
781
|
+
}
|
|
782
|
+
static get observedAttributes() {
|
|
783
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
784
|
+
}
|
|
785
|
+
static createProperty(t, s = y$1) {
|
|
786
|
+
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
787
|
+
const i = Symbol(), e = this.getPropertyDescriptor(t, i, s);
|
|
788
|
+
void 0 !== e && r$3(this.prototype, t, e);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
static getPropertyDescriptor(t, s, i) {
|
|
792
|
+
const { get: e, set: h } = o$4(this.prototype, t) ?? {
|
|
793
|
+
get() {
|
|
794
|
+
return this[s];
|
|
795
|
+
},
|
|
796
|
+
set(t) {
|
|
797
|
+
this[s] = t;
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
return {
|
|
801
|
+
get: e,
|
|
802
|
+
set(s) {
|
|
803
|
+
const r = e?.call(this);
|
|
804
|
+
h?.call(this, s), this.requestUpdate(t, r, i);
|
|
805
|
+
},
|
|
806
|
+
configurable: !0,
|
|
807
|
+
enumerable: !0
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
static getPropertyOptions(t) {
|
|
811
|
+
return this.elementProperties.get(t) ?? y$1;
|
|
812
|
+
}
|
|
813
|
+
static _$Ei() {
|
|
814
|
+
if (this.hasOwnProperty(f$1("elementProperties"))) return;
|
|
815
|
+
const t = c$2(this);
|
|
816
|
+
t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
817
|
+
}
|
|
818
|
+
static finalize() {
|
|
819
|
+
if (this.hasOwnProperty(f$1("finalized"))) return;
|
|
820
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(f$1("properties"))) {
|
|
821
|
+
const t = this.properties, s = [...n$3(t), ...a$2(t)];
|
|
822
|
+
for (const i of s) this.createProperty(i, t[i]);
|
|
823
|
+
}
|
|
824
|
+
const t = this[Symbol.metadata];
|
|
825
|
+
if (null !== t) {
|
|
826
|
+
const s = litPropertyMetadata.get(t);
|
|
827
|
+
if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
|
|
828
|
+
}
|
|
829
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
830
|
+
for (const [t, s] of this.elementProperties) {
|
|
831
|
+
const i = this._$Eu(t, s);
|
|
832
|
+
void 0 !== i && this._$Eh.set(i, t);
|
|
833
|
+
}
|
|
834
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
835
|
+
}
|
|
836
|
+
static finalizeStyles(t) {
|
|
837
|
+
const s = [];
|
|
838
|
+
if (Array.isArray(t)) {
|
|
839
|
+
const e = new Set(t.flat(1 / 0).reverse());
|
|
840
|
+
for (const t of e) s.unshift(c$3(t));
|
|
841
|
+
} else void 0 !== t && s.push(c$3(t));
|
|
842
|
+
return s;
|
|
843
|
+
}
|
|
844
|
+
static _$Eu(t, s) {
|
|
845
|
+
const i = s.attribute;
|
|
846
|
+
return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
847
|
+
}
|
|
848
|
+
constructor() {
|
|
849
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
850
|
+
}
|
|
851
|
+
_$Ev() {
|
|
852
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
|
|
853
|
+
}
|
|
854
|
+
addController(t) {
|
|
855
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
856
|
+
}
|
|
857
|
+
removeController(t) {
|
|
858
|
+
this._$EO?.delete(t);
|
|
859
|
+
}
|
|
860
|
+
_$E_() {
|
|
861
|
+
const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
|
|
862
|
+
for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
863
|
+
t.size > 0 && (this._$Ep = t);
|
|
864
|
+
}
|
|
865
|
+
createRenderRoot() {
|
|
866
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
867
|
+
return S$1(t, this.constructor.elementStyles), t;
|
|
868
|
+
}
|
|
869
|
+
connectedCallback() {
|
|
870
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
871
|
+
}
|
|
872
|
+
enableUpdating(t) {}
|
|
873
|
+
disconnectedCallback() {
|
|
874
|
+
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
875
|
+
}
|
|
876
|
+
attributeChangedCallback(t, s, i) {
|
|
877
|
+
this._$AK(t, i);
|
|
878
|
+
}
|
|
879
|
+
_$ET(t, s) {
|
|
880
|
+
const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
|
|
881
|
+
if (void 0 !== e && !0 === i.reflect) {
|
|
882
|
+
const h = (void 0 !== i.converter?.toAttribute ? i.converter : b$1).toAttribute(s, i.type);
|
|
883
|
+
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
_$AK(t, s) {
|
|
887
|
+
const i = this.constructor, e = i._$Eh.get(t);
|
|
888
|
+
if (void 0 !== e && this._$Em !== e) {
|
|
889
|
+
const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : b$1;
|
|
890
|
+
this._$Em = e;
|
|
891
|
+
const r = h.fromAttribute(s, t.type);
|
|
892
|
+
this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
requestUpdate(t, s, i, e = !1, h) {
|
|
896
|
+
if (void 0 !== t) {
|
|
897
|
+
const r = this.constructor;
|
|
898
|
+
if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? m$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
899
|
+
this.C(t, s, i);
|
|
900
|
+
}
|
|
901
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
902
|
+
}
|
|
903
|
+
C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) {
|
|
904
|
+
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
905
|
+
}
|
|
906
|
+
async _$EP() {
|
|
907
|
+
this.isUpdatePending = !0;
|
|
908
|
+
try {
|
|
909
|
+
await this._$ES;
|
|
910
|
+
} catch (t) {
|
|
911
|
+
Promise.reject(t);
|
|
912
|
+
}
|
|
913
|
+
const t = this.scheduleUpdate();
|
|
914
|
+
return null != t && await t, !this.isUpdatePending;
|
|
915
|
+
}
|
|
916
|
+
scheduleUpdate() {
|
|
917
|
+
return this.performUpdate();
|
|
918
|
+
}
|
|
919
|
+
performUpdate() {
|
|
920
|
+
if (!this.isUpdatePending) return;
|
|
921
|
+
if (!this.hasUpdated) {
|
|
922
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
923
|
+
for (const [t, s] of this._$Ep) this[t] = s;
|
|
924
|
+
this._$Ep = void 0;
|
|
925
|
+
}
|
|
926
|
+
const t = this.constructor.elementProperties;
|
|
927
|
+
if (t.size > 0) for (const [s, i] of t) {
|
|
928
|
+
const { wrapped: t } = i, e = this[s];
|
|
929
|
+
!0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
let t = !1;
|
|
933
|
+
const s = this._$AL;
|
|
934
|
+
try {
|
|
935
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM();
|
|
936
|
+
} catch (s) {
|
|
937
|
+
throw t = !1, this._$EM(), s;
|
|
938
|
+
}
|
|
939
|
+
t && this._$AE(s);
|
|
940
|
+
}
|
|
941
|
+
willUpdate(t) {}
|
|
942
|
+
_$AE(t) {
|
|
943
|
+
this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
944
|
+
}
|
|
945
|
+
_$EM() {
|
|
946
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
947
|
+
}
|
|
948
|
+
get updateComplete() {
|
|
949
|
+
return this.getUpdateComplete();
|
|
950
|
+
}
|
|
951
|
+
getUpdateComplete() {
|
|
952
|
+
return this._$ES;
|
|
953
|
+
}
|
|
954
|
+
shouldUpdate(t) {
|
|
955
|
+
return !0;
|
|
956
|
+
}
|
|
957
|
+
update(t) {
|
|
958
|
+
this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
|
|
959
|
+
}
|
|
960
|
+
updated(t) {}
|
|
961
|
+
firstUpdated(t) {}
|
|
962
|
+
};
|
|
963
|
+
g$1.elementStyles = [], g$1.shadowRootOptions = { mode: "open" }, g$1[f$1("elementProperties")] = /* @__PURE__ */ new Map(), g$1[f$1("finalized")] = /* @__PURE__ */ new Map(), u$2?.({ ReactiveElement: g$1 }), (l$2.reactiveElementVersions ??= []).push("2.1.2");
|
|
964
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/property.js
|
|
965
|
+
/**
|
|
966
|
+
* @license
|
|
967
|
+
* Copyright 2017 Google LLC
|
|
968
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
969
|
+
*/ var o$3 = {
|
|
970
|
+
attribute: !0,
|
|
971
|
+
type: String,
|
|
972
|
+
converter: b$1,
|
|
973
|
+
reflect: !1,
|
|
974
|
+
hasChanged: m$1
|
|
975
|
+
};
|
|
976
|
+
var r$2 = (t = o$3, e, r) => {
|
|
977
|
+
const { kind: n, metadata: i } = r;
|
|
978
|
+
let s = globalThis.litPropertyMetadata.get(i);
|
|
979
|
+
if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
|
|
980
|
+
const { name: o } = r;
|
|
981
|
+
return {
|
|
982
|
+
set(r) {
|
|
983
|
+
const n = e.get.call(this);
|
|
984
|
+
e.set.call(this, r), this.requestUpdate(o, n, t, !0, r);
|
|
985
|
+
},
|
|
986
|
+
init(e) {
|
|
987
|
+
return void 0 !== e && this.C(o, void 0, t, e), e;
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
if ("setter" === n) {
|
|
992
|
+
const { name: o } = r;
|
|
993
|
+
return function(r) {
|
|
994
|
+
const n = this[o];
|
|
995
|
+
e.call(this, r), this.requestUpdate(o, n, t, !0, r);
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
throw Error("Unsupported decorator location: " + n);
|
|
999
|
+
};
|
|
1000
|
+
function n$2(t) {
|
|
1001
|
+
return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
|
|
1002
|
+
const r = e.hasOwnProperty(o);
|
|
1003
|
+
return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
1004
|
+
})(t, e, o);
|
|
1005
|
+
}
|
|
1006
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/state.js
|
|
1007
|
+
/**
|
|
1008
|
+
* @license
|
|
1009
|
+
* Copyright 2017 Google LLC
|
|
1010
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1011
|
+
*/ function r$1(r) {
|
|
1012
|
+
return n$2({
|
|
1013
|
+
...r,
|
|
1014
|
+
state: !0,
|
|
1015
|
+
attribute: !1
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/base.js
|
|
1019
|
+
/**
|
|
1020
|
+
* @license
|
|
1021
|
+
* Copyright 2017 Google LLC
|
|
1022
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1023
|
+
*/
|
|
1024
|
+
var e$4 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
|
|
1025
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query.js
|
|
1026
|
+
/**
|
|
1027
|
+
* @license
|
|
1028
|
+
* Copyright 2017 Google LLC
|
|
1029
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1030
|
+
*/ function e$3(e, r) {
|
|
1031
|
+
return (n, s, i) => {
|
|
1032
|
+
const o = (t) => t.renderRoot?.querySelector(e) ?? null;
|
|
1033
|
+
if (r) {
|
|
1034
|
+
const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => {
|
|
1035
|
+
const t = Symbol();
|
|
1036
|
+
return {
|
|
1037
|
+
get() {
|
|
1038
|
+
return this[t];
|
|
1039
|
+
},
|
|
1040
|
+
set(e) {
|
|
1041
|
+
this[t] = e;
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
})();
|
|
1045
|
+
return e$4(n, s, { get() {
|
|
1046
|
+
let t = e.call(this);
|
|
1047
|
+
return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t;
|
|
1048
|
+
} });
|
|
1049
|
+
}
|
|
1050
|
+
return e$4(n, s, { get() {
|
|
1051
|
+
return o(this);
|
|
1052
|
+
} });
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/lit-html.js
|
|
1056
|
+
/**
|
|
1057
|
+
* @license
|
|
1058
|
+
* Copyright 2017 Google LLC
|
|
1059
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1060
|
+
*/
|
|
1061
|
+
var t$1 = globalThis;
|
|
1062
|
+
var i$3 = (t) => t;
|
|
1063
|
+
var s$1 = t$1.trustedTypes;
|
|
1064
|
+
var e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0;
|
|
1065
|
+
var h = "$lit$";
|
|
1066
|
+
var o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
|
1067
|
+
var n$1 = "?" + o$2;
|
|
1068
|
+
var r = `<${n$1}>`;
|
|
1069
|
+
var l$1 = void 0 === t$1.document ? { createTreeWalker: () => ({}) } : document;
|
|
1070
|
+
var c$1 = () => l$1.createComment("");
|
|
1071
|
+
var a$1 = (t) => null === t || "object" != typeof t && "function" != typeof t;
|
|
1072
|
+
var u$1 = Array.isArray;
|
|
1073
|
+
var d = (t) => u$1(t) || "function" == typeof t?.[Symbol.iterator];
|
|
1074
|
+
var f = "[ \n\f\r]";
|
|
1075
|
+
var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
|
1076
|
+
var _ = /-->/g;
|
|
1077
|
+
var m = />/g;
|
|
1078
|
+
var p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g");
|
|
1079
|
+
var g = /'/g;
|
|
1080
|
+
var $$1 = /"/g;
|
|
1081
|
+
var y = /^(?:script|style|textarea|title)$/i;
|
|
1082
|
+
var x = (t) => (i, ...s) => ({
|
|
1083
|
+
_$litType$: t,
|
|
1084
|
+
strings: i,
|
|
1085
|
+
values: s
|
|
1086
|
+
});
|
|
1087
|
+
var T = x(1);
|
|
1088
|
+
var E = Symbol.for("lit-noChange");
|
|
1089
|
+
var A = Symbol.for("lit-nothing");
|
|
1090
|
+
var C = /* @__PURE__ */ new WeakMap();
|
|
1091
|
+
var P = l$1.createTreeWalker(l$1, 129);
|
|
1092
|
+
function V(t, i) {
|
|
1093
|
+
if (!u$1(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1094
|
+
return void 0 !== e$2 ? e$2.createHTML(i) : i;
|
|
1095
|
+
}
|
|
1096
|
+
var N = (t, i) => {
|
|
1097
|
+
const s = t.length - 1, e = [];
|
|
1098
|
+
let n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
|
|
1099
|
+
for (let i = 0; i < s; i++) {
|
|
1100
|
+
const s = t[i];
|
|
1101
|
+
let a, u, d = -1, f = 0;
|
|
1102
|
+
for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n ?? v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : "\"" === u[3] ? $$1 : g) : c === $$1 || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
|
|
1103
|
+
const x = c === p && t[i + 1].startsWith("/>") ? " " : "";
|
|
1104
|
+
l += c === v ? s + r : d >= 0 ? (e.push(a), s.slice(0, d) + h + s.slice(d) + o$2 + x) : s + o$2 + (-2 === d ? i : x);
|
|
1105
|
+
}
|
|
1106
|
+
return [V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
|
|
1107
|
+
};
|
|
1108
|
+
var S = class S {
|
|
1109
|
+
constructor({ strings: t, _$litType$: i }, e) {
|
|
1110
|
+
let r;
|
|
1111
|
+
this.parts = [];
|
|
1112
|
+
let l = 0, a = 0;
|
|
1113
|
+
const u = t.length - 1, d = this.parts, [f, v] = N(t, i);
|
|
1114
|
+
if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
|
|
1115
|
+
const t = this.el.content.firstChild;
|
|
1116
|
+
t.replaceWith(...t.childNodes);
|
|
1117
|
+
}
|
|
1118
|
+
for (; null !== (r = P.nextNode()) && d.length < u;) {
|
|
1119
|
+
if (1 === r.nodeType) {
|
|
1120
|
+
if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h)) {
|
|
1121
|
+
const i = v[a++], s = r.getAttribute(t).split(o$2), e = /([.?@])?(.*)/.exec(i);
|
|
1122
|
+
d.push({
|
|
1123
|
+
type: 1,
|
|
1124
|
+
index: l,
|
|
1125
|
+
name: e[2],
|
|
1126
|
+
strings: s,
|
|
1127
|
+
ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H
|
|
1128
|
+
}), r.removeAttribute(t);
|
|
1129
|
+
} else t.startsWith(o$2) && (d.push({
|
|
1130
|
+
type: 6,
|
|
1131
|
+
index: l
|
|
1132
|
+
}), r.removeAttribute(t));
|
|
1133
|
+
if (y.test(r.tagName)) {
|
|
1134
|
+
const t = r.textContent.split(o$2), i = t.length - 1;
|
|
1135
|
+
if (i > 0) {
|
|
1136
|
+
r.textContent = s$1 ? s$1.emptyScript : "";
|
|
1137
|
+
for (let s = 0; s < i; s++) r.append(t[s], c$1()), P.nextNode(), d.push({
|
|
1138
|
+
type: 2,
|
|
1139
|
+
index: ++l
|
|
1140
|
+
});
|
|
1141
|
+
r.append(t[i], c$1());
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
} else if (8 === r.nodeType) if (r.data === n$1) d.push({
|
|
1145
|
+
type: 2,
|
|
1146
|
+
index: l
|
|
1147
|
+
});
|
|
1148
|
+
else {
|
|
1149
|
+
let t = -1;
|
|
1150
|
+
for (; -1 !== (t = r.data.indexOf(o$2, t + 1));) d.push({
|
|
1151
|
+
type: 7,
|
|
1152
|
+
index: l
|
|
1153
|
+
}), t += o$2.length - 1;
|
|
1154
|
+
}
|
|
1155
|
+
l++;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
static createElement(t, i) {
|
|
1159
|
+
const s = l$1.createElement("template");
|
|
1160
|
+
return s.innerHTML = t, s;
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
function M(t, i, s = t, e) {
|
|
1164
|
+
if (i === E) return i;
|
|
1165
|
+
let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
|
|
1166
|
+
const o = a$1(i) ? void 0 : i._$litDirective$;
|
|
1167
|
+
return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
|
|
1168
|
+
}
|
|
1169
|
+
var k = class {
|
|
1170
|
+
constructor(t, i) {
|
|
1171
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
1172
|
+
}
|
|
1173
|
+
get parentNode() {
|
|
1174
|
+
return this._$AM.parentNode;
|
|
1175
|
+
}
|
|
1176
|
+
get _$AU() {
|
|
1177
|
+
return this._$AM._$AU;
|
|
1178
|
+
}
|
|
1179
|
+
u(t) {
|
|
1180
|
+
const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l$1).importNode(i, !0);
|
|
1181
|
+
P.currentNode = e;
|
|
1182
|
+
let h = P.nextNode(), o = 0, n = 0, r = s[0];
|
|
1183
|
+
for (; void 0 !== r;) {
|
|
1184
|
+
if (o === r.index) {
|
|
1185
|
+
let i;
|
|
1186
|
+
2 === r.type ? i = new R(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new W(h, this, t)), this._$AV.push(i), r = s[++n];
|
|
1187
|
+
}
|
|
1188
|
+
o !== r?.index && (h = P.nextNode(), o++);
|
|
1189
|
+
}
|
|
1190
|
+
return P.currentNode = l$1, e;
|
|
1191
|
+
}
|
|
1192
|
+
p(t) {
|
|
1193
|
+
let i = 0;
|
|
1194
|
+
for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
var R = class R {
|
|
1198
|
+
get _$AU() {
|
|
1199
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
1200
|
+
}
|
|
1201
|
+
constructor(t, i, s, e) {
|
|
1202
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
|
|
1203
|
+
}
|
|
1204
|
+
get parentNode() {
|
|
1205
|
+
let t = this._$AA.parentNode;
|
|
1206
|
+
const i = this._$AM;
|
|
1207
|
+
return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
|
|
1208
|
+
}
|
|
1209
|
+
get startNode() {
|
|
1210
|
+
return this._$AA;
|
|
1211
|
+
}
|
|
1212
|
+
get endNode() {
|
|
1213
|
+
return this._$AB;
|
|
1214
|
+
}
|
|
1215
|
+
_$AI(t, i = this) {
|
|
1216
|
+
t = M(this, t, i), a$1(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d(t) ? this.k(t) : this._(t);
|
|
1217
|
+
}
|
|
1218
|
+
O(t) {
|
|
1219
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
1220
|
+
}
|
|
1221
|
+
T(t) {
|
|
1222
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
1223
|
+
}
|
|
1224
|
+
_(t) {
|
|
1225
|
+
this._$AH !== A && a$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$1.createTextNode(t)), this._$AH = t;
|
|
1226
|
+
}
|
|
1227
|
+
$(t) {
|
|
1228
|
+
const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
|
|
1229
|
+
if (this._$AH?._$AD === e) this._$AH.p(i);
|
|
1230
|
+
else {
|
|
1231
|
+
const t = new k(e, this), s = t.u(this.options);
|
|
1232
|
+
t.p(i), this.T(s), this._$AH = t;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
_$AC(t) {
|
|
1236
|
+
let i = C.get(t.strings);
|
|
1237
|
+
return void 0 === i && C.set(t.strings, i = new S(t)), i;
|
|
1238
|
+
}
|
|
1239
|
+
k(t) {
|
|
1240
|
+
u$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
1241
|
+
const i = this._$AH;
|
|
1242
|
+
let s, e = 0;
|
|
1243
|
+
for (const h of t) e === i.length ? i.push(s = new R(this.O(c$1()), this.O(c$1()), this, this.options)) : s = i[e], s._$AI(h), e++;
|
|
1244
|
+
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
1245
|
+
}
|
|
1246
|
+
_$AR(t = this._$AA.nextSibling, s) {
|
|
1247
|
+
for (this._$AP?.(!1, !0, s); t !== this._$AB;) {
|
|
1248
|
+
const s = i$3(t).nextSibling;
|
|
1249
|
+
i$3(t).remove(), t = s;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
setConnected(t) {
|
|
1253
|
+
void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
var H = class {
|
|
1257
|
+
get tagName() {
|
|
1258
|
+
return this.element.tagName;
|
|
1259
|
+
}
|
|
1260
|
+
get _$AU() {
|
|
1261
|
+
return this._$AM._$AU;
|
|
1262
|
+
}
|
|
1263
|
+
constructor(t, i, s, e, h) {
|
|
1264
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A;
|
|
1265
|
+
}
|
|
1266
|
+
_$AI(t, i = this, s, e) {
|
|
1267
|
+
const h = this.strings;
|
|
1268
|
+
let o = !1;
|
|
1269
|
+
if (void 0 === h) t = M(this, t, i, 0), o = !a$1(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
1270
|
+
else {
|
|
1271
|
+
const e = t;
|
|
1272
|
+
let n, r;
|
|
1273
|
+
for (t = h[0], n = 0; n < h.length - 1; n++) r = M(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a$1(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
|
|
1274
|
+
}
|
|
1275
|
+
o && !e && this.j(t);
|
|
1276
|
+
}
|
|
1277
|
+
j(t) {
|
|
1278
|
+
t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
var I = class extends H {
|
|
1282
|
+
constructor() {
|
|
1283
|
+
super(...arguments), this.type = 3;
|
|
1284
|
+
}
|
|
1285
|
+
j(t) {
|
|
1286
|
+
this.element[this.name] = t === A ? void 0 : t;
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
var L = class extends H {
|
|
1290
|
+
constructor() {
|
|
1291
|
+
super(...arguments), this.type = 4;
|
|
1292
|
+
}
|
|
1293
|
+
j(t) {
|
|
1294
|
+
this.element.toggleAttribute(this.name, !!t && t !== A);
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
var z = class extends H {
|
|
1298
|
+
constructor(t, i, s, e, h) {
|
|
1299
|
+
super(t, i, s, e, h), this.type = 5;
|
|
1300
|
+
}
|
|
1301
|
+
_$AI(t, i = this) {
|
|
1302
|
+
if ((t = M(this, t, i, 0) ?? A) === E) return;
|
|
1303
|
+
const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
|
|
1304
|
+
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
1305
|
+
}
|
|
1306
|
+
handleEvent(t) {
|
|
1307
|
+
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
var W = class {
|
|
1311
|
+
constructor(t, i, s) {
|
|
1312
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
1313
|
+
}
|
|
1314
|
+
get _$AU() {
|
|
1315
|
+
return this._$AM._$AU;
|
|
1316
|
+
}
|
|
1317
|
+
_$AI(t) {
|
|
1318
|
+
M(this, t);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
var Z = {
|
|
1322
|
+
M: h,
|
|
1323
|
+
P: o$2,
|
|
1324
|
+
A: n$1,
|
|
1325
|
+
C: 1,
|
|
1326
|
+
L: N,
|
|
1327
|
+
R: k,
|
|
1328
|
+
D: d,
|
|
1329
|
+
V: M,
|
|
1330
|
+
I: R,
|
|
1331
|
+
H,
|
|
1332
|
+
N: L,
|
|
1333
|
+
U: z,
|
|
1334
|
+
B: I,
|
|
1335
|
+
F: W
|
|
1336
|
+
};
|
|
1337
|
+
var j = t$1.litHtmlPolyfillSupport;
|
|
1338
|
+
j?.(S, R), (t$1.litHtmlVersions ??= []).push("3.3.3");
|
|
1339
|
+
var B = (t, i, s) => {
|
|
1340
|
+
const e = s?.renderBefore ?? i;
|
|
1341
|
+
let h = e._$litPart$;
|
|
1342
|
+
if (void 0 === h) {
|
|
1343
|
+
const t = s?.renderBefore ?? null;
|
|
1344
|
+
e._$litPart$ = h = new R(i.insertBefore(c$1(), t), t, void 0, s ?? {});
|
|
1345
|
+
}
|
|
1346
|
+
return h._$AI(t), h;
|
|
1347
|
+
};
|
|
1348
|
+
// ../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js
|
|
1349
|
+
/**
|
|
1350
|
+
* @license
|
|
1351
|
+
* Copyright 2017 Google LLC
|
|
1352
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1353
|
+
*/ var s = globalThis;
|
|
1354
|
+
var i$2 = class extends g$1 {
|
|
1355
|
+
constructor() {
|
|
1356
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
1357
|
+
}
|
|
1358
|
+
createRenderRoot() {
|
|
1359
|
+
const t = super.createRenderRoot();
|
|
1360
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
1361
|
+
}
|
|
1362
|
+
update(t) {
|
|
1363
|
+
const r = this.render();
|
|
1364
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
|
|
1365
|
+
}
|
|
1366
|
+
connectedCallback() {
|
|
1367
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
1368
|
+
}
|
|
1369
|
+
disconnectedCallback() {
|
|
1370
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
1371
|
+
}
|
|
1372
|
+
render() {
|
|
1373
|
+
return E;
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
i$2._$litElement$ = !0, i$2["finalized"] = !0, s.litElementHydrateSupport?.({ LitElement: i$2 });
|
|
1377
|
+
var o$1 = s.litElementPolyfillSupport;
|
|
1378
|
+
o$1?.({ LitElement: i$2 });
|
|
1379
|
+
(s.litElementVersions ??= []).push("4.2.2");
|
|
1380
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/controller/attachable-controller.js
|
|
1381
|
+
/**
|
|
1382
|
+
* @license
|
|
1383
|
+
* Copyright 2023 Google LLC
|
|
1384
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1385
|
+
*/
|
|
1386
|
+
/**
|
|
1387
|
+
* A key to retrieve an `Attachable` element's `AttachableController` from a
|
|
1388
|
+
* global `MutationObserver`.
|
|
1389
|
+
*/
|
|
1390
|
+
var ATTACHABLE_CONTROLLER = Symbol("attachableController");
|
|
1391
|
+
/**
|
|
1392
|
+
* A controller that provides an implementation for `Attachable` elements.
|
|
1393
|
+
*
|
|
1394
|
+
* @example
|
|
1395
|
+
* ```ts
|
|
1396
|
+
* class MyElement extends LitElement implements Attachable {
|
|
1397
|
+
* get control() { return this.attachableController.control; }
|
|
1398
|
+
*
|
|
1399
|
+
* private readonly attachableController = new AttachableController(
|
|
1400
|
+
* this,
|
|
1401
|
+
* (previousControl, newControl) => {
|
|
1402
|
+
* previousControl?.removeEventListener('click', this.handleClick);
|
|
1403
|
+
* newControl?.addEventListener('click', this.handleClick);
|
|
1404
|
+
* }
|
|
1405
|
+
* );
|
|
1406
|
+
*
|
|
1407
|
+
* // Implement remaining `Attachable` properties/methods that call the
|
|
1408
|
+
* // controller's properties/methods.
|
|
1409
|
+
* }
|
|
1410
|
+
* ```
|
|
1411
|
+
*/
|
|
1412
|
+
var AttachableController = class {
|
|
1413
|
+
get htmlFor() {
|
|
1414
|
+
return this.host.getAttribute("for");
|
|
1415
|
+
}
|
|
1416
|
+
set htmlFor(htmlFor) {
|
|
1417
|
+
if (htmlFor === null) this.host.removeAttribute("for");
|
|
1418
|
+
else this.host.setAttribute("for", htmlFor);
|
|
1419
|
+
}
|
|
1420
|
+
get control() {
|
|
1421
|
+
if (this.host.hasAttribute("for")) {
|
|
1422
|
+
if (!this.htmlFor || !this.host.isConnected) return null;
|
|
1423
|
+
return this.host.getRootNode().querySelector(`#${this.htmlFor}`);
|
|
1424
|
+
}
|
|
1425
|
+
return this.currentControl || this.host.parentElement;
|
|
1426
|
+
}
|
|
1427
|
+
set control(control) {
|
|
1428
|
+
if (control) this.attach(control);
|
|
1429
|
+
else this.detach();
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Creates a new controller for an `Attachable` element.
|
|
1433
|
+
*
|
|
1434
|
+
* @param host The `Attachable` element.
|
|
1435
|
+
* @param onControlChange A callback with two parameters for the previous and
|
|
1436
|
+
* next control. An `Attachable` element may perform setup or teardown
|
|
1437
|
+
* logic whenever the control changes.
|
|
1438
|
+
*/
|
|
1439
|
+
constructor(host, onControlChange) {
|
|
1440
|
+
this.host = host;
|
|
1441
|
+
this.onControlChange = onControlChange;
|
|
1442
|
+
this.currentControl = null;
|
|
1443
|
+
host.addController(this);
|
|
1444
|
+
host[ATTACHABLE_CONTROLLER] = this;
|
|
1445
|
+
}
|
|
1446
|
+
attach(control) {
|
|
1447
|
+
if (control === this.currentControl) return;
|
|
1448
|
+
this.setCurrentControl(control);
|
|
1449
|
+
this.host.removeAttribute("for");
|
|
1450
|
+
}
|
|
1451
|
+
detach() {
|
|
1452
|
+
this.setCurrentControl(null);
|
|
1453
|
+
this.host.setAttribute("for", "");
|
|
1454
|
+
}
|
|
1455
|
+
/** @private */
|
|
1456
|
+
hostConnected() {
|
|
1457
|
+
this.setCurrentControl(this.control);
|
|
1458
|
+
}
|
|
1459
|
+
/** @private */
|
|
1460
|
+
hostDisconnected() {
|
|
1461
|
+
this.setCurrentControl(null);
|
|
1462
|
+
}
|
|
1463
|
+
setCurrentControl(control) {
|
|
1464
|
+
this.onControlChange(this.currentControl, control);
|
|
1465
|
+
this.currentControl = control;
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
/**
|
|
1469
|
+
* @license
|
|
1470
|
+
* Copyright 2021 Google LLC
|
|
1471
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1472
|
+
*/
|
|
1473
|
+
/**
|
|
1474
|
+
* A focus ring component.
|
|
1475
|
+
*
|
|
1476
|
+
* @fires visibility-changed {Event} Fired whenever `visible` changes.
|
|
1477
|
+
*/
|
|
1478
|
+
var FocusRing = class extends i$2 {
|
|
1479
|
+
constructor() {
|
|
1480
|
+
super(...arguments);
|
|
1481
|
+
/**
|
|
1482
|
+
* Makes the focus ring visible.
|
|
1483
|
+
*/
|
|
1484
|
+
this.visible = false;
|
|
1485
|
+
/**
|
|
1486
|
+
* Makes the focus ring animate inwards instead of outwards.
|
|
1487
|
+
*/
|
|
1488
|
+
this.inward = false;
|
|
1489
|
+
this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
|
|
1490
|
+
}
|
|
1491
|
+
get htmlFor() {
|
|
1492
|
+
return this.attachableController.htmlFor;
|
|
1493
|
+
}
|
|
1494
|
+
set htmlFor(htmlFor) {
|
|
1495
|
+
this.attachableController.htmlFor = htmlFor;
|
|
1496
|
+
}
|
|
1497
|
+
get control() {
|
|
1498
|
+
return this.attachableController.control;
|
|
1499
|
+
}
|
|
1500
|
+
set control(control) {
|
|
1501
|
+
this.attachableController.control = control;
|
|
1502
|
+
}
|
|
1503
|
+
attach(control) {
|
|
1504
|
+
this.attachableController.attach(control);
|
|
1505
|
+
}
|
|
1506
|
+
detach() {
|
|
1507
|
+
this.attachableController.detach();
|
|
1508
|
+
}
|
|
1509
|
+
connectedCallback() {
|
|
1510
|
+
super.connectedCallback();
|
|
1511
|
+
this.setAttribute("aria-hidden", "true");
|
|
1512
|
+
}
|
|
1513
|
+
/** @private */
|
|
1514
|
+
handleEvent(event) {
|
|
1515
|
+
if (event[HANDLED_BY_FOCUS_RING]) return;
|
|
1516
|
+
switch (event.type) {
|
|
1517
|
+
default: return;
|
|
1518
|
+
case "focusin":
|
|
1519
|
+
this.visible = this.control?.matches(":focus-visible") ?? false;
|
|
1520
|
+
break;
|
|
1521
|
+
case "focusout":
|
|
1522
|
+
case "pointerdown": this.visible = false;
|
|
1523
|
+
}
|
|
1524
|
+
event[HANDLED_BY_FOCUS_RING] = true;
|
|
1525
|
+
}
|
|
1526
|
+
onControlChange(prev, next) {}
|
|
1527
|
+
update(changed) {
|
|
1528
|
+
if (changed.has("visible")) this.dispatchEvent(new Event("visibility-changed"));
|
|
1529
|
+
super.update(changed);
|
|
1530
|
+
}
|
|
1531
|
+
};
|
|
1532
|
+
__decorate([n$2({
|
|
1533
|
+
type: Boolean,
|
|
1534
|
+
reflect: true
|
|
1535
|
+
})], FocusRing.prototype, "visible", void 0);
|
|
1536
|
+
__decorate([n$2({
|
|
1537
|
+
type: Boolean,
|
|
1538
|
+
reflect: true
|
|
1539
|
+
})], FocusRing.prototype, "inward", void 0);
|
|
1540
|
+
var HANDLED_BY_FOCUS_RING = Symbol("handledByFocusRing");
|
|
1541
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/internal/focus-ring-styles.cssresult.js
|
|
1542
|
+
/**
|
|
1543
|
+
* @license
|
|
1544
|
+
* Copyright 2026 Google LLC
|
|
1545
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1546
|
+
*/
|
|
1547
|
+
var styles$1 = i$4`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
1548
|
+
`;
|
|
1549
|
+
styles$1.styleSheet;
|
|
1550
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/md-focus-ring.js
|
|
1551
|
+
/**
|
|
1552
|
+
* @license
|
|
1553
|
+
* Copyright 2021 Google LLC
|
|
1554
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1555
|
+
*/
|
|
1556
|
+
/**
|
|
1557
|
+
* TODO(b/267336424): add docs
|
|
1558
|
+
*
|
|
1559
|
+
* @final
|
|
1560
|
+
* @suppress {visibility}
|
|
1561
|
+
*/
|
|
1562
|
+
var MdFocusRing = class MdFocusRing extends FocusRing {};
|
|
1563
|
+
MdFocusRing.styles = [styles$1];
|
|
1564
|
+
MdFocusRing = __decorate([t$3("md-focus-ring")], MdFocusRing);
|
|
1565
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directive.js
|
|
1566
|
+
/**
|
|
1567
|
+
* @license
|
|
1568
|
+
* Copyright 2017 Google LLC
|
|
1569
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1570
|
+
*/
|
|
1571
|
+
var t = {
|
|
1572
|
+
ATTRIBUTE: 1,
|
|
1573
|
+
CHILD: 2,
|
|
1574
|
+
PROPERTY: 3,
|
|
1575
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
1576
|
+
EVENT: 5,
|
|
1577
|
+
ELEMENT: 6
|
|
1578
|
+
};
|
|
1579
|
+
var e$1 = (t) => (...e) => ({
|
|
1580
|
+
_$litDirective$: t,
|
|
1581
|
+
values: e
|
|
1582
|
+
});
|
|
1583
|
+
var i$1 = class {
|
|
1584
|
+
constructor(t) {}
|
|
1585
|
+
get _$AU() {
|
|
1586
|
+
return this._$AM._$AU;
|
|
1587
|
+
}
|
|
1588
|
+
_$AT(t, e, i) {
|
|
1589
|
+
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
1590
|
+
}
|
|
1591
|
+
_$AS(t, e) {
|
|
1592
|
+
return this.update(t, e);
|
|
1593
|
+
}
|
|
1594
|
+
update(t, e) {
|
|
1595
|
+
return this.render(...e);
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directives/class-map.js
|
|
1599
|
+
/**
|
|
1600
|
+
* @license
|
|
1601
|
+
* Copyright 2018 Google LLC
|
|
1602
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1603
|
+
*/ var e = e$1(class extends i$1 {
|
|
1604
|
+
constructor(t$4) {
|
|
1605
|
+
if (super(t$4), t$4.type !== t.ATTRIBUTE || "class" !== t$4.name || t$4.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1606
|
+
}
|
|
1607
|
+
render(t) {
|
|
1608
|
+
return " " + Object.keys(t).filter((s) => t[s]).join(" ") + " ";
|
|
1609
|
+
}
|
|
1610
|
+
update(s, [i]) {
|
|
1611
|
+
if (void 0 === this.st) {
|
|
1612
|
+
this.st = /* @__PURE__ */ new Set(), void 0 !== s.strings && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((t) => "" !== t)));
|
|
1613
|
+
for (const t in i) i[t] && !this.nt?.has(t) && this.st.add(t);
|
|
1614
|
+
return this.render(i);
|
|
1615
|
+
}
|
|
1616
|
+
const r = s.element.classList;
|
|
1617
|
+
for (const t of this.st) t in i || (r.remove(t), this.st.delete(t));
|
|
1618
|
+
for (const t in i) {
|
|
1619
|
+
const s = !!i[t];
|
|
1620
|
+
s === this.st.has(t) || this.nt?.has(t) || (s ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t)));
|
|
1621
|
+
}
|
|
1622
|
+
return E;
|
|
1623
|
+
}
|
|
1624
|
+
});
|
|
1625
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/motion/animation.js
|
|
1626
|
+
/**
|
|
1627
|
+
* @license
|
|
1628
|
+
* Copyright 2021 Google LLC
|
|
1629
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1630
|
+
*/
|
|
1631
|
+
/**
|
|
1632
|
+
* Easing functions to use for web animations.
|
|
1633
|
+
*
|
|
1634
|
+
* **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy.
|
|
1635
|
+
*
|
|
1636
|
+
* TODO(b/241113345): replace with tokens
|
|
1637
|
+
*/
|
|
1638
|
+
var EASING = {
|
|
1639
|
+
STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
|
|
1640
|
+
STANDARD_ACCELERATE: "cubic-bezier(.3,0,1,1)",
|
|
1641
|
+
STANDARD_DECELERATE: "cubic-bezier(0,0,0,1)",
|
|
1642
|
+
EMPHASIZED: "cubic-bezier(.3,0,0,1)",
|
|
1643
|
+
EMPHASIZED_ACCELERATE: "cubic-bezier(.3,0,.8,.15)",
|
|
1644
|
+
EMPHASIZED_DECELERATE: "cubic-bezier(.05,.7,.1,1)"
|
|
1645
|
+
};
|
|
1646
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple.js
|
|
1647
|
+
/**
|
|
1648
|
+
* @license
|
|
1649
|
+
* Copyright 2022 Google LLC
|
|
1650
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1651
|
+
*/
|
|
1652
|
+
var PRESS_GROW_MS = 450;
|
|
1653
|
+
var MINIMUM_PRESS_MS = 225;
|
|
1654
|
+
var INITIAL_ORIGIN_SCALE = .2;
|
|
1655
|
+
var PADDING = 10;
|
|
1656
|
+
var SOFT_EDGE_MINIMUM_SIZE = 75;
|
|
1657
|
+
var SOFT_EDGE_CONTAINER_RATIO = .35;
|
|
1658
|
+
var PRESS_PSEUDO = "::after";
|
|
1659
|
+
var ANIMATION_FILL = "forwards";
|
|
1660
|
+
/**
|
|
1661
|
+
* Interaction states for the ripple.
|
|
1662
|
+
*
|
|
1663
|
+
* On Touch:
|
|
1664
|
+
* - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1665
|
+
* - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1666
|
+
*
|
|
1667
|
+
* On Mouse or Pen:
|
|
1668
|
+
* - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1669
|
+
*/
|
|
1670
|
+
var State;
|
|
1671
|
+
(function(State) {
|
|
1672
|
+
/**
|
|
1673
|
+
* Initial state of the control, no touch in progress.
|
|
1674
|
+
*
|
|
1675
|
+
* Transitions:
|
|
1676
|
+
* - on touch down: transition to `TOUCH_DELAY`.
|
|
1677
|
+
* - on mouse down: transition to `WAITING_FOR_CLICK`.
|
|
1678
|
+
*/
|
|
1679
|
+
State[State["INACTIVE"] = 0] = "INACTIVE";
|
|
1680
|
+
/**
|
|
1681
|
+
* Touch down has been received, waiting to determine if it's a swipe or
|
|
1682
|
+
* scroll.
|
|
1683
|
+
*
|
|
1684
|
+
* Transitions:
|
|
1685
|
+
* - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
|
|
1686
|
+
* - on cancel: transition to `INACTIVE`.
|
|
1687
|
+
* - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
|
|
1688
|
+
*/
|
|
1689
|
+
State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
|
|
1690
|
+
/**
|
|
1691
|
+
* A touch has been deemed to be a press
|
|
1692
|
+
*
|
|
1693
|
+
* Transitions:
|
|
1694
|
+
* - on up: transition to `WAITING_FOR_CLICK`.
|
|
1695
|
+
*/
|
|
1696
|
+
State[State["HOLDING"] = 2] = "HOLDING";
|
|
1697
|
+
/**
|
|
1698
|
+
* The user touch has finished, transition into rest state.
|
|
1699
|
+
*
|
|
1700
|
+
* Transitions:
|
|
1701
|
+
* - on click end press; transition to `INACTIVE`.
|
|
1702
|
+
*/
|
|
1703
|
+
State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
|
|
1704
|
+
})(State || (State = {}));
|
|
1705
|
+
/**
|
|
1706
|
+
* Delay reacting to touch so that we do not show the ripple for a swipe or
|
|
1707
|
+
* scroll interaction.
|
|
1708
|
+
*/
|
|
1709
|
+
var TOUCH_DELAY_MS = 150;
|
|
1710
|
+
/**
|
|
1711
|
+
* Used to detect if HCM is active. Events do not process during HCM when the
|
|
1712
|
+
* ripple is not displayed.
|
|
1713
|
+
*/
|
|
1714
|
+
var FORCED_COLORS = null;
|
|
1715
|
+
/**
|
|
1716
|
+
* A ripple component.
|
|
1717
|
+
*/
|
|
1718
|
+
var Ripple = class extends i$2 {
|
|
1719
|
+
constructor() {
|
|
1720
|
+
super(...arguments);
|
|
1721
|
+
/**
|
|
1722
|
+
* Disables the ripple.
|
|
1723
|
+
*/
|
|
1724
|
+
this.disabled = false;
|
|
1725
|
+
this.hovered = false;
|
|
1726
|
+
this.pressed = false;
|
|
1727
|
+
this.rippleSize = "";
|
|
1728
|
+
this.rippleScale = "";
|
|
1729
|
+
this.initialSize = 0;
|
|
1730
|
+
this.state = State.INACTIVE;
|
|
1731
|
+
this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
|
|
1732
|
+
}
|
|
1733
|
+
get htmlFor() {
|
|
1734
|
+
return this.attachableController.htmlFor;
|
|
1735
|
+
}
|
|
1736
|
+
set htmlFor(htmlFor) {
|
|
1737
|
+
this.attachableController.htmlFor = htmlFor;
|
|
1738
|
+
}
|
|
1739
|
+
get control() {
|
|
1740
|
+
return this.attachableController.control;
|
|
1741
|
+
}
|
|
1742
|
+
set control(control) {
|
|
1743
|
+
this.attachableController.control = control;
|
|
1744
|
+
}
|
|
1745
|
+
attach(control) {
|
|
1746
|
+
this.attachableController.attach(control);
|
|
1747
|
+
}
|
|
1748
|
+
detach() {
|
|
1749
|
+
this.attachableController.detach();
|
|
1750
|
+
}
|
|
1751
|
+
connectedCallback() {
|
|
1752
|
+
super.connectedCallback();
|
|
1753
|
+
this.setAttribute("aria-hidden", "true");
|
|
1754
|
+
}
|
|
1755
|
+
render() {
|
|
1756
|
+
return T`<div class="surface ${e({
|
|
1757
|
+
"hovered": this.hovered,
|
|
1758
|
+
"pressed": this.pressed
|
|
1759
|
+
})}"></div>`;
|
|
1760
|
+
}
|
|
1761
|
+
update(changedProps) {
|
|
1762
|
+
if (changedProps.has("disabled") && this.disabled) {
|
|
1763
|
+
this.hovered = false;
|
|
1764
|
+
this.pressed = false;
|
|
1765
|
+
}
|
|
1766
|
+
super.update(changedProps);
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* TODO(b/269799771): make private
|
|
1770
|
+
* @private only public for slider
|
|
1771
|
+
*/
|
|
1772
|
+
handlePointerenter(event) {
|
|
1773
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1774
|
+
this.hovered = true;
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* TODO(b/269799771): make private
|
|
1778
|
+
* @private only public for slider
|
|
1779
|
+
*/
|
|
1780
|
+
handlePointerleave(event) {
|
|
1781
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1782
|
+
this.hovered = false;
|
|
1783
|
+
if (this.state !== State.INACTIVE) this.endPressAnimation();
|
|
1784
|
+
}
|
|
1785
|
+
handlePointerup(event) {
|
|
1786
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1787
|
+
if (this.state === State.HOLDING) {
|
|
1788
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1789
|
+
return;
|
|
1790
|
+
}
|
|
1791
|
+
if (this.state === State.TOUCH_DELAY) {
|
|
1792
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1793
|
+
this.startPressAnimation(this.rippleStartEvent);
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
async handlePointerdown(event) {
|
|
1798
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1799
|
+
this.rippleStartEvent = event;
|
|
1800
|
+
if (!this.isTouch(event)) {
|
|
1801
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1802
|
+
this.startPressAnimation(event);
|
|
1803
|
+
return;
|
|
1804
|
+
}
|
|
1805
|
+
this.state = State.TOUCH_DELAY;
|
|
1806
|
+
await new Promise((resolve) => {
|
|
1807
|
+
setTimeout(resolve, TOUCH_DELAY_MS);
|
|
1808
|
+
});
|
|
1809
|
+
if (this.state !== State.TOUCH_DELAY) return;
|
|
1810
|
+
this.state = State.HOLDING;
|
|
1811
|
+
this.startPressAnimation(event);
|
|
1812
|
+
}
|
|
1813
|
+
handleClick() {
|
|
1814
|
+
if (this.disabled) return;
|
|
1815
|
+
if (this.state === State.WAITING_FOR_CLICK) {
|
|
1816
|
+
this.endPressAnimation();
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
if (this.state === State.INACTIVE) {
|
|
1820
|
+
this.startPressAnimation();
|
|
1821
|
+
this.endPressAnimation();
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
handlePointercancel(event) {
|
|
1825
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1826
|
+
this.endPressAnimation();
|
|
1827
|
+
}
|
|
1828
|
+
handleContextmenu() {
|
|
1829
|
+
if (this.disabled) return;
|
|
1830
|
+
this.endPressAnimation();
|
|
1831
|
+
}
|
|
1832
|
+
determineRippleSize() {
|
|
1833
|
+
const { height, width } = this.getBoundingClientRect();
|
|
1834
|
+
const maxDim = Math.max(height, width);
|
|
1835
|
+
const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
|
|
1836
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1837
|
+
const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE / zoom);
|
|
1838
|
+
const maxRadius = Math.sqrt(width ** 2 + height ** 2) + PADDING;
|
|
1839
|
+
this.initialSize = initialSize;
|
|
1840
|
+
const maybeZoomedScale = (maxRadius + softEdgeSize) / initialSize;
|
|
1841
|
+
this.rippleScale = `${maybeZoomedScale / zoom}`;
|
|
1842
|
+
this.rippleSize = `${initialSize}px`;
|
|
1843
|
+
}
|
|
1844
|
+
getNormalizedPointerEventCoords(pointerEvent) {
|
|
1845
|
+
const { scrollX, scrollY } = window;
|
|
1846
|
+
const { left, top } = this.getBoundingClientRect();
|
|
1847
|
+
const documentX = scrollX + left;
|
|
1848
|
+
const documentY = scrollY + top;
|
|
1849
|
+
const { pageX, pageY } = pointerEvent;
|
|
1850
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1851
|
+
return {
|
|
1852
|
+
x: (pageX - documentX) / zoom,
|
|
1853
|
+
y: (pageY - documentY) / zoom
|
|
1854
|
+
};
|
|
1855
|
+
}
|
|
1856
|
+
getTranslationCoordinates(positionEvent) {
|
|
1857
|
+
const { height, width } = this.getBoundingClientRect();
|
|
1858
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1859
|
+
const endPoint = {
|
|
1860
|
+
x: (width / zoom - this.initialSize) / 2,
|
|
1861
|
+
y: (height / zoom - this.initialSize) / 2
|
|
1862
|
+
};
|
|
1863
|
+
let startPoint;
|
|
1864
|
+
if (positionEvent instanceof PointerEvent) startPoint = this.getNormalizedPointerEventCoords(positionEvent);
|
|
1865
|
+
else startPoint = {
|
|
1866
|
+
x: width / zoom / 2,
|
|
1867
|
+
y: height / zoom / 2
|
|
1868
|
+
};
|
|
1869
|
+
startPoint = {
|
|
1870
|
+
x: startPoint.x - this.initialSize / 2,
|
|
1871
|
+
y: startPoint.y - this.initialSize / 2
|
|
1872
|
+
};
|
|
1873
|
+
return {
|
|
1874
|
+
startPoint,
|
|
1875
|
+
endPoint
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
startPressAnimation(positionEvent) {
|
|
1879
|
+
if (!this.mdRoot) return;
|
|
1880
|
+
this.pressed = true;
|
|
1881
|
+
this.growAnimation?.cancel();
|
|
1882
|
+
this.determineRippleSize();
|
|
1883
|
+
const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
|
|
1884
|
+
const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
|
|
1885
|
+
const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
|
|
1886
|
+
this.growAnimation = this.mdRoot.animate({
|
|
1887
|
+
top: [0, 0],
|
|
1888
|
+
left: [0, 0],
|
|
1889
|
+
height: [this.rippleSize, this.rippleSize],
|
|
1890
|
+
width: [this.rippleSize, this.rippleSize],
|
|
1891
|
+
transform: [`translate(${translateStart}) scale(1)`, `translate(${translateEnd}) scale(${this.rippleScale})`]
|
|
1892
|
+
}, {
|
|
1893
|
+
pseudoElement: PRESS_PSEUDO,
|
|
1894
|
+
duration: PRESS_GROW_MS,
|
|
1895
|
+
easing: EASING.STANDARD,
|
|
1896
|
+
fill: ANIMATION_FILL
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
async endPressAnimation() {
|
|
1900
|
+
this.rippleStartEvent = void 0;
|
|
1901
|
+
this.state = State.INACTIVE;
|
|
1902
|
+
const animation = this.growAnimation;
|
|
1903
|
+
let pressAnimationPlayState = Infinity;
|
|
1904
|
+
if (typeof animation?.currentTime === "number") pressAnimationPlayState = animation.currentTime;
|
|
1905
|
+
else if (animation?.currentTime) pressAnimationPlayState = animation.currentTime.to("ms").value;
|
|
1906
|
+
if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
|
|
1907
|
+
this.pressed = false;
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
await new Promise((resolve) => {
|
|
1911
|
+
setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);
|
|
1912
|
+
});
|
|
1913
|
+
if (this.growAnimation !== animation) return;
|
|
1914
|
+
this.pressed = false;
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Returns `true` if
|
|
1918
|
+
* - the ripple element is enabled
|
|
1919
|
+
* - the pointer is primary for the input type
|
|
1920
|
+
* - the pointer is the pointer that started the interaction, or will start
|
|
1921
|
+
* the interaction
|
|
1922
|
+
* - the pointer is a touch, or the pointer state has the primary button
|
|
1923
|
+
* held, or the pointer is hovering
|
|
1924
|
+
*/
|
|
1925
|
+
shouldReactToEvent(event) {
|
|
1926
|
+
if (this.disabled || !event.isPrimary) return false;
|
|
1927
|
+
if (this.rippleStartEvent && this.rippleStartEvent.pointerId !== event.pointerId) return false;
|
|
1928
|
+
if (event.type === "pointerenter" || event.type === "pointerleave") return !this.isTouch(event);
|
|
1929
|
+
const isPrimaryButton = event.buttons === 1;
|
|
1930
|
+
return this.isTouch(event) || isPrimaryButton;
|
|
1931
|
+
}
|
|
1932
|
+
isTouch({ pointerType }) {
|
|
1933
|
+
return pointerType === "touch";
|
|
1934
|
+
}
|
|
1935
|
+
/** @private */
|
|
1936
|
+
async handleEvent(event) {
|
|
1937
|
+
if (FORCED_COLORS?.matches) return;
|
|
1938
|
+
switch (event.type) {
|
|
1939
|
+
case "click":
|
|
1940
|
+
this.handleClick();
|
|
1941
|
+
break;
|
|
1942
|
+
case "contextmenu":
|
|
1943
|
+
this.handleContextmenu();
|
|
1944
|
+
break;
|
|
1945
|
+
case "pointercancel":
|
|
1946
|
+
this.handlePointercancel(event);
|
|
1947
|
+
break;
|
|
1948
|
+
case "pointerdown":
|
|
1949
|
+
await this.handlePointerdown(event);
|
|
1950
|
+
break;
|
|
1951
|
+
case "pointerenter":
|
|
1952
|
+
this.handlePointerenter(event);
|
|
1953
|
+
break;
|
|
1954
|
+
case "pointerleave":
|
|
1955
|
+
this.handlePointerleave(event);
|
|
1956
|
+
break;
|
|
1957
|
+
case "pointerup": this.handlePointerup(event);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
onControlChange(prev, next) {}
|
|
1961
|
+
};
|
|
1962
|
+
__decorate([n$2({
|
|
1963
|
+
type: Boolean,
|
|
1964
|
+
reflect: true
|
|
1965
|
+
})], Ripple.prototype, "disabled", void 0);
|
|
1966
|
+
__decorate([r$1()], Ripple.prototype, "hovered", void 0);
|
|
1967
|
+
__decorate([r$1()], Ripple.prototype, "pressed", void 0);
|
|
1968
|
+
__decorate([e$3(".surface")], Ripple.prototype, "mdRoot", void 0);
|
|
1969
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple-styles.cssresult.js
|
|
1970
|
+
/**
|
|
1971
|
+
* @license
|
|
1972
|
+
* Copyright 2026 Google LLC
|
|
1973
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1974
|
+
*/
|
|
1975
|
+
var styles = i$4`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
1976
|
+
`;
|
|
1977
|
+
styles.styleSheet;
|
|
1978
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/ripple.js
|
|
1979
|
+
/**
|
|
1980
|
+
* @license
|
|
1981
|
+
* Copyright 2022 Google LLC
|
|
1982
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1983
|
+
*/
|
|
1984
|
+
/**
|
|
1985
|
+
* @summary Ripples, also known as state layers, are visual indicators used to
|
|
1986
|
+
* communicate the status of a component or interactive element.
|
|
1987
|
+
*
|
|
1988
|
+
* @description A state layer is a semi-transparent covering on an element that
|
|
1989
|
+
* indicates its state. State layers provide a systematic approach to
|
|
1990
|
+
* visualizing states by using opacity. A layer can be applied to an entire
|
|
1991
|
+
* element or in a circular shape and only one state layer can be applied at a
|
|
1992
|
+
* given time.
|
|
1993
|
+
*
|
|
1994
|
+
* @final
|
|
1995
|
+
* @suppress {visibility}
|
|
1996
|
+
*/
|
|
1997
|
+
var MdRipple = class MdRipple extends Ripple {};
|
|
1998
|
+
MdRipple.styles = [styles];
|
|
1999
|
+
MdRipple = __decorate([t$3("md-ripple")], MdRipple);
|
|
2000
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/static.js
|
|
2001
|
+
/**
|
|
2002
|
+
* @license
|
|
2003
|
+
* Copyright 2020 Google LLC
|
|
2004
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2005
|
+
*/
|
|
2006
|
+
var a = Symbol.for("");
|
|
2007
|
+
var o = (t) => {
|
|
2008
|
+
if (t?.r === a) return t?._$litStatic$;
|
|
2009
|
+
};
|
|
2010
|
+
var i = (t, ...r) => ({
|
|
2011
|
+
_$litStatic$: r.reduce((r, e, a) => r + ((t) => {
|
|
2012
|
+
if (void 0 !== t._$litStatic$) return t._$litStatic$;
|
|
2013
|
+
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`);
|
|
2014
|
+
})(e) + t[a + 1], t[0]),
|
|
2015
|
+
r: a
|
|
2016
|
+
});
|
|
2017
|
+
var l = /* @__PURE__ */ new Map();
|
|
2018
|
+
var n = (t) => (r, ...e) => {
|
|
2019
|
+
const a = e.length;
|
|
2020
|
+
let s, i;
|
|
2021
|
+
const n = [], u = [];
|
|
2022
|
+
let c, $ = 0, f = !1;
|
|
2023
|
+
for (; $ < a;) {
|
|
2024
|
+
for (c = r[$]; $ < a && void 0 !== (i = e[$], s = o(i));) c += s + r[++$], f = !0;
|
|
2025
|
+
$ !== a && u.push(i), n.push(c), $++;
|
|
2026
|
+
}
|
|
2027
|
+
if ($ === a && n.push(r[a]), f) {
|
|
2028
|
+
const t = n.join("$$lit$$");
|
|
2029
|
+
void 0 === (r = l.get(t)) && (n.raw = n, l.set(t, r = n)), e = u;
|
|
2030
|
+
}
|
|
2031
|
+
return t(r, ...e);
|
|
2032
|
+
};
|
|
2033
|
+
var u = n(T);
|
|
2034
|
+
/**
|
|
2035
|
+
* @license
|
|
2036
|
+
* Copyright 2023 Google LLC
|
|
2037
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2038
|
+
*/
|
|
2039
|
+
[
|
|
2040
|
+
"role",
|
|
2041
|
+
"ariaAtomic",
|
|
2042
|
+
"ariaAutoComplete",
|
|
2043
|
+
"ariaBusy",
|
|
2044
|
+
"ariaChecked",
|
|
2045
|
+
"ariaColCount",
|
|
2046
|
+
"ariaColIndex",
|
|
2047
|
+
"ariaColSpan",
|
|
2048
|
+
"ariaCurrent",
|
|
2049
|
+
"ariaDisabled",
|
|
2050
|
+
"ariaExpanded",
|
|
2051
|
+
"ariaHasPopup",
|
|
2052
|
+
"ariaHidden",
|
|
2053
|
+
"ariaInvalid",
|
|
2054
|
+
"ariaKeyShortcuts",
|
|
2055
|
+
"ariaLabel",
|
|
2056
|
+
"ariaLevel",
|
|
2057
|
+
"ariaLive",
|
|
2058
|
+
"ariaModal",
|
|
2059
|
+
"ariaMultiLine",
|
|
2060
|
+
"ariaMultiSelectable",
|
|
2061
|
+
"ariaOrientation",
|
|
2062
|
+
"ariaPlaceholder",
|
|
2063
|
+
"ariaPosInSet",
|
|
2064
|
+
"ariaPressed",
|
|
2065
|
+
"ariaReadOnly",
|
|
2066
|
+
"ariaRequired",
|
|
2067
|
+
"ariaRoleDescription",
|
|
2068
|
+
"ariaRowCount",
|
|
2069
|
+
"ariaRowIndex",
|
|
2070
|
+
"ariaRowSpan",
|
|
2071
|
+
"ariaSelected",
|
|
2072
|
+
"ariaSetSize",
|
|
2073
|
+
"ariaSort",
|
|
2074
|
+
"ariaValueMax",
|
|
2075
|
+
"ariaValueMin",
|
|
2076
|
+
"ariaValueNow",
|
|
2077
|
+
"ariaValueText"
|
|
2078
|
+
].map(ariaPropertyToAttribute);
|
|
2079
|
+
/**
|
|
2080
|
+
* Converts an AOM aria property into its corresponding attribute.
|
|
2081
|
+
*
|
|
2082
|
+
* @example
|
|
2083
|
+
* ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
|
|
2084
|
+
*
|
|
2085
|
+
* @param property The aria property.
|
|
2086
|
+
* @return The aria attribute.
|
|
2087
|
+
*/
|
|
2088
|
+
function ariaPropertyToAttribute(property) {
|
|
2089
|
+
return property.replace("aria", "aria-").replace(/Elements?/g, "").toLowerCase();
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* @license
|
|
2093
|
+
* Copyright 2023 Google LLC
|
|
2094
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2095
|
+
*/
|
|
2096
|
+
/**
|
|
2097
|
+
* Mixes in aria delegation for elements that delegate focus and aria to inner
|
|
2098
|
+
* shadow root elements.
|
|
2099
|
+
*
|
|
2100
|
+
* This mixin fixes invalid aria announcements with shadow roots, caused by
|
|
2101
|
+
* duplicate aria attributes on both the host and the inner shadow root element.
|
|
2102
|
+
*
|
|
2103
|
+
* Note: this mixin **does not yet support** ID reference attributes, such as
|
|
2104
|
+
* `aria-labelledby` or `aria-controls`.
|
|
2105
|
+
*
|
|
2106
|
+
* @example
|
|
2107
|
+
* ```ts
|
|
2108
|
+
* class MyButton extends mixinDelegatesAria(LitElement) {
|
|
2109
|
+
* static shadowRootOptions = {mode: 'open', delegatesFocus: true};
|
|
2110
|
+
*
|
|
2111
|
+
* render() {
|
|
2112
|
+
* return html`
|
|
2113
|
+
* <button aria-label=${this.ariaLabel || nothing}>
|
|
2114
|
+
* <slot></slot>
|
|
2115
|
+
* </button>
|
|
2116
|
+
* `;
|
|
2117
|
+
* }
|
|
2118
|
+
* }
|
|
2119
|
+
* ```
|
|
2120
|
+
* ```html
|
|
2121
|
+
* <my-button aria-label="Plus one">+1</my-button>
|
|
2122
|
+
* ```
|
|
2123
|
+
*
|
|
2124
|
+
* Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
|
|
2125
|
+
* attribute.
|
|
2126
|
+
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* ```ts
|
|
2129
|
+
* return html`
|
|
2130
|
+
* <button role=${(this as ARIAMixinStrict).role || nothing}>
|
|
2131
|
+
* <slot></slot>
|
|
2132
|
+
* </button>
|
|
2133
|
+
* `;
|
|
2134
|
+
* ```
|
|
2135
|
+
*
|
|
2136
|
+
* In the future, updates to the Accessibility Object Model (AOM) will provide
|
|
2137
|
+
* built-in aria delegation features that will replace this mixin.
|
|
2138
|
+
*
|
|
2139
|
+
* @param base The class to mix functionality into.
|
|
2140
|
+
* @return The provided class with aria delegation mixed in.
|
|
2141
|
+
*/
|
|
2142
|
+
function mixinDelegatesAria(base) {
|
|
2143
|
+
return base;
|
|
2144
|
+
}
|
|
2145
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/dispatch-hooks.js
|
|
2146
|
+
/**
|
|
2147
|
+
* @license
|
|
2148
|
+
* Copyright 2023 Google LLC
|
|
2149
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2150
|
+
*/
|
|
2151
|
+
/**
|
|
2152
|
+
* A symbol used to access dispatch hooks on an event.
|
|
2153
|
+
*/
|
|
2154
|
+
var dispatchHooks = Symbol("dispatchHooks");
|
|
2155
|
+
/**
|
|
2156
|
+
* Add a hook for an event that is called after the event is dispatched and
|
|
2157
|
+
* propagates to other event listeners.
|
|
2158
|
+
*
|
|
2159
|
+
* This is useful for behaviors that need to check if an event is canceled.
|
|
2160
|
+
*
|
|
2161
|
+
* The callback is invoked synchronously, which allows for better integration
|
|
2162
|
+
* with synchronous platform APIs (like `<form>` or `<label>` clicking).
|
|
2163
|
+
*
|
|
2164
|
+
* Note: `setupDispatchHooks()` must be called on the element before adding any
|
|
2165
|
+
* other event listeners. Call it in the constructor of an element or
|
|
2166
|
+
* controller.
|
|
2167
|
+
*
|
|
2168
|
+
* @example
|
|
2169
|
+
* ```ts
|
|
2170
|
+
* class MyControl extends LitElement {
|
|
2171
|
+
* constructor() {
|
|
2172
|
+
* super();
|
|
2173
|
+
* setupDispatchHooks(this, 'click');
|
|
2174
|
+
* this.addEventListener('click', event => {
|
|
2175
|
+
* afterDispatch(event, () => {
|
|
2176
|
+
* if (event.defaultPrevented) {
|
|
2177
|
+
* return
|
|
2178
|
+
* }
|
|
2179
|
+
*
|
|
2180
|
+
* // ... perform logic
|
|
2181
|
+
* });
|
|
2182
|
+
* });
|
|
2183
|
+
* }
|
|
2184
|
+
* }
|
|
2185
|
+
* ```
|
|
2186
|
+
*
|
|
2187
|
+
* @example
|
|
2188
|
+
* ```ts
|
|
2189
|
+
* class MyController implements ReactiveController {
|
|
2190
|
+
* constructor(host: ReactiveElement) {
|
|
2191
|
+
* // setupDispatchHooks() may be called multiple times for the same
|
|
2192
|
+
* // element and events, making it safe for multiple controllers to use it.
|
|
2193
|
+
* setupDispatchHooks(host, 'click');
|
|
2194
|
+
* host.addEventListener('click', event => {
|
|
2195
|
+
* afterDispatch(event, () => {
|
|
2196
|
+
* if (event.defaultPrevented) {
|
|
2197
|
+
* return;
|
|
2198
|
+
* }
|
|
2199
|
+
*
|
|
2200
|
+
* // ... perform logic
|
|
2201
|
+
* });
|
|
2202
|
+
* });
|
|
2203
|
+
* }
|
|
2204
|
+
* }
|
|
2205
|
+
* ```
|
|
2206
|
+
*
|
|
2207
|
+
* @param event The event to add a hook to.
|
|
2208
|
+
* @param callback A hook that is called after the event finishes dispatching.
|
|
2209
|
+
*/
|
|
2210
|
+
function afterDispatch(event, callback) {
|
|
2211
|
+
const hooks = event[dispatchHooks];
|
|
2212
|
+
if (!hooks) throw new Error(`'${event.type}' event needs setupDispatchHooks().`);
|
|
2213
|
+
hooks.addEventListener("after", callback, { once: true });
|
|
2214
|
+
}
|
|
2215
|
+
/**
|
|
2216
|
+
* A lookup map of elements and event types that have a dispatch hook listener
|
|
2217
|
+
* set up. Used to ensure we don't set up multiple hook listeners on the same
|
|
2218
|
+
* element for the same event.
|
|
2219
|
+
*/
|
|
2220
|
+
var ELEMENT_DISPATCH_HOOK_TYPES = /* @__PURE__ */ new WeakMap();
|
|
2221
|
+
/**
|
|
2222
|
+
* Sets up an element to add dispatch hooks to given event types. This must be
|
|
2223
|
+
* called before adding any event listeners that need to use dispatch hooks
|
|
2224
|
+
* like `afterDispatch()`.
|
|
2225
|
+
*
|
|
2226
|
+
* This function is safe to call multiple times with the same element or event
|
|
2227
|
+
* types. Call it in the constructor of elements, mixins, and controllers to
|
|
2228
|
+
* ensure it is set up before external listeners.
|
|
2229
|
+
*
|
|
2230
|
+
* @example
|
|
2231
|
+
* ```ts
|
|
2232
|
+
* class MyControl extends LitElement {
|
|
2233
|
+
* constructor() {
|
|
2234
|
+
* super();
|
|
2235
|
+
* setupDispatchHooks(this, 'click');
|
|
2236
|
+
* this.addEventListener('click', this.listenerUsingAfterDispatch);
|
|
2237
|
+
* }
|
|
2238
|
+
* }
|
|
2239
|
+
* ```
|
|
2240
|
+
*
|
|
2241
|
+
* @param element The element to set up event dispatch hooks for.
|
|
2242
|
+
* @param eventTypes The event types to add dispatch hooks to.
|
|
2243
|
+
*/
|
|
2244
|
+
function setupDispatchHooks(element, ...eventTypes) {
|
|
2245
|
+
let typesAlreadySetUp = ELEMENT_DISPATCH_HOOK_TYPES.get(element);
|
|
2246
|
+
if (!typesAlreadySetUp) {
|
|
2247
|
+
typesAlreadySetUp = /* @__PURE__ */ new Set();
|
|
2248
|
+
ELEMENT_DISPATCH_HOOK_TYPES.set(element, typesAlreadySetUp);
|
|
2249
|
+
}
|
|
2250
|
+
for (const eventType of eventTypes) {
|
|
2251
|
+
if (typesAlreadySetUp.has(eventType)) continue;
|
|
2252
|
+
element.addEventListener(eventType, (event) => {
|
|
2253
|
+
const hooks = new EventTarget();
|
|
2254
|
+
event[dispatchHooks] = hooks;
|
|
2255
|
+
const cleanupLastNodeListener = new AbortController();
|
|
2256
|
+
const callAfterDispatch = () => {
|
|
2257
|
+
cleanupLastNodeListener.abort();
|
|
2258
|
+
hooks.dispatchEvent(new Event("after"));
|
|
2259
|
+
};
|
|
2260
|
+
const patchStopPropagation = (superMethod) => {
|
|
2261
|
+
return function() {
|
|
2262
|
+
superMethod.call(this);
|
|
2263
|
+
callAfterDispatch();
|
|
2264
|
+
};
|
|
2265
|
+
};
|
|
2266
|
+
event.stopPropagation = patchStopPropagation(event.stopPropagation);
|
|
2267
|
+
event.stopImmediatePropagation = patchStopPropagation(event.stopImmediatePropagation);
|
|
2268
|
+
const composedPath = event.composedPath();
|
|
2269
|
+
let lastNodeForEvent;
|
|
2270
|
+
if (event.composed && event.bubbles) lastNodeForEvent = composedPath[composedPath.length - 1];
|
|
2271
|
+
else if (!event.bubbles) lastNodeForEvent = composedPath[0];
|
|
2272
|
+
else lastNodeForEvent = composedPath[0].getRootNode();
|
|
2273
|
+
lastNodeForEvent.addEventListener(eventType, () => {
|
|
2274
|
+
callAfterDispatch();
|
|
2275
|
+
}, {
|
|
2276
|
+
once: true,
|
|
2277
|
+
signal: cleanupLastNodeListener.signal
|
|
2278
|
+
});
|
|
2279
|
+
}, { capture: true });
|
|
2280
|
+
typesAlreadySetUp.add(eventType);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/element-internals.js
|
|
2284
|
+
/**
|
|
2285
|
+
* @license
|
|
2286
|
+
* Copyright 2023 Google LLC
|
|
2287
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2288
|
+
*/
|
|
2289
|
+
/**
|
|
2290
|
+
* A unique symbol used for protected access to an instance's
|
|
2291
|
+
* `ElementInternals`.
|
|
2292
|
+
*
|
|
2293
|
+
* @example
|
|
2294
|
+
* ```ts
|
|
2295
|
+
* class MyElement extends mixinElementInternals(LitElement) {
|
|
2296
|
+
* constructor() {
|
|
2297
|
+
* super();
|
|
2298
|
+
* this[internals].role = 'button';
|
|
2299
|
+
* }
|
|
2300
|
+
* }
|
|
2301
|
+
* ```
|
|
2302
|
+
*/
|
|
2303
|
+
var internals = Symbol("internals");
|
|
2304
|
+
var privateInternals = Symbol("privateInternals");
|
|
2305
|
+
/**
|
|
2306
|
+
* Mixes in an attached `ElementInternals` instance.
|
|
2307
|
+
*
|
|
2308
|
+
* This mixin is only needed when other shared code needs access to a
|
|
2309
|
+
* component's `ElementInternals`, such as form-associated mixins.
|
|
2310
|
+
*
|
|
2311
|
+
* @param base The class to mix functionality into.
|
|
2312
|
+
* @return The provided class with `WithElementInternals` mixed in.
|
|
2313
|
+
*/
|
|
2314
|
+
function mixinElementInternals(base) {
|
|
2315
|
+
class WithElementInternalsElement extends base {
|
|
2316
|
+
get [internals]() {
|
|
2317
|
+
if (!this[privateInternals]) this[privateInternals] = this.attachInternals();
|
|
2318
|
+
return this[privateInternals];
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
return WithElementInternalsElement;
|
|
2322
|
+
}
|
|
2323
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-associated.js
|
|
2324
|
+
/**
|
|
2325
|
+
* @license
|
|
2326
|
+
* Copyright 2023 Google LLC
|
|
2327
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2328
|
+
*/
|
|
2329
|
+
/**
|
|
2330
|
+
* A symbol property to retrieve the form value for an element.
|
|
2331
|
+
*/
|
|
2332
|
+
var getFormValue = Symbol("getFormValue");
|
|
2333
|
+
/**
|
|
2334
|
+
* A symbol property to retrieve the form state for an element.
|
|
2335
|
+
*/
|
|
2336
|
+
var getFormState = Symbol("getFormState");
|
|
2337
|
+
/**
|
|
2338
|
+
* Mixes in form-associated behavior for a class. This allows an element to add
|
|
2339
|
+
* values to `<form>` elements.
|
|
2340
|
+
*
|
|
2341
|
+
* Implementing classes should provide a `[formValue]` to return the current
|
|
2342
|
+
* value of the element, as well as reset and restore callbacks.
|
|
2343
|
+
*
|
|
2344
|
+
* @example
|
|
2345
|
+
* ```ts
|
|
2346
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
2347
|
+
*
|
|
2348
|
+
* class MyControl extends base {
|
|
2349
|
+
* \@property()
|
|
2350
|
+
* value = '';
|
|
2351
|
+
*
|
|
2352
|
+
* override [getFormValue]() {
|
|
2353
|
+
* return this.value;
|
|
2354
|
+
* }
|
|
2355
|
+
*
|
|
2356
|
+
* override formResetCallback() {
|
|
2357
|
+
* const defaultValue = this.getAttribute('value');
|
|
2358
|
+
* this.value = defaultValue;
|
|
2359
|
+
* }
|
|
2360
|
+
*
|
|
2361
|
+
* override formStateRestoreCallback(state: string) {
|
|
2362
|
+
* this.value = state;
|
|
2363
|
+
* }
|
|
2364
|
+
* }
|
|
2365
|
+
* ```
|
|
2366
|
+
*
|
|
2367
|
+
* Elements may optionally provide a `[formState]` if their values do not
|
|
2368
|
+
* represent the state of the component.
|
|
2369
|
+
*
|
|
2370
|
+
* @example
|
|
2371
|
+
* ```ts
|
|
2372
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
2373
|
+
*
|
|
2374
|
+
* class MyCheckbox extends base {
|
|
2375
|
+
* \@property()
|
|
2376
|
+
* value = 'on';
|
|
2377
|
+
*
|
|
2378
|
+
* \@property({type: Boolean})
|
|
2379
|
+
* checked = false;
|
|
2380
|
+
*
|
|
2381
|
+
* override [getFormValue]() {
|
|
2382
|
+
* return this.checked ? this.value : null;
|
|
2383
|
+
* }
|
|
2384
|
+
*
|
|
2385
|
+
* override [getFormState]() {
|
|
2386
|
+
* return String(this.checked);
|
|
2387
|
+
* }
|
|
2388
|
+
*
|
|
2389
|
+
* override formResetCallback() {
|
|
2390
|
+
* const defaultValue = this.hasAttribute('checked');
|
|
2391
|
+
* this.checked = defaultValue;
|
|
2392
|
+
* }
|
|
2393
|
+
*
|
|
2394
|
+
* override formStateRestoreCallback(state: string) {
|
|
2395
|
+
* this.checked = Boolean(state);
|
|
2396
|
+
* }
|
|
2397
|
+
* }
|
|
2398
|
+
* ```
|
|
2399
|
+
*
|
|
2400
|
+
* @param base The class to mix functionality into. The base class must use
|
|
2401
|
+
* `mixinElementInternals()`.
|
|
2402
|
+
* @return The provided class with `FormAssociated` mixed in.
|
|
2403
|
+
*/
|
|
2404
|
+
function mixinFormAssociated(base) {
|
|
2405
|
+
class FormAssociatedElement extends base {
|
|
2406
|
+
get form() {
|
|
2407
|
+
return this[internals].form;
|
|
2408
|
+
}
|
|
2409
|
+
get labels() {
|
|
2410
|
+
return this[internals].labels;
|
|
2411
|
+
}
|
|
2412
|
+
get name() {
|
|
2413
|
+
return this.getAttribute("name") ?? "";
|
|
2414
|
+
}
|
|
2415
|
+
set name(name) {
|
|
2416
|
+
this.setAttribute("name", name);
|
|
2417
|
+
}
|
|
2418
|
+
get disabled() {
|
|
2419
|
+
return this.hasAttribute("disabled");
|
|
2420
|
+
}
|
|
2421
|
+
set disabled(disabled) {
|
|
2422
|
+
this.toggleAttribute("disabled", Boolean(disabled));
|
|
2423
|
+
}
|
|
2424
|
+
attributeChangedCallback(name, old, value) {
|
|
2425
|
+
if (name === "name" || name === "disabled") {
|
|
2426
|
+
const oldValue = name === "disabled" ? old !== null : old;
|
|
2427
|
+
this.requestUpdate(name, oldValue);
|
|
2428
|
+
return;
|
|
2429
|
+
}
|
|
2430
|
+
super.attributeChangedCallback(name, old, value);
|
|
2431
|
+
}
|
|
2432
|
+
requestUpdate(name, oldValue, options) {
|
|
2433
|
+
super.requestUpdate(name, oldValue, options);
|
|
2434
|
+
this[internals].setFormValue(this[getFormValue](), this[getFormState]());
|
|
2435
|
+
}
|
|
2436
|
+
[getFormValue]() {
|
|
2437
|
+
return this.getAttribute("value");
|
|
2438
|
+
}
|
|
2439
|
+
[getFormState]() {
|
|
2440
|
+
return this[getFormValue]();
|
|
2441
|
+
}
|
|
2442
|
+
formDisabledCallback(disabled) {
|
|
2443
|
+
this.disabled = disabled;
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
/** @nocollapse */
|
|
2447
|
+
FormAssociatedElement.formAssociated = true;
|
|
2448
|
+
__decorate([n$2({ noAccessor: true })], FormAssociatedElement.prototype, "name", null);
|
|
2449
|
+
__decorate([n$2({
|
|
2450
|
+
type: Boolean,
|
|
2451
|
+
noAccessor: true
|
|
2452
|
+
})], FormAssociatedElement.prototype, "disabled", null);
|
|
2453
|
+
return FormAssociatedElement;
|
|
2454
|
+
}
|
|
2455
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-submitter.js
|
|
2456
|
+
/**
|
|
2457
|
+
* @license
|
|
2458
|
+
* Copyright 2023 Google LLC
|
|
2459
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2460
|
+
*/
|
|
2461
|
+
/**
|
|
2462
|
+
* Mixes in form submitter behavior for a class.
|
|
2463
|
+
*
|
|
2464
|
+
* A click listener is added to each element instance. If the click is not
|
|
2465
|
+
* default prevented, it will submit the element's form, if any.
|
|
2466
|
+
*
|
|
2467
|
+
* @example
|
|
2468
|
+
* ```ts
|
|
2469
|
+
* const base = mixinFormSubmitter(mixinElementInternals(LitElement));
|
|
2470
|
+
* class MyButton extends base {
|
|
2471
|
+
* static formAssociated = true;
|
|
2472
|
+
* }
|
|
2473
|
+
* ```
|
|
2474
|
+
*
|
|
2475
|
+
* @param base The class to mix functionality into.
|
|
2476
|
+
* @return The provided class with `FormSubmitter` mixed in.
|
|
2477
|
+
*/
|
|
2478
|
+
function mixinFormSubmitter(base) {
|
|
2479
|
+
class FormSubmitterElement extends base {
|
|
2480
|
+
get name() {
|
|
2481
|
+
return this.getAttribute("name") ?? "";
|
|
2482
|
+
}
|
|
2483
|
+
set name(name) {
|
|
2484
|
+
this.setAttribute("name", name);
|
|
2485
|
+
}
|
|
2486
|
+
constructor(...args) {
|
|
2487
|
+
super(...args);
|
|
2488
|
+
this.type = "submit";
|
|
2489
|
+
this.value = "";
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
__decorate([n$2()], FormSubmitterElement.prototype, "type", void 0);
|
|
2493
|
+
__decorate([n$2({ reflect: true })], FormSubmitterElement.prototype, "value", void 0);
|
|
2494
|
+
return FormSubmitterElement;
|
|
2495
|
+
}
|
|
4
2496
|
// src/lib/core/theme.ts
|
|
5
2497
|
var DEFAULT_THEME = "light";
|
|
6
2498
|
/** The choices in the order the settings page lists them. */
|
|
@@ -47,6 +2539,75 @@ var BrowserThemeStorage = class {
|
|
|
47
2539
|
} catch {}
|
|
48
2540
|
}
|
|
49
2541
|
};
|
|
2542
|
+
// src/lib/core/config.ts
|
|
2543
|
+
/** The bridge (or the BFF) refused a setting; `field` is its dotted path when it names one. */
|
|
2544
|
+
var SettingRejected = class extends Error {
|
|
2545
|
+
field;
|
|
2546
|
+
constructor(message, field) {
|
|
2547
|
+
super(message);
|
|
2548
|
+
this.field = field;
|
|
2549
|
+
this.name = "SettingRejected";
|
|
2550
|
+
}
|
|
2551
|
+
};
|
|
2552
|
+
function flatten(value, path, into) {
|
|
2553
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) for (const [key, inner] of Object.entries(value)) flatten(inner, path === "" ? key : `${path}.${key}`, into);
|
|
2554
|
+
else into.set(path, JSON.stringify(value));
|
|
2555
|
+
return into;
|
|
2556
|
+
}
|
|
2557
|
+
/**
|
|
2558
|
+
* The dotted paths of the settings whose saved value differs from the one in use: they wait for a
|
|
2559
|
+
* restart of the bridge.
|
|
2560
|
+
*/
|
|
2561
|
+
function pendingFields(active, saved) {
|
|
2562
|
+
const running = flatten(active, "", /* @__PURE__ */ new Map());
|
|
2563
|
+
return [...flatten(saved, "", /* @__PURE__ */ new Map())].filter(([path, value]) => running.get(path) !== value).map(([path]) => path);
|
|
2564
|
+
}
|
|
2565
|
+
// src/lib/adapters/http-config-api.ts
|
|
2566
|
+
/** Reads and saves the configuration through the UI's own config route (`url` includes the base path). */
|
|
2567
|
+
var HttpConfigApi = class {
|
|
2568
|
+
url;
|
|
2569
|
+
constructor(url) {
|
|
2570
|
+
this.url = url;
|
|
2571
|
+
}
|
|
2572
|
+
async fetch() {
|
|
2573
|
+
const response = await fetch(this.url, { headers: { accept: "application/json" } });
|
|
2574
|
+
if (!response.ok) throw await rejection(response);
|
|
2575
|
+
const body = await response.json();
|
|
2576
|
+
const active = checkDto(ConfigSchema, body.active);
|
|
2577
|
+
const saved = checkDto(ConfigSchema, body.saved);
|
|
2578
|
+
const overrides = checkDto(ConfigOverridesSchema, { overrides: body.overrides });
|
|
2579
|
+
if (!active.ok || !saved.ok || !overrides.ok) throw new Error("Unexpected configuration answer from the bridge");
|
|
2580
|
+
return {
|
|
2581
|
+
active: active.value,
|
|
2582
|
+
saved: saved.value,
|
|
2583
|
+
overrides: overrides.value.overrides
|
|
2584
|
+
};
|
|
2585
|
+
}
|
|
2586
|
+
async update(patch) {
|
|
2587
|
+
const response = await fetch(this.url, {
|
|
2588
|
+
method: "PUT",
|
|
2589
|
+
headers: {
|
|
2590
|
+
accept: "application/json",
|
|
2591
|
+
"content-type": "application/json"
|
|
2592
|
+
},
|
|
2593
|
+
body: JSON.stringify(patch)
|
|
2594
|
+
});
|
|
2595
|
+
if (!response.ok) throw await rejection(response);
|
|
2596
|
+
const checked = checkDto(ConfigSchema, await response.json());
|
|
2597
|
+
if (!checked.ok) throw new Error(`Unexpected answer at ${checked.field}: ${checked.message}`);
|
|
2598
|
+
return checked.value;
|
|
2599
|
+
}
|
|
2600
|
+
};
|
|
2601
|
+
/** SvelteKit's `error()` answers `{ message, field? }`; fall back to the status. */
|
|
2602
|
+
async function rejection(response) {
|
|
2603
|
+
const body = await response.json().catch(() => void 0);
|
|
2604
|
+
if (typeof body === "object" && body !== null && "message" in body) {
|
|
2605
|
+
const { message } = body;
|
|
2606
|
+
const field = "field" in body && typeof body.field === "string" ? body.field : void 0;
|
|
2607
|
+
if (typeof message === "string") return new SettingRejected(message, field);
|
|
2608
|
+
}
|
|
2609
|
+
return /* @__PURE__ */ new Error(`The request answered ${response.status}`);
|
|
2610
|
+
}
|
|
50
2611
|
// src/lib/adapters/http-speech-api.ts
|
|
51
2612
|
/** Changes the speech through the UI's own markers and speech routes (the urls include the base path). */
|
|
52
2613
|
var HttpSpeechApi = class {
|
|
@@ -241,6 +2802,57 @@ var BrowserSessionsPaneStorage = class {
|
|
|
241
2802
|
} catch {}
|
|
242
2803
|
}
|
|
243
2804
|
};
|
|
2805
|
+
// src/lib/stores/config.svelte.ts
|
|
2806
|
+
function createConfigStore(api) {
|
|
2807
|
+
let state = null;
|
|
2808
|
+
let reachable = true;
|
|
2809
|
+
let inFlight = null;
|
|
2810
|
+
function read() {
|
|
2811
|
+
if (inFlight) return inFlight;
|
|
2812
|
+
inFlight = api.fetch().then((next) => {
|
|
2813
|
+
state = next;
|
|
2814
|
+
reachable = true;
|
|
2815
|
+
}).catch(() => {
|
|
2816
|
+
reachable = false;
|
|
2817
|
+
}).finally(() => {
|
|
2818
|
+
inFlight = null;
|
|
2819
|
+
});
|
|
2820
|
+
return inFlight;
|
|
2821
|
+
}
|
|
2822
|
+
return {
|
|
2823
|
+
/** Whether a configuration has been read yet. */
|
|
2824
|
+
get loaded() {
|
|
2825
|
+
return state !== null;
|
|
2826
|
+
},
|
|
2827
|
+
get reachable() {
|
|
2828
|
+
return reachable;
|
|
2829
|
+
},
|
|
2830
|
+
get active() {
|
|
2831
|
+
return state?.active ?? null;
|
|
2832
|
+
},
|
|
2833
|
+
get saved() {
|
|
2834
|
+
return state?.saved ?? null;
|
|
2835
|
+
},
|
|
2836
|
+
/** Settings a flag or variable sets, by dotted path, with what sets them. */
|
|
2837
|
+
get overrides() {
|
|
2838
|
+
return state?.overrides ?? {};
|
|
2839
|
+
},
|
|
2840
|
+
/** Dotted paths of the saved settings that wait for a restart. */
|
|
2841
|
+
get pending() {
|
|
2842
|
+
return state === null ? [] : pendingFields(state.active, state.saved);
|
|
2843
|
+
},
|
|
2844
|
+
/** Reads the configuration now (also after a failed read, to try again). */
|
|
2845
|
+
refresh() {
|
|
2846
|
+
return read();
|
|
2847
|
+
},
|
|
2848
|
+
/** Saves a partial config for the next start. Rejects with the bridge's message. */
|
|
2849
|
+
async save(patch) {
|
|
2850
|
+
await api.update(patch);
|
|
2851
|
+
await inFlight;
|
|
2852
|
+
await read();
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
}
|
|
244
2856
|
// src/lib/stores/sessions-pane.svelte.ts
|
|
245
2857
|
function createSessionsPaneStore(storage) {
|
|
246
2858
|
let collapsed = true;
|
|
@@ -513,9 +3125,10 @@ function createThemeStore(storage) {
|
|
|
513
3125
|
/** Wires the adapters into the stores; components get the stores, never the adapters. */
|
|
514
3126
|
var themeStore = createThemeStore(new BrowserThemeStorage());
|
|
515
3127
|
var statusStore = createStatusStore(new HttpStatusApi(resolve("/api/status")));
|
|
3128
|
+
var configStore = createConfigStore(new HttpConfigApi(resolve("/api/config")));
|
|
516
3129
|
var sessionsStore = createSessionsStore(new HttpSessionsApi(resolve("/api/sessions")));
|
|
517
3130
|
var speechStore = createSpeechStore(new SseSpeechFeed(resolve("/api/speech/stream"), resolve("/api/speech")), new HttpSpeechApi(resolve("/api/markers"), resolve("/api/speech")));
|
|
518
3131
|
var sessionsPaneStore = createSessionsPaneStore(new BrowserSessionsPaneStorage());
|
|
519
|
-
export {
|
|
3132
|
+
export { B as A, __decorate as B, EASING as C, t as D, i$1 as E, e$4 as F, r$1 as I, n$2 as L, T as M, Z as N, i$2 as O, e$3 as P, i$4 as R, u as S, e$1 as T, mixinElementInternals as _, statusStore as a, mixinDelegatesAria as b, canClearSpeech as c, logHeading as d, THEMES as f, internals as g, mixinFormAssociated as h, speechStore as i, E as j, A as k, canDeleteSession as l, getFormValue as m, sessionsPaneStore as n, themeStore as o, mixinFormSubmitter as p, sessionsStore as r, canAddMarker as s, configStore as t, formatReceivedTime as u, afterDispatch as v, e as w, i as x, setupDispatchHooks as y, t$3 as z };
|
|
520
3133
|
|
|
521
3134
|
//# sourceMappingURL=composition.js.map
|