@decidables/decidables-elements 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +54 -0
  3. package/gulpfile.js +25 -0
  4. package/lib/decidablesElements.esm.js +4889 -0
  5. package/lib/decidablesElements.esm.js.map +1 -0
  6. package/lib/decidablesElements.esm.min.js +13 -0
  7. package/lib/decidablesElements.esm.min.js.map +1 -0
  8. package/lib/decidablesElements.umd.js +4907 -0
  9. package/lib/decidablesElements.umd.js.map +1 -0
  10. package/lib/decidablesElements.umd.min.js +13 -0
  11. package/lib/decidablesElements.umd.min.js.map +1 -0
  12. package/package.json +46 -0
  13. package/src/button.js +93 -0
  14. package/src/converter-array.js +15 -0
  15. package/src/converter-set.js +15 -0
  16. package/src/decidables-element.js +264 -0
  17. package/src/index.js +11 -0
  18. package/src/slider.js +333 -0
  19. package/src/spinner.js +149 -0
  20. package/src/switch.js +179 -0
  21. package/src/toggle-option.js +163 -0
  22. package/src/toggle.js +58 -0
  23. package/test/button.test.js +29 -0
  24. package/test/converter-array.test.js +14 -0
  25. package/test/converter-set.test.js +15 -0
  26. package/test/coverage/lcov-report/base.css +224 -0
  27. package/test/coverage/lcov-report/block-navigation.js +87 -0
  28. package/test/coverage/lcov-report/button.js.html +364 -0
  29. package/test/coverage/lcov-report/converter-array.js.html +130 -0
  30. package/test/coverage/lcov-report/converter-set.js.html +130 -0
  31. package/test/coverage/lcov-report/decidables-element.js.html +877 -0
  32. package/test/coverage/lcov-report/favicon.png +0 -0
  33. package/test/coverage/lcov-report/index.html +236 -0
  34. package/test/coverage/lcov-report/prettify.css +1 -0
  35. package/test/coverage/lcov-report/prettify.js +2 -0
  36. package/test/coverage/lcov-report/slider.js.html +1084 -0
  37. package/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  38. package/test/coverage/lcov-report/sorter.js +196 -0
  39. package/test/coverage/lcov-report/spinner.js.html +532 -0
  40. package/test/coverage/lcov-report/switch.js.html +622 -0
  41. package/test/coverage/lcov-report/toggle-option.js.html +574 -0
  42. package/test/coverage/lcov-report/toggle.js.html +259 -0
  43. package/test/coverage/lcov.info +1480 -0
  44. package/test/decidables-element.test.js +10 -0
  45. package/test/slider.test.js +64 -0
  46. package/test/spinner.test.js +55 -0
  47. package/test/switch.test.js +71 -0
  48. package/test/toggle-option.test.js +62 -0
  49. package/test/toggle.test.js +98 -0
