@arcgis/common-components 6.0.0-next.2 → 6.0.0-next.21

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 (114) hide show
  1. package/dist/cdn/2S4SSY4K.js +2 -0
  2. package/dist/cdn/{YEFEVEP6.js → 3UAY23XT.js} +1 -1
  3. package/dist/cdn/{OTWADB4M.js → 3ZTHRAIZ.js} +1 -1
  4. package/dist/cdn/{TXQKK4DJ.js → 4D35RDOE.js} +1 -1
  5. package/dist/cdn/4H4SDFQK.js +2 -0
  6. package/dist/cdn/4IMLX5B4.js +4 -0
  7. package/dist/cdn/6LZNNXUL.js +2 -0
  8. package/dist/cdn/74TVQE6W.js +2 -0
  9. package/dist/cdn/ANK7TFWV.js +2 -0
  10. package/dist/cdn/{X6DNIKWY.js → BAALW3SQ.js} +1 -1
  11. package/dist/cdn/{LNXO5YIS.js → BDIGRQ2U.js} +1 -1
  12. package/dist/cdn/BMR5AH6W.js +2 -0
  13. package/dist/cdn/DAAON2UO.js +3 -0
  14. package/dist/cdn/DMEXDZ2R.js +2 -0
  15. package/dist/cdn/{OMROUY3L.js → FESNPMRM.js} +1 -1
  16. package/dist/cdn/{OIGA7XBZ.js → FVFYAK24.js} +1 -1
  17. package/dist/cdn/{D4UHHQ35.js → IOAVVVNO.js} +1 -1
  18. package/dist/cdn/IZD4AM2W.js +2 -0
  19. package/dist/cdn/{MFGUTQRR.js → J4AV4EAC.js} +1 -1
  20. package/dist/cdn/JYWWX277.js +2 -0
  21. package/dist/cdn/{TO3YFXVJ.js → LLLQXE2U.js} +1 -1
  22. package/dist/cdn/{KDCSDIUQ.js → M7F7EBFY.js} +1 -1
  23. package/dist/cdn/OUPGMHLD.js +2 -0
  24. package/dist/cdn/{IECXEZNI.js → OZIHA5AQ.js} +1 -1
  25. package/dist/cdn/{JTQN5KMG.js → PIXY2HTI.js} +1 -1
  26. package/dist/cdn/{BZFAYVKR.js → PJGWH4LW.js} +1 -1
  27. package/dist/cdn/RQGPWDYU.js +8207 -0
  28. package/dist/cdn/SIB7LGF5.js +2 -0
  29. package/dist/cdn/SRO2CZ77.js +2 -0
  30. package/dist/cdn/T57JKNGO.js +2 -0
  31. package/dist/cdn/{EB5MDEWF.js → TE77L77R.js} +1 -1
  32. package/dist/cdn/TWPYXZ2O.js +2 -0
  33. package/dist/cdn/{735FTIBP.js → U6OGOB7D.js} +1 -1
  34. package/dist/cdn/V5FMQXMU.js +2 -0
  35. package/dist/cdn/{HYFFUYAU.js → VNC7X43V.js} +1 -1
  36. package/dist/cdn/W2W34T5K.js +2 -0
  37. package/dist/cdn/W7CWMG2O.js +2 -0
  38. package/dist/cdn/XAWHSQBN.js +2 -0
  39. package/dist/cdn/XMMFL5H3.js +2 -0
  40. package/dist/cdn/XQ65BGER.js +2 -0
  41. package/dist/cdn/YXN6CFSE.js +2 -0
  42. package/dist/cdn/ZJMMAZFG.js +2 -0
  43. package/dist/cdn/ZLVMV6TP.js +2 -0
  44. package/dist/cdn/{34AP2EEB.js → ZMYTELNC.js} +1 -1
  45. package/dist/cdn/assets/layer-replace/t9n/messages.en.json +1 -0
  46. package/dist/cdn/index.js +1 -1
  47. package/dist/cdn/main.css +1 -1
  48. package/dist/chunks/sharedCacheDirective.js +74 -0
  49. package/dist/chunks/toolbar.js +3 -3
  50. package/dist/components/arcgis-histogram/customElement.d.ts +8 -0
  51. package/dist/components/arcgis-histogram/customElement.js +103 -98
  52. package/dist/components/arcgis-html-content/customElement.d.ts +42 -0
  53. package/dist/components/arcgis-html-content/customElement.js +71 -0
  54. package/dist/components/arcgis-html-content/index.d.ts +1 -0
  55. package/dist/components/arcgis-html-content/index.js +1 -0
  56. package/dist/components/arcgis-label-input/customElement.js +1 -1
  57. package/dist/components/arcgis-layer-replace/customElement.d.ts +437 -0
  58. package/dist/components/arcgis-layer-replace/customElement.js +376 -0
  59. package/dist/components/arcgis-layer-replace/index.d.ts +1 -0
  60. package/dist/components/arcgis-layer-replace/index.js +7 -0
  61. package/dist/components/arcgis-slider/customElement.js +522 -443
  62. package/dist/components/arcgis-slider-field/customElement.d.ts +43 -41
  63. package/dist/components/arcgis-slider-field/customElement.js +45 -39
  64. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +21 -19
  65. package/dist/components/arcgis-slider-histogram-range/customElement.js +28 -22
  66. package/dist/components/arcgis-ticks/customElement.js +8 -8
  67. package/dist/components/arcgis-toolbar/customElement.d.ts +6 -3
  68. package/dist/components/arcgis-toolbar/customElement.js +30 -29
  69. package/dist/components/arcgis-toolbar/types.d.ts +1 -0
  70. package/dist/components/arcgis-toolbar-group/customElement.js +7 -7
  71. package/dist/components/arcgis-toolbar-item/customElement.js +1 -1
  72. package/dist/components/arcgis-toolbar-stack/customElement.js +51 -116
  73. package/dist/components/arcgis-value-picker/customElement.d.ts +8 -1
  74. package/dist/components/arcgis-value-picker/customElement.js +25 -21
  75. package/dist/components/arcgis-value-picker/index.js +1 -1
  76. package/dist/components/arcgis-value-picker-combobox/customElement.js +4 -4
  77. package/dist/components/arcgis-value-picker-label/customElement.d.ts +6 -0
  78. package/dist/components/arcgis-value-picker-label/customElement.js +6 -6
  79. package/dist/components/arcgis-value-picker-slider/customElement.js +18 -18
  80. package/dist/docs/api.json +1 -1
  81. package/dist/docs/docs.json +1 -1
  82. package/dist/docs/vscode.css-custom-data.json +1 -1
  83. package/dist/docs/vscode.html-custom-data.json +1 -1
  84. package/dist/docs/web-types.json +1 -1
  85. package/dist/index.d.ts +15 -0
  86. package/dist/index.js +8 -5
  87. package/dist/loader.js +9 -7
  88. package/dist/types/lumina.d.ts +16 -5
  89. package/dist/types/preact.d.ts +18 -5
  90. package/dist/types/react.d.ts +20 -5
  91. package/dist/types/stencil.d.ts +16 -5
  92. package/dist/utils/sharedCacheDirective.d.ts +68 -0
  93. package/package.json +6 -6
  94. package/dist/cdn/3AFEXHZ5.js +0 -2
  95. package/dist/cdn/5EA7SGHX.js +0 -2
  96. package/dist/cdn/7TCQ52FG.js +0 -2
  97. package/dist/cdn/ATLXGXTH.js +0 -2
  98. package/dist/cdn/BCN6LPOG.js +0 -4
  99. package/dist/cdn/CKGWDI7B.js +0 -2
  100. package/dist/cdn/DR2THZQU.js +0 -8208
  101. package/dist/cdn/EM4OQXFS.js +0 -2
  102. package/dist/cdn/GDRW3MIZ.js +0 -2
  103. package/dist/cdn/HJ3EJZFF.js +0 -2
  104. package/dist/cdn/LLATF73T.js +0 -2
  105. package/dist/cdn/M2J3GPM4.js +0 -2
  106. package/dist/cdn/PJCRMKAM.js +0 -2
  107. package/dist/cdn/QCUF7B3I.js +0 -2
  108. package/dist/cdn/S4XOD4YS.js +0 -2
  109. package/dist/cdn/UIBTY5FF.js +0 -2
  110. package/dist/cdn/WQW7S2RI.js +0 -2
  111. package/dist/cdn/XUPA27AW.js +0 -2
  112. package/dist/cdn/XX2ZCFWI.js +0 -2
  113. package/dist/cdn/ZCVP2N2O.js +0 -2
  114. package/dist/cdn/ZZ4YJXPK.js +0 -2
@@ -1,20 +1,21 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as ee } from "../../chunks/runtime.js";
3
- import { keyed as te } from "lit/directives/keyed.js";
4
- import { LitElement as ae, createEvent as M, safeClassMap as T, safeStyleMap as F, nothing as E } from "@arcgis/lumina";
5
- import { makeAccessorController as ne } from "@arcgis/lumina-toolkit/useAccessor";
6
- import { classes as re, getClosestElement as ie } from "@arcgis/toolkit/dom";
2
+ import { c as re } from "../../chunks/runtime.js";
3
+ import { keyed as q } from "lit/directives/keyed.js";
4
+ import { LitElement as ie, createEvent as M, safeClassMap as S, safeStyleMap as F, nothing as P } from "@arcgis/lumina";
5
+ import { useDirection as se } from "@arcgis/lumina/controllers";
6
+ import { makeAccessorController as le } from "@arcgis/lumina-toolkit/useAccessor";
7
+ import { classes as oe, getClosestElement as ce } from "@arcgis/toolkit/dom";
7
8
  import { slotChangeHasAssignedElement as H } from "@arcgis/toolkit/dom/slots";
