screenreader-speech-capture 0.7.0 → 0.8.1-fix-ui-csrf-protocol.18
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 +5 -1
- 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,300 +1,12 @@
|
|
|
1
1
|
import { mt as resolve } from "../../chunks/internal.js";
|
|
2
2
|
import { f as escape_html, i as ensure_array_like, l as attr, n as attr_style, r as derived, t as attr_class, u as clsx } from "../../chunks/server2.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../chunks/index-server.js";
|
|
4
4
|
import { n as goto } from "../../chunks/navigation.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright 2021 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/ function o$1(o) {
|
|
14
|
-
return (e, n) => {
|
|
15
|
-
const { slot: r, selector: s } = o ?? {}, c = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
16
|
-
return e$1(e, n, { get() {
|
|
17
|
-
const e = (this.renderRoot?.querySelector(c))?.assignedElements(o) ?? [];
|
|
18
|
-
return void 0 === s ? e : e.filter((t) => t.matches(s));
|
|
19
|
-
} });
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/elevation/internal/elevation.js
|
|
23
|
-
/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright 2022 Google LLC
|
|
26
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* A component for elevation.
|
|
30
|
-
*/
|
|
31
|
-
var Elevation = class extends i$2 {
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
super.connectedCallback();
|
|
34
|
-
this.setAttribute("aria-hidden", "true");
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return T`<span class="shadow"></span>`;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/elevation/internal/elevation-styles.cssresult.js
|
|
41
|
-
/**
|
|
42
|
-
* @license
|
|
43
|
-
* Copyright 2026 Google LLC
|
|
44
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45
|
-
*/
|
|
46
|
-
var styles$10 = i$3`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
|
|
47
|
-
`;
|
|
48
|
-
styles$10.styleSheet;
|
|
49
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/elevation/elevation.js
|
|
50
|
-
/**
|
|
51
|
-
* @license
|
|
52
|
-
* Copyright 2022 Google LLC
|
|
53
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* The `<md-elevation>` custom element with default styles.
|
|
57
|
-
*
|
|
58
|
-
* Elevation is the relative distance between two surfaces along the z-axis.
|
|
59
|
-
*
|
|
60
|
-
* @final
|
|
61
|
-
* @suppress {visibility}
|
|
62
|
-
*/
|
|
63
|
-
var MdElevation = class MdElevation extends Elevation {};
|
|
64
|
-
MdElevation.styles = [styles$10];
|
|
65
|
-
MdElevation = __decorate([t$1("md-elevation")], MdElevation);
|
|
66
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/form-label-activation.js
|
|
67
|
-
/**
|
|
68
|
-
* @license
|
|
69
|
-
* Copyright 2021 Google LLC
|
|
70
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* Dispatches a click event to the given element that triggers a native action,
|
|
74
|
-
* but is not composed and therefore is not seen outside the element.
|
|
75
|
-
*
|
|
76
|
-
* This is useful for responding to an external click event on the host element
|
|
77
|
-
* that should trigger an internal action like a button click.
|
|
78
|
-
*
|
|
79
|
-
* Note, a helper is provided because setting this up correctly is a bit tricky.
|
|
80
|
-
* In particular, calling `click` on an element creates a composed event, which
|
|
81
|
-
* is not desirable, and a manually dispatched event must specifically be a
|
|
82
|
-
* `MouseEvent` to trigger a native action.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* hostClickListener = (event: MouseEvent) {
|
|
86
|
-
* if (isActivationClick(event)) {
|
|
87
|
-
* this.dispatchActivationClick(this.buttonElement);
|
|
88
|
-
* }
|
|
89
|
-
* }
|
|
90
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
function dispatchActivationClick(element) {
|
|
93
|
-
const event = new MouseEvent("click", { bubbles: true });
|
|
94
|
-
element.dispatchEvent(event);
|
|
95
|
-
return event;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Returns true if the click event should trigger an activation behavior. The
|
|
99
|
-
* behavior is defined by the element and is whatever it should do when
|
|
100
|
-
* clicked.
|
|
101
|
-
*
|
|
102
|
-
* Typically when an element needs to handle a click, the click is generated
|
|
103
|
-
* from within the element and an event listener within the element implements
|
|
104
|
-
* the needed behavior; however, it's possible to fire a click directly
|
|
105
|
-
* at the element that the element should handle. This method helps
|
|
106
|
-
* distinguish these "external" clicks.
|
|
107
|
-
*
|
|
108
|
-
* An "external" click can be triggered in a number of ways: via a click
|
|
109
|
-
* on an associated label for a form associated element, calling
|
|
110
|
-
* `element.click()`, or calling
|
|
111
|
-
* `element.dispatchEvent(new MouseEvent('click', ...))`.
|
|
112
|
-
*
|
|
113
|
-
* Also works around Firefox issue
|
|
114
|
-
* https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching
|
|
115
|
-
* events for a microtask after called.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* hostClickListener = (event: MouseEvent) {
|
|
119
|
-
* if (isActivationClick(event)) {
|
|
120
|
-
* this.dispatchActivationClick(this.buttonElement);
|
|
121
|
-
* }
|
|
122
|
-
* }
|
|
123
|
-
*
|
|
124
|
-
*/
|
|
125
|
-
function isActivationClick(event) {
|
|
126
|
-
if (event.currentTarget !== event.target) return false;
|
|
127
|
-
if (event.composedPath()[0] !== event.target) return false;
|
|
128
|
-
if (event.target.disabled) return false;
|
|
129
|
-
return !squelchEvent(event);
|
|
130
|
-
}
|
|
131
|
-
function squelchEvent(event) {
|
|
132
|
-
const squelched = isSquelchingEvents;
|
|
133
|
-
if (squelched) {
|
|
134
|
-
event.preventDefault();
|
|
135
|
-
event.stopImmediatePropagation();
|
|
136
|
-
}
|
|
137
|
-
squelchEventsForMicrotask();
|
|
138
|
-
return squelched;
|
|
139
|
-
}
|
|
140
|
-
var isSquelchingEvents = false;
|
|
141
|
-
async function squelchEventsForMicrotask() {
|
|
142
|
-
isSquelchingEvents = true;
|
|
143
|
-
await null;
|
|
144
|
-
isSquelchingEvents = false;
|
|
145
|
-
}
|
|
146
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/button.js
|
|
147
|
-
/**
|
|
148
|
-
* @license
|
|
149
|
-
* Copyright 2019 Google LLC
|
|
150
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
151
|
-
*/
|
|
152
|
-
var buttonBaseClass = mixinDelegatesAria(mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(i$2))));
|
|
153
|
-
/**
|
|
154
|
-
* A button component.
|
|
155
|
-
*/
|
|
156
|
-
var Button = class extends buttonBaseClass {
|
|
157
|
-
constructor() {
|
|
158
|
-
super();
|
|
159
|
-
/**
|
|
160
|
-
* Whether or not the button is "soft-disabled" (disabled but still
|
|
161
|
-
* focusable).
|
|
162
|
-
*
|
|
163
|
-
* Use this when a button needs increased visibility when disabled. See
|
|
164
|
-
* https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
|
|
165
|
-
* for more guidance on when this is needed.
|
|
166
|
-
*/
|
|
167
|
-
this.softDisabled = false;
|
|
168
|
-
/**
|
|
169
|
-
* The URL that the link button points to.
|
|
170
|
-
*/
|
|
171
|
-
this.href = "";
|
|
172
|
-
/**
|
|
173
|
-
* The filename to use when downloading the linked resource.
|
|
174
|
-
* If not specified, the browser will determine a filename.
|
|
175
|
-
* This is only applicable when the button is used as a link (`href` is set).
|
|
176
|
-
*/
|
|
177
|
-
this.download = "";
|
|
178
|
-
/**
|
|
179
|
-
* Where to display the linked `href` URL for a link button. Common options
|
|
180
|
-
* include `_blank` to open in a new tab.
|
|
181
|
-
*/
|
|
182
|
-
this.target = "";
|
|
183
|
-
/**
|
|
184
|
-
* Whether to render the icon at the inline end of the label rather than the
|
|
185
|
-
* inline start.
|
|
186
|
-
*
|
|
187
|
-
* _Note:_ Link buttons cannot have trailing icons.
|
|
188
|
-
*/
|
|
189
|
-
this.trailingIcon = false;
|
|
190
|
-
/**
|
|
191
|
-
* Whether to display the icon or not.
|
|
192
|
-
*/
|
|
193
|
-
this.hasIcon = false;
|
|
194
|
-
}
|
|
195
|
-
focus() {
|
|
196
|
-
this.buttonElement?.focus();
|
|
197
|
-
}
|
|
198
|
-
blur() {
|
|
199
|
-
this.buttonElement?.blur();
|
|
200
|
-
}
|
|
201
|
-
render() {
|
|
202
|
-
const isRippleDisabled = this.disabled || this.softDisabled;
|
|
203
|
-
const buttonOrLink = this.href ? this.renderLink() : this.renderButton();
|
|
204
|
-
const buttonId = this.href ? "link" : "button";
|
|
205
|
-
return T`
|
|
206
|
-
${this.renderElevationOrOutline?.()}
|
|
207
|
-
<div class="background"></div>
|
|
208
|
-
<md-focus-ring part="focus-ring" for=${buttonId}></md-focus-ring>
|
|
209
|
-
<md-ripple
|
|
210
|
-
part="ripple"
|
|
211
|
-
for=${buttonId}
|
|
212
|
-
?disabled="${isRippleDisabled}"></md-ripple>
|
|
213
|
-
${buttonOrLink}
|
|
214
|
-
`;
|
|
215
|
-
}
|
|
216
|
-
renderButton() {
|
|
217
|
-
const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
|
|
218
|
-
return T`<button
|
|
219
|
-
id="button"
|
|
220
|
-
class="button"
|
|
221
|
-
?disabled=${this.disabled}
|
|
222
|
-
aria-disabled=${this.softDisabled || A}
|
|
223
|
-
aria-label="${ariaLabel || A}"
|
|
224
|
-
aria-haspopup="${ariaHasPopup || A}"
|
|
225
|
-
aria-expanded="${ariaExpanded || A}">
|
|
226
|
-
${this.renderContent()}
|
|
227
|
-
</button>`;
|
|
228
|
-
}
|
|
229
|
-
renderLink() {
|
|
230
|
-
const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
|
|
231
|
-
return T`<a
|
|
232
|
-
id="link"
|
|
233
|
-
class="button"
|
|
234
|
-
aria-label="${ariaLabel || A}"
|
|
235
|
-
aria-haspopup="${ariaHasPopup || A}"
|
|
236
|
-
aria-expanded="${ariaExpanded || A}"
|
|
237
|
-
aria-disabled=${this.disabled || this.softDisabled || A}
|
|
238
|
-
tabindex="${this.disabled && !this.softDisabled ? -1 : A}"
|
|
239
|
-
href=${this.href}
|
|
240
|
-
download=${this.download || A}
|
|
241
|
-
target=${this.target || A}
|
|
242
|
-
>${this.renderContent()}
|
|
243
|
-
</a>`;
|
|
244
|
-
}
|
|
245
|
-
renderContent() {
|
|
246
|
-
const icon = T`<slot
|
|
247
|
-
name="icon"
|
|
248
|
-
@slotchange="${this.handleSlotChange}"></slot>`;
|
|
249
|
-
return T`
|
|
250
|
-
<span class="touch"></span>
|
|
251
|
-
${this.trailingIcon ? A : icon}
|
|
252
|
-
<span class="label"><slot></slot></span>
|
|
253
|
-
${this.trailingIcon ? icon : A}
|
|
254
|
-
`;
|
|
255
|
-
}
|
|
256
|
-
handleClick(event) {
|
|
257
|
-
if (this.softDisabled || this.disabled && this.href) {
|
|
258
|
-
event.stopImmediatePropagation();
|
|
259
|
-
event.preventDefault();
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
if (!isActivationClick(event) || !this.buttonElement) return;
|
|
263
|
-
this.focus();
|
|
264
|
-
dispatchActivationClick(this.buttonElement);
|
|
265
|
-
}
|
|
266
|
-
handleSlotChange() {
|
|
267
|
-
this.hasIcon = this.assignedIcons.length > 0;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
/** @nocollapse */
|
|
271
|
-
Button.shadowRootOptions = {
|
|
272
|
-
mode: "open",
|
|
273
|
-
delegatesFocus: true
|
|
274
|
-
};
|
|
275
|
-
__decorate([n$2({
|
|
276
|
-
type: Boolean,
|
|
277
|
-
attribute: "soft-disabled",
|
|
278
|
-
reflect: true
|
|
279
|
-
})], Button.prototype, "softDisabled", void 0);
|
|
280
|
-
__decorate([n$2()], Button.prototype, "href", void 0);
|
|
281
|
-
__decorate([n$2()], Button.prototype, "download", void 0);
|
|
282
|
-
__decorate([n$2()], Button.prototype, "target", void 0);
|
|
283
|
-
__decorate([n$2({
|
|
284
|
-
type: Boolean,
|
|
285
|
-
attribute: "trailing-icon",
|
|
286
|
-
reflect: true
|
|
287
|
-
})], Button.prototype, "trailingIcon", void 0);
|
|
288
|
-
__decorate([n$2({
|
|
289
|
-
type: Boolean,
|
|
290
|
-
attribute: "has-icon",
|
|
291
|
-
reflect: true
|
|
292
|
-
})], Button.prototype, "hasIcon", void 0);
|
|
293
|
-
__decorate([e$2(".button")], Button.prototype, "buttonElement", void 0);
|
|
294
|
-
__decorate([o$1({
|
|
295
|
-
slot: "icon",
|
|
296
|
-
flatten: true
|
|
297
|
-
})], Button.prototype, "assignedIcons", void 0);
|
|
5
|
+
import { B as __decorate, C as EASING, I as r, L as n, M as T, O as i$1, P as e$1, R as i, b as mixinDelegatesAria, c as canClearSpeech, d as logHeading, i as speechStore, k as A, l as canDeleteSession, n as sessionsPaneStore, r as sessionsStore, s as canAddMarker, u as formatReceivedTime, w as e, z as t } from "../../chunks/composition.js";
|
|
6
|
+
import { t as page } from "../../chunks/state.js";
|
|
7
|
+
import { i as Button, n as styles$3, r as styles$4, t as redispatchEvent } from "../../chunks/outlined-text-field.js";
|
|
8
|
+
import "../../chunks/icon-button.js";
|
|
9
|
+
import { m as API_LIMITS } from "../../chunks/src.js";
|
|
298
10
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/filled-tonal-button.js
|
|
299
11
|
/**
|
|
300
12
|
* @license
|
|
@@ -315,27 +27,9 @@ var FilledTonalButton = class extends Button {
|
|
|
315
27
|
* Copyright 2026 Google LLC
|
|
316
28
|
* SPDX-License-Identifier: Apache-2.0
|
|
317
29
|
*/
|
|
318
|
-
var styles$
|
|
319
|
-
`;
|
|
320
|
-
styles$9.styleSheet;
|
|
321
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/shared-elevation-styles.cssresult.js
|
|
322
|
-
/**
|
|
323
|
-
* @license
|
|
324
|
-
* Copyright 2026 Google LLC
|
|
325
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
326
|
-
*/
|
|
327
|
-
var styles$8 = i$3`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
|
|
30
|
+
var styles$2 = i`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)}
|
|
328
31
|
`;
|
|
329
|
-
styles$
|
|
330
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/shared-styles.cssresult.js
|
|
331
|
-
/**
|
|
332
|
-
* @license
|
|
333
|
-
* Copyright 2026 Google LLC
|
|
334
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
335
|
-
*/
|
|
336
|
-
var styles$7 = i$3`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:max(48px,100%);left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
|
|
337
|
-
`;
|
|
338
|
-
styles$7.styleSheet;
|
|
32
|
+
styles$2.styleSheet;
|
|
339
33
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/filled-tonal-button.js
|
|
340
34
|
/**
|
|
341
35
|
* @license
|
|
@@ -365,59 +59,11 @@ styles$7.styleSheet;
|
|
|
365
59
|
*/
|
|
366
60
|
var MdFilledTonalButton = class MdFilledTonalButton extends FilledTonalButton {};
|
|
367
61
|
MdFilledTonalButton.styles = [
|
|
368
|
-
styles$
|
|
369
|
-
styles$
|
|
370
|
-
styles$
|
|
62
|
+
styles$3,
|
|
63
|
+
styles$4,
|
|
64
|
+
styles$2
|
|
371
65
|
];
|
|
372
|
-
MdFilledTonalButton = __decorate([t
|
|
373
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-button.js
|
|
374
|
-
/**
|
|
375
|
-
* @license
|
|
376
|
-
* Copyright 2021 Google LLC
|
|
377
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
378
|
-
*/
|
|
379
|
-
/**
|
|
380
|
-
* A text button component.
|
|
381
|
-
*/
|
|
382
|
-
var TextButton = class extends Button {};
|
|
383
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-styles.cssresult.js
|
|
384
|
-
/**
|
|
385
|
-
* @license
|
|
386
|
-
* Copyright 2026 Google LLC
|
|
387
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
388
|
-
*/
|
|
389
|
-
var styles$6 = i$3`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}
|
|
390
|
-
`;
|
|
391
|
-
styles$6.styleSheet;
|
|
392
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/text-button.js
|
|
393
|
-
/**
|
|
394
|
-
* @license
|
|
395
|
-
* Copyright 2021 Google LLC
|
|
396
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
397
|
-
*/
|
|
398
|
-
/**
|
|
399
|
-
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
400
|
-
* document, or liking a comment.
|
|
401
|
-
*
|
|
402
|
-
* @description
|
|
403
|
-
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
404
|
-
* least amount of prominence
|
|
405
|
-
*
|
|
406
|
-
* __Rationale:__ Text buttons have less visual prominence, so should be used
|
|
407
|
-
* for low emphasis actions, such as an alternative option.
|
|
408
|
-
*
|
|
409
|
-
* __Example usages:__
|
|
410
|
-
* - Learn more
|
|
411
|
-
* - View all
|
|
412
|
-
* - Change account
|
|
413
|
-
* - Turn on
|
|
414
|
-
*
|
|
415
|
-
* @final
|
|
416
|
-
* @suppress {visibility}
|
|
417
|
-
*/
|
|
418
|
-
var MdTextButton = class MdTextButton extends TextButton {};
|
|
419
|
-
MdTextButton.styles = [styles$7, styles$6];
|
|
420
|
-
MdTextButton = __decorate([t$1("md-text-button")], MdTextButton);
|
|
66
|
+
MdFilledTonalButton = __decorate([t("md-filled-tonal-button")], MdFilledTonalButton);
|
|
421
67
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/divider/internal/divider.js
|
|
422
68
|
/**
|
|
423
69
|
* @license
|
|
@@ -427,7 +73,7 @@ MdTextButton = __decorate([t$1("md-text-button")], MdTextButton);
|
|
|
427
73
|
/**
|
|
428
74
|
* A divider component.
|
|
429
75
|
*/
|
|
430
|
-
var Divider = class extends i$
|
|
76
|
+
var Divider = class extends i$1 {
|
|
431
77
|
constructor() {
|
|
432
78
|
super(...arguments);
|
|
433
79
|
/**
|
|
@@ -444,16 +90,16 @@ var Divider = class extends i$2 {
|
|
|
444
90
|
this.insetEnd = false;
|
|
445
91
|
}
|
|
446
92
|
};
|
|
447
|
-
__decorate([n
|
|
93
|
+
__decorate([n({
|
|
448
94
|
type: Boolean,
|
|
449
95
|
reflect: true
|
|
450
96
|
})], Divider.prototype, "inset", void 0);
|
|
451
|
-
__decorate([n
|
|
97
|
+
__decorate([n({
|
|
452
98
|
type: Boolean,
|
|
453
99
|
reflect: true,
|
|
454
100
|
attribute: "inset-start"
|
|
455
101
|
})], Divider.prototype, "insetStart", void 0);
|
|
456
|
-
__decorate([n
|
|
102
|
+
__decorate([n({
|
|
457
103
|
type: Boolean,
|
|
458
104
|
reflect: true,
|
|
459
105
|
attribute: "inset-end"
|
|
@@ -464,9 +110,9 @@ __decorate([n$2({
|
|
|
464
110
|
* Copyright 2026 Google LLC
|
|
465
111
|
* SPDX-License-Identifier: Apache-2.0
|
|
466
112
|
*/
|
|
467
|
-
var styles$
|
|
113
|
+
var styles$1 = i`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
|
|
468
114
|
`;
|
|
469
|
-
styles$
|
|
115
|
+
styles$1.styleSheet;
|
|
470
116
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/divider/divider.js
|
|
471
117
|
/**
|
|
472
118
|
* @license
|
|
@@ -484,42 +130,8 @@ styles$5.styleSheet;
|
|
|
484
130
|
* @suppress {visibility}
|
|
485
131
|
*/
|
|
486
132
|
var MdDivider = class MdDivider extends Divider {};
|
|
487
|
-
MdDivider.styles = [styles$
|
|
488
|
-
MdDivider = __decorate([t
|
|
489
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/redispatch-event.js
|
|
490
|
-
/**
|
|
491
|
-
* @license
|
|
492
|
-
* Copyright 2021 Google LLC
|
|
493
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
494
|
-
*/
|
|
495
|
-
/**
|
|
496
|
-
* Re-dispatches an event from the provided element.
|
|
497
|
-
*
|
|
498
|
-
* This function is useful for forwarding non-composed events, such as `change`
|
|
499
|
-
* events.
|
|
500
|
-
*
|
|
501
|
-
* @example
|
|
502
|
-
* class MyInput extends LitElement {
|
|
503
|
-
* render() {
|
|
504
|
-
* return html`<input @change=${this.redispatchEvent}>`;
|
|
505
|
-
* }
|
|
506
|
-
*
|
|
507
|
-
* protected redispatchEvent(event: Event) {
|
|
508
|
-
* redispatchEvent(this, event);
|
|
509
|
-
* }
|
|
510
|
-
* }
|
|
511
|
-
*
|
|
512
|
-
* @param element The element to dispatch the event from.
|
|
513
|
-
* @param event The event to re-dispatch.
|
|
514
|
-
* @return Whether or not the event was dispatched (if cancelable).
|
|
515
|
-
*/
|
|
516
|
-
function redispatchEvent(element, event) {
|
|
517
|
-
if (event.bubbles && (!element.shadowRoot || event.composed)) event.stopPropagation();
|
|
518
|
-
const copy = Reflect.construct(event.constructor, [event.type, event]);
|
|
519
|
-
const dispatched = element.dispatchEvent(copy);
|
|
520
|
-
if (!dispatched) event.preventDefault();
|
|
521
|
-
return dispatched;
|
|
522
|
-
}
|
|
133
|
+
MdDivider.styles = [styles$1];
|
|
134
|
+
MdDivider = __decorate([t("md-divider")], MdDivider);
|
|
523
135
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/internal/animations.js
|
|
524
136
|
/**
|
|
525
137
|
* @license
|
|
@@ -628,7 +240,7 @@ var DIALOG_DEFAULT_CLOSE_ANIMATION = {
|
|
|
628
240
|
* Copyright 2023 Google LLC
|
|
629
241
|
* SPDX-License-Identifier: Apache-2.0
|
|
630
242
|
*/
|
|
631
|
-
var dialogBaseClass = mixinDelegatesAria(i$
|
|
243
|
+
var dialogBaseClass = mixinDelegatesAria(i$1);
|
|
632
244
|
/**
|
|
633
245
|
* A dialog component.
|
|
634
246
|
*
|
|
@@ -800,7 +412,7 @@ var Dialog = class extends dialogBaseClass {
|
|
|
800
412
|
return T`
|
|
801
413
|
<div class="scrim"></div>
|
|
802
414
|
<dialog
|
|
803
|
-
class=${e
|
|
415
|
+
class=${e(classes)}
|
|
804
416
|
aria-label=${ariaLabel || A}
|
|
805
417
|
aria-labelledby=${this.hasHeadline ? "headline" : A}
|
|
806
418
|
role=${this.type === "alert" ? "alertdialog" : A}
|
|
@@ -963,29 +575,29 @@ var Dialog = class extends dialogBaseClass {
|
|
|
963
575
|
return [firstFocusableChild, lastFocusableChild];
|
|
964
576
|
}
|
|
965
577
|
};
|
|
966
|
-
__decorate([n
|
|
967
|
-
__decorate([n
|
|
968
|
-
__decorate([n
|
|
969
|
-
__decorate([n
|
|
970
|
-
__decorate([n
|
|
578
|
+
__decorate([n({ type: Boolean })], Dialog.prototype, "open", null);
|
|
579
|
+
__decorate([n({ type: Boolean })], Dialog.prototype, "quick", void 0);
|
|
580
|
+
__decorate([n({ attribute: false })], Dialog.prototype, "returnValue", void 0);
|
|
581
|
+
__decorate([n()], Dialog.prototype, "type", void 0);
|
|
582
|
+
__decorate([n({
|
|
971
583
|
type: Boolean,
|
|
972
584
|
attribute: "no-focus-trap"
|
|
973
585
|
})], Dialog.prototype, "noFocusTrap", void 0);
|
|
974
|
-
__decorate([e$
|
|
975
|
-
__decorate([e$
|
|
976
|
-
__decorate([e$
|
|
977
|
-
__decorate([e$
|
|
978
|
-
__decorate([e$
|
|
979
|
-
__decorate([e$
|
|
980
|
-
__decorate([r
|
|
981
|
-
__decorate([r
|
|
982
|
-
__decorate([e$
|
|
983
|
-
__decorate([e$
|
|
984
|
-
__decorate([e$
|
|
985
|
-
__decorate([e$
|
|
986
|
-
__decorate([r
|
|
987
|
-
__decorate([r
|
|
988
|
-
__decorate([r
|
|
586
|
+
__decorate([e$1("dialog")], Dialog.prototype, "dialog", void 0);
|
|
587
|
+
__decorate([e$1(".scrim")], Dialog.prototype, "scrim", void 0);
|
|
588
|
+
__decorate([e$1(".container")], Dialog.prototype, "container", void 0);
|
|
589
|
+
__decorate([e$1(".headline")], Dialog.prototype, "headline", void 0);
|
|
590
|
+
__decorate([e$1(".content")], Dialog.prototype, "content", void 0);
|
|
591
|
+
__decorate([e$1(".actions")], Dialog.prototype, "actions", void 0);
|
|
592
|
+
__decorate([r()], Dialog.prototype, "isAtScrollTop", void 0);
|
|
593
|
+
__decorate([r()], Dialog.prototype, "isAtScrollBottom", void 0);
|
|
594
|
+
__decorate([e$1(".scroller")], Dialog.prototype, "scroller", void 0);
|
|
595
|
+
__decorate([e$1(".top.anchor")], Dialog.prototype, "topAnchor", void 0);
|
|
596
|
+
__decorate([e$1(".bottom.anchor")], Dialog.prototype, "bottomAnchor", void 0);
|
|
597
|
+
__decorate([e$1(".focus-trap")], Dialog.prototype, "firstFocusTrap", void 0);
|
|
598
|
+
__decorate([r()], Dialog.prototype, "hasHeadline", void 0);
|
|
599
|
+
__decorate([r()], Dialog.prototype, "hasActions", void 0);
|
|
600
|
+
__decorate([r()], Dialog.prototype, "hasIcon", void 0);
|
|
989
601
|
function isFocusable(element) {
|
|
990
602
|
const knownFocusableElements = ":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])";
|
|
991
603
|
const notDisabled = ":not(:disabled,[disabled])";
|
|
@@ -1000,9 +612,9 @@ function isFocusable(element) {
|
|
|
1000
612
|
* Copyright 2026 Google LLC
|
|
1001
613
|
* SPDX-License-Identifier: Apache-2.0
|
|
1002
614
|
*/
|
|
1003
|
-
var styles
|
|
615
|
+
var styles = i`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
|
|
1004
616
|
`;
|
|
1005
|
-
styles
|
|
617
|
+
styles.styleSheet;
|
|
1006
618
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/dialog.js
|
|
1007
619
|
/**
|
|
1008
620
|
* @license
|
|
@@ -1037,8 +649,8 @@ styles$4.styleSheet;
|
|
|
1037
649
|
* @suppress {visibility}
|
|
1038
650
|
*/
|
|
1039
651
|
var MdDialog = class MdDialog extends Dialog {};
|
|
1040
|
-
MdDialog.styles = [styles
|
|
1041
|
-
MdDialog = __decorate([t
|
|
652
|
+
MdDialog.styles = [styles];
|
|
653
|
+
MdDialog = __decorate([t("md-dialog")], MdDialog);
|
|
1042
654
|
// src/lib/components/SpeechLog/ClearSpeechDialog.svelte
|
|
1043
655
|
function ClearSpeechDialog($$renderer, $$props) {
|
|
1044
656
|
$$renderer.component(($$renderer) => {
|
|
@@ -1064,1476 +676,6 @@ function DeleteSessionDialog($$renderer, $$props) {
|
|
|
1064
676
|
$$renderer.push(`<!--]--></div> <div slot="actions"><md-text-button type="button">Cancel</md-text-button> <md-text-button type="button"${attr("disabled", busy, true)}>Delete</md-text-button></div></md-dialog>`);
|
|
1065
677
|
});
|
|
1066
678
|
}
|
|
1067
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/internal/field.js
|
|
1068
|
-
/**
|
|
1069
|
-
* @license
|
|
1070
|
-
* Copyright 2021 Google LLC
|
|
1071
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1072
|
-
*/
|
|
1073
|
-
/**
|
|
1074
|
-
* A field component.
|
|
1075
|
-
*/
|
|
1076
|
-
var Field = class extends i$2 {
|
|
1077
|
-
constructor() {
|
|
1078
|
-
super(...arguments);
|
|
1079
|
-
this.disabled = false;
|
|
1080
|
-
this.error = false;
|
|
1081
|
-
this.focused = false;
|
|
1082
|
-
this.label = "";
|
|
1083
|
-
this.noAsterisk = false;
|
|
1084
|
-
this.populated = false;
|
|
1085
|
-
this.required = false;
|
|
1086
|
-
this.resizable = false;
|
|
1087
|
-
this.supportingText = "";
|
|
1088
|
-
this.errorText = "";
|
|
1089
|
-
this.count = -1;
|
|
1090
|
-
this.max = -1;
|
|
1091
|
-
/**
|
|
1092
|
-
* Whether or not the field has leading content.
|
|
1093
|
-
*/
|
|
1094
|
-
this.hasStart = false;
|
|
1095
|
-
/**
|
|
1096
|
-
* Whether or not the field has trailing content.
|
|
1097
|
-
*/
|
|
1098
|
-
this.hasEnd = false;
|
|
1099
|
-
this.isAnimating = false;
|
|
1100
|
-
/**
|
|
1101
|
-
* When set to true, the error text's `role="alert"` will be removed, then
|
|
1102
|
-
* re-added after an animation frame. This will re-announce an error message
|
|
1103
|
-
* to screen readers.
|
|
1104
|
-
*/
|
|
1105
|
-
this.refreshErrorAlert = false;
|
|
1106
|
-
this.disableTransitions = false;
|
|
1107
|
-
}
|
|
1108
|
-
get counterText() {
|
|
1109
|
-
const countAsNumber = this.count ?? -1;
|
|
1110
|
-
const maxAsNumber = this.max ?? -1;
|
|
1111
|
-
if (countAsNumber < 0 || maxAsNumber <= 0) return "";
|
|
1112
|
-
return `${countAsNumber} / ${maxAsNumber}`;
|
|
1113
|
-
}
|
|
1114
|
-
get supportingOrErrorText() {
|
|
1115
|
-
return this.error && this.errorText ? this.errorText : this.supportingText;
|
|
1116
|
-
}
|
|
1117
|
-
/**
|
|
1118
|
-
* Re-announces the field's error supporting text to screen readers.
|
|
1119
|
-
*
|
|
1120
|
-
* Error text announces to screen readers anytime it is visible and changes.
|
|
1121
|
-
* Use the method to re-announce the message when the text has not changed,
|
|
1122
|
-
* but announcement is still needed (such as for `reportValidity()`).
|
|
1123
|
-
*/
|
|
1124
|
-
reannounceError() {
|
|
1125
|
-
this.refreshErrorAlert = true;
|
|
1126
|
-
}
|
|
1127
|
-
update(props) {
|
|
1128
|
-
if (props.has("disabled") && props.get("disabled") !== void 0) this.disableTransitions = true;
|
|
1129
|
-
if (this.disabled && this.focused) {
|
|
1130
|
-
props.set("focused", true);
|
|
1131
|
-
this.focused = false;
|
|
1132
|
-
}
|
|
1133
|
-
this.animateLabelIfNeeded({
|
|
1134
|
-
wasFocused: props.get("focused"),
|
|
1135
|
-
wasPopulated: props.get("populated")
|
|
1136
|
-
});
|
|
1137
|
-
super.update(props);
|
|
1138
|
-
}
|
|
1139
|
-
render() {
|
|
1140
|
-
const floatingLabel = this.renderLabel(true);
|
|
1141
|
-
const restingLabel = this.renderLabel(false);
|
|
1142
|
-
const outline = this.renderOutline?.(floatingLabel);
|
|
1143
|
-
const classes = {
|
|
1144
|
-
"disabled": this.disabled,
|
|
1145
|
-
"disable-transitions": this.disableTransitions,
|
|
1146
|
-
"error": this.error && !this.disabled,
|
|
1147
|
-
"focused": this.focused,
|
|
1148
|
-
"with-start": this.hasStart,
|
|
1149
|
-
"with-end": this.hasEnd,
|
|
1150
|
-
"populated": this.populated,
|
|
1151
|
-
"resizable": this.resizable,
|
|
1152
|
-
"required": this.required,
|
|
1153
|
-
"no-label": !this.label
|
|
1154
|
-
};
|
|
1155
|
-
return T`
|
|
1156
|
-
<div class="field ${e$3(classes)}">
|
|
1157
|
-
<div class="container-overflow">
|
|
1158
|
-
${this.renderBackground?.()}
|
|
1159
|
-
<slot name="container"></slot>
|
|
1160
|
-
${this.renderStateLayer?.()} ${this.renderIndicator?.()} ${outline}
|
|
1161
|
-
<div class="container">
|
|
1162
|
-
<div class="start">
|
|
1163
|
-
<slot name="start"></slot>
|
|
1164
|
-
</div>
|
|
1165
|
-
<div class="middle">
|
|
1166
|
-
<div class="label-wrapper">
|
|
1167
|
-
${restingLabel} ${outline ? A : floatingLabel}
|
|
1168
|
-
</div>
|
|
1169
|
-
<div class="content">
|
|
1170
|
-
<slot></slot>
|
|
1171
|
-
</div>
|
|
1172
|
-
</div>
|
|
1173
|
-
<div class="end">
|
|
1174
|
-
<slot name="end"></slot>
|
|
1175
|
-
</div>
|
|
1176
|
-
</div>
|
|
1177
|
-
</div>
|
|
1178
|
-
${this.renderSupportingText()}
|
|
1179
|
-
</div>
|
|
1180
|
-
`;
|
|
1181
|
-
}
|
|
1182
|
-
updated(changed) {
|
|
1183
|
-
if (changed.has("supportingText") || changed.has("errorText") || changed.has("count") || changed.has("max")) this.updateSlottedAriaDescribedBy();
|
|
1184
|
-
if (this.refreshErrorAlert) requestAnimationFrame(() => {
|
|
1185
|
-
this.refreshErrorAlert = false;
|
|
1186
|
-
});
|
|
1187
|
-
if (this.disableTransitions) requestAnimationFrame(() => {
|
|
1188
|
-
this.disableTransitions = false;
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
renderSupportingText() {
|
|
1192
|
-
const { supportingOrErrorText, counterText } = this;
|
|
1193
|
-
if (!supportingOrErrorText && !counterText) return A;
|
|
1194
|
-
const start = T`<span>${supportingOrErrorText}</span>`;
|
|
1195
|
-
const end = counterText ? T`<span class="counter">${counterText}</span>` : A;
|
|
1196
|
-
const role = this.error && this.errorText && !this.refreshErrorAlert ? "alert" : A;
|
|
1197
|
-
return T`
|
|
1198
|
-
<div class="supporting-text" role=${role}>${start}${end}</div>
|
|
1199
|
-
<slot
|
|
1200
|
-
name="aria-describedby"
|
|
1201
|
-
@slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
1202
|
-
`;
|
|
1203
|
-
}
|
|
1204
|
-
updateSlottedAriaDescribedBy() {
|
|
1205
|
-
for (const element of this.slottedAriaDescribedBy) {
|
|
1206
|
-
B(T`${this.supportingOrErrorText} ${this.counterText}`, element);
|
|
1207
|
-
element.setAttribute("hidden", "");
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
renderLabel(isFloating) {
|
|
1211
|
-
if (!this.label) return A;
|
|
1212
|
-
let visible;
|
|
1213
|
-
if (isFloating) visible = this.focused || this.populated || this.isAnimating;
|
|
1214
|
-
else visible = !this.focused && !this.populated && !this.isAnimating;
|
|
1215
|
-
const classes = {
|
|
1216
|
-
"hidden": !visible,
|
|
1217
|
-
"floating": isFloating,
|
|
1218
|
-
"resting": !isFloating
|
|
1219
|
-
};
|
|
1220
|
-
const labelText = `${this.label}${this.required && !this.noAsterisk ? "*" : ""}`;
|
|
1221
|
-
return T`
|
|
1222
|
-
<span class="label ${e$3(classes)}" aria-hidden=${!visible}
|
|
1223
|
-
>${labelText}</span
|
|
1224
|
-
>
|
|
1225
|
-
`;
|
|
1226
|
-
}
|
|
1227
|
-
animateLabelIfNeeded({ wasFocused, wasPopulated }) {
|
|
1228
|
-
if (!this.label) return;
|
|
1229
|
-
wasFocused ??= this.focused;
|
|
1230
|
-
wasPopulated ??= this.populated;
|
|
1231
|
-
if ((wasFocused || wasPopulated) === (this.focused || this.populated)) return;
|
|
1232
|
-
const keyframes = this.getLabelKeyframes();
|
|
1233
|
-
if (!keyframes.length) return;
|
|
1234
|
-
this.isAnimating = true;
|
|
1235
|
-
this.labelAnimation?.cancel();
|
|
1236
|
-
this.labelAnimation = this.floatingLabelEl?.animate(keyframes, {
|
|
1237
|
-
duration: 150,
|
|
1238
|
-
easing: EASING.STANDARD
|
|
1239
|
-
});
|
|
1240
|
-
this.labelAnimation?.addEventListener("finish", () => {
|
|
1241
|
-
this.isAnimating = false;
|
|
1242
|
-
});
|
|
1243
|
-
}
|
|
1244
|
-
getLabelKeyframes() {
|
|
1245
|
-
const { floatingLabelEl, restingLabelEl } = this;
|
|
1246
|
-
if (!floatingLabelEl || !restingLabelEl) return [];
|
|
1247
|
-
const { x: floatingX, y: floatingY, height: floatingHeight } = floatingLabelEl.getBoundingClientRect();
|
|
1248
|
-
const { x: restingX, y: restingY, height: restingHeight } = restingLabelEl.getBoundingClientRect();
|
|
1249
|
-
const floatingScrollWidth = floatingLabelEl.scrollWidth;
|
|
1250
|
-
const restingScrollWidth = restingLabelEl.scrollWidth;
|
|
1251
|
-
if (floatingScrollWidth === 0 || restingScrollWidth === 0) return [];
|
|
1252
|
-
const scale = restingScrollWidth / floatingScrollWidth;
|
|
1253
|
-
const restTransform = `translateX(${restingX - floatingX}px) translateY(${restingY - floatingY + Math.round((restingHeight - floatingHeight * scale) / 2)}px) scale(${scale})`;
|
|
1254
|
-
const floatTransform = `translateX(0) translateY(0) scale(1)`;
|
|
1255
|
-
const restingClientWidth = restingLabelEl.clientWidth;
|
|
1256
|
-
const width = restingScrollWidth > restingClientWidth ? `${restingClientWidth / scale}px` : "";
|
|
1257
|
-
if (this.focused || this.populated) return [{
|
|
1258
|
-
transform: restTransform,
|
|
1259
|
-
width
|
|
1260
|
-
}, {
|
|
1261
|
-
transform: floatTransform,
|
|
1262
|
-
width
|
|
1263
|
-
}];
|
|
1264
|
-
return [{
|
|
1265
|
-
transform: floatTransform,
|
|
1266
|
-
width
|
|
1267
|
-
}, {
|
|
1268
|
-
transform: restTransform,
|
|
1269
|
-
width
|
|
1270
|
-
}];
|
|
1271
|
-
}
|
|
1272
|
-
getSurfacePositionClientRect() {
|
|
1273
|
-
return this.containerEl.getBoundingClientRect();
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "disabled", void 0);
|
|
1277
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "error", void 0);
|
|
1278
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "focused", void 0);
|
|
1279
|
-
__decorate([n$2()], Field.prototype, "label", void 0);
|
|
1280
|
-
__decorate([n$2({
|
|
1281
|
-
type: Boolean,
|
|
1282
|
-
attribute: "no-asterisk"
|
|
1283
|
-
})], Field.prototype, "noAsterisk", void 0);
|
|
1284
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "populated", void 0);
|
|
1285
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "required", void 0);
|
|
1286
|
-
__decorate([n$2({ type: Boolean })], Field.prototype, "resizable", void 0);
|
|
1287
|
-
__decorate([n$2({ attribute: "supporting-text" })], Field.prototype, "supportingText", void 0);
|
|
1288
|
-
__decorate([n$2({ attribute: "error-text" })], Field.prototype, "errorText", void 0);
|
|
1289
|
-
__decorate([n$2({ type: Number })], Field.prototype, "count", void 0);
|
|
1290
|
-
__decorate([n$2({ type: Number })], Field.prototype, "max", void 0);
|
|
1291
|
-
__decorate([n$2({
|
|
1292
|
-
type: Boolean,
|
|
1293
|
-
attribute: "has-start"
|
|
1294
|
-
})], Field.prototype, "hasStart", void 0);
|
|
1295
|
-
__decorate([n$2({
|
|
1296
|
-
type: Boolean,
|
|
1297
|
-
attribute: "has-end"
|
|
1298
|
-
})], Field.prototype, "hasEnd", void 0);
|
|
1299
|
-
__decorate([o$1({ slot: "aria-describedby" })], Field.prototype, "slottedAriaDescribedBy", void 0);
|
|
1300
|
-
__decorate([r$1()], Field.prototype, "isAnimating", void 0);
|
|
1301
|
-
__decorate([r$1()], Field.prototype, "refreshErrorAlert", void 0);
|
|
1302
|
-
__decorate([r$1()], Field.prototype, "disableTransitions", void 0);
|
|
1303
|
-
__decorate([e$2(".label.floating")], Field.prototype, "floatingLabelEl", void 0);
|
|
1304
|
-
__decorate([e$2(".label.resting")], Field.prototype, "restingLabelEl", void 0);
|
|
1305
|
-
__decorate([e$2(".container")], Field.prototype, "containerEl", void 0);
|
|
1306
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/internal/outlined-field.js
|
|
1307
|
-
/**
|
|
1308
|
-
* @license
|
|
1309
|
-
* Copyright 2021 Google LLC
|
|
1310
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1311
|
-
*/
|
|
1312
|
-
/**
|
|
1313
|
-
* An outlined field component.
|
|
1314
|
-
*/
|
|
1315
|
-
var OutlinedField = class extends Field {
|
|
1316
|
-
renderOutline(floatingLabel) {
|
|
1317
|
-
return T`
|
|
1318
|
-
<div class="outline">
|
|
1319
|
-
<div class="outline-start"></div>
|
|
1320
|
-
<div class="outline-notch">
|
|
1321
|
-
<div class="outline-panel-inactive"></div>
|
|
1322
|
-
<div class="outline-panel-active"></div>
|
|
1323
|
-
<div class="outline-label">${floatingLabel}</div>
|
|
1324
|
-
</div>
|
|
1325
|
-
<div class="outline-end"></div>
|
|
1326
|
-
</div>
|
|
1327
|
-
`;
|
|
1328
|
-
}
|
|
1329
|
-
};
|
|
1330
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/internal/outlined-styles.cssresult.js
|
|
1331
|
-
/**
|
|
1332
|
-
* @license
|
|
1333
|
-
* Copyright 2026 Google LLC
|
|
1334
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1335
|
-
*/
|
|
1336
|
-
var styles$3 = i$3`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-outlined-field-content-space, 16px);--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_with-leading-content-leading-space: var(--md-outlined-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-outlined-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
|
|
1337
|
-
`;
|
|
1338
|
-
styles$3.styleSheet;
|
|
1339
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/internal/shared-styles.cssresult.js
|
|
1340
|
-
/**
|
|
1341
|
-
* @license
|
|
1342
|
-
* Copyright 2026 Google LLC
|
|
1343
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1344
|
-
*/
|
|
1345
|
-
var styles$2 = i$3`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}slot[name=container]{border-radius:inherit}slot[name=container]::slotted(*){border-radius:inherit;inset:0;pointer-events:none;position:absolute}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
|
|
1346
|
-
`;
|
|
1347
|
-
styles$2.styleSheet;
|
|
1348
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/outlined-field.js
|
|
1349
|
-
/**
|
|
1350
|
-
* @license
|
|
1351
|
-
* Copyright 2021 Google LLC
|
|
1352
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1353
|
-
*/
|
|
1354
|
-
/**
|
|
1355
|
-
* TODO(b/228525797): add docs
|
|
1356
|
-
* @final
|
|
1357
|
-
* @suppress {visibility}
|
|
1358
|
-
*/
|
|
1359
|
-
var MdOutlinedField = class MdOutlinedField extends OutlinedField {};
|
|
1360
|
-
MdOutlinedField.styles = [styles$2, styles$3];
|
|
1361
|
-
MdOutlinedField = __decorate([t$1("md-outlined-field")], MdOutlinedField);
|
|
1362
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/textfield/internal/outlined-styles.cssresult.js
|
|
1363
|
-
/**
|
|
1364
|
-
* @license
|
|
1365
|
-
* Copyright 2026 Google LLC
|
|
1366
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1367
|
-
*/
|
|
1368
|
-
var styles$1 = i$3`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-space: var(--_icon-input-space);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
|
|
1369
|
-
`;
|
|
1370
|
-
styles$1.styleSheet;
|
|
1371
|
-
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directive-helpers.js
|
|
1372
|
-
/**
|
|
1373
|
-
* @license
|
|
1374
|
-
* Copyright 2020 Google LLC
|
|
1375
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1376
|
-
*/ var { I: t } = Z, r = (o) => void 0 === o.strings, m = {}, p = (o, t = m) => o._$AH = t;
|
|
1377
|
-
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directives/live.js
|
|
1378
|
-
/**
|
|
1379
|
-
* @license
|
|
1380
|
-
* Copyright 2020 Google LLC
|
|
1381
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1382
|
-
*/ var l = e$4(class extends i$4 {
|
|
1383
|
-
constructor(r$2) {
|
|
1384
|
-
if (super(r$2), r$2.type !== t$2.PROPERTY && r$2.type !== t$2.ATTRIBUTE && r$2.type !== t$2.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
1385
|
-
if (!r(r$2)) throw Error("`live` bindings can only contain a single expression");
|
|
1386
|
-
}
|
|
1387
|
-
render(r) {
|
|
1388
|
-
return r;
|
|
1389
|
-
}
|
|
1390
|
-
update(i, [t]) {
|
|
1391
|
-
if (t === E || t === A) return t;
|
|
1392
|
-
const o = i.element, l = i.name;
|
|
1393
|
-
if (i.type === t$2.PROPERTY) {
|
|
1394
|
-
if (t === o[l]) return E;
|
|
1395
|
-
} else if (i.type === t$2.BOOLEAN_ATTRIBUTE) {
|
|
1396
|
-
if (!!t === o.hasAttribute(l)) return E;
|
|
1397
|
-
} else if (i.type === t$2.ATTRIBUTE && o.getAttribute(l) === t + "") return E;
|
|
1398
|
-
return p(i), t;
|
|
1399
|
-
}
|
|
1400
|
-
});
|
|
1401
|
-
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directives/style-map.js
|
|
1402
|
-
/**
|
|
1403
|
-
* @license
|
|
1404
|
-
* Copyright 2018 Google LLC
|
|
1405
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1406
|
-
*/ var n = "important";
|
|
1407
|
-
var i = " !" + n;
|
|
1408
|
-
var o = e$4(class extends i$4 {
|
|
1409
|
-
constructor(t) {
|
|
1410
|
-
if (super(t), t.type !== t$2.ATTRIBUTE || "style" !== t.name || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
1411
|
-
}
|
|
1412
|
-
render(t) {
|
|
1413
|
-
return Object.keys(t).reduce((e, r) => {
|
|
1414
|
-
const s = t[r];
|
|
1415
|
-
return null == s ? e : e + `${r = r.includes("-") ? r : r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
|
|
1416
|
-
}, "");
|
|
1417
|
-
}
|
|
1418
|
-
update(e, [r]) {
|
|
1419
|
-
const { style: s } = e.element;
|
|
1420
|
-
if (void 0 === this.ft) return this.ft = new Set(Object.keys(r)), this.render(r);
|
|
1421
|
-
for (const t of this.ft) r[t] ?? (this.ft.delete(t), t.includes("-") ? s.removeProperty(t) : s[t] = null);
|
|
1422
|
-
for (const t in r) {
|
|
1423
|
-
const e = r[t];
|
|
1424
|
-
if (null != e) {
|
|
1425
|
-
this.ft.add(t);
|
|
1426
|
-
const r = "string" == typeof e && e.endsWith(i);
|
|
1427
|
-
t.includes("-") || r ? s.setProperty(t, r ? e.slice(0, -11) : e, r ? n : "") : s[t] = e;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
return E;
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/controller/string-converter.js
|
|
1434
|
-
/**
|
|
1435
|
-
* @license
|
|
1436
|
-
* Copyright 2022 Google LLC
|
|
1437
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1438
|
-
*/
|
|
1439
|
-
var stringConverter = {
|
|
1440
|
-
fromAttribute(value) {
|
|
1441
|
-
return value ?? "";
|
|
1442
|
-
},
|
|
1443
|
-
toAttribute(value) {
|
|
1444
|
-
return value || null;
|
|
1445
|
-
}
|
|
1446
|
-
};
|
|
1447
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/constraint-validation.js
|
|
1448
|
-
/**
|
|
1449
|
-
* @license
|
|
1450
|
-
* Copyright 2023 Google LLC
|
|
1451
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1452
|
-
*/
|
|
1453
|
-
/**
|
|
1454
|
-
* A symbol property used to create a constraint validation `Validator`.
|
|
1455
|
-
* Required for all `mixinConstraintValidation()` elements.
|
|
1456
|
-
*/
|
|
1457
|
-
var createValidator = Symbol("createValidator");
|
|
1458
|
-
/**
|
|
1459
|
-
* A symbol property used to return an anchor for constraint validation popups.
|
|
1460
|
-
* Required for all `mixinConstraintValidation()` elements.
|
|
1461
|
-
*/
|
|
1462
|
-
var getValidityAnchor = Symbol("getValidityAnchor");
|
|
1463
|
-
var privateSyncValidity = Symbol("privateSyncValidity");
|
|
1464
|
-
var privateCustomValidationMessage = Symbol("privateCustomValidationMessage");
|
|
1465
|
-
/**
|
|
1466
|
-
* Mixes in constraint validation APIs for an element.
|
|
1467
|
-
*
|
|
1468
|
-
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation
|
|
1469
|
-
* for more details.
|
|
1470
|
-
*
|
|
1471
|
-
* Implementations must provide a validator to cache and compute its validity,
|
|
1472
|
-
* along with a shadow root element to anchor validation popups to.
|
|
1473
|
-
*
|
|
1474
|
-
* @example
|
|
1475
|
-
* ```ts
|
|
1476
|
-
* const baseClass = mixinConstraintValidation(
|
|
1477
|
-
* mixinFormAssociated(mixinElementInternals(LitElement))
|
|
1478
|
-
* );
|
|
1479
|
-
*
|
|
1480
|
-
* class MyCheckbox extends baseClass {
|
|
1481
|
-
* \@property({type: Boolean}) checked = false;
|
|
1482
|
-
* \@property({type: Boolean}) required = false;
|
|
1483
|
-
*
|
|
1484
|
-
* [createValidator]() {
|
|
1485
|
-
* return new CheckboxValidator(() => this);
|
|
1486
|
-
* }
|
|
1487
|
-
*
|
|
1488
|
-
* [getValidityAnchor]() {
|
|
1489
|
-
* return this.renderRoot.querySelector('.root');
|
|
1490
|
-
* }
|
|
1491
|
-
* }
|
|
1492
|
-
* ```
|
|
1493
|
-
*
|
|
1494
|
-
* @param base The class to mix functionality into.
|
|
1495
|
-
* @return The provided class with `ConstraintValidation` mixed in.
|
|
1496
|
-
*/
|
|
1497
|
-
function mixinConstraintValidation(base) {
|
|
1498
|
-
var _a;
|
|
1499
|
-
class ConstraintValidationElement extends base {
|
|
1500
|
-
constructor() {
|
|
1501
|
-
super(...arguments);
|
|
1502
|
-
/**
|
|
1503
|
-
* Needed for Safari, see https://bugs.webkit.org/show_bug.cgi?id=261432
|
|
1504
|
-
* Replace with this[internals].validity.customError when resolved.
|
|
1505
|
-
*/
|
|
1506
|
-
this[_a] = "";
|
|
1507
|
-
}
|
|
1508
|
-
get validity() {
|
|
1509
|
-
this[privateSyncValidity]();
|
|
1510
|
-
return this[internals].validity;
|
|
1511
|
-
}
|
|
1512
|
-
get validationMessage() {
|
|
1513
|
-
this[privateSyncValidity]();
|
|
1514
|
-
return this[internals].validationMessage;
|
|
1515
|
-
}
|
|
1516
|
-
get willValidate() {
|
|
1517
|
-
this[privateSyncValidity]();
|
|
1518
|
-
return this[internals].willValidate;
|
|
1519
|
-
}
|
|
1520
|
-
checkValidity() {
|
|
1521
|
-
this[privateSyncValidity]();
|
|
1522
|
-
return this[internals].checkValidity();
|
|
1523
|
-
}
|
|
1524
|
-
reportValidity() {
|
|
1525
|
-
this[privateSyncValidity]();
|
|
1526
|
-
return this[internals].reportValidity();
|
|
1527
|
-
}
|
|
1528
|
-
setCustomValidity(error) {
|
|
1529
|
-
this[privateCustomValidationMessage] = error;
|
|
1530
|
-
this[privateSyncValidity]();
|
|
1531
|
-
}
|
|
1532
|
-
requestUpdate(name, oldValue, options) {
|
|
1533
|
-
super.requestUpdate(name, oldValue, options);
|
|
1534
|
-
this[privateSyncValidity]();
|
|
1535
|
-
}
|
|
1536
|
-
firstUpdated(changed) {
|
|
1537
|
-
super.firstUpdated(changed);
|
|
1538
|
-
this[privateSyncValidity]();
|
|
1539
|
-
}
|
|
1540
|
-
[(_a = privateCustomValidationMessage, privateSyncValidity)]() {}
|
|
1541
|
-
[createValidator]() {
|
|
1542
|
-
throw new Error("Implement [createValidator]");
|
|
1543
|
-
}
|
|
1544
|
-
[getValidityAnchor]() {
|
|
1545
|
-
throw new Error("Implement [getValidityAnchor]");
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
return ConstraintValidationElement;
|
|
1549
|
-
}
|
|
1550
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/on-report-validity.js
|
|
1551
|
-
/**
|
|
1552
|
-
* @license
|
|
1553
|
-
* Copyright 2023 Google LLC
|
|
1554
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1555
|
-
*/
|
|
1556
|
-
/**
|
|
1557
|
-
* A symbol property used for a callback when validity has been reported.
|
|
1558
|
-
*/
|
|
1559
|
-
var onReportValidity = Symbol("onReportValidity");
|
|
1560
|
-
var privateCleanupFormListeners = Symbol("privateCleanupFormListeners");
|
|
1561
|
-
var privateDoNotReportInvalid = Symbol("privateDoNotReportInvalid");
|
|
1562
|
-
var privateIsSelfReportingValidity = Symbol("privateIsSelfReportingValidity");
|
|
1563
|
-
var privateCallOnReportValidity = Symbol("privateCallOnReportValidity");
|
|
1564
|
-
/**
|
|
1565
|
-
* Mixes in a callback for constraint validation when validity should be
|
|
1566
|
-
* styled and reported to the user.
|
|
1567
|
-
*
|
|
1568
|
-
* This is commonly used in text-field-like controls that display error styles
|
|
1569
|
-
* and error messages.
|
|
1570
|
-
*
|
|
1571
|
-
* @example
|
|
1572
|
-
* ```ts
|
|
1573
|
-
* const baseClass = mixinOnReportValidity(
|
|
1574
|
-
* mixinConstraintValidation(
|
|
1575
|
-
* mixinFormAssociated(mixinElementInternals(LitElement)),
|
|
1576
|
-
* ),
|
|
1577
|
-
* );
|
|
1578
|
-
*
|
|
1579
|
-
* class MyField extends baseClass {
|
|
1580
|
-
* \@property({type: Boolean}) error = false;
|
|
1581
|
-
* \@property() errorMessage = '';
|
|
1582
|
-
*
|
|
1583
|
-
* [onReportValidity](invalidEvent: Event | null) {
|
|
1584
|
-
* this.error = !!invalidEvent;
|
|
1585
|
-
* this.errorMessage = this.validationMessage;
|
|
1586
|
-
*
|
|
1587
|
-
* // Optionally prevent platform popup from displaying
|
|
1588
|
-
* invalidEvent?.preventDefault();
|
|
1589
|
-
* }
|
|
1590
|
-
* }
|
|
1591
|
-
* ```
|
|
1592
|
-
*
|
|
1593
|
-
* @param base The class to mix functionality into.
|
|
1594
|
-
* @return The provided class with `OnReportValidity` mixed in.
|
|
1595
|
-
*/
|
|
1596
|
-
function mixinOnReportValidity(base) {
|
|
1597
|
-
var _a, _b, _c;
|
|
1598
|
-
class OnReportValidityElement extends base {
|
|
1599
|
-
constructor(...args) {
|
|
1600
|
-
super(...args);
|
|
1601
|
-
/**
|
|
1602
|
-
* Used to clean up event listeners when a new form is associated.
|
|
1603
|
-
*/
|
|
1604
|
-
this[_a] = new AbortController();
|
|
1605
|
-
/**
|
|
1606
|
-
* Used to determine if an invalid event should report validity. Invalid
|
|
1607
|
-
* events from `checkValidity()` do not trigger reporting.
|
|
1608
|
-
*/
|
|
1609
|
-
this[_b] = false;
|
|
1610
|
-
/**
|
|
1611
|
-
* Used to determine if the control is reporting validity from itself, or
|
|
1612
|
-
* if a `<form>` is causing the validity report. Forms have different
|
|
1613
|
-
* control focusing behavior.
|
|
1614
|
-
*/
|
|
1615
|
-
this[_c] = false;
|
|
1616
|
-
}
|
|
1617
|
-
checkValidity() {
|
|
1618
|
-
this[privateDoNotReportInvalid] = true;
|
|
1619
|
-
const valid = super.checkValidity();
|
|
1620
|
-
this[privateDoNotReportInvalid] = false;
|
|
1621
|
-
return valid;
|
|
1622
|
-
}
|
|
1623
|
-
reportValidity() {
|
|
1624
|
-
this[privateIsSelfReportingValidity] = true;
|
|
1625
|
-
const valid = super.reportValidity();
|
|
1626
|
-
if (valid) this[privateCallOnReportValidity](null);
|
|
1627
|
-
this[privateIsSelfReportingValidity] = false;
|
|
1628
|
-
return valid;
|
|
1629
|
-
}
|
|
1630
|
-
[(_a = privateCleanupFormListeners, _b = privateDoNotReportInvalid, _c = privateIsSelfReportingValidity, privateCallOnReportValidity)](invalidEvent) {
|
|
1631
|
-
const wasCanceled = invalidEvent?.defaultPrevented;
|
|
1632
|
-
if (wasCanceled) return;
|
|
1633
|
-
this[onReportValidity](invalidEvent);
|
|
1634
|
-
if (!(!wasCanceled && invalidEvent?.defaultPrevented)) return;
|
|
1635
|
-
if (this[privateIsSelfReportingValidity] || isFirstInvalidControlInForm(this[internals].form, this)) this.focus();
|
|
1636
|
-
}
|
|
1637
|
-
[onReportValidity](invalidEvent) {
|
|
1638
|
-
throw new Error("Implement [onReportValidity]");
|
|
1639
|
-
}
|
|
1640
|
-
formAssociatedCallback(form) {
|
|
1641
|
-
if (super.formAssociatedCallback) super.formAssociatedCallback(form);
|
|
1642
|
-
this[privateCleanupFormListeners].abort();
|
|
1643
|
-
if (!form) return;
|
|
1644
|
-
this[privateCleanupFormListeners] = new AbortController();
|
|
1645
|
-
addFormReportValidListener(this, form, () => {
|
|
1646
|
-
this[privateCallOnReportValidity](null);
|
|
1647
|
-
}, this[privateCleanupFormListeners].signal);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
return OnReportValidityElement;
|
|
1651
|
-
}
|
|
1652
|
-
/**
|
|
1653
|
-
* Add a listener that fires when a form runs constraint validation on a control
|
|
1654
|
-
* and it is valid. This is needed to clear previously invalid styles.
|
|
1655
|
-
*
|
|
1656
|
-
* @param control The control of the form to listen for valid events.
|
|
1657
|
-
* @param form The control's form that can run constraint validation.
|
|
1658
|
-
* @param onControlValid A listener that is called when the form runs constraint
|
|
1659
|
-
* validation and the control is valid.
|
|
1660
|
-
* @param cleanup A cleanup signal to remove the listener.
|
|
1661
|
-
*/
|
|
1662
|
-
function addFormReportValidListener(control, form, onControlValid, cleanup) {
|
|
1663
|
-
const validateHooks = getFormValidateHooks(form);
|
|
1664
|
-
let controlFiredInvalid = false;
|
|
1665
|
-
let cleanupInvalidListener;
|
|
1666
|
-
let isNextSubmitFromHook = false;
|
|
1667
|
-
validateHooks.addEventListener("before", () => {
|
|
1668
|
-
isNextSubmitFromHook = true;
|
|
1669
|
-
cleanupInvalidListener = new AbortController();
|
|
1670
|
-
controlFiredInvalid = false;
|
|
1671
|
-
control.addEventListener("invalid", () => {
|
|
1672
|
-
controlFiredInvalid = true;
|
|
1673
|
-
}, { signal: cleanupInvalidListener.signal });
|
|
1674
|
-
}, { signal: cleanup });
|
|
1675
|
-
validateHooks.addEventListener("after", () => {
|
|
1676
|
-
isNextSubmitFromHook = false;
|
|
1677
|
-
cleanupInvalidListener?.abort();
|
|
1678
|
-
if (controlFiredInvalid) return;
|
|
1679
|
-
onControlValid();
|
|
1680
|
-
}, { signal: cleanup });
|
|
1681
|
-
form.addEventListener("submit", () => {
|
|
1682
|
-
if (isNextSubmitFromHook) return;
|
|
1683
|
-
onControlValid();
|
|
1684
|
-
}, { signal: cleanup });
|
|
1685
|
-
}
|
|
1686
|
-
var FORM_VALIDATE_HOOKS = /* @__PURE__ */ new WeakMap();
|
|
1687
|
-
/**
|
|
1688
|
-
* Get a hooks `EventTarget` that dispatches 'before' and 'after' events that
|
|
1689
|
-
* fire before a form runs constraint validation and immediately after it
|
|
1690
|
-
* finishes running constraint validation on its controls.
|
|
1691
|
-
*
|
|
1692
|
-
* This happens during `form.reportValidity()` and `form.requestSubmit()`.
|
|
1693
|
-
*
|
|
1694
|
-
* @param form The form to get or set up hooks for.
|
|
1695
|
-
* @return A hooks `EventTarget` to add listeners to.
|
|
1696
|
-
*/
|
|
1697
|
-
function getFormValidateHooks(form) {
|
|
1698
|
-
if (!FORM_VALIDATE_HOOKS.has(form)) {
|
|
1699
|
-
const hooks = new EventTarget();
|
|
1700
|
-
FORM_VALIDATE_HOOKS.set(form, hooks);
|
|
1701
|
-
for (const methodName of ["reportValidity", "requestSubmit"]) {
|
|
1702
|
-
const superMethod = form[methodName];
|
|
1703
|
-
form[methodName] = function() {
|
|
1704
|
-
hooks.dispatchEvent(new Event("before"));
|
|
1705
|
-
const result = Reflect.apply(superMethod, this, arguments);
|
|
1706
|
-
hooks.dispatchEvent(new Event("after"));
|
|
1707
|
-
return result;
|
|
1708
|
-
};
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
return FORM_VALIDATE_HOOKS.get(form);
|
|
1712
|
-
}
|
|
1713
|
-
/**
|
|
1714
|
-
* Checks if a control is the first invalid control in a form.
|
|
1715
|
-
*
|
|
1716
|
-
* @param form The control's form. When `null`, the control doesn't have a form
|
|
1717
|
-
* and the method returns true.
|
|
1718
|
-
* @param control The control to check.
|
|
1719
|
-
* @return True if there is no form or if the control is the form's first
|
|
1720
|
-
* invalid control.
|
|
1721
|
-
*/
|
|
1722
|
-
function isFirstInvalidControlInForm(form, control) {
|
|
1723
|
-
if (!form) return true;
|
|
1724
|
-
let firstInvalidControl;
|
|
1725
|
-
for (const element of form.elements) if (element.matches(":invalid")) {
|
|
1726
|
-
firstInvalidControl = element;
|
|
1727
|
-
break;
|
|
1728
|
-
}
|
|
1729
|
-
return firstInvalidControl === control;
|
|
1730
|
-
}
|
|
1731
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/validators/validator.js
|
|
1732
|
-
/**
|
|
1733
|
-
* @license
|
|
1734
|
-
* Copyright 2023 Google LLC
|
|
1735
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1736
|
-
*/
|
|
1737
|
-
/**
|
|
1738
|
-
* A class that computes and caches `ValidityStateFlags` for a component with
|
|
1739
|
-
* a given `State` interface.
|
|
1740
|
-
*
|
|
1741
|
-
* Cached performance before computing validity is important since constraint
|
|
1742
|
-
* validation must be checked frequently and synchronously when properties
|
|
1743
|
-
* change.
|
|
1744
|
-
*
|
|
1745
|
-
* @template State The expected interface of properties relevant to constraint
|
|
1746
|
-
* validation.
|
|
1747
|
-
*/
|
|
1748
|
-
var Validator = class {
|
|
1749
|
-
/**
|
|
1750
|
-
* Creates a new validator.
|
|
1751
|
-
*
|
|
1752
|
-
* @param getCurrentState A callback that returns the current state of
|
|
1753
|
-
* constraint validation-related properties.
|
|
1754
|
-
*/
|
|
1755
|
-
constructor(getCurrentState) {
|
|
1756
|
-
this.getCurrentState = getCurrentState;
|
|
1757
|
-
/**
|
|
1758
|
-
* The current validity state and message. This is cached and returns if
|
|
1759
|
-
* constraint validation state does not change.
|
|
1760
|
-
*/
|
|
1761
|
-
this.currentValidity = {
|
|
1762
|
-
validity: {},
|
|
1763
|
-
validationMessage: ""
|
|
1764
|
-
};
|
|
1765
|
-
}
|
|
1766
|
-
/**
|
|
1767
|
-
* Returns the current `ValidityStateFlags` and validation message for the
|
|
1768
|
-
* validator.
|
|
1769
|
-
*
|
|
1770
|
-
* If the constraint validation state has not changed, this will return a
|
|
1771
|
-
* cached result. This is important since `getValidity()` can be called
|
|
1772
|
-
* frequently in response to synchronous property changes.
|
|
1773
|
-
*
|
|
1774
|
-
* @return The current validity and validation message.
|
|
1775
|
-
*/
|
|
1776
|
-
getValidity() {
|
|
1777
|
-
const state = this.getCurrentState();
|
|
1778
|
-
if (!(!this.prevState || !this.equals(this.prevState, state))) return this.currentValidity;
|
|
1779
|
-
const { validity, validationMessage } = this.computeValidity(state);
|
|
1780
|
-
this.prevState = this.copy(state);
|
|
1781
|
-
this.currentValidity = {
|
|
1782
|
-
validationMessage,
|
|
1783
|
-
validity: {
|
|
1784
|
-
badInput: validity.badInput,
|
|
1785
|
-
customError: validity.customError,
|
|
1786
|
-
patternMismatch: validity.patternMismatch,
|
|
1787
|
-
rangeOverflow: validity.rangeOverflow,
|
|
1788
|
-
rangeUnderflow: validity.rangeUnderflow,
|
|
1789
|
-
stepMismatch: validity.stepMismatch,
|
|
1790
|
-
tooLong: validity.tooLong,
|
|
1791
|
-
tooShort: validity.tooShort,
|
|
1792
|
-
typeMismatch: validity.typeMismatch,
|
|
1793
|
-
valueMissing: validity.valueMissing
|
|
1794
|
-
}
|
|
1795
|
-
};
|
|
1796
|
-
return this.currentValidity;
|
|
1797
|
-
}
|
|
1798
|
-
};
|
|
1799
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/validators/text-field-validator.js
|
|
1800
|
-
/**
|
|
1801
|
-
* @license
|
|
1802
|
-
* Copyright 2023 Google LLC
|
|
1803
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1804
|
-
*/
|
|
1805
|
-
/**
|
|
1806
|
-
* A validator that provides constraint validation that emulates `<input>` and
|
|
1807
|
-
* `<textarea>` validation.
|
|
1808
|
-
*/
|
|
1809
|
-
var TextFieldValidator = class extends Validator {
|
|
1810
|
-
computeValidity({ state, renderedControl }) {
|
|
1811
|
-
let inputOrTextArea = renderedControl;
|
|
1812
|
-
if (isInputState(state) && !inputOrTextArea) {
|
|
1813
|
-
inputOrTextArea = this.inputControl || document.createElement("input");
|
|
1814
|
-
this.inputControl = inputOrTextArea;
|
|
1815
|
-
} else if (!inputOrTextArea) {
|
|
1816
|
-
inputOrTextArea = this.textAreaControl || document.createElement("textarea");
|
|
1817
|
-
this.textAreaControl = inputOrTextArea;
|
|
1818
|
-
}
|
|
1819
|
-
const input = isInputState(state) ? inputOrTextArea : null;
|
|
1820
|
-
if (input) input.type = state.type;
|
|
1821
|
-
if (inputOrTextArea.value !== state.value) inputOrTextArea.value = state.value;
|
|
1822
|
-
inputOrTextArea.required = state.required;
|
|
1823
|
-
if (input) {
|
|
1824
|
-
const inputState = state;
|
|
1825
|
-
if (inputState.pattern) input.pattern = inputState.pattern;
|
|
1826
|
-
else input.removeAttribute("pattern");
|
|
1827
|
-
if (inputState.min) input.min = inputState.min;
|
|
1828
|
-
else input.removeAttribute("min");
|
|
1829
|
-
if (inputState.max) input.max = inputState.max;
|
|
1830
|
-
else input.removeAttribute("max");
|
|
1831
|
-
if (inputState.step) input.step = inputState.step;
|
|
1832
|
-
else input.removeAttribute("step");
|
|
1833
|
-
}
|
|
1834
|
-
if ((state.minLength ?? -1) > -1) inputOrTextArea.setAttribute("minlength", String(state.minLength));
|
|
1835
|
-
else inputOrTextArea.removeAttribute("minlength");
|
|
1836
|
-
if ((state.maxLength ?? -1) > -1) inputOrTextArea.setAttribute("maxlength", String(state.maxLength));
|
|
1837
|
-
else inputOrTextArea.removeAttribute("maxlength");
|
|
1838
|
-
return {
|
|
1839
|
-
validity: inputOrTextArea.validity,
|
|
1840
|
-
validationMessage: inputOrTextArea.validationMessage
|
|
1841
|
-
};
|
|
1842
|
-
}
|
|
1843
|
-
equals({ state: prev }, { state: next }) {
|
|
1844
|
-
const inputOrTextAreaEqual = prev.type === next.type && prev.value === next.value && prev.required === next.required && prev.minLength === next.minLength && prev.maxLength === next.maxLength;
|
|
1845
|
-
if (!isInputState(prev) || !isInputState(next)) return inputOrTextAreaEqual;
|
|
1846
|
-
return inputOrTextAreaEqual && prev.pattern === next.pattern && prev.min === next.min && prev.max === next.max && prev.step === next.step;
|
|
1847
|
-
}
|
|
1848
|
-
copy({ state }) {
|
|
1849
|
-
return {
|
|
1850
|
-
state: isInputState(state) ? this.copyInput(state) : this.copyTextArea(state),
|
|
1851
|
-
renderedControl: null
|
|
1852
|
-
};
|
|
1853
|
-
}
|
|
1854
|
-
copyInput(state) {
|
|
1855
|
-
const { type, pattern, min, max, step } = state;
|
|
1856
|
-
return {
|
|
1857
|
-
...this.copySharedState(state),
|
|
1858
|
-
type,
|
|
1859
|
-
pattern,
|
|
1860
|
-
min,
|
|
1861
|
-
max,
|
|
1862
|
-
step
|
|
1863
|
-
};
|
|
1864
|
-
}
|
|
1865
|
-
copyTextArea(state) {
|
|
1866
|
-
return {
|
|
1867
|
-
...this.copySharedState(state),
|
|
1868
|
-
type: state.type
|
|
1869
|
-
};
|
|
1870
|
-
}
|
|
1871
|
-
copySharedState({ value, required, minLength, maxLength }) {
|
|
1872
|
-
return {
|
|
1873
|
-
value,
|
|
1874
|
-
required,
|
|
1875
|
-
minLength,
|
|
1876
|
-
maxLength
|
|
1877
|
-
};
|
|
1878
|
-
}
|
|
1879
|
-
};
|
|
1880
|
-
function isInputState(state) {
|
|
1881
|
-
return state.type !== "textarea";
|
|
1882
|
-
}
|
|
1883
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/textfield/internal/text-field.js
|
|
1884
|
-
/**
|
|
1885
|
-
* @license
|
|
1886
|
-
* Copyright 2021 Google LLC
|
|
1887
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1888
|
-
*/
|
|
1889
|
-
var textFieldBaseClass = mixinDelegatesAria(mixinOnReportValidity(mixinConstraintValidation(mixinFormAssociated(mixinElementInternals(i$2)))));
|
|
1890
|
-
/**
|
|
1891
|
-
* A text field component.
|
|
1892
|
-
*
|
|
1893
|
-
* @fires select {Event} The native `select` event on
|
|
1894
|
-
* [`<input>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select_event)
|
|
1895
|
-
* --bubbles
|
|
1896
|
-
* @fires change {Event} The native `change` event on
|
|
1897
|
-
* [`<input>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event)
|
|
1898
|
-
* --bubbles
|
|
1899
|
-
* @fires input {InputEvent} The native `input` event on
|
|
1900
|
-
* [`<input>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)
|
|
1901
|
-
* --bubbles --composed
|
|
1902
|
-
*/
|
|
1903
|
-
var TextField = class extends textFieldBaseClass {
|
|
1904
|
-
constructor() {
|
|
1905
|
-
super(...arguments);
|
|
1906
|
-
/**
|
|
1907
|
-
* Gets or sets whether or not the text field is in a visually invalid state.
|
|
1908
|
-
*
|
|
1909
|
-
* This error state overrides the error state controlled by
|
|
1910
|
-
* `reportValidity()`.
|
|
1911
|
-
*/
|
|
1912
|
-
this.error = false;
|
|
1913
|
-
/**
|
|
1914
|
-
* The error message that replaces supporting text when `error` is true. If
|
|
1915
|
-
* `errorText` is an empty string, then the supporting text will continue to
|
|
1916
|
-
* show.
|
|
1917
|
-
*
|
|
1918
|
-
* This error message overrides the error message displayed by
|
|
1919
|
-
* `reportValidity()`.
|
|
1920
|
-
*/
|
|
1921
|
-
this.errorText = "";
|
|
1922
|
-
/**
|
|
1923
|
-
* The floating Material label of the textfield component. It informs the user
|
|
1924
|
-
* about what information is requested for a text field. It is aligned with
|
|
1925
|
-
* the input text, is always visible, and it floats when focused or when text
|
|
1926
|
-
* is entered into the textfield. This label also sets accessibilty labels,
|
|
1927
|
-
* but the accessible label is overriden by `aria-label`.
|
|
1928
|
-
*
|
|
1929
|
-
* Learn more about floating labels from the Material Design guidelines:
|
|
1930
|
-
* https://m3.material.io/components/text-fields/guidelines
|
|
1931
|
-
*/
|
|
1932
|
-
this.label = "";
|
|
1933
|
-
/**
|
|
1934
|
-
* Disables the asterisk on the floating label, when the text field is
|
|
1935
|
-
* required.
|
|
1936
|
-
*/
|
|
1937
|
-
this.noAsterisk = false;
|
|
1938
|
-
/**
|
|
1939
|
-
* Indicates that the user must specify a value for the input before the
|
|
1940
|
-
* owning form can be submitted and will render an error state when
|
|
1941
|
-
* `reportValidity()` is invoked when value is empty. Additionally the
|
|
1942
|
-
* floating label will render an asterisk `"*"` when true.
|
|
1943
|
-
*
|
|
1944
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required
|
|
1945
|
-
*/
|
|
1946
|
-
this.required = false;
|
|
1947
|
-
/**
|
|
1948
|
-
* The current value of the text field. It is always a string.
|
|
1949
|
-
*/
|
|
1950
|
-
this.value = "";
|
|
1951
|
-
/**
|
|
1952
|
-
* An optional prefix to display before the input value.
|
|
1953
|
-
*/
|
|
1954
|
-
this.prefixText = "";
|
|
1955
|
-
/**
|
|
1956
|
-
* An optional suffix to display after the input value.
|
|
1957
|
-
*/
|
|
1958
|
-
this.suffixText = "";
|
|
1959
|
-
/**
|
|
1960
|
-
* Whether or not the text field has a leading icon. Used for SSR.
|
|
1961
|
-
*/
|
|
1962
|
-
this.hasLeadingIcon = false;
|
|
1963
|
-
/**
|
|
1964
|
-
* Whether or not the text field has a trailing icon. Used for SSR.
|
|
1965
|
-
*/
|
|
1966
|
-
this.hasTrailingIcon = false;
|
|
1967
|
-
/**
|
|
1968
|
-
* Conveys additional information below the text field, such as how it should
|
|
1969
|
-
* be used.
|
|
1970
|
-
*/
|
|
1971
|
-
this.supportingText = "";
|
|
1972
|
-
/**
|
|
1973
|
-
* Override the input text CSS `direction`. Useful for RTL languages that use
|
|
1974
|
-
* LTR notation for fractions.
|
|
1975
|
-
*/
|
|
1976
|
-
this.textDirection = "";
|
|
1977
|
-
/**
|
|
1978
|
-
* The number of rows to display for a `type="textarea"` text field.
|
|
1979
|
-
* Defaults to 2.
|
|
1980
|
-
*/
|
|
1981
|
-
this.rows = 2;
|
|
1982
|
-
/**
|
|
1983
|
-
* The number of cols to display for a `type="textarea"` text field.
|
|
1984
|
-
* Defaults to 20.
|
|
1985
|
-
*/
|
|
1986
|
-
this.cols = 20;
|
|
1987
|
-
this.inputMode = "";
|
|
1988
|
-
/**
|
|
1989
|
-
* Defines the greatest value in the range of permitted values.
|
|
1990
|
-
*
|
|
1991
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
1992
|
-
*/
|
|
1993
|
-
this.max = "";
|
|
1994
|
-
/**
|
|
1995
|
-
* The maximum number of characters a user can enter into the text field. Set
|
|
1996
|
-
* to -1 for none.
|
|
1997
|
-
*
|
|
1998
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
1999
|
-
*/
|
|
2000
|
-
this.maxLength = -1;
|
|
2001
|
-
/**
|
|
2002
|
-
* Defines the most negative value in the range of permitted values.
|
|
2003
|
-
*
|
|
2004
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
2005
|
-
*/
|
|
2006
|
-
this.min = "";
|
|
2007
|
-
/**
|
|
2008
|
-
* The minimum number of characters a user can enter into the text field. Set
|
|
2009
|
-
* to -1 for none.
|
|
2010
|
-
*
|
|
2011
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
2012
|
-
*/
|
|
2013
|
-
this.minLength = -1;
|
|
2014
|
-
/**
|
|
2015
|
-
* When true, hide the spinner for `type="number"` text fields.
|
|
2016
|
-
*/
|
|
2017
|
-
this.noSpinner = false;
|
|
2018
|
-
/**
|
|
2019
|
-
* A regular expression that the text field's value must match to pass
|
|
2020
|
-
* constraint validation.
|
|
2021
|
-
*
|
|
2022
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
2023
|
-
*/
|
|
2024
|
-
this.pattern = "";
|
|
2025
|
-
/**
|
|
2026
|
-
* Defines the text displayed in the textfield when it has no value. Provides
|
|
2027
|
-
* a brief hint to the user as to the expected type of data that should be
|
|
2028
|
-
* entered into the control. Unlike `label`, the placeholder is not visible
|
|
2029
|
-
* and does not float when the textfield has a value.
|
|
2030
|
-
*
|
|
2031
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder
|
|
2032
|
-
*/
|
|
2033
|
-
this.placeholder = "";
|
|
2034
|
-
/**
|
|
2035
|
-
* Indicates whether or not a user should be able to edit the text field's
|
|
2036
|
-
* value.
|
|
2037
|
-
*
|
|
2038
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly
|
|
2039
|
-
*/
|
|
2040
|
-
this.readOnly = false;
|
|
2041
|
-
/**
|
|
2042
|
-
* Indicates that input accepts multiple email addresses.
|
|
2043
|
-
*
|
|
2044
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#multiple
|
|
2045
|
-
*/
|
|
2046
|
-
this.multiple = false;
|
|
2047
|
-
/**
|
|
2048
|
-
* Returns or sets the element's step attribute, which works with min and max
|
|
2049
|
-
* to limit the increments at which a numeric or date-time value can be set.
|
|
2050
|
-
*
|
|
2051
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
2052
|
-
*/
|
|
2053
|
-
this.step = "";
|
|
2054
|
-
/**
|
|
2055
|
-
* The `<input>` type to use, defaults to "text". The type greatly changes how
|
|
2056
|
-
* the text field behaves.
|
|
2057
|
-
*
|
|
2058
|
-
* Text fields support a limited number of `<input>` types:
|
|
2059
|
-
*
|
|
2060
|
-
* - text
|
|
2061
|
-
* - textarea
|
|
2062
|
-
* - email
|
|
2063
|
-
* - number
|
|
2064
|
-
* - password
|
|
2065
|
-
* - search
|
|
2066
|
-
* - tel
|
|
2067
|
-
* - url
|
|
2068
|
-
*
|
|
2069
|
-
* See
|
|
2070
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
2071
|
-
* for more details on each input type.
|
|
2072
|
-
*/
|
|
2073
|
-
this.type = "text";
|
|
2074
|
-
/**
|
|
2075
|
-
* Describes what, if any, type of autocomplete functionality the input
|
|
2076
|
-
* should provide.
|
|
2077
|
-
*
|
|
2078
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
2079
|
-
*/
|
|
2080
|
-
this.autocomplete = "";
|
|
2081
|
-
/**
|
|
2082
|
-
* Returns true when the text field has been interacted with. Native
|
|
2083
|
-
* validation errors only display in response to user interactions.
|
|
2084
|
-
*/
|
|
2085
|
-
this.dirty = false;
|
|
2086
|
-
this.focused = false;
|
|
2087
|
-
/**
|
|
2088
|
-
* Whether or not a native error has been reported via `reportValidity()`.
|
|
2089
|
-
*/
|
|
2090
|
-
this.nativeError = false;
|
|
2091
|
-
/**
|
|
2092
|
-
* The validation message displayed from a native error via
|
|
2093
|
-
* `reportValidity()`.
|
|
2094
|
-
*/
|
|
2095
|
-
this.nativeErrorText = "";
|
|
2096
|
-
}
|
|
2097
|
-
/**
|
|
2098
|
-
* Gets or sets the direction in which selection occurred.
|
|
2099
|
-
*/
|
|
2100
|
-
get selectionDirection() {
|
|
2101
|
-
return this.getInputOrTextarea().selectionDirection;
|
|
2102
|
-
}
|
|
2103
|
-
set selectionDirection(value) {
|
|
2104
|
-
this.getInputOrTextarea().selectionDirection = value;
|
|
2105
|
-
}
|
|
2106
|
-
/**
|
|
2107
|
-
* Gets or sets the end position or offset of a text selection.
|
|
2108
|
-
*/
|
|
2109
|
-
get selectionEnd() {
|
|
2110
|
-
return this.getInputOrTextarea().selectionEnd;
|
|
2111
|
-
}
|
|
2112
|
-
set selectionEnd(value) {
|
|
2113
|
-
this.getInputOrTextarea().selectionEnd = value;
|
|
2114
|
-
}
|
|
2115
|
-
/**
|
|
2116
|
-
* Gets or sets the starting position or offset of a text selection.
|
|
2117
|
-
*/
|
|
2118
|
-
get selectionStart() {
|
|
2119
|
-
return this.getInputOrTextarea().selectionStart;
|
|
2120
|
-
}
|
|
2121
|
-
set selectionStart(value) {
|
|
2122
|
-
this.getInputOrTextarea().selectionStart = value;
|
|
2123
|
-
}
|
|
2124
|
-
/**
|
|
2125
|
-
* The text field's value as a number.
|
|
2126
|
-
*/
|
|
2127
|
-
get valueAsNumber() {
|
|
2128
|
-
const input = this.getInput();
|
|
2129
|
-
if (!input) return NaN;
|
|
2130
|
-
return input.valueAsNumber;
|
|
2131
|
-
}
|
|
2132
|
-
set valueAsNumber(value) {
|
|
2133
|
-
const input = this.getInput();
|
|
2134
|
-
if (!input) return;
|
|
2135
|
-
input.valueAsNumber = value;
|
|
2136
|
-
this.value = input.value;
|
|
2137
|
-
}
|
|
2138
|
-
/**
|
|
2139
|
-
* The text field's value as a Date.
|
|
2140
|
-
*/
|
|
2141
|
-
get valueAsDate() {
|
|
2142
|
-
const input = this.getInput();
|
|
2143
|
-
if (!input) return null;
|
|
2144
|
-
return input.valueAsDate;
|
|
2145
|
-
}
|
|
2146
|
-
set valueAsDate(value) {
|
|
2147
|
-
const input = this.getInput();
|
|
2148
|
-
if (!input) return;
|
|
2149
|
-
input.valueAsDate = value;
|
|
2150
|
-
this.value = input.value;
|
|
2151
|
-
}
|
|
2152
|
-
get hasError() {
|
|
2153
|
-
return this.error || this.nativeError;
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* Selects all the text in the text field.
|
|
2157
|
-
*
|
|
2158
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
|
|
2159
|
-
*/
|
|
2160
|
-
select() {
|
|
2161
|
-
this.getInputOrTextarea().select();
|
|
2162
|
-
}
|
|
2163
|
-
setRangeText(...args) {
|
|
2164
|
-
this.getInputOrTextarea().setRangeText(...args);
|
|
2165
|
-
this.value = this.getInputOrTextarea().value;
|
|
2166
|
-
}
|
|
2167
|
-
/**
|
|
2168
|
-
* Sets the start and end positions of a selection in the text field.
|
|
2169
|
-
*
|
|
2170
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
|
2171
|
-
*
|
|
2172
|
-
* @param start The offset into the text field for the start of the selection.
|
|
2173
|
-
* @param end The offset into the text field for the end of the selection.
|
|
2174
|
-
* @param direction The direction in which the selection is performed.
|
|
2175
|
-
*/
|
|
2176
|
-
setSelectionRange(start, end, direction) {
|
|
2177
|
-
this.getInputOrTextarea().setSelectionRange(start, end, direction);
|
|
2178
|
-
}
|
|
2179
|
-
/**
|
|
2180
|
-
* Shows the browser picker for an input element of type "date", "time", etc.
|
|
2181
|
-
*
|
|
2182
|
-
* For a full list of supported types, see:
|
|
2183
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/showPicker#browser_compatibility
|
|
2184
|
-
*
|
|
2185
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/showPicker
|
|
2186
|
-
*/
|
|
2187
|
-
showPicker() {
|
|
2188
|
-
const input = this.getInput();
|
|
2189
|
-
if (!input) return;
|
|
2190
|
-
input.showPicker();
|
|
2191
|
-
}
|
|
2192
|
-
/**
|
|
2193
|
-
* Decrements the value of a numeric type text field by `step` or `n` `step`
|
|
2194
|
-
* number of times.
|
|
2195
|
-
*
|
|
2196
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown
|
|
2197
|
-
*
|
|
2198
|
-
* @param stepDecrement The number of steps to decrement, defaults to 1.
|
|
2199
|
-
*/
|
|
2200
|
-
stepDown(stepDecrement) {
|
|
2201
|
-
const input = this.getInput();
|
|
2202
|
-
if (!input) return;
|
|
2203
|
-
input.stepDown(stepDecrement);
|
|
2204
|
-
this.value = input.value;
|
|
2205
|
-
}
|
|
2206
|
-
/**
|
|
2207
|
-
* Increments the value of a numeric type text field by `step` or `n` `step`
|
|
2208
|
-
* number of times.
|
|
2209
|
-
*
|
|
2210
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp
|
|
2211
|
-
*
|
|
2212
|
-
* @param stepIncrement The number of steps to increment, defaults to 1.
|
|
2213
|
-
*/
|
|
2214
|
-
stepUp(stepIncrement) {
|
|
2215
|
-
const input = this.getInput();
|
|
2216
|
-
if (!input) return;
|
|
2217
|
-
input.stepUp(stepIncrement);
|
|
2218
|
-
this.value = input.value;
|
|
2219
|
-
}
|
|
2220
|
-
/**
|
|
2221
|
-
* Reset the text field to its default value.
|
|
2222
|
-
*/
|
|
2223
|
-
reset() {
|
|
2224
|
-
this.dirty = false;
|
|
2225
|
-
this.value = this.getAttribute("value") ?? "";
|
|
2226
|
-
this.nativeError = false;
|
|
2227
|
-
this.nativeErrorText = "";
|
|
2228
|
-
}
|
|
2229
|
-
attributeChangedCallback(attribute, newValue, oldValue) {
|
|
2230
|
-
if (attribute === "value" && this.dirty) return;
|
|
2231
|
-
super.attributeChangedCallback(attribute, newValue, oldValue);
|
|
2232
|
-
}
|
|
2233
|
-
render() {
|
|
2234
|
-
const classes = {
|
|
2235
|
-
"disabled": this.disabled,
|
|
2236
|
-
"error": !this.disabled && this.hasError,
|
|
2237
|
-
"textarea": this.type === "textarea",
|
|
2238
|
-
"no-spinner": this.noSpinner
|
|
2239
|
-
};
|
|
2240
|
-
return T`
|
|
2241
|
-
<span class="text-field ${e$3(classes)}">
|
|
2242
|
-
${this.renderField()}
|
|
2243
|
-
</span>
|
|
2244
|
-
`;
|
|
2245
|
-
}
|
|
2246
|
-
updated(changedProperties) {
|
|
2247
|
-
const value = this.getInputOrTextarea().value;
|
|
2248
|
-
if (this.value !== value) this.value = value;
|
|
2249
|
-
}
|
|
2250
|
-
renderField() {
|
|
2251
|
-
return u$1`<${this.fieldTag}
|
|
2252
|
-
class="field"
|
|
2253
|
-
count=${this.value.length}
|
|
2254
|
-
?disabled=${this.disabled}
|
|
2255
|
-
?error=${this.hasError}
|
|
2256
|
-
error-text=${this.getErrorText()}
|
|
2257
|
-
?focused=${this.focused}
|
|
2258
|
-
?has-end=${this.hasTrailingIcon}
|
|
2259
|
-
?has-start=${this.hasLeadingIcon}
|
|
2260
|
-
label=${this.label}
|
|
2261
|
-
?no-asterisk=${this.noAsterisk}
|
|
2262
|
-
max=${this.maxLength}
|
|
2263
|
-
?populated=${!!this.value}
|
|
2264
|
-
?required=${this.required}
|
|
2265
|
-
?resizable=${this.type === "textarea"}
|
|
2266
|
-
supporting-text=${this.supportingText}
|
|
2267
|
-
>
|
|
2268
|
-
${this.renderLeadingIcon()}
|
|
2269
|
-
${this.renderInputOrTextarea()}
|
|
2270
|
-
${this.renderTrailingIcon()}
|
|
2271
|
-
<div id="description" slot="aria-describedby"></div>
|
|
2272
|
-
<slot name="container" slot="container"></slot>
|
|
2273
|
-
</${this.fieldTag}>`;
|
|
2274
|
-
}
|
|
2275
|
-
renderLeadingIcon() {
|
|
2276
|
-
return T`
|
|
2277
|
-
<span class="icon leading" slot="start">
|
|
2278
|
-
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
2279
|
-
</span>
|
|
2280
|
-
`;
|
|
2281
|
-
}
|
|
2282
|
-
renderTrailingIcon() {
|
|
2283
|
-
return T`
|
|
2284
|
-
<span class="icon trailing" slot="end">
|
|
2285
|
-
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
2286
|
-
</span>
|
|
2287
|
-
`;
|
|
2288
|
-
}
|
|
2289
|
-
renderInputOrTextarea() {
|
|
2290
|
-
const style = { "direction": this.textDirection };
|
|
2291
|
-
const ariaLabel = this.ariaLabel || this.label || A;
|
|
2292
|
-
const autocomplete = this.autocomplete;
|
|
2293
|
-
const hasMaxLength = (this.maxLength ?? -1) > -1;
|
|
2294
|
-
const hasMinLength = (this.minLength ?? -1) > -1;
|
|
2295
|
-
if (this.type === "textarea") return T`
|
|
2296
|
-
<textarea
|
|
2297
|
-
class="input"
|
|
2298
|
-
style=${o(style)}
|
|
2299
|
-
aria-describedby="description"
|
|
2300
|
-
aria-invalid=${this.hasError}
|
|
2301
|
-
aria-label=${ariaLabel}
|
|
2302
|
-
autocomplete=${autocomplete || A}
|
|
2303
|
-
name=${this.name || A}
|
|
2304
|
-
?disabled=${this.disabled}
|
|
2305
|
-
maxlength=${hasMaxLength ? this.maxLength : A}
|
|
2306
|
-
minlength=${hasMinLength ? this.minLength : A}
|
|
2307
|
-
placeholder=${this.placeholder || A}
|
|
2308
|
-
?readonly=${this.readOnly}
|
|
2309
|
-
?required=${this.required}
|
|
2310
|
-
rows=${this.rows}
|
|
2311
|
-
cols=${this.cols}
|
|
2312
|
-
.value=${l(this.value)}
|
|
2313
|
-
@change=${this.redispatchEvent}
|
|
2314
|
-
@focus=${this.handleFocusChange}
|
|
2315
|
-
@blur=${this.handleFocusChange}
|
|
2316
|
-
@input=${this.handleInput}
|
|
2317
|
-
@select=${this.redispatchEvent}></textarea>
|
|
2318
|
-
`;
|
|
2319
|
-
const prefix = this.renderPrefix();
|
|
2320
|
-
const suffix = this.renderSuffix();
|
|
2321
|
-
const inputMode = this.inputMode;
|
|
2322
|
-
return T`
|
|
2323
|
-
<div class="input-wrapper">
|
|
2324
|
-
${prefix}
|
|
2325
|
-
<input
|
|
2326
|
-
class="input"
|
|
2327
|
-
style=${o(style)}
|
|
2328
|
-
aria-describedby="description"
|
|
2329
|
-
aria-invalid=${this.hasError}
|
|
2330
|
-
aria-label=${ariaLabel}
|
|
2331
|
-
autocomplete=${autocomplete || A}
|
|
2332
|
-
name=${this.name || A}
|
|
2333
|
-
?disabled=${this.disabled}
|
|
2334
|
-
inputmode=${inputMode || A}
|
|
2335
|
-
max=${this.max || A}
|
|
2336
|
-
maxlength=${hasMaxLength ? this.maxLength : A}
|
|
2337
|
-
min=${this.min || A}
|
|
2338
|
-
minlength=${hasMinLength ? this.minLength : A}
|
|
2339
|
-
pattern=${this.pattern || A}
|
|
2340
|
-
placeholder=${this.placeholder || A}
|
|
2341
|
-
?readonly=${this.readOnly}
|
|
2342
|
-
?required=${this.required}
|
|
2343
|
-
?multiple=${this.multiple}
|
|
2344
|
-
step=${this.step || A}
|
|
2345
|
-
type=${this.type}
|
|
2346
|
-
.value=${l(this.value)}
|
|
2347
|
-
@change=${this.redispatchEvent}
|
|
2348
|
-
@focus=${this.handleFocusChange}
|
|
2349
|
-
@blur=${this.handleFocusChange}
|
|
2350
|
-
@input=${this.handleInput}
|
|
2351
|
-
@select=${this.redispatchEvent} />
|
|
2352
|
-
${suffix}
|
|
2353
|
-
</div>
|
|
2354
|
-
`;
|
|
2355
|
-
}
|
|
2356
|
-
renderPrefix() {
|
|
2357
|
-
return this.renderAffix(this.prefixText, false);
|
|
2358
|
-
}
|
|
2359
|
-
renderSuffix() {
|
|
2360
|
-
return this.renderAffix(this.suffixText, true);
|
|
2361
|
-
}
|
|
2362
|
-
renderAffix(text, isSuffix) {
|
|
2363
|
-
if (!text) return A;
|
|
2364
|
-
return T`<span class="${e$3({
|
|
2365
|
-
"suffix": isSuffix,
|
|
2366
|
-
"prefix": !isSuffix
|
|
2367
|
-
})}">${text}</span>`;
|
|
2368
|
-
}
|
|
2369
|
-
getErrorText() {
|
|
2370
|
-
return this.error ? this.errorText : this.nativeErrorText;
|
|
2371
|
-
}
|
|
2372
|
-
handleFocusChange() {
|
|
2373
|
-
this.focused = this.inputOrTextarea?.matches(":focus") ?? false;
|
|
2374
|
-
}
|
|
2375
|
-
handleInput(event) {
|
|
2376
|
-
this.dirty = true;
|
|
2377
|
-
this.value = event.target.value;
|
|
2378
|
-
}
|
|
2379
|
-
redispatchEvent(event) {
|
|
2380
|
-
redispatchEvent(this, event);
|
|
2381
|
-
}
|
|
2382
|
-
getInputOrTextarea() {
|
|
2383
|
-
if (!this.inputOrTextarea) {
|
|
2384
|
-
this.connectedCallback();
|
|
2385
|
-
this.scheduleUpdate();
|
|
2386
|
-
}
|
|
2387
|
-
if (this.isUpdatePending) this.scheduleUpdate();
|
|
2388
|
-
return this.inputOrTextarea;
|
|
2389
|
-
}
|
|
2390
|
-
getInput() {
|
|
2391
|
-
if (this.type === "textarea") return null;
|
|
2392
|
-
return this.getInputOrTextarea();
|
|
2393
|
-
}
|
|
2394
|
-
handleIconChange() {
|
|
2395
|
-
this.hasLeadingIcon = this.leadingIcons.length > 0;
|
|
2396
|
-
this.hasTrailingIcon = this.trailingIcons.length > 0;
|
|
2397
|
-
}
|
|
2398
|
-
[getFormValue]() {
|
|
2399
|
-
return this.value;
|
|
2400
|
-
}
|
|
2401
|
-
formResetCallback() {
|
|
2402
|
-
this.reset();
|
|
2403
|
-
}
|
|
2404
|
-
formStateRestoreCallback(state) {
|
|
2405
|
-
this.value = state;
|
|
2406
|
-
}
|
|
2407
|
-
focus() {
|
|
2408
|
-
this.getInputOrTextarea().focus();
|
|
2409
|
-
}
|
|
2410
|
-
[createValidator]() {
|
|
2411
|
-
return new TextFieldValidator(() => ({
|
|
2412
|
-
state: this,
|
|
2413
|
-
renderedControl: this.inputOrTextarea
|
|
2414
|
-
}));
|
|
2415
|
-
}
|
|
2416
|
-
[getValidityAnchor]() {
|
|
2417
|
-
return this.inputOrTextarea;
|
|
2418
|
-
}
|
|
2419
|
-
[onReportValidity](invalidEvent) {
|
|
2420
|
-
invalidEvent?.preventDefault();
|
|
2421
|
-
const prevMessage = this.getErrorText();
|
|
2422
|
-
this.nativeError = !!invalidEvent;
|
|
2423
|
-
this.nativeErrorText = this.validationMessage;
|
|
2424
|
-
if (prevMessage === this.getErrorText()) this.field?.reannounceError();
|
|
2425
|
-
}
|
|
2426
|
-
};
|
|
2427
|
-
/** @nocollapse */
|
|
2428
|
-
TextField.shadowRootOptions = {
|
|
2429
|
-
...i$2.shadowRootOptions,
|
|
2430
|
-
delegatesFocus: true
|
|
2431
|
-
};
|
|
2432
|
-
__decorate([n$2({
|
|
2433
|
-
type: Boolean,
|
|
2434
|
-
reflect: true
|
|
2435
|
-
})], TextField.prototype, "error", void 0);
|
|
2436
|
-
__decorate([n$2({ attribute: "error-text" })], TextField.prototype, "errorText", void 0);
|
|
2437
|
-
__decorate([n$2()], TextField.prototype, "label", void 0);
|
|
2438
|
-
__decorate([n$2({
|
|
2439
|
-
type: Boolean,
|
|
2440
|
-
attribute: "no-asterisk"
|
|
2441
|
-
})], TextField.prototype, "noAsterisk", void 0);
|
|
2442
|
-
__decorate([n$2({
|
|
2443
|
-
type: Boolean,
|
|
2444
|
-
reflect: true
|
|
2445
|
-
})], TextField.prototype, "required", void 0);
|
|
2446
|
-
__decorate([n$2()], TextField.prototype, "value", void 0);
|
|
2447
|
-
__decorate([n$2({ attribute: "prefix-text" })], TextField.prototype, "prefixText", void 0);
|
|
2448
|
-
__decorate([n$2({ attribute: "suffix-text" })], TextField.prototype, "suffixText", void 0);
|
|
2449
|
-
__decorate([n$2({
|
|
2450
|
-
type: Boolean,
|
|
2451
|
-
attribute: "has-leading-icon"
|
|
2452
|
-
})], TextField.prototype, "hasLeadingIcon", void 0);
|
|
2453
|
-
__decorate([n$2({
|
|
2454
|
-
type: Boolean,
|
|
2455
|
-
attribute: "has-trailing-icon"
|
|
2456
|
-
})], TextField.prototype, "hasTrailingIcon", void 0);
|
|
2457
|
-
__decorate([n$2({ attribute: "supporting-text" })], TextField.prototype, "supportingText", void 0);
|
|
2458
|
-
__decorate([n$2({ attribute: "text-direction" })], TextField.prototype, "textDirection", void 0);
|
|
2459
|
-
__decorate([n$2({ type: Number })], TextField.prototype, "rows", void 0);
|
|
2460
|
-
__decorate([n$2({ type: Number })], TextField.prototype, "cols", void 0);
|
|
2461
|
-
__decorate([n$2({ reflect: true })], TextField.prototype, "inputMode", void 0);
|
|
2462
|
-
__decorate([n$2()], TextField.prototype, "max", void 0);
|
|
2463
|
-
__decorate([n$2({ type: Number })], TextField.prototype, "maxLength", void 0);
|
|
2464
|
-
__decorate([n$2()], TextField.prototype, "min", void 0);
|
|
2465
|
-
__decorate([n$2({ type: Number })], TextField.prototype, "minLength", void 0);
|
|
2466
|
-
__decorate([n$2({
|
|
2467
|
-
type: Boolean,
|
|
2468
|
-
attribute: "no-spinner"
|
|
2469
|
-
})], TextField.prototype, "noSpinner", void 0);
|
|
2470
|
-
__decorate([n$2()], TextField.prototype, "pattern", void 0);
|
|
2471
|
-
__decorate([n$2({
|
|
2472
|
-
reflect: true,
|
|
2473
|
-
converter: stringConverter
|
|
2474
|
-
})], TextField.prototype, "placeholder", void 0);
|
|
2475
|
-
__decorate([n$2({
|
|
2476
|
-
type: Boolean,
|
|
2477
|
-
reflect: true
|
|
2478
|
-
})], TextField.prototype, "readOnly", void 0);
|
|
2479
|
-
__decorate([n$2({
|
|
2480
|
-
type: Boolean,
|
|
2481
|
-
reflect: true
|
|
2482
|
-
})], TextField.prototype, "multiple", void 0);
|
|
2483
|
-
__decorate([n$2()], TextField.prototype, "step", void 0);
|
|
2484
|
-
__decorate([n$2({ reflect: true })], TextField.prototype, "type", void 0);
|
|
2485
|
-
__decorate([n$2({ reflect: true })], TextField.prototype, "autocomplete", void 0);
|
|
2486
|
-
__decorate([r$1()], TextField.prototype, "dirty", void 0);
|
|
2487
|
-
__decorate([r$1()], TextField.prototype, "focused", void 0);
|
|
2488
|
-
__decorate([r$1()], TextField.prototype, "nativeError", void 0);
|
|
2489
|
-
__decorate([r$1()], TextField.prototype, "nativeErrorText", void 0);
|
|
2490
|
-
__decorate([e$2(".input")], TextField.prototype, "inputOrTextarea", void 0);
|
|
2491
|
-
__decorate([e$2(".field")], TextField.prototype, "field", void 0);
|
|
2492
|
-
__decorate([o$1({ slot: "leading-icon" })], TextField.prototype, "leadingIcons", void 0);
|
|
2493
|
-
__decorate([o$1({ slot: "trailing-icon" })], TextField.prototype, "trailingIcons", void 0);
|
|
2494
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/textfield/internal/outlined-text-field.js
|
|
2495
|
-
/**
|
|
2496
|
-
* @license
|
|
2497
|
-
* Copyright 2021 Google LLC
|
|
2498
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
2499
|
-
*/
|
|
2500
|
-
/**
|
|
2501
|
-
* An outlined text field component
|
|
2502
|
-
*/
|
|
2503
|
-
var OutlinedTextField = class extends TextField {
|
|
2504
|
-
constructor() {
|
|
2505
|
-
super(...arguments);
|
|
2506
|
-
this.fieldTag = i$5`md-outlined-field`;
|
|
2507
|
-
}
|
|
2508
|
-
};
|
|
2509
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/textfield/internal/shared-styles.cssresult.js
|
|
2510
|
-
/**
|
|
2511
|
-
* @license
|
|
2512
|
-
* Copyright 2026 Google LLC
|
|
2513
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
2514
|
-
*/
|
|
2515
|
-
var styles = i$3`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
|
|
2516
|
-
`;
|
|
2517
|
-
styles.styleSheet;
|
|
2518
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/textfield/outlined-text-field.js
|
|
2519
|
-
/**
|
|
2520
|
-
* @license
|
|
2521
|
-
* Copyright 2021 Google LLC
|
|
2522
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
2523
|
-
*/
|
|
2524
|
-
/**
|
|
2525
|
-
* TODO(b/228525797): Add docs
|
|
2526
|
-
* @final
|
|
2527
|
-
* @suppress {visibility}
|
|
2528
|
-
*/
|
|
2529
|
-
var MdOutlinedTextField = class MdOutlinedTextField extends OutlinedTextField {
|
|
2530
|
-
constructor() {
|
|
2531
|
-
super(...arguments);
|
|
2532
|
-
this.fieldTag = i$5`md-outlined-field`;
|
|
2533
|
-
}
|
|
2534
|
-
};
|
|
2535
|
-
MdOutlinedTextField.styles = [styles, styles$1];
|
|
2536
|
-
MdOutlinedTextField = __decorate([t$1("md-outlined-text-field")], MdOutlinedTextField);
|
|
2537
679
|
// src/lib/components/SpeechLog/MarkerDialog.svelte
|
|
2538
680
|
function MarkerDialog($$renderer, $$props) {
|
|
2539
681
|
$$renderer.component(($$renderer) => {
|