@ni/nimble-components 35.1.2 → 35.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.
Files changed (101) hide show
  1. package/dist/all-components-bundle.js +307 -254
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +3904 -3882
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +3 -0
  6. package/dist/esm/all-components.js +3 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/anchor/template.js +4 -4
  9. package/dist/esm/anchor/template.js.map +1 -1
  10. package/dist/esm/anchor-step/index.d.ts +12 -0
  11. package/dist/esm/anchor-step/index.js +16 -0
  12. package/dist/esm/anchor-step/index.js.map +1 -0
  13. package/dist/esm/anchor-step/styles.d.ts +1 -0
  14. package/dist/esm/anchor-step/styles.js +6 -0
  15. package/dist/esm/anchor-step/styles.js.map +1 -0
  16. package/dist/esm/anchor-step/template.d.ts +2 -0
  17. package/dist/esm/anchor-step/template.js +5 -0
  18. package/dist/esm/anchor-step/template.js.map +1 -0
  19. package/dist/esm/anchor-tabs/index.js +2 -0
  20. package/dist/esm/anchor-tabs/index.js.map +1 -1
  21. package/dist/esm/checkbox/template.js +3 -3
  22. package/dist/esm/checkbox/template.js.map +1 -1
  23. package/dist/esm/chip/testing/chip.pageobject.js +1 -1
  24. package/dist/esm/chip/testing/chip.pageobject.js.map +1 -1
  25. package/dist/esm/combobox/index.js +11 -11
  26. package/dist/esm/combobox/index.js.map +1 -1
  27. package/dist/esm/combobox/template.js +1 -1
  28. package/dist/esm/combobox/template.js.map +1 -1
  29. package/dist/esm/dialog/index.js +1 -1
  30. package/dist/esm/dialog/index.js.map +1 -1
  31. package/dist/esm/menu/menu.foundation.js +3 -3
  32. package/dist/esm/menu/menu.foundation.js.map +1 -1
  33. package/dist/esm/menu-button/index.js +2 -2
  34. package/dist/esm/menu-button/index.js.map +1 -1
  35. package/dist/esm/number-field/template.js +3 -3
  36. package/dist/esm/number-field/template.js.map +1 -1
  37. package/dist/esm/rich-text/editor/index.js +1 -1
  38. package/dist/esm/rich-text/editor/index.js.map +1 -1
  39. package/dist/esm/rich-text/editor/models/create-tiptap-editor.js +1 -1
  40. package/dist/esm/rich-text/editor/models/create-tiptap-editor.js.map +1 -1
  41. package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js +1 -3
  42. package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js.map +1 -1
  43. package/dist/esm/rich-text/mention-listbox/index.d.ts +1 -1
  44. package/dist/esm/rich-text/mention-listbox/index.js +3 -3
  45. package/dist/esm/rich-text/mention-listbox/index.js.map +1 -1
  46. package/dist/esm/rich-text/models/markdown-serializer.js +1 -1
  47. package/dist/esm/rich-text/models/markdown-serializer.js.map +1 -1
  48. package/dist/esm/rich-text/models/rich-text-validator.js +1 -1
  49. package/dist/esm/rich-text/models/rich-text-validator.js.map +1 -1
  50. package/dist/esm/select/index.js +11 -15
  51. package/dist/esm/select/index.js.map +1 -1
  52. package/dist/esm/select/template.js +1 -1
  53. package/dist/esm/select/template.js.map +1 -1
  54. package/dist/esm/step/index.d.ts +12 -0
  55. package/dist/esm/step/index.js +16 -0
  56. package/dist/esm/step/index.js.map +1 -0
  57. package/dist/esm/step/styles.d.ts +1 -0
  58. package/dist/esm/step/styles.js +6 -0
  59. package/dist/esm/step/styles.js.map +1 -0
  60. package/dist/esm/step/template.d.ts +2 -0
  61. package/dist/esm/step/template.js +5 -0
  62. package/dist/esm/step/template.js.map +1 -0
  63. package/dist/esm/stepper/index.d.ts +12 -0
  64. package/dist/esm/stepper/index.js +16 -0
  65. package/dist/esm/stepper/index.js.map +1 -0
  66. package/dist/esm/stepper/styles.d.ts +1 -0
  67. package/dist/esm/stepper/styles.js +6 -0
  68. package/dist/esm/stepper/styles.js.map +1 -0
  69. package/dist/esm/stepper/template.d.ts +2 -0
  70. package/dist/esm/stepper/template.js +5 -0
  71. package/dist/esm/stepper/template.js.map +1 -0
  72. package/dist/esm/switch/template.js +1 -1
  73. package/dist/esm/switch/template.js.map +1 -1
  74. package/dist/esm/table/index.js +1 -1
  75. package/dist/esm/table/index.js.map +1 -1
  76. package/dist/esm/table/models/array-to-tree.js +6 -10
  77. package/dist/esm/table/models/array-to-tree.js.map +1 -1
  78. package/dist/esm/table/models/keyboard-navigation-manager.js.map +1 -1
  79. package/dist/esm/table/models/selection-managers/selection-manager-base.js +1 -1
  80. package/dist/esm/table/models/selection-managers/selection-manager-base.js.map +1 -1
  81. package/dist/esm/table/models/table-layout-manager.js +1 -1
  82. package/dist/esm/table/models/table-layout-manager.js.map +1 -1
  83. package/dist/esm/table/models/table-validator.js +1 -1
  84. package/dist/esm/table/models/table-validator.js.map +1 -1
  85. package/dist/esm/table-column/duration-text/models/duration-formatter.js +2 -2
  86. package/dist/esm/table-column/duration-text/models/duration-formatter.js.map +1 -1
  87. package/dist/esm/text-area/template.js +1 -1
  88. package/dist/esm/text-area/template.js.map +1 -1
  89. package/dist/esm/text-field/template.js +1 -1
  90. package/dist/esm/text-field/template.js.map +1 -1
  91. package/dist/esm/utilities/models/tracker.js.map +1 -1
  92. package/dist/esm/wafer-map/experimental/worker-renderer.js +1 -2
  93. package/dist/esm/wafer-map/experimental/worker-renderer.js.map +1 -1
  94. package/dist/esm/wafer-map/modules/rendering.js +1 -1
  95. package/dist/esm/wafer-map/modules/rendering.js.map +1 -1
  96. package/dist/esm/wafer-map/modules/wafer-map-validator.js +1 -1
  97. package/dist/esm/wafer-map/modules/wafer-map-validator.js.map +1 -1
  98. package/dist/esm/wafer-map/workers/worker-code.d.ts +1 -1
  99. package/dist/esm/wafer-map/workers/worker-code.js +1 -1
  100. package/dist/esm/wafer-map/workers/worker-code.js.map +1 -1
  101. package/package.json +1 -1
@@ -14881,9 +14881,9 @@
14881
14881
  const prefix = 'ni-nimble';
14882
14882
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
14883
14883
 
14884
- const template$O = html `<slot></slot>`;
14884
+ const template$R = html `<slot></slot>`;
14885
14885
 
14886
- const styles$11 = css `
14886
+ const styles$14 = css `
14887
14887
  ${display('contents')}
14888
14888
  `;
14889
14889
 
@@ -14998,8 +14998,8 @@
14998
14998
  ], ThemeProvider.prototype, "theme", void 0);
14999
14999
  const nimbleDesignSystemProvider = ThemeProvider.compose({
15000
15000
  baseName: 'theme-provider',
15001
- styles: styles$11,
15002
- template: template$O
15001
+ styles: styles$14,
15002
+ template: template$R
15003
15003
  });
15004
15004
  DesignSystem.getOrCreate()
15005
15005
  .withPrefix('nimble')
@@ -16572,7 +16572,7 @@
16572
16572
  }
16573
16573
  // #endregion
16574
16574
 
16575
- const styles$10 = css `
16575
+ const styles$13 = css `
16576
16576
  @layer base, hover, focusVisible, active, disabled;
16577
16577
 
16578
16578
  @layer base {
@@ -16650,7 +16650,7 @@
16650
16650
  }
16651
16651
  `;
16652
16652
 
16653
- const template$N = (_context, definition) => html `${
16653
+ const template$Q = (_context, definition) => html `${
16654
16654
  /* top-container div is necessary because setting contenteditable directly on the native anchor instead
16655
16655
  leaves it focusable, unlike the behavior you get when the anchor is _within_ a contenteditable element.
16656
16656
  */ ''}<div
@@ -16696,12 +16696,12 @@
16696
16696
  Whitespace intentionally avoided between tags for inline styles */ ''}<span
16697
16697
  part="start"
16698
16698
  ${ref('startContainer')}
16699
- class="${_x => (definition.start ? 'start' : null)}"
16699
+ class="${_x => (definition.start !== undefined ? 'start' : null)}"
16700
16700
  ><slot
16701
16701
  name="start"
16702
16702
  ${ref('start')}
16703
16703
  @slotchange="${x => x.handleStartContentChange()}">
16704
- ${definition.start || ''}
16704
+ ${definition.start ?? ''}
16705
16705
  </slot
16706
16706
  ></span
16707
16707
  ><span
@@ -16714,12 +16714,12 @@
16714
16714
  ><span
16715
16715
  part="end"
16716
16716
  ${ref('endContainer')}
16717
- class=${_x => (definition.end ? 'end' : null)}
16717
+ class=${_x => (definition.end !== undefined ? 'end' : null)}
16718
16718
  ><slot
16719
16719
  name="end"
16720
16720
  ${ref('end')}
16721
16721
  @slotchange="${x => x.handleEndContentChange()}">
16722
- ${definition.end || ''}
16722
+ ${definition.end ?? ''}
16723
16723
  </slot
16724
16724
  ></span></a></div>`;
16725
16725
 
@@ -16753,8 +16753,8 @@
16753
16753
  const nimbleAnchor = Anchor.compose({
16754
16754
  baseName: 'anchor',
16755
16755
  baseClass: Anchor$1,
16756
- template: template$N,
16757
- styles: styles$10,
16756
+ template: template$Q,
16757
+ styles: styles$13,
16758
16758
  shadowOptions: {
16759
16759
  delegatesFocus: true
16760
16760
  }
@@ -16863,7 +16863,7 @@
16863
16863
  padding: 0;
16864
16864
  `;
16865
16865
 
16866
- const styles$$ = css `
16866
+ const styles$12 = css `
16867
16867
  @layer base, checked, hover, focusVisible, active, disabled, top;
16868
16868
 
16869
16869
  @layer base {
@@ -17147,8 +17147,8 @@
17147
17147
  }
17148
17148
  `));
17149
17149
 
17150
- const styles$_ = css `
17151
- ${styles$$}
17150
+ const styles$11 = css `
17151
+ ${styles$12}
17152
17152
  ${buttonAppearanceVariantStyles}
17153
17153
 
17154
17154
  .control {
@@ -17168,7 +17168,7 @@
17168
17168
  }
17169
17169
  `;
17170
17170
 