8
- import { css as se, html as w } from "lit";
9
- import { map as N } from "lit/directives/map.js";
10
- import { createRef as X, ref as B } from "lit/directives/ref.js";
11
- import { u as le } from "../../chunks/useT9n.js";
12
- import { a as oe } from "../../chunks/locale.js";
13
- import ce from "@arcgis/core/core/Accessor.js";
14
- import { property as I, subclass as de } from "@arcgis/core/core/accessorSupport/decorators.js";
15
- import { watch as U } from "@arcgis/core/core/reactiveUtils.js";
16
- import { generateGuid as q } from "@arcgis/toolkit/string";
17
- const b = {
9
+ import { css as de, html as w } from "lit";
10
+ import { map as X } from "lit/directives/map.js";
11
+ import { createRef as j, ref as U } from "lit/directives/ref.js";
12
+ import { u as he } from "../../chunks/useT9n.js";
13
+ import { a as ue } from "../../chunks/locale.js";
14
+ import ge from "@arcgis/core/core/Accessor.js";
15
+ import { property as E, subclass as me } from "@arcgis/core/core/accessorSupport/decorators.js";
16
+ import { watch as K } from "@arcgis/core/core/reactiveUtils.js";
17
+ import { generateGuid as W } from "@arcgis/toolkit/string";
18
+ const _ = {
18
19
  increment: "ArrowUp",
19
20
  incrementHorizontal: "ArrowRight",
20
21
  decrement: "ArrowDown",
@@ -25,85 +26,85 @@ const b = {
25
26
  jumpToEnd: "End",
26
27
  confirmEdit: "Enter"
27
28
  };
28
- function j({ key: n, shiftKey: e }, t, a) {
29
- const i = he(n);
29
+ function Y({ key: r, shiftKey: e }, t, n) {
30
+ const i = fe(r);
30
31
  if (i == null)
31
32
  return null;
32
- const r = ge(n) || ue(n) && e ? me(t) : 1;
33
+ const a = ve(r) || pe(r) && e ? be(t) : 1;
33
34
  return {
34
- direction: a ? i * -1 : i,
35
- count: r
35
+ direction: n ? i * -1 : i,
36
+ count: a
36
37
  };
37
38
  }
38
- function he(n) {
39
- return n === b.increment || n === b.incrementHorizontal || n === b.pageIncrement ? 1 : n === b.decrement || n === b.decrementHorizontal || n === b.pageDecrement ? -1 : null;
39
+ function fe(r) {
40
+ return r === _.increment || r === _.incrementHorizontal || r === _.pageIncrement ? 1 : r === _.decrement || r === _.decrementHorizontal || r === _.pageDecrement ? -1 : null;
40
41
  }
41
- function W(n) {
42
- return n === b.jumpToEnd || n === b.jumpToStart;
42
+ function J(r) {
43
+ return r === _.jumpToEnd || r === _.jumpToStart;
43
44
  }
44
- function ue(n) {
45
- return n === b.increment || n === b.decrement || n === b.decrementHorizontal || n === b.incrementHorizontal;
45
+ function pe(r) {
46
+ return r === _.increment || r === _.decrement || r === _.decrementHorizontal || r === _.incrementHorizontal;
46
47
  }
47
- function ge(n) {
48
- return n === b.pageIncrement || n === b.pageDecrement;
48
+ function ve(r) {
49
+ return r === _.pageIncrement || r === _.pageDecrement;
49
50
  }
50
- function me(n) {
51
- const e = Number.isFinite(n) ? Math.floor(n) : 1;
51
+ function be(r) {
52
+ const e = Number.isFinite(r) ? Math.floor(r) : 1;
52
53
  return Math.max(1, e);
53
54
  }
54
- const fe = se`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--calcite-color-border-2)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
55
- var pe = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, J = (n) => {
56
- throw TypeError(n);
57
- }, V = (n, e, t, a) => {
58
- for (var i = a > 1 ? void 0 : a ? ve(e, t) : e, r = n.length - 1, l; r >= 0; r--)
59
- (l = n[r]) && (i = (a ? l(e, t, i) : l(i)) || i);
60
- return a && i && pe(e, t, i), i;
61
- }, Y = (n, e, t) => e.has(n) || J("Cannot " + t), be = (n, e, t) => (Y(n, e, "read from private field"), e.get(n)), _e = (n, e, t) => e.has(n) ? J("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), xe = (n, e, t, a) => (Y(n, e, "write to private field"), e.set(n, t), t), A;
62
- function we() {
55
+ const _e = de`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--arcgis-slider-track-background-color)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:var(--arcgis-internal-slider-track-size);position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:var(--arcgis-internal-slider-label-input-margin)}}}.label-separator{position:absolute;width:1em;height:var(--arcgis-internal-slider-label-input-height);margin:0;padding:0;pointer-events:none;text-align:center;z-index:0}.label-separator:before{content:"—"}:host([layout="horizontal"]) .label-separator{transform:translate(-50%)}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
56
+ var xe = Object.defineProperty, we = Object.getOwnPropertyDescriptor, ee = (r) => {
57
+ throw TypeError(r);
58
+ }, V = (r, e, t, n) => {
59
+ for (var i = n > 1 ? void 0 : n ? we(e, t) : e, a = r.length - 1, o; a >= 0; a--)
60
+ (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
61
+ return n && i && xe(e, t, i), i;
62
+ }, te = (r, e, t) => e.has(r) || ee("Cannot " + t), ye = (r, e, t) => (te(r, e, "read from private field"), e.get(r)), ke = (r, e, t) => e.has(r) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), De = (r, e, t, n) => (te(r, e, "write to private field"), e.set(r, t), t), A;
63
+ function Ie() {
63
64
  return {
64
65
  min: 0,
65
66
  max: 100,
66
67
  values: []
67
68
  };
68
69
  }
69
- let k = class extends ce {
70
+ let k = class extends ge {
70
71
  //--------------------------------------------------------------------------
71
72
  //
72
73
  // Lifecycle
73
74
  //
74
75
  //--------------------------------------------------------------------------
75
- constructor(n = {}) {
76
- super({ ...we(), properties: n }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, _e(this, A);
76
+ constructor(r = {}) {
77
+ super({ ...Ie(), properties: r }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, ke(this, A);
77
78
  }
78
79
  startup() {
79
- const { precision: n } = this;
80
- let { min: e, max: t, values: a } = this;
81
- t = D(t, n), e = D(e, n), a = a?.map((r) => S(D(r, n), e, t)).sort((r, l) => r - l), this._set("min", e), this._set("max", t), this._set("values", a);
82
- const i = new Map(a?.map((r) => [q(), r]));
83
- this._entries = i, U(
80
+ const { precision: r } = this;
81
+ let { min: e, max: t, values: n } = this;
82
+ t = y(t, r), e = y(e, r), n = n?.map((a) => L(y(a, r), e, t)).sort((a, o) => a - o), this._set("min", e), this._set("max", t), this._set("values", n);
83
+ const i = new Map(n?.map((a) => [W(), a]));
84
+ this._entries = i, K(
84
85
  () => this.min,
85
- (r) => {
86
- const l = this.values;
87
- r != null && l?.length && l.some((o) => o < r) && (this._entries.forEach((o, s) => {
88
- o < r && this._entries.set(s, r);
86
+ (a) => {
87
+ const o = this.values;
88
+ a != null && o?.length && o.some((s) => s < a) && (this._entries.forEach((s, l) => {
89
+ s < a && this._entries.set(l, a);
89
90
  }), this._updatesValues());
90
91
  },
91
92
  { sync: !0 }
92
- ), U(
93
+ ), K(
93
94
  () => this.max,
94
- (r) => {
95
- const l = this.values;
96
- r != null && l?.length && l.some((o) => o > r) && (this._entries.forEach((o, s) => {
97
- o > r && this._entries.set(s, r);
95
+ (a) => {
96
+ const o = this.values;
97
+ a != null && o?.length && o.some((s) => s > a) && (this._entries.forEach((s, l) => {
98
+ s > a && this._entries.set(l, a);
98
99
  }), this._updatesValues());
99
100
  },
100
101
  { sync: !0 }
101
- ), U(
102
+ ), K(
102
103
  () => this.precision,
103
- (r) => {
104
- const { min: l, max: o, values: s } = this;
105
- this._set("min", D(l, r)), this._set("max", D(o, r)), s?.length && (this._entries.forEach((c, d) => {
106
- this._entries.set(d, D(c, r));
104
+ (a) => {
105
+ const { min: o, max: s, values: l } = this;
106
+ this._set("min", y(o, a)), this._set("max", y(s, a)), l?.length && (this._entries.forEach((c, d) => {
107
+ this._entries.set(d, y(c, a));
107
108
  }), this._updatesValues());
108
109
  },
109
110
  { sync: !0 }
@@ -112,42 +113,42 @@ let k = class extends ce {
112
113
  get entries() {
113
114
  return this._entries;
114
115
  }
115
- set max(n) {
116
+ set max(r) {
116
117
  if (!this.ready) {
117
- this._set("max", n);
118
+ this._set("max", r);
118
119
  return;
119
120
  }
120
- const e = this._get("max"), t = D(n, this.precision);
121
+ const e = this._get("max"), t = y(r, this.precision);
121
122
  e !== t && this._set("max", t);
122
123
  }
123
- set min(n) {
124
+ set min(r) {
124
125
  if (!this.ready) {
125
- this._set("min", n);
126
+ this._set("min", r);
126
127
  return;
127
128
  }
128
- const e = this._get("min"), t = D(n, this.precision);
129
+ const e = this._get("min"), t = y(r, this.precision);
129
130
  e !== t && this._set("min", t);
130
131
  }
131
- set values(n) {
132
- if (be(this, A) === n)
132
+ set values(r) {
133
+ if (ye(this, A) === r)
133
134
  return;
134
- if (xe(this, A, n), !this.ready) {
135
- this._set("values", n);
135
+ if (De(this, A, r), !this.ready) {
136
+ this._set("values", r);
136
137
  return;
137
138
  }
138
139
  const e = this._get("values");
139
- if (n = n?.map((a) => S(D(a, this.precision), this.min, this.max)).sort((a, i) => a - i), e?.length === n?.length && e.every((a, i) => a === n[i]))
140
+ if (r = r?.map((n) => L(y(n, this.precision), this.min, this.max)).sort((n, i) => n - i), e?.length === r?.length && e.every((n, i) => n === r[i]))
140
141
  return;
141
- const t = new Map(n?.map((a) => [q(), a]));
142
- this._entries = t, this._set("values", n);
142
+ const t = new Map(r?.map((n) => [W(), n]));
143
+ this._entries = t, this._set("values", r);
143
144
  }
144
145
  //--------------------------------------------------------------------------
145
146
  //
146
147
  // Public Methods
147
148
  //
148
149
  //--------------------------------------------------------------------------
149
- getValue(n) {
150
- return this._entries.get(n);
150
+ getValue(r) {
151
+ return this._entries.get(r);
151
152
  }
152
153
  /**
153
154
  * Updates a thumb [value](#values) based on the provided index. The provided value
@@ -156,166 +157,166 @@ let k = class extends ce {
156
157
  *
157
158
  * @returns `true` if the value was changed, otherwise `false`.
158
159
  */
159
- setValue(n, e) {
160
+ setValue(r, e) {
160
161
  if (this.values == null)
161
162
  return !1;
162
- const { min: t, max: a } = this, i = this._entries.get(n), r = S(D(e, this.precision), t, a);
163
- return i === r ? !1 : (this._entries.set(n, r), this._updatesValues(), !0);
163
+ const { min: t, max: n } = this, i = this._entries.get(r), a = L(y(e, this.precision), t, n);
164
+ return i === a ? !1 : (this._entries.set(r, a), this._updatesValues(), !0);
164
165
  }
165
- setValues(n) {
166
+ setValues(r) {
166
167
  if (this.values == null)
167
168
  return !1;
168
169
  let e = !1;
169
- const { min: t, max: a } = this;
170
- for (const [i, r] of n) {
171
- const l = this._entries.get(i), o = S(D(r, this.precision), t, a);
172
- l !== o && (e = !0, this._entries.set(i, o));
170
+ const { min: t, max: n } = this;
171
+ for (const [i, a] of r) {
172
+ const o = this._entries.get(i), s = L(y(a, this.precision), t, n);
173
+ o !== s && (e = !0, this._entries.set(i, s));
173
174
  }
174
175
  return e ? (this._updatesValues(), !0) : !1;
175
176
  }
176
177
  _updatesValues() {
177
- const n = Array.from(this._entries.values()).sort((e, t) => e - t);
178
- this._set("values", n);
178
+ const r = Array.from(this._entries.values()).sort((e, t) => e - t);
179
+ this._set("values", r);
179
180
  }
180
181
  };
181
182
  A = /* @__PURE__ */ new WeakMap();
182
183
  V([
183
- I()
184
+ E()
184
185
  ], k.prototype, "_entries", 2);
185
186
  V([
186
- I({ readOnly: !0 })
187
+ E({ readOnly: !0 })
187
188
  ], k.prototype, "entries", 1);
188
189
  V([
189
- I()
190
+ E()
190
191
  ], k.prototype, "max", 1);
191
192
  V([
192
- I()
193
+ E()
193
194
  ], k.prototype, "min", 1);
194
195
  V([
195
- I({ cast: (n) => S(n, 0, 20) })
196
+ E({ cast: (r) => L(r, 0, 20) })
196
197
  ], k.prototype, "precision", 2);
197
198
  V([
198
- I({ readOnly: !0 })
199
+ E({ readOnly: !0 })
199
200
  ], k.prototype, "ready", 2);
200
201
  V([
201
- I()
202
+ E()
202
203
  ], k.prototype, "values", 1);
203
204
  k = V([
204
- de("esri.widgets.Slider.SliderData")
205
+ me("esri.widgets.Slider.SliderData")
205
206
  ], k);
206
- function S(n, e, t) {
207
- return Math.min(Math.max(n, e), t);
207
+ function L(r, e, t) {
208
+ return Math.min(Math.max(r, e), t);
208
209
  }
209
- function D(n, e) {
210
- return Number.parseFloat(n.toFixed(e));
210
+ function y(r, e) {
211
+ return Number.parseFloat(r.toFixed(e));
211
212
  }
212
- class De {
213
+ class Ve {
213
214
  constructor(e) {
214
215
  this.steps = e, this.minIndex = 0, this.maxIndex = this.steps.length - 1;
215
216
  }
216
217
  indexToValue(e) {
217
- return this.steps[y(e, this.minIndex, this.maxIndex)];
218
+ return this.steps[I(e, this.minIndex, this.maxIndex)];
218
219
  }
219
220
  valueToIndex(e) {
220
221
  const t = this.steps.indexOf(e);
221
222
  return t !== -1 ? t : this.steps.reduce(
222
- (a, i, r, l) => Math.abs(i - e) < Math.abs(l[a] - e) ? r : a,
223
+ (n, i, a, o) => Math.abs(i - e) < Math.abs(o[n] - e) ? a : n,
223
224
  0
224
225
  );
225
226
  }
226
227
  getClosestStepDistances(e, t) {
227
228
  if (t <= 0)
228
229
  return [];
229
- const a = [];
230
+ const n = [];
230
231
  for (let i = this.minIndex; i <= this.maxIndex; i++) {
231
- const r = this.indexToValue(i), l = Math.abs(r - e);
232
- let o = !1;
233
- for (let s = 0; s < a.length; s++)
234
- if (l < a[s].dist) {
235
- a.splice(s, 0, { idx: i, value: r, dist: l }), o = !0;
232
+ const a = this.indexToValue(i), o = Math.abs(a - e);
233
+ let s = !1;
234
+ for (let l = 0; l < n.length; l++)
235
+ if (o < n[l].dist) {
236
+ n.splice(l, 0, { idx: i, value: a, dist: o }), s = !0;
236
237
  break;
237
238
  }
238
- !o && a.length < t && a.push({ idx: i, value: r, dist: l }), a.length > t && (a.length = t);
239
+ !s && n.length < t && n.push({ idx: i, value: a, dist: o }), n.length > t && (n.length = t);
239
240
  }
240
- return a;
241
+ return n;
241
242
  }
242
243
  }
243
- class ke {
244
- constructor(e, t, a) {
245
- this.min = e, this.max = t, this.stepSize = a, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
244
+ class Ee {
245
+ constructor(e, t, n) {
246
+ this.min = e, this.max = t, this.stepSize = n, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
246
247
  }
247
248
  indexToValue(e) {
248
- return this.min + y(e, this.minIndex, this.maxIndex) * this.stepSize;
249
+ return this.min + I(e, this.minIndex, this.maxIndex) * this.stepSize;
249
250
  }
250
251
  valueToIndex(e) {
251
- return e = y(e, this.min, this.max), Math.round((e - this.min) / this.stepSize);
252
+ return e = I(e, this.min, this.max), Math.round((e - this.min) / this.stepSize);
252
253
  }
253
254
  getClosestStepDistances(e, t) {
254
255
  if (t <= 0)
255
256
  return [];
256
- const a = [], i = this.minIndex, r = this.maxIndex, o = (y(e, this.min, this.max) - this.min) / this.stepSize;
257
- let s = Math.floor(o), c = s + 1;
258
- for (; a.length < t && (s >= i || c <= r); ) {
259
- if (s < i) {
257
+ const n = [], i = this.minIndex, a = this.maxIndex, s = (I(e, this.min, this.max) - this.min) / this.stepSize;
258
+ let l = Math.floor(s), c = l + 1;
259
+ for (; n.length < t && (l >= i || c <= a); ) {
260
+ if (l < i) {
260
261
  const m = this.indexToValue(c);
261
- a.push({ idx: c, value: m, dist: Math.abs(m - e) }), c++;
262
+ n.push({ idx: c, value: m, dist: Math.abs(m - e) }), c++;
262
263
  continue;
263
264
  }
264
- if (c > r) {
265
- const m = this.indexToValue(s);
266
- a.push({ idx: s, value: m, dist: Math.abs(m - e) }), s--;
265
+ if (c > a) {
266
+ const m = this.indexToValue(l);
267
+ n.push({ idx: l, value: m, dist: Math.abs(m - e) }), l--;
267
268
  continue;
268
269
  }
269
- const d = this.indexToValue(s), g = this.indexToValue(c), h = Math.abs(d - e), f = Math.abs(g - e);
270
- h <= f ? (a.push({ idx: s, value: d, dist: h }), s--) : (a.push({ idx: c, value: g, dist: f }), c++);
270
+ const d = this.indexToValue(l), u = this.indexToValue(c), h = Math.abs(d - e), f = Math.abs(u - e);
271
+ h <= f ? (n.push({ idx: l, value: d, dist: h }), l--) : (n.push({ idx: c, value: u, dist: f }), c++);
271
272
  }
272
- return a;
273
+ return n;
273
274
  }
274
275
  }
275
- function ye(n) {
276
- if (n.steps == null)
276
+ function Ce(r) {
277
+ if (r.steps == null)
277
278
  return null;
278
- const e = n.steps;
279
- return Array.isArray(e) ? e.length === 0 ? null : new De(e) : e <= 0 ? null : new ke(n.min, n.max, e);
280
- }
281
- function Ve(n, e, t) {
282
- if (n == null) {
283
- const o = /* @__PURE__ */ new Map();
284
- for (const [s, c] of e.entries())
285
- o.set(s, c + t);
286
- return o;
287
- }
288
- const a = e.size, i = Array.from(e.entries()).map(([o, s]) => {
289
- const c = s + t, d = n.getClosestStepDistances(c, a);
290
- return { uuid: o, stepDistances: d };
291
- }), r = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
292
- i.sort((o, s) => o.stepDistances[0].dist - s.stepDistances[0].dist);
293
- for (const o of i) {
294
- const s = o.stepDistances.find((c) => !r.has(c.idx));
295
- s ? (r.add(s.idx), l.set(o.uuid, s.value)) : l.set(o.uuid, e.get(o.uuid));
279
+ const e = r.steps;
280
+ return Array.isArray(e) ? e.length === 0 ? null : new Ve(e) : e <= 0 ? null : new Ee(r.min, r.max, e);
281
+ }
282
+ function Pe(r, e, t) {
283
+ if (r == null) {
284
+ const s = /* @__PURE__ */ new Map();
285
+ for (const [l, c] of e.entries())
286
+ s.set(l, c + t);
287
+ return s;
288
+ }
289
+ const n = e.size, i = Array.from(e.entries()).map(([s, l]) => {
290
+ const c = l + t, d = r.getClosestStepDistances(c, n);
291
+ return { uuid: s, stepDistances: d };
292
+ }), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
293
+ i.sort((s, l) => s.stepDistances[0].dist - l.stepDistances[0].dist);
294
+ for (const s of i) {
295
+ const l = s.stepDistances.find((c) => !a.has(c.idx));
296
+ l ? (a.add(l.idx), o.set(s.uuid, l.value)) : o.set(s.uuid, e.get(s.uuid));
296
297
  }
297
- return l;
298
+ return o;
298
299
  }
299
- function R(n, e, t, a, i) {
300
- const { allowValuesOverlap: r, precision: l, min: o, max: s } = i, c = e.get(t) ?? 0, d = c + a, g = a >= 0 ? -1 : 1;
300
+ function O(r, e, t, n, i) {
301
+ const { allowValuesOverlap: a, precision: o, min: s, max: l } = i, c = e.get(t) ?? 0, d = c + n, u = n >= 0 ? -1 : 1;
301
302
  let h, f, m;
302
- if (n) {
303
+ if (r) {
303
304
  const p = /* @__PURE__ */ new Set();
304
- if (!r)
305
+ if (!a)
305
306
  for (const [v, x] of e.entries())
306
- v !== t && p.add(n.valueToIndex(x));
307
- const _ = n.getClosestStepDistances(d, e.size + 1);
308
- _.sort((v, x) => $(v.dist, l) - $(x.dist, l) || g * (x.value - v.value));
309
- let u = 0;
310
- h = _[u].value, m = (v) => !r && p.has(n.valueToIndex(v)), f = () => (u++, _[u]?.value);
307
+ v !== t && p.add(r.valueToIndex(x));
308
+ const b = r.getClosestStepDistances(d, e.size + 1);
309
+ b.sort((v, x) => z(v.dist, o) - z(x.dist, o) || u * (x.value - v.value));
310
+ let g = 0;
311
+ h = b[g].value, m = (v) => !a && p.has(r.valueToIndex(v)), f = () => (g++, b[g]?.value);
311
312
  } else {
312
313
  const p = /* @__PURE__ */ new Set();
313
- for (const [u, v] of e.entries())
314
- u !== t && p.add($(v, l));
315
- const _ = 1 / Math.pow(10, l);
316
- h = y($(d, l), o, s), m = (u) => !r && p.has(u), f = () => {
317
- const u = $(h + g * _, l);
318
- return u === h || u < o || u > s ? void 0 : u;
314
+ for (const [g, v] of e.entries())
315
+ g !== t && p.add(z(v, o));
316
+ const b = 1 / Math.pow(10, o);
317
+ h = I(z(d, o), s, l), m = (g) => !a && p.has(g), f = () => {
318
+ const g = z(h + u * b, o);
319
+ return g === h || g < s || g > l ? void 0 : g;
319
320
  };
320
321
  }
321
322
  if (!m(h))
@@ -328,182 +329,182 @@ function R(n, e, t, a, i) {
328
329
  return h;
329
330
  }
330
331
  }
331
- function $(n, e) {
332
- return Number.parseFloat(n.toFixed(e));
332
+ function z(r, e) {
333
+ return Number.parseFloat(r.toFixed(e));
333
334
  }
334
- function Ie(n, e, t, a = 1) {
335
- const i = Q(a);
336
- let r = e, l = !1;
337
- for (let o = 0; o < i; o++) {
338
- const s = Pe(n, r, t);
339
- if (l ||= s.changed, r = s.entries, !s.changed)
335
+ function Te(r, e, t, n = 1) {
336
+ const i = ne(n);
337
+ let a = e, o = !1;
338
+ for (let s = 0; s < i; s++) {
339
+ const l = ze(r, a, t);
340
+ if (o ||= l.changed, a = l.entries, !l.changed)
340
341
  break;
341
342
  }
342
- return { changed: l, entries: r };
343
- }
344
- function Ee(n, e, t, a, i = 1) {
345
- const r = Q(i);
346
- if (r === 1)
347
- return K(n, e, t, a);
348
- const l = new Map(e);
349
- let o = l.get(t);
350
- for (let s = 0; s < r; s++) {
351
- const c = K(n, l, t, a);
352
- if (c === o)
343
+ return { changed: o, entries: a };
344
+ }
345
+ function Se(r, e, t, n, i = 1) {
346
+ const a = ne(i);
347
+ if (a === 1)
348
+ return N(r, e, t, n);
349
+ const o = new Map(e);
350
+ let s = o.get(t);
351
+ for (let l = 0; l < a; l++) {
352
+ const c = N(r, o, t, n);
353
+ if (c === s)
353
354
  break;
354
- o = c, l.set(t, o);
355
+ s = c, o.set(t, s);
355
356
  }
356
- return o;
357
+ return s;
357
358
  }
358
- function Q(n) {
359
- const e = Number.isFinite(n) ? Math.floor(n) : 1;
359
+ function ne(r) {
360
+ const e = Number.isFinite(r) ? Math.floor(r) : 1;
360
361
  return Math.max(1, e);
361
362
  }
362
- function Pe(n, e, t) {
363
- const a = /* @__PURE__ */ new Map(), i = t > 0 ? ze : Z, r = Array.from(e).sort((s, c) => i(s[1], c[1]));
364
- let l = !1, o = !0;
365
- for (const [s, c] of r)
366
- if (a.set(s, c), o) {
367
- const d = K(n, a, s, t);
368
- c === d && (o = !1), l ||= o, a.set(s, d);
363
+ function ze(r, e, t) {
364
+ const n = /* @__PURE__ */ new Map(), i = t > 0 ? Le : ae, a = Array.from(e).sort((l, c) => i(l[1], c[1]));
365
+ let o = !1, s = !0;
366
+ for (const [l, c] of a)
367
+ if (n.set(l, c), s) {
368
+ const d = N(r, n, l, t);
369
+ c === d && (s = !1), o ||= s, n.set(l, d);
369
370
  }
370
- return { changed: l, entries: a };
371
+ return { changed: o, entries: n };
371
372
  }
372
- function K(n, e, t, a) {
373
- const { allowValuesOverlap: i, stepsProvider: r, resolution: l, min: o, max: s } = n, c = e.get(t);
374
- if (a = a > 0 ? 1 : -1, !r) {
375
- let u = y(c + a * l, o, s);
373
+ function N(r, e, t, n) {
374
+ const { allowValuesOverlap: i, stepsProvider: a, resolution: o, min: s, max: l } = r, c = e.get(t);
375
+ if (n = n > 0 ? 1 : -1, !a) {
376
+ let g = I(c + n * o, s, l);
376
377
  if (i)
377
- return u;
378
+ return g;
378
379
  const v = /* @__PURE__ */ new Set();
379
- for (const [x, P] of e)
380
- x !== t && v.add(P);
381
- for (; v.has(u) && u <= s && u >= o; ) {
382
- const x = u;
383
- if (u = y(u + a * l, o, s), u === x)
380
+ for (const [x, D] of e)
381
+ x !== t && v.add(D);
382
+ for (; v.has(g) && g <= l && g >= s; ) {
383
+ const x = g;
384
+ if (g = I(g + n * o, s, l), g === x)
384
385
  return c;
385
386
  }
386
- return v.has(u) || u > s || u < o ? c : u;
387
+ return v.has(g) || g > l || g < s ? c : g;
387
388
  }
388
- const d = r.valueToIndex(c);
389
+ const d = a.valueToIndex(c);
389
390
  if (d === -1)
390
391
  return c;
391
392
  if (i) {
392
- const u = y(d + a, r.minIndex, r.maxIndex);
393
- return r.indexToValue(u);
393
+ const g = I(d + n, a.minIndex, a.maxIndex);
394
+ return a.indexToValue(g);
394
395
  }
395
- const g = /* @__PURE__ */ new Set();
396
- for (const [u, v] of e)
397
- u !== t && g.add(r.valueToIndex(v));
396
+ const u = /* @__PURE__ */ new Set();
397
+ for (const [g, v] of e)
398
+ g !== t && u.add(a.valueToIndex(v));
398
399
  let h = d, f = !1;
399
- const m = r.minIndex, p = r.maxIndex;
400
- let _ = 0;
401
- for (; _ < Math.abs(p - m) && (h += a, !(h < m || h > p)); ) {
402
- if (!g.has(h)) {
400
+ const m = a.minIndex, p = a.maxIndex;
401
+ let b = 0;
402
+ for (; b < Math.abs(p - m) && (h += n, !(h < m || h > p)); ) {
403
+ if (!u.has(h)) {
403
404
  f = !0;
404
405
  break;
405
406
  }
406
- _++;
407
+ b++;
407
408
  }
408
- return f ? r.indexToValue(h) : c;
409
+ return f ? a.indexToValue(h) : c;
409
410
  }
410
- function Te(n, e, t, a) {
411
- const { allowValuesOverlap: i, stepsProvider: r, resolution: l, min: o, max: s } = n, c = e.get(t);
412
- if (a = a > 0 ? 1 : -1, !r) {
411
+ function $e(r, e, t, n) {
412
+ const { allowValuesOverlap: i, stepsProvider: a, resolution: o, min: s, max: l } = r, c = e.get(t);
413
+ if (n = n > 0 ? 1 : -1, !a) {
413
414
  const f = new Set(
414
415
  Array.from(e).filter(([p]) => p !== t).map(([, p]) => p)
415
416
  );
416
- let m = a > 0 ? s : o;
417
+ let m = n > 0 ? l : s;
417
418
  if (i)
418
419
  return m;
419
420
  for (; f.has(m); )
420
- if (m -= a * l, a > 0 && m > s || a < 0 && m < o) {
421
+ if (m -= n * o, n > 0 && m > l || n < 0 && m < s) {
421
422
  m = c;
422
423
  break;
423
424
  }
424
425
  return m;
425
426
  }
426
427
  if (i)
427
- return a > 0 ? r.indexToValue(r.maxIndex) : r.indexToValue(r.minIndex);
428
- const d = r.valueToIndex(c);
428
+ return n > 0 ? a.indexToValue(a.maxIndex) : a.indexToValue(a.minIndex);
429
+ const d = a.valueToIndex(c);
429
430
  if (d === -1)
430
431
  return c;
431
- const g = new Set(
432
- Array.from(e).filter(([f]) => f !== t).map(([, f]) => r.valueToIndex(f))
432
+ const u = new Set(
433
+ Array.from(e).filter(([f]) => f !== t).map(([, f]) => a.valueToIndex(f))
433
434
  );
434
- let h = a > 0 ? r.maxIndex : r.minIndex;
435
- for (; g.has(h); )
436
- if (h -= a, a > 0 && h > s || a < 0 && h < o) {
435
+ let h = n > 0 ? a.maxIndex : a.minIndex;
436
+ for (; u.has(h); )
437
+ if (h -= n, n > 0 && h > l || n < 0 && h < s) {
437
438
  h = d;
438
439
  break;
439
440
  }
440
- return r.indexToValue(h);
441
+ return a.indexToValue(h);
441
442
  }
442
- function $e(n, e, t) {
443
- const { stepsProvider: a, min: i, max: r } = n, l = /* @__PURE__ */ new Map(), o = Array.from(e).sort((c, d) => Z(c[1], d[1]));
444
- if (a) {
443
+ function Re(r, e, t) {
444
+ const { stepsProvider: n, min: i, max: a } = r, o = /* @__PURE__ */ new Map(), s = Array.from(e).sort((c, d) => ae(c[1], d[1]));
445
+ if (n) {
445
446
  let c = 0;
446
447
  if (t > 0) {
447
- const d = o[o.length - 1], g = a.valueToIndex(d[1]);
448
- c = a.maxIndex - g;
448
+ const d = s[s.length - 1], u = n.valueToIndex(d[1]);
449
+ c = n.maxIndex - u;
449
450
  } else {
450
- const d = o[0], g = a.valueToIndex(d[1]);
451
- c = a.minIndex - g;
451
+ const d = s[0], u = n.valueToIndex(d[1]);
452
+ c = n.minIndex - u;
452
453
  }
453
454
  if (c === 0)
454
- for (const [d, g] of o)
455
- l.set(d, g);
456
- for (const [d, g] of o) {
457
- const h = a.indexToValue(a.valueToIndex(g) + c);
458
- l.set(d, h);
455
+ for (const [d, u] of s)
456
+ o.set(d, u);
457
+ for (const [d, u] of s) {
458
+ const h = n.indexToValue(n.valueToIndex(u) + c);
459
+ o.set(d, h);
459
460
  }
460
- return l;
461
+ return o;
461
462
  }
462
- let s = 0;
463
+ let l = 0;
463
464
  if (t > 0) {
464
- const c = o[o.length - 1];
465
- s = r - c[1];
465
+ const c = s[s.length - 1];
466
+ l = a - c[1];
466
467
  } else {
467
- const c = o[0];
468
- s = i - c[1];
468
+ const c = s[0];
469
+ l = i - c[1];
469
470
  }
470
- for (const [c, d] of o)
471
- l.set(c, d + s);
472
- return l;
471
+ for (const [c, d] of s)
472
+ o.set(c, d + l);
473
+ return o;
473
474
  }
474
- function Z(n, e) {
475
- return n - e;
475
+ function ae(r, e) {
476
+ return r - e;
476
477
  }
477
- function ze(n, e) {
478
- return e - n;
478
+ function Le(r, e) {
479
+ return e - r;
479
480
  }
480
- function y(n, e, t) {
481
- return Math.max(e, Math.min(t, n));
481
+ function I(r, e, t) {
482
+ return Math.max(e, Math.min(t, r));
482
483
  }
483
- const Ce = ne(k);
484
- class Se extends ae {
484
+ const Me = le(k);
485
+ class Fe extends ie {
485
486
  constructor() {
486
- super(...arguments), this._stepsProvider = null, this._popoverElement = X(), this._trackElement = X(), this.messages = le({}), this._onPointerMoveDragUpdate = (e) => {
487
+ super(...arguments), this._direction = se(), this._stepsProvider = null, this._popoverElement = j(), this._trackElement = j(), this.messages = he({}), this._onPointerMoveDragUpdate = (e) => {
487
488
  this._updateDrag(this._mapEventToRange(e));
488
489
  }, this._onPointerUpDragEnd = (e) => {
489
- C(e) && this._endDrag();
490
+ R(e) && this._endDrag();
490
491
  }, this._onPointerCancelDragEnd = () => {
491
492
  this._endDrag();
492
- }, this._formatLabel = (e, t, a) => {
493
- const i = oe(this.messages._lang, t), r = this.labelFormatter;
494
- if (!r)
495
- return i.format(a);
496
- const l = r(a, e, (o) => i.format(o));
497
- return l ?? i.format(a);
493
+ }, this._formatLabel = (e, t, n) => {
494
+ const i = ue(this.messages._lang, t), a = this.labelFormatter;
495
+ if (!a)
496
+ return i.format(n);
497
+ const o = a(n, e, (s) => i.format(s));
498
+ return o ?? i.format(n);
498
499
  }, this._numberFormatOptions = {}, this._createFormatter = (e, t) => this._formatLabel.bind(this, e, t), this._minFormatter = this._createFormatter("min", this._numberFormatOptions), this._maxFormatter = this._createFormatter("max", this._numberFormatOptions), this._valueFormatter = this._createFormatter("value", this._numberFormatOptions), this._resizeObserver = new ResizeObserver(() => {
499
- this._layoutLabelInputs();
500
- }), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._activePart = null, this._sliderData = Ce(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
500
+ this._layoutLabelInputs(), this._updatePopoverReferenceElement();
501
+ }), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._measurablePopoverReferenceElement = "", this._activePart = null, this._sliderData = Me(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
501
502
  }
502
503
  static {
503
- this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
504
+ this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _measurablePopoverReferenceElement: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
504
505
  fromAttribute(e) {
505
506
  if (e.includes(","))
506
- return e.split(",").filter((a) => a.trim() !== "").map(parseFloat).filter((a) => Number.isFinite(a));
507
+ return e.split(",").filter((n) => n.trim() !== "").map(parseFloat).filter((n) => Number.isFinite(n));
507
508
  const t = parseFloat(e);
508
509
  return Number.isFinite(t) ? t : void 0;
509
510
  }
@@ -514,7 +515,7 @@ class Se extends ae {
514
515
  } }], messageOverrides: 0 };
515
516
  }
516
517
  static {
517
- this.styles = fe;
518
+ this.styles = _e;
518
519
  }
519
520
  static {
520
521
  this.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
@@ -539,8 +540,8 @@ class Se extends ae {
539
540
  return this.disabled || this.values.length === 0 || this._invalid;
540
541
  }
541
542
  get _invalid() {
542
- const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min, a = this.fullRangeMax == null || this.fullRangeMax >= this.max;
543
- return this.min >= this.max || !e || !t || !a;
543
+ const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min, n = this.fullRangeMax == null || this.fullRangeMax >= this.max;
544
+ return this.min >= this.max || !e || !t || !n;
544
545
  }
545
546
  get resolution() {
546
547
  const e = (this._sliderData.max - this._sliderData.min) / this._trackWidthOrHeight;
@@ -557,7 +558,7 @@ class Se extends ae {
557
558
  this._sliderData.startup();
558
559
  }
559
560
  willUpdate(e) {
560
- if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider = ye(this)), (e.has("values") || e.has("steps") || e.has("min") || e.has("max") || e.has("precision") || e.has("allowValuesOverlap")) && !this.allowValuesOverlap) {
561
+ if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider = Ce(this)), (e.has("values") || e.has("steps") || e.has("min") || e.has("max") || e.has("precision") || e.has("allowValuesOverlap")) && !this.allowValuesOverlap) {
561
562
  const t = this._resolveOverlappingValues();
562
563
  t && this._setValues(t);
563
564
  }
@@ -576,7 +577,7 @@ class Se extends ae {
576
577
  t && (e.has("values") || e.has("min") || e.has("max")) && t.reposition();
577
578
  }
578
579
  loaded() {
579
- this._resizeObserver.observe(this.el);
580
+ this._resizeObserver.observe(this.el), this._updatePopoverReferenceElement();
580
581
  }
581
582
  disconnectedCallback() {
582
583
  super.disconnectedCallback(), this._removeDragListeners();
@@ -588,28 +589,89 @@ class Se extends ae {
588
589
  };
589
590
  }
590
591
  async _layoutLabelInputs() {
591
- if (this.layout !== "horizontal" || !this._trackElement.value || this.valueLabelsDisplay === "hidden")
592
+ if (!this._trackElement.value || this.valueLabelsDisplay === "hidden")
592
593
  return;
593
- const e = this.renderRoot.querySelectorAll("arcgis-label-input"), t = this.componentOnReady().then(() => Promise.all(Array.from(e, (r) => r.updateComplete)));
594
+ const e = this.renderRoot.querySelectorAll("arcgis-label-input"), t = this.componentOnReady().then(() => Promise.all(Array.from(e, (s) => s.updateComplete)));
594
595
  if (this._labelInputsUpdateComplete = t, await t, t !== this._labelInputsUpdateComplete)
595
596
  return;
596
597
  this._labelInputsUpdateComplete = null;
597
- const a = this._trackElement.value;
598
- if (!a)
598
+ const n = this._trackElement.value;
599
+ if (!n)
599
600
  return;
600
- const i = a.getBoundingClientRect();
601
- for (const r of this._sliderData.entries.keys()) {
602
- const l = this._activePart === "range" || this._activePart === r;
601
+ const i = n.getBoundingClientRect(), a = [], o = this.isHorizontal;
602
+ for (const s of this._sliderData.entries.keys()) {
603
+ const l = this._activePart === "range" || this._activePart === s;
603
604
  if (this.valueLabelsDisplay === "always" || l) {
604
- const s = Le(this, r), c = G(this, r);
605
- if (!s || !c)
605
+ const d = Ae(this, s), u = Z(this, s);
606
+ if (!d || !u)
606
607
  continue;
607
- const d = s.getBoundingClientRect(), g = c.getBoundingClientRect(), h = c.getLabelBoundingClientRect(), f = d.width / 2, m = Math.round(d.left + f), p = Math.round(h.width / 2);
608
- let _ = g.width / 2;
609
- const u = i.left - f, v = i.right + f, x = m - p, P = m + p;
610
- x < u ? _ += x - u : P > v && (_ += P - v), c.style.transform = `translateX(${-Math.round(_)}px)`;
608
+ const h = d.getBoundingClientRect(), f = o ? h.left + h.width / 2 : h.top + h.height / 2;
609
+ if (o) {
610
+ const m = u.getBoundingClientRect(), p = u.getLabelBoundingClientRect(), b = h.width / 2, g = Math.round(p.width / 2);
611
+ let v = m.width / 2;
612
+ const x = i.left - b, D = i.right + b, C = f - g, G = f + g;
613
+ C < x ? v += C - x : G > D && (v += G - D), u.style.transform = `translateX(${-Math.round(v)}px)`;
614
+ } else
615
+ u.style.removeProperty("transform");
616
+ a.push({
617
+ handleBounds: h,
618
+ handleCenter: f,
619
+ labelInput: u
620
+ });
611
621
  }
612
622
  }
623
+ this._layoutCollidingLabelInputs(a);
624
+ }
625
+ _layoutCollidingLabelInputs(e) {
626
+ const t = this.isHorizontal, n = Array.from(this.renderRoot.querySelectorAll(".label-separator")), i = e.slice().sort((s, l) => s.handleCenter - l.handleCenter);
627
+ if (i.length === 0)
628
+ return;
629
+ const a = this._trackElement.value?.getBoundingClientRect(), o = i.map((s) => [s]);
630
+ for (let s = 0; s < i.length; s++) {
631
+ for (const c of n)
632
+ c.hidden = !0, c.style.removeProperty("left");
633
+ let l = 0;
634
+ for (const c of o) {
635
+ const d = (c[0].handleCenter + c[c.length - 1].handleCenter) / 2, u = c.reduce((f, m) => f + (t ? m.labelInput.getBoundingClientRect().width : m.labelInput.getBoundingClientRect().height), 0);
636
+ let h = c.length === 1 ? t ? c[0].labelInput.getBoundingClientRect().left : c[0].labelInput.getBoundingClientRect().top : d - u / 2;
637
+ if (a && c.length > 1) {
638
+ const f = c[0], m = c[c.length - 1];
639
+ if (t) {
640
+ const p = f.labelInput.getLabelBoundingClientRect().left - f.labelInput.getBoundingClientRect().left, b = m.labelInput.getBoundingClientRect().right - m.labelInput.getLabelBoundingClientRect().right, g = a.left - f.handleBounds.width / 2 - p, v = a.right + m.handleBounds.width / 2 + b - u;
641
+ h = T(h, g, v);
642
+ } else {
643
+ const p = f.labelInput.getBoundingClientRect().height / 2, b = m.labelInput.getBoundingClientRect().height / 2, g = a.top - p, v = a.bottom + b - u;
644
+ h = T(h, g, v);
645
+ }
646
+ }
647
+ for (let f = 0; f < c.length; f++) {
648
+ const m = c[f], p = m.labelInput.getBoundingClientRect(), b = t ? p.width : p.height, g = (t ? p.left : p.top) + b / 2, v = this._getLabelTranslate(m.labelInput, t), x = h + b / 2, D = `${t ? "translateX" : "translateY"}(${Math.round(v + x - g)}px)`;
649
+ if (m.labelInput.style.transform !== D && (m.labelInput.style.transform = D), h += b, t && f < c.length - 1) {
650
+ const C = n[l++];
651
+ if (!C)
652
+ continue;
653
+ C.hidden = !1, C.style.left = `${h - (a?.left ?? 0)}px`;
654
+ }
655
+ }
656
+ }
657
+ if (!this._mergeCollidingLabelGroups(o))
658
+ break;
659
+ }
660
+ }
661
+ _mergeCollidingLabelGroups(e) {
662
+ const t = this.isHorizontal;
663
+ for (let n = 0; n < e.length - 1; ) {
664
+ const i = e[n], a = e[n + 1], o = i[i.length - 1], s = a[0], l = o.labelInput.getBoundingClientRect(), c = s.labelInput.getBoundingClientRect(), d = t ? l.right : l.bottom;
665
+ if ((t ? c.left : c.top) > d)
666
+ n++;
667
+ else
668
+ return i.push(...a), e.splice(n + 1, 1), !0;
669
+ }
670
+ return !1;
671
+ }
672
+ _getLabelTranslate(e, t) {
673
+ const n = t ? /translateX\((-?\d+(?:\.\d+)?)px\)/u : /translateY\((-?\d+(?:\.\d+)?)px\)/u, i = e.style.transform.match(n);
674
+ return i ? Number.parseFloat(i[1]) : 0;
613
675
  }
614
676
  _onTrackFocus() {
615
677
  this._setActivePart("range");
@@ -618,39 +680,39 @@ class Se extends ae {
618
680
  this._setActivePart(null);
619
681
  }
620
682
  _onTrackRangePointerDown(e) {
621
- this._disabledOrInvalid || !C(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
683
+ this._disabledOrInvalid || !R(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
622
684
  }
623
685
  async _onPointerDown(e) {
624
- if (this._disabledOrInvalid || !C(e))
686
+ if (this._disabledOrInvalid || !R(e))
625
687
  return;
626
688
  const t = this.renderRoot.querySelector("arcgis-label-input[editing]");
627
689
  if (e.target === t)
628
690
  return;
629
691
  if (t) {
630
- t.blur(), this._focusEntry(z(t));
692
+ t.blur(), this._focusEntry($(t));
631
693
  return;
632
694
  }
633
- if (Me(e.target) || this.values?.length > 1)
695
+ if (Oe(e.target) || this.values?.length > 1)
634
696
  return;
635
- const a = this._mapEventToRange(e), [i, r] = this._sliderData.entries.entries().next().value, l = a * this._fullRange + this._fullMin - r, o = L(this._fullMin, this._fullMax, r) / 100;
636
- this._startDrag(i, o);
637
- const s = R(this._stepsProvider, this._sliderData.entries, i, l, {
697
+ const n = this._mapEventToRange(e), [i, a] = this._sliderData.entries.entries().next().value, o = n * this._fullRange + this._fullMin - a, s = B(this._fullMin, this._fullMax, a) / 100;
698
+ this._startDrag(i, s);
699
+ const l = O(this._stepsProvider, this._sliderData.entries, i, o, {
638
700
  allowValuesOverlap: this.allowValuesOverlap,
639
701
  precision: this.precision,
640
702
  min: this.min,
641
703
  max: this.max
642
704
  });
643
- this._setValue(i, s), this._focusEntry(i);
705
+ this._setValue(i, l), this._focusEntry(i);
644
706
  }
645
707
  _onThumbPointerDown(e) {
646
- const t = z(e.currentTarget);
647
- if (!C(e) || this._disabledOrInvalid || !t)
708
+ const t = $(e.currentTarget);
709
+ if (!R(e) || this._disabledOrInvalid || !t)
648
710
  return;
649
- const a = G(this, t);
650
- e.target === a && a?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
711
+ const n = Z(this, t);
712
+ e.target === n && n?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
651
713
  }
652
714
  _onFixedThumbPointerDown(e) {
653
- this._disabledOrInvalid || !C(e) || (e.preventDefault(), e.currentTarget.focus());
715
+ this._disabledOrInvalid || !R(e) || (e.preventDefault(), e.currentTarget.focus());
654
716
  }
655
717
  _endDrag() {
656
718
  if (this._disabledOrInvalid)
@@ -659,8 +721,8 @@ class Se extends ae {
659
721
  let e = !1;
660
722
  if (this._dragInfo) {
661
723
  const { entries: t } = this._dragInfo;
662
- for (const [a, i] of t)
663
- if (this._sliderData.getValue(a) !== i) {
724
+ for (const [n, i] of t)
725
+ if (this._sliderData.getValue(n) !== i) {
664
726
  e = !0;
665
727
  break;
666
728
  }
@@ -670,43 +732,43 @@ class Se extends ae {
670
732
  _startDrag(e, t) {
671
733
  if (this._disabledOrInvalid)
672
734
  return;
673
- const { min: a, max: i, values: r } = this;
674
- let l = a, o = i;
735
+ const { min: n, max: i, values: a } = this;
736
+ let o = n, s = i;
675
737
  if (this._setActivePart(e), e === "range") {
676
738
  if (this.segmentsDraggingDisabled)
677
739
  return;
678
- l = a - r[0], o = i - r[r.length - 1];
740
+ o = n - a[0], s = i - a[a.length - 1];
679
741
  }
680
742
  this._dragInfo = {
681
743
  position: t,
682
744
  entries: new Map(this._sliderData.entries.entries()),
683
- minDiff: l,
684
- maxDiff: o
745
+ minDiff: o,
746
+ maxDiff: s
685
747
  }, this._addDragListeners();
686
748
  }
687
749
  _updateDrag(e) {
688
750
  if (!this._dragInfo || !this._activePart)
689
751
  return;
690
- const { _activePart: t, _dragInfo: { position: a, entries: i, minDiff: r, maxDiff: l } } = this;
691
- if (a === e)
752
+ const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff: a, maxDiff: o } } = this;
753
+ if (n === e)
692
754
  return;
693
- let o = (e - a) * this._fullRange;
755
+ let s = (e - n) * this._fullRange;
694
756
  if (t === "range") {
695
- o = Math.min(l, Math.max(r, o));
696
- const s = Ve(this._stepsProvider, i, o);
697
- this._setValues(s);
757
+ s = Math.min(o, Math.max(a, s));
758
+ const l = Pe(this._stepsProvider, i, s);
759
+ this._setValues(l);
698
760
  } else {
699
- const s = R(this._stepsProvider, i, t, o, {
761
+ const l = O(this._stepsProvider, i, t, s, {
700
762
  allowValuesOverlap: this.allowValuesOverlap,
701
763
  precision: this.precision,
702
764
  min: this.min,
703
765
  max: this.max
704
766
  });
705
- this._setValue(t, s);
767
+ this._setValue(t, l);
706
768
  }
707
769
  }
708
770
  _focusEntry(e) {
709
- e && Re(this, e)?.focus();
771
+ e && Q(this, e)?.focus();
710
772
  }
711
773
  _addDragListeners() {
712
774
  document.addEventListener("pointerup", this._onPointerUpDragEnd), document.addEventListener("pointermove", this._onPointerMoveDragUpdate), document.addEventListener("pointercancel", this._onPointerCancelDragEnd);
@@ -721,72 +783,72 @@ class Se extends ae {
721
783
  this._sliderData.setValue(e, t) && (this._dragInfo || this.arcgisChange.emit(), this.arcgisInput.emit());
722
784
  }
723
785
  _resolveOverlappingValues() {
724
- const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i, r) => i[1] - r[1]);
725
- let a = !1;
726
- for (const [i, r] of t) {
727
- const l = O(r, this.min, this.max);
728
- if (!Array.from(e).some(([c, d]) => c !== i && O(d, this.min, this.max) === l))
786
+ const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i, a) => i[1] - a[1]);
787
+ let n = !1;
788
+ for (const [i, a] of t) {
789
+ const o = T(a, this.min, this.max);
790
+ if (!Array.from(e).some(([c, d]) => c !== i && T(d, this.min, this.max) === o))
729
791
  continue;
730
- const s = R(this._stepsProvider, e, i, l - r, {
792
+ const l = O(this._stepsProvider, e, i, o - a, {
731
793
  allowValuesOverlap: !1,
732
794
  precision: this.precision,
733
795
  min: this.min,
734
796
  max: this.max
735
797
  });
736
- s !== r && (a = !0), e.set(i, s);
798
+ l !== a && (n = !0), e.set(i, l);
737
799
  }
738
- return a ? e : null;
800
+ return n ? e : null;
739
801
  }
740
802
  _onThumbFocus(e) {
741
- const t = z(e.currentTarget);
803
+ const t = $(e.currentTarget);
742
804
  this._setActivePart(t);
743
805
  }
744
806
  _onThumbBlur() {
745
807
  this._setActivePart(null);
746
808
  }
747
809
  _onRangeInputChange(e) {
748
- const t = e.currentTarget, a = t.value, i = t.dataset.type;
749
- let r = !1;
810
+ const t = e.currentTarget, n = t.value, i = t.dataset.type;
811
+ let a = !1;
750
812
  switch (e.stopPropagation(), i) {
751
813
  case "min": {
752
- a < this.max ? (this.min = a, r = !0) : t.value = this.min;
814
+ n < this.max ? (this.min = n, a = !0) : t.value = this.min;
753
815
  break;
754
816
  }
755
817
  case "max": {
756
- a > this.min ? (this.max = a, r = !0) : t.value = this.max;
818
+ n > this.min ? (this.max = n, a = !0) : t.value = this.max;
757
819
  break;
758
820
  }
759
821
  }
760
- r && this.arcgisRangeChange.emit();
822
+ a && this.arcgisRangeChange.emit();
761
823
  }
762
824
  _onValueInputChange(e) {
763
- const t = e.currentTarget, a = z(t), i = t.value;
764
- if (a) {
825
+ const t = e.currentTarget, n = $(t), i = t.value;
826
+ if (n) {
765
827
  e.stopPropagation();
766
- const r = this._sliderData.getValue(a), l = R(this._stepsProvider, this._sliderData.entries, a, i - r, {
828
+ const a = this._sliderData.getValue(n), o = O(this._stepsProvider, this._sliderData.entries, n, i - a, {
767
829
  allowValuesOverlap: this.allowValuesOverlap,
768
830
  precision: this.precision,
769
831
  min: this.min,
770
832
  max: this.max
771
833
  });
772
- this._setValue(a, l), t.value = this._sliderData.getValue(a);
834
+ this._setValue(n, o), t.value = this._sliderData.getValue(n);
773
835
  }
774
836
  }
775
837
  _mapEventToRange(e) {
776
838
  const t = this._trackElement.value?.getBoundingClientRect();
777
839
  if (!t)
778
840
  return 0;
779
- const a = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
780
- return this.mirrored ? 1 - a : a;
841
+ const n = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
842
+ return this.mirrored ? 1 - n : n;
781
843
  }
782
844
  _getPositionStyleForElement(e) {
783
- const t = L(this._fullMin, this._fullMax, e);
845
+ const t = B(this._fullMin, this._fullMax, e);
784
846
  return {
785
847
  [this.isHorizontal ? this.mirrored ? "right" : "left" : this.mirrored ? "top" : "bottom"]: `${t}%`
786
848
  };
787
849
  }
788
850
  _popoverSlotChange(e) {
789
- this._hasPopoverContent = H(e);
851
+ this._hasPopoverContent = H(e), this._updatePopoverReferenceElement();
790
852
  }
791
853
  _onContentStartSlotChange(e) {
792
854
  this._hasContentStart = H(e);
@@ -795,43 +857,43 @@ class Se extends ae {
795
857
  this._hasContentEnd = H(e);
796
858
  }
797
859
  _onThumbKeyDown(e) {
798
- const t = z(e.currentTarget);
860
+ const t = $(e.currentTarget);
799
861
  if (!t)
800
862
  return;
801
- const a = e.currentTarget.querySelector("arcgis-label-input");
802
- if (!a || a.editing)
863
+ const n = e.currentTarget.querySelector("arcgis-label-input");
864
+ if (!n || n.editing)
803
865
  return;
804
- if (e.key === b.confirmEdit) {
805
- a.edit();
866
+ if (e.key === _.confirmEdit) {
867
+ n.edit();
806
868
  return;
807
869
  }
808
- const i = j(e, this.keyboardLargeStep, this.mirrored);
870
+ const i = Y(e, this.keyboardLargeStep, this.mirrored);
809
871
  if (i) {
810
872
  e.preventDefault();
811
- const r = Ee(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
812
- this._setValue(t, r);
873
+ const a = Se(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
874
+ this._setValue(t, a);
813
875
  return;
814
876
  }
815
- if (W(e.key)) {
877
+ if (J(e.key)) {
816
878
  e.preventDefault();
817
- const r = Te(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
818
- this._setValue(t, r);
879
+ const a = $e(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
880
+ this._setValue(t, a);
819
881
  }
820
882
  }
821
883
  _onTrackRangeKeyDown(e) {
822
884
  if (this._disabledOrInvalid)
823
885
  return;
824
- const t = j(e, this.keyboardLargeStep, this.mirrored);
886
+ const t = Y(e, this.keyboardLargeStep, this.mirrored);
825
887
  if (t) {
826
888
  e.preventDefault();
827
- const { entries: a } = Ie(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
828
- this._setValues(a);
889
+ const { entries: n } = Te(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
890
+ this._setValues(n);
829
891
  return;
830
892
  }
831
- if (W(e.key)) {
893
+ if (J(e.key)) {
832
894
  e.preventDefault();
833
- const a = $e(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
834
- this._setValues(a);
895
+ const n = Re(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
896
+ this._setValues(n);
835
897
  }
836
898
  }
837
899
  _getStepsConfiguration() {
@@ -844,32 +906,38 @@ class Se extends ae {
844
906
  };
845
907
  }
846
908
  _getDirectionForHomeEndKey(e) {
847
- return this.isHorizontal && this.mirrored || this.layout === "vertical" ? e === b.jumpToEnd ? -1 : 1 : e === b.jumpToStart ? -1 : 1;
909
+ return this.isHorizontal && this.mirrored || this.layout === "vertical" ? e === _.jumpToEnd ? -1 : 1 : e === _.jumpToStart ? -1 : 1;
848
910
  }
849
911
  _setActivePart(e) {
850
- this._activePart !== e && (this._activePart = e, this.arcgisActiveValueChange.emit());
912
+ this._activePart !== e && (this._activePart = e, this._updatePopoverReferenceElement(), this.arcgisActiveValueChange.emit());
851
913
  }
852
914
  _resolveFillPlacement(e) {
853
915
  const { fillPlacement: t } = this;
854
916
  return e ? t === "between" || t === "not-between" || t === "none" ? t : "between" : t === "start" || t === "end" || t === "none" ? t : "start";
855
917
  }
918
+ _updatePopoverReferenceElement() {
919
+ const { _activePart: e, popoverDisplay: t } = this;
920
+ let n = "";
921
+ if (this._hasPopoverContent)
922
+ if (t === "always" && this.values.length > 1) {
923
+ const s = Array.from(this._sliderData.entries), [l, c] = s[0];
924
+ n = s.every(([, u]) => u === c) ? l : "track-range";
925
+ } else e && Be(e) ? n = e : this.values.length > 1 ? n = "track-range" : n = this._sliderData.entries.keys().next().value ?? "";
926
+ let i = null;
927
+ n && (n === "track-range" ? i = this.renderRoot.querySelector("#track-range") : i = Q(this, n));
928
+ const a = i?.getBoundingClientRect(), o = !!a && a.width > 0 && a.height > 0;
929
+ this._measurablePopoverReferenceElement = o ? n : "";
930
+ }
856
931
  render() {
857
- return w`<div class=${T({
932
+ return w`<div class=${S({
858
933
  content: !0,
859
934
  disabled: this._disabledOrInvalid
860
935
  })} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`;
861
936
  }
862
937
  _renderPopover() {
863
- const { _activePart: e, layout: t, popoverDisplay: a, popoverLabel: i, popoverPlacement: r, valueLabelsDisplay: l, valueLabelsPlacement: o } = this;
864
- let s = "";
865
- if (this._hasPopoverContent)
866
- if (a === "always" && this.values.length > 1) {
867
- const h = Array.from(this._sliderData.entries), [f, m] = h[0];
868
- s = h.every(([, _]) => _ === m) ? f : "track-range";
869
- } else e && Fe(e) ? s = e : this.values.length > 1 ? s = "track-range" : s = this._sliderData.entries.keys().next().value ?? "";
870
- const c = this._hasPopoverContent && (a === "always" || !!e), d = t === "horizontal" ? r === "start" ? "top" : "bottom" : r === "start" ? "left" : "right";
871
- let g = 14;
872
- return s && s !== "track-range" && (g -= 1), l !== "hidden" && r === o && (g += 24), w`<calcite-popover class="popover" focus-trap-disabled .label=${i} .open=${c} .offsetDistance=${g} .placement=${d} .referenceElement=${s} scale=s trigger-disabled ${B(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
938
+ const { _activePart: e, layout: t, popoverDisplay: n, popoverLabel: i, popoverPlacement: a, valueLabelsDisplay: o, valueLabelsPlacement: s } = this, l = this._measurablePopoverReferenceElement, c = this._hasPopoverContent && !!l && (n === "always" || !!e), d = t === "horizontal" ? a === "start" ? "top" : "bottom" : a === "start" ? "left" : "right";
939
+ let u = 14;
940
+ return l && l !== "track-range" && (u -= 1), o !== "hidden" && a === s && (u += 24), w`<calcite-popover class="popover" focus-trap-disabled .label=${i} .open=${c} .offsetDistance=${u} .placement=${d} .referenceElement=${l} scale=s trigger-disabled ${U(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
873
941
  }
874
942
  _renderContentStart() {
875
943
  return w`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
@@ -878,48 +946,52 @@ class Se extends ae {
878
946
  return w`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`;
879
947
  }
880
948
  _renderTrackRange() {
881
- return w`<div class="track-container">${this._renderTrack()}<slot name=track-overlay></slot>${this._renderThumbs()}</div>`;
949
+ return w`<div class="track-container">${this._renderTrack()}<slot name=track-overlay></slot>${this._renderThumbs()}${this._renderLabelSeparators()}</div>`;
950
+ }
951
+ _renderLabelSeparators() {
952
+ const e = Math.max(0, this.values.length - 1);
953
+ return Array.from({ length: e }, (t, n) => q(n, w`<div aria-hidden=true class="label-separator" hidden></div>`));
882
954
  }
883
955
  _renderTrack() {
884
- return w`<div class="track" ${B(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
956
+ return w`<div class="track" ${U(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
885
957
  }
886
958
  _renderTrackBackground() {
887
- const { max: e, min: t, fillPlacement: a, values: i } = this, r = i.length > 1;
888
- let l = this._fullMin, o = this._fullMax;
889
- const s = [];
890
- return this._invalid ? w`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (l < t && (s.push(this._renderSegment(l, t, [
959
+ const { max: e, min: t, fillPlacement: n, values: i } = this, a = i.length > 1;
960
+ let o = this._fullMin, s = this._fullMax;
961
+ const l = [];
962
+ return this._invalid ? w`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (o < t && (l.push(this._renderSegment(o, t, [
891
963
  this.mirrored ? "track-effective-end" : "track-effective-start",
892
- !r && a === "start" ? "track-fill" : null
893
- ])), l = t), o > e && (s.push(this._renderSegment(e, o, [
964
+ !a && n === "start" ? "track-fill" : null
965
+ ])), o = t), s > e && (l.push(this._renderSegment(e, s, [
894
966
  this.mirrored ? "track-effective-start" : "track-effective-end",
895
- !r && a === "end" ? "track-fill" : null
896
- ])), o = e), s.push(this._renderSegment(l, o, ["track-bounds"])), s);
967
+ !a && n === "end" ? "track-fill" : null
968
+ ])), s = e), l.push(this._renderSegment(o, s, ["track-bounds"])), l);
897
969
  }
898
970
  _renderFillSegment() {
899
- const { values: e, min: t, max: a } = this;
971
+ const { values: e, min: t, max: n } = this;
900
972
  if (!e?.length || this._invalid)
901
973
  return;
902
- const i = [...e].sort((g, h) => g - h), r = i[0], l = i[i.length - 1], o = this._resolveFillPlacement(i.length > 1);
903
- let s;
904
- switch (o) {
974
+ const i = [...e].sort((u, h) => u - h), a = i[0], o = i[i.length - 1], s = this._resolveFillPlacement(i.length > 1);
975
+ let l;
976
+ switch (s) {
905
977
  case "start":
906
- t < r && (s = this._renderSegment(t, r, ["track-range"]));
978
+ t < a && (l = this._renderSegment(t, a, ["track-range"]));
907
979
  break;
908
980
  case "end":
909
- a > l && (s = this._renderSegment(l, a, ["track-range"]));
981
+ n > o && (l = this._renderSegment(o, n, ["track-range"]));
910
982
  break;
911
983
  case "between":
912
- i.length > 1 && (s = this._renderSegment(r, l, ["track-range"]));
984
+ i.length > 1 && (l = this._renderSegment(a, o, ["track-range"]));
913
985
  break;
914
986
  case "not-between":
915
- i.length > 1 && (s = [this._renderSegment(t, r, ["track-range"]), this._renderSegment(l, a, ["track-range"])]);
987
+ i.length > 1 && (l = [this._renderSegment(t, a, ["track-range"]), this._renderSegment(o, n, ["track-range"])]);
916
988
  break;
917
989
  }
918
990
  if (!(i.length > 1))
919
- return s;
920
- const c = this.segmentsDraggingDisabled, d = this._renderSegment(r, l, [
991
+ return l;
992
+ const c = this.segmentsDraggingDisabled, d = this._renderSegment(a, o, [
921
993
  "track-range-interactive",
922
- o === "between" ? "filled" : null,
994
+ s === "between" ? "filled" : null,
923
995
  c ? null : "interactive",
924
996
  this._activePart === "range" && !this.segmentsDraggingDisabled ? "active" : null
925
997
  ], {
@@ -929,95 +1001,102 @@ class Se extends ae {
929
1001
  onPointerDown: c ? void 0 : this._onTrackRangePointerDown,
930
1002
  onKeyDown: c ? void 0 : this._onTrackRangeKeyDown
931
1003
  });
932
- return [s, d];
1004
+ return [l, d];
933
1005
  }
934
- _renderSegment(e, t, a, i) {
935
- const { _fullMin: r, _fullMax: l, mirrored: o } = this, s = [
936
- L(r, l, O(e, r, l)),
937
- 100 - L(r, l, O(t, r, l))
1006
+ _renderSegment(e, t, n, i) {
1007
+ const { _fullMin: a, _fullMax: o, mirrored: s } = this, l = [
1008
+ B(a, o, T(e, a, o)),
1009
+ 100 - B(a, o, T(t, a, o))
938
1010
  ];
939
- o && s.reverse();
1011
+ s && l.reverse();
940
1012
  const c = this.isHorizontal ? {
941
- left: `${s[0]}%`,
942
- right: `${s[1]}%`
1013
+ left: `${l[0]}%`,
1014
+ right: `${l[1]}%`
943
1015
  } : {
944
- top: `${s[1]}%`,
945
- bottom: `${s[0]}%`
946
- }, d = re("segment", ...a);
947
- return w`<div id=${i?.id ?? E} class=${T(d)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
1016
+ top: `${l[1]}%`,
1017
+ bottom: `${l[0]}%`
1018
+ }, d = oe("segment", ...n);
1019
+ return w`<div id=${i?.id ?? P} class=${S(d)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
948
1020
  }
949
1021
  _renderThumbs() {
950
- const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), a = t.map(([, i]) => i).sort((i, r) => i - r);
951
- if (this.valuesDraggingDisabled && a.length > 1) {
952
- const i = a[0], r = a.at(-1);
953
- if (i != null && r != null) {
954
- const l = (i + r) / 2;
1022
+ const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), n = t.map(([, i]) => i).sort((i, a) => i - a);
1023
+ if (this.valuesDraggingDisabled && n.length > 1) {
1024
+ const i = n[0], a = n.at(-1);
1025
+ if (i != null && a != null) {
1026
+ const o = (i + a) / 2;
955
1027
  return [
956
- this._renderFixedThumb(l),
957
- N(t, ([o, s]) => this._renderThumb(o, s, !0))
1028
+ this._renderFixedThumb(o),
1029
+ X(t, ([s, l]) => this._renderThumb(s, l, !0))
958
1030
  ];
959
1031
  }
960
1032
  }
961
- return N(t, ([i, r]) => this._renderThumb(i, r, !1));
1033
+ return X(t, ([i, a]) => this._renderThumb(i, a, !1));
962
1034
  }
963
1035
  _renderFixedThumb(e) {
964
- const { _disabledOrInvalid: t, segmentsDraggingDisabled: a, isHorizontal: i } = this;
965
- return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${T({
1036
+ const { _disabledOrInvalid: t, segmentsDraggingDisabled: n, isHorizontal: i } = this;
1037
+ return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${S({
966
1038
  thumb: !0,
967
1039
  "fixed-thumb": !0,
968
1040
  active: this._activePart === "range"
969
- })} @blur=${this._onTrackBlur} @focus=${this._onTrackFocus} @keydown=${a ? void 0 : this._onTrackRangeKeyDown} @pointerdown=${a ? this._onFixedThumbPointerDown : this._onTrackRangePointerDown} role=slider style=${F({
1041
+ })} @blur=${this._onTrackBlur} @focus=${this._onTrackFocus} @keydown=${n ? void 0 : this._onTrackRangeKeyDown} @pointerdown=${n ? this._onFixedThumbPointerDown : this._onTrackRangePointerDown} role=slider style=${F({
970
1042
  ...this._getPositionStyleForElement(e),
971
1043
  "z-index": this._activePart === "range" ? 1 : 0
972
1044
  })} .tabIndex=${t ? -1 : 0}><div class="thumb-content"><span class="handle"></span></div></div>`;
973
1045
  }
974
- _renderThumb(e, t, a) {
975
- const { valueLabelsDisplay: i } = this, r = this._disabledOrInvalid, l = !a && (this._activePart === e || this._activePart === "range"), o = !a && (this._activePart === "range" || this._activePart === e), s = i === "always" || i === "auto" && (o || a && this._activePart === "range"), c = this.isHorizontal, d = c ? "horizontal" : "vertical", g = `label-${e}`, h = c ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
976
- return te(e, w`<div id=${e ?? E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(i ? g : void 0) ?? E} .ariaOrientation=${d} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${T({
1046
+ _renderThumb(e, t, n) {
1047
+ const { valueLabelsDisplay: i } = this, a = this._disabledOrInvalid, o = !n && (this._activePart === e || this._activePart === "range"), s = !n && (this._activePart === "range" || this._activePart === e), l = i === "always" || i === "auto" && (s || n && this._activePart === "range"), c = this.isHorizontal, d = c ? "horizontal" : "vertical", u = `label-${e}`, h = c ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
1048
+ return q(e, w`<div id=${e ?? P} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(i ? u : void 0) ?? P} .ariaOrientation=${d} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${S({
977
1049
  thumb: !0,
978
- active: l,
979
- "labels-only": a
980
- })} data-entry=${e ?? E} @pointerdown=${a ? void 0 : this._onThumbPointerDown} @focus=${a ? void 0 : this._onThumbFocus} @blur=${a ? void 0 : this._onThumbBlur} @keydown=${a ? void 0 : this._onThumbKeyDown} role=slider style=${F({
1050
+ active: o,
1051
+ "labels-only": n
1052
+ })} data-entry=${e ?? P} @pointerdown=${n ? void 0 : this._onThumbPointerDown} @focus=${n ? void 0 : this._onThumbFocus} @blur=${n ? void 0 : this._onThumbBlur} @keydown=${n ? void 0 : this._onThumbKeyDown} role=slider style=${F({
981
1053
  ...this._getPositionStyleForElement(t),
982
- "z-index": this._activePart === e ? 1 : 0
983
- })} .tabIndex=${a || r ? -1 : 0}><div class="thumb-content"><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${g ?? E} .labelFormatter=${this._valueFormatter} @focus=${r ? void 0 : this._onThumbFocus} @blur=${r ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${B(this._makeResizeRef())}></arcgis-label-input></div></div>`);
1054
+ "z-index": this._activePart === e ? 2 : 1
1055
+ })} .tabIndex=${n || a ? -1 : 0}><div class="thumb-content"><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!l} id=${u ?? P} .labelFormatter=${this._valueFormatter} @focus=${a ? void 0 : this._onThumbFocus} @blur=${a ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${U(this._makeResizeRef())}></arcgis-label-input></div></div>`);
984
1056
  }
985
1057
  _renderRangeLabel(e) {
986
1058
  let t = "center";
987
- return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")), w`<arcgis-label-input .alignment=${t} class=${T(e)} data-type=${e ?? E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
1059
+ if (this.isHorizontal) {
1060
+ t = e === "min" ? "end" : "start";
1061
+ const n = () => {
1062
+ t = t === "end" ? "start" : "end";
1063
+ };
1064
+ this.rangeLabelsPlacement === "end" && n(), this.mirrored && n(), this._direction === "rtl" && n();
1065
+ }
1066
+ return w`<arcgis-label-input .alignment=${t} class=${S(e)} data-type=${e ?? P} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
988
1067
  }
989
1068
  }
990
- function Me(n) {
991
- return "dataset" in n && n.tagName === "ARCGIS-LABEL-INPUT" && (n.dataset.type === "min" || n.dataset.type === "max");
1069
+ function Oe(r) {
1070
+ return "dataset" in r && r.tagName === "ARCGIS-LABEL-INPUT" && (r.dataset.type === "min" || r.dataset.type === "max");
992
1071
  }
993
- function z(n) {
994
- const e = ie(n, "[data-entry]");
1072
+ function $(r) {
1073
+ const e = ce(r, "[data-entry]");
995
1074
  return e && "dataset" in e ? e.dataset.entry : null;
996
1075
  }
997
- function Fe(n) {
998
- return typeof n != null && n !== "range";
1076
+ function Be(r) {
1077
+ return typeof r != null && r !== "range";
999
1078
  }
1000
- function Re(n, e) {
1001
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
1079
+ function Q(r, e) {
1080
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
1002
1081
  }
1003
- function Le(n, e) {
1004
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
1082
+ function Ae(r, e) {
1083
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
1005
1084
  }
1006
- function G(n, e) {
1007
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
1085
+ function Z(r, e) {
1086
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
1008
1087
  }
1009
- function C(n) {
1010
- return n.isPrimary && n.button === 0;
1088
+ function R(r) {
1089
+ return r.isPrimary && r.button === 0;
1011
1090
  }
1012
- const Oe = 5;
1013
- function L(n, e, t) {
1014
- const a = e - n, i = (t - n) / a * 100;
1015
- return Number.parseFloat(i.toFixed(Oe));
1091
+ const He = 5;
1092
+ function B(r, e, t) {
1093
+ const n = e - r, i = (t - r) / n * 100;
1094
+ return Number.parseFloat(i.toFixed(He));
1016
1095
  }
1017
- function O(n, e, t) {
1018
- return Math.max(e, Math.min(t, n));
1096
+ function T(r, e, t) {
1097
+ return Math.max(e, Math.min(t, r));
1019
1098
  }
1020
- ee("arcgis-slider", Se);
1099
+ re("arcgis-slider", Fe);
1021
1100
  export {
1022
- Se as ArcgisSlider
1101
+ Fe as ArcgisSlider
1023
1102
  };