@decidables/prospectable-elements 0.5.1 → 0.5.2

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.
@@ -113,7 +113,7 @@
113
113
  hasChanged: f$3
114
114
  };
115
115
  Symbol.metadata ??= Symbol("metadata"), a$3.litPropertyMetadata ??= new WeakMap();
116
- let y$3 = class y extends HTMLElement {
116
+ let y$2 = class y extends HTMLElement {
117
117
  static addInitializer(t) {
118
118
  this._$Ei(), (this.l ??= []).push(t);
119
119
  }
@@ -317,10 +317,10 @@
317
317
  updated(t) {}
318
318
  firstUpdated(t) {}
319
319
  };
320
- y$3.elementStyles = [], y$3.shadowRootOptions = {
320
+ y$2.elementStyles = [], y$2.shadowRootOptions = {
321
321
  mode: "open"
322
- }, y$3[d$2("elementProperties")] = new Map(), y$3[d$2("finalized")] = new Map(), p$1?.({
323
- ReactiveElement: y$3
322
+ }, y$2[d$2("elementProperties")] = new Map(), y$2[d$2("finalized")] = new Map(), p$1?.({
323
+ ReactiveElement: y$2
324
324
  }), (a$3.reactiveElementVersions ??= []).push("2.1.1");
325
325
 
326
326
  /**
@@ -350,13 +350,13 @@
350
350
  p = /'/g,
351
351
  g$1 = /"/g,
352
352
  $ = /^(?:script|style|textarea|title)$/i,
353
- y$2 = t => (i, ...s) => ({
353
+ y$1 = t => (i, ...s) => ({
354
354
  _$litType$: t,
355
355
  strings: i,
356
356
  values: s
357
357
  }),
358
- x$3 = y$2(1),
359
- b$1 = y$2(2),
358
+ x$2 = y$1(1),
359
+ b$1 = y$1(2),
360
360
  T = Symbol.for("lit-noChange"),
361
361
  E$1 = Symbol.for("lit-nothing"),
362
362
  A$2 = new WeakMap(),
@@ -478,7 +478,7 @@
478
478
  for (; void 0 !== l;) {
479
479
  if (o === l.index) {
480
480
  let i;
481
- 2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z$1(h, this, t)), this._$AV.push(i), l = s[++n];
481
+ 2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
482
482
  }
483
483
  o !== l?.index && (h = C$1.nextNode(), o++);
484
484
  }
@@ -608,7 +608,7 @@
608
608
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
609
609
  }
610
610
  }
611
- let z$1 = class z {
611
+ class z {
612
612
  constructor(t, i, s) {
613
613
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
614
614
  }
@@ -618,7 +618,7 @@
618
618
  _$AI(t) {
619
619
  S(this, t);
620
620
  }
621
- };
621
+ }
622
622
  const j$1 = t$1.litHtmlPolyfillSupport;
623
623
  j$1?.(N$1, R), (t$1.litHtmlVersions ??= []).push("3.3.1");
624
624
  const B$1 = (t, i, s) => {
@@ -637,7 +637,7 @@
637
637
  * SPDX-License-Identifier: BSD-3-Clause
638
638
  */
639
639
  const s$2 = globalThis;
640
- let i$2 = class i extends y$3 {
640
+ let i$2 = class i extends y$2 {
641
641
  constructor() {
642
642
  super(...arguments), this.renderOptions = {
643
643
  host: this
@@ -1022,7 +1022,7 @@
1022
1022
  return Array.from(keys, key => source[key]);
1023
1023
  }
1024
1024
 
1025
- function sort$2(values, ...F) {
1025
+ function sort$1(values, ...F) {
1026
1026
  if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
1027
1027
  values = Array.from(values);
1028
1028
  let [f] = F;
@@ -1058,7 +1058,7 @@
1058
1058
  }
1059
1059
 
1060
1060
  function groupSort(values, reduce, key) {
1061
- return (reduce.length !== 2 ? sort$2(rollup(values, reduce, key), ([ak, av], [bk, bv]) => ascending$1(av, bv) || ascending$1(ak, bk)) : sort$2(group(values, key), ([ak, av], [bk, bv]) => reduce(av, bv) || ascending$1(ak, bk))).map(([key]) => key);
1061
+ return (reduce.length !== 2 ? sort$1(rollup(values, reduce, key), ([ak, av], [bk, bv]) => ascending$1(av, bv) || ascending$1(ak, bk)) : sort$1(group(values, key), ([ak, av], [bk, bv]) => reduce(av, bv) || ascending$1(ak, bk))).map(([key]) => key);
1062
1062
  }
1063
1063
 
1064
1064
  const e10 = Math.sqrt(50),
@@ -7246,7 +7246,7 @@
7246
7246
  };
7247
7247
  return scale;
7248
7248
  }
7249
- function point$5() {
7249
+ function point$4() {
7250
7250
  return pointish(band.apply(null, arguments).paddingInner(1));
7251
7251
  }
7252
7252
 
@@ -9252,21 +9252,21 @@
9252
9252
  return new Linear(context);
9253
9253
  }
9254
9254
 
9255
- function x$2(p) {
9255
+ function x$1(p) {
9256
9256
  return p[0];
9257
9257
  }
9258
- function y$1(p) {
9258
+ function y(p) {
9259
9259
  return p[1];
9260
9260
  }
9261
9261
 
9262
- function shapeLine (x, y) {
9262
+ function shapeLine (x, y$1) {
9263
9263
  var defined = constant$1(true),
9264
9264
  context = null,
9265
9265
  curve = curveLinear,
9266
9266
  output = null,
9267
9267
  path = withPath(line);
9268
- x = typeof x === "function" ? x : x === undefined ? x$2 : constant$1(x);
9269
- y = typeof y === "function" ? y : y === undefined ? y$1 : constant$1(y);
9268
+ x = typeof x === "function" ? x : x === undefined ? x$1 : constant$1(x);
9269
+ y$1 = typeof y$1 === "function" ? y$1 : y$1 === undefined ? y : constant$1(y$1);
9270
9270
  function line(data) {
9271
9271
  var i,
9272
9272
  n = (data = array(data)).length,
@@ -9278,7 +9278,7 @@
9278
9278
  if (!(i < n && defined(d = data[i], i, data)) === defined0) {
9279
9279
  if (defined0 = !defined0) output.lineStart();else output.lineEnd();
9280
9280
  }
9281
- if (defined0) output.point(+x(d, i, data), +y(d, i, data));
9281
+ if (defined0) output.point(+x(d, i, data), +y$1(d, i, data));
9282
9282
  }
9283
9283
  if (buffer) return output = null, buffer + "" || null;
9284
9284
  }
@@ -9286,7 +9286,7 @@
9286
9286
  return arguments.length ? (x = typeof _ === "function" ? _ : constant$1(+_), line) : x;
9287
9287
  };
9288
9288
  line.y = function (_) {
9289
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$1(+_), line) : y;
9289
+ return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant$1(+_), line) : y$1;
9290
9290
  };
9291
9291
  line.defined = function (_) {
9292
9292
  return arguments.length ? (defined = typeof _ === "function" ? _ : constant$1(!!_), line) : defined;
@@ -9608,7 +9608,7 @@
9608
9608
 
9609
9609
  function noop () {}
9610
9610
 
9611
- function point$4(that, x, y) {
9611
+ function point$3(that, x, y) {
9612
9612
  that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
9613
9613
  }
9614
9614
  function Basis(context) {
@@ -9628,7 +9628,7 @@
9628
9628
  lineEnd: function () {
9629
9629
  switch (this._point) {
9630
9630
  case 3:
9631
- point$4(this, this._x1, this._y1);
9631
+ point$3(this, this._x1, this._y1);
9632
9632
  // falls through
9633
9633
  case 2:
9634
9634
  this._context.lineTo(this._x1, this._y1);
@@ -9652,7 +9652,7 @@
9652
9652
  this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
9653
9653
  // falls through
9654
9654
  default:
9655
- point$4(this, x, y);
9655
+ point$3(this, x, y);
9656
9656
  break;
9657
9657
  }
9658
9658
  this._x0 = this._x1, this._x1 = x;
@@ -9714,7 +9714,7 @@
9714
9714
  this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
9715
9715
  break;
9716
9716
  default:
9717
- point$4(this, x, y);
9717
+ point$3(this, x, y);
9718
9718
  break;
9719
9719
  }
9720
9720
  this._x0 = this._x1, this._x1 = x;
@@ -9762,7 +9762,7 @@
9762
9762
  this._point = 4;
9763
9763
  // falls through
9764
9764
  default:
9765
- point$4(this, x, y);
9765
+ point$3(this, x, y);
9766
9766
  break;
9767
9767
  }
9768
9768
  this._x0 = this._x1, this._x1 = x;
@@ -9817,7 +9817,7 @@
9817
9817
  return bundle;
9818
9818
  })(0.85);
9819
9819
 
9820
- function point$3(that, x, y) {
9820
+ function point$2(that, x, y) {
9821
9821
  that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
9822
9822
  }
9823
9823
  function Cardinal(context, tension) {
@@ -9841,7 +9841,7 @@
9841
9841
  this._context.lineTo(this._x2, this._y2);
9842
9842
  break;
9843
9843
  case 3:
9844
- point$3(this, this._x1, this._y1);
9844
+ point$2(this, this._x1, this._y1);
9845
9845
  break;
9846
9846
  }
9847
9847
  if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
@@ -9862,7 +9862,7 @@
9862
9862
  this._point = 3;
9863
9863
  // falls through
9864
9864
  default:
9865
- point$3(this, x, y);
9865
+ point$2(this, x, y);
9866
9866
  break;
9867
9867
  }
9868
9868
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
@@ -9929,7 +9929,7 @@
9929
9929
  this._x5 = x, this._y5 = y;
9930
9930
  break;
9931
9931
  default:
9932
- point$3(this, x, y);
9932
+ point$2(this, x, y);
9933
9933
  break;
9934
9934
  }
9935
9935
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
@@ -9982,7 +9982,7 @@
9982
9982
  this._point = 4;
9983
9983
  // falls through
9984
9984
  default:
9985
- point$3(this, x, y);
9985
+ point$2(this, x, y);
9986
9986
  break;
9987
9987
  }
9988
9988
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
@@ -9999,7 +9999,7 @@
9999
9999
  return cardinal;
10000
10000
  })(0);
10001
10001
 
10002
- function point$2(that, x, y) {
10002
+ function point$1(that, x, y) {
10003
10003
  var x1 = that._x1,
10004
10004
  y1 = that._y1,
10005
10005
  x2 = that._x2,
@@ -10064,7 +10064,7 @@
10064
10064
  this._point = 3;
10065
10065
  // falls through
10066
10066
  default:
10067
- point$2(this, x, y);
10067
+ point$1(this, x, y);
10068
10068
  break;
10069
10069
  }
10070
10070
  this._l01_a = this._l12_a, this._l12_a = this._l23_a;
@@ -10138,7 +10138,7 @@
10138
10138
  this._x5 = x, this._y5 = y;
10139
10139
  break;
10140
10140
  default:
10141
- point$2(this, x, y);
10141
+ point$1(this, x, y);
10142
10142
  break;
10143
10143
  }
10144
10144
  this._l01_a = this._l12_a, this._l12_a = this._l23_a;
@@ -10198,7 +10198,7 @@
10198
10198
  this._point = 4;
10199
10199
  // falls through
10200
10200
  default:
10201
- point$2(this, x, y);
10201
+ point$1(this, x, y);
10202
10202
  break;
10203
10203
  }
10204
10204
  this._l01_a = this._l12_a, this._l12_a = this._l23_a;
@@ -10264,7 +10264,7 @@
10264
10264
  // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
10265
10265
  // "you can express cubic Hermite interpolation in terms of cubic Bézier curves
10266
10266
  // with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
10267
- function point$1(that, t0, t1) {
10267
+ function point(that, t0, t1) {
10268
10268
  var x0 = that._x0,
10269
10269
  y0 = that._y0,
10270
10270
  x1 = that._x1,
@@ -10292,7 +10292,7 @@
10292
10292
  this._context.lineTo(this._x1, this._y1);
10293
10293
  break;
10294
10294
  case 3:
10295
- point$1(this, this._t0, slope2(this, this._t0));
10295
+ point(this, this._t0, slope2(this, this._t0));
10296
10296
  break;
10297
10297
  }
10298
10298
  if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
@@ -10312,10 +10312,10 @@
10312
10312
  break;
10313
10313
  case 2:
10314
10314
  this._point = 3;
10315
- point$1(this, slope2(this, t1 = slope3(this, x, y)), t1);
10315
+ point(this, slope2(this, t1 = slope3(this, x, y)), t1);
10316
10316
  break;
10317
10317
  default:
10318
- point$1(this, this._t0, t1 = slope3(this, x, y));
10318
+ point(this, this._t0, t1 = slope3(this, x, y));
10319
10319
  break;
10320
10320
  }
10321
10321
  this._x0 = this._x1, this._x1 = x;
@@ -10865,7 +10865,7 @@
10865
10865
  `];
10866
10866
  }
10867
10867
  render() {
10868
- return x$3`
10868
+ return x$2`
10869
10869
  <button ?disabled=${this.disabled}>
10870
10870
  <slot></slot>
10871
10871
  </button>
@@ -11259,18 +11259,18 @@
11259
11259
  `];
11260
11260
  }
11261
11261
  render() {
11262
- return x$3`
11262
+ return x$2`
11263
11263
  <label for="slider">
11264
11264
  <slot></slot>
11265
11265
  </label>
11266
11266
  <div class="range">
11267
11267
  <input ?disabled=${this.disabled} type="range" id="slider" min=${o$2(this.rangeMin)} max=${o$2(this.rangeMax)} step=${o$2(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
11268
- ${this.scale ? x$3`
11268
+ ${this.scale ? x$2`
11269
11269
  <datalist id="ticks">
11270
11270
  <option value=${o$2(this.rangeMax)} label=${o$2(this.max)}></option>
11271
11271
  <option value=${o$2(this.rangeMin)} label=${o$2(this.min)}></option>
11272
11272
  </datalist>
11273
- ` : x$3``}
11273
+ ` : x$2``}
11274
11274
  </div>
11275
11275
  <decidables-spinner ?disabled=${this.disabled} min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
11276
11276
  `;
@@ -11419,7 +11419,7 @@
11419
11419
  `];
11420
11420
  }
11421
11421
  render() {
11422
- return x$3`
11422
+ return x$2`
11423
11423
  <label>
11424
11424
  <slot></slot>
11425
11425
  <input ?disabled=${this.disabled} type="number" min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
@@ -11583,7 +11583,7 @@
11583
11583
  `];
11584
11584
  }
11585
11585
  render() {
11586
- return x$3`
11586
+ return x$2`
11587
11587
  <input type="checkbox" id="switch" ?checked=${this.checked} ?disabled=${this.disabled} @change=${this.changed.bind(this)}>
11588
11588
  <label for="switch">
11589
11589
  <slot name="off-label"></slot>
@@ -11633,7 +11633,7 @@
11633
11633
  `];
11634
11634
  }