17171
- const template$M = (context, definition) => html `
17171
+ const template$P = (context, definition) => html `
17172
17172
  <a
17173
17173
  class="control"
17174
17174
  part="control"
@@ -17250,8 +17250,8 @@
17250
17250
  ], AnchorButton.prototype, "disabled", void 0);
17251
17251
  const nimbleAnchorButton = AnchorButton.compose({
17252
17252
  baseName: 'anchor-button',
17253
- template: template$M,
17254
- styles: styles$_,
17253
+ template: template$P,
17254
+ styles: styles$11,
17255
17255
  shadowOptions: {
17256
17256
  delegatesFocus: true
17257
17257
  }
@@ -17259,7 +17259,7 @@
17259
17259
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17260
17260
  const anchorButtonTag = 'nimble-anchor-button';
17261
17261
 
17262
- const styles$Z = css `
17262
+ const styles$10 = css `
17263
17263
  ${display('grid')}
17264
17264
 
17265
17265
  :host {
@@ -17342,7 +17342,7 @@
17342
17342
  }
17343
17343
  `;
17344
17344
 
17345
- const template$L = (context, definition) => html `
17345
+ const template$O = (context, definition) => html `
17346
17346
  <template
17347
17347
  role="menuitem"
17348
17348
  class="${x => (typeof x.startColumnCount === 'number'
@@ -17443,8 +17443,8 @@
17443
17443
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17444
17444
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17445
17445
  baseName: 'anchor-menu-item',
17446
- template: template$L,
17447
- styles: styles$Z,
17446
+ template: template$O,
17447
+ styles: styles$10,
17448
17448
  shadowOptions: {
17449
17449
  delegatesFocus: true
17450
17450
  }
@@ -17454,7 +17454,27 @@
17454
17454
  .register(nimbleAnchorMenuItem());
17455
17455
  const anchorMenuItemTag = 'nimble-anchor-menu-item';
17456
17456
 
17457
- const styles$Y = css `
17457
+ const styles$$ = css `
17458
+ ${display('flex')}
17459
+ `;
17460
+
17461
+ const template$N = html `
17462
+ <template>anchor step</template>
17463
+ `;
17464
+
17465
+ /**
17466
+ * A nimble-styled anchor step for a stepper
17467
+ */
17468
+ class AnchorStep extends FoundationElement {
17469
+ }
17470
+ const nimbleAnchorStep = AnchorStep.compose({
17471
+ baseName: 'anchor-step',
17472
+ template: template$N,
17473
+ styles: styles$$
17474
+ });
17475
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorStep());
17476
+
17477
+ const styles$_ = css `
17458
17478
  ${display('inline-flex')}
17459
17479
 
17460
17480
  :host {
@@ -17571,7 +17591,7 @@
17571
17591
  }
17572
17592
  `;
17573
17593
 
17574
- const template$K = (context, definition) => html `
17594
+ const template$M = (context, definition) => html `
17575
17595
  <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
17576
17596
  <a
17577
17597
  download="${x => x.download}"
@@ -17623,15 +17643,15 @@
17623
17643
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17624
17644
  const nimbleAnchorTab = AnchorTab.compose({
17625
17645
  baseName: 'anchor-tab',
17626
- template: template$K,
17627
- styles: styles$Y,
17646
+ template: template$M,
17647
+ styles: styles$_,
17628
17648
  shadowOptions: {
17629
17649
  delegatesFocus: true
17630
17650
  }
17631
17651
  });
17632
17652
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
17633
17653
 
17634
- const styles$X = css `
17654
+ const styles$Z = css `
17635
17655
  ${display('flex')}
17636
17656
 
17637
17657
  :host {
@@ -17671,12 +17691,12 @@
17671
17691
  }
17672
17692
  `;
17673
17693
 
17674
- const styles$W = css `
17675
- ${styles$$}
17694
+ const styles$Y = css `
17695
+ ${styles$12}
17676
17696
  ${buttonAppearanceVariantStyles}
17677
17697
  `;
17678
17698
 
17679
- const template$J = (context, definition) => html `
17699
+ const template$L = (context, definition) => html `
17680
17700
  <button
17681
17701
  class="control"
17682
17702
  part="control"
@@ -17767,8 +17787,8 @@
17767
17787
  const nimbleButton = Button.compose({
17768
17788
  baseName: 'button',
17769
17789
  baseClass: Button$1,
17770
- template: template$J,
17771
- styles: styles$W,
17790
+ template: template$L,
17791
+ styles: styles$Y,
17772
17792
  shadowOptions: {
17773
17793
  delegatesFocus: true
17774
17794
  }
@@ -18715,7 +18735,7 @@
18715
18735
  };
18716
18736
 
18717
18737
  // Avoiding any whitespace in the template because this is an inline element
18718
- const template$I = html `<div
18738
+ const template$K = html `<div
18719
18739
  class="icon"
18720
18740
  aria-hidden="true"
18721
18741
  :innerHTML=${x => x.icon.data}
@@ -18730,7 +18750,7 @@
18730
18750
  -webkit-user-select: none;
18731
18751
  `;
18732
18752
 
18733
- const styles$V = css `
18753
+ const styles$X = css `
18734
18754
  ${display('inline-flex')}
18735
18755
 
18736
18756
  :host {
@@ -18793,8 +18813,8 @@
18793
18813
  const registerIconSvg = (baseName, iconClass) => {
18794
18814
  const composedIcon = iconClass.compose({
18795
18815
  baseName,
18796
- template: template$I,
18797
- styles: styles$V
18816
+ template: template$K,
18817
+ styles: styles$X
18798
18818
  });
18799
18819
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
18800
18820
  };
@@ -18889,7 +18909,7 @@
18889
18909
  cssCustomPropertyName: null
18890
18910
  }).withDefault(coreLabelDefaults.itemRemoveLabel);
18891
18911
 
18892
- const template$H = (context, definition) => html `
18912
+ const template$J = (context, definition) => html `
18893
18913
  <div
18894
18914
  class="tab-bar"
18895
18915
  >
@@ -18992,6 +19012,8 @@
18992
19012
  tab.style[gridHorizontalProperty] = `${index + 1}`;
18993
19013
  });
18994
19014
  if (firstFocusableTab
19015
+ // False positive. See: https://github.com/typescript-eslint/typescript-eslint/issues/12036
19016
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
18995
19017
  && (!this.activetab || !this.isFocusableElement(this.activetab))) {
18996
19018
  firstFocusableTab.setAttribute('tabindex', '0');
18997
19019
  }
@@ -19188,15 +19210,15 @@
19188
19210
  applyMixins(AnchorTabs, StartEnd);
19189
19211
  const nimbleAnchorTabs = AnchorTabs.compose({
19190
19212
  baseName: 'anchor-tabs',
19191
- template: template$H,
19192
- styles: styles$X,
19213
+ template: template$J,
19214
+ styles: styles$Z,
19193
19215
  shadowOptions: {
19194
19216
  delegatesFocus: false
19195
19217
  }
19196
19218
  });
19197
19219
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
19198
19220
 
19199
- const styles$U = css `
19221
+ const styles$W = css `
19200
19222
  ${display('block')}
19201
19223
 
19202
19224
  :host {
@@ -19301,7 +19323,7 @@
19301
19323
  }
19302
19324
  `;
19303
19325
 
19304
- const template$G = (context, definition) => html `
19326
+ const template$I = (context, definition) => html `
19305
19327
  <template
19306
19328
  role="treeitem"
19307
19329
  slot="${x => (x.isNestedItem() ? 'item' : null)}"
@@ -19438,8 +19460,8 @@
19438
19460
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
19439
19461
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
19440
19462
  baseName: 'anchor-tree-item',
19441
- template: template$G,
19442
- styles: styles$U,
19463
+ template: template$I,
19464
+ styles: styles$W,
19443
19465
  shadowOptions: {
19444
19466
  delegatesFocus: true
19445
19467
  }
@@ -19455,7 +19477,7 @@
19455
19477
  zIndex1000: '1000'
19456
19478
  };
19457
19479
 
19458
- const styles$T = css `
19480
+ const styles$V = css `
19459
19481
  ${display('block')}
19460
19482
 
19461
19483
  :host {
@@ -19486,7 +19508,7 @@
19486
19508
  baseName: 'anchored-region',
19487
19509
  baseClass: AnchoredRegion$1,
19488
19510
  template: anchoredRegionTemplate,
19489
- styles: styles$T
19511
+ styles: styles$V
19490
19512
  });
19491
19513
  DesignSystem.getOrCreate()
19492
19514
  .withPrefix('nimble')
@@ -19567,7 +19589,7 @@
19567
19589
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
19568
19590
  /* eslint-enable max-classes-per-file */
19569
19591
 
19570
- const styles$S = css `
19592
+ const styles$U = css `
19571
19593
  ${display('flex')}
19572
19594
 
19573
19595
  :host {
@@ -19745,7 +19767,7 @@
19745
19767
  information: 'information'
19746
19768
  };
19747
19769
 
19748
- const template$F = html `
19770
+ const template$H = html `
19749
19771
  <${themeProviderTag} theme="${Theme.color}">
19750
19772
  <div class="container"
19751
19773
  role="status"
@@ -19863,8 +19885,8 @@
19863
19885
  applyMixins(Banner, ARIAGlobalStatesAndProperties);
19864
19886
  const nimbleBanner = Banner.compose({
19865
19887
  baseName: 'banner',
19866
- template: template$F,
19867
- styles: styles$S
19888
+ template: template$H,
19889
+ styles: styles$U
19868
19890
  });
19869
19891
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
19870
19892
 
@@ -19905,7 +19927,7 @@
19905
19927
  </template>
19906
19928
  `;
19907
19929
 
19908
- const styles$R = css `
19930
+ const styles$T = css `
19909
19931
  ${display('inline-flex')}
19910
19932
 
19911
19933
  :host {
@@ -20009,11 +20031,11 @@
20009
20031
  baseName: 'breadcrumb',
20010
20032
  baseClass: Breadcrumb$1,
20011
20033
  template: breadcrumbTemplate,
20012
- styles: styles$R
20034
+ styles: styles$T
20013
20035
  });
20014
20036
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
20015
20037
 
20016
- const styles$Q = css `
20038
+ const styles$S = css `
20017
20039
  @layer base, hover, focusVisible, active, disabled;
20018
20040
 
20019
20041
  @layer base {
@@ -20110,14 +20132,14 @@ so this becomes the fallback color for the slot */ ''}
20110
20132
  baseName: 'breadcrumb-item',
20111
20133
  baseClass: BreadcrumbItem$1,
20112
20134
  template: breadcrumbItemTemplate,
20113
- styles: styles$Q,
20135
+ styles: styles$S,
20114
20136
  separator: forwardSlash16X16.data
20115
20137
  });
20116
20138
  DesignSystem.getOrCreate()
20117
20139
  .withPrefix('nimble')
20118
20140
  .register(nimbleBreadcrumbItem());
20119
20141
 
20120
- const styles$P = css `
20142
+ const styles$R = css `
20121
20143
  ${display('flex')}
20122
20144
 
20123
20145
  :host {
@@ -20141,7 +20163,7 @@ so this becomes the fallback color for the slot */ ''}
20141
20163
  }
20142
20164
  `;
