@record-evolution/widget-form 1.0.17 → 1.0.19
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/widget-form.d.ts +0 -1
- package/dist/widget-form.js +317 -292
- package/dist/widget-form.js.map +1 -1
- package/package.json +2 -2
- package/src/definition-schema.json +0 -4
- package/src/widget-form.ts +46 -27
package/dist/widget-form.js
CHANGED
|
@@ -8,18 +8,18 @@ import "@material/web/textfield/outlined-text-field.js";
|
|
|
8
8
|
import "@material/web/checkbox/checkbox.js";
|
|
9
9
|
import "@material/web/select/outlined-select.js";
|
|
10
10
|
import "@material/web/select/select-option.js";
|
|
11
|
-
const
|
|
11
|
+
const H = globalThis, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
|
|
12
12
|
let dt = class {
|
|
13
|
-
constructor(t, s,
|
|
14
|
-
if (this._$cssResult$ = !0,
|
|
13
|
+
constructor(t, s, r) {
|
|
14
|
+
if (this._$cssResult$ = !0, r !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
15
15
|
this.cssText = t, this.t = s;
|
|
16
16
|
}
|
|
17
17
|
get styleSheet() {
|
|
18
18
|
let t = this.o;
|
|
19
19
|
const s = this.t;
|
|
20
20
|
if (W && t === void 0) {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const r = s !== void 0 && s.length === 1;
|
|
22
|
+
r && (t = Y.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Y.set(s, t));
|
|
23
23
|
}
|
|
24
24
|
return t;
|
|
25
25
|
}
|
|
@@ -28,27 +28,27 @@ let dt = class {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
const yt = (e) => new dt(typeof e == "string" ? e : e + "", void 0, K), vt = (e, ...t) => {
|
|
31
|
-
const s = e.length === 1 ? e[0] : t.reduce(((
|
|
32
|
-
if (
|
|
33
|
-
if (typeof
|
|
34
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
35
|
-
})(
|
|
31
|
+
const s = e.length === 1 ? e[0] : t.reduce(((r, i, n) => r + ((o) => {
|
|
32
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
|
33
|
+
if (typeof o == "number") return o;
|
|
34
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
35
|
+
})(i) + e[n + 1]), e[0]);
|
|
36
36
|
return new dt(s, e, K);
|
|
37
37
|
}, At = (e, t) => {
|
|
38
38
|
if (W) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
|
|
39
39
|
else for (const s of t) {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const r = document.createElement("style"), i = H.litNonce;
|
|
41
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = s.cssText, e.appendChild(r);
|
|
42
42
|
}
|
|
43
43
|
}, tt = W ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
44
44
|
let s = "";
|
|
45
|
-
for (const
|
|
45
|
+
for (const r of t.cssRules) s += r.cssText;
|
|
46
46
|
return yt(s);
|
|
47
47
|
})(e) : e;
|
|
48
|
-
const { is: xt, defineProperty: wt, getOwnPropertyDescriptor:
|
|
48
|
+
const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: Et, getOwnPropertyNames: St, getOwnPropertySymbols: Ct, getPrototypeOf: Pt } = Object, R = globalThis, et = R.trustedTypes, kt = et ? et.emptyScript : "", Dt = R.reactiveElementPolyfillSupport, O = (e, t) => e, V = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
e = e ?
|
|
51
|
+
e = e ? kt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,9 +73,9 @@ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return s;
|
|
76
|
-
} }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter:
|
|
77
|
-
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"),
|
|
78
|
-
let
|
|
76
|
+
} }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: Z };
|
|
77
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
78
|
+
let S = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ??= []).push(t);
|
|
81
81
|
}
|
|
@@ -84,58 +84,58 @@ let E = class extends HTMLElement {
|
|
|
84
84
|
}
|
|
85
85
|
static createProperty(t, s = st) {
|
|
86
86
|
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const r = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, r, s);
|
|
88
|
+
i !== void 0 && wt(this.prototype, t, i);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t, s,
|
|
92
|
-
const { get:
|
|
91
|
+
static getPropertyDescriptor(t, s, r) {
|
|
92
|
+
const { get: i, set: n } = Et(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[s];
|
|
94
|
-
}, set(
|
|
95
|
-
this[s] =
|
|
94
|
+
}, set(o) {
|
|
95
|
+
this[s] = o;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const h =
|
|
99
|
-
|
|
97
|
+
return { get: i, set(o) {
|
|
98
|
+
const h = i?.call(this);
|
|
99
|
+
n?.call(this, o), this.requestUpdate(t, h, r);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
103
|
return this.elementProperties.get(t) ?? st;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(O("elementProperties"))) return;
|
|
107
107
|
const t = Pt(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
-
const s = this.properties,
|
|
114
|
-
for (const
|
|
111
|
+
if (this.hasOwnProperty(O("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
|
|
113
|
+
const s = this.properties, r = [...St(s), ...Ct(s)];
|
|
114
|
+
for (const i of r) this.createProperty(i, s[i]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
117
117
|
if (t !== null) {
|
|
118
118
|
const s = litPropertyMetadata.get(t);
|
|
119
|
-
if (s !== void 0) for (const [
|
|
119
|
+
if (s !== void 0) for (const [r, i] of s) this.elementProperties.set(r, i);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [s,
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
for (const [s, r] of this.elementProperties) {
|
|
123
|
+
const i = this._$Eu(s, r);
|
|
124
|
+
i !== void 0 && this._$Eh.set(i, s);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(t) {
|
|
129
129
|
const s = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
131
|
+
const r = new Set(t.flat(1 / 0).reverse());
|
|
132
|
+
for (const i of r) s.unshift(tt(i));
|
|
133
133
|
} else t !== void 0 && s.push(tt(t));
|
|
134
134
|
return s;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, s) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const r = s.attribute;
|
|
138
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
140
|
constructor() {
|
|
141
141
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -151,7 +151,7 @@ let E = class extends HTMLElement {
|
|
|
151
151
|
}
|
|
152
152
|
_$E_() {
|
|
153
153
|
const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
|
|
154
|
-
for (const
|
|
154
|
+
for (const r of s.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
|
|
155
155
|
t.size > 0 && (this._$Ep = t);
|
|
156
156
|
}
|
|
157
157
|
createRenderRoot() {
|
|
@@ -166,33 +166,33 @@ let E = class extends HTMLElement {
|
|
|
166
166
|
disconnectedCallback() {
|
|
167
167
|
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
168
168
|
}
|
|
169
|
-
attributeChangedCallback(t, s,
|
|
170
|
-
this._$AK(t,
|
|
169
|
+
attributeChangedCallback(t, s, r) {
|
|
170
|
+
this._$AK(t, r);
|
|
171
171
|
}
|
|
172
172
|
_$ET(t, s) {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
this._$Em = t,
|
|
173
|
+
const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r);
|
|
174
|
+
if (i !== void 0 && r.reflect === !0) {
|
|
175
|
+
const n = (r.converter?.toAttribute !== void 0 ? r.converter : V).toAttribute(s, r.type);
|
|
176
|
+
this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
_$AK(t, s) {
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
this._$Em =
|
|
180
|
+
const r = this.constructor, i = r._$Eh.get(t);
|
|
181
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
182
|
+
const n = r.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : V;
|
|
183
|
+
this._$Em = i, this[i] = o.fromAttribute(s, n.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
requestUpdate(t, s,
|
|
186
|
+
requestUpdate(t, s, r) {
|
|
187
187
|
if (t !== void 0) {
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
this.C(t, s,
|
|
188
|
+
const i = this.constructor, n = this[t];
|
|
189
|
+
if (r ??= i.getPropertyOptions(t), !((r.hasChanged ?? Z)(n, s) || r.useDefault && r.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, r)))) return;
|
|
190
|
+
this.C(t, s, r);
|
|
191
191
|
}
|
|
192
192
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
193
193
|
}
|
|
194
|
-
C(t, s, { useDefault:
|
|
195
|
-
|
|
194
|
+
C(t, s, { useDefault: r, reflect: i, wrapped: n }, o) {
|
|
195
|
+
r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? s ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (s = void 0), this._$AL.set(t, s)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
196
196
|
}
|
|
197
197
|
async _$EP() {
|
|
198
198
|
this.isUpdatePending = !0;
|
|
@@ -211,21 +211,21 @@ let E = class extends HTMLElement {
|
|
|
211
211
|
if (!this.isUpdatePending) return;
|
|
212
212
|
if (!this.hasUpdated) {
|
|
213
213
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
214
|
-
for (const [
|
|
214
|
+
for (const [i, n] of this._$Ep) this[i] = n;
|
|
215
215
|
this._$Ep = void 0;
|
|
216
216
|
}
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const { wrapped:
|
|
220
|
-
|
|
217
|
+
const r = this.constructor.elementProperties;
|
|
218
|
+
if (r.size > 0) for (const [i, n] of r) {
|
|
219
|
+
const { wrapped: o } = n, h = this[i];
|
|
220
|
+
o !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
let t = !1;
|
|
224
224
|
const s = this._$AL;
|
|
225
225
|
try {
|
|
226
|
-
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(((
|
|
227
|
-
} catch (
|
|
228
|
-
throw t = !1, this._$EM(),
|
|
226
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(s)) : this._$EM();
|
|
227
|
+
} catch (r) {
|
|
228
|
+
throw t = !1, this._$EM(), r;
|
|
229
229
|
}
|
|
230
230
|
t && this._$AE(s);
|
|
231
231
|
}
|
|
@@ -254,70 +254,70 @@ let E = class extends HTMLElement {
|
|
|
254
254
|
firstUpdated(t) {
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
|
|
258
|
-
const J = globalThis,
|
|
259
|
-
\f\r]`,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i,
|
|
257
|
+
S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[O("elementProperties")] = /* @__PURE__ */ new Map(), S[O("finalized")] = /* @__PURE__ */ new Map(), Dt?.({ ReactiveElement: S }), (R.reactiveElementVersions ??= []).push("2.1.0");
|
|
258
|
+
const J = globalThis, N = J.trustedTypes, rt = N ? N.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Ot = `<${mt}>`, w = document, U = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Tt = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
|
|
259
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Ut = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = Ut(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
|
|
261
261
|
function ft(e, t) {
|
|
262
262
|
if (!Q(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
263
|
-
return
|
|
263
|
+
return rt !== void 0 ? rt.createHTML(t) : t;
|
|
264
264
|
}
|
|
265
265
|
const Mt = (e, t) => {
|
|
266
|
-
const s = e.length - 1,
|
|
267
|
-
let
|
|
266
|
+
const s = e.length - 1, r = [];
|
|
267
|
+
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
|
|
268
268
|
for (let h = 0; h < s; h++) {
|
|
269
269
|
const l = e[h];
|
|
270
|
-
let c,
|
|
271
|
-
for (; d < l.length && (
|
|
272
|
-
const u =
|
|
273
|
-
|
|
270
|
+
let c, p, a = -1, d = 0;
|
|
271
|
+
for (; d < l.length && (o.lastIndex = d, p = o.exec(l), p !== null); ) d = o.lastIndex, o === k ? p[1] === "!--" ? o = it : p[1] !== void 0 ? o = ot : p[2] !== void 0 ? ($t.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? k, a = -1) : p[1] === void 0 ? a = -2 : (a = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? lt : nt) : o === lt || o === nt ? o = v : o === it || o === ot ? o = k : (o = v, i = void 0);
|
|
272
|
+
const u = o === v && e[h + 1].startsWith("/>") ? " " : "";
|
|
273
|
+
n += o === k ? l + Ot : a >= 0 ? (r.push(c), l.slice(0, a) + pt + l.slice(a) + y + u) : l + y + (a === -2 ? h : u);
|
|
274
274
|
}
|
|
275
|
-
return [ft(e,
|
|
275
|
+
return [ft(e, n + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
276
276
|
};
|
|
277
|
-
class
|
|
278
|
-
constructor({ strings: t, _$litType$: s },
|
|
279
|
-
let
|
|
277
|
+
class F {
|
|
278
|
+
constructor({ strings: t, _$litType$: s }, r) {
|
|
279
|
+
let i;
|
|
280
280
|
this.parts = [];
|
|
281
|
-
let
|
|
282
|
-
const h = t.length - 1, l = this.parts, [c,
|
|
283
|
-
if (this.el =
|
|
281
|
+
let n = 0, o = 0;
|
|
282
|
+
const h = t.length - 1, l = this.parts, [c, p] = Mt(t, s);
|
|
283
|
+
if (this.el = F.createElement(c, r), x.currentNode = this.el.content, s === 2 || s === 3) {
|
|
284
284
|
const a = this.el.content.firstChild;
|
|
285
285
|
a.replaceWith(...a.childNodes);
|
|
286
286
|
}
|
|
287
|
-
for (; (
|
|
288
|
-
if (
|
|
289
|
-
if (
|
|
290
|
-
const d =
|
|
291
|
-
l.push({ type: 1, index:
|
|
292
|
-
} else a.startsWith(y) && (l.push({ type: 6, index:
|
|
293
|
-
if ($t.test(
|
|
294
|
-
const a =
|
|
287
|
+
for (; (i = x.nextNode()) !== null && l.length < h; ) {
|
|
288
|
+
if (i.nodeType === 1) {
|
|
289
|
+
if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(pt)) {
|
|
290
|
+
const d = p[o++], u = i.getAttribute(a).split(y), $ = /([.?@])?(.*)/.exec(d);
|
|
291
|
+
l.push({ type: 1, index: n, name: $[2], strings: u, ctor: $[1] === "." ? Ht : $[1] === "?" ? Vt : $[1] === "@" ? Nt : j }), i.removeAttribute(a);
|
|
292
|
+
} else a.startsWith(y) && (l.push({ type: 6, index: n }), i.removeAttribute(a));
|
|
293
|
+
if ($t.test(i.tagName)) {
|
|
294
|
+
const a = i.textContent.split(y), d = a.length - 1;
|
|
295
295
|
if (d > 0) {
|
|
296
|
-
|
|
297
|
-
for (let u = 0; u < d; u++)
|
|
298
|
-
|
|
296
|
+
i.textContent = N ? N.emptyScript : "";
|
|
297
|
+
for (let u = 0; u < d; u++) i.append(a[u], U()), x.nextNode(), l.push({ type: 2, index: ++n });
|
|
298
|
+
i.append(a[d], U());
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
} else if (
|
|
301
|
+
} else if (i.nodeType === 8) if (i.data === mt) l.push({ type: 2, index: n });
|
|
302
302
|
else {
|
|
303
303
|
let a = -1;
|
|
304
|
-
for (; (a =
|
|
304
|
+
for (; (a = i.data.indexOf(y, a + 1)) !== -1; ) l.push({ type: 7, index: n }), a += y.length - 1;
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
n++;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
static createElement(t, s) {
|
|
310
|
-
const
|
|
311
|
-
return
|
|
310
|
+
const r = w.createElement("template");
|
|
311
|
+
return r.innerHTML = t, r;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function C(e, t, s = e,
|
|
315
|
-
if (t ===
|
|
316
|
-
let
|
|
317
|
-
const
|
|
318
|
-
return
|
|
314
|
+
function C(e, t, s = e, r) {
|
|
315
|
+
if (t === E) return t;
|
|
316
|
+
let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
|
|
317
|
+
const n = M(t) ? void 0 : t._$litDirective$;
|
|
318
|
+
return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (t = C(e, i._$AS(e, t.values), i, r)), t;
|
|
319
319
|
}
|
|
320
|
-
let
|
|
320
|
+
let Ft = class {
|
|
321
321
|
constructor(t, s) {
|
|
322
322
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
|
|
323
323
|
}
|
|
@@ -328,29 +328,29 @@ let Ht = class {
|
|
|
328
328
|
return this._$AM._$AU;
|
|
329
329
|
}
|
|
330
330
|
u(t) {
|
|
331
|
-
const { el: { content: s }, parts:
|
|
332
|
-
x.currentNode =
|
|
333
|
-
let
|
|
331
|
+
const { el: { content: s }, parts: r } = this._$AD, i = (t?.creationScope ?? w).importNode(s, !0);
|
|
332
|
+
x.currentNode = i;
|
|
333
|
+
let n = x.nextNode(), o = 0, h = 0, l = r[0];
|
|
334
334
|
for (; l !== void 0; ) {
|
|
335
|
-
if (
|
|
335
|
+
if (o === l.index) {
|
|
336
336
|
let c;
|
|
337
|
-
l.type === 2 ? c = new P(
|
|
337
|
+
l.type === 2 ? c = new P(n, n.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (c = new Rt(n, this, t)), this._$AV.push(c), l = r[++h];
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
o !== l?.index && (n = x.nextNode(), o++);
|
|
340
340
|
}
|
|
341
|
-
return x.currentNode = w,
|
|
341
|
+
return x.currentNode = w, i;
|
|
342
342
|
}
|
|
343
343
|
p(t) {
|
|
344
344
|
let s = 0;
|
|
345
|
-
for (const
|
|
345
|
+
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, s), s += r.strings.length - 2) : r._$AI(t[s])), s++;
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
class P {
|
|
349
349
|
get _$AU() {
|
|
350
350
|
return this._$AM?._$AU ?? this._$Cv;
|
|
351
351
|
}
|
|
352
|
-
constructor(t, s,
|
|
353
|
-
this.type = 2, this._$AH =
|
|
352
|
+
constructor(t, s, r, i) {
|
|
353
|
+
this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
354
354
|
}
|
|
355
355
|
get parentNode() {
|
|
356
356
|
let t = this._$AA.parentNode;
|
|
@@ -364,7 +364,7 @@ class P {
|
|
|
364
364
|
return this._$AB;
|
|
365
365
|
}
|
|
366
366
|
_$AI(t, s = this) {
|
|
367
|
-
t = C(this, t, s), M(t) ? t ===
|
|
367
|
+
t = C(this, t, s), M(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Tt(t) ? this.k(t) : this._(t);
|
|
368
368
|
}
|
|
369
369
|
O(t) {
|
|
370
370
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -373,94 +373,94 @@ class P {
|
|
|
373
373
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
374
374
|
}
|
|
375
375
|
_(t) {
|
|
376
|
-
this._$AH !==
|
|
376
|
+
this._$AH !== m && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
|
|
377
377
|
}
|
|
378
378
|
$(t) {
|
|
379
|
-
const { values: s, _$litType$:
|
|
380
|
-
if (this._$AH?._$AD ===
|
|
379
|
+
const { values: s, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = F.createElement(ft(r.h, r.h[0]), this.options)), r);
|
|
380
|
+
if (this._$AH?._$AD === i) this._$AH.p(s);
|
|
381
381
|
else {
|
|
382
|
-
const
|
|
383
|
-
|
|
382
|
+
const n = new Ft(i, this), o = n.u(this.options);
|
|
383
|
+
n.p(s), this.T(o), this._$AH = n;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
_$AC(t) {
|
|
387
387
|
let s = at.get(t.strings);
|
|
388
|
-
return s === void 0 && at.set(t.strings, s = new
|
|
388
|
+
return s === void 0 && at.set(t.strings, s = new F(t)), s;
|
|
389
389
|
}
|
|
390
390
|
k(t) {
|
|
391
391
|
Q(this._$AH) || (this._$AH = [], this._$AR());
|
|
392
392
|
const s = this._$AH;
|
|
393
|
-
let
|
|
394
|
-
for (const
|
|
395
|
-
|
|
393
|
+
let r, i = 0;
|
|
394
|
+
for (const n of t) i === s.length ? s.push(r = new P(this.O(U()), this.O(U()), this, this.options)) : r = s[i], r._$AI(n), i++;
|
|
395
|
+
i < s.length && (this._$AR(r && r._$AB.nextSibling, i), s.length = i);
|
|
396
396
|
}
|
|
397
397
|
_$AR(t = this._$AA.nextSibling, s) {
|
|
398
398
|
for (this._$AP?.(!1, !0, s); t && t !== this._$AB; ) {
|
|
399
|
-
const
|
|
400
|
-
t.remove(), t =
|
|
399
|
+
const r = t.nextSibling;
|
|
400
|
+
t.remove(), t = r;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
setConnected(t) {
|
|
404
404
|
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class j {
|
|
408
408
|
get tagName() {
|
|
409
409
|
return this.element.tagName;
|
|
410
410
|
}
|
|
411
411
|
get _$AU() {
|
|
412
412
|
return this._$AM._$AU;
|
|
413
413
|
}
|
|
414
|
-
constructor(t, s,
|
|
415
|
-
this.type = 1, this._$AH =
|
|
414
|
+
constructor(t, s, r, i, n) {
|
|
415
|
+
this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = s, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = m;
|
|
416
416
|
}
|
|
417
|
-
_$AI(t, s = this,
|
|
418
|
-
const
|
|
419
|
-
let
|
|
420
|
-
if (
|
|
417
|
+
_$AI(t, s = this, r, i) {
|
|
418
|
+
const n = this.strings;
|
|
419
|
+
let o = !1;
|
|
420
|
+
if (n === void 0) t = C(this, t, s, 0), o = !M(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
421
421
|
else {
|
|
422
422
|
const h = t;
|
|
423
423
|
let l, c;
|
|
424
|
-
for (t =
|
|
424
|
+
for (t = n[0], l = 0; l < n.length - 1; l++) c = C(this, h[r + l], s, l), c === E && (c = this._$AH[l]), o ||= !M(c) || c !== this._$AH[l], c === m ? t = m : t !== m && (t += (c ?? "") + n[l + 1]), this._$AH[l] = c;
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
o && !i && this.j(t);
|
|
427
427
|
}
|
|
428
428
|
j(t) {
|
|
429
|
-
t ===
|
|
429
|
+
t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
class
|
|
432
|
+
class Ht extends j {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.type = 3;
|
|
435
435
|
}
|
|
436
436
|
j(t) {
|
|
437
|
-
this.element[this.name] = t ===
|
|
437
|
+
this.element[this.name] = t === m ? void 0 : t;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
class
|
|
440
|
+
class Vt extends j {
|
|
441
441
|
constructor() {
|
|
442
442
|
super(...arguments), this.type = 4;
|
|
443
443
|
}
|
|
444
444
|
j(t) {
|
|
445
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
445
|
+
this.element.toggleAttribute(this.name, !!t && t !== m);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
class
|
|
449
|
-
constructor(t, s,
|
|
450
|
-
super(t, s,
|
|
448
|
+
class Nt extends j {
|
|
449
|
+
constructor(t, s, r, i, n) {
|
|
450
|
+
super(t, s, r, i, n), this.type = 5;
|
|
451
451
|
}
|
|
452
452
|
_$AI(t, s = this) {
|
|
453
|
-
if ((t = C(this, t, s, 0) ??
|
|
454
|
-
const
|
|
455
|
-
|
|
453
|
+
if ((t = C(this, t, s, 0) ?? m) === E) return;
|
|
454
|
+
const r = this._$AH, i = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== m && (r === m || i);
|
|
455
|
+
i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
456
456
|
}
|
|
457
457
|
handleEvent(t) {
|
|
458
458
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
462
|
-
constructor(t, s,
|
|
463
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options =
|
|
461
|
+
class Rt {
|
|
462
|
+
constructor(t, s, r) {
|
|
463
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r;
|
|
464
464
|
}
|
|
465
465
|
get _$AU() {
|
|
466
466
|
return this._$AM._$AU;
|
|
@@ -470,18 +470,18 @@ class Vt {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
const jt = { I: P }, Bt = J.litHtmlPolyfillSupport;
|
|
473
|
-
Bt?.(
|
|
473
|
+
Bt?.(F, P), (J.litHtmlVersions ??= []).push("3.3.0");
|
|
474
474
|
const qt = (e, t, s) => {
|
|
475
|
-
const
|
|
476
|
-
let
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
|
|
475
|
+
const r = s?.renderBefore ?? t;
|
|
476
|
+
let i = r._$litPart$;
|
|
477
|
+
if (i === void 0) {
|
|
478
|
+
const n = s?.renderBefore ?? null;
|
|
479
|
+
r._$litPart$ = i = new P(t.insertBefore(U(), n), n, void 0, s ?? {});
|
|
480
480
|
}
|
|
481
|
-
return
|
|
481
|
+
return i._$AI(e), i;
|
|
482
482
|
};
|
|
483
483
|
const G = globalThis;
|
|
484
|
-
let
|
|
484
|
+
let T = class extends S {
|
|
485
485
|
constructor() {
|
|
486
486
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
487
487
|
}
|
|
@@ -500,22 +500,22 @@ let U = class extends E {
|
|
|
500
500
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
501
501
|
}
|
|
502
502
|
render() {
|
|
503
|
-
return
|
|
503
|
+
return E;
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
|
-
|
|
506
|
+
T._$litElement$ = !0, T.finalized = !0, G.litElementHydrateSupport?.({ LitElement: T });
|
|
507
507
|
const zt = G.litElementPolyfillSupport;
|
|
508
|
-
zt?.({ LitElement:
|
|
508
|
+
zt?.({ LitElement: T });
|
|
509
509
|
(G.litElementVersions ??= []).push("4.2.0");
|
|
510
510
|
const It = { CHILD: 2 }, bt = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
511
|
-
let
|
|
511
|
+
let gt = class {
|
|
512
512
|
constructor(t) {
|
|
513
513
|
}
|
|
514
514
|
get _$AU() {
|
|
515
515
|
return this._$AM._$AU;
|
|
516
516
|
}
|
|
517
|
-
_$AT(t, s,
|
|
518
|
-
this._$Ct = t, this._$AM = s, this._$Ci =
|
|
517
|
+
_$AT(t, s, r) {
|
|
518
|
+
this._$Ct = t, this._$AM = s, this._$Ci = r;
|
|
519
519
|
}
|
|
520
520
|
_$AS(t, s) {
|
|
521
521
|
return this.update(t, s);
|
|
@@ -524,94 +524,94 @@ let _t = class {
|
|
|
524
524
|
return this.render(...s);
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
|
-
const { I: Lt } = jt, ht = () => document.createComment(""),
|
|
528
|
-
const
|
|
527
|
+
const { I: Lt } = jt, ht = () => document.createComment(""), D = (e, t, s) => {
|
|
528
|
+
const r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
|
|
529
529
|
if (s === void 0) {
|
|
530
|
-
const
|
|
531
|
-
s = new Lt(
|
|
530
|
+
const n = r.insertBefore(ht(), i), o = r.insertBefore(ht(), i);
|
|
531
|
+
s = new Lt(n, o, e, e.options);
|
|
532
532
|
} else {
|
|
533
|
-
const
|
|
533
|
+
const n = s._$AB.nextSibling, o = s._$AM, h = o !== e;
|
|
534
534
|
if (h) {
|
|
535
535
|
let l;
|
|
536
|
-
s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (l = e._$AU) !==
|
|
536
|
+
s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (l = e._$AU) !== o._$AU && s._$AP(l);
|
|
537
537
|
}
|
|
538
|
-
if (
|
|
538
|
+
if (n !== i || h) {
|
|
539
539
|
let l = s._$AA;
|
|
540
|
-
for (; l !==
|
|
540
|
+
for (; l !== n; ) {
|
|
541
541
|
const c = l.nextSibling;
|
|
542
|
-
|
|
542
|
+
r.insertBefore(l, i), l = c;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
return s;
|
|
547
|
-
}, A = (e, t, s = e) => (e._$AI(t, s), e), Wt = {},
|
|
547
|
+
}, A = (e, t, s = e) => (e._$AI(t, s), e), Wt = {}, _t = (e, t = Wt) => e._$AH = t, Kt = (e) => e._$AH, L = (e) => {
|
|
548
548
|
e._$AP?.(!1, !0);
|
|
549
549
|
let t = e._$AA;
|
|
550
550
|
const s = e._$AB.nextSibling;
|
|
551
551
|
for (; t !== s; ) {
|
|
552
|
-
const
|
|
553
|
-
t.remove(), t =
|
|
552
|
+
const r = t.nextSibling;
|
|
553
|
+
t.remove(), t = r;
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
556
|
const ct = (e, t, s) => {
|
|
557
|
-
const
|
|
558
|
-
for (let
|
|
559
|
-
return
|
|
560
|
-
}, ut = bt(class extends
|
|
557
|
+
const r = /* @__PURE__ */ new Map();
|
|
558
|
+
for (let i = t; i <= s; i++) r.set(e[i], i);
|
|
559
|
+
return r;
|
|
560
|
+
}, ut = bt(class extends gt {
|
|
561
561
|
constructor(e) {
|
|
562
562
|
if (super(e), e.type !== It.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
563
563
|
}
|
|
564
564
|
dt(e, t, s) {
|
|
565
|
-
let
|
|
566
|
-
s === void 0 ? s = t : t !== void 0 && (
|
|
567
|
-
const
|
|
568
|
-
let
|
|
569
|
-
for (const h of e)
|
|
570
|
-
return { values:
|
|
565
|
+
let r;
|
|
566
|
+
s === void 0 ? s = t : t !== void 0 && (r = t);
|
|
567
|
+
const i = [], n = [];
|
|
568
|
+
let o = 0;
|
|
569
|
+
for (const h of e) i[o] = r ? r(h, o) : o, n[o] = s(h, o), o++;
|
|
570
|
+
return { values: n, keys: i };
|
|
571
571
|
}
|
|
572
572
|
render(e, t, s) {
|
|
573
573
|
return this.dt(e, t, s).values;
|
|
574
574
|
}
|
|
575
|
-
update(e, [t, s,
|
|
576
|
-
const
|
|
577
|
-
if (!Array.isArray(
|
|
575
|
+
update(e, [t, s, r]) {
|
|
576
|
+
const i = Kt(e), { values: n, keys: o } = this.dt(t, s, r);
|
|
577
|
+
if (!Array.isArray(i)) return this.ut = o, n;
|
|
578
578
|
const h = this.ut ??= [], l = [];
|
|
579
|
-
let c,
|
|
580
|
-
for (; a <= d && u <= $; ) if (
|
|
581
|
-
else if (
|
|
582
|
-
else if (h[a] ===
|
|
583
|
-
else if (h[d] ===
|
|
584
|
-
else if (h[a] ===
|
|
585
|
-
else if (h[d] ===
|
|
586
|
-
else if (c === void 0 && (c = ct(
|
|
587
|
-
const g =
|
|
579
|
+
let c, p, a = 0, d = i.length - 1, u = 0, $ = n.length - 1;
|
|
580
|
+
for (; a <= d && u <= $; ) if (i[a] === null) a++;
|
|
581
|
+
else if (i[d] === null) d--;
|
|
582
|
+
else if (h[a] === o[u]) l[u] = A(i[a], n[u]), a++, u++;
|
|
583
|
+
else if (h[d] === o[$]) l[$] = A(i[d], n[$]), d--, $--;
|
|
584
|
+
else if (h[a] === o[$]) l[$] = A(i[a], n[$]), D(e, l[$ + 1], i[a]), a++, $--;
|
|
585
|
+
else if (h[d] === o[u]) l[u] = A(i[d], n[u]), D(e, i[a], i[d]), d--, u++;
|
|
586
|
+
else if (c === void 0 && (c = ct(o, u, $), p = ct(h, a, d)), c.has(h[a])) if (c.has(h[d])) {
|
|
587
|
+
const g = p.get(o[u]), z = g !== void 0 ? i[g] : null;
|
|
588
588
|
if (z === null) {
|
|
589
|
-
const X =
|
|
590
|
-
A(X,
|
|
591
|
-
} else l[u] = A(z,
|
|
589
|
+
const X = D(e, i[a]);
|
|
590
|
+
A(X, n[u]), l[u] = X;
|
|
591
|
+
} else l[u] = A(z, n[u]), D(e, i[a], z), i[g] = null;
|
|
592
592
|
u++;
|
|
593
|
-
} else L(
|
|
594
|
-
else L(
|
|
593
|
+
} else L(i[d]), d--;
|
|
594
|
+
else L(i[a]), a++;
|
|
595
595
|
for (; u <= $; ) {
|
|
596
|
-
const g =
|
|
597
|
-
A(g,
|
|
596
|
+
const g = D(e, l[$ + 1]);
|
|
597
|
+
A(g, n[u]), l[u++] = g;
|
|
598
598
|
}
|
|
599
599
|
for (; a <= d; ) {
|
|
600
|
-
const g =
|
|
600
|
+
const g = i[a++];
|
|
601
601
|
g !== null && L(g);
|
|
602
602
|
}
|
|
603
|
-
return this.ut =
|
|
603
|
+
return this.ut = o, _t(e, l), E;
|
|
604
604
|
}
|
|
605
605
|
});
|
|
606
|
-
const Zt = bt(class extends
|
|
606
|
+
const Zt = bt(class extends gt {
|
|
607
607
|
constructor() {
|
|
608
|
-
super(...arguments), this.key =
|
|
608
|
+
super(...arguments), this.key = m;
|
|
609
609
|
}
|
|
610
610
|
render(e, t) {
|
|
611
611
|
return this.key = e, t;
|
|
612
612
|
}
|
|
613
613
|
update(e, [t, s]) {
|
|
614
|
-
return t !== this.key && (
|
|
614
|
+
return t !== this.key && (_t(e), this.key = t), s;
|
|
615
615
|
}
|
|
616
616
|
});
|
|
617
617
|
const Jt = (e) => (t, s) => {
|
|
@@ -619,53 +619,53 @@ const Jt = (e) => (t, s) => {
|
|
|
619
619
|
customElements.define(e, t);
|
|
620
620
|
})) : customElements.define(e, t);
|
|
621
621
|
};
|
|
622
|
-
const Qt = { attribute: !0, type: String, converter:
|
|
623
|
-
const { kind:
|
|
624
|
-
let
|
|
625
|
-
if (
|
|
626
|
-
const { name:
|
|
622
|
+
const Qt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, s) => {
|
|
623
|
+
const { kind: r, metadata: i } = s;
|
|
624
|
+
let n = globalThis.litPropertyMetadata.get(i);
|
|
625
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), n.set(s.name, e), r === "accessor") {
|
|
626
|
+
const { name: o } = s;
|
|
627
627
|
return { set(h) {
|
|
628
628
|
const l = t.get.call(this);
|
|
629
|
-
t.set.call(this, h), this.requestUpdate(
|
|
629
|
+
t.set.call(this, h), this.requestUpdate(o, l, e);
|
|
630
630
|
}, init(h) {
|
|
631
|
-
return h !== void 0 && this.C(
|
|
631
|
+
return h !== void 0 && this.C(o, void 0, e, h), h;
|
|
632
632
|
} };
|
|
633
633
|
}
|
|
634
|
-
if (
|
|
635
|
-
const { name:
|
|
634
|
+
if (r === "setter") {
|
|
635
|
+
const { name: o } = s;
|
|
636
636
|
return function(h) {
|
|
637
|
-
const l = this[
|
|
638
|
-
t.call(this, h), this.requestUpdate(
|
|
637
|
+
const l = this[o];
|
|
638
|
+
t.call(this, h), this.requestUpdate(o, l, e);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
throw Error("Unsupported decorator location: " +
|
|
641
|
+
throw Error("Unsupported decorator location: " + r);
|
|
642
642
|
};
|
|
643
|
-
function
|
|
644
|
-
return (t, s) => typeof s == "object" ? Gt(e, t, s) : ((
|
|
645
|
-
const
|
|
646
|
-
return
|
|
643
|
+
function B(e) {
|
|
644
|
+
return (t, s) => typeof s == "object" ? Gt(e, t, s) : ((r, i, n) => {
|
|
645
|
+
const o = i.hasOwnProperty(n);
|
|
646
|
+
return i.constructor.createProperty(n, r), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
647
647
|
})(e, t, s);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function q(e) {
|
|
650
|
+
return B({ ...e, state: !0, attribute: !1 });
|
|
651
651
|
}
|
|
652
652
|
const Xt = (e, t, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, s), s);
|
|
653
653
|
function Yt(e, t) {
|
|
654
|
-
return (s,
|
|
655
|
-
const
|
|
656
|
-
return Xt(s,
|
|
657
|
-
return
|
|
654
|
+
return (s, r, i) => {
|
|
655
|
+
const n = (o) => o.renderRoot?.querySelector(e) ?? null;
|
|
656
|
+
return Xt(s, r, { get() {
|
|
657
|
+
return n(this);
|
|
658
658
|
} });
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t, s,
|
|
662
|
-
for (var
|
|
663
|
-
(
|
|
664
|
-
return
|
|
661
|
+
var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t, s, r) => {
|
|
662
|
+
for (var i = r > 1 ? void 0 : r ? ee(t, s) : t, n = e.length - 1, o; n >= 0; n--)
|
|
663
|
+
(o = e[n]) && (i = (r ? o(t, s, i) : o(i)) || i);
|
|
664
|
+
return r && i && te(t, s, i), i;
|
|
665
665
|
};
|
|
666
|
-
let b = class extends
|
|
666
|
+
let b = class extends T {
|
|
667
667
|
constructor() {
|
|
668
|
-
super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.
|
|
668
|
+
super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.19";
|
|
669
669
|
}
|
|
670
670
|
update(e) {
|
|
671
671
|
e.has("theme") && this.registerTheme(this.theme), super.update(e);
|
|
@@ -675,42 +675,50 @@ let b = class extends U {
|
|
|
675
675
|
}
|
|
676
676
|
registerTheme(e) {
|
|
677
677
|
const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), s = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
|
|
678
|
-
this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color
|
|
678
|
+
this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
|
|
679
679
|
}
|
|
680
680
|
openFormDialog() {
|
|
681
681
|
this.dialogOpen = !0;
|
|
682
682
|
}
|
|
683
683
|
handleFormSubmit(e) {
|
|
684
684
|
e.preventDefault();
|
|
685
|
-
const s = e.submitter?.getAttribute("value") ?? "submit",
|
|
685
|
+
const s = e.submitter?.getAttribute("value") ?? "submit", r = e.target, i = new FormData(r), n = this.inputData?.formFields?.map((o, h) => {
|
|
686
686
|
const l = `column-${h}`;
|
|
687
687
|
let c;
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
688
|
+
if (o.hiddenField)
|
|
689
|
+
c = o.preFilledValue ?? o.defaultValue ?? "";
|
|
690
|
+
else if (o.type === "checkbox")
|
|
691
|
+
c = i.has(l) ? "on" : "off";
|
|
692
|
+
else {
|
|
693
|
+
const p = i.get(l);
|
|
694
|
+
c = p === null || p === "" ? o.defaultValue ?? "" : p;
|
|
695
|
+
}
|
|
696
|
+
return {
|
|
697
|
+
swarm_app_databackend_key: o.targetColumn?.swarm_app_databackend_key,
|
|
698
|
+
table_name: o.targetColumn?.tablename,
|
|
699
|
+
column_name: o.targetColumn?.column,
|
|
700
|
+
value: this.formatValue(c, o.type ?? "textfield")
|
|
693
701
|
};
|
|
694
702
|
});
|
|
695
|
-
if (this.inputData?.deleteFlagColumn &&
|
|
703
|
+
if (this.inputData?.deleteFlagColumn && n?.push({
|
|
696
704
|
swarm_app_databackend_key: this.inputData?.deleteFlagColumn?.swarm_app_databackend_key,
|
|
697
705
|
table_name: this.inputData?.deleteFlagColumn?.tablename,
|
|
698
706
|
column_name: this.inputData?.deleteFlagColumn?.column,
|
|
699
707
|
value: s === "delete"
|
|
700
708
|
}), this.dispatchEvent(
|
|
701
709
|
new CustomEvent("data-submit", {
|
|
702
|
-
detail:
|
|
710
|
+
detail: n,
|
|
703
711
|
bubbles: !1,
|
|
704
712
|
composed: !1
|
|
705
713
|
})
|
|
706
714
|
), s === "delete") {
|
|
707
|
-
const
|
|
715
|
+
const o = this.resolveRoute({
|
|
708
716
|
route: this.inputData?.deleteNavigationRoute,
|
|
709
717
|
variables: this.inputData?.variables
|
|
710
718
|
});
|
|
711
|
-
|
|
719
|
+
o && this.dispatchEvent(
|
|
712
720
|
new CustomEvent("nav-submit", {
|
|
713
|
-
detail: { path: String(
|
|
721
|
+
detail: { path: String(o) },
|
|
714
722
|
bubbles: !0,
|
|
715
723
|
composed: !0
|
|
716
724
|
})
|
|
@@ -720,10 +728,13 @@ let b = class extends U {
|
|
|
720
728
|
}
|
|
721
729
|
formatValue(e, t) {
|
|
722
730
|
switch (t) {
|
|
723
|
-
case "numberfield":
|
|
724
|
-
|
|
731
|
+
case "numberfield": {
|
|
732
|
+
if (e === "" || e === null || e === void 0) return null;
|
|
733
|
+
const s = parseFloat(e);
|
|
734
|
+
return Number.isNaN(s) ? null : s;
|
|
735
|
+
}
|
|
725
736
|
case "checkbox":
|
|
726
|
-
return e === "on";
|
|
737
|
+
return e === "on" || e === "true";
|
|
727
738
|
default:
|
|
728
739
|
return e;
|
|
729
740
|
}
|
|
@@ -739,7 +750,7 @@ let b = class extends U {
|
|
|
739
750
|
.pattern="${e.validation ?? ""}"
|
|
740
751
|
supporting-text=${e.description ?? ""}
|
|
741
752
|
validation-message="${e.validationMessage ?? "Invalid input"}"
|
|
742
|
-
?required=${e.required && !e.defaultValue}
|
|
753
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
743
754
|
></md-outlined-text-field>
|
|
744
755
|
`;
|
|
745
756
|
}
|
|
@@ -756,7 +767,7 @@ let b = class extends U {
|
|
|
756
767
|
min=${e.min ?? ""}
|
|
757
768
|
max=${e.max ?? ""}
|
|
758
769
|
supporting-text=${e.description ?? ""}
|
|
759
|
-
?required=${e.required && !e.defaultValue}
|
|
770
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
760
771
|
></md-outlined-text-field>
|
|
761
772
|
`;
|
|
762
773
|
}
|
|
@@ -766,9 +777,9 @@ let b = class extends U {
|
|
|
766
777
|
<md-checkbox
|
|
767
778
|
name="column-${t}"
|
|
768
779
|
aria-label=${e.label ?? ""}
|
|
769
|
-
?checked=${
|
|
780
|
+
?checked=${String(e.preFilledValue ?? e.defaultValue) === "true"}
|
|
770
781
|
supporting-text=${e.description ?? ""}
|
|
771
|
-
?required=${e.required && !e.defaultValue}
|
|
782
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
772
783
|
></md-checkbox>
|
|
773
784
|
<label class="label"> ${e.label} </label>
|
|
774
785
|
</div>
|
|
@@ -783,7 +794,7 @@ let b = class extends U {
|
|
|
783
794
|
.value="${e.preFilledValue ?? ""}"
|
|
784
795
|
.placeholder="${e.defaultValue ?? ""}"
|
|
785
796
|
rows="3"
|
|
786
|
-
?required=${e.required && !e.defaultValue}
|
|
797
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
787
798
|
supporting-text=${e.description ?? ""}
|
|
788
799
|
></md-outlined-text-field>
|
|
789
800
|
`;
|
|
@@ -795,7 +806,7 @@ let b = class extends U {
|
|
|
795
806
|
<md-outlined-select
|
|
796
807
|
name="column-${t}"
|
|
797
808
|
supporting-text=${e.description ?? ""}
|
|
798
|
-
?required=${e.required && !e.defaultValue}
|
|
809
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
799
810
|
>
|
|
800
811
|
${ut(
|
|
801
812
|
e.values ?? [],
|
|
@@ -822,7 +833,7 @@ let b = class extends U {
|
|
|
822
833
|
type="datetime-local"
|
|
823
834
|
.value="${e.preFilledValue ?? e.defaultValue ?? ""}"
|
|
824
835
|
supporting-text=${e.description ?? ""}
|
|
825
|
-
?required=${e.required && !e.defaultValue}
|
|
836
|
+
?required=${e.required && !e.defaultValue && !e.preFilledValue}
|
|
826
837
|
></md-outlined-text-field>
|
|
827
838
|
`;
|
|
828
839
|
}
|
|
@@ -830,16 +841,16 @@ let b = class extends U {
|
|
|
830
841
|
this.formKey++;
|
|
831
842
|
}
|
|
832
843
|
resolveRoute(e) {
|
|
833
|
-
let t =
|
|
844
|
+
let t = e?.route ?? "";
|
|
834
845
|
if (t) {
|
|
835
846
|
if (e?.variables)
|
|
836
847
|
for (const s of e.variables)
|
|
837
848
|
s.label && (t = t.split(`{{${s.label}}}`).join(encodeURIComponent(String(s.value ?? ""))));
|
|
838
849
|
if (t.includes("*")) {
|
|
839
|
-
const s = (this.route || "").split("/").filter(Boolean),
|
|
840
|
-
for (let
|
|
841
|
-
i
|
|
842
|
-
t = (t.startsWith("/") ? "/" : "") +
|
|
850
|
+
const s = (this.route || "").split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
851
|
+
for (let i = 0; i < r.length; i++)
|
|
852
|
+
r[i] === "*" && (r[i] = s[i] ?? "");
|
|
853
|
+
t = (t.startsWith("/") ? "/" : "") + r.filter(Boolean).join("/");
|
|
843
854
|
}
|
|
844
855
|
return t;
|
|
845
856
|
}
|
|
@@ -866,12 +877,12 @@ let b = class extends U {
|
|
|
866
877
|
${this.inputData?.formButton ? f`
|
|
867
878
|
<md-fab
|
|
868
879
|
aria-label="Add"
|
|
869
|
-
style="margin-left: 16px; --md-fab-container-color: ${this.theme?.theme_object?.color[0] ?? "#9064f7"}"
|
|
880
|
+
style="margin-left: 16px; --md-fab-container-color: ${this.theme?.theme_object?.color?.[0] ?? "#9064f7"}"
|
|
870
881
|
@click=${this.openFormDialog}
|
|
871
882
|
>
|
|
872
883
|
<md-icon slot="icon">add</md-icon>
|
|
873
884
|
</md-fab>
|
|
874
|
-
` :
|
|
885
|
+
` : m}
|
|
875
886
|
<header>
|
|
876
887
|
<h3 class="paging" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>
|
|
877
888
|
<p class="paging" ?active=${this.inputData?.subTitle}>${this.inputData?.subTitle}</p>
|
|
@@ -883,11 +894,11 @@ let b = class extends U {
|
|
|
883
894
|
class="form"
|
|
884
895
|
quick
|
|
885
896
|
?open=${this.dialogOpen}
|
|
886
|
-
@cancel=${(
|
|
887
|
-
|
|
897
|
+
@cancel=${(r) => {
|
|
898
|
+
r.preventDefault();
|
|
888
899
|
}}
|
|
889
|
-
@keydown=${(
|
|
890
|
-
|
|
900
|
+
@keydown=${(r) => {
|
|
901
|
+
r.key === "Escape" && r.preventDefault();
|
|
891
902
|
}}
|
|
892
903
|
@closed=${() => this.dialogOpen = !1}
|
|
893
904
|
>
|
|
@@ -899,9 +910,9 @@ let b = class extends U {
|
|
|
899
910
|
form="form"
|
|
900
911
|
value="delete"
|
|
901
912
|
type="submit"
|
|
902
|
-
autofocus
|
|
903
913
|
>Delete</md-filled-button
|
|
904
|
-
>` :
|
|
914
|
+
>` : m}
|
|
915
|
+
<md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
|
|
905
916
|
<md-outlined-button @click=${this.cancelEdit}>Cancel</md-outlined-button>
|
|
906
917
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
907
918
|
>Submit</md-filled-button
|
|
@@ -917,9 +928,8 @@ let b = class extends U {
|
|
|
917
928
|
form="form"
|
|
918
929
|
value="delete"
|
|
919
930
|
type="submit"
|
|
920
|
-
autofocus
|
|
921
931
|
>Delete</md-filled-button
|
|
922
|
-
>` :
|
|
932
|
+
>` : m}
|
|
923
933
|
<md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
|
|
924
934
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
925
935
|
>Submit</md-filled-button
|
|
@@ -944,12 +954,7 @@ let b = class extends U {
|
|
|
944
954
|
this.inputData?.formFields ?? [],
|
|
945
955
|
(e, t) => t,
|
|
946
956
|
(e, t) => {
|
|
947
|
-
if (e.hiddenField)
|
|
948
|
-
return f`<input
|
|
949
|
-
type="hidden"
|
|
950
|
-
name="column-${t}"
|
|
951
|
-
.value="${e.preFilledValue ?? e.defaultValue ?? ""}"
|
|
952
|
-
/>`;
|
|
957
|
+
if (e.hiddenField) return m;
|
|
953
958
|
switch (e.type) {
|
|
954
959
|
case "textfield":
|
|
955
960
|
return this.renderTextField(e, t);
|
|
@@ -1001,6 +1006,29 @@ b.styles = vt`
|
|
|
1001
1006
|
padding: 16px;
|
|
1002
1007
|
box-sizing: border-box;
|
|
1003
1008
|
overflow: auto;
|
|
1009
|
+
/* Derive scrollbar colors from the (inherited) text color so they
|
|
1010
|
+
follow custom styles and themes — e.g. light thumb on dark bg. */
|
|
1011
|
+
scrollbar-width: thin;
|
|
1012
|
+
scrollbar-color: color-mix(in srgb, currentColor 35%, transparent) transparent;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/* WebKit/Blink fallback for browsers without scrollbar-color support. */
|
|
1016
|
+
.wrapper::-webkit-scrollbar {
|
|
1017
|
+
width: 8px;
|
|
1018
|
+
height: 8px;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.wrapper::-webkit-scrollbar-track {
|
|
1022
|
+
background: transparent;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.wrapper::-webkit-scrollbar-thumb {
|
|
1026
|
+
background-color: color-mix(in srgb, currentColor 35%, transparent);
|
|
1027
|
+
border-radius: 4px;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.wrapper::-webkit-scrollbar-thumb:hover {
|
|
1031
|
+
background-color: color-mix(in srgb, currentColor 55%, transparent);
|
|
1004
1032
|
}
|
|
1005
1033
|
|
|
1006
1034
|
.form-actions {
|
|
@@ -1095,34 +1123,31 @@ b.styles = vt`
|
|
|
1095
1123
|
}
|
|
1096
1124
|
`;
|
|
1097
1125
|
_([
|
|
1098
|
-
|
|
1126
|
+
B({ type: Object })
|
|
1099
1127
|
], b.prototype, "inputData", 2);
|
|
1100
1128
|
_([
|
|
1101
|
-
|
|
1129
|
+
B({ type: Object })
|
|
1102
1130
|
], b.prototype, "theme", 2);
|
|
1103
1131
|
_([
|
|
1104
|
-
|
|
1132
|
+
B({ type: String })
|
|
1105
1133
|
], b.prototype, "route", 2);
|
|
1106
1134
|
_([
|
|
1107
|
-
|
|
1135
|
+
q()
|
|
1108
1136
|
], b.prototype, "themeBgColor", 2);
|
|
1109
1137
|
_([
|
|
1110
|
-
|
|
1138
|
+
q()
|
|
1111
1139
|
], b.prototype, "themeTitleColor", 2);
|
|
1112
1140
|
_([
|
|
1113
|
-
|
|
1114
|
-
], b.prototype, "themeSubtitleColor", 2);
|
|
1115
|
-
_([
|
|
1116
|
-
R()
|
|
1141
|
+
q()
|
|
1117
1142
|
], b.prototype, "dialogOpen", 2);
|
|
1118
1143
|
_([
|
|
1119
1144
|
Yt("md-dialog")
|
|
1120
1145
|
], b.prototype, "dialog", 2);
|
|
1121
1146
|
_([
|
|
1122
|
-
|
|
1147
|
+
q()
|
|
1123
1148
|
], b.prototype, "formKey", 2);
|
|
1124
1149
|
b = _([
|
|
1125
|
-
Jt("widget-form-1.0.
|
|
1150
|
+
Jt("widget-form-1.0.19")
|
|
1126
1151
|
], b);
|
|
1127
1152
|
export {
|
|
1128
1153
|
b as WidgetForm
|