11635
11635
  render() {
11636
- return x$3`
11636
+ return x$2`
11637
11637
  <fieldset ?disabled=${this.disabled}>
11638
11638
  <legend><slot name="label"></slot></legend>
11639
11639
  <slot></slot>
@@ -11783,7 +11783,7 @@
11783
11783
  `];
11784
11784
  }
11785
11785
  render() {
11786
- return x$3`
11786
+ return x$2`
11787
11787
  <input type="radio" id="toggle-option" name=${this.name} value=${this.value} .checked=${this.checked} @change=${this.changed.bind(this)}>
11788
11788
  <label for="toggle-option">
11789
11789
  <slot></slot>
@@ -12120,7 +12120,7 @@
12120
12120
  },
12121
12121
  b = ["left", "top", "width", "height", "opacity", "color", "background"],
12122
12122
  j = new WeakMap();
12123
- let x$1 = class x extends f {
12123
+ class x extends f {
12124
12124
  constructor(t$1) {
12125
12125
  if (super(t$1), this.t = false, this.i = null, this.o = null, this.h = true, this.shouldLog = false, t$1.type === t.CHILD) throw Error("The `animate` directive must be used in attribute position.");
12126
12126
  this.createFinished();
@@ -12144,9 +12144,9 @@
12144
12144
  }
12145
12145
  update(t, [i]) {
12146
12146
  const s = void 0 === this.u;
12147
- return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.p(i), this.render(i);
12147
+ return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.m(i), this.render(i);
12148
12148
  }
12149
- p(t) {
12149
+ m(t) {
12150
12150
  t = t ?? {};
12151
12151
  const i = this.getController();
12152
12152
  void 0 !== i && ((t = {
@@ -12157,7 +12157,7 @@
12157
12157
  ...t.keyframeOptions
12158
12158
  }), t.properties ??= b, this.options = t;
12159
12159
  }
12160
- m() {
12160
+ p() {
12161
12161
  const t = {},
12162
12162
  i = this.element.getBoundingClientRect(),
12163
12163
  s = getComputedStyle(this.element);
@@ -12178,20 +12178,20 @@
12178
12178
  })(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && i && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
12179
12179
  }
12180
12180
  hostUpdate() {
12181
- "function" == typeof this.optionsOrCallback && this.p(this.optionsOrCallback()), this.v() && (this.A = this.m(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
12181
+ "function" == typeof this.optionsOrCallback && this.m(this.optionsOrCallback()), this.v() && (this.A = this.p(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
12182
12182
  }
12183
12183
  async hostUpdated() {
12184
12184
  if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered) return;
12185
12185
  let t;
12186
12186
  this.prepare(), await a;
12187
- const i = this.O(),
12188
- s = this.j(this.options.keyframeOptions, i),
12189
- e = this.m();
12187
+ const i = this.P(),
12188
+ s = this.V(this.options.keyframeOptions, i),
12189
+ e = this.p();
12190
12190
  if (void 0 !== this.A) {
12191
12191
  const {
12192
12192
  from: s,
12193
12193
  to: h
12194
- } = this.N(this.A, e, i);
12194
+ } = this.O(this.A, e, i);
12195
12195
  this.log("measured", [this.A, e, s, h]), t = this.calculateKeyframes(s, h);
12196
12196
  } else {
12197
12197
  const s = r.get(this.options.inId);
@@ -12200,7 +12200,7 @@
12200
12200
  const {
12201
12201
  from: h,
12202
12202
  to: n
12203
- } = this.N(s, e, i);
12203
+ } = this.O(s, e, i);
12204
12204
  t = this.calculateKeyframes(h, n), t = this.options.in ? [{
12205
12205
  ...this.options.in[0],
12206
12206
  ...t[0]
@@ -12210,10 +12210,10 @@
12210
12210
  this.animate(t, s);
12211
12211
  }
12212
12212
  resetStyles() {
12213
- void 0 !== this.P && (this.element.setAttribute("style", this.P ?? ""), this.P = void 0);
12213
+ void 0 !== this.j && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
12214
12214
  }
12215
12215
  commitStyles() {
12216
- this.P = this.element.getAttribute("style"), this.webAnimation?.commitStyles(), this.webAnimation?.cancel();
12216
+ this.j = this.element.getAttribute("style"), this.webAnimation?.commitStyles(), this.webAnimation?.cancel();
12217
12217
  }
12218
12218
  reconnected() {}
12219
12219
  async disconnected() {
@@ -12222,14 +12222,14 @@
12222
12222
  if (this.prepare(), await a(), this.i?.isConnected) {
12223
12223
  const t = this.o && this.o.parentNode === this.i ? this.o : null;
12224
12224
  if (this.i.insertBefore(this.element, t), this.options.stabilizeOut) {
12225
- const t = this.m();
12225
+ const t = this.p();
12226
12226
  this.log("stabilizing out");
12227
12227
  const i = this.A.left - t.left,
12228
12228
  s = this.A.top - t.top;
12229
12229
  !("static" === getComputedStyle(this.element).position) || 0 === i && 0 === s || (this.element.style.position = "relative"), 0 !== i && (this.element.style.left = i + "px"), 0 !== s && (this.element.style.top = s + "px");
12230
12230
  }
12231
12231
  }
12232
- const t = this.j(this.options.keyframeOptions);
12232
+ const t = this.V(this.options.keyframeOptions);
12233
12233
  await this.animate(this.options.out, t), this.element.remove();
12234
12234
  }
12235
12235
  prepare() {
@@ -12241,7 +12241,7 @@
12241
12241
  didFinish(t) {
12242
12242
  t && this.options.onComplete?.(this), this.A = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
12243
12243
  }
12244
- O() {
12244
+ P() {
12245
12245
  const t = [];
12246
12246
  for (let i = this.element.parentNode; i; i = i?.parentNode) {
12247
12247
  const s = j.get(i);
@@ -12255,13 +12255,13 @@
12255
12255
  n.add(this.u);
12256
12256
  }), t;
12257
12257
  }
12258
- j(t, i = this.O()) {
12258
+ V(t, i = this.P()) {
12259
12259
  const s = {
12260
12260
  ...A
12261
12261
  };
12262
12262
  return i.forEach(t => Object.assign(s, t.options.keyframeOptions)), Object.assign(s, t), s;
12263
12263
  }
12264
- N(t, i, s) {
12264
+ O(t, i, s) {
12265
12265
  t = {
12266
12266
  ...t
12267
12267
  }, i = {
@@ -12314,8 +12314,8 @@
12314
12314
  log(t, i) {
12315
12315
  this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, i);
12316
12316
  }
12317
- };
12318
- const F = e(x$1);
12317
+ }
12318
+ const F = e(x);
12319
12319
 
12320
12320
  /*
12321
12321
  CPTMath Static Class - Not intended for instantiation!
@@ -12771,20 +12771,20 @@
12771
12771
  let us;
12772
12772
  let uDiff;
12773
12773
  if (this.numeric) {
12774
- xw = x$3`<decidables-spinner class="x xw"
12774
+ xw = x$2`<decidables-spinner class="x xw"
12775
12775
  ?disabled=${!this.interactive}
12776
12776
  .value=${this.xw}
12777
12777
  @input=${this.xwInput.bind(this)}
12778
12778
  >
12779
12779
  <var class="math-var">x<sub class="subscript win">win</sub></var>
12780
12780
  </decidables-spinner>`;
12781
- xl = x$3`<decidables-spinner class="x xl"
12781
+ xl = x$2`<decidables-spinner class="x xl"
12782
12782
  disabled
12783
12783
  .value=${this.xl}
12784
12784
  >
12785
12785
  <var class="math-var">x<sub class="subscript loss">loss</sub></var>
12786
12786
  </decidables-spinner>`;
12787
- pw = x$3`<decidables-spinner class="p pw"
12787
+ pw = x$2`<decidables-spinner class="p pw"
12788
12788
  ?disabled=${!this.interactive}
12789
12789
  min="0"
12790
12790
  max="1"
@@ -12794,7 +12794,7 @@
12794
12794
  >
12795
12795
  <var class="math-var">p<sub class="subscript win">win</sub></var>
12796
12796
  </decidables-spinner>`;
12797
- xs = x$3`<decidables-spinner class="x xs"
12797
+ xs = x$2`<decidables-spinner class="x xs"
12798
12798
  ?disabled=${!this.interactive}
12799
12799
  .value=${this.xs}
12800
12800
  @input=${this.xsInput.bind(this)}
@@ -12831,73 +12831,73 @@
12831
12831
  // >
12832
12832
  // <var class="math-var">γ</var>
12833
12833
  // </decidables-spinner>`;
12834
- vw = x$3`<decidables-spinner class="v vw"
12834
+ vw = x$2`<decidables-spinner class="v vw"
12835
12835
  disabled
12836
12836
  .value=${+this.vw.toFixed(1)}
12837
12837
  >
12838
12838
  <var class="math-var">v<sub class="subscript win">win</sub></var>
12839
12839
  </decidables-spinner>`;
12840
- vl = x$3`<decidables-spinner class="v vl"
12840
+ vl = x$2`<decidables-spinner class="v vl"
12841
12841
  disabled
12842
12842
  .value=${+this.vl.toFixed(1)}
12843
12843
  >
12844
12844
  <var class="math-var">v<sub class="subscript loss">loss</sub></var>
12845
12845
  </decidables-spinner>`;
12846
- ww = x$3`<decidables-spinner class="w ww"
12846
+ ww = x$2`<decidables-spinner class="w ww"
12847
12847
  disabled
12848
12848
  .value=${+this.ww.toFixed(2)}
12849
12849
  >
12850
12850
  <var class="math-var">w<sub class="subscript win">win</sub></var>
12851
12851
  </decidables-spinner>`;
12852
- wl = x$3`<decidables-spinner class="w wl"
12852
+ wl = x$2`<decidables-spinner class="w wl"
12853
12853
  disabled
12854
12854
  .value=${+this.wl.toFixed(2)}
12855
12855
  >
12856
12856
  <var class="math-var">w<sub class="subscript loss">loss</sub></var>
12857
12857
  </decidables-spinner>`;
12858
- vs = x$3`<decidables-spinner class="v vs"
12858
+ vs = x$2`<decidables-spinner class="v vs"
12859
12859
  disabled
12860
12860
  .value=${+this.vs.toFixed(1)}
12861
12861
  >
12862
12862
  <var class="math-var">v<sub class="subscript sure">sure</sub></var>
12863
12863
  </decidables-spinner>`;
12864
- ug = x$3`<decidables-spinner class="u ug"
12864
+ ug = x$2`<decidables-spinner class="u ug"
12865
12865
  disabled
12866
12866
  .value=${+this.ug.toFixed(1)}
12867
12867
  >
12868
12868
  <var class="math-var">U<sub class="subscript gamble">gamble</sub></var>
12869
12869
  </decidables-spinner>`;
12870
- us = x$3`<decidables-spinner class="u us"
12870
+ us = x$2`<decidables-spinner class="u us"
12871
12871
  disabled
12872
12872
  .value=${+this.us.toFixed(1)}
12873
12873
  >
12874
12874
  <var class="math-var">U<sub class="subscript sure">sure</sub></var>
12875
12875
  </decidables-spinner>`;
12876
- uDiff = x$3`${this.uDiff > 0 ? x$3`<span class="comparison" ${F({
12876
+ uDiff = x$2`${this.uDiff > 0 ? x$2`<span class="comparison" ${F({
12877
12877
  in: v
12878
- })}>&gt;</span>` : this.uDiff < 0 ? x$3`<span class="comparison" ${F({
12878
+ })}>&gt;</span>` : this.uDiff < 0 ? x$2`<span class="comparison" ${F({
12879
12879
  in: v
12880
- })}>&lt;</span>` : x$3`<span class="comparison" ${F({
12880
+ })}>&lt;</span>` : x$2`<span class="comparison" ${F({
12881
12881
  in: v
12882
12882
  })}>=</span>`}`;
12883
12883
  } else {
12884
- xw = x$3`<var class="math-var x xw">x<sub class="subscript win">win</sub></var>`;
12885
- xl = x$3`<var class="math-var x xl">x<sub class="subscript loss">loss</sub></var>`;
12886
- pw = x$3`<var class="math-var p pw">p<sub class="subscript win">win</sub></var>`;
12887
- xs = x$3`<var class="math-var x xs">x<sub class="subscript sure">sure</sub></var>`;
12884
+ xw = x$2`<var class="math-var x xw">x<sub class="subscript win">win</sub></var>`;
12885
+ xl = x$2`<var class="math-var x xl">x<sub class="subscript loss">loss</sub></var>`;
12886
+ pw = x$2`<var class="math-var p pw">p<sub class="subscript win">win</sub></var>`;
12887
+ xs = x$2`<var class="math-var x xs">x<sub class="subscript sure">sure</sub></var>`;
12888
12888
  // a = html`<var class="math-var a">α</var>`;
12889
12889
  // l = html`<var class="math-var l">λ</var>`;
12890
12890
  // g = html`<var class="math-var g">γ</var>`;
12891
- vw = x$3`<var class="math-var v vw">v<sub class="subscript win">win</sub></var>`;
12892
- vl = x$3`<var class="math-var v vl">v<sub class="subscript loss">loss</sub></var>`;
12893
- ww = x$3`<var class="math-var w ww">w<sub class="subscript win">win</sub></var>`;
12894
- wl = x$3`<var class="math-var w wl">w<sub class="subscript loss">loss</sub></var>`;
12895
- vs = x$3`<var class="math-var v vs">v<sub class="subscript sure">sure</sub></var>`;
12896
- ug = x$3`<var class="math-var u ug">U<sub class="subscript gamble">gamble</sub></var>`;
12897
- us = x$3`<var class="math-var u us">U<sub class="subscript sure">sure</sub></var>`;
12898
- uDiff = x$3`<span class="comparison">≟</span>`;
12899
- }
12900
- const equation = x$3`
12891
+ vw = x$2`<var class="math-var v vw">v<sub class="subscript win">win</sub></var>`;
12892
+ vl = x$2`<var class="math-var v vl">v<sub class="subscript loss">loss</sub></var>`;
12893
+ ww = x$2`<var class="math-var w ww">w<sub class="subscript win">win</sub></var>`;
12894
+ wl = x$2`<var class="math-var w wl">w<sub class="subscript loss">loss</sub></var>`;
12895
+ vs = x$2`<var class="math-var v vs">v<sub class="subscript sure">sure</sub></var>`;
12896
+ ug = x$2`<var class="math-var u ug">U<sub class="subscript gamble">gamble</sub></var>`;
12897
+ us = x$2`<var class="math-var u us">U<sub class="subscript sure">sure</sub></var>`;
12898
+ uDiff = x$2`<span class="comparison">≟</span>`;
12899
+ }
12900
+ const equation = x$2`
12901
12901
  <tr>
12902
12902
  <td class="right">
12903
12903
  <span class="function v"><var class="math-var v tight">v</var><span class="paren tight">(</span>${xw}<span class="paren tight">)</span></span>&nbsp;<span class="function w"><var class="math-var w tight">w</var><span class="paren tight">(</span>${pw}<span class="paren tight">)</span></span><span class="plus">+</span><span class="function v"><var class="math-var v tight">v</var><span class="paren tight">(</span>${xl}<span class="paren tight">)</span></span>&nbsp;<span class="bracket tight">[</span><span class="tight">1</span><span class="minus">−</span><span class="function w"><var class="math-var w">w</var><span class="paren tight">(</span>${pw}<span class="paren tight">)</span></span><span class="bracket tight">]</span>
@@ -12931,7 +12931,7 @@
12931
12931
  ${us}
12932
12932
  </td>
12933
12933
  </tr>`;
12934
- return x$3`
12934
+ return x$2`
12935
12935
  <div class="holder">
12936
12936
  <table class="equation">
12937
12937
  <tbody>
@@ -13912,7 +13912,7 @@
13912
13912
  facets: facets.map(I => I.slice().reverse())
13913
13913
  };