20143
20165
 
20144
- const template$E = html `
20166
+ const template$G = html `
20145
20167
  <section aria-labelledby="title-slot">
20146
20168
  <span id="title-slot"><slot name="title"></slot></span>
20147
20169
  <slot></slot>
@@ -20156,12 +20178,12 @@ so this becomes the fallback color for the slot */ ''}
20156
20178
  const nimbleCard = Card.compose({
20157
20179
  baseName: 'card',
20158
20180
  baseClass: Card$1,
20159
- template: template$E,
20160
- styles: styles$P
20181
+ template: template$G,
20182
+ styles: styles$R
20161
20183
  });
20162
20184
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCard());
20163
20185
 
20164
- const styles$O = css `
20186
+ const styles$Q = css `
20165
20187
  ${display('inline-flex')}
20166
20188
 
20167
20189
  :host {
@@ -20319,14 +20341,14 @@ so this becomes the fallback color for the slot */ ''}
20319
20341
  const nimbleCardButton = CardButton.compose({
20320
20342
  baseName: 'card-button',
20321
20343
  template: buttonTemplate,
20322
- styles: styles$O,
20344
+ styles: styles$Q,
20323
20345
  shadowOptions: {
20324
20346
  delegatesFocus: true
20325
20347
  }
20326
20348
  });
20327
20349
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
20328
20350
 
20329
- const styles$N = css `
20351
+ const styles$P = css `
20330
20352
  .error-icon {
20331
20353
  display: none;
20332
20354
  }
@@ -20360,9 +20382,9 @@ so this becomes the fallback color for the slot */ ''}
20360
20382
  }
20361
20383
  `;
20362
20384
 
20363
- const styles$M = css `
20385
+ const styles$O = css `
20364
20386
  ${display('inline-grid')}
20365
- ${styles$N}
20387
+ ${styles$P}
20366
20388
 
20367
20389
  :host {
20368
20390
  font: ${bodyFont};
@@ -20556,7 +20578,7 @@ so this becomes the fallback color for the slot */ ''}
20556
20578
  </div>
20557
20579
  `;
20558
20580
 
20559
- const template$D = (_context, definition) => html `
20581
+ const template$F = (_context, definition) => html `
20560
20582
  <template
20561
20583
  role="checkbox"
20562
20584
  aria-checked="${x => x.checked}"
@@ -20572,15 +20594,15 @@ so this becomes the fallback color for the slot */ ''}
20572
20594
  <div part="container" class="container">
20573
20595
  <div part="control" class="control">
20574
20596
  <slot name="checked-indicator">
20575
- ${definition.checkedIndicator || ''}
20597
+ ${definition.checkedIndicator ?? ''}
20576
20598
  </slot>
20577
20599
  <slot name="indeterminate-indicator">
20578
- ${definition.indeterminateIndicator || ''}
20600
+ ${definition.indeterminateIndicator ?? ''}
20579
20601
  </slot>
20580
20602
  </div>
20581
20603
  <label
20582
20604
  part="label"
20583
- class="${x => (x.defaultSlottedNodes?.length
20605
+ class="${x => (x.defaultSlottedNodes?.length > 0
20584
20606
  ? 'label'
20585
20607
  : 'label label__hidden')}"
20586
20608
  >
@@ -20641,16 +20663,16 @@ so this becomes the fallback color for the slot */ ''}
20641
20663
  const nimbleCheckbox = Checkbox.compose({
20642
20664
  baseName: 'checkbox',
20643
20665
  baseClass: Checkbox$1,
20644
- template: template$D,
20645
- styles: styles$M,
20666
+ template: template$F,
20667
+ styles: styles$O,
20646
20668
  checkedIndicator: check16X16.data,
20647
20669
  indeterminateIndicator: minus16X16.data
20648
20670
  });
20649
20671
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
20650
20672
  const checkboxTag = 'nimble-checkbox';
20651
20673
 
20652
- const styles$L = css `
20653
- ${styles$$}
20674
+ const styles$N = css `
20675
+ ${styles$12}
20654
20676
  ${buttonAppearanceVariantStyles}
20655
20677
 
20656
20678
  @layer checked {
@@ -20697,7 +20719,7 @@ so this becomes the fallback color for the slot */ ''}
20697
20719
  }
20698
20720
  `));
20699
20721
 
20700
- const template$C = (context, definition) => html `
20722
+ const template$E = (context, definition) => html `
20701
20723
  <div
20702
20724
  role="button"
20703
20725
  part="control"
@@ -20792,8 +20814,8 @@ so this becomes the fallback color for the slot */ ''}
20792
20814
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
20793
20815
  const nimbleToggleButton = ToggleButton.compose({
20794
20816
  baseName: 'toggle-button',
20795
- template: template$C,
20796
- styles: styles$L,
20817
+ template: template$E,
20818
+ styles: styles$N,
20797
20819
  shadowOptions: {
20798
20820
  delegatesFocus: true
20799
20821
  }
@@ -20823,7 +20845,7 @@ so this becomes the fallback color for the slot */ ''}
20823
20845
  frameless: 'frameless'
20824
20846
  };
20825
20847
 
20826
- const styles$K = css `
20848
+ const styles$M = css `
20827
20849
  ${display('inline-flex')}
20828
20850
 
20829
20851
  :host {
@@ -21113,7 +21135,7 @@ so this becomes the fallback color for the slot */ ''}
21113
21135
  }
21114
21136
  `));
21115
21137
 
21116
- const styles$J = css `
21138
+ const styles$L = css `
21117
21139
  .annotated-label {
21118
21140
  display: flex;
21119
21141
  flex-direction: row;
@@ -21140,10 +21162,10 @@ so this becomes the fallback color for the slot */ ''}
21140
21162
  none: undefined,
21141
21163
  standard: 'standard'};
21142
21164
 
21143
- const styles$I = css `
21144
- ${styles$K}
21145
- ${styles$N}
21146
- ${styles$J}
21165
+ const styles$K = css `
21166
+ ${styles$M}
21167
+ ${styles$P}
21168
+ ${styles$L}
21147
21169
 
21148
21170
  :host {
21149
21171
  --ni-private-hover-bottom-border-width: 2px;
@@ -21264,7 +21286,7 @@ so this becomes the fallback color for the slot */ ''}
21264
21286
  <slot></slot>
21265
21287
  </label>
21266
21288
  `);
21267
- const template$B = (context, definition) => html `
21289
+ const template$D = (context, definition) => html `
21268
21290
  <template
21269
21291
  aria-disabled="${x => x.ariaDisabled}"
21270
21292
  autocomplete="${x => x.autocomplete}"
@@ -21302,7 +21324,7 @@ so this becomes the fallback color for the slot */ ''}
21302
21324
  />
21303
21325
  <div class="indicator" part="indicator" aria-hidden="true">
21304
21326
  <slot name="indicator">
21305
- ${definition.indicator || ''}
21327
+ ${definition.indicator ?? ''}
21306
21328
  </slot>
21307
21329
  </div>
21308
21330
  </slot>
@@ -21435,7 +21457,7 @@ so this becomes the fallback color for the slot */ ''}
21435
21457
  set value(next) {
21436
21458
  const prev = this._value;
21437
21459
  let updatedValue = next;
21438
- if (this.$fastController.isConnected && this.options) {
21460
+ if (this.$fastController.isConnected) {
21439
21461
  const selectedIndex = this.findIndexOfValidOption(next);
21440
21462
  const prevSelectedValue = this.options[this.selectedIndex]?.text;
21441
21463
  const nextSelectedValue = this.options[selectedIndex]?.text;
@@ -21461,7 +21483,7 @@ so this becomes the fallback color for the slot */ ''}
21461
21483
  */
21462
21484
  get options() {
21463
21485
  Observable.track(this, 'options');
21464
- return this.filteredOptions && this.filter
21486
+ return this.filter
21465
21487
  ? this.filteredOptions
21466
21488
  : this._options;
21467
21489
  }
@@ -21575,12 +21597,12 @@ so this becomes the fallback color for the slot */ ''}
21575
21597
  if (!this.isAutocompleteInline) {
21576
21598
  this.selectedIndex = this.findIndexOfValidOption(this.control.value);
21577
21599
  }
21578
- if (!e.inputType.includes('deleteContent') && this.filter.length) {
21600
+ if (!e.inputType.includes('deleteContent') && this.filter.length > 0) {
21579
21601
  if (this.isAutocompleteList && !this.open) {
21580
21602
  this.open = true;
21581
21603
  }
21582
21604
  if (this.isAutocompleteInline) {
21583
- if (this.filteredOptions.length) {
21605
+ if (this.filteredOptions.length > 0) {
21584
21606
  this.selectedOptions = [this.filteredOptions[0]];
21585
21607
  this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
21586
21608
  this.setInlineSelection();
@@ -21719,11 +21741,11 @@ so this becomes the fallback color for the slot */ ''}
21719
21741
  * Overrides `Listbox.setDefaultSelectedOption`
21720
21742
  */
21721
21743
  setDefaultSelectedOption() {
21722
- if (this.$fastController.isConnected && this.options) {
21744
+ if (this.$fastController.isConnected) {
21723
21745
  const selectedIndex = this.options.findIndex(el => !el.disabled
21724
21746
  && (el.getAttribute('selected') !== null || el.selected));
21725
21747
  this.selectedIndex = selectedIndex;
21726
- if (!this.dirtyValue && this.firstSelectedOption) {
21748
+ if (!this.dirtyValue && this.firstSelectedOption !== null) {
21727
21749
  this.value = this.firstSelectedOption.text;
21728
21750
  }
21729
21751
  this.setSelectedOptions();
@@ -21840,7 +21862,7 @@ so this becomes the fallback color for the slot */ ''}
21840
21862
  if (this.open) {
21841
21863
  if (this.contains(document.activeElement)) {
21842
21864
  this.control.focus();
21843
- if (this.firstSelectedOption) {
21865
+ if (this.firstSelectedOption !== null) {
21844
21866
  requestAnimationFrame(() => {
21845
21867
  this.firstSelectedOption?.scrollIntoView({
21846
21868
  block: 'nearest'
@@ -21901,12 +21923,12 @@ so this becomes the fallback color for the slot */ ''}
21901
21923
  this.setPositioning();
21902
21924
  }
21903
21925
  regionChanged(_prev, _next) {
21904
- if (this.region && this.controlWrapper) {
21926
+ if (this.region) {
21905
21927
  this.region.anchorElement = this.controlWrapper;
21906
21928
  }
21907
21929
  }
21908
21930
  controlWrapperChanged(_prev, _next) {
21909
- if (this.region && this.controlWrapper) {
21931
+ if (this.region) {
21910
21932
  this.region.anchorElement = this.controlWrapper;
21911
21933
  }
21912
21934
  }
@@ -21930,7 +21952,7 @@ so this becomes the fallback color for the slot */ ''}
21930
21952
  * Focus and set the content of the control based on the first selected option.
21931
21953
  */
21932
21954
  setInputToSelection() {
21933
- if (this.firstSelectedOption) {
21955
+ if (this.firstSelectedOption !== null) {
21934
21956
  this.control.value = this.firstSelectedOption.text;
21935
21957
  this.control.focus();
21936
21958
  }
@@ -21939,7 +21961,7 @@ so this becomes the fallback color for the slot */ ''}
21939
21961
  * Focus, set and select the content of the control based on the first selected option.
21940
21962
  */
21941
21963
  setInlineSelection() {
21942
- if (this.firstSelectedOption) {
21964
+ if (this.firstSelectedOption !== null) {
21943
21965
  this.setInputToSelection();
21944
21966
  this.control.setSelectionRange(this.filter.length, this.control.value.length, 'backward');
21945
21967
  }
@@ -22039,8 +22061,8 @@ so this becomes the fallback color for the slot */ ''}
22039
22061
  const nimbleCombobox = Combobox.compose({
22040
22062
  baseName: 'combobox',
22041
22063
  baseClass: FormAssociatedCombobox,
22042
- template: template$B,
22043
- styles: styles$I,
22064
+ template: template$D,
22065
+ styles: styles$K,
22044
22066
  shadowOptions: {
22045
22067
  delegatesFocus: true
22046
22068
  },
@@ -22084,7 +22106,7 @@ so this becomes the fallback color for the slot */ ''}
22084
22106
  */
22085
22107
  const UserDismissed = Symbol('user dismissed');
22086
22108
 
22087
- const styles$H = css `
22109
+ const styles$J = css `
22088
22110
  ${display('grid')}
22089
22111
 
22090
22112
  dialog {
@@ -22177,7 +22199,7 @@ so this becomes the fallback color for the slot */ ''}
22177
22199
  }
22178
22200
  `;
