@decidables/decidables-elements 0.3.2 → 0.3.3
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/CHANGELOG.md +8 -0
- package/lib/decidablesElements.esm.js +1089 -919
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +77 -60
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +1089 -921
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +77 -60
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +5 -5
|
@@ -9,219 +9,761 @@
|
|
|
9
9
|
* Copyright 2019 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const t$
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const t$3 = window,
|
|
13
|
+
e$5 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
14
|
+
s$6 = Symbol(),
|
|
15
|
+
n$6 = new WeakMap();
|
|
16
|
+
let o$6 = class o {
|
|
17
|
+
constructor(t, e, n) {
|
|
18
|
+
if (this._$cssResult$ = !0, n !== s$6) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
19
|
+
this.cssText = t, this.t = e;
|
|
20
|
+
}
|
|
21
|
+
get styleSheet() {
|
|
22
|
+
let t = this.o;
|
|
23
|
+
const s = this.t;
|
|
24
|
+
if (e$5 && void 0 === t) {
|
|
25
|
+
const e = void 0 !== s && 1 === s.length;
|
|
26
|
+
e && (t = n$6.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$6.set(s, t));
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
}
|
|
30
|
+
toString() {
|
|
31
|
+
return this.cssText;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
|
|
35
|
+
S$3 = (s, n) => {
|
|
36
|
+
e$5 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
|
|
37
|
+
const n = document.createElement("style"),
|
|
38
|
+
o = t$3.litNonce;
|
|
39
|
+
void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
c$2 = e$5 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
43
|
+
let e = "";
|
|
44
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
45
|
+
return r$5(e);
|
|
46
|
+
})(t) : t;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @license
|
|
50
|
+
* Copyright 2017 Google LLC
|
|
51
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
+
*/
|
|
53
|
+
var s$5;
|
|
54
|
+
const e$4 = window,
|
|
55
|
+
r$4 = e$4.trustedTypes,
|
|
56
|
+
h$3 = r$4 ? r$4.emptyScript : "",
|
|
57
|
+
o$5 = e$4.reactiveElementPolyfillSupport,
|
|
58
|
+
n$5 = {
|
|
59
|
+
toAttribute(t, i) {
|
|
60
|
+
switch (i) {
|
|
61
|
+
case Boolean:
|
|
62
|
+
t = t ? h$3 : null;
|
|
63
|
+
break;
|
|
64
|
+
case Object:
|
|
65
|
+
case Array:
|
|
66
|
+
t = null == t ? t : JSON.stringify(t);
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
},
|
|
70
|
+
fromAttribute(t, i) {
|
|
71
|
+
let s = t;
|
|
72
|
+
switch (i) {
|
|
73
|
+
case Boolean:
|
|
74
|
+
s = null !== t;
|
|
75
|
+
break;
|
|
76
|
+
case Number:
|
|
77
|
+
s = null === t ? null : Number(t);
|
|
78
|
+
break;
|
|
79
|
+
case Object:
|
|
80
|
+
case Array:
|
|
81
|
+
try {
|
|
82
|
+
s = JSON.parse(t);
|
|
83
|
+
} catch (t) {
|
|
84
|
+
s = null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return s;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
a$3 = (t, i) => i !== t && (i == i || t == t),
|
|
91
|
+
l$5 = {
|
|
92
|
+
attribute: !0,
|
|
93
|
+
type: String,
|
|
94
|
+
converter: n$5,
|
|
95
|
+
reflect: !1,
|
|
96
|
+
hasChanged: a$3
|
|
97
|
+
};
|
|
98
|
+
let d$2 = class d extends HTMLElement {
|
|
99
|
+
constructor() {
|
|
100
|
+
super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
101
|
+
}
|
|
102
|
+
static addInitializer(t) {
|
|
103
|
+
var i;
|
|
104
|
+
this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
|
|
105
|
+
}
|
|
106
|
+
static get observedAttributes() {
|
|
107
|
+
this.finalize();
|
|
108
|
+
const t = [];
|
|
109
|
+
return this.elementProperties.forEach((i, s) => {
|
|
110
|
+
const e = this._$Ep(s, i);
|
|
111
|
+
void 0 !== e && (this._$Ev.set(e, s), t.push(e));
|
|
112
|
+
}), t;
|
|
113
|
+
}
|
|
114
|
+
static createProperty(t, i = l$5) {
|
|
115
|
+
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
116
|
+
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
117
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
118
|
+
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
static getPropertyDescriptor(t, i, s) {
|
|
122
|
+
return {
|
|
123
|
+
get() {
|
|
124
|
+
return this[i];
|
|
125
|
+
},
|
|
126
|
+
set(e) {
|
|
127
|
+
const r = this[t];
|
|
128
|
+
this[i] = e, this.requestUpdate(t, r, s);
|
|
129
|
+
},
|
|
130
|
+
configurable: !0,
|
|
131
|
+
enumerable: !0
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
static getPropertyOptions(t) {
|
|
135
|
+
return this.elementProperties.get(t) || l$5;
|
|
136
|
+
}
|
|
137
|
+
static finalize() {
|
|
138
|
+
if (this.hasOwnProperty("finalized")) return !1;
|
|
139
|
+
this.finalized = !0;
|
|
140
|
+
const t = Object.getPrototypeOf(this);
|
|
141
|
+
if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
|
|
142
|
+
const t = this.properties,
|
|
143
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
144
|
+
for (const s of i) this.createProperty(s, t[s]);
|
|
145
|
+
}
|
|
146
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
147
|
+
}
|
|
148
|
+
static finalizeStyles(i) {
|
|
149
|
+
const s = [];
|
|
150
|
+
if (Array.isArray(i)) {
|
|
151
|
+
const e = new Set(i.flat(1 / 0).reverse());
|
|
152
|
+
for (const i of e) s.unshift(c$2(i));
|
|
153
|
+
} else void 0 !== i && s.push(c$2(i));
|
|
154
|
+
return s;
|
|
155
|
+
}
|
|
156
|
+
static _$Ep(t, i) {
|
|
157
|
+
const s = i.attribute;
|
|
158
|
+
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
159
|
+
}
|
|
160
|
+
u() {
|
|
161
|
+
var t;
|
|
162
|
+
this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
|
|
163
|
+
}
|
|
164
|
+
addController(t) {
|
|
165
|
+
var i, s;
|
|
166
|
+
(null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
167
|
+
}
|
|
168
|
+
removeController(t) {
|
|
169
|
+
var i;
|
|
170
|
+
null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
171
|
+
}
|
|
172
|
+
_$Eg() {
|
|
173
|
+
this.constructor.elementProperties.forEach((t, i) => {
|
|
174
|
+
this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
createRenderRoot() {
|
|
178
|
+
var t;
|
|
179
|
+
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
180
|
+
return S$3(s, this.constructor.elementStyles), s;
|
|
181
|
+
}
|
|
182
|
+
connectedCallback() {
|
|
183
|
+
var t;
|
|
184
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
185
|
+
var i;
|
|
186
|
+
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
enableUpdating(t) {}
|
|
190
|
+
disconnectedCallback() {
|
|
191
|
+
var t;
|
|
192
|
+
null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
193
|
+
var i;
|
|
194
|
+
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
attributeChangedCallback(t, i, s) {
|
|
198
|
+
this._$AK(t, s);
|
|
199
|
+
}
|
|
200
|
+
_$EO(t, i, s = l$5) {
|
|
201
|
+
var e;
|
|
202
|
+
const r = this.constructor._$Ep(t, s);
|
|
203
|
+
if (void 0 !== r && !0 === s.reflect) {
|
|
204
|
+
const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$5).toAttribute(i, s.type);
|
|
205
|
+
this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
_$AK(t, i) {
|
|
209
|
+
var s;
|
|
210
|
+
const e = this.constructor,
|
|
211
|
+
r = e._$Ev.get(t);
|
|
212
|
+
if (void 0 !== r && this._$El !== r) {
|
|
213
|
+
const t = e.getPropertyOptions(r),
|
|
214
|
+
h = "function" == typeof t.converter ? {
|
|
215
|
+
fromAttribute: t.converter
|
|
216
|
+
} : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$5;
|
|
217
|
+
this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
requestUpdate(t, i, s) {
|
|
221
|
+
let e = !0;
|
|
222
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$3)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
|
|
223
|
+
}
|
|
224
|
+
async _$Ej() {
|
|
225
|
+
this.isUpdatePending = !0;
|
|
226
|
+
try {
|
|
227
|
+
await this._$E_;
|
|
228
|
+
} catch (t) {
|
|
229
|
+
Promise.reject(t);
|
|
230
|
+
}
|
|
231
|
+
const t = this.scheduleUpdate();
|
|
232
|
+
return null != t && (await t), !this.isUpdatePending;
|
|
233
|
+
}
|
|
234
|
+
scheduleUpdate() {
|
|
235
|
+
return this.performUpdate();
|
|
236
|
+
}
|
|
237
|
+
performUpdate() {
|
|
238
|
+
var t;
|
|
239
|
+
if (!this.isUpdatePending) return;
|
|
240
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
|
|
241
|
+
let i = !1;
|
|
242
|
+
const s = this._$AL;
|
|
243
|
+
try {
|
|
244
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
245
|
+
var i;
|
|
246
|
+
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
247
|
+
}), this.update(s)) : this._$Ek();
|
|
248
|
+
} catch (t) {
|
|
249
|
+
throw i = !1, this._$Ek(), t;
|
|
250
|
+
}
|
|
251
|
+
i && this._$AE(s);
|
|
252
|
+
}
|
|
253
|
+
willUpdate(t) {}
|
|
254
|
+
_$AE(t) {
|
|
255
|
+
var i;
|
|
256
|
+
null === (i = this._$ES) || void 0 === i || i.forEach(t => {
|
|
257
|
+
var i;
|
|
258
|
+
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
259
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
260
|
+
}
|
|
261
|
+
_$Ek() {
|
|
262
|
+
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
263
|
+
}
|
|
264
|
+
get updateComplete() {
|
|
265
|
+
return this.getUpdateComplete();
|
|
266
|
+
}
|
|
267
|
+
getUpdateComplete() {
|
|
268
|
+
return this._$E_;
|
|
269
|
+
}
|
|
270
|
+
shouldUpdate(t) {
|
|
271
|
+
return !0;
|
|
272
|
+
}
|
|
273
|
+
update(t) {
|
|
274
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
|
|
275
|
+
}
|
|
276
|
+
updated(t) {}
|
|
277
|
+
firstUpdated(t) {}
|
|
278
|
+
};
|
|
279
|
+
d$2.finalized = !0, d$2.elementProperties = new Map(), d$2.elementStyles = [], d$2.shadowRootOptions = {
|
|
280
|
+
mode: "open"
|
|
281
|
+
}, null == o$5 || o$5({
|
|
282
|
+
ReactiveElement: d$2
|
|
283
|
+
}), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.5.0");
|
|
15
284
|
|
|
16
|
-
|
|
285
|
+
/**
|
|
286
|
+
* @license
|
|
287
|
+
* Copyright 2017 Google LLC
|
|
288
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
289
|
+
*/
|
|
290
|
+
var t$2;
|
|
291
|
+
const i$2 = window,
|
|
292
|
+
s$4 = i$2.trustedTypes,
|
|
293
|
+
e$3 = s$4 ? s$4.createPolicy("lit-html", {
|
|
294
|
+
createHTML: t => t
|
|
295
|
+
}) : void 0,
|
|
296
|
+
o$4 = `lit$${(Math.random() + "").slice(9)}$`,
|
|
297
|
+
n$4 = "?" + o$4,
|
|
298
|
+
l$4 = `<${n$4}>`,
|
|
299
|
+
h$2 = document,
|
|
300
|
+
r$3 = (t = "") => h$2.createComment(t),
|
|
301
|
+
d$1 = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
302
|
+
u$1 = Array.isArray,
|
|
303
|
+
c$1 = t => u$1(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
|
|
304
|
+
v$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
305
|
+
a$2 = /-->/g,
|
|
306
|
+
f$1 = />/g,
|
|
307
|
+
_$1 = RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)", "g"),
|
|
308
|
+
m$1 = /'/g,
|
|
309
|
+
p$1 = /"/g,
|
|
310
|
+
$$1 = /^(?:script|style|textarea|title)$/i,
|
|
311
|
+
x$1 = Symbol.for("lit-noChange"),
|
|
312
|
+
b$1 = Symbol.for("lit-nothing"),
|
|
313
|
+
T$1 = new WeakMap(),
|
|
314
|
+
A$1 = h$2.createTreeWalker(h$2, 129, null, !1),
|
|
315
|
+
E$1 = (t, i) => {
|
|
316
|
+
const s = t.length - 1,
|
|
317
|
+
n = [];
|
|
318
|
+
let h,
|
|
319
|
+
r = 2 === i ? "<svg>" : "",
|
|
320
|
+
d = v$1;
|
|
321
|
+
for (let i = 0; i < s; i++) {
|
|
322
|
+
const s = t[i];
|
|
323
|
+
let e,
|
|
324
|
+
u,
|
|
325
|
+
c = -1,
|
|
326
|
+
g = 0;
|
|
327
|
+
for (; g < s.length && (d.lastIndex = g, u = d.exec(s), null !== u);) g = d.lastIndex, d === v$1 ? "!--" === u[1] ? d = a$2 : void 0 !== u[1] ? d = f$1 : void 0 !== u[2] ? ($$1.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = _$1) : void 0 !== u[3] && (d = _$1) : d === _$1 ? ">" === u[0] ? (d = null != h ? h : v$1, c = -1) : void 0 === u[1] ? c = -2 : (c = d.lastIndex - u[2].length, e = u[1], d = void 0 === u[3] ? _$1 : '"' === u[3] ? p$1 : m$1) : d === p$1 || d === m$1 ? d = _$1 : d === a$2 || d === f$1 ? d = v$1 : (d = _$1, h = void 0);
|
|
328
|
+
const y = d === _$1 && t[i + 1].startsWith("/>") ? " " : "";
|
|
329
|
+
r += d === v$1 ? s + l$4 : c >= 0 ? (n.push(e), s.slice(0, c) + "$lit$" + s.slice(c) + o$4 + y) : s + o$4 + (-2 === c ? (n.push(void 0), i) : y);
|
|
330
|
+
}
|
|
331
|
+
const u = r + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
|
|
332
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
333
|
+
return [void 0 !== e$3 ? e$3.createHTML(u) : u, n];
|
|
334
|
+
};
|
|
335
|
+
let C$1 = class C {
|
|
336
|
+
constructor({
|
|
337
|
+
strings: t,
|
|
338
|
+
_$litType$: i
|
|
339
|
+
}, e) {
|
|
340
|
+
let l;
|
|
341
|
+
this.parts = [];
|
|
342
|
+
let h = 0,
|
|
343
|
+
d = 0;
|
|
344
|
+
const u = t.length - 1,
|
|
345
|
+
c = this.parts,
|
|
346
|
+
[v, a] = E$1(t, i);
|
|
347
|
+
if (this.el = C$1.createElement(v, e), A$1.currentNode = this.el.content, 2 === i) {
|
|
348
|
+
const t = this.el.content,
|
|
349
|
+
i = t.firstChild;
|
|
350
|
+
i.remove(), t.append(...i.childNodes);
|
|
351
|
+
}
|
|
352
|
+
for (; null !== (l = A$1.nextNode()) && c.length < u;) {
|
|
353
|
+
if (1 === l.nodeType) {
|
|
354
|
+
if (l.hasAttributes()) {
|
|
355
|
+
const t = [];
|
|
356
|
+
for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(o$4)) {
|
|
357
|
+
const s = a[d++];
|
|
358
|
+
if (t.push(i), void 0 !== s) {
|
|
359
|
+
const t = l.getAttribute(s.toLowerCase() + "$lit$").split(o$4),
|
|
360
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
361
|
+
c.push({
|
|
362
|
+
type: 1,
|
|
363
|
+
index: h,
|
|
364
|
+
name: i[2],
|
|
365
|
+
strings: t,
|
|
366
|
+
ctor: "." === i[1] ? M$1 : "?" === i[1] ? k$1 : "@" === i[1] ? H$1 : S$2
|
|
367
|
+
});
|
|
368
|
+
} else c.push({
|
|
369
|
+
type: 6,
|
|
370
|
+
index: h
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
for (const i of t) l.removeAttribute(i);
|
|
374
|
+
}
|
|
375
|
+
if ($$1.test(l.tagName)) {
|
|
376
|
+
const t = l.textContent.split(o$4),
|
|
377
|
+
i = t.length - 1;
|
|
378
|
+
if (i > 0) {
|
|
379
|
+
l.textContent = s$4 ? s$4.emptyScript : "";
|
|
380
|
+
for (let s = 0; s < i; s++) l.append(t[s], r$3()), A$1.nextNode(), c.push({
|
|
381
|
+
type: 2,
|
|
382
|
+
index: ++h
|
|
383
|
+
});
|
|
384
|
+
l.append(t[i], r$3());
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
} else if (8 === l.nodeType) if (l.data === n$4) c.push({
|
|
388
|
+
type: 2,
|
|
389
|
+
index: h
|
|
390
|
+
});else {
|
|
391
|
+
let t = -1;
|
|
392
|
+
for (; -1 !== (t = l.data.indexOf(o$4, t + 1));) c.push({
|
|
393
|
+
type: 7,
|
|
394
|
+
index: h
|
|
395
|
+
}), t += o$4.length - 1;
|
|
396
|
+
}
|
|
397
|
+
h++;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
static createElement(t, i) {
|
|
401
|
+
const s = h$2.createElement("template");
|
|
402
|
+
return s.innerHTML = t, s;
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
function P$1(t, i, s = t, e) {
|
|
406
|
+
var o, n, l, h;
|
|
407
|
+
if (i === x$1) return i;
|
|
408
|
+
let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
|
|
409
|
+
const u = d$1(i) ? void 0 : i._$litDirective$;
|
|
410
|
+
return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = P$1(t, r._$AS(t, i.values), r, e)), i;
|
|
411
|
+
}
|
|
412
|
+
let V$1 = class V {
|
|
413
|
+
constructor(t, i) {
|
|
414
|
+
this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
415
|
+
}
|
|
416
|
+
get parentNode() {
|
|
417
|
+
return this._$AM.parentNode;
|
|
418
|
+
}
|
|
419
|
+
get _$AU() {
|
|
420
|
+
return this._$AM._$AU;
|
|
421
|
+
}
|
|
422
|
+
v(t) {
|
|
423
|
+
var i;
|
|
424
|
+
const {
|
|
425
|
+
el: {
|
|
426
|
+
content: s
|
|
427
|
+
},
|
|
428
|
+
parts: e
|
|
429
|
+
} = this._$AD,
|
|
430
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : h$2).importNode(s, !0);
|
|
431
|
+
A$1.currentNode = o;
|
|
432
|
+
let n = A$1.nextNode(),
|
|
433
|
+
l = 0,
|
|
434
|
+
r = 0,
|
|
435
|
+
d = e[0];
|
|
436
|
+
for (; void 0 !== d;) {
|
|
437
|
+
if (l === d.index) {
|
|
438
|
+
let i;
|
|
439
|
+
2 === d.type ? i = new N$1(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new I$1(n, this, t)), this.u.push(i), d = e[++r];
|
|
440
|
+
}
|
|
441
|
+
l !== (null == d ? void 0 : d.index) && (n = A$1.nextNode(), l++);
|
|
442
|
+
}
|
|
443
|
+
return o;
|
|
444
|
+
}
|
|
445
|
+
p(t) {
|
|
446
|
+
let i = 0;
|
|
447
|
+
for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
let N$1 = class N {
|
|
451
|
+
constructor(t, i, s, e) {
|
|
452
|
+
var o;
|
|
453
|
+
this.type = 2, this._$AH = b$1, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
454
|
+
}
|
|
455
|
+
get _$AU() {
|
|
456
|
+
var t, i;
|
|
457
|
+
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
|
|
458
|
+
}
|
|
459
|
+
get parentNode() {
|
|
460
|
+
let t = this._$AA.parentNode;
|
|
461
|
+
const i = this._$AM;
|
|
462
|
+
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
463
|
+
}
|
|
464
|
+
get startNode() {
|
|
465
|
+
return this._$AA;
|
|
466
|
+
}
|
|
467
|
+
get endNode() {
|
|
468
|
+
return this._$AB;
|
|
469
|
+
}
|
|
470
|
+
_$AI(t, i = this) {
|
|
471
|
+
t = P$1(this, t, i), d$1(t) ? t === b$1 || null == t || "" === t ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t !== this._$AH && t !== x$1 && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : c$1(t) ? this.k(t) : this.g(t);
|
|
472
|
+
}
|
|
473
|
+
O(t, i = this._$AB) {
|
|
474
|
+
return this._$AA.parentNode.insertBefore(t, i);
|
|
475
|
+
}
|
|
476
|
+
T(t) {
|
|
477
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
478
|
+
}
|
|
479
|
+
g(t) {
|
|
480
|
+
this._$AH !== b$1 && d$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(h$2.createTextNode(t)), this._$AH = t;
|
|
481
|
+
}
|
|
482
|
+
$(t) {
|
|
483
|
+
var i;
|
|
484
|
+
const {
|
|
485
|
+
values: s,
|
|
486
|
+
_$litType$: e
|
|
487
|
+
} = t,
|
|
488
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = C$1.createElement(e.h, this.options)), e);
|
|
489
|
+
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
|
|
490
|
+
const t = new V$1(o, this),
|
|
491
|
+
i = t.v(this.options);
|
|
492
|
+
t.p(s), this.T(i), this._$AH = t;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
_$AC(t) {
|
|
496
|
+
let i = T$1.get(t.strings);
|
|
497
|
+
return void 0 === i && T$1.set(t.strings, i = new C$1(t)), i;
|
|
498
|
+
}
|
|
499
|
+
k(t) {
|
|
500
|
+
u$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
501
|
+
const i = this._$AH;
|
|
502
|
+
let s,
|
|
503
|
+
e = 0;
|
|
504
|
+
for (const o of t) e === i.length ? i.push(s = new N$1(this.O(r$3()), this.O(r$3()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
505
|
+
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
506
|
+
}
|
|
507
|
+
_$AR(t = this._$AA.nextSibling, i) {
|
|
508
|
+
var s;
|
|
509
|
+
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
510
|
+
const i = t.nextSibling;
|
|
511
|
+
t.remove(), t = i;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
setConnected(t) {
|
|
515
|
+
var i;
|
|
516
|
+
void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
let S$2 = class S {
|
|
520
|
+
constructor(t, i, s, e, o) {
|
|
521
|
+
this.type = 1, this._$AH = b$1, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = b$1;
|
|
522
|
+
}
|
|
523
|
+
get tagName() {
|
|
524
|
+
return this.element.tagName;
|
|
525
|
+
}
|
|
526
|
+
get _$AU() {
|
|
527
|
+
return this._$AM._$AU;
|
|
528
|
+
}
|
|
529
|
+
_$AI(t, i = this, s, e) {
|
|
530
|
+
const o = this.strings;
|
|
531
|
+
let n = !1;
|
|
532
|
+
if (void 0 === o) t = P$1(this, t, i, 0), n = !d$1(t) || t !== this._$AH && t !== x$1, n && (this._$AH = t);else {
|
|
533
|
+
const e = t;
|
|
534
|
+
let l, h;
|
|
535
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) h = P$1(this, e[s + l], i, l), h === x$1 && (h = this._$AH[l]), n || (n = !d$1(h) || h !== this._$AH[l]), h === b$1 ? t = b$1 : t !== b$1 && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
536
|
+
}
|
|
537
|
+
n && !e && this.j(t);
|
|
538
|
+
}
|
|
539
|
+
j(t) {
|
|
540
|
+
t === b$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
let M$1 = class M extends S$2 {
|
|
544
|
+
constructor() {
|
|
545
|
+
super(...arguments), this.type = 3;
|
|
546
|
+
}
|
|
547
|
+
j(t) {
|
|
548
|
+
this.element[this.name] = t === b$1 ? void 0 : t;
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
const R = s$4 ? s$4.emptyScript : "";
|
|
552
|
+
let k$1 = class k extends S$2 {
|
|
553
|
+
constructor() {
|
|
554
|
+
super(...arguments), this.type = 4;
|
|
555
|
+
}
|
|
556
|
+
j(t) {
|
|
557
|
+
t && t !== b$1 ? this.element.setAttribute(this.name, R) : this.element.removeAttribute(this.name);
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
let H$1 = class H extends S$2 {
|
|
561
|
+
constructor(t, i, s, e, o) {
|
|
562
|
+
super(t, i, s, e, o), this.type = 5;
|
|
563
|
+
}
|
|
564
|
+
_$AI(t, i = this) {
|
|
565
|
+
var s;
|
|
566
|
+
if ((t = null !== (s = P$1(this, t, i, 0)) && void 0 !== s ? s : b$1) === x$1) return;
|
|
567
|
+
const e = this._$AH,
|
|
568
|
+
o = t === b$1 && e !== b$1 || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
569
|
+
n = t !== b$1 && (e === b$1 || o);
|
|
570
|
+
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
571
|
+
}
|
|
572
|
+
handleEvent(t) {
|
|
573
|
+
var i, s;
|
|
574
|
+
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
let I$1 = class I {
|
|
578
|
+
constructor(t, i, s) {
|
|
579
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
580
|
+
}
|
|
581
|
+
get _$AU() {
|
|
582
|
+
return this._$AM._$AU;
|
|
583
|
+
}
|
|
584
|
+
_$AI(t) {
|
|
585
|
+
P$1(this, t);
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
const z$1 = i$2.litHtmlPolyfillSupport;
|
|
589
|
+
null == z$1 || z$1(C$1, N$1), (null !== (t$2 = i$2.litHtmlVersions) && void 0 !== t$2 ? t$2 : i$2.litHtmlVersions = []).push("2.5.0");
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* @license
|
|
593
|
+
* Copyright 2019 Google LLC
|
|
594
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
595
|
+
*/
|
|
596
|
+
const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
597
|
+
e$2 = Symbol(),
|
|
598
|
+
n$3 = new Map();
|
|
599
|
+
let s$3 = class s {
|
|
17
600
|
constructor(t, n) {
|
|
18
601
|
if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
19
602
|
this.cssText = t;
|
|
20
603
|
}
|
|
21
|
-
|
|
22
604
|
get styleSheet() {
|
|
23
605
|
let e = n$3.get(this.cssText);
|
|
24
606
|
return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
25
607
|
}
|
|
26
|
-
|
|
27
608
|
toString() {
|
|
28
609
|
return this.cssText;
|
|
29
610
|
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
611
|
+
};
|
|
33
612
|
const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return o$3(e);
|
|
55
|
-
})(t) : t;
|
|
613
|
+
r$2 = (t, ...n) => {
|
|
614
|
+
const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
|
|
615
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
616
|
+
if ("number" == typeof t) return t;
|
|
617
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
618
|
+
})(n) + t[s + 1], t[0]);
|
|
619
|
+
return new s$3(o, e$2);
|
|
620
|
+
},
|
|
621
|
+
i$1 = (e, n) => {
|
|
622
|
+
t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
|
|
623
|
+
const n = document.createElement("style"),
|
|
624
|
+
s = window.litNonce;
|
|
625
|
+
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
626
|
+
});
|
|
627
|
+
},
|
|
628
|
+
S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
629
|
+
let e = "";
|
|
630
|
+
for (const n of t.cssRules) e += n.cssText;
|
|
631
|
+
return o$3(e);
|
|
632
|
+
})(t) : t;
|
|
56
633
|
|
|
57
634
|
/**
|
|
58
635
|
* @license
|
|
59
636
|
* Copyright 2017 Google LLC
|
|
60
637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
638
|
*/
|
|
62
|
-
|
|
63
639
|
var s$2;
|
|
64
|
-
|
|
65
640
|
const e$1 = window.trustedTypes,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
641
|
+
r$1 = e$1 ? e$1.emptyScript : "",
|
|
642
|
+
h$1 = window.reactiveElementPolyfillSupport,
|
|
643
|
+
o$2 = {
|
|
644
|
+
toAttribute(t, i) {
|
|
645
|
+
switch (i) {
|
|
646
|
+
case Boolean:
|
|
647
|
+
t = t ? r$1 : null;
|
|
648
|
+
break;
|
|
649
|
+
case Object:
|
|
650
|
+
case Array:
|
|
651
|
+
t = null == t ? t : JSON.stringify(t);
|
|
652
|
+
}
|
|
653
|
+
return t;
|
|
654
|
+
},
|
|
655
|
+
fromAttribute(t, i) {
|
|
656
|
+
let s = t;
|
|
657
|
+
switch (i) {
|
|
658
|
+
case Boolean:
|
|
659
|
+
s = null !== t;
|
|
660
|
+
break;
|
|
661
|
+
case Number:
|
|
662
|
+
s = null === t ? null : Number(t);
|
|
663
|
+
break;
|
|
664
|
+
case Object:
|
|
665
|
+
case Array:
|
|
666
|
+
try {
|
|
667
|
+
s = JSON.parse(t);
|
|
668
|
+
} catch (t) {
|
|
669
|
+
s = null;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return s;
|
|
78
673
|
}
|
|
79
|
-
|
|
80
|
-
return t;
|
|
81
674
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
case Number:
|
|
92
|
-
s = null === t ? null : Number(t);
|
|
93
|
-
break;
|
|
94
|
-
|
|
95
|
-
case Object:
|
|
96
|
-
case Array:
|
|
97
|
-
try {
|
|
98
|
-
s = JSON.parse(t);
|
|
99
|
-
} catch (t) {
|
|
100
|
-
s = null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return s;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
110
|
-
l$3 = {
|
|
111
|
-
attribute: !0,
|
|
112
|
-
type: String,
|
|
113
|
-
converter: o$2,
|
|
114
|
-
reflect: !1,
|
|
115
|
-
hasChanged: n$2
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
class a$1 extends HTMLElement {
|
|
675
|
+
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
676
|
+
l$3 = {
|
|
677
|
+
attribute: !0,
|
|
678
|
+
type: String,
|
|
679
|
+
converter: o$2,
|
|
680
|
+
reflect: !1,
|
|
681
|
+
hasChanged: n$2
|
|
682
|
+
};
|
|
683
|
+
let a$1 = class a extends HTMLElement {
|
|
119
684
|
constructor() {
|
|
120
685
|
super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
|
|
121
686
|
}
|
|
122
|
-
|
|
123
687
|
static addInitializer(t) {
|
|
124
688
|
var i;
|
|
125
689
|
null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
|
|
126
690
|
}
|
|
127
|
-
|
|
128
691
|
static get observedAttributes() {
|
|
129
692
|
this.finalize();
|
|
130
693
|
const t = [];
|
|
131
694
|
return this.elementProperties.forEach((i, s) => {
|
|
132
695
|
const e = this._$Eh(s, i);
|
|
133
|
-
|
|
134
696
|
void 0 !== e && (this._$Eu.set(e, s), t.push(e));
|
|
135
697
|
}), t;
|
|
136
698
|
}
|
|
137
|
-
|
|
138
699
|
static createProperty(t, i = l$3) {
|
|
139
700
|
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
140
701
|
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
141
|
-
|
|
702
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
142
703
|
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
143
704
|
}
|
|
144
705
|
}
|
|
145
|
-
|
|
146
706
|
static getPropertyDescriptor(t, i, s) {
|
|
147
707
|
return {
|
|
148
708
|
get() {
|
|
149
709
|
return this[i];
|
|
150
710
|
},
|
|
151
|
-
|
|
152
711
|
set(e) {
|
|
153
712
|
const r = this[t];
|
|
154
713
|
this[i] = e, this.requestUpdate(t, r, s);
|
|
155
714
|
},
|
|
156
|
-
|
|
157
715
|
configurable: !0,
|
|
158
716
|
enumerable: !0
|
|
159
717
|
};
|
|
160
718
|
}
|
|
161
|
-
|
|
162
719
|
static getPropertyOptions(t) {
|
|
163
720
|
return this.elementProperties.get(t) || l$3;
|
|
164
721
|
}
|
|
165
|
-
|
|
166
722
|
static finalize() {
|
|
167
723
|
if (this.hasOwnProperty("finalized")) return !1;
|
|
168
724
|
this.finalized = !0;
|
|
169
725
|
const t = Object.getPrototypeOf(this);
|
|
170
|
-
|
|
171
726
|
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
172
727
|
const t = this.properties,
|
|
173
|
-
|
|
174
|
-
|
|
728
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
175
729
|
for (const s of i) this.createProperty(s, t[s]);
|
|
176
730
|
}
|
|
177
|
-
|
|
178
731
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
179
732
|
}
|
|
180
|
-
|
|
181
733
|
static finalizeStyles(i) {
|
|
182
734
|
const s = [];
|
|
183
|
-
|
|
184
735
|
if (Array.isArray(i)) {
|
|
185
736
|
const e = new Set(i.flat(1 / 0).reverse());
|
|
186
|
-
|
|
187
737
|
for (const i of e) s.unshift(S$1(i));
|
|
188
738
|
} else void 0 !== i && s.push(S$1(i));
|
|
189
|
-
|
|
190
739
|
return s;
|
|
191
740
|
}
|
|
192
|
-
|
|
193
741
|
static _$Eh(t, i) {
|
|
194
742
|
const s = i.attribute;
|
|
195
743
|
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
196
744
|
}
|
|
197
|
-
|
|
198
745
|
o() {
|
|
199
746
|
var t;
|
|
200
747
|
this._$Ep = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(t => t(this));
|
|
201
748
|
}
|
|
202
|
-
|
|
203
749
|
addController(t) {
|
|
204
750
|
var i, s;
|
|
205
751
|
(null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
206
752
|
}
|
|
207
|
-
|
|
208
753
|
removeController(t) {
|
|
209
754
|
var i;
|
|
210
755
|
null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
|
|
211
756
|
}
|
|
212
|
-
|
|
213
757
|
_$Em() {
|
|
214
758
|
this.constructor.elementProperties.forEach((t, i) => {
|
|
215
759
|
this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
|
|
216
760
|
});
|
|
217
761
|
}
|
|
218
|
-
|
|
219
762
|
createRenderRoot() {
|
|
220
763
|
var t;
|
|
221
764
|
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
222
765
|
return i$1(s, this.constructor.elementStyles), s;
|
|
223
766
|
}
|
|
224
|
-
|
|
225
767
|
connectedCallback() {
|
|
226
768
|
var t;
|
|
227
769
|
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
@@ -229,9 +771,7 @@
|
|
|
229
771
|
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
230
772
|
});
|
|
231
773
|
}
|
|
232
|
-
|
|
233
774
|
enableUpdating(t) {}
|
|
234
|
-
|
|
235
775
|
disconnectedCallback() {
|
|
236
776
|
var t;
|
|
237
777
|
null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
@@ -239,65 +779,51 @@
|
|
|
239
779
|
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
240
780
|
});
|
|
241
781
|
}
|
|
242
|
-
|
|
243
782
|
attributeChangedCallback(t, i, s) {
|
|
244
783
|
this._$AK(t, s);
|
|
245
784
|
}
|
|
246
|
-
|
|
247
785
|
_$ES(t, i, s = l$3) {
|
|
248
786
|
var e, r;
|
|
249
|
-
|
|
250
787
|
const h = this.constructor._$Eh(t, s);
|
|
251
|
-
|
|
252
788
|
if (void 0 !== h && !0 === s.reflect) {
|
|
253
789
|
const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
|
|
254
790
|
this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
|
|
255
791
|
}
|
|
256
792
|
}
|
|
257
|
-
|
|
258
793
|
_$AK(t, i) {
|
|
259
794
|
var s, e, r;
|
|
260
|
-
|
|
261
795
|
const h = this.constructor,
|
|
262
|
-
|
|
263
|
-
|
|
796
|
+
n = h._$Eu.get(t);
|
|
264
797
|
if (void 0 !== n && this._$Ei !== n) {
|
|
265
798
|
const t = h.getPropertyOptions(n),
|
|
266
|
-
|
|
267
|
-
|
|
799
|
+
l = t.converter,
|
|
800
|
+
a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$2.fromAttribute;
|
|
268
801
|
this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
|
|
269
802
|
}
|
|
270
803
|
}
|
|
271
|
-
|
|
272
804
|
requestUpdate(t, i, s) {
|
|
273
805
|
let e = !0;
|
|
274
806
|
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
|
|
275
807
|
}
|
|
276
|
-
|
|
277
808
|
async _$E_() {
|
|
278
809
|
this.isUpdatePending = !0;
|
|
279
|
-
|
|
280
810
|
try {
|
|
281
811
|
await this._$Ep;
|
|
282
812
|
} catch (t) {
|
|
283
813
|
Promise.reject(t);
|
|
284
814
|
}
|
|
285
|
-
|
|
286
815
|
const t = this.scheduleUpdate();
|
|
287
816
|
return null != t && (await t), !this.isUpdatePending;
|
|
288
817
|
}
|
|
289
|
-
|
|
290
818
|
scheduleUpdate() {
|
|
291
819
|
return this.performUpdate();
|
|
292
820
|
}
|
|
293
|
-
|
|
294
821
|
performUpdate() {
|
|
295
822
|
var t;
|
|
296
823
|
if (!this.isUpdatePending) return;
|
|
297
824
|
this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
|
|
298
825
|
let i = !1;
|
|
299
826
|
const s = this._$AL;
|
|
300
|
-
|
|
301
827
|
try {
|
|
302
828
|
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
303
829
|
var i;
|
|
@@ -306,12 +832,9 @@
|
|
|
306
832
|
} catch (t) {
|
|
307
833
|
throw i = !1, this._$EU(), t;
|
|
308
834
|
}
|
|
309
|
-
|
|
310
835
|
i && this._$AE(s);
|
|
311
836
|
}
|
|
312
|
-
|
|
313
837
|
willUpdate(t) {}
|
|
314
|
-
|
|
315
838
|
_$AE(t) {
|
|
316
839
|
var i;
|
|
317
840
|
null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
|
|
@@ -319,33 +842,24 @@
|
|
|
319
842
|
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
320
843
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
321
844
|
}
|
|
322
|
-
|
|
323
845
|
_$EU() {
|
|
324
846
|
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
325
847
|
}
|
|
326
|
-
|
|
327
848
|
get updateComplete() {
|
|
328
849
|
return this.getUpdateComplete();
|
|
329
850
|
}
|
|
330
|
-
|
|
331
851
|
getUpdateComplete() {
|
|
332
852
|
return this._$Ep;
|
|
333
853
|
}
|
|
334
|
-
|
|
335
854
|
shouldUpdate(t) {
|
|
336
855
|
return !0;
|
|
337
856
|
}
|
|
338
|
-
|
|
339
857
|
update(t) {
|
|
340
858
|
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
|
|
341
859
|
}
|
|
342
|
-
|
|
343
860
|
updated(t) {}
|
|
344
|
-
|
|
345
861
|
firstUpdated(t) {}
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
|
|
862
|
+
};
|
|
349
863
|
a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
|
|
350
864
|
mode: "open"
|
|
351
865
|
}, null == h$1 || h$1({
|
|
@@ -358,77 +872,69 @@
|
|
|
358
872
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
359
873
|
*/
|
|
360
874
|
var t;
|
|
361
|
-
|
|
362
875
|
const i = globalThis.trustedTypes,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
l = [];
|
|
410
|
-
let h,
|
|
876
|
+
s$1 = i ? i.createPolicy("lit-html", {
|
|
877
|
+
createHTML: t => t
|
|
878
|
+
}) : void 0,
|
|
879
|
+
e = `lit$${(Math.random() + "").slice(9)}$`,
|
|
880
|
+
o$1 = "?" + e,
|
|
881
|
+
n$1 = `<${o$1}>`,
|
|
882
|
+
l$2 = document,
|
|
883
|
+
h = (t = "") => l$2.createComment(t),
|
|
884
|
+
r = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
885
|
+
d = Array.isArray,
|
|
886
|
+
u = t => {
|
|
887
|
+
var i;
|
|
888
|
+
return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
|
|
889
|
+
},
|
|
890
|
+
c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
891
|
+
v = /-->/g,
|
|
892
|
+
a = />/g,
|
|
893
|
+
f = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
|
|
894
|
+
_ = /'/g,
|
|
895
|
+
m = /"/g,
|
|
896
|
+
g = /^(?:script|style|textarea|title)$/i,
|
|
897
|
+
p = t => (i, ...s) => ({
|
|
898
|
+
_$litType$: t,
|
|
899
|
+
strings: i,
|
|
900
|
+
values: s
|
|
901
|
+
}),
|
|
902
|
+
$ = p(1),
|
|
903
|
+
y = p(2),
|
|
904
|
+
b = Symbol.for("lit-noChange"),
|
|
905
|
+
w = Symbol.for("lit-nothing"),
|
|
906
|
+
T = new WeakMap(),
|
|
907
|
+
x = (t, i, s) => {
|
|
908
|
+
var e, o;
|
|
909
|
+
const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
910
|
+
let l = n._$litPart$;
|
|
911
|
+
if (void 0 === l) {
|
|
912
|
+
const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
913
|
+
n._$litPart$ = l = new N(i.insertBefore(h(), t), t, void 0, null != s ? s : {});
|
|
914
|
+
}
|
|
915
|
+
return l._$AI(t), l;
|
|
916
|
+
},
|
|
917
|
+
A = l$2.createTreeWalker(l$2, 129, null, !1),
|
|
918
|
+
C = (t, i) => {
|
|
919
|
+
const o = t.length - 1,
|
|
920
|
+
l = [];
|
|
921
|
+
let h,
|
|
411
922
|
r = 2 === i ? "<svg>" : "",
|
|
412
923
|
d = c;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
let o,
|
|
924
|
+
for (let i = 0; i < o; i++) {
|
|
925
|
+
const s = t[i];
|
|
926
|
+
let o,
|
|
417
927
|
u,
|
|
418
928
|
p = -1,
|
|
419
929
|
$ = 0;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
429
|
-
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
430
|
-
};
|
|
431
|
-
|
|
930
|
+
for (; $ < s.length && (d.lastIndex = $, u = d.exec(s), null !== u);) $ = d.lastIndex, d === c ? "!--" === u[1] ? d = v : void 0 !== u[1] ? d = a : void 0 !== u[2] ? (g.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = f) : void 0 !== u[3] && (d = f) : d === f ? ">" === u[0] ? (d = null != h ? h : c, p = -1) : void 0 === u[1] ? p = -2 : (p = d.lastIndex - u[2].length, o = u[1], d = void 0 === u[3] ? f : '"' === u[3] ? m : _) : d === m || d === _ ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
|
|
931
|
+
const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
|
|
932
|
+
r += d === c ? s + n$1 : p >= 0 ? (l.push(o), s.slice(0, p) + "$lit$" + s.slice(p) + e + y) : s + e + (-2 === p ? (l.push(void 0), i) : y);
|
|
933
|
+
}
|
|
934
|
+
const u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
|
|
935
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
936
|
+
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
937
|
+
};
|
|
432
938
|
class E {
|
|
433
939
|
constructor({
|
|
434
940
|
strings: t,
|
|
@@ -437,28 +943,24 @@
|
|
|
437
943
|
let l;
|
|
438
944
|
this.parts = [];
|
|
439
945
|
let r = 0,
|
|
440
|
-
|
|
946
|
+
d = 0;
|
|
441
947
|
const u = t.length - 1,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
948
|
+
c = this.parts,
|
|
949
|
+
[v, a] = C(t, s);
|
|
445
950
|
if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
|
|
446
951
|
const t = this.el.content,
|
|
447
|
-
|
|
952
|
+
i = t.firstChild;
|
|
448
953
|
i.remove(), t.append(...i.childNodes);
|
|
449
954
|
}
|
|
450
|
-
|
|
451
955
|
for (; null !== (l = A.nextNode()) && c.length < u;) {
|
|
452
956
|
if (1 === l.nodeType) {
|
|
453
957
|
if (l.hasAttributes()) {
|
|
454
958
|
const t = [];
|
|
455
|
-
|
|
456
959
|
for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(e)) {
|
|
457
960
|
const s = a[d++];
|
|
458
|
-
|
|
459
961
|
if (t.push(i), void 0 !== s) {
|
|
460
962
|
const t = l.getAttribute(s.toLowerCase() + "$lit$").split(e),
|
|
461
|
-
|
|
963
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
462
964
|
c.push({
|
|
463
965
|
type: 1,
|
|
464
966
|
index: r,
|
|
@@ -471,22 +973,17 @@
|
|
|
471
973
|
index: r
|
|
472
974
|
});
|
|
473
975
|
}
|
|
474
|
-
|
|
475
976
|
for (const i of t) l.removeAttribute(i);
|
|
476
977
|
}
|
|
477
|
-
|
|
478
978
|
if (g.test(l.tagName)) {
|
|
479
979
|
const t = l.textContent.split(e),
|
|
480
|
-
|
|
481
|
-
|
|
980
|
+
s = t.length - 1;
|
|
482
981
|
if (s > 0) {
|
|
483
982
|
l.textContent = i ? i.emptyScript : "";
|
|
484
|
-
|
|
485
983
|
for (let i = 0; i < s; i++) l.append(t[i], h()), A.nextNode(), c.push({
|
|
486
984
|
type: 2,
|
|
487
985
|
index: ++r
|
|
488
986
|
});
|
|
489
|
-
|
|
490
987
|
l.append(t[s], h());
|
|
491
988
|
}
|
|
492
989
|
}
|
|
@@ -495,24 +992,19 @@
|
|
|
495
992
|
index: r
|
|
496
993
|
});else {
|
|
497
994
|
let t = -1;
|
|
498
|
-
|
|
499
995
|
for (; -1 !== (t = l.data.indexOf(e, t + 1));) c.push({
|
|
500
996
|
type: 7,
|
|
501
997
|
index: r
|
|
502
998
|
}), t += e.length - 1;
|
|
503
999
|
}
|
|
504
|
-
|
|
505
1000
|
r++;
|
|
506
1001
|
}
|
|
507
1002
|
}
|
|
508
|
-
|
|
509
1003
|
static createElement(t, i) {
|
|
510
1004
|
const s = l$2.createElement("template");
|
|
511
1005
|
return s.innerHTML = t, s;
|
|
512
1006
|
}
|
|
513
|
-
|
|
514
1007
|
}
|
|
515
|
-
|
|
516
1008
|
function P(t, i, s = t, e) {
|
|
517
1009
|
var o, n, l, h;
|
|
518
1010
|
if (i === b) return i;
|
|
@@ -520,233 +1012,182 @@
|
|
|
520
1012
|
const u = r(i) ? void 0 : i._$litDirective$;
|
|
521
1013
|
return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
|
|
522
1014
|
}
|
|
523
|
-
|
|
524
1015
|
class V {
|
|
525
1016
|
constructor(t, i) {
|
|
526
1017
|
this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
527
1018
|
}
|
|
528
|
-
|
|
529
1019
|
get parentNode() {
|
|
530
1020
|
return this._$AM.parentNode;
|
|
531
1021
|
}
|
|
532
|
-
|
|
533
1022
|
get _$AU() {
|
|
534
1023
|
return this._$AM._$AU;
|
|
535
1024
|
}
|
|
536
|
-
|
|
537
1025
|
p(t) {
|
|
538
1026
|
var i;
|
|
539
1027
|
const {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
1028
|
+
el: {
|
|
1029
|
+
content: s
|
|
1030
|
+
},
|
|
1031
|
+
parts: e
|
|
1032
|
+
} = this._$AD,
|
|
1033
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
|
|
546
1034
|
A.currentNode = o;
|
|
547
1035
|
let n = A.nextNode(),
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
1036
|
+
h = 0,
|
|
1037
|
+
r = 0,
|
|
1038
|
+
d = e[0];
|
|
552
1039
|
for (; void 0 !== d;) {
|
|
553
1040
|
if (h === d.index) {
|
|
554
1041
|
let i;
|
|
555
1042
|
2 === d.type ? i = new N(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new L(n, this, t)), this.v.push(i), d = e[++r];
|
|
556
1043
|
}
|
|
557
|
-
|
|
558
1044
|
h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
|
|
559
1045
|
}
|
|
560
|
-
|
|
561
1046
|
return o;
|
|
562
1047
|
}
|
|
563
|
-
|
|
564
1048
|
m(t) {
|
|
565
1049
|
let i = 0;
|
|
566
|
-
|
|
567
1050
|
for (const s of this.v) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
568
1051
|
}
|
|
569
|
-
|
|
570
1052
|
}
|
|
571
|
-
|
|
572
1053
|
class N {
|
|
573
1054
|
constructor(t, i, s, e) {
|
|
574
1055
|
var o;
|
|
575
1056
|
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
576
1057
|
}
|
|
577
|
-
|
|
578
1058
|
get _$AU() {
|
|
579
1059
|
var t, i;
|
|
580
1060
|
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
|
|
581
1061
|
}
|
|
582
|
-
|
|
583
1062
|
get parentNode() {
|
|
584
1063
|
let t = this._$AA.parentNode;
|
|
585
1064
|
const i = this._$AM;
|
|
586
1065
|
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
587
1066
|
}
|
|
588
|
-
|
|
589
1067
|
get startNode() {
|
|
590
1068
|
return this._$AA;
|
|
591
1069
|
}
|
|
592
|
-
|
|
593
1070
|
get endNode() {
|
|
594
1071
|
return this._$AB;
|
|
595
1072
|
}
|
|
596
|
-
|
|
597
1073
|
_$AI(t, i = this) {
|
|
598
1074
|
t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.k(t) : u(t) ? this.S(t) : this.$(t);
|
|
599
1075
|
}
|
|
600
|
-
|
|
601
1076
|
A(t, i = this._$AB) {
|
|
602
1077
|
return this._$AA.parentNode.insertBefore(t, i);
|
|
603
1078
|
}
|
|
604
|
-
|
|
605
1079
|
k(t) {
|
|
606
1080
|
this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
|
|
607
1081
|
}
|
|
608
|
-
|
|
609
1082
|
$(t) {
|
|
610
1083
|
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
|
|
611
1084
|
}
|
|
612
|
-
|
|
613
1085
|
T(t) {
|
|
614
1086
|
var i;
|
|
615
1087
|
const {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
1088
|
+
values: s,
|
|
1089
|
+
_$litType$: e
|
|
1090
|
+
} = t,
|
|
1091
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
|
|
620
1092
|
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
|
|
621
1093
|
const t = new V(o, this),
|
|
622
|
-
|
|
1094
|
+
i = t.p(this.options);
|
|
623
1095
|
t.m(s), this.k(i), this._$AH = t;
|
|
624
1096
|
}
|
|
625
1097
|
}
|
|
626
|
-
|
|
627
1098
|
_$AC(t) {
|
|
628
1099
|
let i = T.get(t.strings);
|
|
629
1100
|
return void 0 === i && T.set(t.strings, i = new E(t)), i;
|
|
630
1101
|
}
|
|
631
|
-
|
|
632
1102
|
S(t) {
|
|
633
1103
|
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
634
1104
|
const i = this._$AH;
|
|
635
1105
|
let s,
|
|
636
|
-
|
|
637
|
-
|
|
1106
|
+
e = 0;
|
|
638
1107
|
for (const o of t) e === i.length ? i.push(s = new N(this.A(h()), this.A(h()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
639
|
-
|
|
640
1108
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
641
1109
|
}
|
|
642
|
-
|
|
643
1110
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
644
1111
|
var s;
|
|
645
|
-
|
|
646
1112
|
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
647
1113
|
const i = t.nextSibling;
|
|
648
1114
|
t.remove(), t = i;
|
|
649
1115
|
}
|
|
650
1116
|
}
|
|
651
|
-
|
|
652
1117
|
setConnected(t) {
|
|
653
1118
|
var i;
|
|
654
1119
|
void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
655
1120
|
}
|
|
656
|
-
|
|
657
1121
|
}
|
|
658
|
-
|
|
659
1122
|
class S {
|
|
660
1123
|
constructor(t, i, s, e, o) {
|
|
661
1124
|
this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = w;
|
|
662
1125
|
}
|
|
663
|
-
|
|
664
1126
|
get tagName() {
|
|
665
1127
|
return this.element.tagName;
|
|
666
1128
|
}
|
|
667
|
-
|
|
668
1129
|
get _$AU() {
|
|
669
1130
|
return this._$AM._$AU;
|
|
670
1131
|
}
|
|
671
|
-
|
|
672
1132
|
_$AI(t, i = this, s, e) {
|
|
673
1133
|
const o = this.strings;
|
|
674
1134
|
let n = !1;
|
|
675
1135
|
if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
|
|
676
1136
|
const e = t;
|
|
677
1137
|
let l, h;
|
|
678
|
-
|
|
679
1138
|
for (t = o[0], l = 0; l < o.length - 1; l++) h = P(this, e[s + l], i, l), h === b && (h = this._$AH[l]), n || (n = !r(h) || h !== this._$AH[l]), h === w ? t = w : t !== w && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
680
1139
|
}
|
|
681
1140
|
n && !e && this.C(t);
|
|
682
1141
|
}
|
|
683
|
-
|
|
684
1142
|
C(t) {
|
|
685
1143
|
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
686
1144
|
}
|
|
687
|
-
|
|
688
1145
|
}
|
|
689
|
-
|
|
690
1146
|
class M extends S {
|
|
691
1147
|
constructor() {
|
|
692
1148
|
super(...arguments), this.type = 3;
|
|
693
1149
|
}
|
|
694
|
-
|
|
695
1150
|
C(t) {
|
|
696
1151
|
this.element[this.name] = t === w ? void 0 : t;
|
|
697
1152
|
}
|
|
698
|
-
|
|
699
1153
|
}
|
|
700
|
-
|
|
701
1154
|
const k = i ? i.emptyScript : "";
|
|
702
|
-
|
|
703
1155
|
class H extends S {
|
|
704
1156
|
constructor() {
|
|
705
1157
|
super(...arguments), this.type = 4;
|
|
706
1158
|
}
|
|
707
|
-
|
|
708
1159
|
C(t) {
|
|
709
1160
|
t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
|
|
710
1161
|
}
|
|
711
|
-
|
|
712
1162
|
}
|
|
713
|
-
|
|
714
1163
|
class I extends S {
|
|
715
1164
|
constructor(t, i, s, e, o) {
|
|
716
1165
|
super(t, i, s, e, o), this.type = 5;
|
|
717
1166
|
}
|
|
718
|
-
|
|
719
1167
|
_$AI(t, i = this) {
|
|
720
1168
|
var s;
|
|
721
1169
|
if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
|
|
722
1170
|
const e = this._$AH,
|
|
723
|
-
|
|
724
|
-
|
|
1171
|
+
o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
1172
|
+
n = t !== w && (e === w || o);
|
|
725
1173
|
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
726
1174
|
}
|
|
727
|
-
|
|
728
1175
|
handleEvent(t) {
|
|
729
1176
|
var i, s;
|
|
730
1177
|
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
731
1178
|
}
|
|
732
|
-
|
|
733
1179
|
}
|
|
734
|
-
|
|
735
1180
|
class L {
|
|
736
1181
|
constructor(t, i, s) {
|
|
737
1182
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
738
1183
|
}
|
|
739
|
-
|
|
740
1184
|
get _$AU() {
|
|
741
1185
|
return this._$AM._$AU;
|
|
742
1186
|
}
|
|
743
|
-
|
|
744
1187
|
_$AI(t) {
|
|
745
1188
|
P(this, t);
|
|
746
1189
|
}
|
|
747
|
-
|
|
748
1190
|
}
|
|
749
|
-
|
|
750
1191
|
const z = window.litHtmlPolyfillSupport;
|
|
751
1192
|
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.2.1");
|
|
752
1193
|
|
|
@@ -755,43 +1196,34 @@
|
|
|
755
1196
|
* Copyright 2017 Google LLC
|
|
756
1197
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
757
1198
|
*/
|
|
758
|
-
|
|
759
1199
|
var l$1, o;
|
|
760
|
-
|
|
761
1200
|
class s extends a$1 {
|
|
762
1201
|
constructor() {
|
|
763
1202
|
super(...arguments), this.renderOptions = {
|
|
764
1203
|
host: this
|
|
765
1204
|
}, this._$Dt = void 0;
|
|
766
1205
|
}
|
|
767
|
-
|
|
768
1206
|
createRenderRoot() {
|
|
769
1207
|
var t, e;
|
|
770
1208
|
const i = super.createRenderRoot();
|
|
771
1209
|
return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
|
|
772
1210
|
}
|
|
773
|
-
|
|
774
1211
|
update(t) {
|
|
775
1212
|
const i = this.render();
|
|
776
1213
|
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
|
|
777
1214
|
}
|
|
778
|
-
|
|
779
1215
|
connectedCallback() {
|
|
780
1216
|
var t;
|
|
781
1217
|
super.connectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
|
|
782
1218
|
}
|
|
783
|
-
|
|
784
1219
|
disconnectedCallback() {
|
|
785
1220
|
var t;
|
|
786
1221
|
super.disconnectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
|
|
787
1222
|
}
|
|
788
|
-
|
|
789
1223
|
render() {
|
|
790
1224
|
return b;
|
|
791
1225
|
}
|
|
792
|
-
|
|
793
1226
|
}
|
|
794
|
-
|
|
795
1227
|
s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
|
|
796
1228
|
LitElement: s
|
|
797
1229
|
});
|
|
@@ -804,24 +1236,20 @@
|
|
|
804
1236
|
var noop = {
|
|
805
1237
|
value: () => {}
|
|
806
1238
|
};
|
|
807
|
-
|
|
808
1239
|
function dispatch() {
|
|
809
1240
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
810
1241
|
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
811
1242
|
_[t] = [];
|
|
812
1243
|
}
|
|
813
|
-
|
|
814
1244
|
return new Dispatch(_);
|
|
815
1245
|
}
|
|
816
|
-
|
|
817
1246
|
function Dispatch(_) {
|
|
818
1247
|
this._ = _;
|
|
819
1248
|
}
|
|
820
|
-
|
|
821
1249
|
function parseTypenames$1(typenames, types) {
|
|
822
1250
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
823
1251
|
var name = "",
|
|
824
|
-
|
|
1252
|
+
i = t.indexOf(".");
|
|
825
1253
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
826
1254
|
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
827
1255
|
return {
|
|
@@ -830,53 +1258,45 @@
|
|
|
830
1258
|
};
|
|
831
1259
|
});
|
|
832
1260
|
}
|
|
833
|
-
|
|
834
1261
|
Dispatch.prototype = dispatch.prototype = {
|
|
835
1262
|
constructor: Dispatch,
|
|
836
1263
|
on: function (typename, callback) {
|
|
837
1264
|
var _ = this._,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
1265
|
+
T = parseTypenames$1(typename + "", _),
|
|
1266
|
+
t,
|
|
1267
|
+
i = -1,
|
|
1268
|
+
n = T.length;
|
|
842
1269
|
|
|
1270
|
+
// If no callback was specified, return the callback of the given type and name.
|
|
843
1271
|
if (arguments.length < 2) {
|
|
844
1272
|
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
845
|
-
|
|
846
1273
|
return;
|
|
847
|
-
}
|
|
848
|
-
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
849
|
-
|
|
1274
|
+
}
|
|
850
1275
|
|
|
1276
|
+
// If a type was specified, set the callback for the given type and name.
|
|
1277
|
+
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
851
1278
|
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
852
|
-
|
|
853
1279
|
while (++i < n) {
|
|
854
1280
|
if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
|
|
855
1281
|
}
|
|
856
|
-
|
|
857
1282
|
return this;
|
|
858
1283
|
},
|
|
859
1284
|
copy: function () {
|
|
860
1285
|
var copy = {},
|
|
861
|
-
|
|
862
|
-
|
|
1286
|
+
_ = this._;
|
|
863
1287
|
for (var t in _) copy[t] = _[t].slice();
|
|
864
|
-
|
|
865
1288
|
return new Dispatch(copy);
|
|
866
1289
|
},
|
|
867
1290
|
call: function (type, that) {
|
|
868
1291
|
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
869
1292
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
870
|
-
|
|
871
1293
|
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
872
1294
|
},
|
|
873
1295
|
apply: function (type, that, args) {
|
|
874
1296
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
875
|
-
|
|
876
1297
|
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
877
1298
|
}
|
|
878
1299
|
};
|
|
879
|
-
|
|
880
1300
|
function get$1(type, name) {
|
|
881
1301
|
for (var i = 0, n = type.length, c; i < n; ++i) {
|
|
882
1302
|
if ((c = type[i]).name === name) {
|
|
@@ -884,7 +1304,6 @@
|
|
|
884
1304
|
}
|
|
885
1305
|
}
|
|
886
1306
|
}
|
|
887
|
-
|
|
888
1307
|
function set$1(type, name, callback) {
|
|
889
1308
|
for (var i = 0, n = type.length; i < n; ++i) {
|
|
890
1309
|
if (type[i].name === name) {
|
|
@@ -892,7 +1311,6 @@
|
|
|
892
1311
|
break;
|
|
893
1312
|
}
|
|
894
1313
|
}
|
|
895
|
-
|
|
896
1314
|
if (callback != null) type.push({
|
|
897
1315
|
name: name,
|
|
898
1316
|
value: callback
|
|
@@ -911,7 +1329,7 @@
|
|
|
911
1329
|
|
|
912
1330
|
function namespace (name) {
|
|
913
1331
|
var prefix = name += "",
|
|
914
|
-
|
|
1332
|
+
i = prefix.indexOf(":");
|
|
915
1333
|
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
916
1334
|
return namespaces.hasOwnProperty(prefix) ? {
|
|
917
1335
|
space: namespaces[prefix],
|
|
@@ -922,24 +1340,21 @@
|
|
|
922
1340
|
function creatorInherit(name) {
|
|
923
1341
|
return function () {
|
|
924
1342
|
var document = this.ownerDocument,
|
|
925
|
-
|
|
1343
|
+
uri = this.namespaceURI;
|
|
926
1344
|
return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);
|
|
927
1345
|
};
|
|
928
1346
|
}
|
|
929
|
-
|
|
930
1347
|
function creatorFixed(fullname) {
|
|
931
1348
|
return function () {
|
|
932
1349
|
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
933
1350
|
};
|
|
934
1351
|
}
|
|
935
|
-
|
|
936
1352
|
function creator (name) {
|
|
937
1353
|
var fullname = namespace(name);
|
|
938
1354
|
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
939
1355
|
}
|
|
940
1356
|
|
|
941
1357
|
function none() {}
|
|
942
|
-
|
|
943
1358
|
function selector (selector) {
|
|
944
1359
|
return selector == null ? none : function () {
|
|
945
1360
|
return this.querySelector(selector);
|
|
@@ -948,7 +1363,6 @@
|
|
|
948
1363
|
|
|
949
1364
|
function selection_select (select) {
|
|
950
1365
|
if (typeof select !== "function") select = selector(select);
|
|
951
|
-
|
|
952
1366
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
953
1367
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
954
1368
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -957,7 +1371,6 @@
|
|
|
957
1371
|
}
|
|
958
1372
|
}
|
|
959
1373
|
}
|
|
960
|
-
|
|
961
1374
|
return new Selection$1(subgroups, this._parents);
|
|
962
1375
|
}
|
|
963
1376
|
|
|
@@ -974,7 +1387,6 @@
|
|
|
974
1387
|
function empty() {
|
|
975
1388
|
return [];
|
|
976
1389
|
}
|
|
977
|
-
|
|
978
1390
|
function selectorAll (selector) {
|
|
979
1391
|
return selector == null ? empty : function () {
|
|
980
1392
|
return this.querySelectorAll(selector);
|
|
@@ -986,10 +1398,8 @@
|
|
|
986
1398
|
return array(select.apply(this, arguments));
|
|
987
1399
|
};
|
|
988
1400
|
}
|
|
989
|
-
|
|
990
1401
|
function selection_selectAll (select) {
|
|
991
1402
|
if (typeof select === "function") select = arrayAll(select);else select = selectorAll(select);
|
|
992
|
-
|
|
993
1403
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
994
1404
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
995
1405
|
if (node = group[i]) {
|
|
@@ -998,7 +1408,6 @@
|
|
|
998
1408
|
}
|
|
999
1409
|
}
|
|
1000
1410
|
}
|
|
1001
|
-
|
|
1002
1411
|
return new Selection$1(subgroups, parents);
|
|
1003
1412
|
}
|
|
1004
1413
|
|
|
@@ -1014,40 +1423,33 @@
|
|
|
1014
1423
|
}
|
|
1015
1424
|
|
|
1016
1425
|
var find = Array.prototype.find;
|
|
1017
|
-
|
|
1018
1426
|
function childFind(match) {
|
|
1019
1427
|
return function () {
|
|
1020
1428
|
return find.call(this.children, match);
|
|
1021
1429
|
};
|
|
1022
1430
|
}
|
|
1023
|
-
|
|
1024
1431
|
function childFirst() {
|
|
1025
1432
|
return this.firstElementChild;
|
|
1026
1433
|
}
|
|
1027
|
-
|
|
1028
1434
|
function selection_selectChild (match) {
|
|
1029
1435
|
return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
1030
1436
|
}
|
|
1031
1437
|
|
|
1032
1438
|
var filter = Array.prototype.filter;
|
|
1033
|
-
|
|
1034
1439
|
function children() {
|
|
1035
1440
|
return Array.from(this.children);
|
|
1036
1441
|
}
|
|
1037
|
-
|
|
1038
1442
|
function childrenFilter(match) {
|
|
1039
1443
|
return function () {
|
|
1040
1444
|
return filter.call(this.children, match);
|
|
1041
1445
|
};
|
|
1042
1446
|
}
|
|
1043
|
-
|
|
1044
1447
|
function selection_selectChildren (match) {
|
|
1045
1448
|
return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
1046
1449
|
}
|
|
1047
1450
|
|
|
1048
1451
|
function selection_filter (match) {
|
|
1049
1452
|
if (typeof match !== "function") match = matcher(match);
|
|
1050
|
-
|
|
1051
1453
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1052
1454
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
1053
1455
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -1055,7 +1457,6 @@
|
|
|
1055
1457
|
}
|
|
1056
1458
|
}
|
|
1057
1459
|
}
|
|
1058
|
-
|
|
1059
1460
|
return new Selection$1(subgroups, this._parents);
|
|
1060
1461
|
}
|
|
1061
1462
|
|
|
@@ -1097,12 +1498,13 @@
|
|
|
1097
1498
|
|
|
1098
1499
|
function bindIndex(parent, group, enter, update, exit, data) {
|
|
1099
1500
|
var i = 0,
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1501
|
+
node,
|
|
1502
|
+
groupLength = group.length,
|
|
1503
|
+
dataLength = data.length;
|
|
1504
|
+
|
|
1505
|
+
// Put any non-null nodes that fit into update.
|
|
1103
1506
|
// Put any null nodes into enter.
|
|
1104
1507
|
// Put any remaining data into enter.
|
|
1105
|
-
|
|
1106
1508
|
for (; i < dataLength; ++i) {
|
|
1107
1509
|
if (node = group[i]) {
|
|
1108
1510
|
node.__data__ = data[i];
|
|
@@ -1110,44 +1512,42 @@
|
|
|
1110
1512
|
} else {
|
|
1111
1513
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1112
1514
|
}
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1515
|
+
}
|
|
1115
1516
|
|
|
1517
|
+
// Put any non-null nodes that don’t fit into exit.
|
|
1116
1518
|
for (; i < groupLength; ++i) {
|
|
1117
1519
|
if (node = group[i]) {
|
|
1118
1520
|
exit[i] = node;
|
|
1119
1521
|
}
|
|
1120
1522
|
}
|
|
1121
1523
|
}
|
|
1122
|
-
|
|
1123
1524
|
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
1124
1525
|
var i,
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1526
|
+
node,
|
|
1527
|
+
nodeByKeyValue = new Map(),
|
|
1528
|
+
groupLength = group.length,
|
|
1529
|
+
dataLength = data.length,
|
|
1530
|
+
keyValues = new Array(groupLength),
|
|
1531
|
+
keyValue;
|
|
1532
|
+
|
|
1533
|
+
// Compute the key for each node.
|
|
1131
1534
|
// If multiple nodes have the same key, the duplicates are added to exit.
|
|
1132
|
-
|
|
1133
1535
|
for (i = 0; i < groupLength; ++i) {
|
|
1134
1536
|
if (node = group[i]) {
|
|
1135
1537
|
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
1136
|
-
|
|
1137
1538
|
if (nodeByKeyValue.has(keyValue)) {
|
|
1138
1539
|
exit[i] = node;
|
|
1139
1540
|
} else {
|
|
1140
1541
|
nodeByKeyValue.set(keyValue, node);
|
|
1141
1542
|
}
|
|
1142
1543
|
}
|
|
1143
|
-
}
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// Compute the key for each datum.
|
|
1144
1547
|
// If there a node associated with this key, join and add it to update.
|
|
1145
1548
|
// If there is not (or the key is a duplicate), add it to enter.
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
1549
|
for (i = 0; i < dataLength; ++i) {
|
|
1149
1550
|
keyValue = key.call(parent, data[i], i, data) + "";
|
|
1150
|
-
|
|
1151
1551
|
if (node = nodeByKeyValue.get(keyValue)) {
|
|
1152
1552
|
update[i] = node;
|
|
1153
1553
|
node.__data__ = data[i];
|
|
@@ -1155,62 +1555,58 @@
|
|
|
1155
1555
|
} else {
|
|
1156
1556
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1157
1557
|
}
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1558
|
+
}
|
|
1160
1559
|
|
|
1560
|
+
// Add any remaining nodes that were not bound to data to exit.
|
|
1161
1561
|
for (i = 0; i < groupLength; ++i) {
|
|
1162
1562
|
if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
|
|
1163
1563
|
exit[i] = node;
|
|
1164
1564
|
}
|
|
1165
1565
|
}
|
|
1166
1566
|
}
|
|
1167
|
-
|
|
1168
1567
|
function datum(node) {
|
|
1169
1568
|
return node.__data__;
|
|
1170
1569
|
}
|
|
1171
|
-
|
|
1172
1570
|
function selection_data (value, key) {
|
|
1173
1571
|
if (!arguments.length) return Array.from(this, datum);
|
|
1174
1572
|
var bind = key ? bindKey : bindIndex,
|
|
1175
|
-
|
|
1176
|
-
|
|
1573
|
+
parents = this._parents,
|
|
1574
|
+
groups = this._groups;
|
|
1177
1575
|
if (typeof value !== "function") value = constant$1(value);
|
|
1178
|
-
|
|
1179
1576
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
1180
1577
|
var parent = parents[j],
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1578
|
+
group = groups[j],
|
|
1579
|
+
groupLength = group.length,
|
|
1580
|
+
data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
|
|
1581
|
+
dataLength = data.length,
|
|
1582
|
+
enterGroup = enter[j] = new Array(dataLength),
|
|
1583
|
+
updateGroup = update[j] = new Array(dataLength),
|
|
1584
|
+
exitGroup = exit[j] = new Array(groupLength);
|
|
1585
|
+
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1586
|
+
|
|
1587
|
+
// Now connect the enter nodes to their following update node, such that
|
|
1189
1588
|
// appendChild can insert the materialized enter node before this node,
|
|
1190
1589
|
// rather than at the end of the parent node.
|
|
1191
|
-
|
|
1192
1590
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
1193
1591
|
if (previous = enterGroup[i0]) {
|
|
1194
1592
|
if (i0 >= i1) i1 = i0 + 1;
|
|
1195
|
-
|
|
1196
1593
|
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
1197
|
-
|
|
1198
1594
|
previous._next = next || null;
|
|
1199
1595
|
}
|
|
1200
1596
|
}
|
|
1201
1597
|
}
|
|
1202
|
-
|
|
1203
1598
|
update = new Selection$1(update, parents);
|
|
1204
1599
|
update._enter = enter;
|
|
1205
1600
|
update._exit = exit;
|
|
1206
1601
|
return update;
|
|
1207
|
-
}
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
// Given some data, this returns an array-like view of it: an object that
|
|
1208
1605
|
// exposes a length property and allows numeric indexing. Note that unlike
|
|
1209
1606
|
// selectAll, this isn’t worried about “live” collections because the resulting
|
|
1210
1607
|
// array will only be used briefly while data is being bound. (It is possible to
|
|
1211
1608
|
// cause the data to change while iterating by using a key function, but please
|
|
1212
1609
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
1213
|
-
|
|
1214
1610
|
function arraylike(data) {
|
|
1215
1611
|
return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
1216
1612
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
@@ -1222,28 +1618,24 @@
|
|
|
1222
1618
|
|
|
1223
1619
|
function selection_join (onenter, onupdate, onexit) {
|
|
1224
1620
|
var enter = this.enter(),
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1621
|
+
update = this,
|
|
1622
|
+
exit = this.exit();
|
|
1228
1623
|
if (typeof onenter === "function") {
|
|
1229
1624
|
enter = onenter(enter);
|
|
1230
1625
|
if (enter) enter = enter.selection();
|
|
1231
1626
|
} else {
|
|
1232
1627
|
enter = enter.append(onenter + "");
|
|
1233
1628
|
}
|
|
1234
|
-
|
|
1235
1629
|
if (onupdate != null) {
|
|
1236
1630
|
update = onupdate(update);
|
|
1237
1631
|
if (update) update = update.selection();
|
|
1238
1632
|
}
|
|
1239
|
-
|
|
1240
1633
|
if (onexit == null) exit.remove();else onexit(exit);
|
|
1241
1634
|
return enter && update ? enter.merge(update).order() : update;
|
|
1242
1635
|
}
|
|
1243
1636
|
|
|
1244
1637
|
function selection_merge (context) {
|
|
1245
1638
|
var selection = context.selection ? context.selection() : context;
|
|
1246
|
-
|
|
1247
1639
|
for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
1248
1640
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1249
1641
|
if (node = group0[i] || group1[i]) {
|
|
@@ -1251,11 +1643,9 @@
|
|
|
1251
1643
|
}
|
|
1252
1644
|
}
|
|
1253
1645
|
}
|
|
1254
|
-
|
|
1255
1646
|
for (; j < m0; ++j) {
|
|
1256
1647
|
merges[j] = groups0[j];
|
|
1257
1648
|
}
|
|
1258
|
-
|
|
1259
1649
|
return new Selection$1(merges, this._parents);
|
|
1260
1650
|
}
|
|
1261
1651
|
|
|
@@ -1268,30 +1658,24 @@
|
|
|
1268
1658
|
}
|
|
1269
1659
|
}
|
|
1270
1660
|
}
|
|
1271
|
-
|
|
1272
1661
|
return this;
|
|
1273
1662
|
}
|
|
1274
1663
|
|
|
1275
1664
|
function selection_sort (compare) {
|
|
1276
1665
|
if (!compare) compare = ascending;
|
|
1277
|
-
|
|
1278
1666
|
function compareNode(a, b) {
|
|
1279
1667
|
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
1280
1668
|
}
|
|
1281
|
-
|
|
1282
1669
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1283
1670
|
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1284
1671
|
if (node = group[i]) {
|
|
1285
1672
|
sortgroup[i] = node;
|
|
1286
1673
|
}
|
|
1287
1674
|
}
|
|
1288
|
-
|
|
1289
1675
|
sortgroup.sort(compareNode);
|
|
1290
1676
|
}
|
|
1291
|
-
|
|
1292
1677
|
return new Selection$1(sortgroups, this._parents).order();
|
|
1293
1678
|
}
|
|
1294
|
-
|
|
1295
1679
|
function ascending(a, b) {
|
|
1296
1680
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1297
1681
|
}
|
|
@@ -1314,16 +1698,12 @@
|
|
|
1314
1698
|
if (node) return node;
|
|
1315
1699
|
}
|
|
1316
1700
|
}
|
|
1317
|
-
|
|
1318
1701
|
return null;
|
|
1319
1702
|
}
|
|
1320
1703
|
|
|
1321
1704
|
function selection_size () {
|
|
1322
1705
|
let size = 0;
|
|
1323
|
-
|
|
1324
1706
|
for (const node of this) ++size; // eslint-disable-line no-unused-vars
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
1707
|
return size;
|
|
1328
1708
|
}
|
|
1329
1709
|
|
|
@@ -1337,7 +1717,6 @@
|
|
|
1337
1717
|
if (node = group[i]) callback.call(node, node.__data__, i, group);
|
|
1338
1718
|
}
|
|
1339
1719
|
}
|
|
1340
|
-
|
|
1341
1720
|
return this;
|
|
1342
1721
|
}
|
|
1343
1722
|
|
|
@@ -1346,47 +1725,39 @@
|
|
|
1346
1725
|
this.removeAttribute(name);
|
|
1347
1726
|
};
|
|
1348
1727
|
}
|
|
1349
|
-
|
|
1350
1728
|
function attrRemoveNS$1(fullname) {
|
|
1351
1729
|
return function () {
|
|
1352
1730
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
1353
1731
|
};
|
|
1354
1732
|
}
|
|
1355
|
-
|
|
1356
1733
|
function attrConstant$1(name, value) {
|
|
1357
1734
|
return function () {
|
|
1358
1735
|
this.setAttribute(name, value);
|
|
1359
1736
|
};
|
|
1360
1737
|
}
|
|
1361
|
-
|
|
1362
1738
|
function attrConstantNS$1(fullname, value) {
|
|
1363
1739
|
return function () {
|
|
1364
1740
|
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
1365
1741
|
};
|
|
1366
1742
|
}
|
|
1367
|
-
|
|
1368
1743
|
function attrFunction$1(name, value) {
|
|
1369
1744
|
return function () {
|
|
1370
1745
|
var v = value.apply(this, arguments);
|
|
1371
1746
|
if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);
|
|
1372
1747
|
};
|
|
1373
1748
|
}
|
|
1374
|
-
|
|
1375
1749
|
function attrFunctionNS$1(fullname, value) {
|
|
1376
1750
|
return function () {
|
|
1377
1751
|
var v = value.apply(this, arguments);
|
|
1378
1752
|
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
1379
1753
|
};
|
|
1380
1754
|
}
|
|
1381
|
-
|
|
1382
1755
|
function selection_attr (name, value) {
|
|
1383
1756
|
var fullname = namespace(name);
|
|
1384
|
-
|
|
1385
1757
|
if (arguments.length < 2) {
|
|
1386
1758
|
var node = this.node();
|
|
1387
1759
|
return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
|
|
1388
1760
|
}
|
|
1389
|
-
|
|
1390
1761
|
return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
|
|
1391
1762
|
}
|
|
1392
1763
|
|
|
@@ -1401,20 +1772,17 @@
|
|
|
1401
1772
|
this.style.removeProperty(name);
|
|
1402
1773
|
};
|
|
1403
1774
|
}
|
|
1404
|
-
|
|
1405
1775
|
function styleConstant$1(name, value, priority) {
|
|
1406
1776
|
return function () {
|
|
1407
1777
|
this.style.setProperty(name, value, priority);
|
|
1408
1778
|
};
|
|
1409
1779
|
}
|
|
1410
|
-
|
|
1411
1780
|
function styleFunction$1(name, value, priority) {
|
|
1412
1781
|
return function () {
|
|
1413
1782
|
var v = value.apply(this, arguments);
|
|
1414
1783
|
if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);
|
|
1415
1784
|
};
|
|
1416
1785
|
}
|
|
1417
|
-
|
|
1418
1786
|
function selection_style (name, value, priority) {
|
|
1419
1787
|
return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
|
|
1420
1788
|
}
|
|
@@ -1427,20 +1795,17 @@
|
|
|
1427
1795
|
delete this[name];
|
|
1428
1796
|
};
|
|
1429
1797
|
}
|
|
1430
|
-
|
|
1431
1798
|
function propertyConstant(name, value) {
|
|
1432
1799
|
return function () {
|
|
1433
1800
|
this[name] = value;
|
|
1434
1801
|
};
|
|
1435
1802
|
}
|
|
1436
|
-
|
|
1437
1803
|
function propertyFunction(name, value) {
|
|
1438
1804
|
return function () {
|
|
1439
1805
|
var v = value.apply(this, arguments);
|
|
1440
1806
|
if (v == null) delete this[name];else this[name] = v;
|
|
1441
1807
|
};
|
|
1442
1808
|
}
|
|
1443
|
-
|
|
1444
1809
|
function selection_property (name, value) {
|
|
1445
1810
|
return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
|
|
1446
1811
|
}
|
|
@@ -1448,32 +1813,25 @@
|
|
|
1448
1813
|
function classArray(string) {
|
|
1449
1814
|
return string.trim().split(/^|\s+/);
|
|
1450
1815
|
}
|
|
1451
|
-
|
|
1452
1816
|
function classList(node) {
|
|
1453
1817
|
return node.classList || new ClassList(node);
|
|
1454
1818
|
}
|
|
1455
|
-
|
|
1456
1819
|
function ClassList(node) {
|
|
1457
1820
|
this._node = node;
|
|
1458
1821
|
this._names = classArray(node.getAttribute("class") || "");
|
|
1459
1822
|
}
|
|
1460
|
-
|
|
1461
1823
|
ClassList.prototype = {
|
|
1462
1824
|
add: function (name) {
|
|
1463
1825
|
var i = this._names.indexOf(name);
|
|
1464
|
-
|
|
1465
1826
|
if (i < 0) {
|
|
1466
1827
|
this._names.push(name);
|
|
1467
|
-
|
|
1468
1828
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1469
1829
|
}
|
|
1470
1830
|
},
|
|
1471
1831
|
remove: function (name) {
|
|
1472
1832
|
var i = this._names.indexOf(name);
|
|
1473
|
-
|
|
1474
1833
|
if (i >= 0) {
|
|
1475
1834
|
this._names.splice(i, 1);
|
|
1476
|
-
|
|
1477
1835
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1478
1836
|
}
|
|
1479
1837
|
},
|
|
@@ -1481,74 +1839,59 @@
|
|
|
1481
1839
|
return this._names.indexOf(name) >= 0;
|
|
1482
1840
|
}
|
|
1483
1841
|
};
|
|
1484
|
-
|
|
1485
1842
|
function classedAdd(node, names) {
|
|
1486
1843
|
var list = classList(node),
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1844
|
+
i = -1,
|
|
1845
|
+
n = names.length;
|
|
1490
1846
|
while (++i < n) list.add(names[i]);
|
|
1491
1847
|
}
|
|
1492
|
-
|
|
1493
1848
|
function classedRemove(node, names) {
|
|
1494
1849
|
var list = classList(node),
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1850
|
+
i = -1,
|
|
1851
|
+
n = names.length;
|
|
1498
1852
|
while (++i < n) list.remove(names[i]);
|
|
1499
1853
|
}
|
|
1500
|
-
|
|
1501
1854
|
function classedTrue(names) {
|
|
1502
1855
|
return function () {
|
|
1503
1856
|
classedAdd(this, names);
|
|
1504
1857
|
};
|
|
1505
1858
|
}
|
|
1506
|
-
|
|
1507
1859
|
function classedFalse(names) {
|
|
1508
1860
|
return function () {
|
|
1509
1861
|
classedRemove(this, names);
|
|
1510
1862
|
};
|
|
1511
1863
|
}
|
|
1512
|
-
|
|
1513
1864
|
function classedFunction(names, value) {
|
|
1514
1865
|
return function () {
|
|
1515
1866
|
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
1516
1867
|
};
|
|
1517
1868
|
}
|
|
1518
|
-
|
|
1519
1869
|
function selection_classed (name, value) {
|
|
1520
1870
|
var names = classArray(name + "");
|
|
1521
|
-
|
|
1522
1871
|
if (arguments.length < 2) {
|
|
1523
1872
|
var list = classList(this.node()),
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1873
|
+
i = -1,
|
|
1874
|
+
n = names.length;
|
|
1527
1875
|
while (++i < n) if (!list.contains(names[i])) return false;
|
|
1528
|
-
|
|
1529
1876
|
return true;
|
|
1530
1877
|
}
|
|
1531
|
-
|
|
1532
1878
|
return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
|
|
1533
1879
|
}
|
|
1534
1880
|
|
|
1535
1881
|
function textRemove() {
|
|
1536
1882
|
this.textContent = "";
|
|
1537
1883
|
}
|
|
1538
|
-
|
|
1539
1884
|
function textConstant$1(value) {
|
|
1540
1885
|
return function () {
|
|
1541
1886
|
this.textContent = value;
|
|
1542
1887
|
};
|
|
1543
1888
|
}
|
|
1544
|
-
|
|
1545
1889
|
function textFunction$1(value) {
|
|
1546
1890
|
return function () {
|
|
1547
1891
|
var v = value.apply(this, arguments);
|
|
1548
1892
|
this.textContent = v == null ? "" : v;
|
|
1549
1893
|
};
|
|
1550
1894
|
}
|
|
1551
|
-
|
|
1552
1895
|
function selection_text (value) {
|
|
1553
1896
|
return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
|
|
1554
1897
|
}
|
|
@@ -1556,20 +1899,17 @@
|
|
|
1556
1899
|
function htmlRemove() {
|
|
1557
1900
|
this.innerHTML = "";
|
|
1558
1901
|
}
|
|
1559
|
-
|
|
1560
1902
|
function htmlConstant(value) {
|
|
1561
1903
|
return function () {
|
|
1562
1904
|
this.innerHTML = value;
|
|
1563
1905
|
};
|
|
1564
1906
|
}
|
|
1565
|
-
|
|
1566
1907
|
function htmlFunction(value) {
|
|
1567
1908
|
return function () {
|
|
1568
1909
|
var v = value.apply(this, arguments);
|
|
1569
1910
|
this.innerHTML = v == null ? "" : v;
|
|
1570
1911
|
};
|
|
1571
1912
|
}
|
|
1572
|
-
|
|
1573
1913
|
function selection_html (value) {
|
|
1574
1914
|
return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
|
|
1575
1915
|
}
|
|
@@ -1577,7 +1917,6 @@
|
|
|
1577
1917
|
function raise() {
|
|
1578
1918
|
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
1579
1919
|
}
|
|
1580
|
-
|
|
1581
1920
|
function selection_raise () {
|
|
1582
1921
|
return this.each(raise);
|
|
1583
1922
|
}
|
|
@@ -1585,7 +1924,6 @@
|
|
|
1585
1924
|
function lower() {
|
|
1586
1925
|
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
1587
1926
|
}
|
|
1588
|
-
|
|
1589
1927
|
function selection_lower () {
|
|
1590
1928
|
return this.each(lower);
|
|
1591
1929
|
}
|
|
@@ -1600,10 +1938,9 @@
|
|
|
1600
1938
|
function constantNull() {
|
|
1601
1939
|
return null;
|
|
1602
1940
|
}
|
|
1603
|
-
|
|
1604
1941
|
function selection_insert (name, before) {
|
|
1605
1942
|
var create = typeof name === "function" ? name : creator(name),
|
|
1606
|
-
|
|
1943
|
+
select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
|
|
1607
1944
|
return this.select(function () {
|
|
1608
1945
|
return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
|
|
1609
1946
|
});
|
|
@@ -1613,23 +1950,20 @@
|
|
|
1613
1950
|
var parent = this.parentNode;
|
|
1614
1951
|
if (parent) parent.removeChild(this);
|
|
1615
1952
|
}
|
|
1616
|
-
|
|
1617
1953
|
function selection_remove () {
|
|
1618
1954
|
return this.each(remove);
|
|
1619
1955
|
}
|
|
1620
1956
|
|
|
1621
1957
|
function selection_cloneShallow() {
|
|
1622
1958
|
var clone = this.cloneNode(false),
|
|
1623
|
-
|
|
1959
|
+
parent = this.parentNode;
|
|
1624
1960
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1625
1961
|
}
|
|
1626
|
-
|
|
1627
1962
|
function selection_cloneDeep() {
|
|
1628
1963
|
var clone = this.cloneNode(true),
|
|
1629
|
-
|
|
1964
|
+
parent = this.parentNode;
|
|
1630
1965
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1631
1966
|
}
|
|
1632
|
-
|
|
1633
1967
|
function selection_clone (deep) {
|
|
1634
1968
|
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
1635
1969
|
}
|
|
@@ -1643,11 +1977,10 @@
|
|
|
1643
1977
|
listener.call(this, event, this.__data__);
|
|
1644
1978
|
};
|
|
1645
1979
|
}
|
|
1646
|
-
|
|
1647
1980
|
function parseTypenames(typenames) {
|
|
1648
1981
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
1649
1982
|
var name = "",
|
|
1650
|
-
|
|
1983
|
+
i = t.indexOf(".");
|
|
1651
1984
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
1652
1985
|
return {
|
|
1653
1986
|
type: t,
|
|
@@ -1655,12 +1988,10 @@
|
|
|
1655
1988
|
};
|
|
1656
1989
|
});
|
|
1657
1990
|
}
|
|
1658
|
-
|
|
1659
1991
|
function onRemove(typename) {
|
|
1660
1992
|
return function () {
|
|
1661
1993
|
var on = this.__on;
|
|
1662
1994
|
if (!on) return;
|
|
1663
|
-
|
|
1664
1995
|
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
|
|
1665
1996
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
1666
1997
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1668,16 +1999,14 @@
|
|
|
1668
1999
|
on[++i] = o;
|
|
1669
2000
|
}
|
|
1670
2001
|
}
|
|
1671
|
-
|
|
1672
2002
|
if (++i) on.length = i;else delete this.__on;
|
|
1673
2003
|
};
|
|
1674
2004
|
}
|
|
1675
|
-
|
|
1676
2005
|
function onAdd(typename, value, options) {
|
|
1677
2006
|
return function () {
|
|
1678
2007
|
var on = this.__on,
|
|
1679
|
-
|
|
1680
|
-
|
|
2008
|
+
o,
|
|
2009
|
+
listener = contextListener(value);
|
|
1681
2010
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
1682
2011
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
1683
2012
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1697,16 +2026,13 @@
|
|
|
1697
2026
|
if (!on) this.__on = [o];else on.push(o);
|
|
1698
2027
|
};
|
|
1699
2028
|
}
|
|
1700
|
-
|
|
1701
2029
|
function selection_on (typename, value, options) {
|
|
1702
2030
|
var typenames = parseTypenames(typename + ""),
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
2031
|
+
i,
|
|
2032
|
+
n = typenames.length,
|
|
2033
|
+
t;
|
|
1707
2034
|
if (arguments.length < 2) {
|
|
1708
2035
|
var on = this.node().__on;
|
|
1709
|
-
|
|
1710
2036
|
if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
|
|
1711
2037
|
for (i = 0, o = on[j]; i < n; ++i) {
|
|
1712
2038
|
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
@@ -1716,40 +2042,32 @@
|
|
|
1716
2042
|
}
|
|
1717
2043
|
return;
|
|
1718
2044
|
}
|
|
1719
|
-
|
|
1720
2045
|
on = value ? onAdd : onRemove;
|
|
1721
|
-
|
|
1722
2046
|
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
1723
|
-
|
|
1724
2047
|
return this;
|
|
1725
2048
|
}
|
|
1726
2049
|
|
|
1727
2050
|
function dispatchEvent(node, type, params) {
|
|
1728
2051
|
var window = defaultView(node),
|
|
1729
|
-
|
|
1730
|
-
|
|
2052
|
+
event = window.CustomEvent;
|
|
1731
2053
|
if (typeof event === "function") {
|
|
1732
2054
|
event = new event(type, params);
|
|
1733
2055
|
} else {
|
|
1734
2056
|
event = window.document.createEvent("Event");
|
|
1735
2057
|
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);
|
|
1736
2058
|
}
|
|
1737
|
-
|
|
1738
2059
|
node.dispatchEvent(event);
|
|
1739
2060
|
}
|
|
1740
|
-
|
|
1741
2061
|
function dispatchConstant(type, params) {
|
|
1742
2062
|
return function () {
|
|
1743
2063
|
return dispatchEvent(this, type, params);
|
|
1744
2064
|
};
|
|
1745
2065
|
}
|
|
1746
|
-
|
|
1747
2066
|
function dispatchFunction(type, params) {
|
|
1748
2067
|
return function () {
|
|
1749
2068
|
return dispatchEvent(this, type, params.apply(this, arguments));
|
|
1750
2069
|
};
|
|
1751
2070
|
}
|
|
1752
|
-
|
|
1753
2071
|
function selection_dispatch (type, params) {
|
|
1754
2072
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
1755
2073
|
}
|
|
@@ -1767,15 +2085,12 @@
|
|
|
1767
2085
|
this._groups = groups;
|
|
1768
2086
|
this._parents = parents;
|
|
1769
2087
|
}
|
|
1770
|
-
|
|
1771
2088
|
function selection() {
|
|
1772
2089
|
return new Selection$1([[document.documentElement]], root);
|
|
1773
2090
|
}
|
|
1774
|
-
|
|
1775
2091
|
function selection_selection() {
|
|
1776
2092
|
return this;
|
|
1777
2093
|
}
|
|
1778
|
-
|
|
1779
2094
|
Selection$1.prototype = selection.prototype = {
|
|
1780
2095
|
constructor: Selection$1,
|
|
1781
2096
|
select: selection_select,
|
|
@@ -1825,9 +2140,7 @@
|
|
|
1825
2140
|
}
|
|
1826
2141
|
function extend(parent, definition) {
|
|
1827
2142
|
var prototype = Object.create(parent.prototype);
|
|
1828
|
-
|
|
1829
2143
|
for (var key in definition) prototype[key] = definition[key];
|
|
1830
|
-
|
|
1831
2144
|
return prototype;
|
|
1832
2145
|
}
|
|
1833
2146
|
|
|
@@ -1835,15 +2148,15 @@
|
|
|
1835
2148
|
var darker = 0.7;
|
|
1836
2149
|
var brighter = 1 / darker;
|
|
1837
2150
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
2151
|
+
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
2152
|
+
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
2153
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
2154
|
+
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
2155
|
+
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
2156
|
+
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
2157
|
+
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
2158
|
+
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
2159
|
+
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
1847
2160
|
var named = {
|
|
1848
2161
|
aliceblue: 0xf0f8ff,
|
|
1849
2162
|
antiquewhite: 0xfaebd7,
|
|
@@ -2008,19 +2321,15 @@
|
|
|
2008
2321
|
formatRgb: color_formatRgb,
|
|
2009
2322
|
toString: color_formatRgb
|
|
2010
2323
|
});
|
|
2011
|
-
|
|
2012
2324
|
function color_formatHex() {
|
|
2013
2325
|
return this.rgb().formatHex();
|
|
2014
2326
|
}
|
|
2015
|
-
|
|
2016
2327
|
function color_formatHsl() {
|
|
2017
2328
|
return hslConvert(this).formatHsl();
|
|
2018
2329
|
}
|
|
2019
|
-
|
|
2020
2330
|
function color_formatRgb() {
|
|
2021
2331
|
return this.rgb().formatRgb();
|
|
2022
2332
|
}
|
|
2023
|
-
|
|
2024
2333
|
function color(format) {
|
|
2025
2334
|
var m, l;
|
|
2026
2335
|
format = (format + "").trim().toLowerCase();
|
|
@@ -2038,16 +2347,13 @@
|
|
|
2038
2347
|
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
2039
2348
|
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
2040
2349
|
}
|
|
2041
|
-
|
|
2042
2350
|
function rgbn(n) {
|
|
2043
2351
|
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2044
2352
|
}
|
|
2045
|
-
|
|
2046
2353
|
function rgba(r, g, b, a) {
|
|
2047
2354
|
if (a <= 0) r = g = b = NaN;
|
|
2048
2355
|
return new Rgb(r, g, b, a);
|
|
2049
2356
|
}
|
|
2050
|
-
|
|
2051
2357
|
function rgbConvert(o) {
|
|
2052
2358
|
if (!(o instanceof Color)) o = color(o);
|
|
2053
2359
|
if (!o) return new Rgb();
|
|
@@ -2084,27 +2390,22 @@
|
|
|
2084
2390
|
formatRgb: rgb_formatRgb,
|
|
2085
2391
|
toString: rgb_formatRgb
|
|
2086
2392
|
}));
|
|
2087
|
-
|
|
2088
2393
|
function rgb_formatHex() {
|
|
2089
2394
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
2090
2395
|
}
|
|
2091
|
-
|
|
2092
2396
|
function rgb_formatRgb() {
|
|
2093
2397
|
var a = this.opacity;
|
|
2094
2398
|
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2095
2399
|
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
|
2096
2400
|
}
|
|
2097
|
-
|
|
2098
2401
|
function hex(value) {
|
|
2099
2402
|
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2100
2403
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2101
2404
|
}
|
|
2102
|
-
|
|
2103
2405
|
function hsla(h, s, l, a) {
|
|
2104
2406
|
if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;
|
|
2105
2407
|
return new Hsl(h, s, l, a);
|
|
2106
2408
|
}
|
|
2107
|
-
|
|
2108
2409
|
function hslConvert(o) {
|
|
2109
2410
|
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
2110
2411
|
if (!(o instanceof Color)) o = color(o);
|
|
@@ -2112,14 +2413,13 @@
|
|
|
2112
2413
|
if (o instanceof Hsl) return o;
|
|
2113
2414
|
o = o.rgb();
|
|
2114
2415
|
var r = o.r / 255,
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2416
|
+
g = o.g / 255,
|
|
2417
|
+
b = o.b / 255,
|
|
2418
|
+
min = Math.min(r, g, b),
|
|
2419
|
+
max = Math.max(r, g, b),
|
|
2420
|
+
h = NaN,
|
|
2421
|
+
s = max - min,
|
|
2422
|
+
l = (max + min) / 2;
|
|
2123
2423
|
if (s) {
|
|
2124
2424
|
if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;
|
|
2125
2425
|
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
@@ -2127,20 +2427,17 @@
|
|
|
2127
2427
|
} else {
|
|
2128
2428
|
s = l > 0 && l < 1 ? 0 : h;
|
|
2129
2429
|
}
|
|
2130
|
-
|
|
2131
2430
|
return new Hsl(h, s, l, o.opacity);
|
|
2132
2431
|
}
|
|
2133
2432
|
function hsl(h, s, l, opacity) {
|
|
2134
2433
|
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
2135
2434
|
}
|
|
2136
|
-
|
|
2137
2435
|
function Hsl(h, s, l, opacity) {
|
|
2138
2436
|
this.h = +h;
|
|
2139
2437
|
this.s = +s;
|
|
2140
2438
|
this.l = +l;
|
|
2141
2439
|
this.opacity = +opacity;
|
|
2142
2440
|
}
|
|
2143
|
-
|
|
2144
2441
|
define(Hsl, hsl, extend(Color, {
|
|
2145
2442
|
brighter: function (k) {
|
|
2146
2443
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
@@ -2152,10 +2449,10 @@
|
|
|
2152
2449
|
},
|
|
2153
2450
|
rgb: function () {
|
|
2154
2451
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2452
|
+
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2453
|
+
l = this.l,
|
|
2454
|
+
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2455
|
+
m1 = 2 * l - m2;
|
|
2159
2456
|
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
2160
2457
|
},
|
|
2161
2458
|
displayable: function () {
|
|
@@ -2167,8 +2464,8 @@
|
|
|
2167
2464
|
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
2168
2465
|
}
|
|
2169
2466
|
}));
|
|
2170
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2171
2467
|
|
|
2468
|
+
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2172
2469
|
function hsl2rgb(h, m1, m2) {
|
|
2173
2470
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
2174
2471
|
}
|
|
@@ -2180,7 +2477,6 @@
|
|
|
2180
2477
|
return a + t * d;
|
|
2181
2478
|
};
|
|
2182
2479
|
}
|
|
2183
|
-
|
|
2184
2480
|
function exponential(a, b, y) {
|
|
2185
2481
|
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {
|
|
2186
2482
|
return Math.pow(a + t * b, y);
|
|
@@ -2198,12 +2494,11 @@
|
|
|
2198
2494
|
|
|
2199
2495
|
var interpolateRgb = (function rgbGamma(y) {
|
|
2200
2496
|
var color = gamma(y);
|
|
2201
|
-
|
|
2202
2497
|
function rgb$1(start, end) {
|
|
2203
2498
|
var r = color((start = rgb(start)).r, (end = rgb(end)).r),
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2499
|
+
g = color(start.g, end.g),
|
|
2500
|
+
b = color(start.b, end.b),
|
|
2501
|
+
opacity = nogamma(start.opacity, end.opacity);
|
|
2207
2502
|
return function (t) {
|
|
2208
2503
|
start.r = r(t);
|
|
2209
2504
|
start.g = g(t);
|
|
@@ -2212,7 +2507,6 @@
|
|
|
2212
2507
|
return start + "";
|
|
2213
2508
|
};
|
|
2214
2509
|
}
|
|
2215
|
-
|
|
2216
2510
|
rgb$1.gamma = rgbGamma;
|
|
2217
2511
|
return rgb$1;
|
|
2218
2512
|
})(1);
|
|
@@ -2224,38 +2518,36 @@
|
|
|
2224
2518
|
}
|
|
2225
2519
|
|
|
2226
2520
|
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
2227
|
-
|
|
2228
|
-
|
|
2521
|
+
reB = new RegExp(reA.source, "g");
|
|
2229
2522
|
function zero(b) {
|
|
2230
2523
|
return function () {
|
|
2231
2524
|
return b;
|
|
2232
2525
|
};
|
|
2233
2526
|
}
|
|
2234
|
-
|
|
2235
2527
|
function one(b) {
|
|
2236
2528
|
return function (t) {
|
|
2237
2529
|
return b(t) + "";
|
|
2238
2530
|
};
|
|
2239
2531
|
}
|
|
2240
|
-
|
|
2241
2532
|
function interpolateString (a, b) {
|
|
2242
2533
|
var bi = reA.lastIndex = reB.lastIndex = 0,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
// Coerce inputs to strings.
|
|
2534
|
+
// scan index for next number in b
|
|
2535
|
+
am,
|
|
2536
|
+
// current match in a
|
|
2537
|
+
bm,
|
|
2538
|
+
// current match in b
|
|
2539
|
+
bs,
|
|
2540
|
+
// string preceding current number in b, if any
|
|
2541
|
+
i = -1,
|
|
2542
|
+
// index in s
|
|
2543
|
+
s = [],
|
|
2544
|
+
// string constants and placeholders
|
|
2545
|
+
q = []; // number interpolators
|
|
2256
2546
|
|
|
2257
|
-
|
|
2547
|
+
// Coerce inputs to strings.
|
|
2548
|
+
a = a + "", b = b + "";
|
|
2258
2549
|
|
|
2550
|
+
// Interpolate pairs of numbers in a & b.
|
|
2259
2551
|
while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
|
|
2260
2552
|
if ((bs = bm.index) > bi) {
|
|
2261
2553
|
// a string precedes the next number in b
|
|
@@ -2263,7 +2555,6 @@
|
|
|
2263
2555
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2264
2556
|
else s[++i] = bs;
|
|
2265
2557
|
}
|
|
2266
|
-
|
|
2267
2558
|
if ((am = am[0]) === (bm = bm[0])) {
|
|
2268
2559
|
// numbers in a & b match
|
|
2269
2560
|
if (s[i]) s[i] += bm; // coalesce with previous string
|
|
@@ -2276,22 +2567,20 @@
|
|
|
2276
2567
|
x: interpolateNumber(am, bm)
|
|
2277
2568
|
});
|
|
2278
2569
|
}
|
|
2279
|
-
|
|
2280
2570
|
bi = reB.lastIndex;
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2571
|
+
}
|
|
2283
2572
|
|
|
2573
|
+
// Add remains of b.
|
|
2284
2574
|
if (bi < b.length) {
|
|
2285
2575
|
bs = b.slice(bi);
|
|
2286
2576
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2287
2577
|
else s[++i] = bs;
|
|
2288
|
-
}
|
|
2289
|
-
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2290
|
-
|
|
2578
|
+
}
|
|
2291
2579
|
|
|
2580
|
+
// Special optimization for only a single match.
|
|
2581
|
+
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2292
2582
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
|
|
2293
2583
|
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
2294
|
-
|
|
2295
2584
|
return s.join("");
|
|
2296
2585
|
});
|
|
2297
2586
|
}
|
|
@@ -2322,8 +2611,8 @@
|
|
|
2322
2611
|
}
|
|
2323
2612
|
|
|
2324
2613
|
var svgNode;
|
|
2325
|
-
/* eslint-disable no-undef */
|
|
2326
2614
|
|
|
2615
|
+
/* eslint-disable no-undef */
|
|
2327
2616
|
function parseCss(value) {
|
|
2328
2617
|
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
2329
2618
|
return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
@@ -2341,7 +2630,6 @@
|
|
|
2341
2630
|
function pop(s) {
|
|
2342
2631
|
return s.length ? s.pop() + " " : "";
|
|
2343
2632
|
}
|
|
2344
|
-
|
|
2345
2633
|
function translate(xa, ya, xb, yb, s, q) {
|
|
2346
2634
|
if (xa !== xb || ya !== yb) {
|
|
2347
2635
|
var i = s.push("translate(", null, pxComma, null, pxParen);
|
|
@@ -2356,11 +2644,9 @@
|
|
|
2356
2644
|
s.push("translate(" + xb + pxComma + yb + pxParen);
|
|
2357
2645
|
}
|
|
2358
2646
|
}
|
|
2359
|
-
|
|
2360
2647
|
function rotate(a, b, s, q) {
|
|
2361
2648
|
if (a !== b) {
|
|
2362
2649
|
if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path
|
|
2363
|
-
|
|
2364
2650
|
q.push({
|
|
2365
2651
|
i: s.push(pop(s) + "rotate(", null, degParen) - 2,
|
|
2366
2652
|
x: interpolateNumber(a, b)
|
|
@@ -2369,7 +2655,6 @@
|
|
|
2369
2655
|
s.push(pop(s) + "rotate(" + b + degParen);
|
|
2370
2656
|
}
|
|
2371
2657
|
}
|
|
2372
|
-
|
|
2373
2658
|
function skewX(a, b, s, q) {
|
|
2374
2659
|
if (a !== b) {
|
|
2375
2660
|
q.push({
|
|
@@ -2380,7 +2665,6 @@
|
|
|
2380
2665
|
s.push(pop(s) + "skewX(" + b + degParen);
|
|
2381
2666
|
}
|
|
2382
2667
|
}
|
|
2383
|
-
|
|
2384
2668
|
function scale(xa, ya, xb, yb, s, q) {
|
|
2385
2669
|
if (xa !== xb || ya !== yb) {
|
|
2386
2670
|
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
|
|
@@ -2395,59 +2679,51 @@
|
|
|
2395
2679
|
s.push(pop(s) + "scale(" + xb + "," + yb + ")");
|
|
2396
2680
|
}
|
|
2397
2681
|
}
|
|
2398
|
-
|
|
2399
2682
|
return function (a, b) {
|
|
2400
2683
|
var s = [],
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2684
|
+
// string constants and placeholders
|
|
2685
|
+
q = []; // number interpolators
|
|
2404
2686
|
a = parse(a), b = parse(b);
|
|
2405
2687
|
translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
|
|
2406
2688
|
rotate(a.rotate, b.rotate, s, q);
|
|
2407
2689
|
skewX(a.skewX, b.skewX, s, q);
|
|
2408
2690
|
scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
|
|
2409
2691
|
a = b = null; // gc
|
|
2410
|
-
|
|
2411
2692
|
return function (t) {
|
|
2412
2693
|
var i = -1,
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2694
|
+
n = q.length,
|
|
2695
|
+
o;
|
|
2416
2696
|
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
2417
|
-
|
|
2418
2697
|
return s.join("");
|
|
2419
2698
|
};
|
|
2420
2699
|
};
|
|
2421
2700
|
}
|
|
2422
|
-
|
|
2423
2701
|
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
|
|
2424
2702
|
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
|
|
2425
2703
|
|
|
2426
2704
|
var frame = 0,
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2705
|
+
// is an animation frame pending?
|
|
2706
|
+
timeout$1 = 0,
|
|
2707
|
+
// is a timeout pending?
|
|
2708
|
+
interval = 0,
|
|
2709
|
+
// are any timers active?
|
|
2710
|
+
pokeDelay = 1000,
|
|
2711
|
+
// how frequently we check for clock skew
|
|
2712
|
+
taskHead,
|
|
2713
|
+
taskTail,
|
|
2714
|
+
clockLast = 0,
|
|
2715
|
+
clockNow = 0,
|
|
2716
|
+
clockSkew = 0,
|
|
2717
|
+
clock = typeof performance === "object" && performance.now ? performance : Date,
|
|
2718
|
+
setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
2719
|
+
setTimeout(f, 17);
|
|
2720
|
+
};
|
|
2443
2721
|
function now() {
|
|
2444
2722
|
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
2445
2723
|
}
|
|
2446
|
-
|
|
2447
2724
|
function clearNow() {
|
|
2448
2725
|
clockNow = 0;
|
|
2449
2726
|
}
|
|
2450
|
-
|
|
2451
2727
|
function Timer() {
|
|
2452
2728
|
this._call = this._time = this._next = null;
|
|
2453
2729
|
}
|
|
@@ -2456,12 +2732,10 @@
|
|
|
2456
2732
|
restart: function (callback, delay, time) {
|
|
2457
2733
|
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
2458
2734
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
2459
|
-
|
|
2460
2735
|
if (!this._next && taskTail !== this) {
|
|
2461
2736
|
if (taskTail) taskTail._next = this;else taskHead = this;
|
|
2462
2737
|
taskTail = this;
|
|
2463
2738
|
}
|
|
2464
|
-
|
|
2465
2739
|
this._call = callback;
|
|
2466
2740
|
this._time = time;
|
|
2467
2741
|
sleep();
|
|
@@ -2481,24 +2755,18 @@
|
|
|
2481
2755
|
}
|
|
2482
2756
|
function timerFlush() {
|
|
2483
2757
|
now(); // Get the current time, if not already set.
|
|
2484
|
-
|
|
2485
2758
|
++frame; // Pretend we’ve set an alarm, if we haven’t already.
|
|
2486
|
-
|
|
2487
2759
|
var t = taskHead,
|
|
2488
|
-
|
|
2489
|
-
|
|
2760
|
+
e;
|
|
2490
2761
|
while (t) {
|
|
2491
2762
|
if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
|
|
2492
2763
|
t = t._next;
|
|
2493
2764
|
}
|
|
2494
|
-
|
|
2495
2765
|
--frame;
|
|
2496
2766
|
}
|
|
2497
|
-
|
|
2498
2767
|
function wake() {
|
|
2499
2768
|
clockNow = (clockLast = clock.now()) + clockSkew;
|
|
2500
2769
|
frame = timeout$1 = 0;
|
|
2501
|
-
|
|
2502
2770
|
try {
|
|
2503
2771
|
timerFlush();
|
|
2504
2772
|
} finally {
|
|
@@ -2507,19 +2775,16 @@
|
|
|
2507
2775
|
clockNow = 0;
|
|
2508
2776
|
}
|
|
2509
2777
|
}
|
|
2510
|
-
|
|
2511
2778
|
function poke() {
|
|
2512
2779
|
var now = clock.now(),
|
|
2513
|
-
|
|
2780
|
+
delay = now - clockLast;
|
|
2514
2781
|
if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
|
|
2515
2782
|
}
|
|
2516
|
-
|
|
2517
2783
|
function nap() {
|
|
2518
2784
|
var t0,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2785
|
+
t1 = taskHead,
|
|
2786
|
+
t2,
|
|
2787
|
+
time = Infinity;
|
|
2523
2788
|
while (t1) {
|
|
2524
2789
|
if (t1._call) {
|
|
2525
2790
|
if (time > t1._time) time = t1._time;
|
|
@@ -2529,17 +2794,13 @@
|
|
|
2529
2794
|
t1 = t0 ? t0._next = t2 : taskHead = t2;
|
|
2530
2795
|
}
|
|
2531
2796
|
}
|
|
2532
|
-
|
|
2533
2797
|
taskTail = t0;
|
|
2534
2798
|
sleep(time);
|
|
2535
2799
|
}
|
|
2536
|
-
|
|
2537
2800
|
function sleep(time) {
|
|
2538
2801
|
if (frame) return; // Soonest alarm already set, or will be.
|
|
2539
|
-
|
|
2540
2802
|
if (timeout$1) timeout$1 = clearTimeout(timeout$1);
|
|
2541
2803
|
var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
|
|
2542
|
-
|
|
2543
2804
|
if (delay > 24) {
|
|
2544
2805
|
if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
|
|
2545
2806
|
if (interval) interval = clearInterval(interval);
|
|
@@ -2602,129 +2863,122 @@
|
|
|
2602
2863
|
if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
|
|
2603
2864
|
return schedule;
|
|
2604
2865
|
}
|
|
2605
|
-
|
|
2606
2866
|
function create(node, id, self) {
|
|
2607
2867
|
var schedules = node.__transition,
|
|
2608
|
-
|
|
2609
|
-
// Note the actual delay is not known until the first callback!
|
|
2868
|
+
tween;
|
|
2610
2869
|
|
|
2870
|
+
// Initialize the self timer when the transition is created.
|
|
2871
|
+
// Note the actual delay is not known until the first callback!
|
|
2611
2872
|
schedules[id] = self;
|
|
2612
2873
|
self.timer = timer(schedule, 0, self.time);
|
|
2613
|
-
|
|
2614
2874
|
function schedule(elapsed) {
|
|
2615
2875
|
self.state = SCHEDULED;
|
|
2616
|
-
self.timer.restart(start, self.delay, self.time);
|
|
2876
|
+
self.timer.restart(start, self.delay, self.time);
|
|
2617
2877
|
|
|
2878
|
+
// If the elapsed delay is less than our first sleep, start immediately.
|
|
2618
2879
|
if (self.delay <= elapsed) start(elapsed - self.delay);
|
|
2619
2880
|
}
|
|
2620
|
-
|
|
2621
2881
|
function start(elapsed) {
|
|
2622
|
-
var i, j, n, o;
|
|
2882
|
+
var i, j, n, o;
|
|
2623
2883
|
|
|
2884
|
+
// If the state is not SCHEDULED, then we previously errored on start.
|
|
2624
2885
|
if (self.state !== SCHEDULED) return stop();
|
|
2625
|
-
|
|
2626
2886
|
for (i in schedules) {
|
|
2627
2887
|
o = schedules[i];
|
|
2628
|
-
if (o.name !== self.name) continue;
|
|
2888
|
+
if (o.name !== self.name) continue;
|
|
2889
|
+
|
|
2890
|
+
// While this element already has a starting transition during this frame,
|
|
2629
2891
|
// defer starting an interrupting transition until that transition has a
|
|
2630
2892
|
// chance to tick (and possibly end); see d3/d3-transition#54!
|
|
2893
|
+
if (o.state === STARTED) return timeout(start);
|
|
2631
2894
|
|
|
2632
|
-
|
|
2633
|
-
|
|
2895
|
+
// Interrupt the active transition, if any.
|
|
2634
2896
|
if (o.state === RUNNING) {
|
|
2635
2897
|
o.state = ENDED;
|
|
2636
2898
|
o.timer.stop();
|
|
2637
2899
|
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
2638
2900
|
delete schedules[i];
|
|
2639
|
-
}
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
// Cancel any pre-empted transitions.
|
|
2640
2904
|
else if (+i < id) {
|
|
2641
2905
|
o.state = ENDED;
|
|
2642
2906
|
o.timer.stop();
|
|
2643
2907
|
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
2644
2908
|
delete schedules[i];
|
|
2645
2909
|
}
|
|
2646
|
-
}
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
// Defer the first tick to end of the current frame; see d3/d3#1576.
|
|
2647
2913
|
// Note the transition may be canceled after start and before the first tick!
|
|
2648
2914
|
// Note this must be scheduled before the start event; see d3/d3-transition#16!
|
|
2649
2915
|
// Assuming this is successful, subsequent callbacks go straight to tick.
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
2916
|
timeout(function () {
|
|
2653
2917
|
if (self.state === STARTED) {
|
|
2654
2918
|
self.state = RUNNING;
|
|
2655
2919
|
self.timer.restart(tick, self.delay, self.time);
|
|
2656
2920
|
tick(elapsed);
|
|
2657
2921
|
}
|
|
2658
|
-
});
|
|
2659
|
-
// Note this must be done before the tween are initialized.
|
|
2922
|
+
});
|
|
2660
2923
|
|
|
2924
|
+
// Dispatch the start event.
|
|
2925
|
+
// Note this must be done before the tween are initialized.
|
|
2661
2926
|
self.state = STARTING;
|
|
2662
2927
|
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
2663
2928
|
if (self.state !== STARTING) return; // interrupted
|
|
2929
|
+
self.state = STARTED;
|
|
2664
2930
|
|
|
2665
|
-
|
|
2666
|
-
|
|
2931
|
+
// Initialize the tween, deleting null tween.
|
|
2667
2932
|
tween = new Array(n = self.tween.length);
|
|
2668
|
-
|
|
2669
2933
|
for (i = 0, j = -1; i < n; ++i) {
|
|
2670
2934
|
if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
|
|
2671
2935
|
tween[++j] = o;
|
|
2672
2936
|
}
|
|
2673
2937
|
}
|
|
2674
|
-
|
|
2675
2938
|
tween.length = j + 1;
|
|
2676
2939
|
}
|
|
2677
|
-
|
|
2678
2940
|
function tick(elapsed) {
|
|
2679
2941
|
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2942
|
+
i = -1,
|
|
2943
|
+
n = tween.length;
|
|
2683
2944
|
while (++i < n) {
|
|
2684
2945
|
tween[i].call(node, t);
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2946
|
+
}
|
|
2687
2947
|
|
|
2948
|
+
// Dispatch the end event.
|
|
2688
2949
|
if (self.state === ENDING) {
|
|
2689
2950
|
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
2690
2951
|
stop();
|
|
2691
2952
|
}
|
|
2692
2953
|
}
|
|
2693
|
-
|
|
2694
2954
|
function stop() {
|
|
2695
2955
|
self.state = ENDED;
|
|
2696
2956
|
self.timer.stop();
|
|
2697
2957
|
delete schedules[id];
|
|
2698
|
-
|
|
2699
2958
|
for (var i in schedules) return; // eslint-disable-line no-unused-vars
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
2959
|
delete node.__transition;
|
|
2703
2960
|
}
|
|
2704
2961
|
}
|
|
2705
2962
|
|
|
2706
2963
|
function interrupt (node, name) {
|
|
2707
2964
|
var schedules = node.__transition,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2965
|
+
schedule,
|
|
2966
|
+
active,
|
|
2967
|
+
empty = true,
|
|
2968
|
+
i;
|
|
2712
2969
|
if (!schedules) return;
|
|
2713
2970
|
name = name == null ? null : name + "";
|
|
2714
|
-
|
|
2715
2971
|
for (i in schedules) {
|
|
2716
2972
|
if ((schedule = schedules[i]).name !== name) {
|
|
2717
2973
|
empty = false;
|
|
2718
2974
|
continue;
|
|
2719
2975
|
}
|
|
2720
|
-
|
|
2721
2976
|
active = schedule.state > STARTING && schedule.state < ENDING;
|
|
2722
2977
|
schedule.state = ENDED;
|
|
2723
2978
|
schedule.timer.stop();
|
|
2724
2979
|
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
2725
2980
|
delete schedules[i];
|
|
2726
2981
|
}
|
|
2727
|
-
|
|
2728
2982
|
if (empty) delete node.__transition;
|
|
2729
2983
|
}
|
|
2730
2984
|
|
|
@@ -2738,13 +2992,13 @@
|
|
|
2738
2992
|
var tween0, tween1;
|
|
2739
2993
|
return function () {
|
|
2740
2994
|
var schedule = set(this, id),
|
|
2741
|
-
|
|
2995
|
+
tween = schedule.tween;
|
|
2996
|
+
|
|
2997
|
+
// If this node shared tween with the previous node,
|
|
2742
2998
|
// just assign the updated shared tween and we’re done!
|
|
2743
2999
|
// Otherwise, copy-on-write.
|
|
2744
|
-
|
|
2745
3000
|
if (tween !== tween0) {
|
|
2746
3001
|
tween1 = tween0 = tween;
|
|
2747
|
-
|
|
2748
3002
|
for (var i = 0, n = tween1.length; i < n; ++i) {
|
|
2749
3003
|
if (tween1[i].name === name) {
|
|
2750
3004
|
tween1 = tween1.slice();
|
|
@@ -2753,56 +3007,47 @@
|
|
|
2753
3007
|
}
|
|
2754
3008
|
}
|
|
2755
3009
|
}
|
|
2756
|
-
|
|
2757
3010
|
schedule.tween = tween1;
|
|
2758
3011
|
};
|
|
2759
3012
|
}
|
|
2760
|
-
|
|
2761
3013
|
function tweenFunction(id, name, value) {
|
|
2762
3014
|
var tween0, tween1;
|
|
2763
3015
|
if (typeof value !== "function") throw new Error();
|
|
2764
3016
|
return function () {
|
|
2765
3017
|
var schedule = set(this, id),
|
|
2766
|
-
|
|
3018
|
+
tween = schedule.tween;
|
|
3019
|
+
|
|
3020
|
+
// If this node shared tween with the previous node,
|
|
2767
3021
|
// just assign the updated shared tween and we’re done!
|
|
2768
3022
|
// Otherwise, copy-on-write.
|
|
2769
|
-
|
|
2770
3023
|
if (tween !== tween0) {
|
|
2771
3024
|
tween1 = (tween0 = tween).slice();
|
|
2772
|
-
|
|
2773
3025
|
for (var t = {
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
3026
|
+
name: name,
|
|
3027
|
+
value: value
|
|
3028
|
+
}, i = 0, n = tween1.length; i < n; ++i) {
|
|
2777
3029
|
if (tween1[i].name === name) {
|
|
2778
3030
|
tween1[i] = t;
|
|
2779
3031
|
break;
|
|
2780
3032
|
}
|
|
2781
3033
|
}
|
|
2782
|
-
|
|
2783
3034
|
if (i === n) tween1.push(t);
|
|
2784
3035
|
}
|
|
2785
|
-
|
|
2786
3036
|
schedule.tween = tween1;
|
|
2787
3037
|
};
|
|
2788
3038
|
}
|
|
2789
|
-
|
|
2790
3039
|
function transition_tween (name, value) {
|
|
2791
3040
|
var id = this._id;
|
|
2792
3041
|
name += "";
|
|
2793
|
-
|
|
2794
3042
|
if (arguments.length < 2) {
|
|
2795
3043
|
var tween = get(this.node(), id).tween;
|
|
2796
|
-
|
|
2797
3044
|
for (var i = 0, n = tween.length, t; i < n; ++i) {
|
|
2798
3045
|
if ((t = tween[i]).name === name) {
|
|
2799
3046
|
return t.value;
|
|
2800
3047
|
}
|
|
2801
3048
|
}
|
|
2802
|
-
|
|
2803
3049
|
return null;
|
|
2804
3050
|
}
|
|
2805
|
-
|
|
2806
3051
|
return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
|
|
2807
3052
|
}
|
|
2808
3053
|
function tweenValue(transition, name, value) {
|
|
@@ -2826,62 +3071,56 @@
|
|
|
2826
3071
|
this.removeAttribute(name);
|
|
2827
3072
|
};
|
|
2828
3073
|
}
|
|
2829
|
-
|
|
2830
3074
|
function attrRemoveNS(fullname) {
|
|
2831
3075
|
return function () {
|
|
2832
3076
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2833
3077
|
};
|
|
2834
3078
|
}
|
|
2835
|
-
|
|
2836
3079
|
function attrConstant(name, interpolate, value1) {
|
|
2837
3080
|
var string00,
|
|
2838
|
-
|
|
2839
|
-
|
|
3081
|
+
string1 = value1 + "",
|
|
3082
|
+
interpolate0;
|
|
2840
3083
|
return function () {
|
|
2841
3084
|
var string0 = this.getAttribute(name);
|
|
2842
3085
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2843
3086
|
};
|
|
2844
3087
|
}
|
|
2845
|
-
|
|
2846
3088
|
function attrConstantNS(fullname, interpolate, value1) {
|
|
2847
3089
|
var string00,
|
|
2848
|
-
|
|
2849
|
-
|
|
3090
|
+
string1 = value1 + "",
|
|
3091
|
+
interpolate0;
|
|
2850
3092
|
return function () {
|
|
2851
3093
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2852
3094
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2853
3095
|
};
|
|
2854
3096
|
}
|
|
2855
|
-
|
|
2856
3097
|
function attrFunction(name, interpolate, value) {
|
|
2857
3098
|
var string00, string10, interpolate0;
|
|
2858
3099
|
return function () {
|
|
2859
3100
|
var string0,
|
|
2860
|
-
|
|
2861
|
-
|
|
3101
|
+
value1 = value(this),
|
|
3102
|
+
string1;
|
|
2862
3103
|
if (value1 == null) return void this.removeAttribute(name);
|
|
2863
3104
|
string0 = this.getAttribute(name);
|
|
2864
3105
|
string1 = value1 + "";
|
|
2865
3106
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2866
3107
|
};
|
|
2867
3108
|
}
|
|
2868
|
-
|
|
2869
3109
|
function attrFunctionNS(fullname, interpolate, value) {
|
|
2870
3110
|
var string00, string10, interpolate0;
|
|
2871
3111
|
return function () {
|
|
2872
3112
|
var string0,
|
|
2873
|
-
|
|
2874
|
-
|
|
3113
|
+
value1 = value(this),
|
|
3114
|
+
string1;
|
|
2875
3115
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2876
3116
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2877
3117
|
string1 = value1 + "";
|
|
2878
3118
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2879
3119
|
};
|
|
2880
3120
|
}
|
|
2881
|
-
|
|
2882
3121
|
function transition_attr (name, value) {
|
|
2883
3122
|
var fullname = namespace(name),
|
|
2884
|
-
|
|
3123
|
+
i = fullname === "transform" ? interpolateTransformSvg : interpolate;
|
|
2885
3124
|
return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2886
3125
|
}
|
|
2887
3126
|
|
|
@@ -2890,39 +3129,31 @@
|
|
|
2890
3129
|
this.setAttribute(name, i.call(this, t));
|
|
2891
3130
|
};
|
|
2892
3131
|
}
|
|
2893
|
-
|
|
2894
3132
|
function attrInterpolateNS(fullname, i) {
|
|
2895
3133
|
return function (t) {
|
|
2896
3134
|
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
2897
3135
|
};
|
|
2898
3136
|
}
|
|
2899
|
-
|
|
2900
3137
|
function attrTweenNS(fullname, value) {
|
|
2901
3138
|
var t0, i0;
|
|
2902
|
-
|
|
2903
3139
|
function tween() {
|
|
2904
3140
|
var i = value.apply(this, arguments);
|
|
2905
3141
|
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
2906
3142
|
return t0;
|
|
2907
3143
|
}
|
|
2908
|
-
|
|
2909
3144
|
tween._value = value;
|
|
2910
3145
|
return tween;
|
|
2911
3146
|
}
|
|
2912
|
-
|
|
2913
3147
|
function attrTween(name, value) {
|
|
2914
3148
|
var t0, i0;
|
|
2915
|
-
|
|
2916
3149
|
function tween() {
|
|
2917
3150
|
var i = value.apply(this, arguments);
|
|
2918
3151
|
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
2919
3152
|
return t0;
|
|
2920
3153
|
}
|
|
2921
|
-
|
|
2922
3154
|
tween._value = value;
|
|
2923
3155
|
return tween;
|
|
2924
3156
|
}
|
|
2925
|
-
|
|
2926
3157
|
function transition_attrTween (name, value) {
|
|
2927
3158
|
var key = "attr." + name;
|
|
2928
3159
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -2937,13 +3168,11 @@
|
|
|
2937
3168
|
init(this, id).delay = +value.apply(this, arguments);
|
|
2938
3169
|
};
|
|
2939
3170
|
}
|
|
2940
|
-
|
|
2941
3171
|
function delayConstant(id, value) {
|
|
2942
3172
|
return value = +value, function () {
|
|
2943
3173
|
init(this, id).delay = value;
|
|
2944
3174
|
};
|
|
2945
3175
|
}
|
|
2946
|
-
|
|
2947
3176
|
function transition_delay (value) {
|
|
2948
3177
|
var id = this._id;
|
|
2949
3178
|
return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;
|
|
@@ -2954,13 +3183,11 @@
|
|
|
2954
3183
|
set(this, id).duration = +value.apply(this, arguments);
|
|
2955
3184
|
};
|
|
2956
3185
|
}
|
|
2957
|
-
|
|
2958
3186
|
function durationConstant(id, value) {
|
|
2959
3187
|
return value = +value, function () {
|
|
2960
3188
|
set(this, id).duration = value;
|
|
2961
3189
|
};
|
|
2962
3190
|
}
|
|
2963
|
-
|
|
2964
3191
|
function transition_duration (value) {
|
|
2965
3192
|
var id = this._id;
|
|
2966
3193
|
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;
|
|
@@ -2972,7 +3199,6 @@
|
|
|
2972
3199
|
set(this, id).ease = value;
|
|
2973
3200
|
};
|
|
2974
3201
|
}
|
|
2975
|
-
|
|
2976
3202
|
function transition_ease (value) {
|
|
2977
3203
|
var id = this._id;
|
|
2978
3204
|
return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;
|
|
@@ -2985,7 +3211,6 @@
|
|
|
2985
3211
|
set(this, id).ease = v;
|
|
2986
3212
|
};
|
|
2987
3213
|
}
|
|
2988
|
-
|
|
2989
3214
|
function transition_easeVarying (value) {
|
|
2990
3215
|
if (typeof value !== "function") throw new Error();
|
|
2991
3216
|
return this.each(easeVarying(this._id, value));
|
|
@@ -2993,7 +3218,6 @@
|
|
|
2993
3218
|
|
|
2994
3219
|
function transition_filter (match) {
|
|
2995
3220
|
if (typeof match !== "function") match = matcher(match);
|
|
2996
|
-
|
|
2997
3221
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
2998
3222
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
2999
3223
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -3001,13 +3225,11 @@
|
|
|
3001
3225
|
}
|
|
3002
3226
|
}
|
|
3003
3227
|
}
|
|
3004
|
-
|
|
3005
3228
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
3006
3229
|
}
|
|
3007
3230
|
|
|
3008
3231
|
function transition_merge (transition) {
|
|
3009
3232
|
if (transition._id !== this._id) throw new Error();
|
|
3010
|
-
|
|
3011
3233
|
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
3012
3234
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
3013
3235
|
if (node = group0[i] || group1[i]) {
|
|
@@ -3015,11 +3237,9 @@
|
|
|
3015
3237
|
}
|
|
3016
3238
|
}
|
|
3017
3239
|
}
|
|
3018
|
-
|
|
3019
3240
|
for (; j < m0; ++j) {
|
|
3020
3241
|
merges[j] = groups0[j];
|
|
3021
3242
|
}
|
|
3022
|
-
|
|
3023
3243
|
return new Transition(merges, this._parents, this._name, this._id);
|
|
3024
3244
|
}
|
|
3025
3245
|
|
|
@@ -3030,22 +3250,21 @@
|
|
|
3030
3250
|
return !t || t === "start";
|
|
3031
3251
|
});
|
|
3032
3252
|
}
|
|
3033
|
-
|
|
3034
3253
|
function onFunction(id, name, listener) {
|
|
3035
3254
|
var on0,
|
|
3036
|
-
|
|
3037
|
-
|
|
3255
|
+
on1,
|
|
3256
|
+
sit = start(name) ? init : set;
|
|
3038
3257
|
return function () {
|
|
3039
3258
|
var schedule = sit(this, id),
|
|
3040
|
-
|
|
3259
|
+
on = schedule.on;
|
|
3260
|
+
|
|
3261
|
+
// If this node shared a dispatch with the previous node,
|
|
3041
3262
|
// just assign the updated shared dispatch and we’re done!
|
|
3042
3263
|
// Otherwise, copy-on-write.
|
|
3043
|
-
|
|
3044
3264
|
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
3045
3265
|
schedule.on = on1;
|
|
3046
3266
|
};
|
|
3047
3267
|
}
|
|
3048
|
-
|
|
3049
3268
|
function transition_on (name, listener) {
|
|
3050
3269
|
var id = this._id;
|
|
3051
3270
|
return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
|
|
@@ -3054,22 +3273,18 @@
|
|
|
3054
3273
|
function removeFunction(id) {
|
|
3055
3274
|
return function () {
|
|
3056
3275
|
var parent = this.parentNode;
|
|
3057
|
-
|
|
3058
3276
|
for (var i in this.__transition) if (+i !== id) return;
|
|
3059
|
-
|
|
3060
3277
|
if (parent) parent.removeChild(this);
|
|
3061
3278
|
};
|
|
3062
3279
|
}
|
|
3063
|
-
|
|
3064
3280
|
function transition_remove () {
|
|
3065
3281
|
return this.on("end.remove", removeFunction(this._id));
|
|
3066
3282
|
}
|
|
3067
3283
|
|
|
3068
3284
|
function transition_select (select) {
|
|
3069
3285
|
var name = this._name,
|
|
3070
|
-
|
|
3286
|
+
id = this._id;
|
|
3071
3287
|
if (typeof select !== "function") select = selector(select);
|
|
3072
|
-
|
|
3073
3288
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3074
3289
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
3075
3290
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -3079,15 +3294,13 @@
|
|
|
3079
3294
|
}
|
|
3080
3295
|
}
|
|
3081
3296
|
}
|
|
3082
|
-
|
|
3083
3297
|
return new Transition(subgroups, this._parents, name, id);
|
|
3084
3298
|
}
|
|
3085
3299
|
|
|
3086
3300
|
function transition_selectAll (select) {
|
|
3087
3301
|
var name = this._name,
|
|
3088
|
-
|
|
3302
|
+
id = this._id;
|
|
3089
3303
|
if (typeof select !== "function") select = selectorAll(select);
|
|
3090
|
-
|
|
3091
3304
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
3092
3305
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3093
3306
|
if (node = group[i]) {
|
|
@@ -3096,13 +3309,11 @@
|
|
|
3096
3309
|
schedule(child, name, id, k, children, inherit);
|
|
3097
3310
|
}
|
|
3098
3311
|
}
|
|
3099
|
-
|
|
3100
3312
|
subgroups.push(children);
|
|
3101
3313
|
parents.push(node);
|
|
3102
3314
|
}
|
|
3103
3315
|
}
|
|
3104
3316
|
}
|
|
3105
|
-
|
|
3106
3317
|
return new Transition(subgroups, parents, name, id);
|
|
3107
3318
|
}
|
|
3108
3319
|
|
|
@@ -3115,57 +3326,53 @@
|
|
|
3115
3326
|
var string00, string10, interpolate0;
|
|
3116
3327
|
return function () {
|
|
3117
3328
|
var string0 = styleValue(this, name),
|
|
3118
|
-
|
|
3329
|
+
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3119
3330
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
3120
3331
|
};
|
|
3121
3332
|
}
|
|
3122
|
-
|
|
3123
3333
|
function styleRemove(name) {
|
|
3124
3334
|
return function () {
|
|
3125
3335
|
this.style.removeProperty(name);
|
|
3126
3336
|
};
|
|
3127
3337
|
}
|
|
3128
|
-
|
|
3129
3338
|
function styleConstant(name, interpolate, value1) {
|
|
3130
3339
|
var string00,
|
|
3131
|
-
|
|
3132
|
-
|
|
3340
|
+
string1 = value1 + "",
|
|
3341
|
+
interpolate0;
|
|
3133
3342
|
return function () {
|
|
3134
3343
|
var string0 = styleValue(this, name);
|
|
3135
3344
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
3136
3345
|
};
|
|
3137
3346
|
}
|
|
3138
|
-
|
|
3139
3347
|
function styleFunction(name, interpolate, value) {
|
|
3140
3348
|
var string00, string10, interpolate0;
|
|
3141
3349
|
return function () {
|
|
3142
3350
|
var string0 = styleValue(this, name),
|
|
3143
|
-
|
|
3144
|
-
|
|
3351
|
+
value1 = value(this),
|
|
3352
|
+
string1 = value1 + "";
|
|
3145
3353
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3146
3354
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
3147
3355
|
};
|
|
3148
3356
|
}
|
|
3149
|
-
|
|
3150
3357
|
function styleMaybeRemove(id, name) {
|
|
3151
3358
|
var on0,
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3359
|
+
on1,
|
|
3360
|
+
listener0,
|
|
3361
|
+
key = "style." + name,
|
|
3362
|
+
event = "end." + key,
|
|
3363
|
+
remove;
|
|
3157
3364
|
return function () {
|
|
3158
3365
|
var schedule = set(this, id),
|
|
3159
|
-
|
|
3160
|
-
|
|
3366
|
+
on = schedule.on,
|
|
3367
|
+
listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
|
|
3368
|
+
|
|
3369
|
+
// If this node shared a dispatch with the previous node,
|
|
3161
3370
|
// just assign the updated shared dispatch and we’re done!
|
|
3162
3371
|
// Otherwise, copy-on-write.
|
|
3163
|
-
|
|
3164
3372
|
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
3165
3373
|
schedule.on = on1;
|
|
3166
3374
|
};
|
|
3167
3375
|
}
|
|
3168
|
-
|
|
3169
3376
|
function transition_style (name, value, priority) {
|
|
3170
3377
|
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
|
|
3171
3378
|
return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null);
|
|
@@ -3176,20 +3383,16 @@
|
|
|
3176
3383
|
this.style.setProperty(name, i.call(this, t), priority);
|
|
3177
3384
|
};
|
|
3178
3385
|
}
|
|
3179
|
-
|
|
3180
3386
|
function styleTween(name, value, priority) {
|
|
3181
3387
|
var t, i0;
|
|
3182
|
-
|
|
3183
3388
|
function tween() {
|
|
3184
3389
|
var i = value.apply(this, arguments);
|
|
3185
3390
|
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
3186
3391
|
return t;
|
|
3187
3392
|
}
|
|
3188
|
-
|
|
3189
3393
|
tween._value = value;
|
|
3190
3394
|
return tween;
|
|
3191
3395
|
}
|
|
3192
|
-
|
|
3193
3396
|
function transition_styleTween (name, value, priority) {
|
|
3194
3397
|
var key = "style." + (name += "");
|
|
3195
3398
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -3203,14 +3406,12 @@
|
|
|
3203
3406
|
this.textContent = value;
|
|
3204
3407
|
};
|
|
3205
3408
|
}
|
|
3206
|
-
|
|
3207
3409
|
function textFunction(value) {
|
|
3208
3410
|
return function () {
|
|
3209
3411
|
var value1 = value(this);
|
|
3210
3412
|
this.textContent = value1 == null ? "" : value1;
|
|
3211
3413
|
};
|
|
3212
3414
|
}
|
|
3213
|
-
|
|
3214
3415
|
function transition_text (value) {
|
|
3215
3416
|
return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + ""));
|
|
3216
3417
|
}
|
|
@@ -3220,20 +3421,16 @@
|
|
|
3220
3421
|
this.textContent = i.call(this, t);
|
|
3221
3422
|
};
|
|
3222
3423
|
}
|
|
3223
|
-
|
|
3224
3424
|
function textTween(value) {
|
|
3225
3425
|
var t0, i0;
|
|
3226
|
-
|
|
3227
3426
|
function tween() {
|
|
3228
3427
|
var i = value.apply(this, arguments);
|
|
3229
3428
|
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
3230
3429
|
return t0;
|
|
3231
3430
|
}
|
|
3232
|
-
|
|
3233
3431
|
tween._value = value;
|
|
3234
3432
|
return tween;
|
|
3235
3433
|
}
|
|
3236
|
-
|
|
3237
3434
|
function transition_textTween (value) {
|
|
3238
3435
|
var key = "text";
|
|
3239
3436
|
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
@@ -3244,9 +3441,8 @@
|
|
|
3244
3441
|
|
|
3245
3442
|
function transition_transition () {
|
|
3246
3443
|
var name = this._name,
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3444
|
+
id0 = this._id,
|
|
3445
|
+
id1 = newId();
|
|
3250
3446
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3251
3447
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3252
3448
|
if (node = group[i]) {
|
|
@@ -3260,44 +3456,41 @@
|
|
|
3260
3456
|
}
|
|
3261
3457
|
}
|
|
3262
3458
|
}
|
|
3263
|
-
|
|
3264
3459
|
return new Transition(groups, this._parents, name, id1);
|
|
3265
3460
|
}
|
|
3266
3461
|
|
|
3267
3462
|
function transition_end () {
|
|
3268
3463
|
var on0,
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3464
|
+
on1,
|
|
3465
|
+
that = this,
|
|
3466
|
+
id = that._id,
|
|
3467
|
+
size = that.size();
|
|
3273
3468
|
return new Promise(function (resolve, reject) {
|
|
3274
3469
|
var cancel = {
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3470
|
+
value: reject
|
|
3471
|
+
},
|
|
3472
|
+
end = {
|
|
3473
|
+
value: function () {
|
|
3474
|
+
if (--size === 0) resolve();
|
|
3475
|
+
}
|
|
3476
|
+
};
|
|
3282
3477
|
that.each(function () {
|
|
3283
3478
|
var schedule = set(this, id),
|
|
3284
|
-
|
|
3479
|
+
on = schedule.on;
|
|
3480
|
+
|
|
3481
|
+
// If this node shared a dispatch with the previous node,
|
|
3285
3482
|
// just assign the updated shared dispatch and we’re done!
|
|
3286
3483
|
// Otherwise, copy-on-write.
|
|
3287
|
-
|
|
3288
3484
|
if (on !== on0) {
|
|
3289
3485
|
on1 = (on0 = on).copy();
|
|
3290
|
-
|
|
3291
3486
|
on1._.cancel.push(cancel);
|
|
3292
|
-
|
|
3293
3487
|
on1._.interrupt.push(cancel);
|
|
3294
|
-
|
|
3295
3488
|
on1._.end.push(end);
|
|
3296
3489
|
}
|
|
3297
|
-
|
|
3298
3490
|
schedule.on = on1;
|
|
3299
|
-
});
|
|
3491
|
+
});
|
|
3300
3492
|
|
|
3493
|
+
// The selection was empty, resolve end immediately
|
|
3301
3494
|
if (size === 0) resolve();
|
|
3302
3495
|
});
|
|
3303
3496
|
}
|
|
@@ -3357,28 +3550,22 @@
|
|
|
3357
3550
|
duration: 250,
|
|
3358
3551
|
ease: cubicInOut
|
|
3359
3552
|
};
|
|
3360
|
-
|
|
3361
3553
|
function inherit(node, id) {
|
|
3362
3554
|
var timing;
|
|
3363
|
-
|
|
3364
3555
|
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
3365
3556
|
if (!(node = node.parentNode)) {
|
|
3366
3557
|
throw new Error(`transition ${id} not found`);
|
|
3367
3558
|
}
|
|
3368
3559
|
}
|
|
3369
|
-
|
|
3370
3560
|
return timing;
|
|
3371
3561
|
}
|
|
3372
|
-
|
|
3373
3562
|
function selection_transition (name) {
|
|
3374
3563
|
var id, timing;
|
|
3375
|
-
|
|
3376
3564
|
if (name instanceof Transition) {
|
|
3377
3565
|
id = name._id, name = name._name;
|
|
3378
3566
|
} else {
|
|
3379
3567
|
id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
3380
3568
|
}
|
|
3381
|
-
|
|
3382
3569
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3383
3570
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3384
3571
|
if (node = group[i]) {
|
|
@@ -3386,36 +3573,68 @@
|
|
|
3386
3573
|
}
|
|
3387
3574
|
}
|
|
3388
3575
|
}
|
|
3389
|
-
|
|
3390
3576
|
return new Transition(groups, this._parents, name, id);
|
|
3391
3577
|
}
|
|
3392
3578
|
|
|
3393
3579
|
selection.prototype.interrupt = selection_interrupt;
|
|
3394
3580
|
selection.prototype.transition = selection_transition;
|
|
3395
3581
|
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3582
|
+
function Transform(k, x, y) {
|
|
3583
|
+
this.k = k;
|
|
3584
|
+
this.x = x;
|
|
3585
|
+
this.y = y;
|
|
3586
|
+
}
|
|
3587
|
+
Transform.prototype = {
|
|
3588
|
+
constructor: Transform,
|
|
3589
|
+
scale: function (k) {
|
|
3590
|
+
return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
|
|
3591
|
+
},
|
|
3592
|
+
translate: function (x, y) {
|
|
3593
|
+
return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
|
|
3594
|
+
},
|
|
3595
|
+
apply: function (point) {
|
|
3596
|
+
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
3597
|
+
},
|
|
3598
|
+
applyX: function (x) {
|
|
3599
|
+
return x * this.k + this.x;
|
|
3600
|
+
},
|
|
3601
|
+
applyY: function (y) {
|
|
3602
|
+
return y * this.k + this.y;
|
|
3603
|
+
},
|
|
3604
|
+
invert: function (location) {
|
|
3605
|
+
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
3606
|
+
},
|
|
3607
|
+
invertX: function (x) {
|
|
3608
|
+
return (x - this.x) / this.k;
|
|
3609
|
+
},
|
|
3610
|
+
invertY: function (y) {
|
|
3611
|
+
return (y - this.y) / this.k;
|
|
3612
|
+
},
|
|
3613
|
+
rescaleX: function (x) {
|
|
3614
|
+
return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
|
|
3615
|
+
},
|
|
3616
|
+
rescaleY: function (y) {
|
|
3617
|
+
return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
|
|
3618
|
+
},
|
|
3619
|
+
toString: function () {
|
|
3620
|
+
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
3621
|
+
}
|
|
3622
|
+
};
|
|
3623
|
+
new Transform(1, 0, 0);
|
|
3624
|
+
Transform.prototype;
|
|
3625
|
+
|
|
3406
3626
|
/*
|
|
3407
3627
|
DecidablesElement Base Class - Not intended for instantiation!
|
|
3408
3628
|
<decidables-element>
|
|
3409
3629
|
*/
|
|
3410
|
-
|
|
3411
3630
|
class DecidablesElement extends s {
|
|
3412
3631
|
getComputedStyleValue(property) {
|
|
3413
3632
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3414
3633
|
}
|
|
3415
|
-
|
|
3416
3634
|
firstUpdated(changedProperties) {
|
|
3417
|
-
super.firstUpdated(changedProperties);
|
|
3635
|
+
super.firstUpdated(changedProperties);
|
|
3418
3636
|
|
|
3637
|
+
// Use focus highlighting if keyboard is used at all
|
|
3419
3638
|
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
|
|
3420
3639
|
const element = event.currentTarget;
|
|
3421
3640
|
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
@@ -3424,7 +3643,6 @@
|
|
|
3424
3643
|
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
3425
3644
|
});
|
|
3426
3645
|
}
|
|
3427
|
-
|
|
3428
3646
|
static get greys() {
|
|
3429
3647
|
const grey = '#999999';
|
|
3430
3648
|
const greys = {};
|
|
@@ -3439,13 +3657,11 @@
|
|
|
3439
3657
|
greys.black = '#000000';
|
|
3440
3658
|
return greys;
|
|
3441
3659
|
}
|
|
3442
|
-
|
|
3443
3660
|
static get shadows() {
|
|
3444
3661
|
// Material Design elevation styles
|
|
3445
3662
|
// References:
|
|
3446
3663
|
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
|
|
3447
3664
|
// https://codepen.io/hanger/pen/yOGvQp
|
|
3448
|
-
|
|
3449
3665
|
/* eslint-disable key-spacing, object-curly-newline */
|
|
3450
3666
|
return {
|
|
3451
3667
|
elevations: [0, 2, 4, 8, 16],
|
|
@@ -3578,29 +3794,27 @@
|
|
|
3578
3794
|
const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
|
|
3579
3795
|
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
3580
3796
|
}
|
|
3581
|
-
|
|
3582
3797
|
static get svgFilters() {
|
|
3583
|
-
const shadows = DecidablesElement.shadows;
|
|
3584
|
-
/* eslint-disable-line prefer-destructuring */
|
|
3798
|
+
const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
|
|
3585
3799
|
|
|
3586
3800
|
const filters = shadows.elevations.map(z => {
|
|
3587
|
-
return y
|
|
3588
|
-
<filter id=${
|
|
3801
|
+
return y`
|
|
3802
|
+
<filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
|
|
3589
3803
|
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
3590
3804
|
<feFuncA type="table" tableValues="0 1 1"/>
|
|
3591
3805
|
</feComponentTransfer>
|
|
3592
|
-
<feOffset in="solid" result="offU" dx=${
|
|
3593
|
-
<feOffset in="solid" result="offP" dx=${
|
|
3594
|
-
<feOffset in="solid" result="offA" dx=${
|
|
3595
|
-
${0}
|
|
3596
|
-
${0}
|
|
3597
|
-
${0}
|
|
3598
|
-
<feGaussianBlur in=${0} result="blurU" stdDeviation=${
|
|
3599
|
-
<feGaussianBlur in=${0} result="blurP" stdDeviation=${
|
|
3600
|
-
<feGaussianBlur in=${0} result="blurA" stdDeviation=${
|
|
3601
|
-
<feFlood in="SourceGraphic" result="opU" flood-color=${
|
|
3602
|
-
<feFlood in="SourceGraphic" result="opP" flood-color=${
|
|
3603
|
-
<feFlood in="SourceGraphic" result="opA" flood-color=${
|
|
3806
|
+
<feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
|
|
3807
|
+
<feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
|
|
3808
|
+
<feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
|
|
3809
|
+
${shadows.mapUmbra[z].s === 0 ? y`` : y`<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
|
|
3810
|
+
${shadows.mapPenumbra[z].s === 0 ? y`` : y`<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
|
|
3811
|
+
${shadows.mapAmbient[z].s === 0 ? y`` : y`<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
|
|
3812
|
+
<feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
|
|
3813
|
+
<feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
|
|
3814
|
+
<feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
|
|
3815
|
+
<feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
|
|
3816
|
+
<feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
|
|
3817
|
+
<feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
|
|
3604
3818
|
<feComposite in="opU" in2="blurU" result="shU" operator="in" />
|
|
3605
3819
|
<feComposite in="opP" in2="blurP" result="shP" operator="in" />
|
|
3606
3820
|
<feComposite in="opA" in2="blurA" result="shA" operator="in" />
|
|
@@ -3614,36 +3828,35 @@
|
|
|
3614
3828
|
<feMergeNode in="finalA" />
|
|
3615
3829
|
<feMergeNode in="SourceGraphic" />
|
|
3616
3830
|
</feMerge>
|
|
3617
|
-
</filter
|
|
3831
|
+
</filter>`;
|
|
3618
3832
|
});
|
|
3619
|
-
return y
|
|
3833
|
+
return y`
|
|
3620
3834
|
<svg class="defs">
|
|
3621
3835
|
<defs>
|
|
3622
|
-
${
|
|
3836
|
+
${filters}
|
|
3623
3837
|
</defs>
|
|
3624
3838
|
</svg>
|
|
3625
|
-
|
|
3839
|
+
`;
|
|
3626
3840
|
}
|
|
3627
|
-
|
|
3628
3841
|
static get styles() {
|
|
3629
|
-
return r$2
|
|
3842
|
+
return r$2`
|
|
3630
3843
|
:host {
|
|
3631
|
-
---shadow-0: var(--shadow-0, ${0});
|
|
3632
|
-
---shadow-2: var(--shadow-2, ${
|
|
3633
|
-
---shadow-4: var(--shadow-4, ${
|
|
3634
|
-
---shadow-8: var(--shadow-8, ${
|
|
3635
|
-
|
|
3636
|
-
---color-background: var(--color-background, ${
|
|
3637
|
-
---color-border: var(--color-border, ${
|
|
3638
|
-
---color-text: var(--color-text, ${
|
|
3639
|
-
---color-text-inverse: var(--color-text-inverse, ${
|
|
3640
|
-
---color-link: var(--color-link, ${
|
|
3641
|
-
---color-element-background: var(--color-element-background, ${
|
|
3642
|
-
---color-element-disabled: var(--color-element-disabled, ${
|
|
3643
|
-
---color-element-enabled: var(--color-element-enabled, ${
|
|
3644
|
-
---color-element-selected: var(--color-element-selected, ${
|
|
3645
|
-
---color-element-border: var(--color-element-border, ${
|
|
3646
|
-
---color-element-emphasis: var(--color-element-emphasis, ${
|
|
3844
|
+
---shadow-0: var(--shadow-0, ${o$3(this.cssBoxShadow(0))});
|
|
3845
|
+
---shadow-2: var(--shadow-2, ${o$3(this.cssBoxShadow(2))});
|
|
3846
|
+
---shadow-4: var(--shadow-4, ${o$3(this.cssBoxShadow(4))});
|
|
3847
|
+
---shadow-8: var(--shadow-8, ${o$3(this.cssBoxShadow(8))});
|
|
3848
|
+
|
|
3849
|
+
---color-background: var(--color-background, ${o$3(this.greys.white)});
|
|
3850
|
+
---color-border: var(--color-border, ${o$3(this.greys.light75)});
|
|
3851
|
+
---color-text: var(--color-text, ${o$3(this.greys.dark75)});
|
|
3852
|
+
---color-text-inverse: var(--color-text-inverse, ${o$3(this.greys.white)});
|
|
3853
|
+
---color-link: var(--color-link, ${o$3(this.greys.dark25)});
|
|
3854
|
+
---color-element-background: var(--color-element-background, ${o$3(this.greys.light75)});
|
|
3855
|
+
---color-element-disabled: var(--color-element-disabled, ${o$3(this.greys.light50)});
|
|
3856
|
+
---color-element-enabled: var(--color-element-enabled, ${o$3(this.greys.dark25)});
|
|
3857
|
+
---color-element-selected: var(--color-element-selected, ${o$3(this.greys.grey)});
|
|
3858
|
+
---color-element-border: var(--color-element-border, ${o$3(this.greys.dark50)});
|
|
3859
|
+
---color-element-emphasis: var(--color-element-emphasis, ${o$3(this.greys.dark75)});
|
|
3647
3860
|
|
|
3648
3861
|
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
3649
3862
|
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
@@ -3683,14 +3896,10 @@
|
|
|
3683
3896
|
width: 0;
|
|
3684
3897
|
height: 0;
|
|
3685
3898
|
}
|
|
3686
|
-
|
|
3899
|
+
`;
|
|
3687
3900
|
}
|
|
3688
|
-
|
|
3689
3901
|
}
|
|
3690
3902
|
|
|
3691
|
-
let _$5 = t => t,
|
|
3692
|
-
_t$5,
|
|
3693
|
-
_t2$5;
|
|
3694
3903
|
class DecidablesButton extends DecidablesElement {
|
|
3695
3904
|
static get properties() {
|
|
3696
3905
|
return {
|
|
@@ -3701,15 +3910,14 @@
|
|
|
3701
3910
|
}
|
|
3702
3911
|
};
|
|
3703
3912
|
}
|
|
3704
|
-
|
|
3705
3913
|
constructor() {
|
|
3706
|
-
super();
|
|
3914
|
+
super();
|
|
3707
3915
|
|
|
3916
|
+
// Attributes
|
|
3708
3917
|
this.disabled = false;
|
|
3709
3918
|
}
|
|
3710
|
-
|
|
3711
3919
|
static get styles() {
|
|
3712
|
-
return [super.styles, r$2
|
|
3920
|
+
return [super.styles, r$2`
|
|
3713
3921
|
:host {
|
|
3714
3922
|
margin: 0.25rem;
|
|
3715
3923
|
}
|
|
@@ -3762,17 +3970,15 @@
|
|
|
3762
3970
|
outline: none;
|
|
3763
3971
|
box-shadow: var(---shadow-8);
|
|
3764
3972
|
}
|
|
3765
|
-
`
|
|
3973
|
+
`];
|
|
3766
3974
|
}
|
|
3767
|
-
|
|
3768
3975
|
render() {
|
|
3769
|
-
return
|
|
3770
|
-
<button ?disabled=${
|
|
3976
|
+
return $`
|
|
3977
|
+
<button ?disabled=${this.disabled}>
|
|
3771
3978
|
<slot></slot>
|
|
3772
3979
|
</button>
|
|
3773
|
-
|
|
3980
|
+
`;
|
|
3774
3981
|
}
|
|
3775
|
-
|
|
3776
3982
|
}
|
|
3777
3983
|
customElements.define('decidables-button', DecidablesButton);
|
|
3778
3984
|
|
|
@@ -3781,12 +3987,8 @@
|
|
|
3781
3987
|
* Copyright 2018 Google LLC
|
|
3782
3988
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3783
3989
|
*/
|
|
3990
|
+
const l = l => null != l ? l : b$1;
|
|
3784
3991
|
|
|
3785
|
-
const l = l => null != l ? l : w;
|
|
3786
|
-
|
|
3787
|
-
let _$4 = t => t,
|
|
3788
|
-
_t$4,
|
|
3789
|
-
_t2$4;
|
|
3790
3992
|
class DecidablesSlider extends DecidablesElement {
|
|
3791
3993
|
static get properties() {
|
|
3792
3994
|
return {
|
|
@@ -3817,17 +4019,16 @@
|
|
|
3817
4019
|
}
|
|
3818
4020
|
};
|
|
3819
4021
|
}
|
|
3820
|
-
|
|
3821
4022
|
constructor() {
|
|
3822
|
-
super();
|
|
4023
|
+
super();
|
|
3823
4024
|
|
|
4025
|
+
// Attributes
|
|
3824
4026
|
this.disabled = false;
|
|
3825
4027
|
this.max = undefined;
|
|
3826
4028
|
this.min = undefined;
|
|
3827
4029
|
this.step = undefined;
|
|
3828
4030
|
this.value = undefined;
|
|
3829
4031
|
}
|
|
3830
|
-
|
|
3831
4032
|
changed(event) {
|
|
3832
4033
|
this.value = event.target.value;
|
|
3833
4034
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -3837,17 +4038,15 @@
|
|
|
3837
4038
|
bubbles: true
|
|
3838
4039
|
}));
|
|
3839
4040
|
}
|
|
3840
|
-
|
|
3841
4041
|
inputted(event) {
|
|
3842
4042
|
this.value = event.target.value;
|
|
3843
4043
|
}
|
|
3844
|
-
|
|
3845
4044
|
static get styles() {
|
|
3846
|
-
return [super.styles, r$2
|
|
4045
|
+
return [super.styles, r$2`
|
|
3847
4046
|
:host {
|
|
3848
|
-
---shadow-2-rotate: var(--shadow-2-rotate, ${
|
|
3849
|
-
---shadow-4-rotate: var(--shadow-4-rotate, ${
|
|
3850
|
-
---shadow-8-rotate: var(--shadow-8-rotate, ${
|
|
4047
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${o$3(this.cssBoxShadow(2, true, false))});
|
|
4048
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${o$3(this.cssBoxShadow(4, true, false))});
|
|
4049
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${o$3(this.cssBoxShadow(8, true, false))});
|
|
3851
4050
|
|
|
3852
4051
|
display: flex;
|
|
3853
4052
|
|
|
@@ -4093,27 +4292,22 @@
|
|
|
4093
4292
|
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
4094
4293
|
box-shadow: var(---shadow-8-rotate);
|
|
4095
4294
|
}
|
|
4096
|
-
`
|
|
4295
|
+
`];
|
|
4097
4296
|
}
|
|
4098
|
-
|
|
4099
4297
|
render() {
|
|
4100
|
-
return
|
|
4298
|
+
return $`
|
|
4101
4299
|
<label for="slider">
|
|
4102
4300
|
<slot></slot>
|
|
4103
4301
|
</label>
|
|
4104
4302
|
<div class="range">
|
|
4105
|
-
<input type="range" id="slider" min=${
|
|
4303
|
+
<input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
|
|
4106
4304
|
</div>
|
|
4107
|
-
<decidables-spinner min=${
|
|
4108
|
-
|
|
4305
|
+
<decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
|
|
4306
|
+
`;
|
|
4109
4307
|
}
|
|
4110
|
-
|
|
4111
4308
|
}
|
|
4112
4309
|
customElements.define('decidables-slider', DecidablesSlider);
|
|
4113
4310
|
|
|
4114
|
-
let _$3 = t => t,
|
|
4115
|
-
_t$3,
|
|
4116
|
-
_t2$3;
|
|
4117
4311
|
class DecidablesSpinner extends DecidablesElement {
|
|
4118
4312
|
static get properties() {
|
|
4119
4313
|
return {
|
|
@@ -4144,23 +4338,21 @@
|
|
|
4144
4338
|
}
|
|
4145
4339
|
};
|
|
4146
4340
|
}
|
|
4147
|
-
|
|
4148
4341
|
constructor() {
|
|
4149
|
-
super();
|
|
4342
|
+
super();
|
|
4150
4343
|
|
|
4344
|
+
// Attributes
|
|
4151
4345
|
this.disabled = false;
|
|
4152
4346
|
this.max = undefined;
|
|
4153
4347
|
this.min = undefined;
|
|
4154
4348
|
this.step = undefined;
|
|
4155
4349
|
this.value = undefined;
|
|
4156
4350
|
}
|
|
4157
|
-
|
|
4158
4351
|
inputted(event) {
|
|
4159
4352
|
this.value = event.target.value;
|
|
4160
4353
|
}
|
|
4161
|
-
|
|
4162
4354
|
static get styles() {
|
|
4163
|
-
return [super.styles, r$2
|
|
4355
|
+
return [super.styles, r$2`
|
|
4164
4356
|
:host {
|
|
4165
4357
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
4166
4358
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
@@ -4239,24 +4431,19 @@
|
|
|
4239
4431
|
margin: 0;
|
|
4240
4432
|
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4241
4433
|
}
|
|
4242
|
-
`
|
|
4434
|
+
`];
|
|
4243
4435
|
}
|
|
4244
|
-
|
|
4245
4436
|
render() {
|
|
4246
|
-
return
|
|
4437
|
+
return $`
|
|
4247
4438
|
<label>
|
|
4248
4439
|
<slot></slot>
|
|
4249
|
-
<input ?disabled=${
|
|
4440
|
+
<input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
|
|
4250
4441
|
</label>
|
|
4251
|
-
|
|
4442
|
+
`;
|
|
4252
4443
|
}
|
|
4253
|
-
|
|
4254
4444
|
}
|
|
4255
4445
|
customElements.define('decidables-spinner', DecidablesSpinner);
|
|
4256
4446
|
|
|
4257
|
-
let _$2 = t => t,
|
|
4258
|
-
_t$2,
|
|
4259
|
-
_t2$2;
|
|
4260
4447
|
class DecidablesSwitch extends DecidablesElement {
|
|
4261
4448
|
static get properties() {
|
|
4262
4449
|
return {
|
|
@@ -4272,14 +4459,13 @@
|
|
|
4272
4459
|
}
|
|
4273
4460
|
};
|
|
4274
4461
|
}
|
|
4275
|
-
|
|
4276
4462
|
constructor() {
|
|
4277
|
-
super();
|
|
4463
|
+
super();
|
|
4278
4464
|
|
|
4465
|
+
// Attributes
|
|
4279
4466
|
this.checked = false;
|
|
4280
4467
|
this.disabled = false;
|
|
4281
4468
|
}
|
|
4282
|
-
|
|
4283
4469
|
changed(event) {
|
|
4284
4470
|
this.checked = event.target.checked;
|
|
4285
4471
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4289,9 +4475,8 @@
|
|
|
4289
4475
|
bubbles: true
|
|
4290
4476
|
}));
|
|
4291
4477
|
}
|
|
4292
|
-
|
|
4293
4478
|
static get styles() {
|
|
4294
|
-
return [super.styles, r$2
|
|
4479
|
+
return [super.styles, r$2`
|
|
4295
4480
|
:host {
|
|
4296
4481
|
display: flex;
|
|
4297
4482
|
|
|
@@ -4410,27 +4595,22 @@
|
|
|
4410
4595
|
:host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
|
|
4411
4596
|
box-shadow: var(---shadow-8);
|
|
4412
4597
|
}
|
|
4413
|
-
`
|
|
4598
|
+
`];
|
|
4414
4599
|
}
|
|
4415
|
-
|
|
4416
4600
|
render() {
|
|
4417
|
-
return
|
|
4418
|
-
<input type="checkbox" id="switch" ?checked=${
|
|
4601
|
+
return $`
|
|
4602
|
+
<input type="checkbox" id="switch" ?checked=${this.checked} ?disabled=${this.disabled} @change=${this.changed.bind(this)}>
|
|
4419
4603
|
<label for="switch">
|
|
4420
4604
|
<slot name="off-label"></slot>
|
|
4421
4605
|
</label>
|
|
4422
4606
|
<label for="switch">
|
|
4423
4607
|
<slot></slot>
|
|
4424
4608
|
</label>
|
|
4425
|
-
|
|
4609
|
+
`;
|
|
4426
4610
|
}
|
|
4427
|
-
|
|
4428
4611
|
}
|
|
4429
4612
|
customElements.define('decidables-switch', DecidablesSwitch);
|
|
4430
4613
|
|
|
4431
|
-
let _$1 = t => t,
|
|
4432
|
-
_t$1,
|
|
4433
|
-
_t2$1;
|
|
4434
4614
|
class DecidablesToggle extends DecidablesElement {
|
|
4435
4615
|
static get properties() {
|
|
4436
4616
|
return {
|
|
@@ -4441,15 +4621,14 @@
|
|
|
4441
4621
|
}
|
|
4442
4622
|
};
|
|
4443
4623
|
}
|
|
4444
|
-
|
|
4445
4624
|
constructor() {
|
|
4446
|
-
super();
|
|
4625
|
+
super();
|
|
4447
4626
|
|
|
4627
|
+
// Attributes
|
|
4448
4628
|
this.disabled = false;
|
|
4449
4629
|
}
|
|
4450
|
-
|
|
4451
4630
|
static get styles() {
|
|
4452
|
-
return [super.styles, r$2
|
|
4631
|
+
return [super.styles, r$2`
|
|
4453
4632
|
fieldset {
|
|
4454
4633
|
display: flex;
|
|
4455
4634
|
|
|
@@ -4466,24 +4645,19 @@
|
|
|
4466
4645
|
legend {
|
|
4467
4646
|
text-align: center;
|
|
4468
4647
|
}
|
|
4469
|
-
`
|
|
4648
|
+
`];
|
|
4470
4649
|
}
|
|
4471
|
-
|
|
4472
4650
|
render() {
|
|
4473
|
-
return
|
|
4474
|
-
<fieldset ?disabled=${
|
|
4651
|
+
return $`
|
|
4652
|
+
<fieldset ?disabled=${this.disabled}>
|
|
4475
4653
|
<legend><slot name="label"></slot></legend>
|
|
4476
4654
|
<slot></slot>
|
|
4477
4655
|
</fieldset>
|
|
4478
|
-
|
|
4656
|
+
`;
|
|
4479
4657
|
}
|
|
4480
|
-
|
|
4481
4658
|
}
|
|
4482
4659
|
customElements.define('decidables-toggle', DecidablesToggle);
|
|
4483
4660
|
|
|
4484
|
-
let _ = t => t,
|
|
4485
|
-
_t,
|
|
4486
|
-
_t2;
|
|
4487
4661
|
class DecidablesToggleOption extends DecidablesElement {
|
|
4488
4662
|
static get properties() {
|
|
4489
4663
|
return {
|
|
@@ -4509,16 +4683,15 @@
|
|
|
4509
4683
|
}
|
|
4510
4684
|
};
|
|
4511
4685
|
}
|
|
4512
|
-
|
|
4513
4686
|
constructor() {
|
|
4514
|
-
super();
|
|
4687
|
+
super();
|
|
4515
4688
|
|
|
4689
|
+
// Attributes
|
|
4516
4690
|
this.checked = false;
|
|
4517
4691
|
this.disabled = false;
|
|
4518
4692
|
this.name = undefined;
|
|
4519
4693
|
this.value = undefined;
|
|
4520
4694
|
}
|
|
4521
|
-
|
|
4522
4695
|
changed(event) {
|
|
4523
4696
|
this.checked = event.target.checked;
|
|
4524
4697
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4529,9 +4702,8 @@
|
|
|
4529
4702
|
bubbles: true
|
|
4530
4703
|
}));
|
|
4531
4704
|
}
|
|
4532
|
-
|
|
4533
4705
|
static get styles() {
|
|
4534
|
-
return [super.styles, r$2
|
|
4706
|
+
return [super.styles, r$2`
|
|
4535
4707
|
:host {
|
|
4536
4708
|
display: flex;
|
|
4537
4709
|
}
|
|
@@ -4624,18 +4796,16 @@
|
|
|
4624
4796
|
outline: none;
|
|
4625
4797
|
box-shadow: var(---shadow-8);
|
|
4626
4798
|
}
|
|
4627
|
-
`
|
|
4799
|
+
`];
|
|
4628
4800
|
}
|
|
4629
|
-
|
|
4630
4801
|
render() {
|
|
4631
|
-
return
|
|
4632
|
-
<input type="radio" id="toggle-option" name=${
|
|
4802
|
+
return $`
|
|
4803
|
+
<input type="radio" id="toggle-option" name=${this.name} value=${this.value} .checked=${this.checked} @change=${this.changed.bind(this)}>
|
|
4633
4804
|
<label for="toggle-option">
|
|
4634
4805
|
<slot></slot>
|
|
4635
4806
|
</label>
|
|
4636
|
-
|
|
4807
|
+
`;
|
|
4637
4808
|
}
|
|
4638
|
-
|
|
4639
4809
|
}
|
|
4640
4810
|
customElements.define('decidables-toggle-option', DecidablesToggleOption);
|
|
4641
4811
|
|
|
@@ -4679,7 +4849,5 @@
|
|
|
4679
4849
|
exports.DecidablesToggle = DecidablesToggle;
|
|
4680
4850
|
exports.DecidablesToggleOption = DecidablesToggleOption;
|
|
4681
4851
|
|
|
4682
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4683
|
-
|
|
4684
4852
|
}));
|
|
4685
4853
|
//# sourceMappingURL=decidablesElements.umd.js.map
|