13914
13914
  }
13915
- function sort$1(order, {
13915
+ function sort(order, {
13916
13916
  sort,
13917
13917
  ...options
13918
13918
  } = {}) {
@@ -14156,7 +14156,7 @@
14156
14156
  const reduceTitle = {
14157
14157
  reduceIndex(I, X) {
14158
14158
  const n = 5;
14159
- const groups = sort$2(rollup(I, V => V.length, i => X[i]), second);
14159
+ const groups = sort$1(rollup(I, V => V.length, i => X[i]), second);
14160
14160
  const top = groups.slice(-n).reverse();
14161
14161
  if (top.length < groups.length) {
14162
14162
  const bottom = groups.slice(0, 1 - n);
@@ -15020,7 +15020,7 @@
15020
15020
  padding = 0.5,
15021
15021
  ...options
15022
15022
  }) {
15023
- return maybeRound(point$5().align(align).padding(padding), channels, options, key);
15023
+ return maybeRound(point$4().align(align).padding(padding), channels, options, key);
15024
15024
  }
15025
15025
  function createScaleBand(key, channels, {
15026
15026
  align = 0.5,
@@ -15057,7 +15057,7 @@
15057
15057
  if (values.size > 10e3 && registry.get(key) === position) {
15058
15058
  throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);
15059
15059
  }
15060
- return sort$2(values, ascendingDefined);
15060
+ return sort$1(values, ascendingDefined);
15061
15061
  }
15062
15062
 
15063
15063
  // If all channels provide a consistent hint, propagate it to the scale.
@@ -21780,7 +21780,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
21780
21780
  strokeWidth: 1.5
21781
21781
  };
21782
21782
  function withDefaultSort(options) {
21783
- return options.sort === undefined && options.reverse === undefined ? sort$1({
21783
+ return options.sort === undefined && options.reverse === undefined ? sort({
21784
21784
  channel: "-r"
21785
21785
  }, options) : options;
21786
21786
  }
@@ -22144,7 +22144,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22144
22144
  `];
22145
22145
  }
22146
22146
  render() {
22147
- return x$3`
22147
+ return x$2`
22148
22148
  <div>
22149
22149
  <div>After ${this.choices.length} trials:</div>
22150
22150
  <div>Current:
@@ -22329,9 +22329,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22329
22329
  `];
22330
22330
  }
22331
22331
  render() {
22332
- return x$3`
22332
+ return x$2`
22333
22333
  <div class="holder">
22334
- ${this.a != null ? x$3`<decidables-slider class="a"
22334
+ ${this.a != null ? x$2`<decidables-slider class="a"
22335
22335
  ?disabled=${!this.interactive}
22336
22336
  scale
22337
22337
  min=${CPTMath.a.MIN}
@@ -22340,8 +22340,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22340
22340
  .value=${+this.a.toFixed(2)}
22341
22341
  @change=${this.setAlpha.bind(this)}
22342
22342
  @input=${this.setAlpha.bind(this)}
22343
- ><div>Alpha<br><span class="math-var">α</span></div></decidables-slider>` : x$3``}
22344
- ${this.l != null ? x$3`<decidables-slider class="l"
22343
+ ><div>Alpha<br><span class="math-var">α</span></div></decidables-slider>` : x$2``}
22344
+ ${this.l != null ? x$2`<decidables-slider class="l"
22345
22345
  ?disabled=${!this.interactive}
22346
22346
  scale
22347
22347
  min=${CPTMath.l.MIN}
@@ -22350,8 +22350,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22350
22350
  .value=${+this.l.toFixed(2)}
22351
22351
  @change=${this.setLambda.bind(this)}
22352
22352
  @input=${this.setLambda.bind(this)}
22353
- ><div>Lambda<br><span class="math-var">λ</span></div></decidables-slider>` : x$3``}
22354
- ${this.g != null ? x$3`<decidables-slider class="g"
22353
+ ><div>Lambda<br><span class="math-var">λ</span></div></decidables-slider>` : x$2``}
22354
+ ${this.g != null ? x$2`<decidables-slider class="g"
22355
22355
  ?disabled=${!this.interactive}
22356
22356
  scale
22357
22357
  min=${CPTMath.g.MIN}
@@ -22360,7 +22360,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22360
22360
  .value=${+this.g.toFixed(2)}
22361
22361
  @change=${this.setGamma.bind(this)}
22362
22362
  @input=${this.setGamma.bind(this)}
22363
- ><div>Gamma<br><span class="math-var">γ</span></div></decidables-slider>` : x$3``}
22363
+ ><div>Gamma<br><span class="math-var">γ</span></div></decidables-slider>` : x$2``}
22364
22364
  </div>`;
22365
22365
  }
22366
22366
  }
@@ -22740,7 +22740,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
22740
22740
  }
22741
22741
  render() {
22742
22742
  /* eslint-disable-line class-methods-use-this */
22743
- return x$3``;
22743
+ return x$2``;
22744
22744
  }
22745
22745
  willUpdate() {
22746
22746
  this.alignState();
@@ -23258,476 +23258,417 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
23258
23258
  }
23259
23259
  customElements.define('cpt-probability', CPTProbability);
23260
23260
 
23261
- /**
23262
- * Converts a point from 3D space to 2D space using orthographic projection.
23263
- *
23264
- * @param {Object} d - The 3D point to be projected.
23265
- * @param {Object} options - Options for the projection.
23266
- * @param {Array} options.origin - The origin point for the projection.
23267
- * @param {number} options.scale - The scale factor for the projection.
23268
- * @returns {Object} The projected point in 2D space.
23269
- */
23270
- function orthographic(d, options) {
23271
- /**
23272
- * @typedef {Object} Point2D
23273
- * @property {number} x - The x-coordinate in 2D space.
23274
- * @property {number} y - The y-coordinate in 2D space.
23275
- */
23276
-
23277
- /**
23278
- * @type {Point2D}
23279
- */
23280
- return {
23281
- x: options.origin.x + options.scale * d.x,
23282
- y: options.origin.y + options.scale * d.y
23283
- };
23284
- }
23285
-
23286
- /**
23287
- * Returns the x-coordinate of a point in 3D space.
23288
- *
23289
- * @param {Object} p - The point in 3D space represented as an object e.g {x: 0, y: 1, z: 0}
23290
- * @returns {number} The x-coordinate of the point.
23291
- */
23292
- function x(p) {
23293
- return p.x;
23294
- }
23295
-
23296
- /**
23297
- * Returns the y-coordinate of a point in 3D space.
23298
- *
23299
- * @param {Object} p - The point in 3D space represented as an object e.g x: 0, y: 1, z: 0}
23300
- * @returns {number} The y-coordinate of the point.
23301
- */
23302
- function y(p) {
23303
- return p.y;
23304
- }
23305
-
23306
- /**
23307
- * Returns the z-coordinate of a point in 3D space.
23308
- *
23309
- * @param {Object} p - The point in 3D space represented as an object e.g {x: 0, y: 1, z: 0}
23310
- * @returns {number} The z-coordinate of the point.
23311
- */
23312
- function z(p) {
23313
- return p.z;
23314
- }
23315
-
23316
- /**
23317
- * Comparator function to sort objects based on their centroid z-values.
23318
- *
23319
- * This function compares the z-values of the centroid property of two objects (a and b).
23320
- * It returns a negative number if a should come before b, a positive number if a should come after b,
23321
- * and 0 if a and b are considered equal in terms of sorting.
23322
- *
23323
- * @param {Object} a - The first object to compare.
23324
- * @param {Object} b - The second object to compare.
23325
- * @returns {number} - A negative, zero, or positive number indicating the sorting order.
23326
- *
23327
- * @example
23328
- * // Sorting an array of objects based on centroid z-values
23329
- * const sortedArray = unsortedArray.sort(sort);
23330
- */
23331
- function sort(a, b) {
23332
- // Extract z-values from objects
23333
- const pa = a.centroid.z;
23334
- const pb = b.centroid.z;
23261
+ var d33d$1 = {exports: {}};
23335
23262
 
23336
- // Compare z-values for sorting
23337
- return pa < pb ? -1 : pa > pb ? 1 : pa >= pb ? 0 : NaN;
23338
- }
23263
+ var d33d = d33d$1.exports;
23264
+ (function (module, exports$1) {
23265
+ (function (i, h) {
23266
+ h(exports$1) ;
23267
+ })(d33d, function (i) {
23339
23268
 
23340
- /**
23341
- * Generates 3D shapes based on specified parameters and transformations.
23342
- *
23343
- * @param {Function} transform - The transformation function for generating 3D shapes.
23344
- * @param {Function|undefined} draw - The drawing function for rendering the generated 3D shapes.
23345
- * @returns {Function} - A function that, when called with data, generates and returns an array of 3D shapes.
23346
- */
23347
- function generator3D(transform, draw) {
23348
- let angleX = 0;
23349
- let angleY = 0;
23350
- let angleZ = 0;
23351
- let origin = {
23352
- x: 0,
23353
- y: 0
23354
- };
23355
- let rotateCenter = {
23356
- x: 0,
23357
- y: 0,
23358
- z: 0
23359
- };
23360
- let scale = 1;
23361
- let x$1 = x;
23362
- let y$1 = y;
23363
- let z$1 = z;
23364
- let rows = 0;
23365
-
23366
- /**
23367
- * Generates 3D shapes based on specified parameters and transformations.
23368
- *
23369
- * @param {Object} data - The data representing the 3D shapes.
23370
- * @returns {Object[]} - An array of 3D shapes generated with the specified parameters and transformations.
23371
- *
23372
- */
23373
- function fn(data) {
23374
- return transform(data, {
23375
- scale: scale,
23376
- origin: origin,
23377
- project: orthographic,
23378
- row: rows
23379
- }, {
23380
- x: x$1,
23381
- y: y$1,
23382
- z: z$1
23383
- }, {
23384
- x: angleX,
23385
- y: angleY,
23386
- z: angleZ,
23387
- rotateCenter: rotateCenter
23269
+ function h(r) {
23270
+ return `M${r[0].projected.x},${r[0].projected.y}L${r[1].projected.x},${r[1].projected.y}L${r[2].projected.x},${r[2].projected.y}L${r[3].projected.x},${r[3].projected.y}Z`;
23271
+ }
23272
+ function j(r) {
23273
+ return r.x;
23274
+ }
23275
+ function C(r) {
23276
+ return r.y;
23277
+ }
23278
+ function Z(r) {
23279
+ return r.z;
23280
+ }
23281
+ class c {
23282
+ constructor() {
23283
+ this._scale = 1, this._origin = {
23284
+ x: 0,
23285
+ y: 0
23286
+ }, this._rotateX = 0, this._rotateY = 0, this._rotateZ = 0, this._x = j, this._y = C, this._z = Z, this._rotationCenter = {
23287
+ x: 0,
23288
+ y: 0,
23289
+ z: 0
23290
+ };
23291
+ }
23292
+ scale(t) {
23293
+ return t ? (this._scale = t, this) : this._scale;
23294
+ }
23295
+ origin(t) {
23296
+ return t ? (this._origin = t, this) : this._origin;
23297
+ }
23298
+ rotationCenter(t) {
23299
+ return t ? (this._rotationCenter = t, this) : this._rotationCenter;
23300
+ }
23301
+ rotateX(t) {
23302
+ return t ? (this._rotateX = t, this) : this._rotateX;
23303
+ }
23304
+ rotateY(t) {
23305
+ return t ? (this._rotateY = t, this) : this._rotateY;
23306
+ }
23307
+ rotateZ(t) {
23308
+ return t ? (this._rotateZ = t, this) : this._rotateZ;
23309
+ }
23310
+ x(t) {
23311
+ return typeof t == "function" ? (this._x = t, this) : this._x;
23312
+ }
23313
+ y(t) {
23314
+ return typeof t == "function" ? (this._y = t, this) : this._y;
23315
+ }
23316
+ z(t) {
23317
+ return typeof t == "function" ? (this._z = t, this) : this._z;
23318
+ }
23319
+ }
23320
+ function z(r) {
23321
+ const t = [...r, r[0]];
23322
+ let n = 0;
23323
+ for (let e = 0; e < r.length; e += 1) {
23324
+ const o = t[e].rotated,
23325
+ s = t[e + 1].rotated;
23326
+ n += (s.x - o.x) * (s.y + o.y);
23327
+ }
23328
+ return n > 0;
23329
+ }
23330
+ function u(r) {
23331
+ let t = 0,
23332
+ n = 0,
23333
+ e = 0;
23334
+ for (let o = r.length - 1; o >= 0; o -= 1) {
23335
+ const s = r[o].rotated;
23336
+ t += s.x, n += s.y, e += s.z;
23337
+ }
23338
+ return {
23339
+ x: t / r.length,
23340
+ y: n / r.length,
23341
+ z: e / r.length
23342
+ };
23343
+ }
23344
+ function _(r, t) {
23345
+ const n = t.rotateCenter,
23346
+ e = {
23347
+ x: r.x - n.x,
23348
+ y: r.y - n.y,
23349
+ z: r.z - n.z
23350
+ },
23351
+ o = X(e, t.z),
23352
+ s = $(o, t.y),
23353
+ a = D(s, t.x);
23354
+ return {
23355
+ x: a.x + n.x,
23356
+ y: a.y + n.y,
23357
+ z: a.z + n.z
23358
+ };
23359
+ }
23360
+ function D(r, t) {
23361
+ const n = Math.sin(t),
23362
+ e = Math.cos(t);
23363
+ return {
23364
+ x: r.x,
23365
+ y: r.y * e - r.z * n,
23366
+ z: r.y * n + r.z * e
23367
+ };
23368
+ }
23369
+ function $(r, t) {
23370
+ const n = Math.sin(t),
23371
+ e = Math.cos(t);
23372
+ return {
23373
+ x: r.z * n + r.x * e,
23374
+ y: r.y,
23375
+ z: r.z * e - r.x * n
23376
+ };
23377
+ }
23378
+ function X(r, t) {
23379
+ const n = Math.sin(t),
23380
+ e = Math.cos(t);
23381
+ return {
23382
+ x: r.x * e - r.y * n,
23383
+ y: r.x * n + r.y * e,
23384
+ z: r.z
23385
+ };
23386
+ }
23387
+ function w(r, t) {
23388
+ return {
23389
+ x: t.origin.x + t.scale * r.x,
23390
+ y: t.origin.y + t.scale * r.y
23391
+ };
23392
+ }
23393
+ const d = (r, t) => r.map(n => {
23394
+ const e = {
23395
+ x: t.x(n),
23396
+ y: t.y(n),
23397
+ z: t.z(n)
23398
+ },
23399
+ o = _(e, {
23400
+ x: t.rotateX,
23401
+ y: t.rotateY,
23402
+ z: t.rotateZ,
23403
+ rotateCenter: t.rotateCenter
23404
+ }),
23405
+ s = w(o, {
23406
+ scale: t.scale,
23407
+ origin: t.origin
23408
+ });
23409
+ return {
23410
+ ...n,
23411
+ rotated: o,
23412
+ projected: s
23413
+ };
23388
23414
  });
23389
- }
23390
-
23391
- /**
23392
- * Sets or retrieves the origin for rendering the 3D shapes.
23393
- *
23394
- * @param {number[]} [o] - The origin point for rendering the 3D shapes.
23395
- * @returns {Function|number[]} - If no argument is provided, returns the current origin. Otherwise, sets the origin and returns the function.
23396
- */
23397
- fn.origin = function (o) {
23398
- return arguments.length ? (origin = o, fn) : origin;
23399
- };
23400
-
23401
- /**
23402
- * Sets or retrieves the scale factor for the 3D shapes.
23403
- *
23404
- * @param {number} [s] - The scale factor for the 3D shapes.
23405
- * @returns {Function|number} - If no argument is provided, returns the current scale factor. Otherwise, sets the scale factor and returns the function.
23406
- */
23407
- fn.scale = function (s) {
23408
- return arguments.length ? (scale = s, fn) : scale;
23409
- };
23410
-
23411
- /**
23412
- * Sets or retrieves the rotation angle around the x-axis.
23413
- *
23414
- * @param {number} [ax] - The rotation angle around the x-axis.
23415
- * @returns {Function|number} - If no argument is provided, returns the current rotation angle around the x-axis. Otherwise, sets the rotation angle and returns the function.
23416
- */
23417
- fn.rotateX = function (ax) {
23418
- return arguments.length ? (angleX = ax, fn) : angleX;
23419
- };
23420
-
23421
- /**
23422
- * Sets or retrieves the rotation angle around the y-axis.
23423
- *
23424
- * @param {number} [ay] - The rotation angle around the y-axis.
23425
- * @returns {Function|number} - If no argument is provided, returns the current rotation angle around the y-axis. Otherwise, sets the rotation angle and returns the function.
23426
- */
23427
- fn.rotateY = function (ay) {
23428
- return arguments.length ? (angleY = ay, fn) : angleY;
23429
- };
23430
-
23431
- /**
23432
- * Sets or retrieves the rotation angle around the z-axis.
23433
- *
23434
- * @param {number} [az] - The rotation angle around the z-axis.
23435
- * @returns {Function|number} - If no argument is provided, returns the current rotation angle around the z-axis. Otherwise, sets the rotation angle and returns the function.
23436
- */
23437
- fn.rotateZ = function (az) {
23438
- return arguments.length ? (angleZ = az, fn) : angleZ;
23439
- };
23440
-
23441
- /**
23442
- * Sets or retrieves the rotation center for the 3D shapes.
23443
- *
23444
- * @param {number[]} [rc] - The rotation center for the 3D shapes.
23445
- * @returns {Function|number[]} - If no argument is provided, returns the current rotation center. Otherwise, sets the rotation center and returns the function.
23446
- */
23447
- fn.rotationCenter = function (rc) {
23448
- return arguments.length ? (rotateCenter = rc, fn) : rotateCenter;
23449
- };
23450
-
23451
- /**
23452
- * Sets or retrieves the x-coordinate for the 3D shapes.
23453
- *
23454
- * @param {number} [px] - The x-coordinate for the 3D shapes.
23455
- * @returns {Function|number} - If no argument is provided, returns the current x-coordinate. Otherwise, sets the x-coordinate and returns the function.
23456
- */
23457
- fn.x = function (px) {
23458
- return arguments.length ? (x$1 = typeof px === 'function' ? px : +px, fn) : x$1;
23459
- };
23460
-
23461
- /**
23462
- * Sets or retrieves the y-coordinate for the 3D shapes.
23463
- *
23464
- * @param {number} [py] - The y-coordinate for the 3D shapes.
23465
- * @returns {Function|number} - If no argument is provided, returns the current y-coordinate. Otherwise, sets the y-coordinate and returns the function.
23466
- */
23467
- fn.y = function (py) {
23468
- return arguments.length ? (y$1 = typeof py === 'function' ? py : +py, fn) : y$1;
23469
- };
23470
-
23471
- /**
23472
- * Sets or retrieves the z-coordinate for the 3D shapes.
23473
- *
23474
- * @param {number} [pz] - The z-coordinate for the 3D shapes.
23475
- * @returns {Function|number} - If no argument is provided, returns the current z-coordinate. Otherwise, sets the z-coordinate and returns the function.
23476
- */
23477
- fn.z = function (pz) {
23478
- return arguments.length ? (z$1 = typeof pz === 'function' ? pz : +pz, fn) : z$1;
23479
- };
23480
-
23481
- /**
23482
- * !IMPORT! ONLY FOR gridplanes
23483
- * Sets or retrieves the rows for 3d gridplanes.
23484
- *
23485
- * @param {number} [pz] - The z-coordinate for the 3D shapes.
23486
- * @returns {Function|number} - If no argument is provided, returns the current rowse. Otherwise, sets the rows and returns the function.
23487
- */
23488
- fn.rows = function (r) {
23489
- return arguments.length ? (rows = typeof r === 'function' ? r : +r, fn) : rows;
23490
- };
23491
-
23492
- // Attach the draw function to the generator
23493
- fn.draw = draw;
23494
-
23495
- // Attach the sort function to the generator
23496
- fn.sort = sort;
23497
-
23498
- // Return the generator function
23499
- return fn;
23500
- }
23501
-
23502
- /**
23503
- * Determines if a polygon is oriented in a counter-clockwise direction.
23504
- *
23505
- * @param {Array} polygon - An array of vertices representing the polygon.
23506
- * @returns {boolean} True if the polygon is counter-clockwise, false otherwise.
23507
- */
23508
- function ccw(polygon) {
23509
- /**
23510
- * Calculate the signed area of the polygon.
23511
- * Positive area indicates a counter-clockwise orientation.
23512
- */
23513
- const poly = [...polygon, polygon[0]];
23514
- let sum = 0;
23515
- for (let i = 0; i < polygon.length; i++) {
23516
- const j = i + 1;
23517
- const p1 = poly[i].rotated;
23518
- const p2 = poly[j].rotated;
23519
-
23520
- // Update the sum with the cross product of consecutive vertices
23521
- sum += (p2.x - p1.x) * (p2.y + p1.y);
23522
- }
23523
-
23524
- // If the area is positive, the polygon is counter-clockwise
23525
- // This is due to the flipped y-axis in the browser
23526
- return sum > 0;
23527
- }
23528
-
23529
- /**
23530
- * Calculates the centroid of a polygon.
23531
- *
23532
- * The centroid is the average position of all the points in the polygon.
23533
- *
23534
- * @param {Object[]} polygon - The polygon represented as an array of objects with x, y, and z properties.
23535
- * @param {number} polygon[].rotated.x - The x-coordinate of the rotated point.
23536
- * @param {number} polygon[].rotated.y - The y-coordinate of the rotated point.
23537
- * @param {number} polygon[].rotated.z - The z-coordinate of the rotated point.
23538
- * @returns {Object} - The centroid of the polygon with x, y, and z properties.
23539
- *
23540
- * @throws {Error} Will throw an error if the polygon is empty or if any point in the polygon is missing rotated coordinates.
23541
- *
23542
- * @example
23543
- * // Calculate the centroid of a polygon
23544
- * const polygon = [
23545
- * { rotated: { x: 1, y: 2, z: 3 } },
23546
- * { rotated: { x: 4, y: 5, z: 6 } },
23547
- * { rotated: { x: 7, y: 8, z: 9 } },
23548
- * ];
23549
- * const centroidPoint = centroid(polygon);
23550
- * console.log(centroidPoint); // Outputs: { x: 4, y: 5, z: 6 }
23551
- */
23552
- function centroid(polygon) {
23553
- let _x = 0;
23554
- let _y = 0;
23555
- let _z = 0;
23556
- let _n = polygon.length;
23557
-
23558
- // Calculate the sum of rotated coordinates
23559
- for (let i = _n - 1; i >= 0; i--) {
23560
- const point = polygon[i].rotated;
23561
- _x += point.x;
23562
- _y += point.y;
23563
- _z += point.z;
23564
- }
23565
-
23566
- // Calculate the average of rotated coordinates to get the centroid
23567
- return {
23568
- x: _x / _n,
23569
- y: _y / _n,
23570
- z: _z / _n
23571
- };
23572
- }
23573
-
23574
- /**
23575
- * Rotates a point in 3D space around the X, Y, and Z axes.
23576
- *
23577
- * @param {Object} po - The 3D point to be rotated.
23578
- * @param {Object} angles - The angles of rotation around the X, Y, and Z axes.
23579
- * @param {number} angles.x - The angle of rotation around the X axis in radians.
23580
- * @param {number} angles.y - The angle of rotation around the Y axis in radians.
23581
- * @param {number} angles.z - The angle of rotation around the Z axis in radians.
23582
- * @param {Array<number>} angles.rotateCenter - The center of rotation.
23583
- * @returns {Object} The rotated 3D point.
23584
- */
23585
- function rotateRzRyRx(po, angles) {
23586
- const rc = angles.rotateCenter;
23587
- po.x -= rc.x;
23588
- po.y -= rc.y;
23589
- po.z -= rc.z;
23590
- const rz = rotateZ(po, angles.z);
23591
- const ry = rotateY(rz, angles.y);
23592
- const rx = rotateX(ry, angles.x);
23593
- rx.x += rc.x;
23594
- rx.y += rc.y;
23595
- rx.z += rc.z;
23596
- return rx;
23597
- }
23598
-
23599
- /**
23600
- * Rotates a 3D point around the X axis.
23601
- *
23602
- * @param {Object} p - The 3D point to be rotated.
23603
- * @param {number} a - The angle of rotation in radians.
23604
- * @returns {Object} The rotated 3D point.
23605
- */
23606
- function rotateX(p, a) {
23607
- const sa = Math.sin(a);
23608
- const ca = Math.cos(a);
23609
- return {
23610
- x: p.x,
23611
- y: p.y * ca - p.z * sa,
23612
- z: p.y * sa + p.z * ca
23613
- };
23614
- }
23615
-
23616
- /**
23617
- * Rotates a 3D point around the Y axis.
23618
- *
23619
- * @param {Object} p - The 3D point to be rotated.
23620
- * @param {number} a - The angle of rotation in radians.
23621
- * @returns {Object} The rotated 3D point.
23622
- */
23623
- function rotateY(p, a) {
23624
- const sa = Math.sin(a);
23625
- const ca = Math.cos(a);
23626
- return {
23627
- x: p.z * sa + p.x * ca,
23628
- y: p.y,
23629
- z: p.z * ca - p.x * sa
23630
- };
23631
- }
23632
-
23633
- /**
23634
- * Rotates a 3D point around the Z axis.
23635
- *
23636
- * @param {Object} p - The 3D point to be rotated.
23637
- * @param {number} a - The angle of rotation in radians.
23638
- * @returns {Object} The rotated 3D point.
23639
- */
23640
- function rotateZ(p, a) {
23641
- const sa = Math.sin(a);
23642
- const ca = Math.cos(a);
23643
- return {
23644
- x: p.x * ca - p.y * sa,
23645
- y: p.x * sa + p.y * ca,
23646
- z: p.z
23647
- };
23648
- }
23649
-
23650
- function point(points, options, point, angles) {
23651
- for (let i = points.length - 1; i >= 0; i--) {
23652
- const p = points[i];
23653
- p.rotated = rotateRzRyRx({
23654
- x: point.x(p),
23655
- y: point.y(p),
23656
- z: point.z(p)
23657
- }, angles);
23658
- p.centroid = p.rotated;
23659
- p.projected = options.project(p.rotated, options);
23660
- }
23661
- return points;
23662
- }
23663
- function points3D() {
23664
- return generator3D(point, undefined);
23665
- }
23666
-
23667
- function drawPlane(d) {
23668
- return `M${d[0].projected.x},${d[0].projected.y}L${d[1].projected.x},${d[1].projected.y}L${d[2].projected.x},${d[2].projected.y}L${d[3].projected.x},${d[3].projected.y}Z`;
23669
- }
23670
-
23671
- function gridPlane(grid, options, point$1, angles) {
23672
- const points = point(grid, options, point$1, angles);
23673
- const planes = [];
23674
- const numPts = options.row;
23675
- const numRow = points.length / numPts;
23676
- let cnt = 0;
23677
- for (var i = numRow - 1; i > 0; i--) {
23678
- for (var j = numPts - 1; j > 0; j--) {
23679
- var p1 = j + i * numPts,
23680
- p4 = p1 - 1,
23681
- p2 = p4 - numPts + 1,
23682
- p3 = p2 - 1;
23683
- var pl = [points[p1], points[p2], points[p3], points[p4]];
23684
- pl.plane = `plane-${cnt++}`;
23685
- pl.ccw = ccw(pl);
23686
- pl.centroid = centroid(pl);
23687
- planes.push(pl);
23688
- }
23689
- }
23690
- return planes;
23691
- }
23692
- function gridPlanes3D() {
23693
- return generator3D(gridPlane, drawPlane);
23694
- }
23695
-
23696
- function drawLineStrip(lineStrip) {
23697
- const lastPoint = lineStrip[lineStrip.length - 1];
23698
- let path = `M${lastPoint.projected.x},${lastPoint.projected.y}`;
23699
- for (var i = lineStrip.length - 2; i >= 0; i--) {
23700
- const p = lineStrip[i].projected;
23701
- path += `L${p.x},${p.y}`;
23702
- }
23703
- return path;
23704
- }
23705
-
23706
- function lineStrip(lineStrip, options, point, angles) {
23707
- for (let i = lineStrip.length - 1; i >= 0; i--) {
23708
- const l = lineStrip[i];
23709
- const m = l.length / 2;
23710
- const t = parseInt(m);
23711
- for (let j = l.length - 1; j >= 0; j--) {
23712
- const p = l[j];
23713
- p.rotated = rotateRzRyRx({
23714
- x: point.x(p),
23715
- y: point.y(p),
23716
- z: point.z(p)
23717
- }, angles);
23718
- p.projected = options.project(p.rotated, options);
23719
- }
23720
- l.centroid = t === m ? centroid([l[m - 1], l[m]]) : {
23721
- x: l[t].rotated.x,
23722
- y: l[t].rotated.y,
23723
- z: l[t].rotated.z
23724
- };
23725
- }
23726
- return lineStrip;
23727
- }
23728
- function lineStrips3D() {
23729
- return generator3D(lineStrip, drawLineStrip);
23730
- }
23415
+ function l(r, t) {
23416
+ const n = r;
23417
+ return n.centroid = u(n), n.ccw = z(n), n.face = t, n;
23418
+ }
23419
+ class Y extends c {
23420
+ data(t) {
23421
+ return t.map(n => {
23422
+ const e = d(n, {
23423
+ origin: this.origin(),
23424
+ rotateCenter: this.rotationCenter(),
23425
+ rotateX: this.rotateX(),
23426
+ rotateY: this.rotateY(),
23427
+ rotateZ: this.rotateZ(),
23428
+ scale: this.scale(),
23429
+ x: this.x(),
23430
+ y: this.y(),
23431
+ z: this.z()
23432
+ }),
23433
+ o = l([e[0], e[1], e[2], e[3]], "front"),
23434
+ s = l([e[7], e[6], e[5], e[4]], "back"),
23435
+ a = l([e[4], e[5], e[1], e[0]], "left"),
23436
+ y = l([e[3], e[2], e[6], e[7]], "right"),
23437
+ x = l([e[4], e[0], e[3], e[7]], "top"),
23438
+ g = l([e[1], e[5], e[6], e[2]], "bottom");
23439
+ return e.faces = [o, s, a, y, x, g], e.centroid = {
23440
+ x: (a.centroid.x + y.centroid.x) / 2,
23441
+ y: (x.centroid.y + g.centroid.y) / 2,
23442
+ z: (o.centroid.z + s.centroid.z) / 2
23443
+ }, e;
23444
+ });
23445
+ }
23446
+ draw(t) {
23447
+ return h(t);
23448
+ }
23449
+ }
23450
+ function P() {
23451
+ return new Y();
23452
+ }
23453
+ class M extends c {
23454
+ constructor() {
23455
+ super(...arguments), this._rows = 1;
23456
+ }
23457
+ rows(t) {
23458
+ return t ? (this._rows = t, this) : this._rows;
23459
+ }
23460
+ data(t) {
23461
+ const n = this._rows,
23462
+ e = d(t, {
23463
+ origin: this.origin(),
23464
+ rotateCenter: this.rotationCenter(),
23465
+ rotateX: this.rotateX(),
23466
+ rotateY: this.rotateY(),
23467
+ rotateZ: this.rotateZ(),
23468
+ scale: this.scale(),
23469
+ x: this.x(),
23470
+ y: this.y(),
23471
+ z: this.z()
23472
+ }),
23473
+ o = e.length / n,
23474
+ s = [];
23475
+ let a = 0;
23476
+ for (let y = o - 1; y > 0; y -= 1) for (let x = n - 1; x > 0; x -= 1) {
23477
+ const g = x + y * n,
23478
+ m = g - 1,
23479
+ p = m - n + 1,
23480
+ N = p - 1,
23481
+ f = [e[g], e[p], e[N], e[m]];
23482
+ f.plane = `plane-${a}`, f.ccw = z(f), f.centroid = u(f), s.push(f), a += 1;
23483
+ }
23484
+ return s;
23485
+ }
23486
+ draw(t) {
23487
+ return h(t);
23488
+ }
23489
+ }
23490
+ function R() {
23491
+ return new M();
23492
+ }
23493
+ class b extends c {
23494
+ data(t) {
23495
+ return t.map(n => {
23496
+ const e = d(n, {
23497
+ origin: this.origin(),
23498
+ rotateCenter: this.rotationCenter(),
23499
+ rotateX: this.rotateX(),
23500
+ rotateY: this.rotateY(),
23501
+ rotateZ: this.rotateZ(),
23502
+ scale: this.scale(),
23503
+ x: this.x(),
23504
+ y: this.y(),
23505
+ z: this.z()
23506
+ });
23507
+ return e.centroid = u(e), e;
23508
+ });
23509
+ }
23510
+ }
23511
+ function L() {
23512
+ return new b();
23513
+ }
23514
+ function S(r) {
23515
+ const t = r[r.length - 1];
23516
+ let n = `M${t.projected.x},${t.projected.y}`;
23517
+ for (let e = r.length - 2; e >= 0; e -= 1) {
23518
+ const o = r[e].projected;
23519
+ n += `L${o.x},${o.y}`;
23520
+ }
23521
+ return n;
23522
+ }
23523
+ class A extends c {
23524
+ data(t) {
23525
+ return t.map(n => {
23526
+ const e = n.length / 2,
23527
+ o = Math.trunc(e),
23528
+ s = d(n, {
23529
+ origin: this.origin(),
23530
+ rotateCenter: this.rotationCenter(),
23531
+ rotateX: this.rotateX(),
23532
+ rotateY: this.rotateY(),
23533
+ rotateZ: this.rotateZ(),
23534
+ scale: this.scale(),
23535
+ x: this.x(),
23536
+ y: this.y(),
23537
+ z: this.z()
23538
+ });
23539
+ return s.centroid = o === e ? u([s[e - 1], s[e]]) : s[o].rotated, s;
23540
+ });
23541
+ }
23542
+ draw(t) {
23543
+ return S(t);
23544
+ }
23545
+ }
23546
+ function T() {
23547
+ return new A();
23548
+ }
23549
+ class k extends c {
23550
+ data(t) {
23551
+ return t.map(n => {
23552
+ const e = d(n, {
23553
+ origin: this.origin(),
23554
+ rotateCenter: this.rotationCenter(),
23555
+ rotateX: this.rotateX(),
23556
+ rotateY: this.rotateY(),
23557
+ rotateZ: this.rotateZ(),
23558
+ scale: this.scale(),
23559
+ x: this.x(),
23560
+ y: this.y(),
23561
+ z: this.z()
23562
+ });
23563
+ return e.ccw = z(e), e.centroid = u(e), e;
23564
+ });
23565
+ }
23566
+ draw(t) {
23567
+ return h(t);
23568
+ }
23569
+ }
23570
+ function F() {
23571
+ return new k();
23572
+ }
23573
+ class G extends c {
23574
+ data(t) {
23575
+ return t.map(n => {
23576
+ const e = {
23577
+ x: this.x()(n),
23578
+ y: this.y()(n),
23579
+ z: this.z()(n)
23580
+ },
23581
+ o = _(e, {
23582
+ x: this.rotateX(),
23583
+ y: this.rotateY(),
23584
+ z: this.rotateZ(),
23585
+ rotateCenter: this.rotationCenter()
23586
+ }),
23587
+ s = w(e, {
23588
+ scale: this.scale(),
23589
+ origin: this.origin()
23590
+ });
23591
+ return {
23592
+ ...n,
23593
+ rotated: o,
23594
+ centroid: o,
23595
+ projected: s
23596
+ };
23597
+ });
23598
+ }
23599
+ }
23600
+ function O() {
23601
+ return new G();
23602
+ }
23603
+ function q(r) {
23604
+ const t = r[r.length - 1];
23605
+ let n = `M${t.projected.x},${t.projected.y}`;
23606
+ for (let e = r.length - 2; e >= 0; e -= 1) {
23607
+ const o = r[e].projected;
23608
+ n += `L${o.x},${o.y}`;
23609
+ }
23610
+ return `${n}Z`;
23611
+ }
23612
+ class B extends c {
23613
+ data(t) {
23614
+ return t.map(n => {
23615
+ const e = d(n, {
23616
+ origin: this.origin(),
23617
+ rotateCenter: this.rotationCenter(),
23618
+ rotateX: this.rotateX(),
23619
+ rotateY: this.rotateY(),
23620
+ rotateZ: this.rotateZ(),
23621
+ scale: this.scale(),
23622
+ x: this.x(),
23623
+ y: this.y(),
23624
+ z: this.z()
23625
+ });
23626
+ return e.ccw = z(e), e.centroid = u(e), e;
23627
+ });
23628
+ }
23629
+ draw(t) {
23630
+ return q(t);
23631
+ }
23632
+ }
23633
+ function E() {
23634
+ return new B();
23635
+ }
23636
+ const H = r => `M${r[0].projected.x},${r[0].projected.y}L${r[1].projected.x},${r[1].projected.y}L${r[2].projected.x},${r[2].projected.y}Z`;
23637
+ class I extends c {
23638
+ data(t) {
23639
+ return t.map(n => {
23640
+ const e = d(n, {
23641
+ origin: this.origin(),
23642
+ rotateCenter: this.rotationCenter(),
23643
+ rotateX: this.rotateX(),
23644
+ rotateY: this.rotateY(),
23645
+ rotateZ: this.rotateZ(),
23646
+ scale: this.scale(),
23647
+ x: this.x(),
23648
+ y: this.y(),
23649
+ z: this.z()
23650
+ });
23651
+ return e.ccw = z(e), e.centroid = u(e), e;
23652
+ });
23653
+ }
23654
+ draw(t) {
23655
+ return H(t);
23656
+ }
23657
+ }
23658
+ function J() {
23659
+ return new I();
23660
+ }
23661
+ function K(r, t) {
23662
+ const n = r.centroid.z,
23663
+ e = t.centroid.z;
23664
+ return n < e ? -1 : n > e ? 1 : 0;
23665
+ }
23666
+ i.cubes3D = P, i.gridPlanes3D = R, i.lineStrips3D = T, i.lines3D = L, i.planes3D = F, i.points3D = O, i.polygons3D = E, i.sort = K, i.triangles3D = J, Object.defineProperty(i, Symbol.toStringTag, {
23667
+ value: "Module"
23668
+ });
23669
+ });
23670
+ })(d33d$1, d33d$1.exports);
23671
+ var d33dExports = d33d$1.exports;
23731
23672
 
23732
23673
  var cssKeywords = {
23733
23674
  aliceblue: [240, 248, 255],
@@ -25876,7 +25817,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
25876
25817
  }
25877
25818
  render() {
25878
25819
  /* eslint-disable-line class-methods-use-this */
25879
- return x$3`
25820
+ return x$2`
25880
25821
  `;
25881
25822
  }
25882
25823
  willUpdate() {
@@ -25932,10 +25873,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
25932
25873
  };
25933
25874
  const startRotationX = -0.85 * Math.PI / 8;
25934
25875
  const startRotationY = 3 * Math.PI / 8;
25935
- const startRotationZ = 0;
25936
- const lineStrips3D$1 = lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25937
- const points3d = points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25938
- const grid3d = gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25876
+ const startRotationZ = 0.0000001; // Avoid d3-3d bug
25877
+
25878
+ const lineStrips3D = d33dExports.lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25879
+ const points3d = d33dExports.points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25880
+ const grid3d = d33dExports.gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
25939
25881
 
25940
25882
  // SVG Drag behaviors
25941
25883
  const svgDrag = drag().on('start', event => {
@@ -26000,35 +25942,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26000
25942
 
26001
25943
  // Axes
26002
25944
  // DATA-JOIN
26003
- const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D$1.x(datum => {
25945
+ const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D.x(datum => {
26004
25946
  return datum.x;
26005
25947
  }).y(() => {
26006
25948
  return yScale.range()[0];
26007
25949
  }).z(() => {
26008
25950
  return zScale.range()[0];
26009
- })(xAxis));
26010
- const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D$1.x(() => {
25951
+ }).data(xAxis));
25952
+ const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D.x(() => {
26011
25953
  return xScale.range()[0];
26012
25954
  }).y(datum => {
26013
25955
  return datum.y;
26014
25956
  }).z(() => {
26015
25957
  return zScale.range()[1];
26016
- })(yAxis));
26017
- const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D$1.x(() => {
25958
+ }).data(yAxis));
25959
+ const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D.x(() => {
26018
25960
  return xScale.range()[0];
26019
25961
  }).y(() => {
26020
25962
  return yScale.range()[0];
26021
25963
  }).z(datum => {
26022
25964
  return datum.z;
26023
- })(zAxis));
25965
+ }).data(zAxis));
26024
25966
  // ENTER