22179
22201
 
22180
- const template$A = html `
22202
+ const template$C = html `
22181
22203
  <template>
22182
22204
  <dialog
22183
22205
  ${ref('dialogElement')}
@@ -22267,7 +22289,7 @@ so this becomes the fallback color for the slot */ ''}
22267
22289
  this.doResolveShow(reason);
22268
22290
  }
22269
22291
  slottedFooterElementsChanged(_prev, next) {
22270
- this.footerIsEmpty = !next?.length;
22292
+ this.footerIsEmpty = next === undefined || next.length === 0;
22271
22293
  }
22272
22294
  /**
22273
22295
  * @internal
@@ -22325,13 +22347,13 @@ so this becomes the fallback color for the slot */ ''}
22325
22347
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
22326
22348
  const nimbleDialog = Dialog.compose({
22327
22349
  baseName: 'dialog',
22328
- template: template$A,
22329
- styles: styles$H,
22350
+ template: template$C,
22351
+ styles: styles$J,
22330
22352
  baseClass: Dialog
22331
22353
  });
22332
22354
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
22333
22355
 
22334
- const styles$G = css `
22356
+ const styles$I = css `
22335
22357
  ${display('block')}
22336
22358
 
22337
22359
  :host {
@@ -22474,7 +22496,7 @@ so this becomes the fallback color for the slot */ ''}
22474
22496
  }
22475
22497
  `;
22476
22498
 
22477
- const template$z = html `
22499
+ const template$B = html `
22478
22500
  <dialog
22479
22501
  ${ref('dialog')}
22480
22502
  aria-label="${x => x.ariaLabel}"
@@ -22616,8 +22638,8 @@ so this becomes the fallback color for the slot */ ''}
22616
22638
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
22617
22639
  const nimbleDrawer = Drawer.compose({
22618
22640
  baseName: 'drawer',
22619
- template: template$z,
22620
- styles: styles$G
22641
+ template: template$B,
22642
+ styles: styles$I
22621
22643
  });
22622
22644
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
22623
22645
 
@@ -25398,7 +25420,7 @@ so this becomes the fallback color for the slot */ ''}
25398
25420
  }
25399
25421
  }
25400
25422
 
25401
- const styles$F = css `
25423
+ const styles$H = css `
25402
25424
  ${display('none')}
25403
25425
  `;
25404
25426
 
@@ -25463,7 +25485,7 @@ so this becomes the fallback color for the slot */ ''}
25463
25485
  ], LabelProviderCore.prototype, "itemRemove", void 0);
25464
25486
  const nimbleLabelProviderCore = LabelProviderCore.compose({
25465
25487
  baseName: 'label-provider-core',
25466
- styles: styles$F
25488
+ styles: styles$H
25467
25489
  });
25468
25490
  DesignSystem.getOrCreate()
25469
25491
  .withPrefix('nimble')
@@ -25630,13 +25652,13 @@ so this becomes the fallback color for the slot */ ''}
25630
25652
  ], LabelProviderTable.prototype, "groupRowPlaceholderEmpty", void 0);
25631
25653
  const nimbleLabelProviderTable = LabelProviderTable.compose({
25632
25654
  baseName: 'label-provider-table',
25633
- styles: styles$F
25655
+ styles: styles$H
25634
25656
  });
25635
25657
  DesignSystem.getOrCreate()
25636
25658
  .withPrefix('nimble')
25637
25659
  .register(nimbleLabelProviderTable());
25638
25660
 
25639
- const styles$E = css `
25661
+ const styles$G = css `
25640
25662
  ${display('flex')}
25641
25663
 
25642
25664
  :host {
@@ -25712,7 +25734,7 @@ so this becomes the fallback color for the slot */ ''}
25712
25734
  * The template for the {@link @ni/fast-foundation#(ListboxOption:class)} component.
25713
25735
  * @public
25714
25736
  */
25715
- const template$y = (context, definition) => html `
25737
+ const template$A = (context, definition) => html `
25716
25738
  <template
25717
25739
  aria-checked="${x => x.ariaChecked}"
25718
25740
  aria-disabled="${x => x.ariaDisabled}"
@@ -25825,13 +25847,13 @@ so this becomes the fallback color for the slot */ ''}
25825
25847
  const nimbleListOption = ListOption.compose({
25826
25848
  baseName: 'list-option',
25827
25849
  baseClass: ListboxOption,
25828
- template: template$y,
25829
- styles: styles$E
25850
+ template: template$A,
25851
+ styles: styles$G
25830
25852
  });
25831
25853
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
25832
25854
  const listOptionTag = 'nimble-list-option';
25833
25855
 
25834
- const styles$D = css `
25856
+ const styles$F = css `
25835
25857
  ${display('flex')}
25836
25858
 
25837
25859
  :host {
@@ -25893,7 +25915,7 @@ so this becomes the fallback color for the slot */ ''}
25893
25915
  const isListOption$1 = (n) => {
25894
25916
  return n instanceof ListOption;
25895
25917
  };
25896
- const template$x = html `
25918
+ const template$z = html `
25897
25919
  <template
25898
25920
  role="group"
25899
25921
  aria-label="${x => x.labelContent}"
@@ -26035,8 +26057,8 @@ so this becomes the fallback color for the slot */ ''}
26035
26057
  const nimbleListOptionGroup = ListOptionGroup.compose({
26036
26058
  baseName: 'list-option-group',
26037
26059
  baseClass: FoundationElement,
26038
- template: template$x,
26039
- styles: styles$D
26060
+ template: template$z,
26061
+ styles: styles$F
26040
26062
  });
26041
26063
  DesignSystem.getOrCreate()
26042
26064
  .withPrefix('nimble')
@@ -26063,9 +26085,9 @@ so this becomes the fallback color for the slot */ ''}
26063
26085
  attr()
26064
26086
  ], Mapping$1.prototype, "key", void 0);
26065
26087
 
26066
- const template$w = html `<template slot="mapping"></template>`;
26088
+ const template$y = html `<template slot="mapping"></template>`;
26067
26089
 
26068
- const styles$C = css `
26090
+ const styles$E = css `
26069
26091
  ${display('none')}
26070
26092
  `;
26071
26093
 
@@ -26081,8 +26103,8 @@ so this becomes the fallback color for the slot */ ''}
26081
26103
  ], MappingEmpty.prototype, "text", void 0);
26082
26104
  const emptyMapping = MappingEmpty.compose({
26083
26105
  baseName: 'mapping-empty',
26084
- template: template$w,
26085
- styles: styles$C
26106
+ template: template$y,
26107
+ styles: styles$E
26086
26108
  });
26087
26109
  DesignSystem.getOrCreate().withPrefix('nimble').register(emptyMapping());
26088
26110
 
@@ -26152,8 +26174,8 @@ so this becomes the fallback color for the slot */ ''}
26152
26174
  ], MappingIcon.prototype, "resolvedIcon", void 0);
26153
26175
  const iconMapping = MappingIcon.compose({
26154
26176
  baseName: 'mapping-icon',
26155
- template: template$w,
26156
- styles: styles$C
26177
+ template: template$y,
26178
+ styles: styles$E
26157
26179
  });
26158
26180
  DesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());
26159
26181
 
@@ -26176,8 +26198,8 @@ so this becomes the fallback color for the slot */ ''}
26176
26198
  ], MappingSpinner.prototype, "textHidden", void 0);
26177
26199
  const spinnerMapping = MappingSpinner.compose({
26178
26200
  baseName: 'mapping-spinner',
26179
- template: template$w,
26180
- styles: styles$C
26201
+ template: template$y,
26202
+ styles: styles$E
26181
26203
  });
26182
26204
  DesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());
26183
26205
 
@@ -26193,8 +26215,8 @@ so this becomes the fallback color for the slot */ ''}
26193
26215
  ], MappingText.prototype, "text", void 0);
26194
26216
  const textMapping = MappingText.compose({
26195
26217
  baseName: 'mapping-text',
26196
- template: template$w,
26197
- styles: styles$C
26218
+ template: template$y,
26219
+ styles: styles$E
26198
26220
  });
26199
26221
  DesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());
26200
26222
 
@@ -26261,7 +26283,7 @@ so this becomes the fallback color for the slot */ ''}
26261
26283
  // closing an expanded item without opening another
26262
26284
  if (this.expandedItem !== null
26263
26285
  && changedItem === this.expandedItem
26264
- && changedItem.expanded === false) {
26286
+ && !changedItem.expanded) {
26265
26287
  this.expandedItem = null;
26266
26288
  return;
26267
26289
  }
@@ -26290,7 +26312,7 @@ so this becomes the fallback color for the slot */ ''}
26290
26312
  this.menuItems = newItems;
26291
26313
  const menuItems = this.menuItems.filter(this.isMenuItemElement);
26292
26314
  // if our focus index is not -1 we have items
26293
- if (menuItems.length) {
26315
+ if (menuItems.length > 0) {
26294
26316
  this.focusIndex = 0;
26295
26317
  }
26296
26318
  function elementIndent(el) {
@@ -26333,7 +26355,7 @@ so this becomes the fallback color for the slot */ ''}
26333
26355
  return;
26334
26356
  }
26335
26357
  if (changedMenuItem.role === 'menuitemradio'
26336
- && changedMenuItem.checked === true) {
26358
+ && changedMenuItem.checked) {
26337
26359
  for (let i = changeItemIndex - 1; i >= 0; --i) {
26338
26360
  const item = this.menuItems[i];
26339
26361
  const role = item.getAttribute('role');
@@ -26496,7 +26518,7 @@ so this becomes the fallback color for the slot */ ''}
26496
26518
  observable
26497
26519
  ], Menu$1.prototype, "itemIcons", void 0);
26498
26520
 
26499
- const template$v = () => html `
26521
+ const template$x = () => html `
26500
26522
  <template
26501
26523
  slot="${x => {
26502
26524
  if (x.slot) {
@@ -26513,7 +26535,7 @@ so this becomes the fallback color for the slot */ ''}
26513
26535
  </template>
26514
26536
  `;
