@decidables/detectable-elements 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -372,7 +372,7 @@ const i = globalThis.trustedTypes,
372
372
  v = /-->/g,
373
373
  a = />/g,
374
374
  f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,
375
- _$n = /'/g,
375
+ _$p = /'/g,
376
376
  m = /"/g,
377
377
  g = /^(?:script|style|textarea|title)$/i,
378
378
  p = t => (i, ...s) => ({
@@ -412,7 +412,7 @@ const i = globalThis.trustedTypes,
412
412
  p = -1,
413
413
  $ = 0;
414
414
 
415
- for (; $ < s.length && (d.lastIndex = $, u = d.exec(s), null !== u);) $ = d.lastIndex, d === c ? "!--" === u[1] ? d = v : void 0 !== u[1] ? d = a : void 0 !== u[2] ? (g.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = f) : void 0 !== u[3] && (d = f) : d === f ? ">" === u[0] ? (d = null != h ? h : c, p = -1) : void 0 === u[1] ? p = -2 : (p = d.lastIndex - u[2].length, o = u[1], d = void 0 === u[3] ? f : '"' === u[3] ? m : _$n) : d === m || d === _$n ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
415
+ for (; $ < s.length && (d.lastIndex = $, u = d.exec(s), null !== u);) $ = d.lastIndex, d === c ? "!--" === u[1] ? d = v : void 0 !== u[1] ? d = a : void 0 !== u[2] ? (g.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = f) : void 0 !== u[3] && (d = f) : d === f ? ">" === u[0] ? (d = null != h ? h : c, p = -1) : void 0 === u[1] ? p = -2 : (p = d.lastIndex - u[2].length, o = u[1], d = void 0 === u[3] ? f : '"' === u[3] ? m : _$p) : d === m || d === _$p ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
416
416
 
417
417
  const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
418
418
  r += d === c ? s + n$1 : p >= 0 ? (l.push(o), s.slice(0, p) + "$lit$" + s.slice(p) + e + y) : s + e + (-2 === p ? (l.push(void 0), i) : y);
@@ -6462,14 +6462,14 @@ function line (x$1, y$1) {
6462
6462
  return line;
6463
6463
  }
6464
6464
 
6465
- let _$m = t => t,
6466
- _t$m,
6467
- _t2$k,
6468
- _t3$a,
6469
- _t4$a,
6470
- _t5$a,
6471
- _t6$a,
6472
- _t7$a,
6465
+ let _$o = t => t,
6466
+ _t$o,
6467
+ _t2$m,
6468
+ _t3$c,
6469
+ _t4$c,
6470
+ _t5$c,
6471
+ _t6$c,
6472
+ _t7$c,
6473
6473
  _t8$8,
6474
6474
  _t9$8;
6475
6475
  /*
@@ -6649,10 +6649,11 @@ class DecidablesElement extends s {
6649
6649
  }
6650
6650
 
6651
6651
  static get svgFilters() {
6652
- const shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
6652
+ const shadows = DecidablesElement.shadows;
6653
+ /* eslint-disable-line prefer-destructuring */
6653
6654
 
6654
6655
  const filters = shadows.elevations.map(z => {
6655
- return y$1(_t$m || (_t$m = _$m`
6656
+ return y$1(_t$o || (_t$o = _$o`
6656
6657
  <filter id=${0} x="-250%" y="-250%" width="600%" height="600%">
6657
6658
  <feComponentTransfer in="SourceAlpha" result="solid">
6658
6659
  <feFuncA type="table" tableValues="0 1 1"/>
@@ -6682,9 +6683,9 @@ class DecidablesElement extends s {
6682
6683
  <feMergeNode in="finalA" />
6683
6684
  <feMergeNode in="SourceGraphic" />
6684
6685
  </feMerge>
6685
- </filter>`), `shadow-${z}`, shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y$1(_t2$k || (_t2$k = _$m``)) : y$1(_t3$a || (_t3$a = _$m`<feMorphology in="offU" result="spreadU" operator=${0} radius=${0} />`), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y$1(_t4$a || (_t4$a = _$m``)) : y$1(_t5$a || (_t5$a = _$m`<feMorphology in="offP" result="spreadP" operator=${0} radius=${0} />`), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y$1(_t6$a || (_t6$a = _$m``)) : y$1(_t7$a || (_t7$a = _$m`<feMorphology in="offA" result="spreadA" operator=${0} radius=${0} />`), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost);
6686
+ </filter>`), `shadow-${z}`, shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y$1(_t2$m || (_t2$m = _$o``)) : y$1(_t3$c || (_t3$c = _$o`<feMorphology in="offU" result="spreadU" operator=${0} radius=${0} />`), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y$1(_t4$c || (_t4$c = _$o``)) : y$1(_t5$c || (_t5$c = _$o`<feMorphology in="offP" result="spreadP" operator=${0} radius=${0} />`), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y$1(_t6$c || (_t6$c = _$o``)) : y$1(_t7$c || (_t7$c = _$o`<feMorphology in="offA" result="spreadA" operator=${0} radius=${0} />`), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost);
6686
6687
  });
6687
- return y$1(_t8$8 || (_t8$8 = _$m`
6688
+ return y$1(_t8$8 || (_t8$8 = _$o`
6688
6689
  <svg class="defs">
6689
6690
  <defs>
6690
6691
  ${0}
@@ -6694,7 +6695,7 @@ class DecidablesElement extends s {
6694
6695
  }
6695
6696
 
6696
6697
  static get styles() {
6697
- return r$2(_t9$8 || (_t9$8 = _$m`
6698
+ return r$2(_t9$8 || (_t9$8 = _$o`
6698
6699
  :host {
6699
6700
  ---shadow-0: var(--shadow-0, ${0});
6700
6701
  ---shadow-2: var(--shadow-2, ${0});
@@ -6716,6 +6717,8 @@ class DecidablesElement extends s {
6716
6717
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
6717
6718
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
6718
6719
 
6720
+ ---border: var(--border, 1px solid var(---color-border));
6721
+ ---border-radius: var(--border-radius, 0.25rem);
6719
6722
  ---transition-duration: var(--transition-duration, 500ms);
6720
6723
 
6721
6724
  font-family: var(---font-family-base);
@@ -6749,14 +6752,14 @@ class DecidablesElement extends s {
6749
6752
  width: 0;
6750
6753
  height: 0;
6751
6754
  }
6752
- `), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
6755
+ `), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.dark25), o$3(this.greys.grey), o$3(this.greys.dark50), o$3(this.greys.dark75));
6753
6756
  }
6754
6757
 
6755
6758
  }
6756
6759
 
6757
- let _$l = t => t,
6758
- _t$l,
6759
- _t2$j;
6760
+ let _$n = t => t,
6761
+ _t$n,
6762
+ _t2$l;
6760
6763
  class DecidablesButton extends DecidablesElement {
6761
6764
  static get properties() {
6762
6765
  return {
@@ -6775,7 +6778,7 @@ class DecidablesButton extends DecidablesElement {
6775
6778
  }
6776
6779
 
6777
6780
  static get styles() {
6778
- return [super.styles, r$2(_t$l || (_t$l = _$l`
6781
+ return [super.styles, r$2(_t$n || (_t$n = _$n`
6779
6782
  :host {
6780
6783
  margin: 0.25rem;
6781
6784
  }
@@ -6791,7 +6794,7 @@ class DecidablesButton extends DecidablesElement {
6791
6794
  color: var(---color-text-inverse);
6792
6795
 
6793
6796
  border: 0;
6794
- border-radius: 0.25rem;
6797
+ border-radius: var(---border-radius);
6795
6798
  outline: none;
6796
6799
  }
6797
6800
 
@@ -6832,7 +6835,7 @@ class DecidablesButton extends DecidablesElement {
6832
6835
  }
6833
6836
 
6834
6837
  render() {
6835
- return $(_t2$j || (_t2$j = _$l`
6838
+ return $(_t2$l || (_t2$l = _$n`
6836
6839
  <button ?disabled=${0}>
6837
6840
  <slot></slot>
6838
6841
  </button>
@@ -6850,9 +6853,9 @@ customElements.define('decidables-button', DecidablesButton);
6850
6853
 
6851
6854
  const l = l => null != l ? l : w;
6852
6855
 
6853
- let _$k = t => t,
6854
- _t$k,
6855
- _t2$i;
6856
+ let _$m = t => t,
6857
+ _t$m,
6858
+ _t2$k;
6856
6859
  class DecidablesSlider extends DecidablesElement {
6857
6860
  static get properties() {
6858
6861
  return {
@@ -6909,7 +6912,7 @@ class DecidablesSlider extends DecidablesElement {
6909
6912
  }
6910
6913
 
6911
6914
  static get styles() {
6912
- return [super.styles, r$2(_t$k || (_t$k = _$k`
6915
+ return [super.styles, r$2(_t$m || (_t$m = _$m`
6913
6916
  :host {
6914
6917
  ---shadow-2-rotate: var(--shadow-2-rotate, ${0});
6915
6918
  ---shadow-4-rotate: var(--shadow-4-rotate, ${0});
@@ -7163,7 +7166,7 @@ class DecidablesSlider extends DecidablesElement {
7163
7166
  }
7164
7167
 
7165
7168
  render() {
7166
- return $(_t2$i || (_t2$i = _$k`
7169
+ return $(_t2$k || (_t2$k = _$m`
7167
7170
  <label for="slider">
7168
7171
  <slot></slot>
7169
7172
  </label>
@@ -7177,9 +7180,9 @@ class DecidablesSlider extends DecidablesElement {
7177
7180
  }
7178
7181
  customElements.define('decidables-slider', DecidablesSlider);
7179
7182
 
7180
- let _$j = t => t,
7181
- _t$j,
7182
- _t2$h;
7183
+ let _$l = t => t,
7184
+ _t$l,
7185
+ _t2$j;
7183
7186
  class DecidablesSpinner extends DecidablesElement {
7184
7187
  static get properties() {
7185
7188
  return {
@@ -7226,7 +7229,7 @@ class DecidablesSpinner extends DecidablesElement {
7226
7229
  }
7227
7230
 
7228
7231
  static get styles() {
7229
- return [super.styles, r$2(_t$j || (_t$j = _$j`
7232
+ return [super.styles, r$2(_t$l || (_t$l = _$l`
7230
7233
  :host {
7231
7234
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
7232
7235
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
@@ -7309,7 +7312,7 @@ class DecidablesSpinner extends DecidablesElement {
7309
7312
  }
7310
7313
 
7311
7314
  render() {
7312
- return $(_t2$h || (_t2$h = _$j`
7315
+ return $(_t2$j || (_t2$j = _$l`
7313
7316
  <label>
7314
7317
  <slot></slot>
7315
7318
  <input ?disabled=${0} type="number" min=${0} max=${0} step=${0} .value=${0} @input=${0}>
@@ -7320,9 +7323,9 @@ class DecidablesSpinner extends DecidablesElement {
7320
7323
  }
7321
7324
  customElements.define('decidables-spinner', DecidablesSpinner);
7322
7325
 
7323
- let _$i = t => t,
7324
- _t$i,
7325
- _t2$g;
7326
+ let _$k = t => t,
7327
+ _t$k,
7328
+ _t2$i;
7326
7329
  class DecidablesSwitch extends DecidablesElement {
7327
7330
  static get properties() {
7328
7331
  return {
@@ -7357,7 +7360,7 @@ class DecidablesSwitch extends DecidablesElement {
7357
7360
  }
7358
7361
 
7359
7362
  static get styles() {
7360
- return [super.styles, r$2(_t$i || (_t$i = _$i`
7363
+ return [super.styles, r$2(_t$k || (_t$k = _$k`
7361
7364
  :host {
7362
7365
  display: flex;
7363
7366
 
@@ -7480,7 +7483,7 @@ class DecidablesSwitch extends DecidablesElement {
7480
7483
  }
7481
7484
 
7482
7485
  render() {
7483
- return $(_t2$g || (_t2$g = _$i`
7486
+ return $(_t2$i || (_t2$i = _$k`
7484
7487
  <input type="checkbox" id="switch" ?checked=${0} ?disabled=${0} @change=${0}>
7485
7488
  <label for="switch">
7486
7489
  <slot name="off-label"></slot>
@@ -7494,9 +7497,9 @@ class DecidablesSwitch extends DecidablesElement {
7494
7497
  }
7495
7498
  customElements.define('decidables-switch', DecidablesSwitch);
7496
7499
 
7497
- let _$h = t => t,
7498
- _t$h,
7499
- _t2$f;
7500
+ let _$j = t => t,
7501
+ _t$j,
7502
+ _t2$h;
7500
7503
  class DecidablesToggle extends DecidablesElement {
7501
7504
  static get properties() {
7502
7505
  return {
@@ -7515,7 +7518,7 @@ class DecidablesToggle extends DecidablesElement {
7515
7518
  }
7516
7519
 
7517
7520
  static get styles() {
7518
- return [super.styles, r$2(_t$h || (_t$h = _$h`
7521
+ return [super.styles, r$2(_t$j || (_t$j = _$j`
7519
7522
  fieldset {
7520
7523
  display: flex;
7521
7524
 
@@ -7536,7 +7539,7 @@ class DecidablesToggle extends DecidablesElement {
7536
7539
  }
7537
7540
 
7538
7541
  render() {
7539
- return $(_t2$f || (_t2$f = _$h`
7542
+ return $(_t2$h || (_t2$h = _$j`
7540
7543
  <fieldset ?disabled=${0}>
7541
7544
  <legend><slot name="label"></slot></legend>
7542
7545
  <slot></slot>
@@ -7547,9 +7550,9 @@ class DecidablesToggle extends DecidablesElement {
7547
7550
  }
7548
7551
  customElements.define('decidables-toggle', DecidablesToggle);
7549
7552
 
7550
- let _$g = t => t,
7551
- _t$g,
7552
- _t2$e;
7553
+ let _$i = t => t,
7554
+ _t$i,
7555
+ _t2$g;
7553
7556
  class DecidablesToggleOption extends DecidablesElement {
7554
7557
  static get properties() {
7555
7558
  return {
@@ -7597,7 +7600,7 @@ class DecidablesToggleOption extends DecidablesElement {
7597
7600
  }
7598
7601
 
7599
7602
  static get styles() {
7600
- return [super.styles, r$2(_t$g || (_t$g = _$g`
7603
+ return [super.styles, r$2(_t$i || (_t$i = _$i`
7601
7604
  :host {
7602
7605
  display: flex;
7603
7606
  }
@@ -7694,7 +7697,7 @@ class DecidablesToggleOption extends DecidablesElement {
7694
7697
  }
7695
7698
 
7696
7699
  render() {
7697
- return $(_t2$e || (_t2$e = _$g`
7700
+ return $(_t2$g || (_t2$g = _$i`
7698
7701
  <input type="radio" id="toggle-option" name=${0} value=${0} .checked=${0} @change=${0}>
7699
7702
  <label for="toggle-option">
7700
7703
  <slot></slot>
@@ -7705,6 +7708,23 @@ class DecidablesToggleOption extends DecidablesElement {
7705
7708
  }
7706
7709
  customElements.define('decidables-toggle-option', DecidablesToggleOption);
7707
7710
 
7711
+ /*
7712
+ Attribute: Space-separated sequence of numbers
7713
+ Property: Array of numbers
7714
+ */
7715
+ const DecidablesConverterArray = {
7716
+ fromAttribute: value => {
7717
+ return value.split(/\s+/).map(item => {
7718
+ return Number.parseFloat(item);
7719
+ });
7720
+ },
7721
+ toAttribute: value => {
7722
+ return value.length ? value.map(item => {
7723
+ return item.toFixed(3);
7724
+ }).join(' ') : null;
7725
+ }
7726
+ };
7727
+
7708
7728
  /*
7709
7729
  Attribute: Space-separated sequence of strings
7710
7730
  Property: Set of strings
@@ -7718,8 +7738,8 @@ const DecidablesConverterSet = {
7718
7738
  }
7719
7739
  };
7720
7740
 
7721
- let _$f = t => t,
7722
- _t$f;
7741
+ let _$h = t => t,
7742
+ _t$h;
7723
7743
  /*
7724
7744
  DetectableElement Base Class - Not intended for instantiation!
7725
7745
  <detectable-element>
@@ -7776,7 +7796,7 @@ class DetectableElement extends DecidablesElement {
7776
7796
  }
7777
7797
 
7778
7798
  static get styles() {
7779
- return [super.styles, r$2(_t$f || (_t$f = _$f`
7799
+ return [super.styles, r$2(_t$h || (_t$h = _$h`
7780
7800
  :host {
7781
7801
  ---color-h: var(--color-h, ${0});
7782
7802
  ---color-m: var(--color-m, ${0});
@@ -7831,9 +7851,9 @@ class DetectableElement extends DecidablesElement {
7831
7851
 
7832
7852
  }
7833
7853
 
7834
- let _$e = t => t,
7835
- _t$e,
7836
- _t2$d;
7854
+ let _$g = t => t,
7855
+ _t$g,
7856
+ _t2$f;
7837
7857
  /*
7838
7858
  RDKTask element
7839
7859
  <rdk-task>
@@ -7987,7 +8007,7 @@ class RDKTask extends DetectableElement {
7987
8007
  }
7988
8008
 
7989
8009
  static get styles() {
7990
- return [super.styles, r$2(_t$e || (_t$e = _$e`
8010
+ return [super.styles, r$2(_t$g || (_t$g = _$g`
7991
8011
  :host {
7992
8012
  display: inline-block;
7993
8013
 
@@ -8036,8 +8056,8 @@ class RDKTask extends DetectableElement {
8036
8056
  }
8037
8057
 
8038
8058
  render() {
8039
- // eslint-disable-line class-methods-use-this
8040
- return $(_t2$d || (_t2$d = _$e``));
8059
+ /* eslint-disable-line class-methods-use-this */
8060
+ return $(_t2$f || (_t2$f = _$g``));
8041
8061
  }
8042
8062
 
8043
8063
  getDimensions() {
@@ -13225,9 +13245,9 @@ class SDTMath {
13225
13245
 
13226
13246
  }
13227
13247
 
13228
- let _$d = t => t,
13229
- _t$d,
13230
- _t2$c;
13248
+ let _$f = t => t,
13249
+ _t$f,
13250
+ _t2$e;
13231
13251
  /*
13232
13252
  ROCSpace element
13233
13253
  <roc-space>
@@ -13447,7 +13467,7 @@ class ROCSpace extends DetectableElement {
13447
13467
  }
13448
13468
 
13449
13469
  static get styles() {
13450
- return [super.styles, r$2(_t$d || (_t$d = _$d`
13470
+ return [super.styles, r$2(_t$f || (_t$f = _$f`
13451
13471
  :host {
13452
13472
  display: inline-block;
13453
13473
 
@@ -13574,7 +13594,7 @@ class ROCSpace extends DetectableElement {
13574
13594
  .point .label {
13575
13595
  font-size: 0.75rem;
13576
13596
 
13577
- dominant-baseline: middle;
13597
+ dominant-baseline: central;
13578
13598
  text-anchor: middle;
13579
13599
 
13580
13600
  fill: var(---color-text-inverse);
@@ -13583,8 +13603,8 @@ class ROCSpace extends DetectableElement {
13583
13603
  }
13584
13604
 
13585
13605
  render() {
13586
- // eslint-disable-line class-methods-use-this
13587
- return $(_t2$c || (_t2$c = _$d`
13606
+ /* eslint-disable-line class-methods-use-this */
13607
+ return $(_t2$e || (_t2$e = _$f`
13588
13608
  ${0}
13589
13609
  `), DetectableElement.svgFilters);
13590
13610
  }
@@ -14124,14 +14144,14 @@ class ROCSpace extends DetectableElement {
14124
14144
  }
14125
14145
  customElements.define('roc-space', ROCSpace);
14126
14146
 
14127
- let _$c = t => t,
14128
- _t$c,
14129
- _t2$b,
14130
- _t3$9,
14131
- _t4$9,
14132
- _t5$9,
14133
- _t6$9,
14134
- _t7$9,
14147
+ let _$e = t => t,
14148
+ _t$e,
14149
+ _t2$d,
14150
+ _t3$b,
14151
+ _t4$b,
14152
+ _t5$b,
14153
+ _t6$b,
14154
+ _t7$b,
14135
14155
  _t8$7,
14136
14156
  _t9$7,
14137
14157
  _t10$7,
@@ -14218,7 +14238,7 @@ class DetectableControl extends DetectableElement {
14218
14238
  this.duration = undefined;
14219
14239
  this.coherence = undefined;
14220
14240
  this.payoff = undefined;
14221
- this.colors = ['none', 'accuracy', 'stimulus', 'response', 'outcome'];
14241
+ this.colors = ['none', 'accuracy', 'stimulus', 'response', 'outcome', 'all'];
14222
14242
  this.color = undefined;
14223
14243
  this.zRoc = undefined;
14224
14244
  this.run = false;
@@ -14318,7 +14338,7 @@ class DetectableControl extends DetectableElement {
14318
14338
  }
14319
14339
 
14320
14340
  static get styles() {
14321
- return [super.styles, r$2(_t$c || (_t$c = _$c`
14341
+ return [super.styles, r$2(_t$e || (_t$e = _$e`
14322
14342
  :host {
14323
14343
  display: inline-block;
14324
14344
  }
@@ -14349,7 +14369,7 @@ class DetectableControl extends DetectableElement {
14349
14369
  }
14350
14370
 
14351
14371
  render() {
14352
- return $(_t2$b || (_t2$b = _$c`
14372
+ return $(_t2$d || (_t2$d = _$e`
14353
14373
  <div class="holder">
14354
14374
  ${0}
14355
14375
  ${0}
@@ -14358,7 +14378,7 @@ class DetectableControl extends DetectableElement {
14358
14378
  ${0}
14359
14379
  ${0}
14360
14380
  ${0}
14361
- </div>`), this.trials ? $(_t3$9 || (_t3$9 = _$c`<decidables-slider min="1" max="100" step="1" .value=${0} @change=${0} @input=${0}>Trials</decidables-slider>`), this.trials, this.setTrials.bind(this), this.setTrials.bind(this)) : $(_t4$9 || (_t4$9 = _$c``)), this.duration ? $(_t5$9 || (_t5$9 = _$c`<decidables-slider min="10" max="2000" step="10" .value=${0} @change=${0} @input=${0}>Duration</decidables-slider>`), this.duration, this.setDuration.bind(this), this.setDuration.bind(this)) : $(_t6$9 || (_t6$9 = _$c``)), this.coherence ? $(_t7$9 || (_t7$9 = _$c`<decidables-slider min="0" max="1" step=".01" .value=${0} @change=${0} @input=${0}>Coherence</decidables-slider>`), this.coherence, this.setCoherence.bind(this), this.setCoherence.bind(this)) : $(_t8$7 || (_t8$7 = _$c``)), this.payoff ? $(_t9$7 || (_t9$7 = _$c`<decidables-slider class="payoff" min="0" max="100" step="1" .value=${0} @change=${0} @input=${0}>Payoff</decidables-slider>`), this.payoff, this.setPayoff.bind(this), this.setPayoff.bind(this)) : $(_t10$7 || (_t10$7 = _$c``)), this.color !== undefined ? $(_t11$7 || (_t11$7 = _$c`
14381
+ </div>`), this.trials ? $(_t3$b || (_t3$b = _$e`<decidables-slider min="1" max="100" step="1" .value=${0} @change=${0} @input=${0}>Trials</decidables-slider>`), this.trials, this.setTrials.bind(this), this.setTrials.bind(this)) : $(_t4$b || (_t4$b = _$e``)), this.duration ? $(_t5$b || (_t5$b = _$e`<decidables-slider min="10" max="2000" step="10" .value=${0} @change=${0} @input=${0}>Duration</decidables-slider>`), this.duration, this.setDuration.bind(this), this.setDuration.bind(this)) : $(_t6$b || (_t6$b = _$e``)), this.coherence ? $(_t7$b || (_t7$b = _$e`<decidables-slider min="0" max="1" step=".01" .value=${0} @change=${0} @input=${0}>Coherence</decidables-slider>`), this.coherence, this.setCoherence.bind(this), this.setCoherence.bind(this)) : $(_t8$7 || (_t8$7 = _$e``)), this.payoff ? $(_t9$7 || (_t9$7 = _$e`<decidables-slider class="payoff" min="0" max="100" step="1" .value=${0} @change=${0} @input=${0}>Payoff</decidables-slider>`), this.payoff, this.setPayoff.bind(this), this.setPayoff.bind(this)) : $(_t10$7 || (_t10$7 = _$e``)), this.color !== undefined ? $(_t11$7 || (_t11$7 = _$e`
14362
14382
  <decidables-toggle @change=${0}>
14363
14383
  <span slot="label">Emphasis</span>
14364
14384
  <decidables-toggle-option name="toggle" value="none" ?checked=${0}>None</decidables-toggle-option>
@@ -14366,27 +14386,28 @@ class DetectableControl extends DetectableElement {
14366
14386
  <decidables-toggle-option name="toggle" value="stimulus" ?checked=${0}>Stimulus</decidables-toggle-option>
14367
14387
  <decidables-toggle-option name="toggle" value="response" ?checked=${0}>Response</decidables-toggle-option>
14368
14388
  <decidables-toggle-option name="toggle" value="outcome" ?checked=${0}>Outcome</decidables-toggle-option>
14389
+ <decidables-toggle-option name="toggle" value="all" ?checked=${0}>All</decidables-toggle-option>
14369
14390
  </decidables-toggle>
14370
- `), this.chooseColor.bind(this), this.color === 'none', this.color === 'accuracy', this.color === 'stimulus', this.color === 'response', this.color === 'outcome') : $(_t12$2 || (_t12$2 = _$c``)), this.zRoc !== undefined ? $(_t13$2 || (_t13$2 = _$c`
14391
+ `), this.chooseColor.bind(this), this.color === 'none', this.color === 'accuracy', this.color === 'stimulus', this.color === 'response', this.color === 'outcome', this.color === 'all') : $(_t12$2 || (_t12$2 = _$e``)), this.zRoc !== undefined ? $(_t13$2 || (_t13$2 = _$e`
14371
14392
  <decidables-switch ?checked=${0} @change=${0}>
14372
14393
  <span class="math-var">z</span>ROC
14373
14394
  <span slot="off-label">ROC</span>
14374
14395
  </decidables-switch>
14375
- `), this.zRoc, this.flipZRoc.bind(this)) : $(_t14$2 || (_t14$2 = _$c``)), this.run || this.pause || this.reset ? $(_t15$2 || (_t15$2 = _$c`
14396
+ `), this.zRoc, this.flipZRoc.bind(this)) : $(_t14$2 || (_t14$2 = _$e``)), this.run || this.pause || this.reset ? $(_t15$2 || (_t15$2 = _$e`
14376
14397
  <div class="buttons">
14377
14398
  ${0}
14378
14399
  ${0}
14379
14400
  ${0}
14380
14401
  </div>
14381
- `), this.run ? $(_t16$2 || (_t16$2 = _$c`<decidables-button name="run" ?disabled=${0} @click=${0}>Run</decidables-button>`), this.state === 'running' || this.state === 'ended', this.doRun.bind(this)) : $(_t17$2 || (_t17$2 = _$c``)), this.pause ? $(_t18$2 || (_t18$2 = _$c`<decidables-button name="pause" ?disabled=${0} @click=${0}>Pause</decidables-button>`), this.state !== 'running', this.doPause.bind(this)) : $(_t19$2 || (_t19$2 = _$c``)), this.reset ? $(_t20$2 || (_t20$2 = _$c`<decidables-button name="reset" ?disabled=${0} @click=${0}>Reset</decidables-button>`), this.state === 'resetted', this.doReset.bind(this)) : $(_t21$1 || (_t21$1 = _$c``))) : $(_t22$1 || (_t22$1 = _$c``)));
14402
+ `), this.run ? $(_t16$2 || (_t16$2 = _$e`<decidables-button name="run" ?disabled=${0} @click=${0}>Run</decidables-button>`), this.state === 'running' || this.state === 'ended', this.doRun.bind(this)) : $(_t17$2 || (_t17$2 = _$e``)), this.pause ? $(_t18$2 || (_t18$2 = _$e`<decidables-button name="pause" ?disabled=${0} @click=${0}>Pause</decidables-button>`), this.state !== 'running', this.doPause.bind(this)) : $(_t19$2 || (_t19$2 = _$e``)), this.reset ? $(_t20$2 || (_t20$2 = _$e`<decidables-button name="reset" ?disabled=${0} @click=${0}>Reset</decidables-button>`), this.state === 'resetted', this.doReset.bind(this)) : $(_t21$1 || (_t21$1 = _$e``))) : $(_t22$1 || (_t22$1 = _$e``)));
14382
14403
  }
14383
14404
 
14384
14405
  }
14385
14406
  customElements.define('detectable-control', DetectableControl);
14386
14407
 
14387
- let _$b = t => t,
14388
- _t$b,
14389
- _t2$a;
14408
+ let _$d = t => t,
14409
+ _t$d,
14410
+ _t2$c;
14390
14411
  /*
14391
14412
  SDTModel element
14392
14413
  <sdt-model>
@@ -14623,7 +14644,7 @@ class SDTModel extends DetectableElement {
14623
14644
  }
14624
14645
 
14625
14646
  static get styles() {
14626
- return [super.styles, r$2(_t$b || (_t$b = _$b`
14647
+ return [super.styles, r$2(_t$d || (_t$d = _$d`
14627
14648
  :host {
14628
14649
  display: inline-block;
14629
14650
 
@@ -14869,8 +14890,8 @@ class SDTModel extends DetectableElement {
14869
14890
  }
14870
14891
 
14871
14892
  render() {
14872
- // eslint-disable-line class-methods-use-this
14873
- return $(_t2$a || (_t2$a = _$b`
14893
+ /* eslint-disable-line class-methods-use-this */
14894
+ return $(_t2$c || (_t2$c = _$d`
14874
14895
  ${0}
14875
14896
  `), DetectableElement.svgFilters);
14876
14897
  }
@@ -15015,7 +15036,8 @@ class SDTModel extends DetectableElement {
15015
15036
  datum.startMuS = this.muS;
15016
15037
  }).on('drag', (event, datum) => {
15017
15038
  this.drag = true;
15018
- let muS = this.muS; // eslint-disable-line prefer-destructuring
15039
+ let muS = this.muS;
15040
+ /* eslint-disable-line prefer-destructuring */
15019
15041
 
15020
15042
  if (this.interactive) {
15021
15043
  muS = xScale.invert(event.x); // Clamp Signal Curve to stay visible
@@ -15023,7 +15045,8 @@ class SDTModel extends DetectableElement {
15023
15045
  muS = muS < xScale.domain()[0] ? xScale.domain()[0] : muS > xScale.domain()[1] ? xScale.domain()[1] : muS;
15024
15046
  }
15025
15047
 
15026
- let hS = this.hS; // eslint-disable-line prefer-destructuring
15048
+ let hS = this.hS;
15049
+ /* eslint-disable-line prefer-destructuring */
15027
15050
 
15028
15051
  if (this.unequal) {
15029
15052
  hS = yScale.invert(event.y); // Clamp Signal Curve to stay visible
@@ -15154,7 +15177,8 @@ class SDTModel extends DetectableElement {
15154
15177
 
15155
15178
  const noiseMerge = signalNoiseMerge.selectAll('.noise').attr('tabindex', this.interactive ? 0 : null).classed('interactive', this.interactive).on('keydown', this.interactive ? event => {
15156
15179
  if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {
15157
- let muN = this.muN; // eslint-disable-line prefer-destructuring
15180
+ let muN = this.muN;
15181
+ /* eslint-disable-line prefer-destructuring */
15158
15182
 
15159
15183
  switch (event.key) {
15160
15184
  case 'ArrowRight':
@@ -15285,7 +15309,8 @@ class SDTModel extends DetectableElement {
15285
15309
 
15286
15310
  const signalMerge = signalNoiseMerge.selectAll('.signal').attr('tabindex', this.interactive || this.unequal ? 0 : null).classed('interactive', this.interactive).classed('unequal', this.unequal).on('keydown.sensitivity', this.interactive ? event => {
15287
15311
  if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {
15288
- let muS = this.muS; // eslint-disable-line prefer-destructuring
15312
+ let muS = this.muS;
15313
+ /* eslint-disable-line prefer-destructuring */
15289
15314
 
15290
15315
  switch (event.key) {
15291
15316
  case 'ArrowRight':
@@ -15310,7 +15335,8 @@ class SDTModel extends DetectableElement {
15310
15335
  }
15311
15336
  } : null).on('keydown.variance', this.unequal ? event => {
15312
15337
  if (['ArrowUp', 'ArrowDown'].includes(event.key)) {
15313
- let hS = this.hS; // eslint-disable-line prefer-destructuring
15338
+ let hS = this.hS;
15339
+ /* eslint-disable-line prefer-destructuring */
15314
15340
 
15315
15341
  switch (event.key) {
15316
15342
  case 'ArrowUp':
@@ -15467,7 +15493,7 @@ class SDTModel extends DetectableElement {
15467
15493
  const interpolateD = interpolate$1(element.d !== undefined ? element.d : this.d, this.d);
15468
15494
  return time => {
15469
15495
  element.d = interpolateD(time);
15470
- select(element).text(+element.d.toFixed(3));
15496
+ select(element).text(format('.3')(element.d));
15471
15497
  };
15472
15498
  }); // EXIT
15473
15499
 
@@ -15498,7 +15524,7 @@ class SDTModel extends DetectableElement {
15498
15524
  const interpolateC = interpolate$1(element.c !== undefined ? element.c : this.c, this.c);
15499
15525
  return time => {
15500
15526
  element.c = interpolateC(time);
15501
- select(element).text(+element.c.toFixed(3));
15527
+ select(element).text(format('.3')(element.c));
15502
15528
  };
15503
15529
  }); // EXIT
15504
15530
 
@@ -15533,7 +15559,7 @@ class SDTModel extends DetectableElement {
15533
15559
  const interpolateS = interpolate$1(element.s !== undefined ? element.s : this.s, this.s);
15534
15560
  return time => {
15535
15561
  element.s = interpolateS(time);
15536
- select(element).text(+element.s.toFixed(3));
15562
+ select(element).text(format('.3')(element.s));
15537
15563
  };
15538
15564
  }); // EXIT
15539
15565
 
@@ -15552,7 +15578,8 @@ class SDTModel extends DetectableElement {
15552
15578
  if (this.interactive) {
15553
15579
  thresholdMerge.call(dragThreshold).on('keydown', event => {
15554
15580
  if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {
15555
- let l = this.l; // eslint-disable-line prefer-destructuring
15581
+ let l = this.l;
15582
+ /* eslint-disable-line prefer-destructuring */
15556
15583
 
15557
15584
  switch (event.key) {
15558
15585
  case 'ArrowRight':
@@ -15802,14 +15829,14 @@ class SDTModel extends DetectableElement {
15802
15829
  }
15803
15830
  customElements.define('sdt-model', SDTModel);
15804
15831
 
15805
- let _$a = t => t,
15806
- _t$a,
15807
- _t2$9,
15808
- _t3$8,
15809
- _t4$8,
15810
- _t5$8,
15811
- _t6$8,
15812
- _t7$8,
15832
+ let _$c = t => t,
15833
+ _t$c,
15834
+ _t2$b,
15835
+ _t3$a,
15836
+ _t4$a,
15837
+ _t5$a,
15838
+ _t6$a,
15839
+ _t7$a,
15813
15840
  _t8$6,
15814
15841
  _t9$6,
15815
15842
  _t10$6,
@@ -16069,7 +16096,7 @@ class DetectableResponse extends DetectableElement {
16069
16096
  }
16070
16097
 
16071
16098
  static get styles() {
16072
- return [super.styles, r$2(_t$a || (_t$a = _$a`
16099
+ return [super.styles, r$2(_t$c || (_t$c = _$c`
16073
16100
  :host {
16074
16101
  display: inline-block;
16075
16102
  }
@@ -16141,6 +16168,11 @@ class DetectableResponse extends DetectableElement {
16141
16168
  border: 1px solid var(---color-element-border);
16142
16169
  }
16143
16170
 
16171
+ :host([payoff="trial"]) .feedback,
16172
+ :host([payoff="total"]) .feedback {
16173
+ height: 5rem;
16174
+ }
16175
+
16144
16176
  .feedback.h {
16145
16177
  background-color: var(---color-h-light);
16146
16178
  }
@@ -16176,59 +16208,76 @@ class DetectableResponse extends DetectableElement {
16176
16208
  line-height: 1.15;
16177
16209
  }
16178
16210
 
16179
- :host([payoff="trial"]) .feedback,
16180
- :host([payoff="total"]) .feedback {
16181
- height: 4rem;
16182
- }
16183
-
16184
16211
  /* Payoff feedback */
16185
- .payoff {
16212
+ .total {
16186
16213
  text-align: center;
16187
16214
  }
16188
16215
 
16189
- .payoff .label {
16216
+ .total .label {
16190
16217
  font-weight: 600;
16191
16218
  }
16192
16219
  `))];
16193
16220
  }
16194
16221
 
16195
16222
  render() {
16196
- return $(_t2$9 || (_t2$9 = _$a`
16223
+ const payoffFormatter = new Intl.NumberFormat('en-US', {
16224
+ style: 'currency',
16225
+ currency: 'USD',
16226
+ minimumFractionDigits: 0,
16227
+ maximumFractionDigits: 0
16228
+ });
16229
+
16230
+ const payoffFormat = number => {
16231
+ return payoffFormatter.formatToParts(number).map(({
16232
+ type,
16233
+ value
16234
+ }) => {
16235
+ if (type === 'minusSign') {
16236
+ return '−';
16237
+ }
16238
+
16239
+ return value;
16240
+ }).reduce((string, part) => {
16241
+ return string + part;
16242
+ });
16243
+ };
16244
+
16245
+ return $(_t2$b || (_t2$b = _$c`
16197
16246
  <div class="holder">
16198
16247
  <div class="responses">
16199
16248
  <decidables-button name="present" class=${0} ?disabled=${0} @click=${0}>Present</decidables-button>
16200
16249
  <decidables-button name="absent" class=${0} ?disabled=${0} @click=${0}>Absent</decidables-button>
16201
16250
  </div>
16202
16251
  ${0}
16203
- </div>`), this.state === 'feedback' && this.response === 'present' ? 'selected' : this.state === 'waiting' ? 'waiting' : '', this.state !== 'waiting' || this.interactive !== true, this.present.bind(this), this.state === 'feedback' && this.response === 'absent' ? 'selected' : this.state === 'waiting' ? 'waiting' : '', this.state !== 'waiting' || this.interactive !== true, this.absent.bind(this), this.trial || this.feedback !== 'none' || this.payoff === 'total' ? $(_t3$8 || (_t3$8 = _$a`
16252
+ </div>`), this.state === 'feedback' && this.response === 'present' ? 'selected' : this.state === 'waiting' ? 'waiting' : '', this.state !== 'waiting' || this.interactive !== true, this.present.bind(this), this.state === 'feedback' && this.response === 'absent' ? 'selected' : this.state === 'waiting' ? 'waiting' : '', this.state !== 'waiting' || this.interactive !== true, this.absent.bind(this), this.trial || this.feedback !== 'none' || this.payoff === 'total' ? $(_t3$a || (_t3$a = _$c`
16204
16253
  <div class="feedbacks">
16205
16254
  ${0}
16206
16255
  ${0}
16207
16256
  ${0}
16208
- </div>`), this.trial ? $(_t4$8 || (_t4$8 = _$a`
16257
+ </div>`), this.trial ? $(_t4$a || (_t4$a = _$c`
16209
16258
  <div class="trial">
16210
16259
  <span class="label">Trial: </span><span class="count">${0}</span><span class="of"> of </span><span class="total">${0}</span>
16211
- </div>`), this.trialCount, this.trialTotal) : $(_t5$8 || (_t5$8 = _$a``)), this.feedback !== 'none' ? $(_t6$8 || (_t6$8 = _$a`
16260
+ </div>`), this.trialCount, this.trialTotal) : $(_t5$a || (_t5$a = _$c``)), this.feedback !== 'none' ? $(_t6$a || (_t6$a = _$c`
16212
16261
  <div class=${0}>
16213
16262
  ${0}
16214
16263
  ${0}
16215
- </div>`), `feedback ${this.state === 'feedback' ? this.feedback === 'outcome' ? this.outcome : this.accuracy : ''}`, this.state === 'feedback' ? this.feedback === 'outcome' ? this.outcome === 'h' ? $(_t7$8 || (_t7$8 = _$a`<span class="outcome">Hit</span>`)) : this.outcome === 'm' ? $(_t8$6 || (_t8$6 = _$a`<span class="outcome">Miss</span>`)) : this.outcome === 'fa' ? $(_t9$6 || (_t9$6 = _$a`<span class="outcome">False<br>Alarm</span>`)) : this.outcome === 'cr' ? $(_t10$6 || (_t10$6 = _$a`<span class="outcome">Correct<br>Rejection</span>`)) : $(_t11$6 || (_t11$6 = _$a`<span class="outcome">No<br>Response</span>`)) : this.accuracy === 'c' ? $(_t12$1 || (_t12$1 = _$a`<span class="outcome">Correct</span>`)) : this.accuracy === 'e' ? $(_t13$1 || (_t13$1 = _$a`<span class="outcome">Error</span>`)) : $(_t14$1 || (_t14$1 = _$a`<span class="outcome">No<br>Response</span>`)) : '', this.payoff === 'trial' || this.payoff === 'total' ? $(_t15$1 || (_t15$1 = _$a`<span class="payoff">${0}</span>`), this.trialPayoff) : $(_t16$1 || (_t16$1 = _$a``))) : $(_t17$1 || (_t17$1 = _$a``)), this.payoff === 'total' ? $(_t18$1 || (_t18$1 = _$a`
16216
- <div class="payoff">
16264
+ </div>`), `feedback ${this.state === 'feedback' ? this.feedback === 'outcome' ? this.outcome : this.accuracy : ''}`, this.state === 'feedback' ? this.feedback === 'outcome' ? this.outcome === 'h' ? $(_t7$a || (_t7$a = _$c`<span class="outcome">Hit</span>`)) : this.outcome === 'm' ? $(_t8$6 || (_t8$6 = _$c`<span class="outcome">Miss</span>`)) : this.outcome === 'fa' ? $(_t9$6 || (_t9$6 = _$c`<span class="outcome">False<br>Alarm</span>`)) : this.outcome === 'cr' ? $(_t10$6 || (_t10$6 = _$c`<span class="outcome">Correct<br>Rejection</span>`)) : $(_t11$6 || (_t11$6 = _$c`<span class="outcome">No<br>Response</span>`)) : this.accuracy === 'c' ? $(_t12$1 || (_t12$1 = _$c`<span class="outcome">Correct</span>`)) : this.accuracy === 'e' ? $(_t13$1 || (_t13$1 = _$c`<span class="outcome">Error</span>`)) : $(_t14$1 || (_t14$1 = _$c`<span class="outcome">No<br>Response</span>`)) : '', this.state === 'feedback' && (this.payoff === 'trial' || this.payoff === 'total') ? $(_t15$1 || (_t15$1 = _$c`<span class="payoff">${0}</span>`), payoffFormat(this.trialPayoff)) : $(_t16$1 || (_t16$1 = _$c``))) : $(_t17$1 || (_t17$1 = _$c``)), this.payoff === 'total' ? $(_t18$1 || (_t18$1 = _$c`
16265
+ <div class="total">
16217
16266
  <span class="label">Total: </span><span class="value">${0}</span>
16218
- </div>`), this.totalPayoff) : $(_t19$1 || (_t19$1 = _$a``))) : $(_t20$1 || (_t20$1 = _$a``)));
16267
+ </div>`), payoffFormat(this.totalPayoff)) : $(_t19$1 || (_t19$1 = _$c``))) : $(_t20$1 || (_t20$1 = _$c``)));
16219
16268
  }
16220
16269
 
16221
16270
  }
16222
16271
  customElements.define('detectable-response', DetectableResponse);
16223
16272
 
16224
- let _$9 = t => t,
16225
- _t$9,
16226
- _t2$8,
16227
- _t3$7,
16228
- _t4$7,
16229
- _t5$7,
16230
- _t6$7,
16231
- _t7$7,
16273
+ let _$b = t => t,
16274
+ _t$b,
16275
+ _t2$a,
16276
+ _t3$9,
16277
+ _t4$9,
16278
+ _t5$9,
16279
+ _t6$9,
16280
+ _t7$9,
16232
16281
  _t8$5,
16233
16282
  _t9$5,
16234
16283
  _t10$5,
@@ -16375,8 +16424,8 @@ class DetectableTable extends DetectableElement {
16375
16424
  this.numeric = false;
16376
16425
  this.summaries = ['stimulusRates', 'responseRates', 'accuracy'];
16377
16426
  this.summary = new Set();
16378
- this.colors = ['none', 'accuracy', 'stimulus', 'response', 'outcome'];
16379
- this.color = 'outcome';
16427
+ this.colors = ['none', 'accuracy', 'stimulus', 'response', 'outcome', 'all'];
16428
+ this.color = 'all';
16380
16429
  this.h = 40;
16381
16430
  this.m = 60;
16382
16431
  this.fa = 75;
@@ -16515,7 +16564,7 @@ class DetectableTable extends DetectableElement {
16515
16564
  }
16516
16565
 
16517
16566
  static get styles() {
16518
- return [super.styles, r$2(_t$9 || (_t$9 = _$9`
16567
+ return [super.styles, r$2(_t$b || (_t$b = _$b`
16519
16568
  :host {
16520
16569
  display: inline-block;
16521
16570
  }
@@ -16578,7 +16627,7 @@ class DetectableTable extends DetectableElement {
16578
16627
 
16579
16628
  /* Color schemes & Table emphasis */
16580
16629
 
16581
- /* (Default) Outcome color scheme */
16630
+ /* (Default) All color scheme */
16582
16631
  .h {
16583
16632
  background: var(---color-h-light);
16584
16633
  border-top: 2px solid var(---color-element-emphasis);
@@ -16677,6 +16726,15 @@ class DetectableTable extends DetectableElement {
16677
16726
  background: var(---color-element-background);
16678
16727
  }
16679
16728
 
16729
+ /* Outcome color scheme */
16730
+ :host([color="outcome"]) .hr,
16731
+ :host([color="outcome"]) .far,
16732
+ :host([color="outcome"]) .ppv,
16733
+ :host([color="outcome"]) .fomr,
16734
+ :host([color="outcome"]) .acc {
16735
+ background: var(---color-element-background);
16736
+ }
16737
+
16680
16738
  /* No color scheme */
16681
16739
  :host([color="none"]) .cr,
16682
16740
  :host([color="none"]) .fa,
@@ -16699,6 +16757,22 @@ class DetectableTable extends DetectableElement {
16699
16757
  minimumFractionDigits: 0,
16700
16758
  maximumFractionDigits: 0
16701
16759
  });
16760
+
16761
+ const payoffFormat = number => {
16762
+ return payoffFormatter.formatToParts(number).map(({
16763
+ type,
16764
+ value
16765
+ }) => {
16766
+ if (type === 'minusSign') {
16767
+ return '−';
16768
+ }
16769
+
16770
+ return value;
16771
+ }).reduce((string, part) => {
16772
+ return string + part;
16773
+ });
16774
+ };
16775
+
16702
16776
  this.alignState();
16703
16777
  let h;
16704
16778
  let m;
@@ -16711,72 +16785,72 @@ class DetectableTable extends DetectableElement {
16711
16785
  let fomr;
16712
16786
 
16713
16787
  if (this.numeric) {
16714
- h = $(_t2$8 || (_t2$8 = _$9`
16788
+ h = $(_t2$a || (_t2$a = _$b`
16715
16789
  <decidables-spinner ?disabled=${0} min="0" .value="${0}" @input=${0}>
16716
16790
  <span>Hits</span>
16717
16791
  ${0}
16718
16792
  </decidables-spinner>
16719
- `), !this.interactive, this.h, this.hInput.bind(this), this.payoff ? $(_t3$7 || (_t3$7 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.hPayoff)) : $(_t4$7 || (_t4$7 = _$9``)));
16720
- m = $(_t5$7 || (_t5$7 = _$9`
16793
+ `), !this.interactive, this.h, this.hInput.bind(this), this.payoff ? $(_t3$9 || (_t3$9 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.hPayoff)) : $(_t4$9 || (_t4$9 = _$b``)));
16794
+ m = $(_t5$9 || (_t5$9 = _$b`
16721
16795
  <decidables-spinner ?disabled=${0} min="0" .value="${0}" @input=${0}>
16722
16796
  <span>Misses</span>
16723
16797
  ${0}
16724
16798
  </decidables-spinner>
16725
- `), !this.interactive, this.m, this.mInput.bind(this), this.payoff ? $(_t6$7 || (_t6$7 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.mPayoff)) : $(_t7$7 || (_t7$7 = _$9``)));
16726
- fa = $(_t8$5 || (_t8$5 = _$9`
16799
+ `), !this.interactive, this.m, this.mInput.bind(this), this.payoff ? $(_t6$9 || (_t6$9 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.mPayoff)) : $(_t7$9 || (_t7$9 = _$b``)));
16800
+ fa = $(_t8$5 || (_t8$5 = _$b`
16727
16801
  <decidables-spinner ?disabled=${0} min="0" .value="${0}" @input=${0}>
16728
16802
  <span>False Alarms</span>
16729
16803
  ${0}
16730
16804
  </decidables-spinner>
16731
- `), !this.interactive, this.fa, this.faInput.bind(this), this.payoff ? $(_t9$5 || (_t9$5 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.faPayoff)) : $(_t10$5 || (_t10$5 = _$9``)));
16732
- cr = $(_t11$5 || (_t11$5 = _$9`
16805
+ `), !this.interactive, this.fa, this.faInput.bind(this), this.payoff ? $(_t9$5 || (_t9$5 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.faPayoff)) : $(_t10$5 || (_t10$5 = _$b``)));
16806
+ cr = $(_t11$5 || (_t11$5 = _$b`
16733
16807
  <decidables-spinner ?disabled=${0} min="0" .value="${0}" @input=${0}>
16734
16808
  <span>Correct Rejections</span>
16735
16809
  ${0}
16736
16810
  </decidables-spinner>
16737
- `), !this.interactive, this.cr, this.crInput.bind(this), this.payoff ? $(_t12 || (_t12 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.crPayoff)) : $(_t13 || (_t13 = _$9``)));
16738
- hr = $(_t14 || (_t14 = _$9`
16811
+ `), !this.interactive, this.cr, this.crInput.bind(this), this.payoff ? $(_t12 || (_t12 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.crPayoff)) : $(_t13 || (_t13 = _$b``)));
16812
+ hr = $(_t14 || (_t14 = _$b`
16739
16813
  <decidables-spinner ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
16740
16814
  <span>Hit Rate</span>
16741
16815
  </decidables-spinner>
16742
16816
  `), !this.interactive, +this.hr.toFixed(3), this.hrInput.bind(this));
16743
- far = $(_t15 || (_t15 = _$9`
16817
+ far = $(_t15 || (_t15 = _$b`
16744
16818
  <decidables-spinner ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
16745
16819
  <span>False Alarm Rate</span>
16746
16820
  </decidables-spinner>
16747
16821
  `), !this.interactive, +this.far.toFixed(3), this.farInput.bind(this));
16748
- acc = $(_t16 || (_t16 = _$9`
16822
+ acc = $(_t16 || (_t16 = _$b`
16749
16823
  <decidables-spinner ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
16750
16824
  <span>Accuracy</span>
16751
16825
  </decidables-spinner>
16752
16826
  `), !this.interactive, +this.acc.toFixed(3), this.accInput.bind(this));
16753
- ppv = $(_t17 || (_t17 = _$9`
16827
+ ppv = $(_t17 || (_t17 = _$b`
16754
16828
  <decidables-spinner ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
16755
16829
  <span>Positive Predictive Value</span>
16756
16830
  </decidables-spinner>
16757
16831
  `), !this.interactive, +this.ppv.toFixed(3), this.ppvInput.bind(this));
16758
- fomr = $(_t18 || (_t18 = _$9`
16832
+ fomr = $(_t18 || (_t18 = _$b`
16759
16833
  <decidables-spinner ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
16760
16834
  <span>False Omission Rate</span>
16761
16835
  </decidables-spinner>
16762
16836
  `), !this.interactive, +this.fomr.toFixed(3), this.fomrInput.bind(this));
16763
16837
  } else {
16764
- h = $(_t19 || (_t19 = _$9`<span>Hits</span>
16765
- ${0}`), this.payoff ? $(_t20 || (_t20 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.hPayoff)) : $(_t21 || (_t21 = _$9``)));
16766
- m = $(_t22 || (_t22 = _$9`<span>Misses</span>
16767
- ${0}`), this.payoff ? $(_t23 || (_t23 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.mPayoff)) : $(_t24 || (_t24 = _$9``)));
16768
- fa = $(_t25 || (_t25 = _$9`<span>False Alarms</span>
16769
- ${0}`), this.payoff ? $(_t26 || (_t26 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.faPayoff)) : $(_t27 || (_t27 = _$9``)));
16770
- cr = $(_t28 || (_t28 = _$9`<span>Correct Rejections</span>
16771
- ${0}`), this.payoff ? $(_t29 || (_t29 = _$9`<span class="payoff">${0}</span>`), payoffFormatter.format(this.crPayoff)) : $(_t30 || (_t30 = _$9``)));
16772
- hr = $(_t31 || (_t31 = _$9`<span>Hit Rate</span>`));
16773
- far = $(_t32 || (_t32 = _$9`<span>False Alarm Rate</span>`));
16774
- acc = $(_t33 || (_t33 = _$9`<span>Accuracy</span>`));
16775
- ppv = $(_t34 || (_t34 = _$9`<span>Positive Predictive Value</span>`));
16776
- fomr = $(_t35 || (_t35 = _$9`<span>False Omission Rate</span>`));
16838
+ h = $(_t19 || (_t19 = _$b`<span>Hits</span>
16839
+ ${0}`), this.payoff ? $(_t20 || (_t20 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.hPayoff)) : $(_t21 || (_t21 = _$b``)));
16840
+ m = $(_t22 || (_t22 = _$b`<span>Misses</span>
16841
+ ${0}`), this.payoff ? $(_t23 || (_t23 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.mPayoff)) : $(_t24 || (_t24 = _$b``)));
16842
+ fa = $(_t25 || (_t25 = _$b`<span>False Alarms</span>
16843
+ ${0}`), this.payoff ? $(_t26 || (_t26 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.faPayoff)) : $(_t27 || (_t27 = _$b``)));
16844
+ cr = $(_t28 || (_t28 = _$b`<span>Correct Rejections</span>
16845
+ ${0}`), this.payoff ? $(_t29 || (_t29 = _$b`<span class="payoff">${0}</span>`), payoffFormat(this.crPayoff)) : $(_t30 || (_t30 = _$b``)));
16846
+ hr = $(_t31 || (_t31 = _$b`<span>Hit Rate</span>`));
16847
+ far = $(_t32 || (_t32 = _$b`<span>False Alarm Rate</span>`));
16848
+ acc = $(_t33 || (_t33 = _$b`<span>Accuracy</span>`));
16849
+ ppv = $(_t34 || (_t34 = _$b`<span>Positive Predictive Value</span>`));
16850
+ fomr = $(_t35 || (_t35 = _$b`<span>False Omission Rate</span>`));
16777
16851
  }
16778
16852
 
16779
- return $(_t36 || (_t36 = _$9`
16853
+ return $(_t36 || (_t36 = _$b`
16780
16854
  <table class=${0}>
16781
16855
  <thead>
16782
16856
  <tr>
@@ -16787,10 +16861,10 @@ class DetectableTable extends DetectableElement {
16787
16861
  </tr>
16788
16862
  <tr>
16789
16863
  <th class="th th-sub" scope="col">
16790
- "Present"
16864
+ Present
16791
16865
  </th>
16792
16866
  <th class="th th-sub" scope="col">
16793
- "Absent"
16867
+ Absent
16794
16868
  </th>
16795
16869
  </tr>
16796
16870
  </thead>
@@ -16824,35 +16898,35 @@ class DetectableTable extends DetectableElement {
16824
16898
  </tr>
16825
16899
  ${0}
16826
16900
  </tbody>
16827
- </table>`), this.numeric ? 'numeric' : '', h, m, this.summary.has('stimulusRates') ? $(_t37 || (_t37 = _$9`
16901
+ </table>`), this.numeric ? 'numeric' : '', h, m, this.summary.has('stimulusRates') ? $(_t37 || (_t37 = _$b`
16828
16902
  <td class="td td-summary hr">
16829
16903
  ${0}
16830
- </td>`), hr) : $(_t38 || (_t38 = _$9``)), fa, cr, this.summary.has('stimulusRates') ? $(_t39 || (_t39 = _$9`
16904
+ </td>`), hr) : $(_t38 || (_t38 = _$b``)), fa, cr, this.summary.has('stimulusRates') ? $(_t39 || (_t39 = _$b`
16831
16905
  <td class="td td-summary far">
16832
16906
  ${0}
16833
- </td>`), far) : $(_t40 || (_t40 = _$9``)), this.summary.has('responseRates') || this.summary.has('accuracy') ? $(_t41 || (_t41 = _$9`
16907
+ </td>`), far) : $(_t40 || (_t40 = _$b``)), this.summary.has('responseRates') || this.summary.has('accuracy') ? $(_t41 || (_t41 = _$b`
16834
16908
  <tr>
16835
16909
  <td colspan="2"></td>
16836
16910
  ${0}
16837
16911
  ${0}
16838
- </tr>`), this.summary.has('responseRates') ? $(_t42 || (_t42 = _$9`
16912
+ </tr>`), this.summary.has('responseRates') ? $(_t42 || (_t42 = _$b`
16839
16913
  <td class="td td-summary ppv">
16840
16914
  ${0}
16841
16915
  </td>
16842
16916
  <td class="td td-summary fomr">
16843
16917
  ${0}
16844
- </td>`), ppv, fomr) : $(_t43 || (_t43 = _$9`
16845
- <td colspan="2"></td>`)), this.summary.has('accuracy') ? $(_t44 || (_t44 = _$9`
16918
+ </td>`), ppv, fomr) : $(_t43 || (_t43 = _$b`
16919
+ <td colspan="2"></td>`)), this.summary.has('accuracy') ? $(_t44 || (_t44 = _$b`
16846
16920
  <td class="td td-summary acc" rowspan="2">
16847
16921
  ${0}
16848
- </td>`), acc) : $(_t45 || (_t45 = _$9``))) : $(_t46 || (_t46 = _$9``)));
16922
+ </td>`), acc) : $(_t45 || (_t45 = _$b``))) : $(_t46 || (_t46 = _$b``)));
16849
16923
  }
16850
16924
 
16851
16925
  }
16852
16926
  customElements.define('detectable-table', DetectableTable);
16853
16927
 
16854
- let _$8 = t => t,
16855
- _t$8;
16928
+ let _$a = t => t,
16929
+ _t$a;
16856
16930
  /*
16857
16931
  SDTEquation Base Class - Not intended for instantiation!
16858
16932
  <sdt-equation>
@@ -16875,7 +16949,7 @@ class SDTEquation extends DetectableElement {
16875
16949
  }
16876
16950
 
16877
16951
  static get styles() {
16878
- return [super.styles, r$2(_t$8 || (_t$8 = _$8`
16952
+ return [super.styles, r$2(_t$a || (_t$a = _$a`
16879
16953
  :host {
16880
16954
  display: block;
16881
16955
 
@@ -16894,6 +16968,7 @@ class SDTEquation extends DetectableElement {
16894
16968
  /* Overall <table> */
16895
16969
  .equation {
16896
16970
  text-align: center;
16971
+ white-space: nowrap;
16897
16972
 
16898
16973
  border-collapse: collapse;
16899
16974
 
@@ -16913,6 +16988,10 @@ class SDTEquation extends DetectableElement {
16913
16988
  font-style: normal;
16914
16989
  }
16915
16990
 
16991
+ var {
16992
+ border-radius: var(---border-radius);
16993
+ }
16994
+
16916
16995
  .tight {
16917
16996
  padding: 0;
16918
16997
  }
@@ -16938,6 +17017,8 @@ class SDTEquation extends DetectableElement {
16938
17017
  padding: 0.125rem 0.375rem 0.375rem;
16939
17018
 
16940
17019
  vertical-align: middle;
17020
+
17021
+ border-radius: var(---border-radius);
16941
17022
  }
16942
17023
 
16943
17024
  .bottom {
@@ -16961,6 +17042,14 @@ class SDTEquation extends DetectableElement {
16961
17042
  background: var(---color-fa-light);
16962
17043
  }
16963
17044
 
17045
+ .ppv {
17046
+ background: var(---color-present-light);
17047
+ }
17048
+
17049
+ .fomr {
17050
+ background: var(---color-absent-light);
17051
+ }
17052
+
16964
17053
  .acc {
16965
17054
  background: var(---color-acc-light);
16966
17055
  }
@@ -16989,14 +17078,14 @@ class SDTEquation extends DetectableElement {
16989
17078
 
16990
17079
  }
16991
17080
 
16992
- let _$7 = t => t,
16993
- _t$7,
16994
- _t2$7,
16995
- _t3$6,
16996
- _t4$6,
16997
- _t5$6,
16998
- _t6$6,
16999
- _t7$6,
17081
+ let _$9 = t => t,
17082
+ _t$9,
17083
+ _t2$9,
17084
+ _t3$8,
17085
+ _t4$8,
17086
+ _t5$8,
17087
+ _t6$8,
17088
+ _t7$8,
17000
17089
  _t8$4,
17001
17090
  _t9$4,
17002
17091
  _t10$4,
@@ -17091,37 +17180,37 @@ class SDTEquationDC2Far extends SDTEquation {
17091
17180
  let far;
17092
17181
 
17093
17182
  if (this.numeric) {
17094
- d = $(_t$7 || (_t$7 = _$7`
17183
+ d = $(_t$9 || (_t$9 = _$9`
17095
17184
  <decidables-spinner class="d bottom" ?disabled=${0} step=".001" .value="${0}" @input=${0}>
17096
17185
  <var class="math-var">d′</var>
17097
17186
  </decidables-spinner>
17098
17187
  `), !this.interactive, this.d, this.dInput.bind(this));
17099
- c = $(_t2$7 || (_t2$7 = _$7`
17188
+ c = $(_t2$9 || (_t2$9 = _$9`
17100
17189
  <decidables-spinner class="c bottom" ?disabled=${0} step=".001" .value="${0}" @input=${0}>
17101
17190
  <var class="math-var">c</var>
17102
17191
  </decidables-spinner>
17103
17192
  `), !this.interactive, this.c, this.cInput.bind(this));
17104
- s = $(_t3$6 || (_t3$6 = _$7`
17193
+ s = $(_t3$8 || (_t3$8 = _$9`
17105
17194
  <decidables-spinner class="s bottom" ?disabled=${0} min="0" step=".001" .value="${0}" @input=${0}>
17106
17195
  <var class="math-var">σ</var>
17107
17196
  </decidables-spinner>
17108
17197
  `), !this.interactive, this.s, this.sInput.bind(this));
17109
- far = $(_t4$6 || (_t4$6 = _$7`
17198
+ far = $(_t4$8 || (_t4$8 = _$9`
17110
17199
  <decidables-spinner class="far bottom" disabled min="0" max="1" step=".001" .value="${0}">
17111
17200
  <var>False Alarm Rate</var>
17112
17201
  </decidables-spinner>
17113
17202
  `), +this.far.toFixed(3));
17114
17203
  } else {
17115
- d = $(_t5$6 || (_t5$6 = _$7`<var class="math-var d">d′</var>`));
17116
- c = $(_t6$6 || (_t6$6 = _$7`<var class="math-var c">c</var>`));
17117
- s = $(_t7$6 || (_t7$6 = _$7`<var class="math-var s">σ</var>`));
17118
- far = $(_t8$4 || (_t8$4 = _$7`<var class="far">False Alarm Rate</var>`));
17204
+ d = $(_t5$8 || (_t5$8 = _$9`<var class="math-var d">d′</var>`));
17205
+ c = $(_t6$8 || (_t6$8 = _$9`<var class="math-var c">c</var>`));
17206
+ s = $(_t7$8 || (_t7$8 = _$9`<var class="math-var s">σ</var>`));
17207
+ far = $(_t8$4 || (_t8$4 = _$9`<var class="far">False Alarm Rate</var>`));
17119
17208
  }
17120
17209
 
17121
17210
  let equation;
17122
17211
 
17123
17212
  if (this.unequal) {
17124
- equation = $(_t9$4 || (_t9$4 = _$7`
17213
+ equation = $(_t9$4 || (_t9$4 = _$9`
17125
17214
  <tr>
17126
17215
  <td rowspan="2">
17127
17216
  ${0}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="bracket tight">[</span>
@@ -17148,7 +17237,7 @@ class SDTEquationDC2Far extends SDTEquation {
17148
17237
  </td>
17149
17238
  </tr>`), far, s, d, c, s);
17150
17239
  } else {
17151
- equation = $(_t10$4 || (_t10$4 = _$7`
17240
+ equation = $(_t10$4 || (_t10$4 = _$9`
17152
17241
  <tr>
17153
17242
  <td rowspan="2">
17154
17243
  ${0}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="minus tight">−</span>
@@ -17167,7 +17256,7 @@ class SDTEquationDC2Far extends SDTEquation {
17167
17256
  </tr>`), far, d, c);
17168
17257
  }
17169
17258
 
17170
- return $(_t11$4 || (_t11$4 = _$7`
17259
+ return $(_t11$4 || (_t11$4 = _$9`
17171
17260
  <div class="holder">
17172
17261
  <table class="equation">
17173
17262
  <tbody>
@@ -17180,14 +17269,14 @@ class SDTEquationDC2Far extends SDTEquation {
17180
17269
  }
17181
17270
  customElements.define('sdt-equation-dc2far', SDTEquationDC2Far);
17182
17271
 
17183
- let _$6 = t => t,
17184
- _t$6,
17185
- _t2$6,
17186
- _t3$5,
17187
- _t4$5,
17188
- _t5$5,
17189
- _t6$5,
17190
- _t7$5,
17272
+ let _$8 = t => t,
17273
+ _t$8,
17274
+ _t2$8,
17275
+ _t3$7,
17276
+ _t4$7,
17277
+ _t5$7,
17278
+ _t6$7,
17279
+ _t7$7,
17191
17280
  _t8$3,
17192
17281
  _t9$3,
17193
17282
  _t10$3,
@@ -17282,37 +17371,37 @@ class SDTEquationDC2Hr extends SDTEquation {
17282
17371
  let hr;
17283
17372
 
17284
17373
  if (this.numeric) {
17285
- d = $(_t$6 || (_t$6 = _$6`
17374
+ d = $(_t$8 || (_t$8 = _$8`
17286
17375
  <decidables-spinner class="d bottom" ?disabled=${0} step=".001" .value="${0}" @input=${0}>
17287
17376
  <var class="math-var">d′</var>
17288
17377
  </decidables-spinner>
17289
17378
  `), !this.interactive, this.d, this.dInput.bind(this));
17290
- c = $(_t2$6 || (_t2$6 = _$6`
17379
+ c = $(_t2$8 || (_t2$8 = _$8`
17291
17380
  <decidables-spinner class="c bottom" ?disabled=${0} step=".001" .value="${0}" @input=${0}>
17292
17381
  <var class="math-var">c</var>
17293
17382
  </decidables-spinner>
17294
17383
  `), !this.interactive, this.c, this.cInput.bind(this));
17295
- s = $(_t3$5 || (_t3$5 = _$6`
17384
+ s = $(_t3$7 || (_t3$7 = _$8`
17296
17385
  <decidables-spinner class="s bottom" ?disabled=${0} min="0" step=".001" .value="${0}" @input=${0}>
17297
17386
  <var class="math-var">σ</var>
17298
17387
  </decidables-spinner>
17299
17388
  `), !this.interactive, this.s, this.sInput.bind(this));
17300
- hr = $(_t4$5 || (_t4$5 = _$6`
17389
+ hr = $(_t4$7 || (_t4$7 = _$8`
17301
17390
  <decidables-spinner class="hr bottom" disabled min="0" max="1" step=".001" .value="${0}">
17302
17391
  <var>Hit Rate</var>
17303
17392
  </decidables-spinner>
17304
17393
  `), +this.hr.toFixed(3));
17305
17394
  } else {
17306
- d = $(_t5$5 || (_t5$5 = _$6`<var class="math-var d">d′</var>`));
17307
- c = $(_t6$5 || (_t6$5 = _$6`<var class="math-var c">c</var>`));
17308
- s = $(_t7$5 || (_t7$5 = _$6`<var class="math-var s">σ</var>`));
17309
- hr = $(_t8$3 || (_t8$3 = _$6`<var class="hr">Hit Rate</var>`));
17395
+ d = $(_t5$7 || (_t5$7 = _$8`<var class="math-var d">d′</var>`));
17396
+ c = $(_t6$7 || (_t6$7 = _$8`<var class="math-var c">c</var>`));
17397
+ s = $(_t7$7 || (_t7$7 = _$8`<var class="math-var s">σ</var>`));
17398
+ hr = $(_t8$3 || (_t8$3 = _$8`<var class="hr">Hit Rate</var>`));
17310
17399
  }
17311
17400
 
17312
17401
  let equation;
17313
17402
 
17314
17403
  if (this.unequal) {
17315
- equation = $(_t9$3 || (_t9$3 = _$6`
17404
+ equation = $(_t9$3 || (_t9$3 = _$8`
17316
17405
  <tr>
17317
17406
  <td rowspan="2">
17318
17407
  ${0}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="bracket tight">[</span>
@@ -17348,7 +17437,7 @@ class SDTEquationDC2Hr extends SDTEquation {
17348
17437
  </td>
17349
17438
  </tr>`), hr, s, d, c, s, s);
17350
17439
  } else {
17351
- equation = $(_t10$3 || (_t10$3 = _$6`
17440
+ equation = $(_t10$3 || (_t10$3 = _$8`
17352
17441
  <tr>
17353
17442
  <td rowspan="2">
17354
17443
  ${0}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span>
@@ -17367,7 +17456,7 @@ class SDTEquationDC2Hr extends SDTEquation {
17367
17456
  </tr>`), hr, d, c);
17368
17457
  }
17369
17458
 
17370
- return $(_t11$3 || (_t11$3 = _$6`
17459
+ return $(_t11$3 || (_t11$3 = _$8`
17371
17460
  <div class="holder">
17372
17461
  <table class="equation">
17373
17462
  <tbody>
@@ -17380,14 +17469,14 @@ class SDTEquationDC2Hr extends SDTEquation {
17380
17469
  }
17381
17470
  customElements.define('sdt-equation-dc2hr', SDTEquationDC2Hr);
17382
17471
 
17383
- let _$5 = t => t,
17384
- _t$5,
17385
- _t2$5,
17386
- _t3$4,
17387
- _t4$4,
17388
- _t5$4,
17389
- _t6$4,
17390
- _t7$4;
17472
+ let _$7 = t => t,
17473
+ _t$7,
17474
+ _t2$7,
17475
+ _t3$6,
17476
+ _t4$6,
17477
+ _t5$6,
17478
+ _t6$6,
17479
+ _t7$6;
17391
17480
  /*
17392
17481
  SDTEquationFaCr2Far element
17393
17482
  <sdt-equation-facr2far>
@@ -17458,28 +17547,28 @@ class SDTEquationFaCr2Far extends SDTEquation {
17458
17547
  let far;
17459
17548
 
17460
17549
  if (this.numeric) {
17461
- fa = $(_t$5 || (_t$5 = _$5`
17550
+ fa = $(_t$7 || (_t$7 = _$7`
17462
17551
  <decidables-spinner class="fa" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17463
17552
  <var>False Alarms</var>
17464
17553
  </decidables-spinner>
17465
17554
  `), !this.interactive, this.fa, this.faInput.bind(this));
17466
- cr = $(_t2$5 || (_t2$5 = _$5`
17555
+ cr = $(_t2$7 || (_t2$7 = _$7`
17467
17556
  <decidables-spinner class="cr" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17468
17557
  <var>Correct Rejections</var>
17469
17558
  </decidables-spinner>
17470
17559
  `), !this.interactive, this.cr, this.crInput.bind(this));
17471
- far = $(_t3$4 || (_t3$4 = _$5`
17560
+ far = $(_t3$6 || (_t3$6 = _$7`
17472
17561
  <decidables-spinner class="far" disabled min="0" max="1" step=".001" .value="${0}">
17473
17562
  <var>False Alarm Rate</var>
17474
17563
  </decidables-spinner>
17475
17564
  `), +this.far.toFixed(3));
17476
17565
  } else {
17477
- fa = $(_t4$4 || (_t4$4 = _$5`<var class="fa">False Alarms</var>`));
17478
- cr = $(_t5$4 || (_t5$4 = _$5`<var class="cr">Correct Rejections</var>`));
17479
- far = $(_t6$4 || (_t6$4 = _$5`<var class="far">False Alarm Rate</var>`));
17566
+ fa = $(_t4$6 || (_t4$6 = _$7`<var class="fa">False Alarms</var>`));
17567
+ cr = $(_t5$6 || (_t5$6 = _$7`<var class="cr">Correct Rejections</var>`));
17568
+ far = $(_t6$6 || (_t6$6 = _$7`<var class="far">False Alarm Rate</var>`));
17480
17569
  }
17481
17570
 
17482
- return $(_t7$4 || (_t7$4 = _$5`
17571
+ return $(_t7$6 || (_t7$6 = _$7`
17483
17572
  <div class="holder">
17484
17573
  <table class="equation">
17485
17574
  <tbody>
@@ -17504,23 +17593,23 @@ class SDTEquationFaCr2Far extends SDTEquation {
17504
17593
  }
17505
17594
  customElements.define('sdt-equation-facr2far', SDTEquationFaCr2Far);
17506
17595
 
17507
- let _$4 = t => t,
17508
- _t$4,
17509
- _t2$4,
17510
- _t3$3,
17511
- _t4$3,
17512
- _t5$3,
17513
- _t6$3,
17514
- _t7$3;
17596
+ let _$6 = t => t,
17597
+ _t$6,
17598
+ _t2$6,
17599
+ _t3$5,
17600
+ _t4$5,
17601
+ _t5$5,
17602
+ _t6$5,
17603
+ _t7$5;
17515
17604
  /*
17516
- SDTEquationHM2Hr element
17605
+ SDTEquationHFa2Ppv element
17517
17606
  <sdt-equation-hm2hr>
17518
17607
 
17519
17608
  Attributes:
17520
17609
  Hits; Misses; Hit Rate;
17521
17610
  */
17522
17611
 
17523
- class SDTEquationHM2Hr extends SDTEquation {
17612
+ class SDTEquationHFa2Ppv extends SDTEquation {
17524
17613
  static get properties() {
17525
17614
  return {
17526
17615
  h: {
@@ -17528,12 +17617,12 @@ class SDTEquationHM2Hr extends SDTEquation {
17528
17617
  type: Number,
17529
17618
  reflect: true
17530
17619
  },
17531
- m: {
17532
- attribute: 'misses',
17620
+ fa: {
17621
+ attribute: 'false-alarms',
17533
17622
  type: Number,
17534
17623
  reflect: true
17535
17624
  },
17536
- hr: {
17625
+ ppv: {
17537
17626
  attribute: false,
17538
17627
  type: Number,
17539
17628
  reflect: false
@@ -17544,12 +17633,137 @@ class SDTEquationHM2Hr extends SDTEquation {
17544
17633
  constructor() {
17545
17634
  super();
17546
17635
  this.h = 0;
17547
- this.m = 0;
17636
+ this.fa = 0;
17548
17637
  this.alignState();
17549
17638
  }
17550
17639
 
17551
17640
  alignState() {
17552
- this.hr = SDTMath.hM2Hr(this.h, this.m);
17641
+ this.ppv = SDTMath.hFa2Ppv(this.h, this.fa);
17642
+ }
17643
+
17644
+ sendEvent() {
17645
+ this.dispatchEvent(new CustomEvent('sdt-equation-hfa2ppv-change', {
17646
+ detail: {
17647
+ h: this.h,
17648
+ fa: this.fa,
17649
+ ppv: this.ppv
17650
+ },
17651
+ bubbles: true
17652
+ }));
17653
+ }
17654
+
17655
+ hInput(event) {
17656
+ this.h = parseInt(event.target.value, 10);
17657
+ this.alignState();
17658
+ this.sendEvent();
17659
+ }
17660
+
17661
+ faInput(event) {
17662
+ this.fa = parseInt(event.target.value, 10);
17663
+ this.alignState();
17664
+ this.sendEvent();
17665
+ }
17666
+
17667
+ render() {
17668
+ this.alignState();
17669
+ let h;
17670
+ let fa;
17671
+ let ppv;
17672
+
17673
+ if (this.numeric) {
17674
+ h = $(_t$6 || (_t$6 = _$6`
17675
+ <decidables-spinner class="h" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17676
+ <var>Hits</var>
17677
+ </decidables-spinner>
17678
+ `), !this.interactive, this.h, this.hInput.bind(this));
17679
+ fa = $(_t2$6 || (_t2$6 = _$6`
17680
+ <decidables-spinner class="fa" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17681
+ <var>False Alarms</var>
17682
+ </decidables-spinner>
17683
+ `), !this.interactive, this.fa, this.faInput.bind(this));
17684
+ ppv = $(_t3$5 || (_t3$5 = _$6`
17685
+ <decidables-spinner class="ppv" disabled min="0" max="1" step=".001" .value="${0}">
17686
+ <var>Positive Predictive Value</var>
17687
+ </decidables-spinner>
17688
+ `), +this.ppv.toFixed(3));
17689
+ } else {
17690
+ h = $(_t4$5 || (_t4$5 = _$6`<var class="h">Hits</var>`));
17691
+ fa = $(_t5$5 || (_t5$5 = _$6`<var class="fa">False Alarms</var>`));
17692
+ ppv = $(_t6$5 || (_t6$5 = _$6`<var class="ppv">Positive Predictive Value</var>`));
17693
+ }
17694
+
17695
+ return $(_t7$5 || (_t7$5 = _$6`
17696
+ <div class="holder">
17697
+ <table class="equation">
17698
+ <tbody>
17699
+ <tr>
17700
+ <td rowspan="2">
17701
+ ${0}<span class="equals">=</span>
17702
+ </td>
17703
+ <td class="underline">
17704
+ ${0}
17705
+ </td>
17706
+ </tr>
17707
+ <tr>
17708
+ <td>
17709
+ ${0}<span class="plus">+</span>${0}
17710
+ </td>
17711
+ </tr>
17712
+ </tbody>
17713
+ </table>
17714
+ </div>
17715
+ `), ppv, h, h, fa);
17716
+ }
17717
+
17718
+ }
17719
+ customElements.define('sdt-equation-hfa2ppv', SDTEquationHFa2Ppv);
17720
+
17721
+ let _$5 = t => t,
17722
+ _t$5,
17723
+ _t2$5,
17724
+ _t3$4,
17725
+ _t4$4,
17726
+ _t5$4,
17727
+ _t6$4,
17728
+ _t7$4;
17729
+ /*
17730
+ SDTEquationHM2Hr element
17731
+ <sdt-equation-hm2hr>
17732
+
17733
+ Attributes:
17734
+ Hits; Misses; Hit Rate;
17735
+ */
17736
+
17737
+ class SDTEquationHM2Hr extends SDTEquation {
17738
+ static get properties() {
17739
+ return {
17740
+ h: {
17741
+ attribute: 'hits',
17742
+ type: Number,
17743
+ reflect: true
17744
+ },
17745
+ m: {
17746
+ attribute: 'misses',
17747
+ type: Number,
17748
+ reflect: true
17749
+ },
17750
+ hr: {
17751
+ attribute: false,
17752
+ type: Number,
17753
+ reflect: false
17754
+ }
17755
+ };
17756
+ }
17757
+
17758
+ constructor() {
17759
+ super();
17760
+ this.h = 0;
17761
+ this.m = 0;
17762
+ this.alignState();
17763
+ }
17764
+
17765
+ alignState() {
17766
+ this.hr = SDTMath.hM2Hr(this.h, this.m);
17553
17767
  }
17554
17768
 
17555
17769
  sendEvent() {
@@ -17582,28 +17796,28 @@ class SDTEquationHM2Hr extends SDTEquation {
17582
17796
  let hr;
17583
17797
 
17584
17798
  if (this.numeric) {
17585
- h = $(_t$4 || (_t$4 = _$4`
17799
+ h = $(_t$5 || (_t$5 = _$5`
17586
17800
  <decidables-spinner class="h" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17587
17801
  <var>Hits</var>
17588
17802
  </decidables-spinner>
17589
17803
  `), !this.interactive, this.h, this.hInput.bind(this));
17590
- m = $(_t2$4 || (_t2$4 = _$4`
17804
+ m = $(_t2$5 || (_t2$5 = _$5`
17591
17805
  <decidables-spinner class="m" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17592
17806
  <var>Misses</var>
17593
17807
  </decidables-spinner>
17594
17808
  `), !this.interactive, this.m, this.mInput.bind(this));
17595
- hr = $(_t3$3 || (_t3$3 = _$4`
17809
+ hr = $(_t3$4 || (_t3$4 = _$5`
17596
17810
  <decidables-spinner class="hr" disabled min="0" max="1" step=".001" .value="${0}">
17597
17811
  <var>Hit Rate</var>
17598
17812
  </decidables-spinner>
17599
17813
  `), +this.hr.toFixed(3));
17600
17814
  } else {
17601
- h = $(_t4$3 || (_t4$3 = _$4`<var class="h">Hits</var>`));
17602
- m = $(_t5$3 || (_t5$3 = _$4`<var class="m">Misses</var>`));
17603
- hr = $(_t6$3 || (_t6$3 = _$4`<var class="hr">Hit Rate</var>`));
17815
+ h = $(_t4$4 || (_t4$4 = _$5`<var class="h">Hits</var>`));
17816
+ m = $(_t5$4 || (_t5$4 = _$5`<var class="m">Misses</var>`));
17817
+ hr = $(_t6$4 || (_t6$4 = _$5`<var class="hr">Hit Rate</var>`));
17604
17818
  }
17605
17819
 
17606
- return $(_t7$3 || (_t7$3 = _$4`
17820
+ return $(_t7$4 || (_t7$4 = _$5`
17607
17821
  <div class="holder">
17608
17822
  <table class="equation">
17609
17823
  <tbody>
@@ -17629,14 +17843,14 @@ class SDTEquationHM2Hr extends SDTEquation {
17629
17843
  }
17630
17844
  customElements.define('sdt-equation-hm2hr', SDTEquationHM2Hr);
17631
17845
 
17632
- let _$3 = t => t,
17633
- _t$3,
17634
- _t2$3,
17635
- _t3$2,
17636
- _t4$2,
17637
- _t5$2,
17638
- _t6$2,
17639
- _t7$2,
17846
+ let _$4 = t => t,
17847
+ _t$4,
17848
+ _t2$4,
17849
+ _t3$3,
17850
+ _t4$3,
17851
+ _t5$3,
17852
+ _t6$3,
17853
+ _t7$3,
17640
17854
  _t8$2,
17641
17855
  _t9$2,
17642
17856
  _t10$2,
@@ -17739,40 +17953,40 @@ class SDTEquationHMFaCr2Acc extends SDTEquation {
17739
17953
  let acc;
17740
17954
 
17741
17955
  if (this.numeric) {
17742
- h = $(_t$3 || (_t$3 = _$3`
17956
+ h = $(_t$4 || (_t$4 = _$4`
17743
17957
  <decidables-spinner class="h" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17744
17958
  <var>Hits</var>
17745
17959
  </decidables-spinner>
17746
17960
  `), !this.interactive, this.h, this.hInput.bind(this));
17747
- m = $(_t2$3 || (_t2$3 = _$3`
17961
+ m = $(_t2$4 || (_t2$4 = _$4`
17748
17962
  <decidables-spinner class="m" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17749
17963
  <var>Misses</var>
17750
17964
  </decidables-spinner>
17751
17965
  `), !this.interactive, this.m, this.mInput.bind(this));
17752
- fa = $(_t3$2 || (_t3$2 = _$3`
17966
+ fa = $(_t3$3 || (_t3$3 = _$4`
17753
17967
  <decidables-spinner class="fa" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17754
17968
  <var>False Alarms</var>
17755
17969
  </decidables-spinner>
17756
17970
  `), !this.interactive, this.fa, this.faInput.bind(this));
17757
- cr = $(_t4$2 || (_t4$2 = _$3`
17971
+ cr = $(_t4$3 || (_t4$3 = _$4`
17758
17972
  <decidables-spinner class="cr" ?disabled=${0} min="0" .value="${0}" @input=${0}>
17759
17973
  <var>Correct Rejections</var>
17760
17974
  </decidables-spinner>
17761
17975
  `), !this.interactive, this.cr, this.crInput.bind(this));
17762
- acc = $(_t5$2 || (_t5$2 = _$3`
17976
+ acc = $(_t5$3 || (_t5$3 = _$4`
17763
17977
  <decidables-spinner class="acc" disabled min="0" max="1" step=".001" .value="${0}">
17764
17978
  <var>Accuracy</var>
17765
17979
  </decidables-spinner>
17766
17980
  `), +this.acc.toFixed(3));
17767
17981
  } else {
17768
- h = $(_t6$2 || (_t6$2 = _$3`<var class="h">Hits</var>`));
17769
- m = $(_t7$2 || (_t7$2 = _$3`<var class="m">Misses</var>`));
17770
- fa = $(_t8$2 || (_t8$2 = _$3`<var class="fa">False Alarms</var>`));
17771
- cr = $(_t9$2 || (_t9$2 = _$3`<var class="cr">Correct Rejections</var>`));
17772
- acc = $(_t10$2 || (_t10$2 = _$3`<var class="acc">Accuracy</var>`));
17982
+ h = $(_t6$3 || (_t6$3 = _$4`<var class="h">Hits</var>`));
17983
+ m = $(_t7$3 || (_t7$3 = _$4`<var class="m">Misses</var>`));
17984
+ fa = $(_t8$2 || (_t8$2 = _$4`<var class="fa">False Alarms</var>`));
17985
+ cr = $(_t9$2 || (_t9$2 = _$4`<var class="cr">Correct Rejections</var>`));
17986
+ acc = $(_t10$2 || (_t10$2 = _$4`<var class="acc">Accuracy</var>`));
17773
17987
  }
17774
17988
 
17775
- return $(_t11$2 || (_t11$2 = _$3`
17989
+ return $(_t11$2 || (_t11$2 = _$4`
17776
17990
  <div class="holder">
17777
17991
  <table class="equation">
17778
17992
  <tbody>
@@ -17791,20 +18005,20 @@ class SDTEquationHMFaCr2Acc extends SDTEquation {
17791
18005
  </tr>
17792
18006
  </tbody>
17793
18007
  </table>
17794
- </div>`), acc, h, cr, h, m, fa, cr);
18008
+ </div>`), acc, h, cr, h, cr, m, fa);
17795
18009
  }
17796
18010
 
17797
18011
  }
17798
18012
  customElements.define('sdt-equation-hmfacr2acc', SDTEquationHMFaCr2Acc);
17799
18013
 
17800
- let _$2 = t => t,
17801
- _t$2,
17802
- _t2$2,
17803
- _t3$1,
17804
- _t4$1,
17805
- _t5$1,
17806
- _t6$1,
17807
- _t7$1,
18014
+ let _$3 = t => t,
18015
+ _t$3,
18016
+ _t2$3,
18017
+ _t3$2,
18018
+ _t4$2,
18019
+ _t5$2,
18020
+ _t6$2,
18021
+ _t7$2,
17808
18022
  _t8$1,
17809
18023
  _t9$1,
17810
18024
  _t10$1,
@@ -17899,37 +18113,37 @@ class SDTEquationHrFar2C extends SDTEquation {
17899
18113
  let c;
17900
18114
 
17901
18115
  if (this.numeric) {
17902
- hr = $(_t$2 || (_t$2 = _$2`
18116
+ hr = $(_t$3 || (_t$3 = _$3`
17903
18117
  <decidables-spinner class="hr bottom" ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
17904
18118
  <var>Hit Rate</var>
17905
18119
  </decidables-spinner>
17906
18120
  `), !this.interactive, this.hr, this.hrInput.bind(this));
17907
- far = $(_t2$2 || (_t2$2 = _$2`
18121
+ far = $(_t2$3 || (_t2$3 = _$3`
17908
18122
  <decidables-spinner class="far bottom" ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
17909
18123
  <var>False Alarm Rate</var>
17910
18124
  </decidables-spinner>
17911
18125
  `), !this.interactive, this.far, this.farInput.bind(this));
17912
- s = $(_t3$1 || (_t3$1 = _$2`
18126
+ s = $(_t3$2 || (_t3$2 = _$3`
17913
18127
  <decidables-spinner class="s bottom" ?disabled=${0} min="0" step=".001" .value="${0}" @input=${0}>
17914
18128
  <var class="math-var">σ</var>
17915
18129
  </decidables-spinner>
17916
18130
  `), !this.interactive, this.s, this.sInput.bind(this));
17917
- c = $(_t4$1 || (_t4$1 = _$2`
18131
+ c = $(_t4$2 || (_t4$2 = _$3`
17918
18132
  <decidables-spinner class="c bottom" disabled step=".001" .value="${0}">
17919
18133
  <var class="math-var">c</var>
17920
18134
  </decidables-spinner>
17921
18135
  `), +this.c.toFixed(3));
17922
18136
  } else {
17923
- hr = $(_t5$1 || (_t5$1 = _$2`<var class="hr">Hit Rate</var>`));
17924
- far = $(_t6$1 || (_t6$1 = _$2`<var class="far">False Alarm Rate</var>`));
17925
- s = $(_t7$1 || (_t7$1 = _$2`<var class="math-var s">σ</var>`));
17926
- c = $(_t8$1 || (_t8$1 = _$2`<var class="math-var c">c</var>`));
18137
+ hr = $(_t5$2 || (_t5$2 = _$3`<var class="hr">Hit Rate</var>`));
18138
+ far = $(_t6$2 || (_t6$2 = _$3`<var class="far">False Alarm Rate</var>`));
18139
+ s = $(_t7$2 || (_t7$2 = _$3`<var class="math-var s">σ</var>`));
18140
+ c = $(_t8$1 || (_t8$1 = _$3`<var class="math-var c">c</var>`));
17927
18141
  }
17928
18142
 
17929
18143
  let equation;
17930
18144
 
17931
18145
  if (this.unequal) {
17932
- equation = $(_t9$1 || (_t9$1 = _$2`
18146
+ equation = $(_t9$1 || (_t9$1 = _$3`
17933
18147
  <tr>
17934
18148
  <td rowspan="2">
17935
18149
  ${0}<span class="equals">=</span><span class="bracket tight">(</span>
@@ -17956,7 +18170,7 @@ class SDTEquationHrFar2C extends SDTEquation {
17956
18170
  </td>
17957
18171
  </tr>`), c, s, s, hr, far, s);
17958
18172
  } else {
17959
- equation = $(_t10$1 || (_t10$1 = _$2`
18173
+ equation = $(_t10$1 || (_t10$1 = _$3`
17960
18174
  <tr>
17961
18175
  <td rowspan="2">
17962
18176
  ${0}<span class="equals">=</span>
@@ -17972,7 +18186,7 @@ class SDTEquationHrFar2C extends SDTEquation {
17972
18186
  </tr>`), c, hr, far);
17973
18187
  }
17974
18188
 
17975
- return $(_t11$1 || (_t11$1 = _$2`
18189
+ return $(_t11$1 || (_t11$1 = _$3`
17976
18190
  <div class="holder">
17977
18191
  <table class="equation">
17978
18192
  <tbody>
@@ -17985,14 +18199,14 @@ class SDTEquationHrFar2C extends SDTEquation {
17985
18199
  }
17986
18200
  customElements.define('sdt-equation-hrfar2c', SDTEquationHrFar2C);
17987
18201
 
17988
- let _$1 = t => t,
17989
- _t$1,
17990
- _t2$1,
17991
- _t3,
17992
- _t4,
17993
- _t5,
17994
- _t6,
17995
- _t7,
18202
+ let _$2 = t => t,
18203
+ _t$2,
18204
+ _t2$2,
18205
+ _t3$1,
18206
+ _t4$1,
18207
+ _t5$1,
18208
+ _t6$1,
18209
+ _t7$1,
17996
18210
  _t8,
17997
18211
  _t9,
17998
18212
  _t10,
@@ -18087,37 +18301,37 @@ class SDTEquationHrFar2D extends SDTEquation {
18087
18301
  let d;
18088
18302
 
18089
18303
  if (this.numeric) {
18090
- hr = $(_t$1 || (_t$1 = _$1`
18304
+ hr = $(_t$2 || (_t$2 = _$2`
18091
18305
  <decidables-spinner class="hr bottom" ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
18092
18306
  <var>Hit Rate</var>
18093
18307
  </decidables-spinner>
18094
18308
  `), !this.interactive, this.hr, this.hrInput.bind(this));
18095
- far = $(_t2$1 || (_t2$1 = _$1`
18309
+ far = $(_t2$2 || (_t2$2 = _$2`
18096
18310
  <decidables-spinner class="far bottom" ?disabled=${0} min="0" max="1" step=".001" .value="${0}" @input=${0}>
18097
18311
  <var>False Alarm Rate</var>
18098
18312
  </decidables-spinner>
18099
18313
  `), !this.interactive, this.far, this.farInput.bind(this));
18100
- s = $(_t3 || (_t3 = _$1`
18314
+ s = $(_t3$1 || (_t3$1 = _$2`
18101
18315
  <decidables-spinner class="s bottom" ?disabled=${0} min="0" step=".001" .value="${0}" @input=${0}>
18102
18316
  <var class="math-var">σ</var>
18103
18317
  </decidables-spinner>
18104
18318
  `), !this.interactive, this.s, this.sInput.bind(this));
18105
- d = $(_t4 || (_t4 = _$1`
18319
+ d = $(_t4$1 || (_t4$1 = _$2`
18106
18320
  <decidables-spinner class="d bottom" disabled step=".001" .value="${0}">
18107
18321
  <var class="math-var">d′</var>
18108
18322
  </decidables-spinner>
18109
18323
  `), +this.d.toFixed(3));
18110
18324
  } else {
18111
- hr = $(_t5 || (_t5 = _$1`<var class="hr">Hit Rate</var>`));
18112
- far = $(_t6 || (_t6 = _$1`<var class="far">False Alarm Rate</var>`));
18113
- s = $(_t7 || (_t7 = _$1`<var class="math-var s">σ</var>`));
18114
- d = $(_t8 || (_t8 = _$1`<var class="math-var d">d′</var>`));
18325
+ hr = $(_t5$1 || (_t5$1 = _$2`<var class="hr">Hit Rate</var>`));
18326
+ far = $(_t6$1 || (_t6$1 = _$2`<var class="far">False Alarm Rate</var>`));
18327
+ s = $(_t7$1 || (_t7$1 = _$2`<var class="math-var s">σ</var>`));
18328
+ d = $(_t8 || (_t8 = _$2`<var class="math-var d">d′</var>`));
18115
18329
  }
18116
18330
 
18117
18331
  let equation;
18118
18332
 
18119
18333
  if (this.unequal) {
18120
- equation = $(_t9 || (_t9 = _$1`
18334
+ equation = $(_t9 || (_t9 = _$2`
18121
18335
  <tr>
18122
18336
  <td rowspan="2">
18123
18337
  ${0}<span class="equals">=</span><span class="bracket tight">(</span>
@@ -18135,7 +18349,7 @@ class SDTEquationHrFar2D extends SDTEquation {
18135
18349
  </td>
18136
18350
  </tr>`), d, s, s, hr, far);
18137
18351
  } else {
18138
- equation = $(_t10 || (_t10 = _$1`
18352
+ equation = $(_t10 || (_t10 = _$2`
18139
18353
  <tr>
18140
18354
  <td>
18141
18355
  ${0}<span class="equals">=</span><span class="tight"><var class="math-greek phi tight">Φ</var><sup class="exp">−1</sup></span><span class="paren tight">(</span>${0}<span class="paren tight">)</span><span class="minus">−</span><span class="tight"><var class="math-greek phi tight">Φ</var><sup class="exp">−1</sup></span><span class="paren tight">(</span>${0}<span class="paren tight">)</span>
@@ -18143,7 +18357,7 @@ class SDTEquationHrFar2D extends SDTEquation {
18143
18357
  </tr>`), d, hr, far);
18144
18358
  }
18145
18359
 
18146
- return $(_t11 || (_t11 = _$1`
18360
+ return $(_t11 || (_t11 = _$2`
18147
18361
  <div class="holder">
18148
18362
  <table class="equation">
18149
18363
  <tbody>
@@ -18156,6 +18370,131 @@ class SDTEquationHrFar2D extends SDTEquation {
18156
18370
  }
18157
18371
  customElements.define('sdt-equation-hrfar2d', SDTEquationHrFar2D);
18158
18372
 
18373
+ let _$1 = t => t,
18374
+ _t$1,
18375
+ _t2$1,
18376
+ _t3,
18377
+ _t4,
18378
+ _t5,
18379
+ _t6,
18380
+ _t7;
18381
+ /*
18382
+ SDTEquationMCr2Fomr element
18383
+ <sdt-equation-mcr2fomr>
18384
+
18385
+ Attributes:
18386
+ Hits; Misses; Hit Rate;
18387
+ */
18388
+
18389
+ class SDTEquationMCr2Fomr extends SDTEquation {
18390
+ static get properties() {
18391
+ return {
18392
+ m: {
18393
+ attribute: 'misses',
18394
+ type: Number,
18395
+ reflect: true
18396
+ },
18397
+ cr: {
18398
+ attribute: 'correct-rejections',
18399
+ type: Number,
18400
+ reflect: true
18401
+ },
18402
+ fomr: {
18403
+ attribute: false,
18404
+ type: Number,
18405
+ reflect: false
18406
+ }
18407
+ };
18408
+ }
18409
+
18410
+ constructor() {
18411
+ super();
18412
+ this.m = 0;
18413
+ this.cr = 0;
18414
+ this.alignState();
18415
+ }
18416
+
18417
+ alignState() {
18418
+ this.fomr = SDTMath.mCr2Fomr(this.m, this.cr);
18419
+ }
18420
+
18421
+ sendEvent() {
18422
+ this.dispatchEvent(new CustomEvent('sdt-equation-mcr2fomr-change', {
18423
+ detail: {
18424
+ m: this.m,
18425
+ cr: this.cr,
18426
+ fomr: this.fomr
18427
+ },
18428
+ bubbles: true
18429
+ }));
18430
+ }
18431
+
18432
+ mInput(event) {
18433
+ this.m = parseInt(event.target.value, 10);
18434
+ this.alignState();
18435
+ this.sendEvent();
18436
+ }
18437
+
18438
+ crInput(event) {
18439
+ this.cr = parseInt(event.target.value, 10);
18440
+ this.alignState();
18441
+ this.sendEvent();
18442
+ }
18443
+
18444
+ render() {
18445
+ this.alignState();
18446
+ let m;
18447
+ let cr;
18448
+ let fomr;
18449
+
18450
+ if (this.numeric) {
18451
+ m = $(_t$1 || (_t$1 = _$1`
18452
+ <decidables-spinner class="m" ?disabled=${0} min="0" .value="${0}" @input=${0}>
18453
+ <var>Misses</var>
18454
+ </decidables-spinner>
18455
+ `), !this.interactive, this.m, this.mInput.bind(this));
18456
+ cr = $(_t2$1 || (_t2$1 = _$1`
18457
+ <decidables-spinner class="cr" ?disabled=${0} min="0" .value="${0}" @input=${0}>
18458
+ <var>Correct Rejections</var>
18459
+ </decidables-spinner>
18460
+ `), !this.interactive, this.cr, this.crInput.bind(this));
18461
+ fomr = $(_t3 || (_t3 = _$1`
18462
+ <decidables-spinner class="fomr" disabled min="0" max="1" step=".001" .value="${0}">
18463
+ <var>False Omission Rate</var>
18464
+ </decidables-spinner>
18465
+ `), +this.fomr.toFixed(3));
18466
+ } else {
18467
+ m = $(_t4 || (_t4 = _$1`<var class="m">Misses</var>`));
18468
+ cr = $(_t5 || (_t5 = _$1`<var class="cr">Correct Rejections</var>`));
18469
+ fomr = $(_t6 || (_t6 = _$1`<var class="fomr">False Omission Rate</var>`));
18470
+ }
18471
+
18472
+ return $(_t7 || (_t7 = _$1`
18473
+ <div class="holder">
18474
+ <table class="equation">
18475
+ <tbody>
18476
+ <tr>
18477
+ <td rowspan="2">
18478
+ ${0}<span class="equals">=</span>
18479
+ </td>
18480
+ <td class="underline">
18481
+ ${0}
18482
+ </td>
18483
+ </tr>
18484
+ <tr>
18485
+ <td>
18486
+ ${0}<span class="plus">+</span>${0}
18487
+ </td>
18488
+ </tr>
18489
+ </tbody>
18490
+ </table>
18491
+ </div>
18492
+ `), fomr, m, m, cr);
18493
+ }
18494
+
18495
+ }
18496
+ customElements.define('sdt-equation-mcr2fomr', SDTEquationMCr2Fomr);
18497
+
18159
18498
  let _ = t => t,
18160
18499
  _t,
18161
18500
  _t2;
@@ -18168,7 +18507,6 @@ class SDTExample extends DetectableElement {
18168
18507
  static get styles() {
18169
18508
  return [super.styles, r$2(_t || (_t = _`
18170
18509
  :host {
18171
- ---border: var(--border, 1px solid var(---color-border));
18172
18510
  display: inline-block;
18173
18511
 
18174
18512
  margin-bottom: 1rem;
@@ -18189,7 +18527,7 @@ class SDTExample extends DetectableElement {
18189
18527
  padding: 0.625rem;
18190
18528
 
18191
18529
  border: var(---border);
18192
- border-radius: 0.25rem;
18530
+ border-radius: var(---border-radius);
18193
18531
  }
18194
18532
 
18195
18533
  .body ::slotted(*) {
@@ -18215,7 +18553,7 @@ class SDTExample extends DetectableElement {
18215
18553
  }
18216
18554
 
18217
18555
  render() {
18218
- // eslint-disable-line class-methods-use-this
18556
+ /* eslint-disable-line class-methods-use-this */
18219
18557
  return $(_t2 || (_t2 = _`
18220
18558
  <div class="holder">
18221
18559
  <div class="body">
@@ -18863,6 +19201,81 @@ class SDTExampleModel extends SDTExample {
18863
19201
  }
18864
19202
  customElements.define('sdt-example-model', SDTExampleModel);
18865
19203
 
19204
+ /*
19205
+ SDTExampleMulti element
19206
+ <sdt-example-multi>
19207
+ */
19208
+
19209
+ class SDTExampleMultiple extends SDTExample {
19210
+ static get properties() {
19211
+ return {
19212
+ variable: {
19213
+ attribute: 'variable',
19214
+ type: String,
19215
+ reflect: true
19216
+ },
19217
+ values: {
19218
+ attribute: 'values',
19219
+ converter: DecidablesConverterArray,
19220
+ reflect: true
19221
+ }
19222
+ };
19223
+ }
19224
+
19225
+ constructor() {
19226
+ super();
19227
+ this.variables = ['d', 'c'];
19228
+ this.variable = 'd';
19229
+ this.values = [0, 1];
19230
+ }
19231
+
19232
+ firstUpdated() {
19233
+ this.detectableControl = this.querySelector('detectable-control');
19234
+ this.rocSpace = this.querySelector('roc-space');
19235
+ this.sdtModel = this.querySelector('sdt-model');
19236
+
19237
+ if (this.detectableControl) {
19238
+ this.detectableControl.addEventListener('detectable-control-z-roc', event => {
19239
+ this.rocSpace.zRoc = event.detail.zRoc;
19240
+ });
19241
+ }
19242
+
19243
+ if (this.rocSpace) {
19244
+ this.rocSpace.setWithSDT(1, 0, 'default', '', 1);
19245
+
19246
+ if (this.variable === 'd') {
19247
+ this.values.forEach((d, index) => {
19248
+ this.rocSpace.setWithSDT(d, this.sdtModel.c, `point${index}`, index + 1, this.sdtModel.s);
19249
+ });
19250
+ } else if (this.variable === 'c') {
19251
+ this.values.forEach((c, index) => {
19252
+ this.rocSpace.setWithSDT(this.sdtModel.d, c, `point${index}`, index + 1, this.sdtModel.s);
19253
+ });
19254
+ }
19255
+ }
19256
+
19257
+ if (this.sdtModel) {
19258
+ this.sdtModel.addEventListener('sdt-model-change', event => {
19259
+ if (this.rocSpace) {
19260
+ this.rocSpace.setWithSDT(event.detail.d, event.detail.c, 'default', '', event.detail.s);
19261
+
19262
+ if (this.variable === 'd') {
19263
+ this.values.forEach((d, index) => {
19264
+ this.rocSpace.setWithSDT(d, event.detail.c, `point${index}`, index + 1, event.detail.s);
19265
+ });
19266
+ } else if (this.variable === 'c') {
19267
+ this.values.forEach((c, index) => {
19268
+ this.rocSpace.setWithSDT(event.detail.d, c, `point${index}`, index + 1, event.detail.s);
19269
+ });
19270
+ }
19271
+ }
19272
+ });
19273
+ }
19274
+ }
19275
+
19276
+ }
19277
+ customElements.define('sdt-example-multiple', SDTExampleMultiple);
19278
+
18866
19279
  /*
18867
19280
  SDTExampleUnequal element
18868
19281
  <sdt-example-unequal>
@@ -18882,15 +19295,13 @@ class SDTExampleUnequal extends SDTExample {
18882
19295
 
18883
19296
  if (this.rocSpace) {
18884
19297
  this.rocSpace.setWithSDT(1, 0, 'default', '', 1); // Set 'default' to equal variance for contours
19298
+
19299
+ range(-1.5, 1.6, 0.5).forEach((c, index) => {
19300
+ this.rocSpace.setWithSDT(this.sdtModel.d, c, `point${index}`, '', this.sdtModel.s);
19301
+ });
18885
19302
  }
18886
19303
 
18887
19304
  if (this.sdtModel) {
18888
- if (this.rocSpace) {
18889
- range(-1.5, 1.6, 0.5).forEach((c, index) => {
18890
- this.rocSpace.setWithSDT(this.sdtModel.d, c, `point${index}`, '', this.sdtModel.s);
18891
- });
18892
- }
18893
-
18894
19305
  this.sdtModel.addEventListener('sdt-model-change', event => {
18895
19306
  if (this.rocSpace) {
18896
19307
  range(-1.5, 1.6, 0.5).forEach((c, index) => {
@@ -18904,5 +19315,5 @@ class SDTExampleUnequal extends SDTExample {
18904
19315
  }
18905
19316
  customElements.define('sdt-example-unequal', SDTExampleUnequal);
18906
19317
 
18907
- export { DetectableControl, DetectableElement, DetectableResponse, DetectableTable, RDKTask, ROCSpace, SDTEquationDC2Far, SDTEquationDC2Hr, SDTEquationFaCr2Far, SDTEquationHM2Hr, SDTEquationHMFaCr2Acc, SDTEquationHrFar2C, SDTEquationHrFar2D, SDTExampleDoubleInteractive, SDTExampleHuman, SDTExampleInteractive, SDTExampleModel, SDTExampleUnequal, SDTModel };
19318
+ export { DetectableControl, DetectableElement, DetectableResponse, DetectableTable, RDKTask, ROCSpace, SDTEquationDC2Far, SDTEquationDC2Hr, SDTEquationFaCr2Far, SDTEquationHFa2Ppv, SDTEquationHM2Hr, SDTEquationHMFaCr2Acc, SDTEquationHrFar2C, SDTEquationHrFar2D, SDTEquationMCr2Fomr, SDTExampleDoubleInteractive, SDTExampleHuman, SDTExampleInteractive, SDTExampleModel, SDTExampleMultiple, SDTExampleUnequal, SDTModel };
18908
19319
  //# sourceMappingURL=detectableElements.esm.js.map