26025
25967
  const axisXEnter = axisXUpdate.enter().append('path').attr('class', 'd3-3d axis axis-x');
26026
25968
  const axisYEnter = axisYUpdate.enter().append('path').attr('class', 'd3-3d axis axis-y');
26027
25969
  const axisZEnter = axisZUpdate.enter().append('path').attr('class', 'd3-3d axis axis-z');
26028
25970
  // MERGE
26029
- const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D$1.draw);
26030
- const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D$1.draw);
26031
- const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D$1.draw);
25971
+ const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D.draw);
25972
+ const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D.draw);
25973
+ const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D.draw);
26032
25974
  // EXIT
26033
25975
  axisXMerge.exit().remove();
26034
25976
  axisYMerge.exit().remove();
@@ -26036,34 +25978,52 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26036
25978
 
26037
25979
  // Axis Titles
26038
25980
  // DATA-JOIN
26039
- const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D$1.x(datum => {
25981
+ const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D.x(datum => {
26040
25982
  return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
26041
25983
  }).y(() => {
26042
25984
  return yScale.range()[0] + this.rem * 1.75;
26043
25985
  }).z(() => {
26044
25986
  return zScale.range()[0] + this.rem * 1.75;
26045
- })(xAxis));
26046
- const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D$1.x(() => {
25987
+ }).data(xAxis));
25988
+ const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D.x(() => {
26047
25989
  return xScale.range()[0] - this.rem * 1.75;
26048
25990
  }).y(datum => {
26049
25991
  return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
26050
25992
  }).z(() => {
26051
25993
  return zScale.range()[1] - this.rem * 1.75;
26052
- })(yAxis));
26053
- const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D$1.x(() => {
25994
+ }).data(yAxis));
25995
+ const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D.x(() => {
26054
25996
  return xScale.range()[0] - this.rem * 1.75;
26055
25997
  }).y(() => {
26056
25998
  return yScale.range()[0] + this.rem * 1.75;
26057
25999
  }).z(datum => {
26058
26000
  return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
26059
- })(zAxis));
26060
- const titleXUpdate = svgMerge.selectAll('.title-x').data(xAxis, datum => {
26001
+ }).data(zAxis));
26002
+ const titleXUpdate = svgMerge.selectAll('.title-x').data(lineStrips3D.x(datum => {
26003
+ return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
26004
+ }).y(() => {
26005
+ return yScale.range()[0] + this.rem * 1.75;
26006
+ }).z(() => {
26007
+ return zScale.range()[0] + this.rem * 1.75;
26008
+ }).data(xAxis), datum => {
26061
26009
  return datum[0].title;
26062
26010
  });