26515
26537
 
26516
- const styles$B = css `
26538
+ const styles$D = css `
26517
26539
  ${display('grid')}
26518
26540
 
26519
26541
  :host {
@@ -26584,8 +26606,8 @@ so this becomes the fallback color for the slot */ ''}
26584
26606
  const nimbleMenu = Menu.compose({
26585
26607
  baseName: 'menu',
26586
26608
  baseClass: Menu$1,
26587
- template: template$v,
26588
- styles: styles$B
26609
+ template: template$x,
26610
+ styles: styles$D
26589
26611
  });
26590
26612
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
26591
26613
 
@@ -26600,7 +26622,7 @@ so this becomes the fallback color for the slot */ ''}
26600
26622
  auto: 'auto'
26601
26623
  };
26602
26624
 
26603
- const styles$A = css `
26625
+ const styles$C = css `
26604
26626
  ${display('inline-block')}
26605
26627
 
26606
26628
  :host {
@@ -26618,7 +26640,7 @@ so this becomes the fallback color for the slot */ ''}
26618
26640
  }
26619
26641
  `;
26620
26642
 
26621
- const template$u = html `
26643
+ const template$w = html `
26622
26644
  <template
26623
26645
  ?open="${x => x.open}"
26624
26646
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -26799,7 +26821,7 @@ so this becomes the fallback color for the slot */ ''}
26799
26821
  // Get the menu that is slotted within the menu-button, taking into account
26800
26822
  // that it may be nested within multiple 'slot' elements, such as when used
26801
26823
  // within a table.
26802
- if (!this.slottedMenus?.length) {
26824
+ if (!this.slottedMenus || this.slottedMenus.length === 0) {
26803
26825
  return undefined;
26804
26826
  }
26805
26827
  let currentItem = this.slottedMenus[0];
@@ -26830,7 +26852,7 @@ so this becomes the fallback color for the slot */ ''}
26830
26852
  }
26831
26853
  focusLastMenuItem() {
26832
26854
  const menuItems = this.getMenu()?.querySelectorAll('[role=menuitem]');
26833
- if (menuItems?.length) {
26855
+ if (menuItems && menuItems.length > 0) {
26834
26856
  const lastMenuItem = menuItems[menuItems.length - 1];
26835
26857
  lastMenuItem.focus();
26836
26858
  }
@@ -26868,8 +26890,8 @@ so this becomes the fallback color for the slot */ ''}
26868
26890
  ], MenuButton.prototype, "slottedMenus", void 0);
26869
26891
  const nimbleMenuButton = MenuButton.compose({
26870
26892
  baseName: 'menu-button',
26871
- template: template$u,
26872
- styles: styles$A,
26893
+ template: template$w,
26894
+ styles: styles$C,
26873
26895
  shadowOptions: {
26874
26896
  delegatesFocus: true
26875
26897
  }
@@ -26877,7 +26899,7 @@ so this becomes the fallback color for the slot */ ''}
26877
26899
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
26878
26900
  const menuButtonTag = 'nimble-menu-button';
26879
26901
 
26880
- const styles$z = css `
26902
+ const styles$B = css `
26881
26903
  ${display('grid')}
26882
26904
 
26883
26905
  :host {
@@ -26974,7 +26996,7 @@ so this becomes the fallback color for the slot */ ''}
26974
26996
  baseName: 'menu-item',
26975
26997
  baseClass: MenuItem$1,
26976
26998
  template: menuItemTemplate,
26977
- styles: styles$z,
26999
+ styles: styles$B,
26978
27000
  expandCollapseGlyph: arrowExpanderRight16X16.data
26979
27001
  });
26980
27002
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
@@ -26989,10 +27011,10 @@ so this becomes the fallback color for the slot */ ''}
26989
27011
  frameless: 'frameless'
26990
27012
  };
26991
27013
 
26992
- const styles$y = css `
27014
+ const styles$A = css `
26993
27015
  ${display('inline-block')}
26994
- ${styles$N}
26995
- ${styles$J}
27016
+ ${styles$P}
27017
+ ${styles$L}
26996
27018
 
26997
27019
  :host {
26998
27020
  font: ${bodyFont};
@@ -27207,7 +27229,7 @@ so this becomes the fallback color for the slot */ ''}
27207
27229
  const labelTemplate$4 = createRequiredVisibleLabelTemplate(html `<label
27208
27230
  part="label"
27209
27231
  for="control"
27210
- class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
27232
+ class="${x => (x.defaultSlottedNodes?.length > 0 ? 'label' : 'label label__hidden')}"
27211
27233
  >
27212
27234
  <slot ${slotted('defaultSlottedNodes')}></slot>
27213
27235
  </label>`);
@@ -27215,7 +27237,7 @@ so this becomes the fallback color for the slot */ ''}
27215
27237
  * The template for the {@link @ni/fast-foundation#(NumberField:class)} component.
27216
27238
  * @public
27217
27239
  */
27218
- const template$t = (context, definition) => html `
27240
+ const template$v = (context, definition) => html `
27219
27241
  <template class="${x => (x.readOnly ? 'readonly' : '')}">
27220
27242
  ${labelTemplate$4}
27221
27243
  <div class="root" part="root">
@@ -27272,7 +27294,7 @@ so this becomes the fallback color for the slot */ ''}
27272
27294
  @click="${x => x.stepUp()}"
27273
27295
  >
27274
27296
  <slot name="step-up-glyph">
27275
- ${definition.stepUpGlyph || ''}
27297
+ ${definition.stepUpGlyph ?? ''}
27276
27298
  </slot>
27277
27299
  </div>
27278
27300
  <div
@@ -27281,7 +27303,7 @@ so this becomes the fallback color for the slot */ ''}
27281
27303
  @click="${x => x.stepDown()}"
27282
27304
  >
27283
27305
  <slot name="step-down-glyph">
27284
- ${definition.stepDownGlyph || ''}
27306
+ ${definition.stepDownGlyph ?? ''}
27285
27307
  </slot>
27286
27308
  </div>
27287
27309
  </div>
@@ -27369,8 +27391,8 @@ so this becomes the fallback color for the slot */ ''}
27369
27391
  const nimbleNumberField = NumberField.compose({
27370
27392
  baseName: 'number-field',
27371
27393
  baseClass: NumberField$1,
27372
- template: template$t,
27373
- styles: styles$y,
27394
+ template: template$v,
27395
+ styles: styles$A,
27374
27396
  shadowOptions: {
27375
27397
  delegatesFocus: true
27376
27398
  },
@@ -27413,7 +27435,7 @@ so this becomes the fallback color for the slot */ ''}
27413
27435
  });
27414
27436
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
27415
27437
 
27416
- const styles$x = css `
27438
+ const styles$z = css `
27417
27439
  ${display('inline-flex')}
27418
27440
 
27419
27441
  :host {
@@ -27513,15 +27535,15 @@ so this becomes the fallback color for the slot */ ''}
27513
27535
  baseName: 'radio',
27514
27536
  baseClass: Radio$1,
27515
27537
  template: radioTemplate,
27516
- styles: styles$x,
27538
+ styles: styles$z,
27517
27539
  checkedIndicator: circleFilled16X16.data
27518
27540
  });
27519
27541
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
27520
27542
 
27521
- const styles$w = css `
27543
+ const styles$y = css `
27522
27544
  ${display('inline-block')}
27523
- ${styles$N}
27524
- ${styles$J}
27545
+ ${styles$P}
27546
+ ${styles$L}
27525
27547
 
27526
27548
  .positioning-region {
27527
27549
  display: flex;
@@ -27560,7 +27582,7 @@ so this becomes the fallback color for the slot */ ''}
27560
27582
  `;
27561
27583
 
27562
27584
  const labelTemplate$3 = createRequiredVisibleLabelTemplate(html `<slot name="label"></slot>`);
27563
- const template$s = html `
27585
+ const template$u = html `
27564
27586
  <template
27565
27587
  role="radiogroup"
27566
27588
  aria-disabled="${x => x.disabled}"