@@ -0,0 +1,4907 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.decidablesElements = {}));
5
+ })(this, (function (exports) { 'use strict';
6
+
7
+ function _typeof(obj) {
8
+ "@babel/helpers - typeof";
9
+
10
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
11
+ return typeof obj;
12
+ } : function (obj) {
13
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
14
+ }, _typeof(obj);
15
+ }
16
+
17
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
18
+ try {
19
+ var info = gen[key](arg);
20
+ var value = info.value;
21
+ } catch (error) {
22
+ reject(error);
23
+ return;
24
+ }
25
+
26
+ if (info.done) {
27
+ resolve(value);
28
+ } else {
29
+ Promise.resolve(value).then(_next, _throw);
30
+ }
31
+ }
32
+
33
+ function _asyncToGenerator(fn) {
34
+ return function () {
35
+ var self = this,
36
+ args = arguments;
37
+ return new Promise(function (resolve, reject) {
38
+ var gen = fn.apply(self, args);
39
+
40
+ function _next(value) {
41
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
42
+ }
43
+
44
+ function _throw(err) {
45
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
46
+ }
47
+
48
+ _next(undefined);
49
+ });
50
+ };
51
+ }
52
+
53
+ function _classCallCheck(instance, Constructor) {
54
+ if (!(instance instanceof Constructor)) {
55
+ throw new TypeError("Cannot call a class as a function");
56
+ }
57
+ }
58
+
59
+ function _defineProperties(target, props) {
60
+ for (var i = 0; i < props.length; i++) {
61
+ var descriptor = props[i];
62
+ descriptor.enumerable = descriptor.enumerable || false;
63
+ descriptor.configurable = true;
64
+ if ("value" in descriptor) descriptor.writable = true;
65
+ Object.defineProperty(target, descriptor.key, descriptor);
66
+ }
67
+ }
68
+
69
+ function _createClass(Constructor, protoProps, staticProps) {
70
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
71
+ if (staticProps) _defineProperties(Constructor, staticProps);
72
+ Object.defineProperty(Constructor, "prototype", {
73
+ writable: false
74
+ });
75
+ return Constructor;
76
+ }
77
+
78
+ function _defineProperty(obj, key, value) {
79
+ if (key in obj) {
80
+ Object.defineProperty(obj, key, {
81
+ value: value,
82
+ enumerable: true,
83
+ configurable: true,
84
+ writable: true
85
+ });
86
+ } else {
87
+ obj[key] = value;
88
+ }
89
+
90
+ return obj;
91
+ }
92
+
93
+ function _inherits(subClass, superClass) {
94
+ if (typeof superClass !== "function" && superClass !== null) {
95
+ throw new TypeError("Super expression must either be null or a function");
96
+ }
97
+
98
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
99
+ constructor: {
100
+ value: subClass,
101
+ writable: true,
102
+ configurable: true
103
+ }
104
+ });
105
+ Object.defineProperty(subClass, "prototype", {
106
+ writable: false
107
+ });
108
+ if (superClass) _setPrototypeOf(subClass, superClass);
109
+ }
110
+
111
+ function _getPrototypeOf(o) {
112
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
113
+ return o.__proto__ || Object.getPrototypeOf(o);
114
+ };
115
+ return _getPrototypeOf(o);
116
+ }
117
+
118
+ function _setPrototypeOf(o, p) {
119
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
120
+ o.__proto__ = p;
121
+ return o;
122
+ };
123
+
124
+ return _setPrototypeOf(o, p);
125
+ }
126
+
127
+ function _isNativeReflectConstruct() {
128
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
129
+ if (Reflect.construct.sham) return false;
130
+ if (typeof Proxy === "function") return true;
131
+
132
+ try {
133
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
134
+ return true;
135
+ } catch (e) {
136
+ return false;
137
+ }
138
+ }
139
+
140
+ function _construct(Parent, args, Class) {
141
+ if (_isNativeReflectConstruct()) {
142
+ _construct = Reflect.construct;
143
+ } else {
144
+ _construct = function _construct(Parent, args, Class) {
145
+ var a = [null];
146
+ a.push.apply(a, args);
147
+ var Constructor = Function.bind.apply(Parent, a);
148
+ var instance = new Constructor();
149
+ if (Class) _setPrototypeOf(instance, Class.prototype);
150
+ return instance;
151
+ };
152
+ }
153
+
154
+ return _construct.apply(null, arguments);
155
+ }
156
+
157
+ function _isNativeFunction(fn) {
158
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
159
+ }
160
+
161
+ function _wrapNativeSuper(Class) {
162
+ var _cache = typeof Map === "function" ? new Map() : undefined;
163
+
164
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
165
+ if (Class === null || !_isNativeFunction(Class)) return Class;
166
+
167
+ if (typeof Class !== "function") {
168
+ throw new TypeError("Super expression must either be null or a function");
169
+ }
170
+
171
+ if (typeof _cache !== "undefined") {
172
+ if (_cache.has(Class)) return _cache.get(Class);
173
+
174
+ _cache.set(Class, Wrapper);
175
+ }
176
+
177
+ function Wrapper() {
178
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
179
+ }
180
+
181
+ Wrapper.prototype = Object.create(Class.prototype, {
182
+ constructor: {
183
+ value: Wrapper,
184
+ enumerable: false,
185
+ writable: true,
186
+ configurable: true
187
+ }
188
+ });
189
+ return _setPrototypeOf(Wrapper, Class);
190
+ };
191
+
192
+ return _wrapNativeSuper(Class);
193
+ }
194
+
195
+ function _assertThisInitialized(self) {
196
+ if (self === void 0) {
197
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
198
+ }
199
+
200
+ return self;
201
+ }
202
+
203
+ function _possibleConstructorReturn(self, call) {
204
+ if (call && (typeof call === "object" || typeof call === "function")) {
205
+ return call;
206
+ } else if (call !== void 0) {
207
+ throw new TypeError("Derived constructors may only return object or undefined");
208
+ }
209
+
210
+ return _assertThisInitialized(self);
211
+ }
212
+
213
+ function _createSuper(Derived) {
214
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
215
+
216
+ return function _createSuperInternal() {
217
+ var Super = _getPrototypeOf(Derived),
218
+ result;
219
+
220
+ if (hasNativeReflectConstruct) {
221
+ var NewTarget = _getPrototypeOf(this).constructor;
222
+
223
+ result = Reflect.construct(Super, arguments, NewTarget);
224
+ } else {
225
+ result = Super.apply(this, arguments);
226
+ }
227
+
228
+ return _possibleConstructorReturn(this, result);
229
+ };
230
+ }
231
+
232
+ function _superPropBase(object, property) {
233
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
234
+ object = _getPrototypeOf(object);
235
+ if (object === null) break;
236
+ }
237
+
238
+ return object;
239
+ }
240
+
241
+ function _get() {
242
+ if (typeof Reflect !== "undefined" && Reflect.get) {
243
+ _get = Reflect.get;
244
+ } else {
245
+ _get = function _get(target, property, receiver) {
246
+ var base = _superPropBase(target, property);
247
+
248
+ if (!base) return;
249
+ var desc = Object.getOwnPropertyDescriptor(base, property);
250
+
251
+ if (desc.get) {
252
+ return desc.get.call(arguments.length < 3 ? target : receiver);
253
+ }
254
+
255
+ return desc.value;
256
+ };
257
+ }
258
+
259
+ return _get.apply(this, arguments);
260
+ }
261
+
262
+ function _taggedTemplateLiteral(strings, raw) {
263
+ if (!raw) {
264
+ raw = strings.slice(0);
265
+ }
266
+
267
+ return Object.freeze(Object.defineProperties(strings, {
268
+ raw: {
269
+ value: Object.freeze(raw)
270
+ }
271
+ }));
272
+ }
273
+
274
+ function _slicedToArray(arr, i) {
275
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
276
+ }
277
+
278
+ function _toConsumableArray(arr) {
279
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
280
+ }
281
+
282
+ function _arrayWithoutHoles(arr) {
283
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
284
+ }
285
+
286
+ function _arrayWithHoles(arr) {
287
+ if (Array.isArray(arr)) return arr;
288
+ }
289
+
290
+ function _iterableToArray(iter) {
291
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
292
+ }
293
+
294
+ function _iterableToArrayLimit(arr, i) {
295
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
296
+
297
+ if (_i == null) return;
298
+ var _arr = [];
299
+ var _n = true;
300
+ var _d = false;
301
+
302
+ var _s, _e;
303
+
304
+ try {
305
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
306
+ _arr.push(_s.value);
307
+
308
+ if (i && _arr.length === i) break;
309
+ }
310
+ } catch (err) {
311
+ _d = true;
312
+ _e = err;
313
+ } finally {
314
+ try {
315
+ if (!_n && _i["return"] != null) _i["return"]();
316
+ } finally {
317
+ if (_d) throw _e;
318
+ }
319
+ }
320
+
321
+ return _arr;
322
+ }
323
+
324
+ function _unsupportedIterableToArray(o, minLen) {
325
+ if (!o) return;
326
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
327
+ var n = Object.prototype.toString.call(o).slice(8, -1);
328
+ if (n === "Object" && o.constructor) n = o.constructor.name;
329
+ if (n === "Map" || n === "Set") return Array.from(o);
330
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
331
+ }
332
+
333
+ function _arrayLikeToArray(arr, len) {
334
+ if (len == null || len > arr.length) len = arr.length;
335
+
336
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
337
+
338
+ return arr2;
339
+ }
340
+
341
+ function _nonIterableSpread() {
342
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
343
+ }
344
+
345
+ function _nonIterableRest() {
346
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
347
+ }
348
+
349
+ function _createForOfIteratorHelper(o, allowArrayLike) {
350
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
351
+
352
+ if (!it) {
353
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
354
+ if (it) o = it;
355
+ var i = 0;
356
+
357
+ var F = function () {};
358
+
359
+ return {
360
+ s: F,
361
+ n: function () {
362
+ if (i >= o.length) return {
363
+ done: true
364
+ };
365
+ return {
366
+ done: false,
367
+ value: o[i++]
368
+ };
369
+ },
370
+ e: function (e) {
371
+ throw e;
372
+ },
373
+ f: F
374
+ };
375
+ }
376
+
377
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
378
+ }
379
+
380
+ var normalCompletion = true,
381
+ didErr = false,
382
+ err;
383
+ return {
384
+ s: function () {
385
+ it = it.call(o);
386
+ },
387
+ n: function () {
388
+ var step = it.next();
389
+ normalCompletion = step.done;
390
+ return step;
391
+ },
392
+ e: function (e) {
393
+ didErr = true;
394
+ err = e;
395
+ },
396
+ f: function () {
397
+ try {
398
+ if (!normalCompletion && it.return != null) it.return();
399
+ } finally {
400
+ if (didErr) throw err;
401
+ }
402
+ }
403
+ };
404
+ }
405
+
406
+ /**
407
+ * @license
408
+ * Copyright 2019 Google LLC
409
+ * SPDX-License-Identifier: BSD-3-Clause
410
+ */
411
+ var t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
412
+ e$2 = Symbol(),
413
+ n$3 = new Map();
414
+
415
+ var s$3 = /*#__PURE__*/function () {
416
+ function s(t, n) {
417
+ _classCallCheck(this, s);
418
+
419
+ if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
420
+ this.cssText = t;
421
+ }
422
+
423
+ _createClass(s, [{
424
+ key: "styleSheet",
425
+ get: function get() {
426
+ var e = n$3.get(this.cssText);
427
+ return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
428
+ }
429
+ }, {
430
+ key: "toString",
431
+ value: function toString() {
432
+ return this.cssText;
433
+ }
434
+ }]);
435
+
436
+ return s;
437
+ }();
438
+
439
+ var o$3 = function o(t) {
440
+ return new s$3("string" == typeof t ? t : t + "", e$2);
441
+ },
442
+ r$2 = function r(t) {
443
+ for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
444
+ n[_key - 1] = arguments[_key];
445
+ }
446
+
447
+ var o = 1 === t.length ? t[0] : n.reduce(function (e, n, s) {
448
+ return e + function (t) {
449
+ if (!0 === t._$cssResult$) return t.cssText;
450
+ if ("number" == typeof t) return t;
451
+ 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.");
452
+ }(n) + t[s + 1];
453
+ }, t[0]);
454
+ return new s$3(o, e$2);
455
+ },
456
+ i$1 = function i(e, n) {
457
+ t$1 ? e.adoptedStyleSheets = n.map(function (t) {
458
+ return t instanceof CSSStyleSheet ? t : t.styleSheet;
459
+ }) : n.forEach(function (t) {
460
+ var n = document.createElement("style"),
461
+ s = window.litNonce;
462
+ void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
463
+ });
464
+ },
465
+ S$1 = t$1 ? function (t) {
466
+ return t;
467
+ } : function (t) {
468
+ return t instanceof CSSStyleSheet ? function (t) {
469
+ var e = "";
470
+
471
+ var _iterator = _createForOfIteratorHelper(t.cssRules),
472
+ _step;
473
+
474
+ try {
475
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
476
+ var _n = _step.value;
477
+ e += _n.cssText;
478
+ }
479
+ } catch (err) {
480
+ _iterator.e(err);
481
+ } finally {
482
+ _iterator.f();
483
+ }
484
+
485
+ return o$3(e);
486
+ }(t) : t;
487
+ };
488
+
489
+ /**
490
+ * @license
491
+ * Copyright 2017 Google LLC
492
+ * SPDX-License-Identifier: BSD-3-Clause
493
+ */
494
+
495
+ var s$2;
496
+
497
+ var e$1 = window.trustedTypes,
498
+ r$1 = e$1 ? e$1.emptyScript : "",
499
+ h$1 = window.reactiveElementPolyfillSupport,
500
+ o$2 = {
501
+ toAttribute: function toAttribute(t, i) {
502
+ switch (i) {
503
+ case Boolean:
504
+ t = t ? r$1 : null;
505
+ break;
506
+
507
+ case Object:
508
+ case Array:
509
+ t = null == t ? t : JSON.stringify(t);
510
+ }
511
+
512
+ return t;
513
+ },
514
+ fromAttribute: function fromAttribute(t, i) {
515
+ var s = t;
516
+
517
+ switch (i) {
518
+ case Boolean:
519
+ s = null !== t;
520
+ break;
521
+
522
+ case Number:
523
+ s = null === t ? null : Number(t);
524
+ break;
525
+
526
+ case Object:
527
+ case Array:
528
+ try {
529
+ s = JSON.parse(t);
530
+ } catch (t) {
531
+ s = null;
532
+ }
533
+
534
+ }
535
+
536
+ return s;
537
+ }
538
+ },
539
+ n$2 = function n(t, i) {
540
+ return i !== t && (i == i || t == t);
541
+ },
542
+ l$3 = {
543
+ attribute: !0,
544
+ type: String,
545
+ converter: o$2,
546
+ reflect: !1,
547
+ hasChanged: n$2
548
+ };
549
+
550
+ var a$1 = /*#__PURE__*/function (_HTMLElement) {
551
+ _inherits(a, _HTMLElement);
552
+
553
+ var _super = _createSuper(a);
554
+
555
+ function a() {
556
+ var _this;
557
+
558
+ _classCallCheck(this, a);
559
+
560
+ _this = _super.call(this), _this._$Et = new Map(), _this.isUpdatePending = !1, _this.hasUpdated = !1, _this._$Ei = null, _this.o();
561
+ return _this;
562
+ }
563
+
564
+ _createClass(a, [{
565
+ key: "o",
566
+ value: function o() {
567
+ var _this2 = this;
568
+
569
+ var t;
570
+ this._$Ep = new Promise(function (t) {
571
+ return _this2.enableUpdating = t;
572
+ }), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(function (t) {
573
+ return t(_this2);
574
+ });
575
+ }
576
+ }, {
577
+ key: "addController",
578
+ value: function addController(t) {
579
+ var i, s;
580
+ (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));
581
+ }
582
+ }, {
583
+ key: "removeController",
584
+ value: function removeController(t) {
585
+ var i;
586
+ null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
587
+ }
588
+ }, {
589
+ key: "_$Em",
590
+ value: function _$Em() {
591
+ var _this3 = this;
592
+
593
+ this.constructor.elementProperties.forEach(function (t, i) {
594
+ _this3.hasOwnProperty(i) && (_this3._$Et.set(i, _this3[i]), delete _this3[i]);
595
+ });
596
+ }
597
+ }, {
598
+ key: "createRenderRoot",
599
+ value: function createRenderRoot() {
600
+ var t;
601
+ var s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
602
+ return i$1(s, this.constructor.elementStyles), s;
603
+ }
604
+ }, {
605
+ key: "connectedCallback",
606
+ value: function connectedCallback() {
607
+ var t;
608
+ void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
609
+ var i;
610
+ return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
611
+ });
612
+ }
613
+ }, {
614
+ key: "enableUpdating",
615
+ value: function enableUpdating(t) {}
616
+ }, {
617
+ key: "disconnectedCallback",
618
+ value: function disconnectedCallback() {
619
+ var t;
620
+ null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
621
+ var i;
622
+ return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
623
+ });
624
+ }
625
+ }, {
626
+ key: "attributeChangedCallback",
627
+ value: function attributeChangedCallback(t, i, s) {
628
+ this._$AK(t, s);
629
+ }
630
+ }, {
631
+ key: "_$ES",
632
+ value: function _$ES(t, i) {
633
+ var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : l$3;
634
+ var e, r;
635
+
636
+ var h = this.constructor._$Eh(t, s);
637
+
638
+ if (void 0 !== h && !0 === s.reflect) {
639
+ var _n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
640
+
641
+ this._$Ei = t, null == _n ? this.removeAttribute(h) : this.setAttribute(h, _n), this._$Ei = null;
642
+ }
643
+ }
644
+ }, {
645
+ key: "_$AK",
646
+ value: function _$AK(t, i) {
647
+ var s, e, r;
648
+
649
+ var h = this.constructor,
650
+ n = h._$Eu.get(t);
651
+
652
+ if (void 0 !== n && this._$Ei !== n) {
653
+ var _t = h.getPropertyOptions(n),
654
+ _l = _t.converter,
655
+ _a2 = 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;
656
+
657
+ this._$Ei = n, this[n] = _a2(i, _t.type), this._$Ei = null;
658
+ }
659
+ }
660
+ }, {
661
+ key: "requestUpdate",
662
+ value: function requestUpdate(t, i, s) {
663
+ var e = !0;
664
+ 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._$E_ && (this._$E_ = new Map()), this._$E_.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$EC());
665
+ }
666
+ }, {
667
+ key: "_$EC",
668
+ value: function () {
669
+ var _$EC2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
670
+ var t;
671
+ return regeneratorRuntime.wrap(function _callee$(_context) {
672
+ while (1) {
673
+ switch (_context.prev = _context.next) {
674
+ case 0:
675
+ this.isUpdatePending = !0;
676
+ _context.prev = 1;
677
+ _context.next = 4;
678
+ return this._$Ep;
679
+
680
+ case 4:
681
+ _context.next = 9;
682
+ break;
683
+
684
+ case 6:
685
+ _context.prev = 6;
686
+ _context.t0 = _context["catch"](1);
687
+ Promise.reject(_context.t0);
688
+
689
+ case 9:
690
+ t = this.scheduleUpdate();
691
+ _context.t1 = null != t;
692
+
693
+ if (!_context.t1) {
694
+ _context.next = 14;
695
+ break;
696
+ }
697
+
698
+ _context.next = 14;
699
+ return t;
700
+
701
+ case 14:
702
+ return _context.abrupt("return", !this.isUpdatePending);
703
+
704
+ case 15:
705
+ case "end":
706
+ return _context.stop();
707
+ }
708
+ }
709
+ }, _callee, this, [[1, 6]]);
710
+ }));
711
+
712
+ function _$EC() {
713
+ return _$EC2.apply(this, arguments);
714
+ }
715
+
716
+ return _$EC;
717
+ }()
718
+ }, {
719
+ key: "scheduleUpdate",
720
+ value: function scheduleUpdate() {
721
+ return this.performUpdate();
722
+ }
723
+ }, {
724
+ key: "performUpdate",
725
+ value: function performUpdate() {
726
+ var _this4 = this;
727
+
728
+ var t;
729
+ if (!this.isUpdatePending) return;
730
+ this.hasUpdated, this._$Et && (this._$Et.forEach(function (t, i) {
731
+ return _this4[i] = t;
732
+ }), this._$Et = void 0);
733
+ var i = !1;
734
+ var s = this._$AL;
735
+
736
+ try {
737
+ i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
738
+ var i;
739
+ return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
740
+ }), this.update(s)) : this._$EU();
741
+ } catch (t) {
742
+ throw i = !1, this._$EU(), t;
743
+ }
744
+
745
+ i && this._$AE(s);
746
+ }
747
+ }, {
748
+ key: "willUpdate",
749
+ value: function willUpdate(t) {}
750
+ }, {
751
+ key: "_$AE",
752
+ value: function _$AE(t) {
753
+ var i;
754
+ null === (i = this._$Eg) || void 0 === i || i.forEach(function (t) {
755
+ var i;
756
+ return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
757
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
758
+ }
759
+ }, {
760
+ key: "_$EU",
761
+ value: function _$EU() {
762
+ this._$AL = new Map(), this.isUpdatePending = !1;
763
+ }
764
+ }, {
765
+ key: "updateComplete",
766
+ get: function get() {
767
+ return this.getUpdateComplete();
768
+ }
769
+ }, {
770
+ key: "getUpdateComplete",
771
+ value: function getUpdateComplete() {
772
+ return this._$Ep;
773
+ }
774
+ }, {
775
+ key: "shouldUpdate",
776
+ value: function shouldUpdate(t) {
777
+ return !0;
778
+ }
779
+ }, {
780
+ key: "update",
781
+ value: function update(t) {
782
+ var _this5 = this;
783
+
784
+ void 0 !== this._$E_ && (this._$E_.forEach(function (t, i) {
785
+ return _this5._$ES(i, _this5[i], t);
786
+ }), this._$E_ = void 0), this._$EU();
787
+ }
788
+ }, {
789
+ key: "updated",
790
+ value: function updated(t) {}
791
+ }, {
792
+ key: "firstUpdated",
793
+ value: function firstUpdated(t) {}
794
+ }], [{
795
+ key: "addInitializer",
796
+ value: function addInitializer(t) {
797
+ var i;
798
+ null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
799
+ }
800
+ }, {
801
+ key: "observedAttributes",
802
+ get: function get() {
803
+ var _this6 = this;
804
+
805
+ this.finalize();
806
+ var t = [];
807
+ return this.elementProperties.forEach(function (i, s) {
808
+ var e = _this6._$Eh(s, i);
809
+
810
+ void 0 !== e && (_this6._$Eu.set(e, s), t.push(e));
811
+ }), t;
812
+ }
813
+ }, {
814
+ key: "createProperty",
815
+ value: function createProperty(t) {
816
+ var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : l$3;
817
+
818
+ if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
819
+ var _s = "symbol" == _typeof(t) ? Symbol() : "__" + t,
820
+ _e = this.getPropertyDescriptor(t, _s, i);
821
+
822
+ void 0 !== _e && Object.defineProperty(this.prototype, t, _e);
823
+ }
824
+ }
825
+ }, {
826
+ key: "getPropertyDescriptor",
827
+ value: function getPropertyDescriptor(t, i, s) {
828
+ return {
829
+ get: function get() {
830
+ return this[i];
831
+ },
832
+ set: function set(e) {
833
+ var r = this[t];
834
+ this[i] = e, this.requestUpdate(t, r, s);
835
+ },
836
+ configurable: !0,
837
+ enumerable: !0
838
+ };
839
+ }
840
+ }, {
841
+ key: "getPropertyOptions",
842
+ value: function getPropertyOptions(t) {
843
+ return this.elementProperties.get(t) || l$3;
844
+ }
845
+ }, {
846
+ key: "finalize",
847
+ value: function finalize() {
848
+ if (this.hasOwnProperty("finalized")) return !1;
849
+ this.finalized = !0;
850
+ var t = Object.getPrototypeOf(this);
851
+
852
+ if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
853
+ var _t2 = this.properties,
854
+ _i = [].concat(_toConsumableArray(Object.getOwnPropertyNames(_t2)), _toConsumableArray(Object.getOwnPropertySymbols(_t2)));
855
+
856
+ var _iterator = _createForOfIteratorHelper(_i),
857
+ _step;
858
+
859
+ try {
860
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
861
+ var _s2 = _step.value;
862
+ this.createProperty(_s2, _t2[_s2]);
863
+ }
864
+ } catch (err) {
865
+ _iterator.e(err);
866
+ } finally {
867
+ _iterator.f();
868
+ }
869
+ }
870
+
871
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
872
+ }
873
+ }, {
874
+ key: "finalizeStyles",
875
+ value: function finalizeStyles(i) {
876
+ var s = [];
877
+
878
+ if (Array.isArray(i)) {
879
+ var _e2 = new Set(i.flat(1 / 0).reverse());
880
+
881
+ var _iterator2 = _createForOfIteratorHelper(_e2),
882
+ _step2;
883
+
884
+ try {
885
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
886
+ var _i2 = _step2.value;
887
+ s.unshift(S$1(_i2));
888
+ }
889
+ } catch (err) {
890
+ _iterator2.e(err);
891
+ } finally {
892
+ _iterator2.f();
893
+ }
894
+ } else void 0 !== i && s.push(S$1(i));
895
+
896
+ return s;
897
+ }
898
+ }, {
899
+ key: "_$Eh",
900
+ value: function _$Eh(t, i) {
901
+ var s = i.attribute;
902
+ return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
903
+ }
904
+ }]);
905
+
906
+ return a;
907
+ }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
908
+
909
+ a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
910
+ mode: "open"
911
+ }, null == h$1 || h$1({
912
+ ReactiveElement: a$1
913
+ }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.1.2");
914
+
915
+ /**
916
+ * @license
917
+ * Copyright 2017 Google LLC
918
+ * SPDX-License-Identifier: BSD-3-Clause
919
+ */
920
+ var t;
921
+
922
+ var i = globalThis.trustedTypes,
923
+ s$1 = i ? i.createPolicy("lit-html", {
924
+ createHTML: function createHTML(t) {
925
+ return t;
926
+ }
927
+ }) : void 0,
928
+ e = "lit$".concat((Math.random() + "").slice(9), "$"),
929
+ o$1 = "?" + e,
930
+ n$1 = "<".concat(o$1, ">"),
931
+ l$2 = document,
932
+ h = function h() {
933
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
934
+ return l$2.createComment(t);
935
+ },
936
+ r = function r(t) {
937
+ return null === t || "object" != _typeof(t) && "function" != typeof t;
938
+ },
939
+ d = Array.isArray,
940
+ u = function u(t) {
941
+ var i;
942
+ return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
943
+ },
944
+ c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
945
+ v = /-->/g,
946
+ a = />/g,
947
+ f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,
948
+ _ = /'/g,
949
+ m = /"/g,
950
+ g = /^(?:script|style|textarea)$/i,
951
+ p = function p(t) {
952
+ return function (i) {
953
+ for (var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
954
+ s[_key - 1] = arguments[_key];
955
+ }
956
+
957
+ return {
958
+ _$litType$: t,
959
+ strings: i,
960
+ values: s
961
+ };
962
+ };
963
+ },
964
+ $ = p(1),
965
+ y = p(2),
966
+ b = Symbol.for("lit-noChange"),
967
+ w = Symbol.for("lit-nothing"),
968
+ T = new WeakMap(),
969
+ x = function x(t, i, s) {
970
+ var e, o;
971
+ var n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
972
+ var l = n._$litPart$;
973
+
974
+ if (void 0 === l) {
975
+ var _t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
976
+
977
+ n._$litPart$ = l = new N(i.insertBefore(h(), _t), _t, void 0, null != s ? s : {});
978
+ }
979
+
980
+ return l._$AI(t), l;
981
+ },
982
+ A = l$2.createTreeWalker(l$2, 129, null, !1),
983
+ C = function C(t, i) {
984
+ var o = t.length - 1,
985
+ l = [];
986
+ var h,
987
+ r = 2 === i ? "<svg>" : "",
988
+ d = c;
989
+
990
+ for (var _i = 0; _i < o; _i++) {
991
+ var _s = t[_i];
992
+
993
+ var _o = void 0,
994
+ _u = void 0,
995
+ _p = -1,
996
+ _$ = 0;
997
+
998
+ for (; _$ < _s.length && (d.lastIndex = _$, _u = d.exec(_s), null !== _u);) {
999
+ _$ = 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);
1000
+ }
1001
+
1002
+ var _y = d === f && t[_i + 1].startsWith("/>") ? " " : "";
1003
+
1004
+ 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);
1005
+ }
1006
+
1007
+ var u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
1008
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1009
+ return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
1010
+ };
1011
+
1012
+ var E = /*#__PURE__*/function () {
1013
+ function E(_ref, n) {
1014
+ var t = _ref.strings,
1015
+ s = _ref._$litType$;
1016
+
1017
+ _classCallCheck(this, E);
1018
+
1019
+ var l;
1020
+ this.parts = [];
1021
+ var r = 0,
1022
+ d = 0;
1023
+
1024
+ var u = t.length - 1,
1025
+ c = this.parts,
1026
+ _C = C(t, s),
1027
+ _C2 = _slicedToArray(_C, 2),
1028
+ v = _C2[0],
1029
+ a = _C2[1];
1030
+
1031
+ if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
1032
+ var _t2 = this.el.content,
1033
+ _i2 = _t2.firstChild;
1034
+ _i2.remove(), _t2.append.apply(_t2, _toConsumableArray(_i2.childNodes));
1035
+ }
1036
+
1037
+ for (; null !== (l = A.nextNode()) && c.length < u;) {
1038
+ if (1 === l.nodeType) {
1039
+ if (l.hasAttributes()) {
1040
+ var _t3 = [];
1041
+
1042
+ var _iterator = _createForOfIteratorHelper(l.getAttributeNames()),
1043
+ _step;
1044
+
1045
+ try {
1046
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1047
+ var _i5 = _step.value;
1048
+
1049
+ if (_i5.endsWith("$lit$") || _i5.startsWith(e)) {
1050
+ var _s2 = a[d++];
1051
+
1052
+ if (_t3.push(_i5), void 0 !== _s2) {
1053
+ var _t5 = l.getAttribute(_s2.toLowerCase() + "$lit$").split(e),
1054
+ _i6 = /([.?@])?(.*)/.exec(_s2);
1055
+
1056
+ c.push({
1057
+ type: 1,
1058
+ index: r,
1059
+ name: _i6[2],
1060
+ strings: _t5,
1061
+ ctor: "." === _i6[1] ? M : "?" === _i6[1] ? H : "@" === _i6[1] ? I : S
1062
+ });
1063
+ } else c.push({
1064
+ type: 6,
1065
+ index: r
1066
+ });
1067
+ }
1068
+ }
1069
+ } catch (err) {
1070
+ _iterator.e(err);
1071
+ } finally {
1072
+ _iterator.f();
1073
+ }
1074
+
1075
+ for (var _i3 = 0, _t4 = _t3; _i3 < _t4.length; _i3++) {
1076
+ var _i4 = _t4[_i3];
1077
+ l.removeAttribute(_i4);
1078
+ }
1079
+ }
1080
+
1081
+ if (g.test(l.tagName)) {
1082
+ var _t6 = l.textContent.split(e),
1083
+ _s3 = _t6.length - 1;
1084
+
1085
+ if (_s3 > 0) {
1086
+ l.textContent = i ? i.emptyScript : "";
1087
+
1088
+ for (var _i7 = 0; _i7 < _s3; _i7++) {
1089
+ l.append(_t6[_i7], h()), A.nextNode(), c.push({
1090
+ type: 2,
1091
+ index: ++r
1092
+ });
1093
+ }
1094
+
1095
+ l.append(_t6[_s3], h());
1096
+ }
1097
+ }
1098
+ } else if (8 === l.nodeType) if (l.data === o$1) c.push({
1099
+ type: 2,
1100
+ index: r
1101
+ });else {
1102
+ var _t7 = -1;
1103
+
1104
+ for (; -1 !== (_t7 = l.data.indexOf(e, _t7 + 1));) {
1105
+ c.push({
1106
+ type: 7,
1107
+ index: r
1108
+ }), _t7 += e.length - 1;
1109
+ }
1110
+ }
1111
+
1112
+ r++;
1113
+ }
1114
+ }
1115
+
1116
+ _createClass(E, null, [{
1117
+ key: "createElement",
1118
+ value: function createElement(t, i) {
1119
+ var s = l$2.createElement("template");
1120
+ return s.innerHTML = t, s;
1121
+ }
1122
+ }]);
1123
+
1124
+ return E;
1125
+ }();
1126
+
1127
+ function P(t, i) {
1128
+ var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : t;
1129
+ var e = arguments.length > 3 ? arguments[3] : undefined;
1130
+ var o, n, l, h;
1131
+ if (i === b) return i;
1132
+ var d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;
1133
+ var u = r(i) ? void 0 : i._$litDirective$;
1134
+ 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;
1135
+ }
1136
+
1137
+ var V = /*#__PURE__*/function () {
1138
+ function V(t, i) {
1139
+ _classCallCheck(this, V);
1140
+
1141
+ this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1142
+ }
1143
+
1144
+ _createClass(V, [{
1145
+ key: "parentNode",
1146
+ get: function get() {
1147
+ return this._$AM.parentNode;
1148
+ }
1149
+ }, {
1150
+ key: "_$AU",
1151
+ get: function get() {
1152
+ return this._$AM._$AU;
1153
+ }
1154
+ }, {
1155
+ key: "p",
1156
+ value: function p(t) {
1157
+ var i;
1158
+ var _this$_$AD = this._$AD,
1159
+ s = _this$_$AD.el.content,
1160
+ e = _this$_$AD.parts,
1161
+ o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
1162
+ A.currentNode = o;
1163
+ var n = A.nextNode(),
1164
+ h = 0,
1165
+ r = 0,
1166
+ d = e[0];
1167
+
1168
+ for (; void 0 !== d;) {
1169
+ if (h === d.index) {
1170
+ var _i8 = void 0;
1171
+
1172
+ 2 === d.type ? _i8 = new N(n, n.nextSibling, this, t) : 1 === d.type ? _i8 = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (_i8 = new L(n, this, t)), this.v.push(_i8), d = e[++r];
1173
+ }
1174
+
1175
+ h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
1176
+ }
1177
+
1178
+ return o;
1179
+ }
1180
+ }, {
1181
+ key: "m",
1182
+ value: function m(t) {
1183
+ var i = 0;
1184
+
1185
+ var _iterator2 = _createForOfIteratorHelper(this.v),
1186
+ _step2;
1187
+
1188
+ try {
1189
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1190
+ var _s4 = _step2.value;
1191
+ void 0 !== _s4 && (void 0 !== _s4.strings ? (_s4._$AI(t, _s4, i), i += _s4.strings.length - 2) : _s4._$AI(t[i])), i++;
1192
+ }
1193
+ } catch (err) {
1194
+ _iterator2.e(err);
1195
+ } finally {
1196
+ _iterator2.f();
1197
+ }
1198
+ }
1199
+ }]);
1200
+
1201
+ return V;
1202
+ }();
1203
+
1204
+ var N = /*#__PURE__*/function () {
1205
+ function N(t, i, s, e) {
1206
+ _classCallCheck(this, N);
1207
+
1208
+ var o;
1209
+ 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;
1210
+ }
1211
+
1212
+ _createClass(N, [{
1213
+ key: "_$AU",
1214
+ get: function get() {
1215
+ var t, i;
1216
+ return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
1217
+ }
1218
+ }, {
1219
+ key: "parentNode",
1220
+ get: function get() {
1221
+ var t = this._$AA.parentNode;
1222
+ var i = this._$AM;
1223
+ return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
1224
+ }
1225
+ }, {
1226
+ key: "startNode",
1227
+ get: function get() {
1228
+ return this._$AA;
1229
+ }
1230
+ }, {
1231
+ key: "endNode",
1232
+ get: function get() {
1233
+ return this._$AB;
1234
+ }
1235
+ }, {
1236
+ key: "_$AI",
1237
+ value: function _$AI(t) {
1238
+ var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1239
+ 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.S(t) : u(t) ? this.A(t) : this.$(t);
1240
+ }
1241
+ }, {
1242
+ key: "M",
1243
+ value: function M(t) {
1244
+ var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._$AB;
1245
+ return this._$AA.parentNode.insertBefore(t, i);
1246
+ }
1247
+ }, {
1248
+ key: "S",
1249
+ value: function S(t) {
1250
+ this._$AH !== t && (this._$AR(), this._$AH = this.M(t));
1251
+ }
1252
+ }, {
1253
+ key: "$",
1254
+ value: function $(t) {
1255
+ this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.S(l$2.createTextNode(t)), this._$AH = t;
1256
+ }
1257
+ }, {
1258
+ key: "T",
1259
+ value: function T(t) {
1260
+ var i;
1261
+ var s = t.values,
1262
+ e = t._$litType$,
1263
+ o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
1264
+ if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
1265
+ var _t8 = new V(o, this),
1266
+ _i9 = _t8.p(this.options);
1267
+
1268
+ _t8.m(s), this.S(_i9), this._$AH = _t8;
1269
+ }
1270
+ }
1271
+ }, {
1272
+ key: "_$AC",
1273
+ value: function _$AC(t) {
1274
+ var i = T.get(t.strings);
1275
+ return void 0 === i && T.set(t.strings, i = new E(t)), i;
1276
+ }
1277
+ }, {
1278
+ key: "A",
1279
+ value: function A(t) {
1280
+ d(this._$AH) || (this._$AH = [], this._$AR());
1281
+ var i = this._$AH;
1282
+ var s,
1283
+ e = 0;
1284
+
1285
+ var _iterator3 = _createForOfIteratorHelper(t),
1286
+ _step3;
1287
+
1288
+ try {
1289
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1290
+ var _o2 = _step3.value;
1291
+ e === i.length ? i.push(s = new N(this.M(h()), this.M(h()), this, this.options)) : s = i[e], s._$AI(_o2), e++;
1292
+ }
1293
+ } catch (err) {
1294
+ _iterator3.e(err);
1295
+ } finally {
1296
+ _iterator3.f();
1297
+ }
1298
+
1299
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1300
+ }
1301
+ }, {
1302
+ key: "_$AR",
1303
+ value: function _$AR() {
1304
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._$AA.nextSibling;
1305
+ var i = arguments.length > 1 ? arguments[1] : undefined;
1306
+ var s;
1307
+
1308
+ for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
1309
+ var _i10 = t.nextSibling;
1310
+ t.remove(), t = _i10;
1311
+ }
1312
+ }
1313
+ }, {
1314
+ key: "setConnected",
1315
+ value: function setConnected(t) {
1316
+ var i;
1317
+ void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
1318
+ }
1319
+ }]);
1320
+
1321
+ return N;
1322
+ }();
1323
+
1324
+ var S = /*#__PURE__*/function () {
1325
+ function S(t, i, s, e, o) {
1326
+ _classCallCheck(this, S);
1327
+
1328
+ 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;
1329
+ }
1330
+
1331
+ _createClass(S, [{
1332
+ key: "tagName",
1333
+ get: function get() {
1334
+ return this.element.tagName;
1335
+ }
1336
+ }, {
1337
+ key: "_$AU",
1338
+ get: function get() {
1339
+ return this._$AM._$AU;
1340
+ }
1341
+ }, {
1342
+ key: "_$AI",
1343
+ value: function _$AI(t) {
1344
+ var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1345
+ var s = arguments.length > 2 ? arguments[2] : undefined;
1346
+ var e = arguments.length > 3 ? arguments[3] : undefined;
1347
+ var o = this.strings;
1348
+ var n = !1;
1349
+ if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
1350
+ var _e = t;
1351
+
1352
+ var _l, _h;
1353
+
1354
+ for (t = o[0], _l = 0; _l < o.length - 1; _l++) {
1355
+ _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;
1356
+ }
1357
+ }
1358
+ n && !e && this.k(t);
1359
+ }
1360
+ }, {
1361
+ key: "k",
1362
+ value: function k(t) {
1363
+ t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
1364
+ }
1365
+ }]);
1366
+
1367
+ return S;
1368
+ }();
1369
+
1370
+ var M = /*#__PURE__*/function (_S) {
1371
+ _inherits(M, _S);
1372
+
1373
+ var _super = _createSuper(M);
1374
+
1375
+ function M() {
1376
+ var _this;
1377
+
1378
+ _classCallCheck(this, M);
1379
+
1380
+ _this = _super.apply(this, arguments), _this.type = 3;
1381
+ return _this;
1382
+ }
1383
+
1384
+ _createClass(M, [{
1385
+ key: "k",
1386
+ value: function k(t) {
1387
+ this.element[this.name] = t === w ? void 0 : t;
1388
+ }
1389
+ }]);
1390
+
1391
+ return M;
1392
+ }(S);
1393
+
1394
+ var _k = i ? i.emptyScript : "";
1395
+
1396
+ var H = /*#__PURE__*/function (_S2) {
1397
+ _inherits(H, _S2);
1398
+
1399
+ var _super2 = _createSuper(H);
1400
+
1401
+ function H() {
1402
+ var _this2;
1403
+
1404
+ _classCallCheck(this, H);
1405
+
1406
+ _this2 = _super2.apply(this, arguments), _this2.type = 4;
1407
+ return _this2;
1408
+ }
1409
+
1410
+ _createClass(H, [{
1411
+ key: "k",
1412
+ value: function k(t) {
1413
+ t && t !== w ? this.element.setAttribute(this.name, _k) : this.element.removeAttribute(this.name);
1414
+ }
1415
+ }]);
1416
+
1417
+ return H;
1418
+ }(S);
1419
+
1420
+ var I = /*#__PURE__*/function (_S3) {
1421
+ _inherits(I, _S3);
1422
+
1423
+ var _super3 = _createSuper(I);
1424
+
1425
+ function I(t, i, s, e, o) {
1426
+ var _this3;
1427
+
1428
+ _classCallCheck(this, I);
1429
+
1430
+ _this3 = _super3.call(this, t, i, s, e, o), _this3.type = 5;
1431
+ return _this3;
1432
+ }
1433
+
1434
+ _createClass(I, [{
1435
+ key: "_$AI",
1436
+ value: function _$AI(t) {
1437
+ var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1438
+ var s;
1439
+ if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
1440
+ var e = this._$AH,
1441
+ o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
1442
+ n = t !== w && (e === w || o);
1443
+ o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
1444
+ }
1445
+ }, {
1446
+ key: "handleEvent",
1447
+ value: function handleEvent(t) {
1448
+ var i, s;
1449
+ "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);
1450
+ }
1451
+ }]);
1452
+
1453
+ return I;
1454
+ }(S);
1455
+
1456
+ var L = /*#__PURE__*/function () {
1457
+ function L(t, i, s) {
1458
+ _classCallCheck(this, L);
1459
+
1460
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1461
+ }
1462
+
1463
+ _createClass(L, [{
1464
+ key: "_$AU",
1465
+ get: function get() {
1466
+ return this._$AM._$AU;
1467
+ }
1468
+ }, {
1469
+ key: "_$AI",
1470
+ value: function _$AI(t) {
1471
+ P(this, t);
1472
+ }
1473
+ }]);
1474
+
1475
+ return L;
1476
+ }();
1477
+
1478
+ var z = window.litHtmlPolyfillSupport;
1479
+ null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.1.1");
1480
+
1481
+ /**
1482
+ * @license
1483
+ * Copyright 2017 Google LLC
1484
+ * SPDX-License-Identifier: BSD-3-Clause
1485
+ */
1486
+
1487
+ var l$1, o;
1488
+
1489
+ var s = /*#__PURE__*/function (_t) {
1490
+ _inherits(s, _t);
1491
+
1492
+ var _super = _createSuper(s);
1493
+
1494
+ function s() {
1495
+ var _this;
1496
+
1497
+ _classCallCheck(this, s);
1498
+
1499
+ _this = _super.apply(this, arguments), _this.renderOptions = {
1500
+ host: _assertThisInitialized(_this)
1501
+ }, _this._$Dt = void 0;
1502
+ return _this;
1503
+ }
1504
+
1505
+ _createClass(s, [{
1506
+ key: "createRenderRoot",
1507
+ value: function createRenderRoot() {
1508
+ var t, e;
1509
+
1510
+ var i = _get(_getPrototypeOf(s.prototype), "createRenderRoot", this).call(this);
1511
+
1512
+ return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
1513
+ }
1514
+ }, {
1515
+ key: "update",
1516
+ value: function update(t) {
1517
+ var i = this.render();
1518
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_getPrototypeOf(s.prototype), "update", this).call(this, t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
1519
+ }
1520
+ }, {
1521
+ key: "connectedCallback",
1522
+ value: function connectedCallback() {
1523
+ var t;
1524
+ _get(_getPrototypeOf(s.prototype), "connectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
1525
+ }
1526
+ }, {
1527
+ key: "disconnectedCallback",
1528
+ value: function disconnectedCallback() {
1529
+ var t;
1530
+ _get(_getPrototypeOf(s.prototype), "disconnectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
1531
+ }
1532
+ }, {
1533
+ key: "render",
1534
+ value: function render() {
1535
+ return b;
1536
+ }
1537
+ }]);
1538
+
1539
+ return s;
1540
+ }(a$1);
1541
+
1542
+ s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
1543
+ LitElement: s
1544
+ });
1545
+ var n = globalThis.litElementPolyfillSupport;
1546
+ null == n || n({
1547
+ LitElement: s
1548
+ });
1549
+ (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.1.1");
1550
+
1551
+ var noop = {
1552
+ value: function value() {}
1553
+ };
1554
+
1555
+ function dispatch() {
1556
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
1557
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
1558
+ _[t] = [];
1559
+ }
1560
+
1561
+ return new Dispatch(_);
1562
+ }
1563
+
1564
+ function Dispatch(_) {
1565
+ this._ = _;
1566
+ }
1567
+
1568
+ function parseTypenames$1(typenames, types) {
1569
+ return typenames.trim().split(/^|\s+/).map(function (t) {
1570
+ var name = "",
1571
+ i = t.indexOf(".");
1572
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
1573
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
1574
+ return {
1575
+ type: t,
1576
+ name: name
1577
+ };
1578
+ });
1579
+ }
1580
+
1581
+ Dispatch.prototype = dispatch.prototype = {
1582
+ constructor: Dispatch,
1583
+ on: function on(typename, callback) {
1584
+ var _ = this._,
1585
+ T = parseTypenames$1(typename + "", _),
1586
+ t,
1587
+ i = -1,
1588
+ n = T.length; // If no callback was specified, return the callback of the given type and name.
1589
+
1590
+ if (arguments.length < 2) {
1591
+ while (++i < n) {
1592
+ if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
1593
+ }
1594
+
1595
+ return;
1596
+ } // If a type was specified, set the callback for the given type and name.
1597
+ // Otherwise, if a null callback was specified, remove callbacks of the given name.
1598
+
1599
+
1600
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
1601
+
1602
+ while (++i < n) {
1603
+ if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) {
1604
+ _[t] = set$1(_[t], typename.name, null);
1605
+ }
1606
+ }
1607
+
1608
+ return this;
1609
+ },
1610
+ copy: function copy() {
1611
+ var copy = {},
1612
+ _ = this._;
1613
+
1614
+ for (var t in _) {
1615
+ copy[t] = _[t].slice();
1616
+ }
1617
+
1618
+ return new Dispatch(copy);
1619
+ },
1620
+ call: function call(type, that) {
1621
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) {
1622
+ args[i] = arguments[i + 2];
1623
+ }
1624
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
1625
+
1626
+ for (t = this._[type], i = 0, n = t.length; i < n; ++i) {
1627
+ t[i].value.apply(that, args);
1628
+ }
1629
+ },
1630
+ apply: function apply(type, that, args) {
1631
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
1632
+
1633
+ for (var t = this._[type], i = 0, n = t.length; i < n; ++i) {
1634
+ t[i].value.apply(that, args);
1635
+ }
1636
+ }
1637
+ };
1638
+
1639
+ function get$1(type, name) {
1640
+ for (var i = 0, n = type.length, c; i < n; ++i) {
1641
+ if ((c = type[i]).name === name) {
1642
+ return c.value;
1643
+ }
1644
+ }
1645
+ }
1646
+
1647
+ function set$1(type, name, callback) {
1648
+ for (var i = 0, n = type.length; i < n; ++i) {
1649
+ if (type[i].name === name) {
1650
+ type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
1651
+ break;
1652
+ }
1653
+ }
1654
+
1655
+ if (callback != null) type.push({
1656
+ name: name,
1657
+ value: callback
1658
+ });
1659
+ return type;
1660
+ }
1661
+
1662
+ var xhtml = "http://www.w3.org/1999/xhtml";
1663
+ var namespaces = {
1664
+ svg: "http://www.w3.org/2000/svg",
1665
+ xhtml: xhtml,
1666
+ xlink: "http://www.w3.org/1999/xlink",
1667
+ xml: "http://www.w3.org/XML/1998/namespace",
1668
+ xmlns: "http://www.w3.org/2000/xmlns/"
1669
+ };
1670
+
1671
+ function namespace (name) {
1672
+ var prefix = name += "",
1673
+ i = prefix.indexOf(":");
1674
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
1675
+ return namespaces.hasOwnProperty(prefix) ? {
1676
+ space: namespaces[prefix],
1677
+ local: name
1678
+ } : name; // eslint-disable-line no-prototype-builtins
1679
+ }
1680
+
1681
+ function creatorInherit(name) {
1682
+ return function () {
1683
+ var document = this.ownerDocument,
1684
+ uri = this.namespaceURI;
1685
+ return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);
1686
+ };
1687
+ }
1688
+
1689
+ function creatorFixed(fullname) {
1690
+ return function () {
1691
+ return this.ownerDocument.createElementNS(fullname.space, fullname.local);
1692
+ };
1693
+ }
1694
+
1695
+ function creator (name) {
1696
+ var fullname = namespace(name);
1697
+ return (fullname.local ? creatorFixed : creatorInherit)(fullname);
1698
+ }
1699
+
1700
+ function none() {}
1701
+
1702
+ function selector (selector) {
1703
+ return selector == null ? none : function () {
1704
+ return this.querySelector(selector);
1705
+ };
1706
+ }
1707
+
1708
+ function selection_select (select) {
1709
+ if (typeof select !== "function") select = selector(select);
1710
+
1711
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1712
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
1713
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
1714
+ if ("__data__" in node) subnode.__data__ = node.__data__;
1715
+ subgroup[i] = subnode;
1716
+ }
1717
+ }
1718
+ }
1719
+
1720
+ return new Selection$1(subgroups, this._parents);
1721
+ }
1722
+
1723
+ // Given something array like (or null), returns something that is strictly an
1724
+ // array. This is used to ensure that array-like objects passed to d3.selectAll
1725
+ // or selection.selectAll are converted into proper arrays when creating a
1726
+ // selection; we don’t ever want to create a selection backed by a live
1727
+ // HTMLCollection or NodeList. However, note that selection.selectAll will use a
1728
+ // static NodeList as a group, since it safely derived from querySelectorAll.
1729
+ function array(x) {
1730
+ return x == null ? [] : Array.isArray(x) ? x : Array.from(x);
1731
+ }
1732
+
1733
+ function empty() {
1734
+ return [];
1735
+ }
1736
+
1737
+ function selectorAll (selector) {
1738
+ return selector == null ? empty : function () {
1739
+ return this.querySelectorAll(selector);
1740
+ };
1741
+ }
1742
+
1743
+ function arrayAll(select) {
1744
+ return function () {
1745
+ return array(select.apply(this, arguments));
1746
+ };
1747
+ }
1748
+
1749
+ function selection_selectAll (select) {
1750
+ if (typeof select === "function") select = arrayAll(select);else select = selectorAll(select);
1751
+
1752
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
1753
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
1754
+ if (node = group[i]) {
1755
+ subgroups.push(select.call(node, node.__data__, i, group));
1756
+ parents.push(node);
1757
+ }
1758
+ }
1759
+ }
1760
+
1761
+ return new Selection$1(subgroups, parents);
1762
+ }
1763
+
1764
+ function matcher (selector) {
1765
+ return function () {
1766
+ return this.matches(selector);
1767
+ };
1768
+ }
1769
+ function childMatcher(selector) {
1770
+ return function (node) {
1771
+ return node.matches(selector);
1772
+ };
1773
+ }
1774
+
1775
+ var find = Array.prototype.find;
1776
+
1777
+ function childFind(match) {
1778
+ return function () {
1779
+ return find.call(this.children, match);
1780
+ };
1781
+ }
1782
+
1783
+ function childFirst() {
1784
+ return this.firstElementChild;
1785
+ }
1786
+
1787
+ function selection_selectChild (match) {
1788
+ return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
1789
+ }
1790
+
1791
+ var filter = Array.prototype.filter;
1792
+
1793
+ function children() {
1794
+ return Array.from(this.children);
1795
+ }
1796
+
1797
+ function childrenFilter(match) {
1798
+ return function () {
1799
+ return filter.call(this.children, match);
1800
+ };
1801
+ }
1802
+
1803
+ function selection_selectChildren (match) {
1804
+ return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
1805
+ }
1806
+
1807
+ function selection_filter (match) {
1808
+ if (typeof match !== "function") match = matcher(match);
1809
+
1810
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1811
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
1812
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
1813
+ subgroup.push(node);
1814
+ }
1815
+ }
1816
+ }
1817
+
1818
+ return new Selection$1(subgroups, this._parents);
1819
+ }
1820
+
1821
+ function sparse (update) {
1822
+ return new Array(update.length);
1823
+ }
1824
+
1825
+ function selection_enter () {
1826
+ return new Selection$1(this._enter || this._groups.map(sparse), this._parents);
1827
+ }
1828
+ function EnterNode(parent, datum) {
1829
+ this.ownerDocument = parent.ownerDocument;
1830
+ this.namespaceURI = parent.namespaceURI;
1831
+ this._next = null;
1832
+ this._parent = parent;
1833
+ this.__data__ = datum;
1834
+ }
1835
+ EnterNode.prototype = {
1836
+ constructor: EnterNode,
1837
+ appendChild: function appendChild(child) {
1838
+ return this._parent.insertBefore(child, this._next);
1839
+ },
1840
+ insertBefore: function insertBefore(child, next) {
1841
+ return this._parent.insertBefore(child, next);
1842
+ },
1843
+ querySelector: function querySelector(selector) {
1844
+ return this._parent.querySelector(selector);
1845
+ },
1846
+ querySelectorAll: function querySelectorAll(selector) {
1847
+ return this._parent.querySelectorAll(selector);
1848
+ }
1849
+ };
1850
+
1851
+ function constant$1 (x) {
1852
+ return function () {
1853
+ return x;
1854
+ };
1855
+ }
1856
+
1857
+ function bindIndex(parent, group, enter, update, exit, data) {
1858
+ var i = 0,
1859
+ node,
1860
+ groupLength = group.length,
1861
+ dataLength = data.length; // Put any non-null nodes that fit into update.
1862
+ // Put any null nodes into enter.
1863
+ // Put any remaining data into enter.
1864
+
1865
+ for (; i < dataLength; ++i) {
1866
+ if (node = group[i]) {
1867
+ node.__data__ = data[i];
1868
+ update[i] = node;
1869
+ } else {
1870
+ enter[i] = new EnterNode(parent, data[i]);
1871
+ }
1872
+ } // Put any non-null nodes that don’t fit into exit.
1873
+
1874
+
1875
+ for (; i < groupLength; ++i) {
1876
+ if (node = group[i]) {
1877
+ exit[i] = node;
1878
+ }
1879
+ }
1880
+ }
1881
+
1882
+ function bindKey(parent, group, enter, update, exit, data, key) {
1883
+ var i,
1884
+ node,
1885
+ nodeByKeyValue = new Map(),
1886
+ groupLength = group.length,
1887
+ dataLength = data.length,
1888
+ keyValues = new Array(groupLength),
1889
+ keyValue; // Compute the key for each node.
1890
+ // If multiple nodes have the same key, the duplicates are added to exit.
1891
+
1892
+ for (i = 0; i < groupLength; ++i) {
1893
+ if (node = group[i]) {
1894
+ keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
1895
+
1896
+ if (nodeByKeyValue.has(keyValue)) {
1897
+ exit[i] = node;
1898
+ } else {
1899
+ nodeByKeyValue.set(keyValue, node);
1900
+ }
1901
+ }
1902
+ } // Compute the key for each datum.
1903
+ // If there a node associated with this key, join and add it to update.
1904
+ // If there is not (or the key is a duplicate), add it to enter.
1905
+
1906
+
1907
+ for (i = 0; i < dataLength; ++i) {
1908
+ keyValue = key.call(parent, data[i], i, data) + "";
1909
+
1910
+ if (node = nodeByKeyValue.get(keyValue)) {
1911
+ update[i] = node;
1912
+ node.__data__ = data[i];
1913
+ nodeByKeyValue.delete(keyValue);
1914
+ } else {
1915
+ enter[i] = new EnterNode(parent, data[i]);
1916
+ }
1917
+ } // Add any remaining nodes that were not bound to data to exit.
1918
+
1919
+
1920
+ for (i = 0; i < groupLength; ++i) {
1921
+ if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
1922
+ exit[i] = node;
1923
+ }
1924
+ }
1925
+ }
1926
+
1927
+ function datum(node) {
1928
+ return node.__data__;
1929
+ }
1930
+
1931
+ function selection_data (value, key) {
1932
+ if (!arguments.length) return Array.from(this, datum);
1933
+ var bind = key ? bindKey : bindIndex,
1934
+ parents = this._parents,
1935
+ groups = this._groups;
1936
+ if (typeof value !== "function") value = constant$1(value);
1937
+
1938
+ for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
1939
+ var parent = parents[j],
1940
+ group = groups[j],
1941
+ groupLength = group.length,
1942
+ data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
1943
+ dataLength = data.length,
1944
+ enterGroup = enter[j] = new Array(dataLength),
1945
+ updateGroup = update[j] = new Array(dataLength),
1946
+ exitGroup = exit[j] = new Array(groupLength);
1947
+ bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); // Now connect the enter nodes to their following update node, such that
1948
+ // appendChild can insert the materialized enter node before this node,
1949
+ // rather than at the end of the parent node.
1950
+
1951
+ for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
1952
+ if (previous = enterGroup[i0]) {
1953
+ if (i0 >= i1) i1 = i0 + 1;
1954
+
1955
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength) {
1956
+ }
1957
+
1958
+ previous._next = next || null;
1959
+ }
1960
+ }
1961
+ }
1962
+
1963
+ update = new Selection$1(update, parents);
1964
+ update._enter = enter;
1965
+ update._exit = exit;
1966
+ return update;
1967
+ } // Given some data, this returns an array-like view of it: an object that
1968
+ // exposes a length property and allows numeric indexing. Note that unlike
1969
+ // selectAll, this isn’t worried about “live” collections because the resulting
1970
+ // array will only be used briefly while data is being bound. (It is possible to
1971
+ // cause the data to change while iterating by using a key function, but please
1972
+ // don’t; we’d rather avoid a gratuitous copy.)
1973
+
1974
+ function arraylike(data) {
1975
+ return _typeof(data) === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
1976
+ : Array.from(data); // Map, Set, iterable, string, or anything else
1977
+ }
1978
+
1979
+ function selection_exit () {
1980
+ return new Selection$1(this._exit || this._groups.map(sparse), this._parents);
1981
+ }
1982
+
1983
+ function selection_join (onenter, onupdate, onexit) {
1984
+ var enter = this.enter(),
1985
+ update = this,
1986
+ exit = this.exit();
1987
+
1988
+ if (typeof onenter === "function") {
1989
+ enter = onenter(enter);
1990
+ if (enter) enter = enter.selection();
1991
+ } else {
1992
+ enter = enter.append(onenter + "");
1993
+ }
1994
+
1995
+ if (onupdate != null) {
1996
+ update = onupdate(update);
1997
+ if (update) update = update.selection();
1998
+ }
1999
+
2000
+ if (onexit == null) exit.remove();else onexit(exit);
2001
+ return enter && update ? enter.merge(update).order() : update;
2002
+ }
2003
+
2004
+ function selection_merge (context) {
2005
+ var selection = context.selection ? context.selection() : context;
2006
+
2007
+ 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) {
2008
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
2009
+ if (node = group0[i] || group1[i]) {
2010
+ merge[i] = node;
2011
+ }
2012
+ }
2013
+ }
2014
+
2015
+ for (; j < m0; ++j) {
2016
+ merges[j] = groups0[j];
2017
+ }
2018
+
2019
+ return new Selection$1(merges, this._parents);
2020
+ }
2021
+
2022
+ function selection_order () {
2023
+ for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
2024
+ for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
2025
+ if (node = group[i]) {
2026
+ if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
2027
+ next = node;
2028
+ }
2029
+ }
2030
+ }
2031
+
2032
+ return this;
2033
+ }
2034
+
2035
+ function selection_sort (compare) {
2036
+ if (!compare) compare = ascending;
2037
+
2038
+ function compareNode(a, b) {
2039
+ return a && b ? compare(a.__data__, b.__data__) : !a - !b;
2040
+ }
2041
+
2042
+ for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
2043
+ for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
2044
+ if (node = group[i]) {
2045
+ sortgroup[i] = node;
2046
+ }
2047
+ }
2048
+
2049
+ sortgroup.sort(compareNode);
2050
+ }
2051
+
2052
+ return new Selection$1(sortgroups, this._parents).order();
2053
+ }
2054
+
2055
+ function ascending(a, b) {
2056
+ return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
2057
+ }
2058
+
2059
+ function selection_call () {
2060
+ var callback = arguments[0];
2061
+ arguments[0] = this;
2062
+ callback.apply(null, arguments);
2063
+ return this;
2064
+ }
2065
+
2066
+ function selection_nodes () {
2067
+ return Array.from(this);
2068
+ }
2069
+
2070
+ function selection_node () {
2071
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
2072
+ for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
2073
+ var node = group[i];
2074
+ if (node) return node;
2075
+ }
2076
+ }
2077
+
2078
+ return null;
2079
+ }
2080
+
2081
+ function selection_size () {
2082
+ var size = 0;
2083
+
2084
+ var _iterator = _createForOfIteratorHelper(this),
2085
+ _step;
2086
+
2087
+ try {
2088
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2089
+ var node = _step.value;
2090
+ ++size;
2091
+ } // eslint-disable-line no-unused-vars
2092
+
2093
+ } catch (err) {
2094
+ _iterator.e(err);
2095
+ } finally {
2096
+ _iterator.f();
2097
+ }
2098
+
2099
+ return size;
2100
+ }
2101
+
2102
+ function selection_empty () {
2103
+ return !this.node();
2104
+ }
2105
+
2106
+ function selection_each (callback) {
2107
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
2108
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
2109
+ if (node = group[i]) callback.call(node, node.__data__, i, group);
2110
+ }
2111
+ }
2112
+
2113
+ return this;
2114
+ }
2115
+
2116
+ function attrRemove$1(name) {
2117
+ return function () {
2118
+ this.removeAttribute(name);
2119
+ };
2120
+ }
2121
+
2122
+ function attrRemoveNS$1(fullname) {
2123
+ return function () {
2124
+ this.removeAttributeNS(fullname.space, fullname.local);
2125
+ };
2126
+ }
2127
+
2128
+ function attrConstant$1(name, value) {
2129
+ return function () {
2130
+ this.setAttribute(name, value);
2131
+ };
2132
+ }
2133
+
2134
+ function attrConstantNS$1(fullname, value) {
2135
+ return function () {
2136
+ this.setAttributeNS(fullname.space, fullname.local, value);
2137
+ };
2138
+ }
2139
+
2140
+ function attrFunction$1(name, value) {
2141
+ return function () {
2142
+ var v = value.apply(this, arguments);
2143
+ if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);
2144
+ };
2145
+ }
2146
+
2147
+ function attrFunctionNS$1(fullname, value) {
2148
+ return function () {
2149
+ var v = value.apply(this, arguments);
2150
+ if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);
2151
+ };
2152
+ }
2153
+
2154
+ function selection_attr (name, value) {
2155
+ var fullname = namespace(name);
2156
+
2157
+ if (arguments.length < 2) {
2158
+ var node = this.node();
2159
+ return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
2160
+ }
2161
+
2162
+ 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));
2163
+ }
2164
+
2165
+ function defaultView (node) {
2166
+ return node.ownerDocument && node.ownerDocument.defaultView // node is a Node
2167
+ || node.document && node // node is a Window
2168
+ || node.defaultView; // node is a Document
2169
+ }
2170
+
2171
+ function styleRemove$1(name) {
2172
+ return function () {
2173
+ this.style.removeProperty(name);
2174
+ };
2175
+ }
2176
+
2177
+ function styleConstant$1(name, value, priority) {
2178
+ return function () {
2179
+ this.style.setProperty(name, value, priority);
2180
+ };
2181
+ }
2182
+
2183
+ function styleFunction$1(name, value, priority) {
2184
+ return function () {
2185
+ var v = value.apply(this, arguments);
2186
+ if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);
2187
+ };
2188
+ }
2189
+
2190
+ function selection_style (name, value, priority) {
2191
+ 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);
2192
+ }
2193
+ function styleValue(node, name) {
2194
+ return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
2195
+ }
2196
+
2197
+ function propertyRemove(name) {
2198
+ return function () {
2199
+ delete this[name];
2200
+ };
2201
+ }
2202
+
2203
+ function propertyConstant(name, value) {
2204
+ return function () {
2205
+ this[name] = value;
2206
+ };
2207
+ }
2208
+
2209
+ function propertyFunction(name, value) {
2210
+ return function () {
2211
+ var v = value.apply(this, arguments);
2212
+ if (v == null) delete this[name];else this[name] = v;
2213
+ };
2214
+ }
2215
+
2216
+ function selection_property (name, value) {
2217
+ return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
2218
+ }
2219
+
2220
+ function classArray(string) {
2221
+ return string.trim().split(/^|\s+/);
2222
+ }
2223
+
2224
+ function classList(node) {
2225
+ return node.classList || new ClassList(node);
2226
+ }
2227
+
2228
+ function ClassList(node) {
2229
+ this._node = node;
2230
+ this._names = classArray(node.getAttribute("class") || "");
2231
+ }
2232
+
2233
+ ClassList.prototype = {
2234
+ add: function add(name) {
2235
+ var i = this._names.indexOf(name);
2236
+
2237
+ if (i < 0) {
2238
+ this._names.push(name);
2239
+
2240
+ this._node.setAttribute("class", this._names.join(" "));
2241
+ }
2242
+ },
2243
+ remove: function remove(name) {
2244
+ var i = this._names.indexOf(name);
2245
+
2246
+ if (i >= 0) {
2247
+ this._names.splice(i, 1);
2248
+
2249
+ this._node.setAttribute("class", this._names.join(" "));
2250
+ }
2251
+ },
2252
+ contains: function contains(name) {
2253
+ return this._names.indexOf(name) >= 0;
2254
+ }
2255
+ };
2256
+
2257
+ function classedAdd(node, names) {
2258
+ var list = classList(node),
2259
+ i = -1,
2260
+ n = names.length;
2261
+
2262
+ while (++i < n) {
2263
+ list.add(names[i]);
2264
+ }
2265
+ }
2266
+
2267
+ function classedRemove(node, names) {
2268
+ var list = classList(node),
2269
+ i = -1,
2270
+ n = names.length;
2271
+
2272
+ while (++i < n) {
2273
+ list.remove(names[i]);
2274
+ }
2275
+ }
2276
+
2277
+ function classedTrue(names) {
2278
+ return function () {
2279
+ classedAdd(this, names);
2280
+ };
2281
+ }
2282
+
2283
+ function classedFalse(names) {
2284
+ return function () {
2285
+ classedRemove(this, names);
2286
+ };
2287
+ }
2288
+
2289
+ function classedFunction(names, value) {
2290
+ return function () {
2291
+ (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
2292
+ };
2293
+ }
2294
+
2295
+ function selection_classed (name, value) {
2296
+ var names = classArray(name + "");
2297
+
2298
+ if (arguments.length < 2) {
2299
+ var list = classList(this.node()),
2300
+ i = -1,
2301
+ n = names.length;
2302
+
2303
+ while (++i < n) {
2304
+ if (!list.contains(names[i])) return false;
2305
+ }
2306
+
2307
+ return true;
2308
+ }
2309
+
2310
+ return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
2311
+ }
2312
+
2313
+ function textRemove() {
2314
+ this.textContent = "";
2315
+ }
2316
+
2317
+ function textConstant$1(value) {
2318
+ return function () {
2319
+ this.textContent = value;
2320
+ };
2321
+ }
2322
+
2323
+ function textFunction$1(value) {
2324
+ return function () {
2325
+ var v = value.apply(this, arguments);
2326
+ this.textContent = v == null ? "" : v;
2327
+ };
2328
+ }
2329
+
2330
+ function selection_text (value) {
2331
+ return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
2332
+ }
2333
+
2334
+ function htmlRemove() {
2335
+ this.innerHTML = "";
2336
+ }
2337
+
2338
+ function htmlConstant(value) {
2339
+ return function () {
2340
+ this.innerHTML = value;
2341
+ };
2342
+ }
2343
+
2344
+ function htmlFunction(value) {
2345
+ return function () {
2346
+ var v = value.apply(this, arguments);
2347
+ this.innerHTML = v == null ? "" : v;
2348
+ };
2349
+ }
2350
+
2351
+ function selection_html (value) {
2352
+ return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
2353
+ }
2354
+
2355
+ function raise() {
2356
+ if (this.nextSibling) this.parentNode.appendChild(this);
2357
+ }
2358
+
2359
+ function selection_raise () {
2360
+ return this.each(raise);
2361
+ }
2362
+
2363
+ function lower() {
2364
+ if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
2365
+ }
2366
+
2367
+ function selection_lower () {
2368
+ return this.each(lower);
2369
+ }
2370
+
2371
+ function selection_append (name) {
2372
+ var create = typeof name === "function" ? name : creator(name);
2373
+ return this.select(function () {
2374
+ return this.appendChild(create.apply(this, arguments));
2375
+ });
2376
+ }
2377
+
2378
+ function constantNull() {
2379
+ return null;
2380
+ }
2381
+
2382
+ function selection_insert (name, before) {
2383
+ var create = typeof name === "function" ? name : creator(name),
2384
+ select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
2385
+ return this.select(function () {
2386
+ return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
2387
+ });
2388
+ }
2389
+
2390
+ function remove() {
2391
+ var parent = this.parentNode;
2392
+ if (parent) parent.removeChild(this);
2393
+ }
2394
+
2395
+ function selection_remove () {
2396
+ return this.each(remove);
2397
+ }
2398
+
2399
+ function selection_cloneShallow() {
2400
+ var clone = this.cloneNode(false),
2401
+ parent = this.parentNode;
2402
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
2403
+ }
2404
+
2405
+ function selection_cloneDeep() {
2406
+ var clone = this.cloneNode(true),
2407
+ parent = this.parentNode;
2408
+ return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
2409
+ }
2410
+
2411
+ function selection_clone (deep) {
2412
+ return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
2413
+ }
2414
+
2415
+ function selection_datum (value) {
2416
+ return arguments.length ? this.property("__data__", value) : this.node().__data__;
2417
+ }
2418
+
2419
+ function contextListener(listener) {
2420
+ return function (event) {
2421
+ listener.call(this, event, this.__data__);
2422
+ };
2423
+ }
2424
+
2425
+ function parseTypenames(typenames) {
2426
+ return typenames.trim().split(/^|\s+/).map(function (t) {
2427
+ var name = "",
2428
+ i = t.indexOf(".");
2429
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
2430
+ return {
2431
+ type: t,
2432
+ name: name
2433
+ };
2434
+ });
2435
+ }
2436
+
2437
+ function onRemove(typename) {
2438
+ return function () {
2439
+ var on = this.__on;
2440
+ if (!on) return;
2441
+
2442
+ for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
2443
+ if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
2444
+ this.removeEventListener(o.type, o.listener, o.options);
2445
+ } else {
2446
+ on[++i] = o;
2447
+ }
2448
+ }
2449
+
2450
+ if (++i) on.length = i;else delete this.__on;
2451
+ };
2452
+ }
2453
+
2454
+ function onAdd(typename, value, options) {
2455
+ return function () {
2456
+ var on = this.__on,
2457
+ o,
2458
+ listener = contextListener(value);
2459
+ if (on) for (var j = 0, m = on.length; j < m; ++j) {
2460
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
2461
+ this.removeEventListener(o.type, o.listener, o.options);
2462
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
2463
+ o.value = value;
2464
+ return;
2465
+ }
2466
+ }
2467
+ this.addEventListener(typename.type, listener, options);
2468
+ o = {
2469
+ type: typename.type,
2470
+ name: typename.name,
2471
+ value: value,
2472
+ listener: listener,
2473
+ options: options
2474
+ };
2475
+ if (!on) this.__on = [o];else on.push(o);
2476
+ };
2477
+ }
2478
+
2479
+ function selection_on (typename, value, options) {
2480
+ var typenames = parseTypenames(typename + ""),
2481
+ i,
2482
+ n = typenames.length,
2483
+ t;
2484
+
2485
+ if (arguments.length < 2) {
2486
+ var on = this.node().__on;
2487
+
2488
+ if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
2489
+ for (i = 0, o = on[j]; i < n; ++i) {
2490
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
2491
+ return o.value;
2492
+ }
2493
+ }
2494
+ }
2495
+ return;
2496
+ }
2497
+
2498
+ on = value ? onAdd : onRemove;
2499
+
2500
+ for (i = 0; i < n; ++i) {
2501
+ this.each(on(typenames[i], value, options));
2502
+ }
2503
+
2504
+ return this;
2505
+ }
2506
+
2507
+ function dispatchEvent(node, type, params) {
2508
+ var window = defaultView(node),
2509
+ event = window.CustomEvent;
2510
+
2511
+ if (typeof event === "function") {
2512
+ event = new event(type, params);
2513
+ } else {
2514
+ event = window.document.createEvent("Event");
2515
+ if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);
2516
+ }
2517
+
2518
+ node.dispatchEvent(event);
2519
+ }
2520
+
2521
+ function dispatchConstant(type, params) {
2522
+ return function () {
2523
+ return dispatchEvent(this, type, params);
2524
+ };
2525
+ }
2526
+
2527
+ function dispatchFunction(type, params) {
2528
+ return function () {
2529
+ return dispatchEvent(this, type, params.apply(this, arguments));
2530
+ };
2531
+ }
2532
+
2533
+ function selection_dispatch (type, params) {
2534
+ return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
2535
+ }
2536
+
2537
+ var _marked = /*#__PURE__*/regeneratorRuntime.mark(_callee);
2538
+
2539
+ function _callee() {
2540
+ var groups, j, m, group, i, n, node;
2541
+ return regeneratorRuntime.wrap(function _callee$(_context) {
2542
+ while (1) {
2543
+ switch (_context.prev = _context.next) {
2544
+ case 0:
2545
+ groups = this._groups, j = 0, m = groups.length;
2546
+
2547
+ case 1:
2548
+ if (!(j < m)) {
2549
+ _context.next = 13;
2550
+ break;
2551
+ }
2552
+
2553
+ group = groups[j], i = 0, n = group.length;
2554
+
2555
+ case 3:
2556
+ if (!(i < n)) {
2557
+ _context.next = 10;
2558
+ break;
2559
+ }
2560
+
2561
+ if (!(node = group[i])) {
2562
+ _context.next = 7;
2563
+ break;
2564
+ }
2565
+
2566
+ _context.next = 7;
2567
+ return node;
2568
+
2569
+ case 7:
2570
+ ++i;
2571
+ _context.next = 3;
2572
+ break;
2573
+
2574
+ case 10:
2575
+ ++j;
2576
+ _context.next = 1;
2577
+ break;
2578
+
2579
+ case 13:
2580
+ case "end":
2581
+ return _context.stop();
2582
+ }
2583
+ }
2584
+ }, _marked, this);
2585
+ }
2586
+
2587
+ var root = [null];
2588
+ function Selection$1(groups, parents) {
2589
+ this._groups = groups;
2590
+ this._parents = parents;
2591
+ }
2592
+
2593
+ function selection() {
2594
+ return new Selection$1([[document.documentElement]], root);
2595
+ }
2596
+
2597
+ function selection_selection() {
2598
+ return this;
2599
+ }
2600
+
2601
+ Selection$1.prototype = selection.prototype = _defineProperty({
2602
+ constructor: Selection$1,
2603
+ select: selection_select,
2604
+ selectAll: selection_selectAll,
2605
+ selectChild: selection_selectChild,
2606
+ selectChildren: selection_selectChildren,
2607
+ filter: selection_filter,
2608
+ data: selection_data,
2609
+ enter: selection_enter,
2610
+ exit: selection_exit,
2611
+ join: selection_join,
2612
+ merge: selection_merge,
2613
+ selection: selection_selection,
2614
+ order: selection_order,
2615
+ sort: selection_sort,
2616
+ call: selection_call,
2617
+ nodes: selection_nodes,
2618
+ node: selection_node,
2619
+ size: selection_size,
2620
+ empty: selection_empty,
2621
+ each: selection_each,
2622
+ attr: selection_attr,
2623
+ style: selection_style,
2624
+ property: selection_property,
2625
+ classed: selection_classed,
2626
+ text: selection_text,
2627
+ html: selection_html,
2628
+ raise: selection_raise,
2629
+ lower: selection_lower,
2630
+ append: selection_append,
2631
+ insert: selection_insert,
2632
+ remove: selection_remove,
2633
+ clone: selection_clone,
2634
+ datum: selection_datum,
2635
+ on: selection_on,
2636
+ dispatch: selection_dispatch
2637
+ }, Symbol.iterator, _callee);
2638
+
2639
+ function select (selector) {
2640
+ return typeof selector === "string" ? new Selection$1([[document.querySelector(selector)]], [document.documentElement]) : new Selection$1([[selector]], root);
2641
+ }
2642
+
2643
+ function define (constructor, factory, prototype) {
2644
+ constructor.prototype = factory.prototype = prototype;
2645
+ prototype.constructor = constructor;
2646
+ }
2647
+ function extend(parent, definition) {
2648
+ var prototype = Object.create(parent.prototype);
2649
+
2650
+ for (var key in definition) {
2651
+ prototype[key] = definition[key];
2652
+ }
2653
+
2654
+ return prototype;
2655
+ }
2656
+
2657
+ function Color() {}
2658
+ var _darker = 0.7;
2659
+
2660
+ var _brighter = 1 / _darker;
2661
+ var reI = "\\s*([+-]?\\d+)\\s*",
2662
+ reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2663
+ reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2664
+ reHex = /^#([0-9a-f]{3,8})$/,
2665
+ reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
2666
+ reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
2667
+ reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
2668
+ reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
2669
+ reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
2670
+ reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
2671
+ var named = {
2672
+ aliceblue: 0xf0f8ff,
2673
+ antiquewhite: 0xfaebd7,
2674
+ aqua: 0x00ffff,
2675
+ aquamarine: 0x7fffd4,
2676
+ azure: 0xf0ffff,
2677
+ beige: 0xf5f5dc,
2678
+ bisque: 0xffe4c4,
2679
+ black: 0x000000,
2680
+ blanchedalmond: 0xffebcd,
2681
+ blue: 0x0000ff,
2682
+ blueviolet: 0x8a2be2,
2683
+ brown: 0xa52a2a,
2684
+ burlywood: 0xdeb887,
2685
+ cadetblue: 0x5f9ea0,
2686
+ chartreuse: 0x7fff00,
2687
+ chocolate: 0xd2691e,
2688
+ coral: 0xff7f50,
2689
+ cornflowerblue: 0x6495ed,
2690
+ cornsilk: 0xfff8dc,
2691
+ crimson: 0xdc143c,
2692
+ cyan: 0x00ffff,
2693
+ darkblue: 0x00008b,
2694
+ darkcyan: 0x008b8b,
2695
+ darkgoldenrod: 0xb8860b,
2696
+ darkgray: 0xa9a9a9,
2697
+ darkgreen: 0x006400,
2698
+ darkgrey: 0xa9a9a9,
2699
+ darkkhaki: 0xbdb76b,
2700
+ darkmagenta: 0x8b008b,
2701
+ darkolivegreen: 0x556b2f,
2702
+ darkorange: 0xff8c00,
2703
+ darkorchid: 0x9932cc,
2704
+ darkred: 0x8b0000,
2705
+ darksalmon: 0xe9967a,
2706
+ darkseagreen: 0x8fbc8f,
2707
+ darkslateblue: 0x483d8b,
2708
+ darkslategray: 0x2f4f4f,
2709
+ darkslategrey: 0x2f4f4f,
2710
+ darkturquoise: 0x00ced1,
2711
+ darkviolet: 0x9400d3,
2712
+ deeppink: 0xff1493,
2713
+ deepskyblue: 0x00bfff,
2714
+ dimgray: 0x696969,
2715
+ dimgrey: 0x696969,
2716
+ dodgerblue: 0x1e90ff,
2717
+ firebrick: 0xb22222,
2718
+ floralwhite: 0xfffaf0,
2719
+ forestgreen: 0x228b22,
2720
+ fuchsia: 0xff00ff,
2721
+ gainsboro: 0xdcdcdc,
2722
+ ghostwhite: 0xf8f8ff,
2723
+ gold: 0xffd700,
2724
+ goldenrod: 0xdaa520,
2725
+ gray: 0x808080,
2726
+ green: 0x008000,
2727
+ greenyellow: 0xadff2f,
2728
+ grey: 0x808080,
2729
+ honeydew: 0xf0fff0,
2730
+ hotpink: 0xff69b4,
2731
+ indianred: 0xcd5c5c,
2732
+ indigo: 0x4b0082,
2733
+ ivory: 0xfffff0,
2734
+ khaki: 0xf0e68c,
2735
+ lavender: 0xe6e6fa,
2736
+ lavenderblush: 0xfff0f5,
2737
+ lawngreen: 0x7cfc00,
2738
+ lemonchiffon: 0xfffacd,
2739
+ lightblue: 0xadd8e6,
2740
+ lightcoral: 0xf08080,
2741
+ lightcyan: 0xe0ffff,
2742
+ lightgoldenrodyellow: 0xfafad2,
2743
+ lightgray: 0xd3d3d3,
2744
+ lightgreen: 0x90ee90,
2745
+ lightgrey: 0xd3d3d3,
2746
+ lightpink: 0xffb6c1,
2747
+ lightsalmon: 0xffa07a,
2748
+ lightseagreen: 0x20b2aa,
2749
+ lightskyblue: 0x87cefa,
2750
+ lightslategray: 0x778899,
2751
+ lightslategrey: 0x778899,
2752
+ lightsteelblue: 0xb0c4de,
2753
+ lightyellow: 0xffffe0,
2754
+ lime: 0x00ff00,
2755
+ limegreen: 0x32cd32,
2756
+ linen: 0xfaf0e6,
2757
+ magenta: 0xff00ff,
2758
+ maroon: 0x800000,
2759
+ mediumaquamarine: 0x66cdaa,
2760
+ mediumblue: 0x0000cd,
2761
+ mediumorchid: 0xba55d3,
2762
+ mediumpurple: 0x9370db,
2763
+ mediumseagreen: 0x3cb371,
2764
+ mediumslateblue: 0x7b68ee,
2765
+ mediumspringgreen: 0x00fa9a,
2766
+ mediumturquoise: 0x48d1cc,
2767
+ mediumvioletred: 0xc71585,
2768
+ midnightblue: 0x191970,
2769
+ mintcream: 0xf5fffa,
2770
+ mistyrose: 0xffe4e1,
2771
+ moccasin: 0xffe4b5,
2772
+ navajowhite: 0xffdead,
2773
+ navy: 0x000080,
2774
+ oldlace: 0xfdf5e6,
2775
+ olive: 0x808000,
2776
+ olivedrab: 0x6b8e23,
2777
+ orange: 0xffa500,
2778
+ orangered: 0xff4500,
2779
+ orchid: 0xda70d6,
2780
+ palegoldenrod: 0xeee8aa,
2781
+ palegreen: 0x98fb98,
2782
+ paleturquoise: 0xafeeee,
2783
+ palevioletred: 0xdb7093,
2784
+ papayawhip: 0xffefd5,
2785
+ peachpuff: 0xffdab9,
2786
+ peru: 0xcd853f,
2787
+ pink: 0xffc0cb,
2788
+ plum: 0xdda0dd,
2789
+ powderblue: 0xb0e0e6,
2790
+ purple: 0x800080,
2791
+ rebeccapurple: 0x663399,
2792
+ red: 0xff0000,
2793
+ rosybrown: 0xbc8f8f,
2794
+ royalblue: 0x4169e1,
2795
+ saddlebrown: 0x8b4513,
2796
+ salmon: 0xfa8072,
2797
+ sandybrown: 0xf4a460,
2798
+ seagreen: 0x2e8b57,
2799
+ seashell: 0xfff5ee,
2800
+ sienna: 0xa0522d,
2801
+ silver: 0xc0c0c0,
2802
+ skyblue: 0x87ceeb,
2803
+ slateblue: 0x6a5acd,
2804
+ slategray: 0x708090,
2805
+ slategrey: 0x708090,
2806
+ snow: 0xfffafa,
2807
+ springgreen: 0x00ff7f,
2808
+ steelblue: 0x4682b4,
2809
+ tan: 0xd2b48c,
2810
+ teal: 0x008080,
2811
+ thistle: 0xd8bfd8,
2812
+ tomato: 0xff6347,
2813
+ turquoise: 0x40e0d0,
2814
+ violet: 0xee82ee,
2815
+ wheat: 0xf5deb3,
2816
+ white: 0xffffff,
2817
+ whitesmoke: 0xf5f5f5,
2818
+ yellow: 0xffff00,
2819
+ yellowgreen: 0x9acd32
2820
+ };
2821
+ define(Color, color, {
2822
+ copy: function copy(channels) {
2823
+ return Object.assign(new this.constructor(), this, channels);
2824
+ },
2825
+ displayable: function displayable() {
2826
+ return this.rgb().displayable();
2827
+ },
2828
+ hex: color_formatHex,
2829
+ // Deprecated! Use color.formatHex.
2830
+ formatHex: color_formatHex,
2831
+ formatHsl: color_formatHsl,
2832
+ formatRgb: color_formatRgb,
2833
+ toString: color_formatRgb
2834
+ });
2835
+
2836
+ function color_formatHex() {
2837
+ return this.rgb().formatHex();
2838
+ }
2839
+
2840
+ function color_formatHsl() {
2841
+ return hslConvert(this).formatHsl();
2842
+ }
2843
+
2844
+ function color_formatRgb() {
2845
+ return this.rgb().formatRgb();
2846
+ }
2847
+
2848
+ function color(format) {
2849
+ var m, l;
2850
+ format = (format + "").trim().toLowerCase();
2851
+ return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
2852
+ : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00
2853
+ : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
2854
+ : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000
2855
+ : null // invalid hex
2856
+ ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
2857
+ : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
2858
+ : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
2859
+ : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
2860
+ : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
2861
+ : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
2862
+ : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
2863
+ : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
2864
+ }
2865
+
2866
+ function rgbn(n) {
2867
+ return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
2868
+ }
2869
+
2870
+ function rgba(r, g, b, a) {
2871
+ if (a <= 0) r = g = b = NaN;
2872
+ return new Rgb(r, g, b, a);
2873
+ }
2874
+
2875
+ function rgbConvert(o) {
2876
+ if (!(o instanceof Color)) o = color(o);
2877
+ if (!o) return new Rgb();
2878
+ o = o.rgb();
2879
+ return new Rgb(o.r, o.g, o.b, o.opacity);
2880
+ }
2881
+ function rgb(r, g, b, opacity) {
2882
+ return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
2883
+ }
2884
+ function Rgb(r, g, b, opacity) {
2885
+ this.r = +r;
2886
+ this.g = +g;
2887
+ this.b = +b;
2888
+ this.opacity = +opacity;
2889
+ }
2890
+ define(Rgb, rgb, extend(Color, {
2891
+ brighter: function brighter(k) {
2892
+ k = k == null ? _brighter : Math.pow(_brighter, k);
2893
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2894
+ },
2895
+ darker: function darker(k) {
2896
+ k = k == null ? _darker : Math.pow(_darker, k);
2897
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2898
+ },
2899
+ rgb: function rgb() {
2900
+ return this;
2901
+ },
2902
+ displayable: function displayable() {
2903
+ return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
2904
+ },
2905
+ hex: rgb_formatHex,
2906
+ // Deprecated! Use color.formatHex.
2907
+ formatHex: rgb_formatHex,
2908
+ formatRgb: rgb_formatRgb,
2909
+ toString: rgb_formatRgb
2910
+ }));
2911
+
2912
+ function rgb_formatHex() {
2913
+ return "#" + hex(this.r) + hex(this.g) + hex(this.b);
2914
+ }
2915
+
2916
+ function rgb_formatRgb() {
2917
+ var a = this.opacity;
2918
+ a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2919
+ 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 + ")");
2920
+ }
2921
+
2922
+ function hex(value) {
2923
+ value = Math.max(0, Math.min(255, Math.round(value) || 0));
2924
+ return (value < 16 ? "0" : "") + value.toString(16);
2925
+ }
2926
+
2927
+ function hsla(h, s, l, a) {
2928
+ if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;
2929
+ return new Hsl(h, s, l, a);
2930
+ }
2931
+
2932
+ function hslConvert(o) {
2933
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
2934
+ if (!(o instanceof Color)) o = color(o);
2935
+ if (!o) return new Hsl();
2936
+ if (o instanceof Hsl) return o;
2937
+ o = o.rgb();
2938
+ var r = o.r / 255,
2939
+ g = o.g / 255,
2940
+ b = o.b / 255,
2941
+ min = Math.min(r, g, b),
2942
+ max = Math.max(r, g, b),
2943
+ h = NaN,
2944
+ s = max - min,
2945
+ l = (max + min) / 2;
2946
+
2947
+ if (s) {
2948
+ 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;
2949
+ s /= l < 0.5 ? max + min : 2 - max - min;
2950
+ h *= 60;
2951
+ } else {
2952
+ s = l > 0 && l < 1 ? 0 : h;
2953
+ }
2954
+
2955
+ return new Hsl(h, s, l, o.opacity);
2956
+ }
2957
+ function hsl(h, s, l, opacity) {
2958
+ return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
2959
+ }
2960
+
2961
+ function Hsl(h, s, l, opacity) {
2962
+ this.h = +h;
2963
+ this.s = +s;
2964
+ this.l = +l;
2965
+ this.opacity = +opacity;
2966
+ }
2967
+
2968
+ define(Hsl, hsl, extend(Color, {
2969
+ brighter: function brighter(k) {
2970
+ k = k == null ? _brighter : Math.pow(_brighter, k);
2971
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
2972
+ },
2973
+ darker: function darker(k) {
2974
+ k = k == null ? _darker : Math.pow(_darker, k);
2975
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
2976
+ },
2977
+ rgb: function rgb() {
2978
+ var h = this.h % 360 + (this.h < 0) * 360,
2979
+ s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2980
+ l = this.l,
2981
+ m2 = l + (l < 0.5 ? l : 1 - l) * s,
2982
+ m1 = 2 * l - m2;
2983
+ 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);
2984
+ },
2985
+ displayable: function displayable() {
2986
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2987
+ },
2988
+ formatHsl: function formatHsl() {
2989
+ var a = this.opacity;
2990
+ a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2991
+ return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
2992
+ }
2993
+ }));
2994
+ /* From FvD 13.37, CSS Color Module Level 3 */
2995
+
2996
+ function hsl2rgb(h, m1, m2) {
2997
+ return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
2998
+ }
2999
+
3000
+ var constant = (function (x) {
3001
+ return function () {
3002
+ return x;
3003
+ };
3004
+ });
3005
+
3006
+ function linear(a, d) {
3007
+ return function (t) {
3008
+ return a + t * d;
3009
+ };
3010
+ }
3011
+
3012
+ function exponential(a, b, y) {
3013
+ return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {
3014
+ return Math.pow(a + t * b, y);
3015
+ };
3016
+ }
3017
+ function gamma(y) {
3018
+ return (y = +y) === 1 ? nogamma : function (a, b) {
3019
+ return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
3020
+ };
3021
+ }
3022
+ function nogamma(a, b) {
3023
+ var d = b - a;
3024
+ return d ? linear(a, d) : constant(isNaN(a) ? b : a);
3025
+ }
3026
+
3027
+ var interpolateRgb = (function rgbGamma(y) {
3028
+ var color = gamma(y);
3029
+
3030
+ function rgb$1(start, end) {
3031
+ var r = color((start = rgb(start)).r, (end = rgb(end)).r),
3032
+ g = color(start.g, end.g),
3033
+ b = color(start.b, end.b),
3034
+ opacity = nogamma(start.opacity, end.opacity);
3035
+ return function (t) {
3036
+ start.r = r(t);
3037
+ start.g = g(t);
3038
+ start.b = b(t);
3039
+ start.opacity = opacity(t);
3040
+ return start + "";
3041
+ };
3042
+ }
3043
+
3044
+ rgb$1.gamma = rgbGamma;
3045
+ return rgb$1;
3046
+ })(1);
3047
+
3048
+ function interpolateNumber (a, b) {
3049
+ return a = +a, b = +b, function (t) {
3050
+ return a * (1 - t) + b * t;
3051
+ };
3052
+ }
3053
+
3054
+ var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
3055
+ reB = new RegExp(reA.source, "g");
3056
+
3057
+ function zero(b) {
3058
+ return function () {
3059
+ return b;
3060
+ };
3061
+ }
3062
+
3063
+ function one(b) {
3064
+ return function (t) {
3065
+ return b(t) + "";
3066
+ };
3067
+ }
3068
+
3069
+ function interpolateString (a, b) {
3070
+ var bi = reA.lastIndex = reB.lastIndex = 0,
3071
+ // scan index for next number in b
3072
+ am,
3073
+ // current match in a
3074
+ bm,
3075
+ // current match in b
3076
+ bs,
3077
+ // string preceding current number in b, if any
3078
+ i = -1,
3079
+ // index in s
3080
+ s = [],
3081
+ // string constants and placeholders
3082
+ q = []; // number interpolators
3083
+ // Coerce inputs to strings.
3084
+
3085
+ a = a + "", b = b + ""; // Interpolate pairs of numbers in a & b.
3086
+
3087
+ while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
3088
+ if ((bs = bm.index) > bi) {
3089
+ // a string precedes the next number in b
3090
+ bs = b.slice(bi, bs);
3091
+ if (s[i]) s[i] += bs; // coalesce with previous string
3092
+ else s[++i] = bs;
3093
+ }
3094
+
3095
+ if ((am = am[0]) === (bm = bm[0])) {
3096
+ // numbers in a & b match
3097
+ if (s[i]) s[i] += bm; // coalesce with previous string
3098
+ else s[++i] = bm;
3099
+ } else {
3100
+ // interpolate non-matching numbers
3101
+ s[++i] = null;
3102
+ q.push({
3103
+ i: i,
3104
+ x: interpolateNumber(am, bm)
3105
+ });
3106
+ }
3107
+
3108
+ bi = reB.lastIndex;
3109
+ } // Add remains of b.
3110
+
3111
+
3112
+ if (bi < b.length) {
3113
+ bs = b.slice(bi);
3114
+ if (s[i]) s[i] += bs; // coalesce with previous string
3115
+ else s[++i] = bs;
3116
+ } // Special optimization for only a single match.
3117
+ // Otherwise, interpolate each of the numbers and rejoin the string.
3118
+
3119
+
3120
+ return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
3121
+ for (var i = 0, o; i < b; ++i) {
3122
+ s[(o = q[i]).i] = o.x(t);
3123
+ }
3124
+
3125
+ return s.join("");
3126
+ });
3127
+ }
3128
+
3129
+ var degrees = 180 / Math.PI;
3130
+ var identity = {
3131
+ translateX: 0,
3132
+ translateY: 0,
3133
+ rotate: 0,
3134
+ skewX: 0,
3135
+ scaleX: 1,
3136
+ scaleY: 1
3137
+ };
3138
+ function decompose (a, b, c, d, e, f) {
3139
+ var scaleX, scaleY, skewX;
3140
+ if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
3141
+ if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
3142
+ if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
3143
+ if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
3144
+ return {
3145
+ translateX: e,
3146
+ translateY: f,
3147
+ rotate: Math.atan2(b, a) * degrees,
3148
+ skewX: Math.atan(skewX) * degrees,
3149
+ scaleX: scaleX,
3150
+ scaleY: scaleY
3151
+ };
3152
+ }
3153
+
3154
+ var svgNode;
3155
+ /* eslint-disable no-undef */
3156
+
3157
+ function parseCss(value) {
3158
+ var m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
3159
+ return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
3160
+ }
3161
+ function parseSvg(value) {
3162
+ if (value == null) return identity;
3163
+ if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
3164
+ svgNode.setAttribute("transform", value);
3165
+ if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
3166
+ value = value.matrix;
3167
+ return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
3168
+ }
3169
+
3170
+ function interpolateTransform(parse, pxComma, pxParen, degParen) {
3171
+ function pop(s) {
3172
+ return s.length ? s.pop() + " " : "";
3173
+ }
3174
+
3175
+ function translate(xa, ya, xb, yb, s, q) {
3176
+ if (xa !== xb || ya !== yb) {
3177
+ var i = s.push("translate(", null, pxComma, null, pxParen);
3178
+ q.push({
3179
+ i: i - 4,
3180
+ x: interpolateNumber(xa, xb)
3181
+ }, {
3182
+ i: i - 2,
3183
+ x: interpolateNumber(ya, yb)
3184
+ });
3185
+ } else if (xb || yb) {
3186
+ s.push("translate(" + xb + pxComma + yb + pxParen);
3187
+ }
3188
+ }
3189
+
3190
+ function rotate(a, b, s, q) {
3191
+ if (a !== b) {
3192
+ if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path
3193
+
3194
+ q.push({
3195
+ i: s.push(pop(s) + "rotate(", null, degParen) - 2,
3196
+ x: interpolateNumber(a, b)
3197
+ });
3198
+ } else if (b) {
3199
+ s.push(pop(s) + "rotate(" + b + degParen);
3200
+ }
3201
+ }
3202
+
3203
+ function skewX(a, b, s, q) {
3204
+ if (a !== b) {
3205
+ q.push({
3206
+ i: s.push(pop(s) + "skewX(", null, degParen) - 2,
3207
+ x: interpolateNumber(a, b)
3208
+ });
3209
+ } else if (b) {
3210
+ s.push(pop(s) + "skewX(" + b + degParen);
3211
+ }
3212
+ }
3213
+
3214
+ function scale(xa, ya, xb, yb, s, q) {
3215
+ if (xa !== xb || ya !== yb) {
3216
+ var i = s.push(pop(s) + "scale(", null, ",", null, ")");
3217
+ q.push({
3218
+ i: i - 4,
3219
+ x: interpolateNumber(xa, xb)
3220
+ }, {
3221
+ i: i - 2,
3222
+ x: interpolateNumber(ya, yb)
3223
+ });
3224
+ } else if (xb !== 1 || yb !== 1) {
3225
+ s.push(pop(s) + "scale(" + xb + "," + yb + ")");
3226
+ }
3227
+ }
3228
+
3229
+ return function (a, b) {
3230
+ var s = [],
3231
+ // string constants and placeholders
3232
+ q = []; // number interpolators
3233
+
3234
+ a = parse(a), b = parse(b);
3235
+ translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
3236
+ rotate(a.rotate, b.rotate, s, q);
3237
+ skewX(a.skewX, b.skewX, s, q);
3238
+ scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
3239
+ a = b = null; // gc
3240
+
3241
+ return function (t) {
3242
+ var i = -1,
3243
+ n = q.length,
3244
+ o;
3245
+
3246
+ while (++i < n) {
3247
+ s[(o = q[i]).i] = o.x(t);
3248
+ }
3249
+
3250
+ return s.join("");
3251
+ };
3252
+ };
3253
+ }
3254
+
3255
+ var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
3256
+ var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
3257
+
3258
+ var frame = 0,
3259
+ // is an animation frame pending?
3260
+ timeout$1 = 0,
3261
+ // is a timeout pending?
3262
+ interval = 0,
3263
+ // are any timers active?
3264
+ pokeDelay = 1000,
3265
+ // how frequently we check for clock skew
3266
+ taskHead,
3267
+ taskTail,
3268
+ clockLast = 0,
3269
+ clockNow = 0,
3270
+ clockSkew = 0,
3271
+ clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === "object" && performance.now ? performance : Date,
3272
+ setFrame = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
3273
+ setTimeout(f, 17);
3274
+ };
3275
+ function now() {
3276
+ return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
3277
+ }
3278
+
3279
+ function clearNow() {
3280
+ clockNow = 0;
3281
+ }
3282
+
3283
+ function Timer() {
3284
+ this._call = this._time = this._next = null;
3285
+ }
3286
+ Timer.prototype = timer.prototype = {
3287
+ constructor: Timer,
3288
+ restart: function restart(callback, delay, time) {
3289
+ if (typeof callback !== "function") throw new TypeError("callback is not a function");
3290
+ time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
3291
+
3292
+ if (!this._next && taskTail !== this) {
3293
+ if (taskTail) taskTail._next = this;else taskHead = this;
3294
+ taskTail = this;
3295
+ }
3296
+
3297
+ this._call = callback;
3298
+ this._time = time;
3299
+ sleep();
3300
+ },
3301
+ stop: function stop() {
3302
+ if (this._call) {
3303
+ this._call = null;
3304
+ this._time = Infinity;
3305
+ sleep();
3306
+ }
3307
+ }
3308
+ };
3309
+ function timer(callback, delay, time) {
3310
+ var t = new Timer();
3311
+ t.restart(callback, delay, time);
3312
+ return t;
3313
+ }
3314
+ function timerFlush() {
3315
+ now(); // Get the current time, if not already set.
3316
+
3317
+ ++frame; // Pretend we’ve set an alarm, if we haven’t already.
3318
+
3319
+ var t = taskHead,
3320
+ e;
3321
+
3322
+ while (t) {
3323
+ if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
3324
+ t = t._next;
3325
+ }
3326
+
3327
+ --frame;
3328
+ }
3329
+
3330
+ function wake() {
3331
+ clockNow = (clockLast = clock.now()) + clockSkew;
3332
+ frame = timeout$1 = 0;
3333
+
3334
+ try {
3335
+ timerFlush();
3336
+ } finally {
3337
+ frame = 0;
3338
+ nap();
3339
+ clockNow = 0;
3340
+ }
3341
+ }
3342
+
3343
+ function poke() {
3344
+ var now = clock.now(),
3345
+ delay = now - clockLast;
3346
+ if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
3347
+ }
3348
+
3349
+ function nap() {
3350
+ var t0,
3351
+ t1 = taskHead,
3352
+ t2,
3353
+ time = Infinity;
3354
+
3355
+ while (t1) {
3356
+ if (t1._call) {
3357
+ if (time > t1._time) time = t1._time;
3358
+ t0 = t1, t1 = t1._next;
3359
+ } else {
3360
+ t2 = t1._next, t1._next = null;
3361
+ t1 = t0 ? t0._next = t2 : taskHead = t2;
3362
+ }
3363
+ }
3364
+
3365
+ taskTail = t0;
3366
+ sleep(time);
3367
+ }
3368
+
3369
+ function sleep(time) {
3370
+ if (frame) return; // Soonest alarm already set, or will be.
3371
+
3372
+ if (timeout$1) timeout$1 = clearTimeout(timeout$1);
3373
+ var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
3374
+
3375
+ if (delay > 24) {
3376
+ if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
3377
+ if (interval) interval = clearInterval(interval);
3378
+ } else {
3379
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
3380
+ frame = 1, setFrame(wake);
3381
+ }
3382
+ }
3383
+
3384
+ function timeout (callback, delay, time) {
3385
+ var t = new Timer();
3386
+ delay = delay == null ? 0 : +delay;
3387
+ t.restart(function (elapsed) {
3388
+ t.stop();
3389
+ callback(elapsed + delay);
3390
+ }, delay, time);
3391
+ return t;
3392
+ }
3393
+
3394
+ var emptyOn = dispatch("start", "end", "cancel", "interrupt");
3395
+ var emptyTween = [];
3396
+ var CREATED = 0;
3397
+ var SCHEDULED = 1;
3398
+ var STARTING = 2;
3399
+ var STARTED = 3;
3400
+ var RUNNING = 4;
3401
+ var ENDING = 5;
3402
+ var ENDED = 6;
3403
+ function schedule (node, name, id, index, group, timing) {
3404
+ var schedules = node.__transition;
3405
+ if (!schedules) node.__transition = {};else if (id in schedules) return;
3406
+ create(node, id, {
3407
+ name: name,
3408
+ index: index,
3409
+ // For context during callback.
3410
+ group: group,
3411
+ // For context during callback.
3412
+ on: emptyOn,
3413
+ tween: emptyTween,
3414
+ time: timing.time,
3415
+ delay: timing.delay,
3416
+ duration: timing.duration,
3417
+ ease: timing.ease,
3418
+ timer: null,
3419
+ state: CREATED
3420
+ });
3421
+ }
3422
+ function init(node, id) {
3423
+ var schedule = get(node, id);
3424
+ if (schedule.state > CREATED) throw new Error("too late; already scheduled");
3425
+ return schedule;
3426
+ }
3427
+ function set(node, id) {
3428
+ var schedule = get(node, id);
3429
+ if (schedule.state > STARTED) throw new Error("too late; already running");
3430
+ return schedule;
3431
+ }
3432
+ function get(node, id) {
3433
+ var schedule = node.__transition;
3434
+ if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
3435
+ return schedule;
3436
+ }
3437
+
3438
+ function create(node, id, self) {
3439
+ var schedules = node.__transition,
3440
+ tween; // Initialize the self timer when the transition is created.
3441
+ // Note the actual delay is not known until the first callback!
3442
+
3443
+ schedules[id] = self;
3444
+ self.timer = timer(schedule, 0, self.time);
3445
+
3446
+ function schedule(elapsed) {
3447
+ self.state = SCHEDULED;
3448
+ self.timer.restart(start, self.delay, self.time); // If the elapsed delay is less than our first sleep, start immediately.
3449
+
3450
+ if (self.delay <= elapsed) start(elapsed - self.delay);
3451
+ }
3452
+
3453
+ function start(elapsed) {
3454
+ var i, j, n, o; // If the state is not SCHEDULED, then we previously errored on start.
3455
+
3456
+ if (self.state !== SCHEDULED) return stop();
3457
+
3458
+ for (i in schedules) {
3459
+ o = schedules[i];
3460
+ if (o.name !== self.name) continue; // While this element already has a starting transition during this frame,
3461
+ // defer starting an interrupting transition until that transition has a
3462
+ // chance to tick (and possibly end); see d3/d3-transition#54!
3463
+
3464
+ if (o.state === STARTED) return timeout(start); // Interrupt the active transition, if any.
3465
+
3466
+ if (o.state === RUNNING) {
3467
+ o.state = ENDED;
3468
+ o.timer.stop();
3469
+ o.on.call("interrupt", node, node.__data__, o.index, o.group);
3470
+ delete schedules[i];
3471
+ } // Cancel any pre-empted transitions.
3472
+ else if (+i < id) {
3473
+ o.state = ENDED;
3474
+ o.timer.stop();
3475
+ o.on.call("cancel", node, node.__data__, o.index, o.group);
3476
+ delete schedules[i];
3477
+ }
3478
+ } // Defer the first tick to end of the current frame; see d3/d3#1576.
3479
+ // Note the transition may be canceled after start and before the first tick!
3480
+ // Note this must be scheduled before the start event; see d3/d3-transition#16!
3481
+ // Assuming this is successful, subsequent callbacks go straight to tick.
3482
+
3483
+
3484
+ timeout(function () {
3485
+ if (self.state === STARTED) {
3486
+ self.state = RUNNING;
3487
+ self.timer.restart(tick, self.delay, self.time);
3488
+ tick(elapsed);
3489
+ }
3490
+ }); // Dispatch the start event.
3491
+ // Note this must be done before the tween are initialized.
3492
+
3493
+ self.state = STARTING;
3494
+ self.on.call("start", node, node.__data__, self.index, self.group);
3495
+ if (self.state !== STARTING) return; // interrupted
3496
+
3497
+ self.state = STARTED; // Initialize the tween, deleting null tween.
3498
+
3499
+ tween = new Array(n = self.tween.length);
3500
+
3501
+ for (i = 0, j = -1; i < n; ++i) {
3502
+ if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
3503
+ tween[++j] = o;
3504
+ }
3505
+ }
3506
+
3507
+ tween.length = j + 1;
3508
+ }
3509
+
3510
+ function tick(elapsed) {
3511
+ var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
3512
+ i = -1,
3513
+ n = tween.length;
3514
+
3515
+ while (++i < n) {
3516
+ tween[i].call(node, t);
3517
+ } // Dispatch the end event.
3518
+
3519
+
3520
+ if (self.state === ENDING) {
3521
+ self.on.call("end", node, node.__data__, self.index, self.group);
3522
+ stop();
3523
+ }
3524
+ }
3525
+
3526
+ function stop() {
3527
+ self.state = ENDED;
3528
+ self.timer.stop();
3529
+ delete schedules[id];
3530
+
3531
+ for (var i in schedules) {
3532
+ return;
3533
+ } // eslint-disable-line no-unused-vars
3534
+
3535
+
3536
+ delete node.__transition;
3537
+ }
3538
+ }
3539
+
3540
+ function interrupt (node, name) {
3541
+ var schedules = node.__transition,
3542
+ schedule,
3543
+ active,
3544
+ empty = true,
3545
+ i;
3546
+ if (!schedules) return;
3547
+ name = name == null ? null : name + "";
3548
+
3549
+ for (i in schedules) {
3550
+ if ((schedule = schedules[i]).name !== name) {
3551
+ empty = false;
3552
+ continue;
3553
+ }
3554
+
3555
+ active = schedule.state > STARTING && schedule.state < ENDING;
3556
+ schedule.state = ENDED;
3557
+ schedule.timer.stop();
3558
+ schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
3559
+ delete schedules[i];
3560
+ }
3561
+
3562
+ if (empty) delete node.__transition;
3563
+ }
3564
+
3565
+ function selection_interrupt (name) {
3566
+ return this.each(function () {
3567
+ interrupt(this, name);
3568
+ });
3569
+ }
3570
+
3571
+ function tweenRemove(id, name) {
3572
+ var tween0, tween1;
3573
+ return function () {
3574
+ var schedule = set(this, id),
3575
+ tween = schedule.tween; // If this node shared tween with the previous node,
3576
+ // just assign the updated shared tween and we’re done!
3577
+ // Otherwise, copy-on-write.
3578
+
3579
+ if (tween !== tween0) {
3580
+ tween1 = tween0 = tween;
3581
+
3582
+ for (var i = 0, n = tween1.length; i < n; ++i) {
3583
+ if (tween1[i].name === name) {
3584
+ tween1 = tween1.slice();
3585
+ tween1.splice(i, 1);
3586
+ break;
3587
+ }
3588
+ }
3589
+ }
3590
+
3591
+ schedule.tween = tween1;
3592
+ };
3593
+ }
3594
+
3595
+ function tweenFunction(id, name, value) {
3596
+ var tween0, tween1;
3597
+ if (typeof value !== "function") throw new Error();
3598
+ return function () {
3599
+ var schedule = set(this, id),
3600
+ tween = schedule.tween; // If this node shared tween with the previous node,
3601
+ // just assign the updated shared tween and we’re done!
3602
+ // Otherwise, copy-on-write.
3603
+
3604
+ if (tween !== tween0) {
3605
+ tween1 = (tween0 = tween).slice();
3606
+
3607
+ for (var t = {
3608
+ name: name,
3609
+ value: value
3610
+ }, i = 0, n = tween1.length; i < n; ++i) {
3611
+ if (tween1[i].name === name) {
3612
+ tween1[i] = t;
3613
+ break;
3614
+ }
3615
+ }
3616
+
3617
+ if (i === n) tween1.push(t);
3618
+ }
3619
+
3620
+ schedule.tween = tween1;
3621
+ };
3622
+ }
3623
+
3624
+ function transition_tween (name, value) {
3625
+ var id = this._id;
3626
+ name += "";
3627
+
3628
+ if (arguments.length < 2) {
3629
+ var tween = get(this.node(), id).tween;
3630
+
3631
+ for (var i = 0, n = tween.length, t; i < n; ++i) {
3632
+ if ((t = tween[i]).name === name) {
3633
+ return t.value;
3634
+ }
3635
+ }
3636
+
3637
+ return null;
3638
+ }
3639
+
3640
+ return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
3641
+ }
3642
+ function tweenValue(transition, name, value) {
3643
+ var id = transition._id;
3644
+ transition.each(function () {
3645
+ var schedule = set(this, id);
3646
+ (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
3647
+ });
3648
+ return function (node) {
3649
+ return get(node, id).value[name];
3650
+ };
3651
+ }
3652
+
3653
+ function interpolate (a, b) {
3654
+ var c;
3655
+ return (typeof b === "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b);
3656
+ }
3657
+
3658
+ function attrRemove(name) {
3659
+ return function () {
3660
+ this.removeAttribute(name);
3661
+ };
3662
+ }
3663
+
3664
+ function attrRemoveNS(fullname) {
3665
+ return function () {
3666
+ this.removeAttributeNS(fullname.space, fullname.local);
3667
+ };
3668
+ }
3669
+
3670
+ function attrConstant(name, interpolate, value1) {
3671
+ var string00,
3672
+ string1 = value1 + "",
3673
+ interpolate0;
3674
+ return function () {
3675
+ var string0 = this.getAttribute(name);
3676
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3677
+ };
3678
+ }
3679
+
3680
+ function attrConstantNS(fullname, interpolate, value1) {
3681
+ var string00,
3682
+ string1 = value1 + "",
3683
+ interpolate0;
3684
+ return function () {
3685
+ var string0 = this.getAttributeNS(fullname.space, fullname.local);
3686
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3687
+ };
3688
+ }
3689
+
3690
+ function attrFunction(name, interpolate, value) {
3691
+ var string00, string10, interpolate0;
3692
+ return function () {
3693
+ var string0,
3694
+ value1 = value(this),
3695
+ string1;
3696
+ if (value1 == null) return void this.removeAttribute(name);
3697
+ string0 = this.getAttribute(name);
3698
+ string1 = value1 + "";
3699
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3700
+ };
3701
+ }
3702
+
3703
+ function attrFunctionNS(fullname, interpolate, value) {
3704
+ var string00, string10, interpolate0;
3705
+ return function () {
3706
+ var string0,
3707
+ value1 = value(this),
3708
+ string1;
3709
+ if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
3710
+ string0 = this.getAttributeNS(fullname.space, fullname.local);
3711
+ string1 = value1 + "";
3712
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3713
+ };
3714
+ }
3715
+
3716
+ function transition_attr (name, value) {
3717
+ var fullname = namespace(name),
3718
+ i = fullname === "transform" ? interpolateTransformSvg : interpolate;
3719
+ 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));
3720
+ }
3721
+
3722
+ function attrInterpolate(name, i) {
3723
+ return function (t) {
3724
+ this.setAttribute(name, i.call(this, t));
3725
+ };
3726
+ }
3727
+
3728
+ function attrInterpolateNS(fullname, i) {
3729
+ return function (t) {
3730
+ this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
3731
+ };
3732
+ }
3733
+
3734
+ function attrTweenNS(fullname, value) {
3735
+ var t0, i0;
3736
+
3737
+ function tween() {
3738
+ var i = value.apply(this, arguments);
3739
+ if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
3740
+ return t0;
3741
+ }
3742
+
3743
+ tween._value = value;
3744
+ return tween;
3745
+ }
3746
+
3747
+ function attrTween(name, value) {
3748
+ var t0, i0;
3749
+
3750
+ function tween() {
3751
+ var i = value.apply(this, arguments);
3752
+ if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
3753
+ return t0;
3754
+ }
3755
+
3756
+ tween._value = value;
3757
+ return tween;
3758
+ }
3759
+
3760
+ function transition_attrTween (name, value) {
3761
+ var key = "attr." + name;
3762
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
3763
+ if (value == null) return this.tween(key, null);
3764
+ if (typeof value !== "function") throw new Error();
3765
+ var fullname = namespace(name);
3766
+ return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
3767
+ }
3768
+
3769
+ function delayFunction(id, value) {
3770
+ return function () {
3771
+ init(this, id).delay = +value.apply(this, arguments);
3772
+ };
3773
+ }
3774
+
3775
+ function delayConstant(id, value) {
3776
+ return value = +value, function () {
3777
+ init(this, id).delay = value;
3778
+ };
3779
+ }
3780
+
3781
+ function transition_delay (value) {
3782
+ var id = this._id;
3783
+ return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;
3784
+ }
3785
+
3786
+ function durationFunction(id, value) {
3787
+ return function () {
3788
+ set(this, id).duration = +value.apply(this, arguments);
3789
+ };
3790
+ }
3791
+
3792
+ function durationConstant(id, value) {
3793
+ return value = +value, function () {
3794
+ set(this, id).duration = value;
3795
+ };
3796
+ }
3797
+
3798
+ function transition_duration (value) {
3799
+ var id = this._id;
3800
+ return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;
3801
+ }
3802
+
3803
+ function easeConstant(id, value) {
3804
+ if (typeof value !== "function") throw new Error();
3805
+ return function () {
3806
+ set(this, id).ease = value;
3807
+ };
3808
+ }
3809
+
3810
+ function transition_ease (value) {
3811
+ var id = this._id;
3812
+ return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;
3813
+ }
3814
+
3815
+ function easeVarying(id, value) {
3816
+ return function () {
3817
+ var v = value.apply(this, arguments);
3818
+ if (typeof v !== "function") throw new Error();
3819
+ set(this, id).ease = v;
3820
+ };
3821
+ }
3822
+
3823
+ function transition_easeVarying (value) {
3824
+ if (typeof value !== "function") throw new Error();
3825
+ return this.each(easeVarying(this._id, value));
3826
+ }
3827
+
3828
+ function transition_filter (match) {
3829
+ if (typeof match !== "function") match = matcher(match);
3830
+
3831
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3832
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
3833
+ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
3834
+ subgroup.push(node);
3835
+ }
3836
+ }
3837
+ }
3838
+
3839
+ return new Transition(subgroups, this._parents, this._name, this._id);
3840
+ }
3841
+
3842
+ function transition_merge (transition) {
3843
+ if (transition._id !== this._id) throw new Error();
3844
+
3845
+ 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) {
3846
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
3847
+ if (node = group0[i] || group1[i]) {
3848
+ merge[i] = node;
3849
+ }
3850
+ }
3851
+ }
3852
+
3853
+ for (; j < m0; ++j) {
3854
+ merges[j] = groups0[j];
3855
+ }
3856
+
3857
+ return new Transition(merges, this._parents, this._name, this._id);
3858
+ }
3859
+
3860
+ function start(name) {
3861
+ return (name + "").trim().split(/^|\s+/).every(function (t) {
3862
+ var i = t.indexOf(".");
3863
+ if (i >= 0) t = t.slice(0, i);
3864
+ return !t || t === "start";
3865
+ });
3866
+ }
3867
+
3868
+ function onFunction(id, name, listener) {
3869
+ var on0,
3870
+ on1,
3871
+ sit = start(name) ? init : set;
3872
+ return function () {
3873
+ var schedule = sit(this, id),
3874
+ on = schedule.on; // If this node shared a dispatch with the previous node,
3875
+ // just assign the updated shared dispatch and we’re done!
3876
+ // Otherwise, copy-on-write.
3877
+
3878
+ if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
3879
+ schedule.on = on1;
3880
+ };
3881
+ }
3882
+
3883
+ function transition_on (name, listener) {
3884
+ var id = this._id;
3885
+ return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
3886
+ }
3887
+
3888
+ function removeFunction(id) {
3889
+ return function () {
3890
+ var parent = this.parentNode;
3891
+
3892
+ for (var i in this.__transition) {
3893
+ if (+i !== id) return;
3894
+ }
3895
+
3896
+ if (parent) parent.removeChild(this);
3897
+ };
3898
+ }
3899
+
3900
+ function transition_remove () {
3901
+ return this.on("end.remove", removeFunction(this._id));
3902
+ }
3903
+
3904
+ function transition_select (select) {
3905
+ var name = this._name,
3906
+ id = this._id;
3907
+ if (typeof select !== "function") select = selector(select);
3908
+
3909
+ for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3910
+ for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3911
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
3912
+ if ("__data__" in node) subnode.__data__ = node.__data__;
3913
+ subgroup[i] = subnode;
3914
+ schedule(subgroup[i], name, id, i, subgroup, get(node, id));
3915
+ }
3916
+ }
3917
+ }
3918
+
3919
+ return new Transition(subgroups, this._parents, name, id);
3920
+ }
3921
+
3922
+ function transition_selectAll (select) {
3923
+ var name = this._name,
3924
+ id = this._id;
3925
+ if (typeof select !== "function") select = selectorAll(select);
3926
+
3927
+ for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
3928
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3929
+ if (node = group[i]) {
3930
+ for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {
3931
+ if (child = children[k]) {
3932
+ schedule(child, name, id, k, children, inherit);
3933
+ }
3934
+ }
3935
+
3936
+ subgroups.push(children);
3937
+ parents.push(node);
3938
+ }
3939
+ }
3940
+ }
3941
+
3942
+ return new Transition(subgroups, parents, name, id);
3943
+ }
3944
+
3945
+ var Selection = selection.prototype.constructor;
3946
+ function transition_selection () {
3947
+ return new Selection(this._groups, this._parents);
3948
+ }
3949
+
3950
+ function styleNull(name, interpolate) {
3951
+ var string00, string10, interpolate0;
3952
+ return function () {
3953
+ var string0 = styleValue(this, name),
3954
+ string1 = (this.style.removeProperty(name), styleValue(this, name));
3955
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
3956
+ };
3957
+ }
3958
+
3959
+ function styleRemove(name) {
3960
+ return function () {
3961
+ this.style.removeProperty(name);
3962
+ };
3963
+ }
3964
+
3965
+ function styleConstant(name, interpolate, value1) {
3966
+ var string00,
3967
+ string1 = value1 + "",
3968
+ interpolate0;
3969
+ return function () {
3970
+ var string0 = styleValue(this, name);
3971
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
3972
+ };
3973
+ }
3974
+
3975
+ function styleFunction(name, interpolate, value) {
3976
+ var string00, string10, interpolate0;
3977
+ return function () {
3978
+ var string0 = styleValue(this, name),
3979
+ value1 = value(this),
3980
+ string1 = value1 + "";
3981
+ if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
3982
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
3983
+ };
3984
+ }
3985
+
3986
+ function styleMaybeRemove(id, name) {
3987
+ var on0,
3988
+ on1,
3989
+ listener0,
3990
+ key = "style." + name,
3991
+ event = "end." + key,
3992
+ remove;
3993
+ return function () {
3994
+ var schedule = set(this, id),
3995
+ on = schedule.on,
3996
+ listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; // If this node shared a dispatch with the previous node,
3997
+ // just assign the updated shared dispatch and we’re done!
3998
+ // Otherwise, copy-on-write.
3999
+
4000
+ if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
4001
+ schedule.on = on1;
4002
+ };
4003
+ }
4004
+
4005
+ function transition_style (name, value, priority) {
4006
+ var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
4007
+ 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);
4008
+ }
4009
+
4010
+ function styleInterpolate(name, i, priority) {
4011
+ return function (t) {
4012
+ this.style.setProperty(name, i.call(this, t), priority);
4013
+ };
4014
+ }
4015
+
4016
+ function styleTween(name, value, priority) {
4017
+ var t, i0;
4018
+
4019
+ function tween() {
4020
+ var i = value.apply(this, arguments);
4021
+ if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
4022
+ return t;
4023
+ }
4024
+
4025
+ tween._value = value;
4026
+ return tween;
4027
+ }
4028
+
4029
+ function transition_styleTween (name, value, priority) {
4030
+ var key = "style." + (name += "");
4031
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
4032
+ if (value == null) return this.tween(key, null);
4033
+ if (typeof value !== "function") throw new Error();
4034
+ return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
4035
+ }
4036
+
4037
+ function textConstant(value) {
4038
+ return function () {
4039
+ this.textContent = value;
4040
+ };
4041
+ }
4042
+
4043
+ function textFunction(value) {
4044
+ return function () {
4045
+ var value1 = value(this);
4046
+ this.textContent = value1 == null ? "" : value1;
4047
+ };
4048
+ }
4049
+
4050
+ function transition_text (value) {
4051
+ return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + ""));
4052
+ }
4053
+
4054
+ function textInterpolate(i) {
4055
+ return function (t) {
4056
+ this.textContent = i.call(this, t);
4057
+ };
4058
+ }
4059
+
4060
+ function textTween(value) {
4061
+ var t0, i0;
4062
+
4063
+ function tween() {
4064
+ var i = value.apply(this, arguments);
4065
+ if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
4066
+ return t0;
4067
+ }
4068
+
4069
+ tween._value = value;
4070
+ return tween;
4071
+ }
4072
+
4073
+ function transition_textTween (value) {
4074
+ var key = "text";
4075
+ if (arguments.length < 1) return (key = this.tween(key)) && key._value;
4076
+ if (value == null) return this.tween(key, null);
4077
+ if (typeof value !== "function") throw new Error();
4078
+ return this.tween(key, textTween(value));
4079
+ }
4080
+
4081
+ function transition_transition () {
4082
+ var name = this._name,
4083
+ id0 = this._id,
4084
+ id1 = newId();
4085
+
4086
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
4087
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
4088
+ if (node = group[i]) {
4089
+ var inherit = get(node, id0);
4090
+ schedule(node, name, id1, i, group, {
4091
+ time: inherit.time + inherit.delay + inherit.duration,
4092
+ delay: 0,
4093
+ duration: inherit.duration,
4094
+ ease: inherit.ease
4095
+ });
4096
+ }
4097
+ }
4098
+ }
4099
+
4100
+ return new Transition(groups, this._parents, name, id1);
4101
+ }
4102
+
4103
+ function transition_end () {
4104
+ var on0,
4105
+ on1,
4106
+ that = this,
4107
+ id = that._id,
4108
+ size = that.size();
4109
+ return new Promise(function (resolve, reject) {
4110
+ var cancel = {
4111
+ value: reject
4112
+ },
4113
+ end = {
4114
+ value: function value() {
4115
+ if (--size === 0) resolve();
4116
+ }
4117
+ };
4118
+ that.each(function () {
4119
+ var schedule = set(this, id),
4120
+ on = schedule.on; // If this node shared a dispatch with the previous node,
4121
+ // just assign the updated shared dispatch and we’re done!
4122
+ // Otherwise, copy-on-write.
4123
+
4124
+ if (on !== on0) {
4125
+ on1 = (on0 = on).copy();
4126
+
4127
+ on1._.cancel.push(cancel);
4128
+
4129
+ on1._.interrupt.push(cancel);
4130
+
4131
+ on1._.end.push(end);
4132
+ }
4133
+
4134
+ schedule.on = on1;
4135
+ }); // The selection was empty, resolve end immediately
4136
+
4137
+ if (size === 0) resolve();
4138
+ });
4139
+ }
4140
+
4141
+ var id = 0;
4142
+ function Transition(groups, parents, name, id) {
4143
+ this._groups = groups;
4144
+ this._parents = parents;
4145
+ this._name = name;
4146
+ this._id = id;
4147
+ }
4148
+ function newId() {
4149
+ return ++id;
4150
+ }
4151
+ var selection_prototype = selection.prototype;
4152
+ Transition.prototype = _defineProperty({
4153
+ constructor: Transition,
4154
+ select: transition_select,
4155
+ selectAll: transition_selectAll,
4156
+ selectChild: selection_prototype.selectChild,
4157
+ selectChildren: selection_prototype.selectChildren,
4158
+ filter: transition_filter,
4159
+ merge: transition_merge,
4160
+ selection: transition_selection,
4161
+ transition: transition_transition,
4162
+ call: selection_prototype.call,
4163
+ nodes: selection_prototype.nodes,
4164
+ node: selection_prototype.node,
4165
+ size: selection_prototype.size,
4166
+ empty: selection_prototype.empty,
4167
+ each: selection_prototype.each,
4168
+ on: transition_on,
4169
+ attr: transition_attr,
4170
+ attrTween: transition_attrTween,
4171
+ style: transition_style,
4172
+ styleTween: transition_styleTween,
4173
+ text: transition_text,
4174
+ textTween: transition_textTween,
4175
+ remove: transition_remove,
4176
+ tween: transition_tween,
4177
+ delay: transition_delay,
4178
+ duration: transition_duration,
4179
+ ease: transition_ease,
4180
+ easeVarying: transition_easeVarying,
4181
+ end: transition_end
4182
+ }, Symbol.iterator, selection_prototype[Symbol.iterator]);
4183
+
4184
+ function cubicInOut(t) {
4185
+ return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
4186
+ }
4187
+
4188
+ var defaultTiming = {
4189
+ time: null,
4190
+ // Set on use.
4191
+ delay: 0,
4192
+ duration: 250,
4193
+ ease: cubicInOut
4194
+ };
4195
+
4196
+ function inherit(node, id) {
4197
+ var timing;
4198
+
4199
+ while (!(timing = node.__transition) || !(timing = timing[id])) {
4200
+ if (!(node = node.parentNode)) {
4201
+ throw new Error("transition ".concat(id, " not found"));
4202
+ }
4203
+ }
4204
+
4205
+ return timing;
4206
+ }
4207
+
4208
+ function selection_transition (name) {
4209
+ var id, timing;
4210
+
4211
+ if (name instanceof Transition) {
4212
+ id = name._id, name = name._name;
4213
+ } else {
4214
+ id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
4215
+ }
4216
+
4217
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
4218
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
4219
+ if (node = group[i]) {
4220
+ schedule(node, name, id, i, group, timing || inherit(node, id));
4221
+ }
4222
+ }
4223
+ }
4224
+
4225
+ return new Transition(groups, this._parents, name, id);
4226
+ }
4227
+
4228
+ selection.prototype.interrupt = selection_interrupt;
4229
+ selection.prototype.transition = selection_transition;
4230
+
4231
+ var _templateObject$6, _templateObject2$6, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
4232
+ /*
4233
+ DecidablesElement Base Class - Not intended for instantiation!
4234
+ <decidables-element>
4235
+ */
4236
+
4237
+ var DecidablesElement = /*#__PURE__*/function (_LitElement) {
4238
+ _inherits(DecidablesElement, _LitElement);
4239
+
4240
+ var _super = _createSuper(DecidablesElement);
4241
+
4242
+ function DecidablesElement() {
4243
+ var _this;
4244
+
4245
+ _classCallCheck(this, DecidablesElement);
4246
+
4247
+ _this = _super.call(this);
4248
+ _this.uniqueId = "decidables-".concat(DecidablesElement.uniqueId);
4249
+ return _this;
4250
+ }
4251
+
4252
+ _createClass(DecidablesElement, [{
4253
+ key: "getComputedStyleValue",
4254
+ value: function getComputedStyleValue(property) {
4255
+ // HACK: IE11 requires use of polyfill interface to get custom property value in Javascript
4256
+ if (window.ShadyCSS) {
4257
+ return window.ShadyCSS.getComputedStyleValue(this, property);
4258
+ }
4259
+
4260
+ return getComputedStyle(this).getPropertyValue(property);
4261
+ }
4262
+ }, {
4263
+ key: "firstUpdated",
4264
+ value: function firstUpdated(changedProperties) {
4265
+ _get(_getPrototypeOf(DecidablesElement.prototype), "firstUpdated", this).call(this, changedProperties); // Use focus highlighting if keyboard is used at all
4266
+
4267
+
4268
+ select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', function (event) {
4269
+ var element = event.currentTarget;
4270
+ select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
4271
+ }).on('keydown.keyboard', function (event) {
4272
+ var element = event.currentTarget;
4273
+ select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
4274
+ });
4275
+ }
4276
+ }], [{
4277
+ key: "uniqueId",
4278
+ get: // HACK: Create a unique ID for each DecidablesElement
4279
+ // This is needed because Edge/IE11 don't have real Shadow DOM, so IDs leak
4280
+ // out of elements and collide if there is more than one of an element on a
4281
+ // page. Known issue for checkbox/switches and the id/for pattern on <input>
4282
+ // and <label>
4283
+ function get() {
4284
+ DecidablesElement.ID += 1;
4285
+ return DecidablesElement.ID;
4286
+ }
4287
+ }, {
4288
+ key: "greys",
4289
+ get: function get() {
4290
+ var grey = '#999999';
4291
+ var greys = {};
4292
+ greys.white = '#ffffff';
4293
+ greys.light75 = interpolateRgb(grey, '#ffffff')(0.75);
4294
+ greys.light50 = interpolateRgb(grey, '#ffffff')(0.5);
4295
+ greys.light25 = interpolateRgb(grey, '#ffffff')(0.25);
4296
+ greys.grey = grey;
4297
+ greys.dark25 = interpolateRgb(grey, '#000000')(0.25);
4298
+ greys.dark50 = interpolateRgb(grey, '#000000')(0.5);
4299
+ greys.dark75 = interpolateRgb(grey, '#000000')(0.75);
4300
+ greys.black = '#000000';
4301
+ return greys;
4302
+ }
4303
+ }, {
4304
+ key: "shadows",
4305
+ get: function get() {
4306
+ // Material Design elevation styles
4307
+ // References:
4308
+ // https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
4309
+ // https://codepen.io/hanger/pen/yOGvQp
4310
+
4311
+ /* eslint-disable key-spacing, object-curly-newline */
4312
+ return {
4313
+ elevations: [0, 2, 4, 8, 16],
4314
+ baselineColor: '#000000',
4315
+ baselineColorString: '0, 0, 0',
4316
+ inverseBaselineColor: '#FFFFFF',
4317
+ inverseBaselineColorString: '255, 255, 255',
4318
+ opacityUmbra: 0.2,
4319
+ opacityPenumbra: 0.14,
4320
+ opacityAmbient: 0.12,
4321
+ opacityBoost: 0.2,
4322
+ mapUmbra: {
4323
+ // $mdc-elevation-umbra-map
4324
+ 0: {
4325
+ x: 0,
4326
+ y: 0,
4327
+ b: 0,
4328
+ s: 0
4329
+ },
4330
+ // offset-x, offset-y, blur-radius, spread-radius
4331
+ 2: {
4332
+ x: 0,
4333
+ y: 3,
4334
+ b: 1,
4335
+ s: -2
4336
+ },
4337
+ 4: {
4338
+ x: 0,
4339
+ y: 2,
4340
+ b: 4,
4341
+ s: -1
4342
+ },
4343
+ 8: {
4344
+ x: 0,
4345
+ y: 5,
4346
+ b: 5,
4347
+ s: -3
4348
+ },
4349
+ 16: {
4350
+ x: 0,
4351
+ y: 8,
4352
+ b: 10,
4353
+ s: -5
4354
+ }
4355
+ },
4356
+ mapPenumbra: {
4357
+ // $mdc-elevation-penumbra-map
4358
+ 0: {
4359
+ x: 0,
4360
+ y: 0,
4361
+ b: 0,
4362
+ s: 0
4363
+ },
4364
+ // offset-x, offset-y, blur-radius, spread-radius
4365
+ 2: {
4366
+ x: 0,
4367
+ y: 2,
4368
+ b: 2,
4369
+ s: 0
4370
+ },
4371
+ 4: {
4372
+ x: 0,
4373
+ y: 4,
4374
+ b: 5,
4375
+ s: 0
4376
+ },
4377
+ 8: {
4378
+ x: 0,
4379
+ y: 8,
4380
+ b: 10,
4381
+ s: 1
4382
+ },
4383
+ 16: {
4384
+ x: 0,
4385
+ y: 16,
4386
+ b: 24,
4387
+ s: 2
4388
+ }
4389
+ },
4390
+ mapAmbient: {
4391
+ // $mdc-elevation-ambient-map
4392
+ 0: {
4393
+ x: 0,
4394
+ y: 0,
4395
+ b: 0,
4396
+ s: 0
4397
+ },
4398
+ // offset-x, offset-y, blur-radius, spread-radius
4399
+ 2: {
4400
+ x: 0,
4401
+ y: 1,
4402
+ b: 5,
4403
+ s: 0
4404
+ },
4405
+ 4: {
4406
+ x: 0,
4407
+ y: 1,
4408
+ b: 10,
4409
+ s: 0
4410
+ },
4411
+ 8: {
4412
+ x: 0,
4413
+ y: 3,
4414
+ b: 14,
4415
+ s: 2
4416
+ },
4417
+ 16: {
4418
+ x: 0,
4419
+ y: 6,
4420
+ b: 30,
4421
+ s: 5
4422
+ }
4423
+ }
4424
+ };
4425
+ /* eslint-enable key-spacing, object-curly-newline */
4426
+ }
4427
+ }, {
4428
+ key: "cssBoxShadow",
4429
+ value: function cssBoxShadow(elevation) {
4430
+ var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4431
+ var inverse = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
4432
+ var umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
4433
+ var penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
4434
+ var ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
4435
+ var umbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(umbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(umbraO, ")");
4436
+ var penumbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(penumbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(penumbraO, ")");
4437
+ var ambientC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(ambientO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(ambientO, ")");
4438
+ var umbraM = this.shadows.mapUmbra[elevation];
4439
+ var penumbraM = this.shadows.mapPenumbra[elevation];
4440
+ var ambientM = this.shadows.mapAmbient[elevation];
4441
+ var umbraS = rotate ? "".concat(-umbraM.y, "px ").concat(umbraM.y / 2, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px") : "".concat(umbraM.y / 2, "px ").concat(umbraM.y, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px");
4442
+ var penumbraS = rotate ? "".concat(-penumbraM.y, "px ").concat(penumbraM.y / 2, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px") : "".concat(penumbraM.y / 2, "px ").concat(penumbraM.y, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px");
4443
+ var ambientS = rotate ? "".concat(-ambientM.y, "px ").concat(ambientM.y / 2, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px") : "".concat(ambientM.y / 2, "px ").concat(ambientM.y, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px");
4444
+ return "".concat(umbraS, " ").concat(umbraC, ", ").concat(penumbraS, " ").concat(penumbraC, ", ").concat(ambientS, " ").concat(ambientC);
4445
+ }
4446
+ }, {
4447
+ key: "svgFilters",
4448
+ get: function get() {
4449
+ var shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
4450
+
4451
+ var erodeRadius = 1;
4452
+ var filters = shadows.elevations.map(function (z) {
4453
+ return y(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n <filter id=", " x=\"-250%\" y=\"-250%\" width=\"600%\" height=\"600%\">\n <feComponentTransfer in=\"SourceAlpha\" result=\"solid\">\n <feFuncA type=\"table\" tableValues=\"0 1 1\"/>\n </feComponentTransfer>\n <feOffset in=\"solid\" result=\"offU\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offP\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offA\" dx=", " dy=", " />\n ", "\n ", "\n ", "\n <feGaussianBlur in=", " result=\"blurU\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurP\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurA\" stdDeviation=", " />\n <feFlood in=\"SourceGraphic\" result=\"opU\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opP\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opA\" flood-color=", " flood-opacity=", " />\n <feComposite in=\"opU\" in2=\"blurU\" result=\"shU\" operator=\"in\" />\n <feComposite in=\"opP\" in2=\"blurP\" result=\"shP\" operator=\"in\" />\n <feComposite in=\"opA\" in2=\"blurA\" result=\"shA\" operator=\"in\" />\n <!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the \"radius\" value! -->\n <feMorphology in=\"solid\" result=\"smaller\" operator=\"erode\" radius=", " />\n <feComposite in=\"shU\" in2=\"smaller\" result=\"finalU\" operator=\"out\" />\n <feComposite in=\"shP\" in2=\"smaller\" result=\"finalP\" operator=\"out\" />\n <feComposite in=\"shA\" in2=\"smaller\" result=\"finalA\" operator=\"out\" />\n <feMerge>\n <feMergeNode in=\"finalU\" />\n <feMergeNode in=\"finalP\" />\n <feMergeNode in=\"finalA\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>"])), "shadow-".concat(z), shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral([""]))) : y(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["<feMorphology in=\"offU\" result=\"spreadU\" operator=", " radius=", " />"])), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""]))) : y(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["<feMorphology in=\"offP\" result=\"spreadP\" operator=", " radius=", " />"])), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))) : y(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["<feMorphology in=\"offA\" result=\"spreadA\" operator=", " radius=", " />"])), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost, erodeRadius);
4454
+ });
4455
+ return y(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n <svg class=\"defs\">\n <defs>\n ", "\n </defs>\n </svg>\n "])), filters);
4456
+ }
4457
+ }, {
4458
+ key: "styles",
4459
+ get: function get() {
4460
+ return r$2(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n :host {\n ---shadow-0: var(--shadow-0, ", ");\n ---shadow-2: var(--shadow-2, ", ");\n ---shadow-4: var(--shadow-4, ", ");\n ---shadow-8: var(--shadow-8, ", ");\n\n ---color-background: var(--color-background, ", ");\n ---color-border: var(--color-border, ", ");\n ---color-text: var(--color-text, ", ");\n ---color-text-inverse: var(--color-text-inverse, ", ");\n ---color-link: var(--color-link, ", ");\n ---color-element-background: var(--color-element-background, ", ");\n ---color-element-disabled: var(--color-element-disabled, ", ");\n ---color-element-enabled: var(--color-element-enabled, ", ");\n ---color-element-selected: var(--color-element-selected, ", ");\n ---color-element-border: var(--color-element-border, ", ");\n ---color-element-emphasis: var(--color-element-emphasis, ", ");\n\n ---font-family-base: var(--font-family-base, \"Source Sans\", sans-serif);\n ---font-family-math: var(--font-family-math, \"Source Serif\", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n "])), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
4461
+ }
4462
+ }]);
4463
+
4464
+ return DecidablesElement;
4465
+ }(s); // Static property of DecidablesElement!
4466
+ DecidablesElement.ID = 0;
4467
+
4468
+ var _templateObject$5, _templateObject2$5;
4469
+
4470
+ var DecidablesButton = /*#__PURE__*/function (_DecidablesElement) {
4471
+ _inherits(DecidablesButton, _DecidablesElement);
4472
+
4473
+ var _super = _createSuper(DecidablesButton);
4474
+
4475
+ function DecidablesButton() {
4476
+ var _this;
4477
+
4478
+ _classCallCheck(this, DecidablesButton);
4479
+
4480
+ _this = _super.call(this); // Attributes
4481
+
4482
+ _this.disabled = false;
4483
+ return _this;
4484
+ }
4485
+
4486
+ _createClass(DecidablesButton, [{
4487
+ key: "render",
4488
+ value: function render() {
4489
+ return $(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n <button ?disabled=", ">\n <slot></slot>\n </button>\n "])), this.disabled);
4490
+ }
4491
+ }], [{
4492
+ key: "properties",
4493
+ get: function get() {
4494
+ return {
4495
+ disabled: {
4496
+ attribute: 'disabled',
4497
+ type: Boolean,
4498
+ reflect: true
4499
+ }
4500
+ };
4501
+ }
4502
+ }, {
4503
+ key: "styles",
4504
+ get: function get() {
4505
+ return [_get(_getPrototypeOf(DecidablesButton), "styles", this), r$2(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
4506
+ }
4507
+ }]);
4508
+
4509
+ return DecidablesButton;
4510
+ }(DecidablesElement);
4511
+ customElements.define('decidables-button', DecidablesButton);
4512
+
4513
+ /**
4514
+ * @license
4515
+ * Copyright 2018 Google LLC
4516
+ * SPDX-License-Identifier: BSD-3-Clause
4517
+ */
4518
+
4519
+ var l = function l(_l) {
4520
+ return null != _l ? _l : w;
4521
+ };
4522
+
4523
+ var _templateObject$4, _templateObject2$4;
4524
+
4525
+ var DecidablesSlider = /*#__PURE__*/function (_DecidablesElement) {
4526
+ _inherits(DecidablesSlider, _DecidablesElement);
4527
+
4528
+ var _super = _createSuper(DecidablesSlider);
4529
+
4530
+ function DecidablesSlider() {
4531
+ var _this;
4532
+
4533
+ _classCallCheck(this, DecidablesSlider);
4534
+
4535
+ _this = _super.call(this); // Attributes
4536
+
4537
+ _this.disabled = false;
4538
+ _this.max = undefined;
4539
+ _this.min = undefined;
4540
+ _this.step = undefined;
4541
+ _this.value = undefined;
4542
+ return _this;
4543
+ }
4544
+
4545
+ _createClass(DecidablesSlider, [{
4546
+ key: "changed",
4547
+ value: function changed(event) {
4548
+ this.value = event.target.value;
4549
+ this.dispatchEvent(new CustomEvent('change', {
4550
+ detail: {
4551
+ value: this.value
4552
+ },
4553
+ bubbles: true
4554
+ }));
4555
+ }
4556
+ }, {
4557
+ key: "inputted",
4558
+ value: function inputted(event) {
4559
+ this.value = event.target.value;
4560
+ }
4561
+ }, {
4562
+ key: "render",
4563
+ value: function render() {
4564
+ return $(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n <label for=", ">\n <slot></slot>\n </label>\n <div class=\"range\">\n <input type=\"range\" id=", " min=", " max=", " step=", " .value=", " @change=", " @input=", ">\n </div>\n <decidables-spinner min=", " max=", " step=", " .value=", " @input=", "></decidables-spinner>\n "])), "".concat(this.uniqueId, "-slider"), "".concat(this.uniqueId, "-slider"), l(this.min), l(this.max), l(this.step), this.value, this.changed.bind(this), this.inputted.bind(this), l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4565
+ }
4566
+ }], [{
4567
+ key: "properties",
4568
+ get: function get() {
4569
+ return {
4570
+ disabled: {
4571
+ attribute: 'disabled',
4572
+ type: Boolean,
4573
+ reflect: true
4574
+ },
4575
+ max: {
4576
+ attribute: 'max',
4577
+ type: Number,
4578
+ reflect: true
4579
+ },
4580
+ min: {
4581
+ attribute: 'min',
4582
+ type: Number,
4583
+ reflect: true
4584
+ },
4585
+ step: {
4586
+ attribute: 'step',
4587
+ type: Number,
4588
+ reflect: true
4589
+ },
4590
+ value: {
4591
+ attribute: 'value',
4592
+ type: Number,
4593
+ reflect: true
4594
+ }
4595
+ };
4596
+ }
4597
+ }, {
4598
+ key: "styles",
4599
+ get: function get() {
4600
+ return [_get(_getPrototypeOf(DecidablesSlider), "styles", this), r$2(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n :host {\n ---shadow-2-rotate: var(--shadow-2-rotate, ", ");\n ---shadow-4-rotate: var(--shadow-4-rotate, ", ");\n ---shadow-8-rotate: var(--shadow-8-rotate, ", ");\n\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n label {\n margin: 0.25rem 0.25rem 0;\n }\n\n .range {\n display: inline-block;\n\n width: 3.5rem;\n height: 4.75rem;\n margin: 0 0.25rem 0.25rem;\n }\n\n decidables-spinner {\n --decidables-spinner-input-width: 3.5rem;\n\n margin: 0 0.25rem 0.25rem;\n }\n\n /* Adapted from http://danielstern.ca/range.css/#/ */\n /* Overall */\n input[type=range] {\n width: 4.75rem;\n height: 3.5rem;\n padding: 0;\n margin: 0;\n\n background-color: unset;\n\n transform: rotate(-90deg);\n transform-origin: 2.375rem 2.375rem;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:enabled {\n cursor: ns-resize;\n }\n\n input[type=range]:focus {\n outline: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-tooltip {\n display: none;\n }\n\n /* Track */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n input[type=range]:focus::-webkit-slider-runnable-track {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-track {\n width: 100%;\n height: 4px;\n\n color: transparent;\n\n background: transparent;\n border-color: transparent;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-lower {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-upper {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-lower {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-upper {\n background: var(---color-element-disabled);\n }\n\n /* Thumb */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-thumb {\n width: 10px;\n height: 20px;\n margin-top: -8px;\n\n border: 0;\n border-radius: 4px;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:disabled::-webkit-slider-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=range]:enabled::-webkit-slider-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n input[type=range]:enabled:hover::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n input[type=range]:enabled:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-thumb {\n width: 10px;\n height: 20px;\n\n border: 0;\n border-radius: 4px;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-moz-range-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-moz-range-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-thumb {\n width: 10px;\n height: 20px;\n margin-top: 0;\n\n background: #999999;\n /* background: var(---color-element-enabled); */\n border: 0;\n border-radius: 4px;\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-ms-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-ms-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n "])), o$3(this.cssBoxShadow(2, true, false)), o$3(this.cssBoxShadow(4, true, false)), o$3(this.cssBoxShadow(8, true, false)))];
4601
+ }
4602
+ }]);
4603
+
4604
+ return DecidablesSlider;
4605
+ }(DecidablesElement);
4606
+ customElements.define('decidables-slider', DecidablesSlider);
4607
+
4608
+ var _templateObject$3, _templateObject2$3;
4609
+
4610
+ var DecidablesSpinner = /*#__PURE__*/function (_DecidablesElement) {
4611
+ _inherits(DecidablesSpinner, _DecidablesElement);
4612
+
4613
+ var _super = _createSuper(DecidablesSpinner);
4614
+
4615
+ function DecidablesSpinner() {
4616
+ var _this;
4617
+
4618
+ _classCallCheck(this, DecidablesSpinner);
4619
+
4620
+ _this = _super.call(this); // Attributes
4621
+
4622
+ _this.disabled = false;
4623
+ _this.max = undefined;
4624
+ _this.min = undefined;
4625
+ _this.step = undefined;
4626
+ _this.value = undefined;
4627
+ return _this;
4628
+ }
4629
+
4630
+ _createClass(DecidablesSpinner, [{
4631
+ key: "inputted",
4632
+ value: function inputted(event) {
4633
+ this.value = event.target.value;
4634
+ }
4635
+ }, {
4636
+ key: "render",
4637
+ value: function render() {
4638
+ return $(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n <label>\n <slot></slot>\n <input ?disabled=", " type=\"number\" min=", " max=", " step=", " .value=", " @input=", ">\n </label>\n "])), this.disabled, l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4639
+ }
4640
+ }], [{
4641
+ key: "properties",
4642
+ get: function get() {
4643
+ return {
4644
+ disabled: {
4645
+ attribute: 'disabled',
4646
+ type: Boolean,
4647
+ reflect: true
4648
+ },
4649
+ max: {
4650
+ attribute: 'max',
4651
+ type: Number,
4652
+ reflect: true
4653
+ },
4654
+ min: {
4655
+ attribute: 'min',
4656
+ type: Number,
4657
+ reflect: true
4658
+ },
4659
+ step: {
4660
+ attribute: 'step',
4661
+ type: Number,
4662
+ reflect: true
4663
+ },
4664
+ value: {
4665
+ attribute: 'value',
4666
+ type: Number,
4667
+ reflect: true
4668
+ }
4669
+ };
4670
+ }
4671
+ }, {
4672
+ key: "styles",
4673
+ get: function get() {
4674
+ return [_get(_getPrototypeOf(DecidablesSpinner), "styles", this), r$2(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n :host {\n ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);\n ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);\n ---decidables-spinner-prefix: var(--decidables-spinner-prefix, \"\");\n\n display: block;\n }\n\n label {\n position: relative;\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n\n margin: 0;\n\n font-size: 0.75rem;\n }\n\n label::before {\n position: absolute;\n bottom: 1px;\n left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);\n\n font-size: var(---decidables-spinner-font-size);\n line-height: normal;\n\n content: var(---decidables-spinner-prefix);\n }\n\n input[type=number] {\n width: var(---decidables-spinner-input-width);\n\n font-family: var(---font-family-base);\n font-size: var(---decidables-spinner-font-size);\n color: inherit;\n text-align: right;\n\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n box-shadow: var(---shadow-2);\n\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n\n input[type=number]:hover {\n box-shadow: var(---shadow-4);\n }\n\n input[type=number]:focus,\n input[type=number]:active {\n box-shadow: var(---shadow-8);\n }\n\n input[type=number]:disabled {\n color: var(---color-text);\n\n border: 0;\n box-shadow: none;\n\n /* HACK: Use correct text color in Safari */\n -webkit-opacity: 1;\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */\n /* HACK: Use correct text color in Safari */\n -webkit-text-fill-color: var(---color-text);\n }\n\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n input[type=number]:disabled::-webkit-outer-spin-button,\n input[type=number]:disabled::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n "])))];
4675
+ }
4676
+ }]);
4677
+
4678
+ return DecidablesSpinner;
4679
+ }(DecidablesElement);
4680
+ customElements.define('decidables-spinner', DecidablesSpinner);
4681
+
4682
+ var _templateObject$2, _templateObject2$2;
4683
+
4684
+ var DecidablesSwitch = /*#__PURE__*/function (_DecidablesElement) {
4685
+ _inherits(DecidablesSwitch, _DecidablesElement);
4686
+
4687
+ var _super = _createSuper(DecidablesSwitch);
4688
+
4689
+ function DecidablesSwitch() {
4690
+ var _this;
4691
+
4692
+ _classCallCheck(this, DecidablesSwitch);
4693
+
4694
+ _this = _super.call(this); // Attributes
4695
+
4696
+ _this.checked = false;
4697
+ _this.disabled = false;
4698
+ return _this;
4699
+ }
4700
+
4701
+ _createClass(DecidablesSwitch, [{
4702
+ key: "changed",
4703
+ value: function changed(event) {
4704
+ this.checked = event.target.checked;
4705
+ this.dispatchEvent(new CustomEvent('change', {
4706
+ detail: {
4707
+ checked: this.checked
4708
+ },
4709
+ bubbles: true
4710
+ }));
4711
+ }
4712
+ }, {
4713
+ key: "render",
4714
+ value: function render() {
4715
+ return $(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n <input type=\"checkbox\" id=", " ?checked=", " ?disabled=", " @change=", ">\n <label for=", ">\n <slot name=\"off-label\"></slot>\n </label>\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-checkbox"), this.checked, this.disabled, this.changed.bind(this), "".concat(this.uniqueId, "-checkbox"), "".concat(this.uniqueId, "-checkbox"));
4716
+ }
4717
+ }], [{
4718
+ key: "properties",
4719
+ get: function get() {
4720
+ return {
4721
+ checked: {
4722
+ attribute: 'checked',
4723
+ type: Boolean,
4724
+ reflect: true
4725
+ },
4726
+ disabled: {
4727
+ attribute: 'disabled',
4728
+ type: Boolean,
4729
+ reflect: true
4730
+ }
4731
+ };
4732
+ }
4733
+ }, {
4734
+ key: "styles",
4735
+ get: function get() {
4736
+ return [_get(_getPrototypeOf(DecidablesSwitch), "styles", this), r$2(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n /* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */\n input[type=checkbox] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=checkbox] + label {\n order: 1;\n\n margin: 0 0.25rem 0.25rem;\n\n font-weight: 400;\n }\n\n input[type=checkbox] + label + label {\n position: relative;\n\n min-width: 24px;\n padding: 0 0 36px;\n margin: 0.25rem 0.25rem 0;\n\n font-weight: 400;\n\n outline: none;\n }\n\n input[type=checkbox] + label + label::before,\n input[type=checkbox] + label + label::after {\n position: absolute;\n\n left: 50%;\n\n margin: 0;\n\n content: \"\";\n\n outline: 0;\n\n transition: all var(---transition-duration) ease;\n transform: translate(-50%, 0);\n }\n\n input[type=checkbox] + label + label::before {\n bottom: 1px;\n\n width: 8px;\n height: 34px;\n\n background-color: var(---color-element-disabled);\n border-radius: 4px;\n }\n\n input[type=checkbox] + label + label::after {\n bottom: 0;\n\n width: 18px;\n height: 18px;\n\n background-color: var(---color-element-enabled);\n border-radius: 50%;\n box-shadow: var(---shadow-2);\n }\n\n input[type=checkbox]:checked + label + label::after {\n transform: translate(-50%, -100%);\n }\n\n input[type=checkbox]:disabled + label + label::after {\n background-color: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=checkbox]:enabled + label,\n input[type=checkbox]:enabled + label + label {\n cursor: pointer;\n }\n\n input[type=checkbox]:enabled + label:hover + label::after,\n input[type=checkbox]:enabled + label + label:hover::after {\n box-shadow: var(---shadow-4);\n }\n\n input[type=checkbox]:enabled + label:active + label::after,\n input[type=checkbox]:enabled + label + label:active::after {\n box-shadow: var(---shadow-8);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {\n box-shadow: var(---shadow-4);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,\n :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {\n box-shadow: var(---shadow-8);\n }\n "])))];
4737
+ }
4738
+ }]);
4739
+
4740
+ return DecidablesSwitch;
4741
+ }(DecidablesElement);
4742
+ customElements.define('decidables-switch', DecidablesSwitch);
4743
+
4744
+ var _templateObject$1, _templateObject2$1;
4745
+
4746
+ var DecidablesToggle = /*#__PURE__*/function (_DecidablesElement) {
4747
+ _inherits(DecidablesToggle, _DecidablesElement);
4748
+
4749
+ var _super = _createSuper(DecidablesToggle);
4750
+
4751
+ function DecidablesToggle() {
4752
+ var _this;
4753
+
4754
+ _classCallCheck(this, DecidablesToggle);
4755
+
4756
+ _this = _super.call(this); // Attributes
4757
+
4758
+ _this.disabled = false;
4759
+ return _this;
4760
+ }
4761
+
4762
+ _createClass(DecidablesToggle, [{
4763
+ key: "render",
4764
+ value: function render() {
4765
+ return $(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n <fieldset ?disabled=", ">\n <legend><slot name=\"label\"></slot></legend>\n <slot></slot>\n </fieldset>\n "])), this.disabled);
4766
+ }
4767
+ }], [{
4768
+ key: "properties",
4769
+ get: function get() {
4770
+ return {
4771
+ disabled: {
4772
+ attribute: 'disabled',
4773
+ type: Boolean,
4774
+ reflect: true
4775
+ }
4776
+ };
4777
+ }
4778
+ }, {
4779
+ key: "styles",
4780
+ get: function get() {
4781
+ return [_get(_getPrototypeOf(DecidablesToggle), "styles", this), r$2(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n fieldset {\n display: flex;\n\n flex-direction: column;\n\n align-items: stretch;\n justify-content: center;\n\n margin: 0.25rem;\n\n border: 0;\n }\n\n legend {\n text-align: center;\n }\n "])))];
4782
+ }
4783
+ }]);
4784
+
4785
+ return DecidablesToggle;
4786
+ }(DecidablesElement);
4787
+ customElements.define('decidables-toggle', DecidablesToggle);
4788
+
4789
+ var _templateObject, _templateObject2;
4790
+
4791
+ var DecidablesToggleOption = /*#__PURE__*/function (_DecidablesElement) {
4792
+ _inherits(DecidablesToggleOption, _DecidablesElement);
4793
+
4794
+ var _super = _createSuper(DecidablesToggleOption);
4795
+
4796
+ function DecidablesToggleOption() {
4797
+ var _this;
4798
+
4799
+ _classCallCheck(this, DecidablesToggleOption);
4800
+
4801
+ _this = _super.call(this); // Attributes
4802
+
4803
+ _this.checked = false;
4804
+ _this.disabled = false;
4805
+ _this.name = undefined;
4806
+ _this.value = undefined;
4807
+ return _this;
4808
+ }
4809
+
4810
+ _createClass(DecidablesToggleOption, [{
4811
+ key: "changed",
4812
+ value: function changed(event) {
4813
+ this.checked = event.target.checked;
4814
+ this.dispatchEvent(new CustomEvent('change', {
4815
+ detail: {
4816
+ checked: this.checked,
4817
+ value: this.value
4818
+ },
4819
+ bubbles: true
4820
+ }));
4821
+ }
4822
+ }, {
4823
+ key: "render",
4824
+ value: function render() {
4825
+ return $(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <input type=\"radio\" id=", " name=", " value=", " .checked=", " @change=", ">\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-radio"), this.name, this.value, this.checked, this.changed.bind(this), "".concat(this.uniqueId, "-radio"));
4826
+ }
4827
+ }], [{
4828
+ key: "properties",
4829
+ get: function get() {
4830
+ return {
4831
+ checked: {
4832
+ attribute: 'checked',
4833
+ type: Boolean,
4834
+ reflect: true
4835
+ },
4836
+ disabled: {
4837
+ attribute: 'disabled',
4838
+ type: Boolean,
4839
+ reflect: true
4840
+ },
4841
+ name: {
4842
+ attribute: 'name',
4843
+ type: String,
4844
+ reflect: true
4845
+ },
4846
+ value: {
4847
+ attribute: 'value',
4848
+ type: String,
4849
+ reflect: true
4850
+ }
4851
+ };
4852
+ }
4853
+ }, {
4854
+ key: "styles",
4855
+ get: function get() {
4856
+ return [_get(_getPrototypeOf(DecidablesToggleOption), "styles", this), r$2(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n }\n\n input[type=radio] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=radio] + label {\n width: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n text-align: center;\n\n cursor: pointer;\n\n background-color: var(---color-element-enabled);\n border: 0;\n border-radius: 0;\n outline: none;\n\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio]:checked + label {\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio] + label:hover {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n input[type=radio] + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(:first-of-type) input[type=radio] + label {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n }\n\n :host(:last-of-type) input[type=radio] + label {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n }\n\n :host(.keyboard) input[type=radio]:focus + label {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus:checked + label {\n z-index: 1;\n\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
4857
+ }
4858
+ }]);
4859
+
4860
+ return DecidablesToggleOption;
4861
+ }(DecidablesElement);
4862
+ customElements.define('decidables-toggle-option', DecidablesToggleOption);
4863
+
4864
+ /*
4865
+ Attribute: Space-separated sequence of numbers
4866
+ Property: Array of numbers
4867
+ */
4868
+ var DecidablesConverterArray = {
4869
+ fromAttribute: function fromAttribute(value) {
4870
+ return value.split(/\s+/).map(function (item) {
4871
+ return Number.parseFloat(item);
4872
+ });
4873
+ },
4874
+ toAttribute: function toAttribute(value) {
4875
+ return value.length ? value.map(function (item) {
4876
+ return item.toFixed(3);
4877
+ }).join(' ') : null;
4878
+ }
4879
+ };
4880
+
4881
+ /*
4882
+ Attribute: Space-separated sequence of strings
4883
+ Property: Set of strings
4884
+ */
4885
+ var DecidablesConverterSet = {
4886
+ fromAttribute: function fromAttribute(value) {
4887
+ return new Set(value.split(/\s+/));
4888
+ },
4889
+ toAttribute: function toAttribute(value) {
4890
+ return value.size ? _toConsumableArray(value).join(' ') : null;
4891
+ }
4892
+ };
4893
+
4894
+ exports.DecidablesButton = DecidablesButton;
4895
+ exports.DecidablesConverterArray = DecidablesConverterArray;
4896
+ exports.DecidablesConverterSet = DecidablesConverterSet;
4897
+ exports.DecidablesElement = DecidablesElement;
4898
+ exports.DecidablesSlider = DecidablesSlider;
4899
+ exports.DecidablesSpinner = DecidablesSpinner;
4900
+ exports.DecidablesSwitch = DecidablesSwitch;
4901
+ exports.DecidablesToggle = DecidablesToggle;
4902
+ exports.DecidablesToggleOption = DecidablesToggleOption;
4903
+
4904
+ Object.defineProperty(exports, '__esModule', { value: true });
4905
+
4906
+ }));
4907
+ //# sourceMappingURL=decidablesElements.umd.js.map