26063
- const titleYUpdate = svgMerge.selectAll('.title-y').data(yAxis, datum => {
26011
+ const titleYUpdate = svgMerge.selectAll('.title-y').data(lineStrips3D.x(() => {
26012
+ return xScale.range()[0] - this.rem * 1.75;
26013
+ }).y(datum => {
26014
+ return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
26015
+ }).z(() => {
26016
+ return zScale.range()[1] - this.rem * 1.75;
26017
+ }).data(yAxis), datum => {
26064
26018
  return datum[0].title;
26065
26019
  });
26066
- const titleZUpdate = svgMerge.selectAll('.title-z').data(zAxis, datum => {
26020
+ const titleZUpdate = svgMerge.selectAll('.title-z').data(lineStrips3D.x(() => {
26021
+ return xScale.range()[0] - this.rem * 1.75;
26022
+ }).y(() => {
26023
+ return yScale.range()[0] + this.rem * 1.75;
26024
+ }).z(datum => {
26025
+ return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
26026
+ }).data(zAxis), datum => {
26067
26027
  return datum[0].title;
26068
26028
  });
26069
26029
  // ENTER
@@ -26077,9 +26037,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26077
26037
  const titleZEnter = titleZUpdate.enter().append('text').attr('class', 'd3-3d title title-z');
26078
26038
  titleZEnter.append('textPath').attr('href', '#title-z').attr('startOffset', '50%');
26079
26039
  // MERGE
26080
- const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D$1.draw);
26081
- const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D$1.draw);
26082
- const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D$1.draw);
26040
+ const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D.draw);
26041
+ const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D.draw);
26042
+ const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D.draw);
26083
26043
  const titleXMerge = titleXEnter.merge(titleXUpdate).select('textPath').html(datum => {
26084
26044
  return datum[0].title;
26085
26045
  });