@@ -27600,8 +27622,8 @@ so this becomes the fallback color for the slot */ ''}
27600
27622
  const nimbleRadioGroup = RadioGroup.compose({
27601
27623
  baseName: 'radio-group',
27602
27624
  baseClass: RadioGroup$1,
27603
- template: template$s,
27604
- styles: styles$w,
27625
+ template: template$u,
27626
+ styles: styles$y,
27605
27627
  shadowOptions: {
27606
27628
  delegatesFocus: true
27607
27629
  }
@@ -31537,7 +31559,7 @@ so this becomes the fallback color for the slot */ ''}
31537
31559
  JSON-serialization identifier using
31538
31560
  [`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).
31539
31561
  */
31540
- class Step {
31562
+ let Step$1 = class Step {
31541
31563
  /**
31542
31564
  Get the step map that represents the changes made by this step,
31543
31565
  and which can be used to transform between positions in the old
@@ -31575,7 +31597,7 @@ so this becomes the fallback color for the slot */ ''}
31575
31597
  stepClass.prototype.jsonID = id;
31576
31598
  return stepClass;
31577
31599
  }
31578
- }
31600
+ };
31579
31601
  /**
31580
31602
  The result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a
31581
31603
  new document or a failure value.
@@ -31636,7 +31658,7 @@ so this becomes the fallback color for the slot */ ''}
31636
31658
  /**
31637
31659
  Add a mark to all inline content between two positions.
31638
31660
  */
31639
- class AddMarkStep extends Step {
31661
+ class AddMarkStep extends Step$1 {
31640
31662
  /**
31641
31663
  Create a mark step.
31642
31664
  */
@@ -31697,11 +31719,11 @@ so this becomes the fallback color for the slot */ ''}
31697
31719
  return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));
31698
31720
  }
31699
31721
  }
31700
- Step.jsonID("addMark", AddMarkStep);
31722
+ Step$1.jsonID("addMark", AddMarkStep);
31701
31723
  /**
31702
31724
  Remove a mark from all inline content between two positions.
31703
31725
  */
31704
- class RemoveMarkStep extends Step {
31726
+ class RemoveMarkStep extends Step$1 {
31705
31727
  /**
31706
31728
  Create a mark-removing step.
31707
31729
  */
@@ -31759,11 +31781,11 @@ so this becomes the fallback color for the slot */ ''}
31759
31781
  return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));
31760
31782
  }
31761
31783
  }
31762
- Step.jsonID("removeMark", RemoveMarkStep);
31784
+ Step$1.jsonID("removeMark", RemoveMarkStep);
31763
31785
  /**
31764
31786
  Add a mark to a specific node.
31765
31787
  */
31766
- class AddNodeMarkStep extends Step {
31788
+ class AddNodeMarkStep extends Step$1 {
31767
31789
  /**
31768
31790
  Create a node mark step.
31769
31791
  */
@@ -31816,11 +31838,11 @@ so this becomes the fallback color for the slot */ ''}
31816
31838
  return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
31817
31839
  }
31818
31840
  }
31819
- Step.jsonID("addNodeMark", AddNodeMarkStep);
31841
+ Step$1.jsonID("addNodeMark", AddNodeMarkStep);
31820
31842
  /**
31821
31843
  Remove a mark from a specific node.
31822
31844
  */
31823
- class RemoveNodeMarkStep extends Step {
31845
+ class RemoveNodeMarkStep extends Step$1 {
31824
31846
  /**
31825
31847
  Create a mark-removing step.
31826
31848
  */
@@ -31866,12 +31888,12 @@ so this becomes the fallback color for the slot */ ''}
31866
31888
  return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
31867
31889
  }
31868
31890
  }
31869
- Step.jsonID("removeNodeMark", RemoveNodeMarkStep);
31891
+ Step$1.jsonID("removeNodeMark", RemoveNodeMarkStep);
31870
31892
 
31871
31893
  /**
31872
31894
  Replace a part of the document with a slice of new content.
31873
31895
  */
31874
- class ReplaceStep extends Step {
31896
+ class ReplaceStep extends Step$1 {
31875
31897
  /**
31876
31898
  The given `slice` should fit the 'gap' between `from` and
31877
31899
  `to`—the depths must line up, and the surrounding nodes must be
@@ -31955,13 +31977,13 @@ so this becomes the fallback color for the slot */ ''}
31955
31977
  return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);
31956
31978
  }
31957
31979
  }
31958
- Step.jsonID("replace", ReplaceStep);
31980
+ Step$1.jsonID("replace", ReplaceStep);
31959
31981
  /**
31960
31982
  Replace a part of the document with a slice of content, but
31961
31983
  preserve a range of the replaced content by moving it into the
31962
31984
  slice.
31963
31985
  */
31964
- class ReplaceAroundStep extends Step {
31986
+ class ReplaceAroundStep extends Step$1 {
31965
31987
  /**
31966
31988
  Create a replace-around step with the given range and gap.
31967
31989
  `insert` should be the point in the slice into which the content
@@ -32054,7 +32076,7 @@ so this becomes the fallback color for the slot */ ''}
32054
32076
  return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);
32055
32077
  }
32056
32078
  }
32057
- Step.jsonID("replaceAround", ReplaceAroundStep);
32079
+ Step$1.jsonID("replaceAround", ReplaceAroundStep);
32058
32080
  function contentBetween(doc, from, to) {
32059
32081
  let $from = doc.resolve(from), dist = to - from, depth = $from.depth;
32060
32082
  while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {
@@ -32978,7 +33000,7 @@ so this becomes the fallback color for the slot */ ''}
32978
33000
  /**
32979
33001
  Update an attribute in a specific node.
32980
33002
  */
32981
- class AttrStep extends Step {
33003
+ class AttrStep extends Step$1 {
32982
33004
  /**
32983
33005
  Construct an attribute step.
32984
33006
  */
@@ -33028,11 +33050,11 @@ so this becomes the fallback color for the slot */ ''}
33028
33050
  return new AttrStep(json.pos, json.attr, json.value);
33029
33051
  }
33030
33052
  }
33031
- Step.jsonID("attr", AttrStep);
33053
+ Step$1.jsonID("attr", AttrStep);
33032
33054
  /**
33033
33055
  Update an attribute in the doc node.
33034
33056
  */
33035
- class DocAttrStep extends Step {
33057
+ class DocAttrStep extends Step$1 {
33036
33058
  /**
33037
33059
  Construct an attribute step.
33038
33060
  */
@@ -33073,7 +33095,7 @@ so this becomes the fallback color for the slot */ ''}
33073
33095
  return new DocAttrStep(json.attr, json.value);
33074
33096
  }
33075
33097
  }
33076
- Step.jsonID("docAttr", DocAttrStep);
33098
+ Step$1.jsonID("docAttr", DocAttrStep);
33077
33099
 
33078
33100
  /**
33079
33101
  @internal
@@ -46745,7 +46767,7 @@ ${renderedContent}
46745
46767
  // src/index.ts
46746
46768
  var index_default$7 = HardBreak;
46747
46769
 
46748
- const styles$v = css `
46770
+ const styles$x = css `
46749
46771
  ${display('inline')}
46750
46772
 
46751
46773
  .positioning-region {
@@ -46782,7 +46804,7 @@ ${renderedContent}
46782
46804
  baseName: 'toolbar',
46783
46805
  baseClass: Toolbar$1,
46784
46806
  template: toolbarTemplate,
46785
- styles: styles$v
46807
+ styles: styles$x
46786
46808
  });
46787
46809
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToolbar());
46788
46810
  const toolbarTag = 'nimble-toolbar';
@@ -46811,8 +46833,8 @@ ${renderedContent}
46811
46833
  cssCustomPropertyName: null
46812
46834
  }).withDefault(richTextLabelDefaults.richTextToggleNumberedListLabel);
46813
46835
 
46814
- const styles$u = css `
46815
- ${styles$K}
46836
+ const styles$w = css `
46837
+ ${styles$M}
46816
46838
 
46817
46839
  :host {
46818
46840
  height: auto;
@@ -46830,7 +46852,7 @@ ${renderedContent}
46830
46852
  }
46831
46853
  `;
46832
46854
 
46833
- const template$r = html `
46855
+ const template$t = html `
46834
46856
  <template>
46835
46857
  <${anchoredRegionTag}
46836
46858
  ${ref('region')}
@@ -46931,7 +46953,7 @@ ${renderedContent}
46931
46953
  */
46932
46954
  get options() {
46933
46955
  Observable.track(this, 'options');
46934
- return this.filteredOptions?.length ? this.filteredOptions : [];
46956
+ return this.filteredOptions?.length > 0 ? this.filteredOptions : [];
46935
46957
  }
46936
46958
  set options(value) {
46937
46959
  this._options = value;
@@ -47001,7 +47023,7 @@ ${renderedContent}
47001
47023
  this._options.forEach(o => {
47002
47024
  o.hidden = !this.filteredOptions.includes(o);
47003
47025
  });
47004
- if (this.filteredOptions.length) {
47026
+ if (this.filteredOptions.length > 0) {
47005
47027
  this.selectedOptions = [this.filteredOptions[0]];
47006
47028
  this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
47007
47029
  }
@@ -47091,7 +47113,7 @@ ${renderedContent}
47091
47113
  * Overrides: `Listbox.focusAndScrollOptionIntoView`
47092
47114
  */
47093
47115
  focusAndScrollOptionIntoView() {
47094
- if (this.open && this.firstSelectedOption) {
47116
+ if (this.open && this.firstSelectedOption !== null) {
47095
47117
  requestAnimationFrame(() => {
47096
47118
  this.firstSelectedOption?.scrollIntoView({ block: 'nearest' });
47097
47119
  });
@@ -47118,15 +47140,15 @@ ${renderedContent}
47118
47140
  ], RichTextMentionListbox.prototype, "anchorElement", void 0);
47119
47141
  const nimbleRichTextMentionListbox = RichTextMentionListbox.compose({
47120
47142
  baseName: 'rich-text-mention-listbox',
47121
- template: template$r,
47122
- styles: styles$u
47143
+ template: template$t,
47144
+ styles: styles$w
47123
47145
  });
47124
47146
  DesignSystem.getOrCreate()
47125
47147
  .withPrefix('nimble')
47126
47148
  .register(nimbleRichTextMentionListbox());
47127
47149
  const richTextMentionListboxTag = 'nimble-rich-text-mention-listbox';
47128
47150
 
47129
- const template$q = html `
47151
+ const template$s = html `
47130
47152
  <template
47131
47153
  ${children$1({ property: 'childItems', filter: elements() })}
47132
47154
  @focusout="${x => x.focusoutHandler()}"
@@ -47228,9 +47250,9 @@ ${renderedContent}
47228
47250
  </template>
47229
47251
  `;
47230
47252
 
47231
- const styles$t = css `
47253
+ const styles$v = css `
47232
47254
  ${display('inline-flex')}
47233
- ${styles$N}
47255
+ ${styles$P}
47234
47256
 
47235
47257
  :host {
47236
47258
  font: ${bodyFont};
@@ -56889,7 +56911,7 @@ ${renderedContent}
56889
56911
  * https://github.com/ProseMirror/prosemirror-markdown/blob/b7c1fd2fb74c7564bfe5428c7c8141ded7ebdd9f/src/to_markdown.ts#L94C2-L101C7
56890
56912
  */
56891
56913
  const orderedListNode = function orderedList(state, node) {
56892
- const start = node.attrs.start || 1;
56914
+ const start = node.attrs.start ?? 1;
56893
56915
  const maxW = String(start + node.childCount - 1).length;
56894
56916
  const space = state.repeat(' ', maxW + 2);
56895
56917
  state.renderList(node, space, i => {
@@ -57260,7 +57282,7 @@ ${renderedContent}
57260
57282
  };
57261
57283
  }
57262
57284
  isValid() {
57263
- return Object.values(this.getValidity()).every(x => x === false);
57285
+ return Object.values(this.getValidity()).every(x => !x);
57264
57286
  }
57265
57287
  validate(mentions) {
57266
57288
  this.validateDuplicateMentionConfigurations(mentions);
@@ -63003,7 +63025,7 @@ ${nextLine.slice(indentLevel + 2)}`;
63003
63025
  const updatedNodes = [];
63004
63026
  fragment.forEach(node => {
63005
63027
  if (node.isText && node.marks.length > 0) {
63006
- const linkMark = node.marks.find(mark => mark.type.name === 'link' && mark.attrs);
63028
+ const linkMark = node.marks.find(mark => mark.type.name === 'link');
63007
63029
  if (linkMark) {
63008
63030
  // Checks if the link is valid link or not
63009
63031
  // Needing to separately validate the link on paste is a workaround for a tiptap issue
@@ -63128,7 +63150,7 @@ ${nextLine.slice(indentLevel + 2)}`;
63128
63150
  if (node.type.name.startsWith(mentionPluginPrefix)) {
63129
63151
  hasMention = true;
63130
63152
  }
63131
- const continueDescent = hasMention === false;
63153
+ const continueDescent = !hasMention;
63132
63154
  return continueDescent;
63133
63155
  });
63134
63156
  return !hasMention;
@@ -63604,8 +63626,8 @@ ${nextLine.slice(indentLevel + 2)}`;
63604
63626
  applyMixins(RichTextEditor, ARIAGlobalStatesAndProperties);
63605
63627
  const nimbleRichTextEditor = RichTextEditor.compose({
63606
63628
  baseName: 'rich-text-editor',
63607
- template: template$q,
63608
- styles: styles$t,
63629
+ template: template$s,
63630
+ styles: styles$v,
63609
63631
  shadowOptions: {
63610
63632
  delegatesFocus: true
63611
63633
  }
@@ -63614,13 +63636,13 @@ ${nextLine.slice(indentLevel + 2)}`;
63614
63636
  .withPrefix('nimble')
63615
63637
  .register(nimbleRichTextEditor());
63616
63638
 
63617
- const template$p = html `
63639
+ const template$r = html `
63618
63640
  <template ${children$1({ property: 'childItems', filter: elements() })}>
63619
63641
  <div ${ref('viewer')} class="viewer"></div>
63620
63642
  </template>
63621
63643
  `;
63622
63644
 
63623
- const styles$s = css `
63645
+ const styles$u = css `
63624
63646
  ${display('flex')}
63625
63647
 
63626
63648
  :host {
@@ -63733,17 +63755,17 @@ ${nextLine.slice(indentLevel + 2)}`;
63733
63755
  ], RichTextViewer.prototype, "markdown", void 0);
63734
63756
  const nimbleRichTextViewer = RichTextViewer.compose({
63735
63757
  baseName: 'rich-text-viewer',
63736
- template: template$p,
63737
- styles: styles$s
63758
+ template: template$r,
63759
+ styles: styles$u
63738
63760
  });
63739
63761
  DesignSystem.getOrCreate()
63740
63762
  .withPrefix('nimble')
63741
63763
  .register(nimbleRichTextViewer());
63742
63764
 
63743
- const styles$r = css `
63744
- ${styles$K}
63745
- ${styles$N}
63746
- ${styles$J}
63765
+ const styles$t = css `
63766
+ ${styles$M}
63767
+ ${styles$P}
63768
+ ${styles$L}
63747
63769
 
63748
63770
  ${
63749
63771
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -63906,7 +63928,7 @@ ${nextLine.slice(indentLevel + 2)}`;
63906
63928
  }
63907
63929
  `));
63908
63930
 
63909
- const styles$q = css `
63931
+ const styles$s = css `
63910
63932
  ${display('inline-grid')}
63911
63933
 
63912
63934
  :host {
@@ -64076,7 +64098,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64076
64098
  }
64077
64099
  `));
64078
64100
 
64079
- const template$o = html `
64101
+ const template$q = html `
64080
64102
  <template role="progressbar">
64081
64103
  ${''
64082
64104
  /**
@@ -64123,8 +64145,8 @@ ${nextLine.slice(indentLevel + 2)}`;
64123
64145
  ], Spinner.prototype, "appearance", void 0);
64124
64146
  const nimbleSpinner = Spinner.compose({
64125
64147
  baseName: 'spinner',
64126
- template: template$o,
64127
- styles: styles$q
64148
+ template: template$q,
64149
+ styles: styles$s
64128
64150
  });
64129
64151
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
64130
64152
  const spinnerTag = 'nimble-spinner';
@@ -64140,7 +64162,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64140
64162
  <slot ${ref('labelSlot')}></slot>
64141
64163
  </label>
64142
64164
  `);
64143
- const template$n = (context, definition) => html `
64165
+ const template$p = (context, definition) => html `
64144
64166
  <template
64145
64167
  class="${x => [
64146
64168
  x.collapsible && 'collapsible',
@@ -64192,7 +64214,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64192
64214
  `)}
64193
64215
  <div aria-hidden="true" class="indicator" part="indicator">
64194
64216
  <slot name="indicator">
64195
- ${definition.indicator || ''}
64217
+ ${definition.indicator ?? ''}
64196
64218
  </slot>
64197
64219
  </div>
64198
64220
  </slot>
@@ -64384,7 +64406,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64384
64406
  set value(next) {
64385
64407
  const prev = this._value;
64386
64408
  let newValue = next;
64387
- if (this.options?.length) {
64409
+ if (this.options !== undefined && this.options.length > 0) {
64388
64410
  const newValueIndex = this.options.findIndex(el => el.value === newValue);
64389
64411
  const prevSelectedValue = this.options[this.selectedIndex]?.value ?? null;
64390
64412
  const nextSelectedValue = this.options[newValueIndex]?.value ?? null;
@@ -64413,7 +64435,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64413
64435
  * @internal
64414
64436
  */
64415
64437
  anchoredRegionChanged(_prev, _next) {
64416
- if (this.anchoredRegion && this.control) {
64438
+ if (this.anchoredRegion !== undefined && this.control !== undefined) {
64417
64439
  this.anchoredRegion.anchorElement = this.control;
64418
64440
  }
64419
64441
  }
@@ -64421,7 +64443,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64421
64443
  * @internal
64422
64444
  */
64423
64445
  controlChanged(_prev, _next) {
64424
- if (this.anchoredRegion && this.control) {
64446
+ if (this.anchoredRegion !== undefined && this.control !== undefined) {
64425
64447
  this.anchoredRegion.anchorElement = this.control;
64426
64448
  }
64427
64449
  }
@@ -64578,9 +64600,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64578
64600
  */
64579
64601
  multipleChanged(prev, next) {
64580
64602
  super.multipleChanged(prev, next);
64581
- if (this.proxy) {
64582
- this.proxy.multiple = next;
64583
- }
64603
+ this.proxy.multiple = next;
64584
64604
  }
64585
64605
  /**
64586
64606
  * @internal
@@ -64637,7 +64657,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64637
64657
  if (this.filterMode !== FilterMode.none) {
64638
64658
  this.emitFilterInputEvent();
64639
64659
  }
64640
- if (e.inputType.includes('deleteContent') || !this.filter.length) {
64660
+ if (e.inputType.includes('deleteContent') || this.filter.length === 0) {
64641
64661
  return true;
64642
64662
  }
64643
64663
  e.stopPropagation();
@@ -64806,7 +64826,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64806
64826
  typeaheadBufferChanged(_, __) {
64807
64827
  if (this.$fastController.isConnected) {
64808
64828
  const typeaheadMatches = this.getTypeaheadMatches();
64809
- if (typeaheadMatches.length) {
64829
+ if (typeaheadMatches.length > 0) {
64810
64830
  const activeOptionIndex = this.options.indexOf(typeaheadMatches[0]);
64811
64831
  if (!(this.open && this.filterMode !== FilterMode.none)) {
64812
64832
  this.setActiveOption(activeOptionIndex);
@@ -64939,9 +64959,7 @@ ${nextLine.slice(indentLevel + 2)}`;
64939
64959
  */
64940
64960
  sizeChanged(prev, next) {
64941
64961
  super.sizeChanged(prev, next);
64942
- if (this.proxy) {
64943
- this.proxy.size = next;
64944
- }
64962
+ this.proxy.size = next;
64945
64963
  }
64946
64964
  openChanged() {
64947
64965
  if (!this.collapsible) {
@@ -65246,14 +65264,14 @@ ${nextLine.slice(indentLevel + 2)}`;
65246
65264
  * @internal
65247
65265
  */
65248
65266
  setProxyOptions() {
65249
- if (this.proxy instanceof HTMLSelectElement && this.options) {
65267
+ if (this.proxy instanceof HTMLSelectElement && this.options !== null) {
65250
65268
  this.proxy.options.length = 0;
65251
65269
  this.options.forEach(option => {
65252
65270
  const proxyOption = option.proxy
65253
- || (option instanceof HTMLOptionElement
65271
+ ?? (option instanceof HTMLOptionElement
65254
65272
  ? option.cloneNode()
65255
65273
  : null);
65256
- if (proxyOption) {
65274
+ if (proxyOption !== null) {
65257
65275
  this.proxy.options.add(proxyOption);
65258
65276
  }
65259
65277
  });
@@ -65281,7 +65299,7 @@ ${nextLine.slice(indentLevel + 2)}`;
65281
65299
  return;
65282
65300
  }
65283
65301
  const selectedOption = this.firstSelectedOption;
65284
- if (selectedOption) {
65302
+ if (selectedOption !== null) {
65285
65303
  this.selectedOptionObserver?.observe(selectedOption, {
65286
65304
  characterData: true,
65287
65305
  subtree: true,
@@ -65356,8 +65374,8 @@ ${nextLine.slice(indentLevel + 2)}`;
65356
65374
  const nimbleSelect = Select.compose({
65357
65375
  baseName: 'select',
65358
65376
  baseClass: Select$2,
65359
- template: template$n,
65360
- styles: styles$r,
65377
+ template: template$p,
65378
+ styles: styles$t,
65361
65379
  indicator: arrowExpanderDown16X16.data,
65362
65380
  end: html `
65363
65381
  <${iconExclamationMarkTag}
@@ -65370,6 +65388,46 @@ ${nextLine.slice(indentLevel + 2)}`;
65370
65388
  applyMixins(Select, StartEnd, DelegatesARIASelect);
65371
65389
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
65372
65390
 
65391
+ const styles$r = css `
65392
+ ${display('flex')}
65393
+ `;
65394
+
65395
+ const template$o = html `
65396
+ <template>step</template>
65397
+ `;
65398
+
65399
+ /**
65400
+ * A nimble-styled step for a stepper
65401
+ */
65402
+ class Step extends FoundationElement {
65403
+ }
65404
+ const nimbleStep = Step.compose({
65405
+ baseName: 'step',
65406
+ template: template$o,
65407
+ styles: styles$r
65408
+ });
65409
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleStep());
65410
+
65411
+ const styles$q = css `
65412
+ ${display('flex')}
65413
+ `;
65414
+
65415
+ const template$n = html `
65416
+ <template>stepper: <slot></slot></template>
65417
+ `;
65418
+
65419
+ /**
65420
+ * A nimble-styled stepper
65421
+ */
65422
+ class Stepper extends FoundationElement {
65423
+ }
65424
+ const nimbleStepper = Stepper.compose({
65425
+ baseName: 'stepper',
65426
+ template: template$n,
65427
+ styles: styles$q
65428
+ });
65429
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleStepper());
65430
+
65373
65431
  const styles$p = css `
65374
65432
  ${display('inline-flex')}
65375
65433
 
@@ -65545,7 +65603,7 @@ ${nextLine.slice(indentLevel + 2)}`;
65545
65603
  >
65546
65604
  <label
65547
65605
  part="label"
65548
- class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
65606
+ class="${x => (x.defaultSlottedNodes?.length > 0 ? 'label' : 'label label__hidden')}"
65549
65607
  >
65550
65608
  <slot ${slotted('defaultSlottedNodes')}></slot>
65551
65609
  </label>
@@ -69347,7 +69405,7 @@ ${nextLine.slice(indentLevel + 2)}`;
69347
69405
  };
69348
69406
  }
69349
69407
  isValid() {
69350
- return Object.values(this.getValidity()).every(x => x === false);
69408
+ return Object.values(this.getValidity()).every(x => !x);
69351
69409
  }
69352
69410
  areRecordIdsValid() {
69353
69411
  const validity = this.getValidity();
@@ -72074,7 +72132,7 @@ focus outline in that case.
72074
72132
  return this.getVisibleColumns()
72075
72133
  .map(column => {
72076
72134
  const { minPixelWidth, currentPixelWidth, currentFractionalWidth } = column.columnInternals;
72077
- if (currentPixelWidth) {
72135
+ if (currentPixelWidth !== undefined) {
72078
72136
  const coercedPixelWidth = Math.max(minPixelWidth, currentPixelWidth);
72079
72137
  return `${coercedPixelWidth}px`;
72080
72138
  }
@@ -72536,7 +72594,7 @@ focus outline in that case.
72536
72594
  const allRows = [];
72537
72595
  for (const row of topLevelRows) {
72538
72596
  allRows.push(row);
72539
- if (row.subRows?.length) {
72597
+ if (row.subRows?.length > 0) {
72540
72598
  allRows.push(...this.getOrderedRows(row.subRows));
72541
72599
  }
72542
72600
  }
@@ -72791,10 +72849,8 @@ focus outline in that case.
72791
72849
  originalIndex: undefined
72792
72850
  };
72793
72851
  }
72794
- // if we track orphans, delete this item from the orphan set if it is in it
72795
- if (orphanIds) {
72796
- orphanIds.delete(itemId);
72797
- }
72852
+ // delete this item from the orphan set if it is in it
72853
+ orphanIds.delete(itemId);
72798
72854
  // add the current item's data to the item in the lookup table
72799
72855
  lookup[itemId].clientRecord = item;
72800
72856
  const treeItem = lookup[itemId];
@@ -72814,16 +72870,14 @@ focus outline in that case.
72814
72870
  clientRecord: undefined,
72815
72871
  originalIndex: undefined
72816
72872
  };
72817
- // if we track orphans, add the generated parent to the orphan list
72818
- if (orphanIds) {
72819
- orphanIds.add(parentId);
72820
- }
72873
+ // add the generated parent to the orphan list
72874
+ orphanIds.add(parentId);
72821
72875
  }
72822
72876
  // add the current item to the parent
72823
72877
  lookup[parentId].subRows.push(treeItem);
72824
72878
  }
72825
72879
  }
72826
- if (orphanIds?.size) {
72880
+ if (orphanIds.size > 0) {
72827
72881
  const orphans = Array.from(orphanIds.values()).join(',');
72828
72882
  throw new Error(`The items array contains orphans that point to the following parentIds: [${orphans}]. These parentIds do not exist in the items array.`);
72829
72883
  }
@@ -72838,7 +72892,7 @@ focus outline in that case.
72838
72892
  * @returns Number of nodes in the tree
72839
72893
  */
72840
72894
  function countNodes(tree) {
72841
- return tree.reduce((sum, n) => sum + 1 + (n.subRows && countNodes(n.subRows)), 0);
72895
+ return tree.reduce((sum, n) => sum + 1 + (n.subRows ? countNodes(n.subRows) : 0), 0);
72842
72896
  }
72843
72897
 
72844
72898
  /**
@@ -74904,7 +74958,7 @@ focus outline in that case.
74904
74958
  calculateTanStackSortState() {
74905
74959
  const sortedColumns = this.getColumnsParticipatingInSorting().sort((x, y) => x.columnInternals.currentSortIndex
74906
74960
  - y.columnInternals.currentSortIndex);
74907
- this.firstSortedColumn = sortedColumns.length
74961
+ this.firstSortedColumn = sortedColumns.length > 0
74908
74962
  ? sortedColumns[0]
74909
74963
  : undefined;
74910
74964
  return sortedColumns.map(column => {
@@ -76108,13 +76162,13 @@ focus outline in that case.
76108
76162
  }
76109
76163
  const hours = Math.floor((milliseconds / millisecondsPerHour) % 24);
76110
76164
  remainingTime -= hours * millisecondsPerHour;
76111
- if (hours) {
76165
+ if (hours !== 0) {
76112
76166
  const formattedHours = this.hoursFormatter.format(hours);
76113
76167
  result.push(formattedHours);
76114
76168
  }
76115
76169
  const minutes = Math.floor((milliseconds / millisecondsPerMinute) % 60);
76116
76170
  remainingTime -= minutes * millisecondsPerMinute;
76117
- if (minutes) {
76171
+ if (minutes !== 0) {
76118
76172
  const formattedMinutes = this.minutesFormatter.format(minutes);
76119
76173
  result.push(formattedMinutes);
76120
76174
  }
@@ -77613,7 +77667,7 @@ focus outline in that case.
77613
77667
  .register(nimbleTableColumnText());
77614
77668
 
77615
77669
  const styles$8 = css `
77616
- ${styles$X}
77670
+ ${styles$Z}
77617
77671
 
77618
77672
  .tabpanel {
77619
77673
  overflow: auto;
@@ -77694,7 +77748,7 @@ focus outline in that case.
77694
77748
  const nimbleTabs = Tabs.compose({
77695
77749
  baseName: 'tabs',
77696
77750
  baseClass: Tabs$1,
77697
- template: template$H,
77751
+ template: template$J,
77698
77752
  styles: styles$8
77699
77753
  });
77700
77754
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabs());
@@ -77776,8 +77830,8 @@ focus outline in that case.
77776
77830
 
77777
77831
  const styles$6 = css `
77778
77832
  ${display('inline-flex')}
77779
- ${styles$N}
77780
- ${styles$J}
77833
+ ${styles$P}
77834
+ ${styles$L}
77781
77835
 
77782
77836
  :host {
77783
77837
  font: ${bodyFont};
@@ -77964,7 +78018,7 @@ focus outline in that case.
77964
78018
  <label
77965
78019
  part="label"
77966
78020
  for="control"
77967
- class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
78021
+ class="${x => (x.defaultSlottedNodes?.length > 0 ? 'label' : 'label label__hidden')}"
77968
78022
  >
77969
78023
  <slot ${slotted('defaultSlottedNodes')}></slot>
77970
78024
  </label>
@@ -78137,8 +78191,8 @@ focus outline in that case.
78137
78191
 
78138
78192
  const styles$5 = css `
78139
78193
  ${display('inline-block')}
78140
- ${styles$N}
78141
- ${styles$J}
78194
+ ${styles$P}
78195
+ ${styles$L}
78142
78196
 
78143
78197
  :host {
78144
78198
  font: ${bodyFont};
@@ -78399,7 +78453,7 @@ focus outline in that case.
78399
78453
  const labelTemplate = createRequiredVisibleLabelTemplate(html `<label
78400
78454
  part="label"
78401
78455
  for="control"
78402
- class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
78456
+ class="${x => (x.defaultSlottedNodes?.length > 0 ? 'label' : 'label label__hidden')}"
78403
78457
  >
78404
78458
  <slot
78405
78459
  ${slotted({
@@ -95116,7 +95170,7 @@ focus outline in that case.
95116
95170
  }
95117
95171
  const dieWidth = this.wafermap.dataManager.dieDimensions.width;
95118
95172
  const dieHeight = this.wafermap.dataManager.dieDimensions.height;
95119
- const dieSize = dieWidth * dieHeight * (this.wafermap.transform.k || 1);
95173
+ const dieSize = dieWidth * dieHeight * (this.wafermap.transform.k !== 0 ? this.wafermap.transform.k : 1);
95120
95174
  if (dieSize >= this.minDieDim) {
95121
95175
  const fontsize = this.wafermap.dataManager.labelsFontSize;
95122
95176
  const context = this.wafermap.canvasContext;
@@ -95310,7 +95364,7 @@ focus outline in that case.
95310
95364
  };
95311
95365
  }
95312
95366
  isValid() {
95313
- return Object.values(this.getValidity()).every(x => x === false);
95367
+ return Object.values(this.getValidity()).every(x => !x);
95314
95368
  }
95315
95369
  validateGridDimensions() {
95316
95370
  this.invalidGridDimensions = false;
@@ -95705,7 +95759,7 @@ focus outline in that case.
95705
95759
  .join("-");
95706
95760
  }
95707
95761
 
95708
- const workerCode = "var MatrixRenderer = (function (exports) {\n 'use strict';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol(\"Comlink.proxy\");\n const createEndpoint = Symbol(\"Comlink.endpoint\");\n const releaseProxy = Symbol(\"Comlink.releaseProxy\");\n const finalizer = Symbol(\"Comlink.finalizer\");\n const throwMarker = Symbol(\"Comlink.thrown\");\n const isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n const pendingListeners = new Map();\n ep.addEventListener(\"message\", function handleMessage(ev) {\n const { data } = ev;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n try {\n resolver(data);\n }\n finally {\n pendingListeners.delete(data.id);\n }\n });\n return createProxy(ep, pendingListeners, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, new Map(), {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, pendingListeners, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, pendingListeners, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = 'rgba(218,223,236,1)';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: '',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext('2d');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = '#ffffff';\n this.context.textAlign = 'center';\n this.context.lineCap = 'butt';\n const approximateTextHeight = this.context.measureText('M');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || 'NaN'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n";
95762
+ const workerCode = "var MatrixRenderer = (function (exports) {\n 'use strict';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol(\"Comlink.proxy\");\n const createEndpoint = Symbol(\"Comlink.endpoint\");\n const releaseProxy = Symbol(\"Comlink.releaseProxy\");\n const finalizer = Symbol(\"Comlink.finalizer\");\n const throwMarker = Symbol(\"Comlink.thrown\");\n const isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n const pendingListeners = new Map();\n ep.addEventListener(\"message\", function handleMessage(ev) {\n const { data } = ev;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n try {\n resolver(data);\n }\n finally {\n pendingListeners.delete(data.id);\n }\n });\n return createProxy(ep, pendingListeners, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, new Map(), {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, pendingListeners, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, pendingListeners, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = 'rgba(218,223,236,1)';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: '',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext('2d');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = '#ffffff';\n this.context.textAlign = 'center';\n this.context.lineCap = 'butt';\n const approximateTextHeight = this.context.measureText('M');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] ?? 'NaN'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n";
95709
95763
 
95710
95764
  let url;
95711
95765
  /**
@@ -95766,10 +95820,9 @@ focus outline in that case.
95766
95820
  });
95767
95821
  await this.matrixRenderer.drawWafer();
95768
95822
  if (!snapshot.dieLabelsHidden
95769
- && snapshot.dieDimensions
95770
95823
  && snapshot.dieDimensions.width
95771
95824
  * snapshot.dieDimensions.height
95772
- * (snapshot.transform.k || 1)
95825
+ * (snapshot.transform.k !== 0 ? snapshot.transform.k : 1)
95773
95826
  >= this.minDieDim) {
95774
95827
  await this.matrixRenderer.drawText();
95775
95828
  }