@@ -26132,35 +26092,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26132
26092
 
26133
26093
  // Axis Ticks
26134
26094
  // DATA-JOIN
26135
- const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D$1.x(datum => {
26095
+ const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D.x(datum => {
26136
26096
  return datum.x;
26137
26097
  }).y(datum => {
26138
26098
  return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
26139
26099
  }).z(datum => {
26140
26100
  return datum.id === 'min' ? zScale.range()[0] : zScale.range()[0] + this.rem * 0.35;
26141
- })(xTicks));
26142
- const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D$1.x(datum => {
26101
+ }).data(xTicks));
26102
+ const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D.x(datum => {
26143
26103
  return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
26144
26104
  }).y(datum => {
26145
26105
  return datum.y;
26146
26106
  }).z(datum => {
26147
26107
  return datum.id === 'min' ? zScale.range()[1] : zScale.range()[1] - this.rem * 0.35;
26148
- })(yTicks));
26149
- const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D$1.x(datum => {
26108
+ }).data(yTicks));
26109
+ const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D.x(datum => {
26150
26110
  return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
26151
26111
  }).y(datum => {
26152
26112
  return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
26153
26113
  }).z(datum => {
26154
26114
  return datum.z;
26155
- })(zTicks));
26115
+ }).data(zTicks));
26156
26116
  // ENTER
26157
26117
  const ticksXEnter = ticksXUpdate.enter().append('path').attr('class', 'd3-3d tick tick-x');
26158
26118
  const ticksYEnter = ticksYUpdate.enter().append('path').attr('class', 'd3-3d tick tick-y');
26159
26119
  const ticksZEnter = ticksZUpdate.enter().append('path').attr('class', 'd3-3d tick tick-z');
26160
26120
  // MERGE
26161
- const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D$1.draw);
26162
- const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D$1.draw);
26163
- const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D$1.draw);
26121
+ const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D.draw);
26122
+ const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D.draw);
26123
+ const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D.draw);
26164
26124
  // EXIT
26165
26125
  ticksXMerge.exit().remove();
26166
26126
  ticksYMerge.exit().remove();
@@ -26168,40 +26128,58 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26168
26128
 
26169
26129
  // Axis Tick Labels
26170
26130
  // DATA-JOIN
26171
- const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D$1.x(datum => {
26131
+ const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D.x(datum => {
26172
26132
  return datum.x;
26173
26133
  }).y(datum => {
26174
26134
  return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
26175
26135
  }).z(datum => {
26176
26136
  return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
26177
- })(xTicks), datum => {
26137
+ }).data(xTicks), datum => {
26178
26138
  return datum[0].label;
26179
26139
  });
26180
- const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D$1.x(datum => {
26140
+ const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D.x(datum => {
26181
26141
  return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
26182
26142
  }).y(datum => {
26183
26143
  return datum.y;
26184
26144
  }).z(datum => {
26185
26145
  return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
26186
- })(yTicks), datum => {
26146
+ }).data(yTicks), datum => {
26187
26147
  return datum[0].label;
26188
26148
  });
26189
- const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D$1.x(datum => {
26149
+ const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D.x(datum => {
26190
26150
  return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
26191
26151
  }).y(datum => {
26192
26152
  return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
26193
26153
  }).z(datum => {
26194
26154
  return datum.z;
26195
- })(zTicks), datum => {
26155
+ }).data(zTicks), datum => {
26196
26156
  return datum[0].label;
26197
26157
  });
26198
- const labelsXUpdate = svgMerge.selectAll('.label-x').data(xTicks, datum => {
26158
+ const labelsXUpdate = svgMerge.selectAll('.label-x').data(lineStrips3D.x(datum => {
26159
+ return datum.x;
26160
+ }).y(datum => {
26161
+ return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
26162
+ }).z(datum => {
26163
+ return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
26164
+ }).data(xTicks), datum => {
26199
26165
  return datum[0].label;
26200
26166
  });
26201
- const labelsYUpdate = svgMerge.selectAll('.label-y').data(yTicks, datum => {
26167
+ const labelsYUpdate = svgMerge.selectAll('.label-y').data(lineStrips3D.x(datum => {
26168
+ return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
26169
+ }).y(datum => {
26170
+ return datum.y;
26171
+ }).z(datum => {
26172
+ return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
26173
+ }).data(yTicks), datum => {
26202
26174
  return datum[0].label;
26203
26175
  });
26204
- const labelsZUpdate = svgMerge.selectAll('.label-z').data(zTicks, datum => {
26176
+ const labelsZUpdate = svgMerge.selectAll('.label-z').data(lineStrips3D.x(datum => {
26177
+ return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
26178
+ }).y(datum => {
26179
+ return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
26180
+ }).z(datum => {
26181
+ return datum.z;
26182
+ }).data(zTicks), datum => {
26205
26183
  return datum[0].label;
26206
26184
  });
26207
26185
  // ENTER
@@ -26227,9 +26205,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26227
26205
  return `#label-z-${index}`;
26228
26206
  }).attr('startOffset', '100%');
26229
26207
  // MERGE
26230
- const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D$1.draw);
26231
- const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D$1.draw);
26232
- const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D$1.draw);
26208
+ const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D.draw);
26209
+ const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D.draw);
26210
+ const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D.draw);
26233
26211
  const labelsXMerge = labelsXEnter.merge(labelsXUpdate).select('textPath').text(datum => {
26234
26212
  return datum[0].label;
26235
26213
  });
@@ -26255,7 +26233,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26255
26233
  return yScale(datum.g);
26256
26234
  }).z(datum => {
26257
26235
  return zScale(datum.l);
26258
- })(this.point ? [{
26236
+ }).data(this.point ? [{
26259
26237
  a: this.a,
26260
26238
  g: this.g,
26261
26239
  l: this.l,
@@ -26333,7 +26311,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26333
26311
  return yScale(datum.g);
26334
26312
  }).z(datum => {
26335
26313
  return zScale(datum.l);
26336
- })(this.boundary).filter(datum => {
26314
+ }).data(this.boundary).filter(datum => {
26337
26315
  return datum[0].a >= this.range.a.start && datum[0].a <= this.range.a.stop && datum[1].a >= this.range.a.start && datum[1].a <= this.range.a.stop && datum[2].a >= this.range.a.start && datum[2].a <= this.range.a.stop && datum[3].a >= this.range.a.start && datum[3].a <= this.range.a.stop;
26338
26316
  }) : []);
26339
26317
  // ENTER
@@ -26359,21 +26337,21 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26359
26337
  return yScale(datum.g);
26360
26338
  }).z(datum => {
26361
26339
  return zScale(datum.l);
26362
- })(this.mapXY));
26340
+ }).data(this.mapXY));
26363
26341
  const mapXZUpdate = svgMerge.selectAll('.map-xz').data(grid3d.rows(range$1(this.range.l.start, this.range.l.stop + 0.01, this.range.l.step).length).x(datum => {
26364
26342
  return xScale(datum.a);
26365
26343
  }).y(datum => {
26366
26344
  return yScale(datum.g);
26367
26345
  }).z(datum => {
26368
26346
  return zScale(datum.l);
26369
- })(this.mapXZ));
26347
+ }).data(this.mapXZ));
26370
26348
  const mapYZUpdate = svgMerge.selectAll('.map-yz').data(grid3d.rows(range$1(this.range.l.start, this.range.l.stop + 0.01, this.range.l.step).length).x(datum => {
26371
26349
  return xScale(datum.a);
26372
26350
  }).y(datum => {
26373
26351
  return yScale(datum.g);
26374
26352
  }).z(datum => {
26375
26353
  return zScale(datum.l);
26376
- })(this.mapYZ));
26354
+ }).data(this.mapYZ));
26377
26355
  // ENTER
26378
26356
  const mapXYEnter = mapXYUpdate.enter().append('path').attr('class', 'd3-3d map map-xy');
26379
26357
  const mapXZEnter = mapXZUpdate.enter().append('path').attr('class', 'd3-3d map map-xz');
@@ -26412,7 +26390,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26412
26390
  mapYZUpdate.exit().remove();
26413
26391
 
26414
26392
  // Depth sorting
26415
- select(this.renderRoot).selectAll('.d3-3d').sort(points3d.sort);
26393
+ select(this.renderRoot).selectAll('.d3-3d').sort(d33dExports.sort);
26416
26394
 
26417
26395
  // Color Legend
26418
26396
  // DATA-JOIN
@@ -26851,7 +26829,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
26851
26829
  }
26852
26830
  render() {
26853
26831
  /* eslint-disable-line class-methods-use-this */
26854
- return x$3``;
26832
+ return x$2``;
26855
26833
  }
26856
26834
  willUpdate() {
26857
26835
  this.alignState();
@@ -27936,7 +27914,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
27936
27914
  }
27937
27915
  render() {
27938
27916
  /* eslint-disable-line class-methods-use-this */
27939
- return x$3`
27917
+ return x$2`
27940
27918
  `;
27941
27919
  }
27942
27920
  willUpdate() {
@@ -27992,10 +27970,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
27992
27970
  };
27993
27971
  const startRotationX = -0.85 * Math.PI / 8;
27994
27972
  const startRotationY = 3 * Math.PI / 8;
27995
- const startRotationZ = 0;
27996
- const lineStrips3D$1 = lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27997
- const points3d = points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27998
- const grid3d = gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27973
+ const startRotationZ = 0.0000001; // Avoid d3-3d bug
27974
+
27975
+ const lineStrips3D = d33dExports.lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27976
+ const points3d = d33dExports.points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27977
+ const grid3d = d33dExports.gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
27999
27978
 
28000
27979
  // SVG Drag behaviors
28001
27980
  const svgDrag = drag().on('start', event => {
@@ -28060,35 +28039,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28060
28039
 
28061
28040
  // Axes
28062
28041
  // DATA-JOIN
28063
- const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D$1.x(datum => {
28042
+ const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D.x(datum => {
28064
28043
  return datum.x;
28065
28044
  }).y(() => {
28066
28045
  return yScale.range()[0];
28067
28046
  }).z(() => {
28068
28047
  return zScale.range()[0];
28069
- })(xAxis));
28070
- const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D$1.x(() => {
28048
+ }).data(xAxis));
28049
+ const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D.x(() => {
28071
28050
  return xScale.range()[0];
28072
28051
  }).y(datum => {
28073
28052
  return datum.y;
28074
28053
  }).z(() => {
28075
28054
  return zScale.range()[1];
28076
- })(yAxis));
28077
- const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D$1.x(() => {
28055
+ }).data(yAxis));
28056
+ const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D.x(() => {
28078
28057
  return xScale.range()[0];
28079
28058
  }).y(() => {
28080
28059
  return yScale.range()[0];
28081
28060
  }).z(datum => {
28082
28061
  return datum.z;
28083
- })(zAxis));
28062
+ }).data(zAxis));
28084
28063
  // ENTER
28085
28064
  const axisXEnter = axisXUpdate.enter().append('path').attr('class', 'd3-3d axis axis-x');
28086
28065
  const axisYEnter = axisYUpdate.enter().append('path').attr('class', 'd3-3d axis axis-y');
28087
28066
  const axisZEnter = axisZUpdate.enter().append('path').attr('class', 'd3-3d axis axis-z');
28088
28067
  // MERGE
28089
- const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D$1.draw);
28090
- const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D$1.draw);
28091
- const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D$1.draw);
28068
+ const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D.draw);
28069
+ const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D.draw);
28070
+ const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D.draw);
28092
28071
  // EXIT
28093
28072
  axisXMerge.exit().remove();
28094
28073
  axisYMerge.exit().remove();
@@ -28096,34 +28075,52 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28096
28075
 
28097
28076
  // Axis Titles
28098
28077
  // DATA-JOIN
28099
- const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D$1.x(datum => {
28078
+ const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D.x(datum => {
28100
28079
  return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
28101
28080
  }).y(() => {
28102
28081
  return yScale.range()[0] + this.rem * 1.75;
28103
28082
  }).z(() => {
28104
28083
  return zScale.range()[0] + this.rem * 1.75;
28105
- })(xAxis));
28106
- const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D$1.x(() => {
28084
+ }).data(xAxis));
28085
+ const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D.x(() => {
28107
28086
  return xScale.range()[0] - this.rem * 1.75;
28108
28087
  }).y(datum => {
28109
28088
  return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
28110
28089
  }).z(() => {
28111
28090
  return zScale.range()[1] - this.rem * 1.75;
28112
- })(yAxis));
28113
- const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D$1.x(() => {
28091
+ }).data(yAxis));
28092
+ const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D.x(() => {
28114
28093
  return xScale.range()[0] - this.rem * 1.75;
28115
28094
  }).y(() => {
28116
28095
  return yScale.range()[0] + this.rem * 1.75;
28117
28096
  }).z(datum => {
28118
28097
  return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
28119
- })(zAxis));
28120
- const titleXUpdate = svgMerge.selectAll('.title-x').data(xAxis, datum => {
28098
+ }).data(zAxis));
28099
+ const titleXUpdate = svgMerge.selectAll('.title-x').data(lineStrips3D.x(datum => {
28100
+ return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
28101
+ }).y(() => {
28102
+ return yScale.range()[0] + this.rem * 1.75;
28103
+ }).z(() => {
28104
+ return zScale.range()[0] + this.rem * 1.75;
28105
+ }).data(xAxis), datum => {
28121
28106
  return datum[0].title;
28122
28107
  });
28123
- const titleYUpdate = svgMerge.selectAll('.title-y').data(yAxis, datum => {
28108
+ const titleYUpdate = svgMerge.selectAll('.title-y').data(lineStrips3D.x(() => {
28109
+ return xScale.range()[0] - this.rem * 1.75;
28110
+ }).y(datum => {
28111
+ return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
28112
+ }).z(() => {
28113
+ return zScale.range()[1] - this.rem * 1.75;
28114
+ }).data(yAxis), datum => {
28124
28115
  return datum[0].title;
28125
28116
  });
28126
- const titleZUpdate = svgMerge.selectAll('.title-z').data(zAxis, datum => {
28117
+ const titleZUpdate = svgMerge.selectAll('.title-z').data(lineStrips3D.x(() => {
28118
+ return xScale.range()[0] - this.rem * 1.75;
28119
+ }).y(() => {
28120
+ return yScale.range()[0] + this.rem * 1.75;
28121
+ }).z(datum => {
28122
+ return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
28123
+ }).data(zAxis), datum => {
28127
28124
  return datum[0].title;
28128
28125
  });
28129
28126
  // ENTER
@@ -28137,9 +28134,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28137
28134
  const titleZEnter = titleZUpdate.enter().append('text').attr('class', 'd3-3d title title-z');
28138
28135
  titleZEnter.append('textPath').attr('href', '#title-z').attr('startOffset', '50%');
28139
28136
  // MERGE
28140
- const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D$1.draw);
28141
- const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D$1.draw);
28142
- const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D$1.draw);
28137
+ const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D.draw);
28138
+ const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D.draw);
28139
+ const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D.draw);
28143
28140
  const titleXMerge = titleXEnter.merge(titleXUpdate).select('textPath').html(datum => {
28144
28141
  return datum[0].title;
28145
28142
  });
@@ -28192,35 +28189,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28192
28189
 
28193
28190
  // Axis Ticks
28194
28191
  // DATA-JOIN
28195
- const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D$1.x(datum => {
28192
+ const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D.x(datum => {
28196
28193
  return datum.x;
28197
28194
  }).y(datum => {
28198
28195
  return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
28199
28196
  }).z(datum => {
28200
28197
  return datum.id === 'min' ? zScale.range()[0] : zScale.range()[0] + this.rem * 0.35;
28201
- })(xTicks));
28202
- const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D$1.x(datum => {
28198
+ }).data(xTicks));
28199
+ const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D.x(datum => {
28203
28200
  return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
28204
28201
  }).y(datum => {
28205
28202
  return datum.y;
28206
28203
  }).z(datum => {
28207
28204
  return datum.id === 'min' ? zScale.range()[1] : zScale.range()[1] - this.rem * 0.35;
28208
- })(yTicks));
28209
- const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D$1.x(datum => {
28205
+ }).data(yTicks));
28206
+ const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D.x(datum => {
28210
28207
  return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
28211
28208
  }).y(datum => {
28212
28209
  return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
28213
28210
  }).z(datum => {
28214
28211
  return datum.z;
28215
- })(zTicks));
28212
+ }).data(zTicks));
28216
28213
  // ENTER
28217
28214
  const ticksXEnter = ticksXUpdate.enter().append('path').attr('class', 'd3-3d tick tick-x');
28218
28215
  const ticksYEnter = ticksYUpdate.enter().append('path').attr('class', 'd3-3d tick tick-y');
28219
28216
  const ticksZEnter = ticksZUpdate.enter().append('path').attr('class', 'd3-3d tick tick-z');
28220
28217
  // MERGE
28221
- const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D$1.draw);
28222
- const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D$1.draw);
28223
- const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D$1.draw);
28218
+ const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D.draw);
28219
+ const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D.draw);
28220
+ const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D.draw);
28224
28221
  // EXIT
28225
28222
  ticksXMerge.exit().remove();
28226
28223
  ticksYMerge.exit().remove();
@@ -28228,40 +28225,58 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28228
28225
 
28229
28226
  // Axis Tick Labels
28230
28227
  // DATA-JOIN
28231
- const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D$1.x(datum => {
28228
+ const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D.x(datum => {
28232
28229
  return datum.x;
28233
28230
  }).y(datum => {
28234
28231
  return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
28235
28232
  }).z(datum => {
28236
28233
  return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
28237
- })(xTicks), datum => {
28234
+ }).data(xTicks), datum => {
28238
28235
  return datum[0].label;
28239
28236
  });
28240
- const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D$1.x(datum => {
28237
+ const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D.x(datum => {
28241
28238
  return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
28242
28239
  }).y(datum => {
28243
28240
  return datum.y;
28244
28241
  }).z(datum => {
28245
28242
  return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
28246
- })(yTicks), datum => {
28243
+ }).data(yTicks), datum => {
28247
28244
  return datum[0].label;
28248
28245
  });
28249
- const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D$1.x(datum => {
28246
+ const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D.x(datum => {
28250
28247
  return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
28251
28248
  }).y(datum => {
28252
28249
  return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
28253
28250
  }).z(datum => {
28254
28251
  return datum.z;
28255
- })(zTicks), datum => {
28252
+ }).data(zTicks), datum => {
28256
28253
  return datum[0].label;
28257
28254
  });
28258
- const labelsXUpdate = svgMerge.selectAll('.label-x').data(xTicks, datum => {
28255
+ const labelsXUpdate = svgMerge.selectAll('.label-x').data(lineStrips3D.x(datum => {
28256
+ return datum.x;
28257
+ }).y(datum => {
28258
+ return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
28259
+ }).z(datum => {
28260
+ return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
28261
+ }).data(xTicks), datum => {
28259
28262
  return datum[0].label;
28260
28263
  });
28261
- const labelsYUpdate = svgMerge.selectAll('.label-y').data(yTicks, datum => {
28264
+ const labelsYUpdate = svgMerge.selectAll('.label-y').data(lineStrips3D.x(datum => {
28265
+ return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
28266
+ }).y(datum => {
28267
+ return datum.y;
28268
+ }).z(datum => {
28269
+ return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
28270
+ }).data(yTicks), datum => {
28262
28271
  return datum[0].label;
28263
28272
  });
28264
- const labelsZUpdate = svgMerge.selectAll('.label-z').data(zTicks, datum => {
28273
+ const labelsZUpdate = svgMerge.selectAll('.label-z').data(lineStrips3D.x(datum => {
28274
+ return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
28275
+ }).y(datum => {
28276
+ return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
28277
+ }).z(datum => {
28278
+ return datum.z;
28279
+ }).data(zTicks), datum => {
28265
28280
  return datum[0].label;
28266
28281
  });
28267
28282
  // ENTER
@@ -28287,9 +28302,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28287
28302
  return `#label-z-${index}`;
28288
28303
  }).attr('startOffset', '100%');
28289
28304
  // MERGE
28290
- const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D$1.draw);
28291
- const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D$1.draw);
28292
- const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D$1.draw);
28305
+ const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D.draw);
28306
+ const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D.draw);
28307
+ const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D.draw);
28293
28308
  const labelsXMerge = labelsXEnter.merge(labelsXUpdate).select('textPath').text(datum => {
28294
28309
  return datum[0].label;
28295
28310
  });
@@ -28315,7 +28330,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28315
28330
  return yScale(datum.pw);
28316
28331
  }).z(datum => {
28317
28332
  return zScale(datum.xw);
28318
- })(this.choices.slice(this.point === 'rest' ? 1 : 0, this.point === 'first' ? 1 : undefined)), datum => {
28333
+ }).data(this.choices.slice(this.point === 'rest' ? 1 : 0, this.point === 'first' ? 1 : undefined)), datum => {
28319
28334
  return datum.name;
28320
28335
  });
28321
28336
  // ENTER
@@ -28390,7 +28405,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28390
28405
  return yScale(datum.pw);
28391
28406
  }).z(datum => {
28392
28407
  return zScale(datum.xw);
28393
- })(this.boundary).filter(datum => {
28408
+ }).data(this.boundary).filter(datum => {
28394
28409
  return datum[0].pw >= this.range.pw.start && datum[0].pw <= this.range.pw.stop && datum[1].pw >= this.range.pw.start && datum[1].pw <= this.range.pw.stop && datum[2].pw >= this.range.pw.start && datum[2].pw <= this.range.pw.stop && datum[3].pw >= this.range.pw.start && datum[3].pw <= this.range.pw.stop;
28395
28410
  }) : []);
28396
28411
  // ENTER
@@ -28416,21 +28431,21 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28416
28431
  return yScale(datum.pw);
28417
28432
  }).z(datum => {
28418
28433
  return zScale(datum.xw);
28419
- })(this.mapXY));
28434
+ }).data(this.mapXY));
28420
28435
  const mapXZUpdate = svgMerge.selectAll('.map-xz').data(grid3d.rows(range$1(this.range.xw.start, this.range.xw.stop + 0.01, this.range.xw.step).length).x(datum => {
28421
28436
  return xScale(datum.xs);
28422
28437
  }).y(datum => {
28423
28438
  return yScale(datum.pw);
28424
28439
  }).z(datum => {
28425
28440
  return zScale(datum.xw);
28426
- })(this.mapXZ));
28441
+ }).data(this.mapXZ));
28427
28442
  const mapYZUpdate = svgMerge.selectAll('.map-yz').data(grid3d.rows(range$1(this.range.xw.start, this.range.xw.stop + 0.01, this.range.xw.step).length).x(datum => {
28428
28443
  return xScale(datum.xs);
28429
28444
  }).y(datum => {
28430
28445
  return yScale(datum.pw);
28431
28446
  }).z(datum => {
28432
28447
  return zScale(datum.xw);
28433
- })(this.mapYZ));
28448
+ }).data(this.mapYZ));
28434
28449
  // ENTER
28435
28450
  const mapXYEnter = mapXYUpdate.enter().append('path').attr('class', 'd3-3d map map-xy');
28436
28451
  const mapXZEnter = mapXZUpdate.enter().append('path').attr('class', 'd3-3d map map-xz');
@@ -28469,7 +28484,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28469
28484
  mapYZUpdate.exit().remove();
28470
28485
 
28471
28486
  // Depth sorting
28472
- select(this.renderRoot).selectAll('.d3-3d').sort(points3d.sort);
28487
+ select(this.renderRoot).selectAll('.d3-3d').sort(d33dExports.sort);
28473
28488
 
28474
28489
  // Color Legend
28475
28490
  // DATA-JOIN
@@ -28633,17 +28648,17 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28633
28648
  `];
28634
28649
  }
28635
28650
  render() {
28636
- return x$3`
28651
+ return x$2`
28637
28652
  <div class="holder">
28638
- ${this.trials != null ? x$3`<decidables-slider min="1" max="100" step="1" .value=${this.trials} @change=${this.setTrials.bind(this)} @input=${this.setTrials.bind(this)}>Trials</decidables-slider>` : x$3``}
28639
- ${this.duration != null ? x$3`<decidables-slider min="10" max="4000" step="10" .value=${this.duration} @change=${this.setDuration.bind(this)} @input=${this.setDuration.bind(this)}>Duration</decidables-slider>` : x$3``}
28640
- ${this.run || this.pause || this.reset ? x$3`
28653
+ ${this.trials != null ? x$2`<decidables-slider min="1" max="100" step="1" .value=${this.trials} @change=${this.setTrials.bind(this)} @input=${this.setTrials.bind(this)}>Trials</decidables-slider>` : x$2``}
28654
+ ${this.duration != null ? x$2`<decidables-slider min="10" max="4000" step="10" .value=${this.duration} @change=${this.setDuration.bind(this)} @input=${this.setDuration.bind(this)}>Duration</decidables-slider>` : x$2``}
28655
+ ${this.run || this.pause || this.reset ? x$2`
28641
28656
  <div class="buttons">
28642
- ${this.run ? x$3`<decidables-button name="run" ?disabled=${this.state === 'running' || this.state === 'ended'} @click=${this.doRun.bind(this)}>Run</decidables-button>` : x$3``}
28643
- ${this.pause ? x$3`<decidables-button name="pause" ?disabled=${this.state !== 'running'} @click=${this.doPause.bind(this)}>Pause</decidables-button>` : x$3``}
28644
- ${this.reset ? x$3`<decidables-button name="reset" ?disabled=${this.state === 'resetted'} @click=${this.doReset.bind(this)}>Reset</decidables-button>` : x$3``}
28657
+ ${this.run ? x$2`<decidables-button name="run" ?disabled=${this.state === 'running' || this.state === 'ended'} @click=${this.doRun.bind(this)}>Run</decidables-button>` : x$2``}
28658
+ ${this.pause ? x$2`<decidables-button name="pause" ?disabled=${this.state !== 'running'} @click=${this.doPause.bind(this)}>Pause</decidables-button>` : x$2``}
28659
+ ${this.reset ? x$2`<decidables-button name="reset" ?disabled=${this.state === 'resetted'} @click=${this.doReset.bind(this)}>Reset</decidables-button>` : x$2``}
28645
28660
  </div>
28646
- ` : x$3``}
28661
+ ` : x$2``}
28647
28662
  </div>`;
28648
28663
  }
28649
28664
  }
@@ -28931,31 +28946,31 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
28931
28946
  `];
28932
28947
  }
28933
28948
  render() {
28934
- return x$3`
28949
+ return x$2`
28935
28950
  <div class="holder">
28936
- ${this.trial ? x$3`
28951
+ ${this.trial ? x$2`
28937
28952
  <div class="trials">
28938
28953
  <div class="trial">
28939
28954
  <span class="label">Trial: </span><span class="count">${this.trialCount}</span><span class="of"> of </span><span class="total">${this.trialTotal}</span>
28940
28955
  </div>
28941
- </div>` : x$3``}
28956
+ </div>` : x$2``}
28942
28957
  <div class="responses">
28943
28958
  <decidables-button name="gamble" class="response ${this.state === 'feedback' && this.response === 'gamble' ? 'selected' : this.state === 'waiting' ? 'waiting' : ''}" ?disabled=${this.state !== 'waiting' || this.interactive !== true} @click=${this.gamble.bind(this)}>Gamble</decidables-button>
28944
28959
  <decidables-button name="sure" class="response ${this.state === 'feedback' && this.response === 'sure' ? 'selected' : this.state === 'waiting' ? 'waiting' : ''}" ?disabled=${this.state !== 'waiting' || this.interactive !== true} @click=${this.sure.bind(this)}>Sure</decidables-button>
28945
28960
  </div>
28946
- ${this.feedback !== 'none' || this.payoff !== 'none' ? x$3`
28961
+ ${this.feedback !== 'none' || this.payoff !== 'none' ? x$2`
28947
28962
  <div class="feedbacks">
28948
28963
  <div class="feedback gamble
28949
28964
  ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome : ''}">
28950
- ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome === 'better' ? x$3`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$3`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$3`<span class="outcome">Even</span>` : x$3`<span class="outcome">No<br>Response</span>` : ''}
28951
- ${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'gamble' ? x$3`<span class="payoff">${this.response === 'gamble' ? 'Win:' : 'Miss:'} $${this.gamblePayoff}</span>` : x$3``}
28965
+ ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome === 'better' ? x$2`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$2`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$2`<span class="outcome">Even</span>` : x$2`<span class="outcome">No<br>Response</span>` : ''}
28966
+ ${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'gamble' ? x$2`<span class="payoff">${this.response === 'gamble' ? 'Win:' : 'Miss:'} $${this.gamblePayoff}</span>` : x$2``}
28952
28967
  </div>
28953
28968
  <div class="feedback sure
28954
28969
  ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome : ''}">
28955
- ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome === 'better' ? x$3`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$3`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$3`<span class="outcome">Even</span>` : x$3`<span class="outcome">No<br>Response</span>` : ''}
28956
- ${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'sure' ? x$3`<span class="payoff">${this.response === 'sure' ? 'Win:' : 'Miss:'} $${this.surePayoff}</span>` : x$3``}
28970
+ ${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome === 'better' ? x$2`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$2`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$2`<span class="outcome">Even</span>` : x$2`<span class="outcome">No<br>Response</span>` : ''}
28971
+ ${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'sure' ? x$2`<span class="payoff">${this.response === 'sure' ? 'Win:' : 'Miss:'} $${this.surePayoff}</span>` : x$2``}
28957
28972
  </div>
28958
- </div>` : x$3``}
28973
+ </div>` : x$2``}
28959
28974
  </div>`;
28960
28975
  }
28961
28976
  }
@@ -29067,7 +29082,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29067
29082
  }
29068
29083
  render() {
29069
29084
  /* eslint-disable-line class-methods-use-this */
29070
- return x$3`
29085
+ return x$2`
29071
29086
  <slot></slot>
29072
29087
  `;
29073
29088
  }
@@ -29348,7 +29363,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29348
29363
  }
29349
29364
  render() {
29350
29365
  /* eslint-disable-line class-methods-use-this */
29351
- return x$3``;
29366
+ return x$2``;
29352
29367
  }
29353
29368
  }
29354
29369
  customElements.define('risky-outcome', RiskyOutcome);
@@ -29447,16 +29462,16 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29447
29462
  this.sendEvent();
29448
29463
  }
29449
29464
  render() {
29450
- return x$3`
29465
+ return x$2`
29451
29466
  <div class="holder">
29452
29467
  <risky-option class="gamble" ?interactive=${this.interactive} @risky-outcome-change=${this.winChange.bind(this)}>
29453
- ${this.state === 'choice' ? x$3`
29468
+ ${this.state === 'choice' ? x$2`
29454
29469
  <risky-outcome probability="${1 - this.pw}" value="${this.xl}" name="loss"></risky-outcome>
29455
29470
  <risky-outcome ?interactive=${this.interactive} probability="${this.pw}" value="${this.xw}" name="win"></risky-outcome>` : ''}
29456
29471
  </risky-option><span class="query"
29457
- >${this.state === 'choice' ? '?' : this.state === 'fixation' ? '+' : x$3`∙`}</span
29472
+ >${this.state === 'choice' ? '?' : this.state === 'fixation' ? '+' : x$2`∙`}</span
29458
29473
  ><risky-option class="sure" ?interactive=${this.interactive} @risky-outcome-change=${this.sureChange.bind(this)}>
29459
- ${this.state === 'choice' ? x$3`
29474
+ ${this.state === 'choice' ? x$2`
29460
29475
  <risky-outcome ?interactive=${this.interactive} probability="1" value="${this.xs}" name="sure"></risky-outcome>` : ''}
29461
29476
  </risky-option>
29462
29477
  </div>`;
@@ -29566,7 +29581,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29566
29581
  `];
29567
29582
  }
29568
29583
  render() {
29569
- return x$3`
29584
+ return x$2`
29570
29585
  <div class="holder">
29571
29586
  <risky-choice state="${this.state === 'stimulus' ? 'choice' : this.state === 'iti' ? 'fixation' : 'blank'}" probability="${this.pw}" win="${this.xw}" loss="${this.xl}" sure="${this.xs}"></risky-choice>
29572
29587
  </div>`;
@@ -29760,7 +29775,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29760
29775
  let g;
29761
29776
  let w;
29762
29777
  if (this.numeric) {
29763
- p = x$3`<decidables-spinner class="p bottom"
29778
+ p = x$2`<decidables-spinner class="p bottom"
29764
29779
  ?disabled=${!this.interactive}
29765
29780
  min="0"
29766
29781
  max="1"
@@ -29770,7 +29785,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29770
29785
  >
29771
29786
  <var class="math-var">p</var>
29772
29787
  </decidables-spinner>`;
29773
- g = x$3`<decidables-spinner class="g bottom"
29788
+ g = x$2`<decidables-spinner class="g bottom"
29774
29789
  ?disabled=${!this.interactive}
29775
29790
  min=${CPTMath.g.MIN}
29776
29791
  max=${CPTMath.g.MAX}
@@ -29780,7 +29795,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29780
29795
  >
29781
29796
  <var class="math-var">γ</var>
29782
29797
  </decidables-spinner>`;
29783
- w = x$3`<decidables-spinner class="w bottom"
29798
+ w = x$2`<decidables-spinner class="w bottom"
29784
29799
  disabled
29785
29800
  min="0"
29786
29801
  max="1"
@@ -29790,11 +29805,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29790
29805
  <var class="math-var">w</var>
29791
29806
  </decidables-spinner>`;
29792
29807
  } else {
29793
- p = x$3`<var class="math-var p">p</var>`;
29794
- g = x$3`<var class="math-var g">γ</var>`;
29795
- w = x$3`<var class="math-var w">w</var>`;
29808
+ p = x$2`<var class="math-var p">p</var>`;
29809
+ g = x$2`<var class="math-var g">γ</var>`;
29810
+ w = x$2`<var class="math-var w">w</var>`;
29796
29811
  }
29797
- const equation = x$3`
29812
+ const equation = x$2`
29798
29813
  <tr>
29799
29814
  <td rowspan="2">
29800
29815
  ${w}<span class="equals">=</span>
@@ -29808,7 +29823,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29808
29823
  <span class="bracket tight">[</span>${p}<sup class="exp">${g}</sup><span class="plus">+</span><span class="paren tight">(</span>1<span class="minus">−</span>${p}<span class="paren tight">)</span><sup class="exp">${g}</sup><span class="bracket tight">]</span><sup class="exp">1/${g}</sup>
29809
29824
  </td>
29810
29825
  </tr>`;
29811
- return x$3`
29826
+ return x$2`
29812
29827
  <div class="holder">
29813
29828
  <table class="equation">
29814
29829
  <tbody>
@@ -29908,7 +29923,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29908
29923
  let v;
29909
29924
  if (numeric) {
29910
29925
  const index = Number.parseInt(subscript, 10) - 1;
29911
- v = x$3`<decidables-spinner class="v"
29926
+ v = x$2`<decidables-spinner class="v"
29912
29927
  ?disabled=${!this.interactive}
29913
29928
  .value=${this.v[index]}
29914
29929
  @input=${this.vInput.bind(this, index)}
@@ -29916,7 +29931,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29916
29931
  <var class="math-var">v<sub class="subscript ${className}">${subscript}</sub></var>
29917
29932
  </decidables-spinner>`;
29918
29933
  } else {
29919
- v = x$3`<var class="math-var v">v<sub class="subscript ${className}">${subscript}</sub></var>`;
29934
+ v = x$2`<var class="math-var v">v<sub class="subscript ${className}">${subscript}</sub></var>`;
29920
29935
  }
29921
29936
  return v;
29922
29937
  }
@@ -29924,7 +29939,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29924
29939
  let w;
29925
29940
  if (numeric) {
29926
29941
  const index = Number.parseInt(subscript, 10) - 1;
29927
- w = x$3`<decidables-spinner class="w"
29942
+ w = x$2`<decidables-spinner class="w"
29928
29943
  ?disabled=${!this.interactive}
29929
29944
  min="0"
29930
29945
  max="1"
@@ -29935,7 +29950,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29935
29950
  <var class="math-var">w<sub class="subscript ${className}">${subscript}</sub></var>
29936
29951
  </decidables-spinner>`;
29937
29952
  } else {
29938
- w = x$3`<var class="math-var w">w<sub class="subscript ${className}">${subscript}</sub></var>`;
29953
+ w = x$2`<var class="math-var w">w<sub class="subscript ${className}">${subscript}</sub></var>`;
29939
29954
  }
29940
29955
  return w;
29941
29956
  }
@@ -29946,13 +29961,13 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29946
29961
  let u;
29947
29962
  let n;
29948
29963
  if (this.numeric) {
29949
- u = x$3`<decidables-spinner class="u"
29964
+ u = x$2`<decidables-spinner class="u"
29950
29965
  disabled
29951
29966
  .value=${+this.u.toFixed(3)}
29952
29967
  >
29953
29968
  <var class="math-var">U</var>
29954
29969
  </decidables-spinner>`;
29955
- n = x$3`<decidables-spinner class="n"
29970
+ n = x$2`<decidables-spinner class="n"
29956
29971
  ?disabled=${!this.interactive}
29957
29972
  min="1"
29958
29973
  max="4"
@@ -29963,10 +29978,10 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29963
29978
  <var class="math-var">n</var>
29964
29979
  </decidables-spinner>`;
29965
29980
  } else {
29966
- u = x$3`<var class="math-var u">U</var>`;
29967
- n = x$3`<var class="math-var subscript">n</var>`;
29981
+ u = x$2`<var class="math-var u">U</var>`;
29982
+ n = x$2`<var class="math-var subscript">n</var>`;
29968
29983
  }
29969
- const equation = x$3`
29984
+ const equation = x$2`
29970
29985
  <tr>
29971
29986
  <td>
29972
29987
  ${u}<span class="equals">=</span>
@@ -29983,14 +29998,14 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
29983
29998
  </td>
29984
29999
  <td>
29985
30000
  ${this.numeric ? Array(this.nMax).fill().map((_, index) => {
29986
- return index < this.n ? x$3`<span class="addend tight" ${F({
30001
+ return index < this.n ? x$2`<span class="addend tight" ${F({
29987
30002
  in: d,
29988
30003
  out: d
29989
- })}>${index !== 0 ? x$3`<span class="plus">+</span>` : x$3``}${this.vTemplate(index + 1, 'math-num', true)}&nbsp;${this.wTemplate(index + 1, 'math-num', true)}</span>` : null;
29990
- }) : x$3`${this.vTemplate('1', 'math-num', false)}&nbsp;${this.wTemplate('1', 'math-num', false)}<span class="plus">+</span><span class="ellipsis">…</span><span class="plus">+</span>${this.vTemplate('n', 'math-var', false)}&nbsp;${this.wTemplate('n', 'math-var', false)}`}
30004
+ })}>${index !== 0 ? x$2`<span class="plus">+</span>` : x$2``}${this.vTemplate(index + 1, 'math-num', true)}&nbsp;${this.wTemplate(index + 1, 'math-num', true)}</span>` : null;
30005
+ }) : x$2`${this.vTemplate('1', 'math-num', false)}&nbsp;${this.wTemplate('1', 'math-num', false)}<span class="plus">+</span><span class="ellipsis">…</span><span class="plus">+</span>${this.vTemplate('n', 'math-var', false)}&nbsp;${this.wTemplate('n', 'math-var', false)}`}
29991
30006
  </td>
29992
30007
  </tr>`;
29993
- return x$3`
30008
+ return x$2`
29994
30009
  <div class="holder">
29995
30010
  <table class="equation">
29996
30011
  <tbody>
@@ -30079,7 +30094,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30079
30094
  let l;
30080
30095
  let v;
30081
30096
  if (this.numeric) {
30082
- x = x$3`<decidables-spinner class="x bottom"
30097
+ x = x$2`<decidables-spinner class="x bottom"
30083
30098
  ?disabled=${!this.interactive}
30084
30099
  step="1"
30085
30100
  .value=${this.x}
@@ -30087,7 +30102,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30087
30102
  >
30088
30103
  <var class="math-var">x</var>
30089
30104
  </decidables-spinner>`;
30090
- a = x$3`<decidables-spinner class="a bottom"
30105
+ a = x$2`<decidables-spinner class="a bottom"
30091
30106
  ?disabled=${!this.interactive}
30092
30107
  min=${CPTMath.a.MIN}
30093
30108
  max=${CPTMath.a.MAX}
@@ -30097,7 +30112,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30097
30112
  >
30098
30113
  <var class="math-var">α</var>
30099
30114
  </decidables-spinner>`;
30100
- l = x$3`<decidables-spinner class="l bottom"
30115
+ l = x$2`<decidables-spinner class="l bottom"
30101
30116
  ?disabled=${!this.interactive}
30102
30117
  min=${CPTMath.l.MIN}
30103
30118
  step=${CPTMath.l.STEP}
@@ -30106,16 +30121,16 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30106
30121
  >
30107
30122
  <var class="math-var">λ</var>
30108
30123
  </decidables-spinner>`;
30109
- v = x$3`<decidables-spinner class="v bottom" disabled step=".001" .value="${+this.v.toFixed(3)}">
30124
+ v = x$2`<decidables-spinner class="v bottom" disabled step=".001" .value="${+this.v.toFixed(3)}">
30110
30125
  <var class="math-var">v</var>
30111
30126
  </decidables-spinner>`;
30112
30127
  } else {
30113
- x = x$3`<var class="math-var x">x</var>`;
30114
- a = x$3`<var class="math-var a">α</var>`;
30115
- l = x$3`<var class="math-var l">λ</var>`;
30116
- v = x$3`<var class="math-var v">v</var>`;
30128
+ x = x$2`<var class="math-var x">x</var>`;
30129
+ a = x$2`<var class="math-var a">α</var>`;
30130
+ l = x$2`<var class="math-var l">λ</var>`;
30131
+ v = x$2`<var class="math-var v">v</var>`;
30117
30132
  }
30118
- const equation = x$3`
30133
+ const equation = x$2`
30119
30134
  <tr>
30120
30135
  <td rowspan="2">
30121
30136
  ${v}<span class="equals">=</span><span class="brace tight">{</span>
@@ -30129,7 +30144,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30129
30144
  <span class="minus tight">−</span>${l}<span class="paren tight">(</span><span class="minus tight">−</span>${x}<span class="paren tight">)</span><sup class="exp">${a}</sup>,&emsp;if ${x}<span class="equals">&lt;</span>0
30130
30145
  </td>
30131
30146
  </tr>`;
30132
- return x$3`
30147
+ return x$2`
30133
30148
  <div class="holder">
30134
30149
  <table class="equation">
30135
30150
  <tbody>
@@ -30196,7 +30211,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
30196
30211
  }
30197
30212
  render() {
30198
30213
  /* eslint-disable-line class-methods-use-this */
30199
- return x$3`
30214
+ return x$2`
30200
30215
  <div class="holder">
30201
30216
  <div class="body">
30202
30217
  <slot>Empty!</slot>