@arcgis/common-components 5.1.0-next.3 → 5.1.0-next.31
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.
- package/README.md +24 -1
- package/dist/cdn/22GRTRMF.js +2 -0
- package/dist/cdn/2F3FM6VX.js +4 -0
- package/dist/cdn/{J5X5TNVW.js → 3UL7AE5P.js} +1 -1
- package/dist/cdn/{YVSTPEPS.js → 4LO2H2XZ.js} +1 -1
- package/dist/cdn/{C6JAR4IN.js → 5FTQHNFB.js} +1 -1
- package/dist/cdn/6HXZBQL4.js +2 -0
- package/dist/cdn/{AXTSUI2Q.js → 7D6ITPI4.js} +1 -1
- package/dist/cdn/{7Y42J3JI.js → 7IYSWEUK.js} +1 -1
- package/dist/cdn/ATQVL2C7.js +2 -0
- package/dist/cdn/CG7OQMEV.js +2 -0
- package/dist/cdn/{ZOWIFVL3.js → CSBHN4SH.js} +1 -1
- package/dist/cdn/{XEB2RUND.js → JKXEMJNT.js} +1 -1
- package/dist/cdn/JN2RY5YZ.js +2 -0
- package/dist/cdn/{7HQMPKZO.js → KAIGOKQE.js} +1 -1
- package/dist/cdn/KESRGTPP.js +2 -0
- package/dist/cdn/MB7UDGWW.js +2 -0
- package/dist/cdn/{7PB2GGQH.js → NEZDZZ6D.js} +1 -1
- package/dist/cdn/SAX5Y76O.js +2 -0
- package/dist/cdn/X4CZ666G.js +2 -0
- package/dist/cdn/ZPC4G24J.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/commonFunctions.js +5 -11
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +1 -0
- package/dist/components/arcgis-ckeditor5/types.d.ts +9 -0
- package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +1 -0
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-field-info/customElement.d.ts +1 -0
- package/dist/components/arcgis-field-info/customElement.js +10 -10
- package/dist/components/arcgis-field-info/utils/basic.d.ts +1 -0
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +1 -0
- package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +5 -1
- package/dist/components/arcgis-histogram/customElement.d.ts +46 -28
- package/dist/components/arcgis-histogram/customElement.js +0 -2
- package/dist/components/arcgis-histogram/types.d.ts +1 -3
- package/dist/components/arcgis-label-input/customElement.d.ts +6 -6
- package/dist/components/arcgis-label-input/customElement.js +22 -17
- package/dist/components/arcgis-picker-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-ramp-color/customElement.d.ts +2 -0
- package/dist/components/arcgis-ramp-color-break/customElement.d.ts +2 -0
- package/dist/components/arcgis-ramp-opacity/customElement.d.ts +1 -0
- package/dist/components/arcgis-slider/customElement.d.ts +270 -75
- package/dist/components/arcgis-slider/customElement.js +506 -438
- package/dist/components/arcgis-slider-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-ticks/customElement.d.ts +101 -13
- package/dist/components/arcgis-ticks/customElement.js +28 -28
- package/dist/components/arcgis-ticks/types.d.ts +23 -0
- package/dist/components/arcgis-unique-values-list/customElement.d.ts +8 -1
- package/dist/components/arcgis-unique-values-list/customElement.js +153 -150
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/types.d.ts +24 -7
- package/package.json +5 -5
- package/dist/cdn/6DQVLQL6.js +0 -2
- package/dist/cdn/6MGBOM6S.js +0 -2
- package/dist/cdn/6NYYZIHB.js +0 -2
- package/dist/cdn/BAVGT3I5.js +0 -2
- package/dist/cdn/GQLKGVRX.js +0 -2
- package/dist/cdn/P45VPBNI.js +0 -2
- package/dist/cdn/S7T3XQPB.js +0 -2
- package/dist/cdn/UTXWKXMT.js +0 -4
- package/dist/cdn/ZL3E4ZGE.js +0 -2
- package/dist/cdn/ZP76EPVI.js +0 -2
|
@@ -1,69 +1,106 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { makeAccessorController as
|
|
6
|
-
import { slotChangeHasAssignedElement as
|
|
7
|
-
import { css as
|
|
8
|
-
import { map as
|
|
9
|
-
import { createRef as
|
|
10
|
-
import { u as
|
|
11
|
-
import { g as
|
|
12
|
-
import
|
|
13
|
-
import { property as
|
|
14
|
-
import { watch as
|
|
15
|
-
import { generateGuid as
|
|
16
|
-
const re = J`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;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-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-leading: 0;--arcgis-slider-internal-value-labels-placement-trailing: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-trailing: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="leading"]){--arcgis-slider-internal-value-labels-placement-leading: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="trailing"]){--arcgis-slider-internal-value-labels-placement-trailing: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="trailing"]){--arcgis-slider-internal-range-labels-placement-trailing: var(--arcgis-slider-internal-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-slider-internal-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)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}:host([layout="vertical"]){.track-effective-leading{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-trailing{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-leading{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-trailing{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{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-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;position:absolute}.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))))}}.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(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--calcite-animation-timing, .125s) ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.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}: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-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="leading"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) ) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) ) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-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-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="trailing"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-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;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-trailing) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { c as W } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as J } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as Y, createEvent as P, safeClassMap as C, safeStyleMap as F, nothing as E } from "@arcgis/lumina";
|
|
5
|
+
import { makeAccessorController as Q } from "@arcgis/lumina/controllers/accessor";
|
|
6
|
+
import { slotChangeHasAssignedElement as L, classes as Z, getClosestElement as ee } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { css as te, html as y } from "lit";
|
|
8
|
+
import { map as ne } from "lit/directives/map.js";
|
|
9
|
+
import { createRef as H, ref as R } from "lit/directives/ref.js";
|
|
10
|
+
import { u as ae } from "../../chunks/useT9n.js";
|
|
11
|
+
import { g as re } from "../../chunks/locale.js";
|
|
12
|
+
import ie from "@arcgis/core/core/Accessor.js";
|
|
13
|
+
import { property as I, subclass as se } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
14
|
+
import { watch as O } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
+
import { generateGuid as B } from "@arcgis/toolkit/string";
|
|
16
|
+
const p = {
|
|
17
|
+
increment: "ArrowUp",
|
|
18
|
+
incrementHorizontal: "ArrowRight",
|
|
19
|
+
decrement: "ArrowDown",
|
|
20
|
+
decrementHorizontal: "ArrowLeft",
|
|
21
|
+
pageIncrement: "PageUp",
|
|
22
|
+
pageDecrement: "PageDown",
|
|
23
|
+
jumpToStart: "Home",
|
|
24
|
+
jumpToEnd: "End",
|
|
25
|
+
confirmEdit: "Enter"
|
|
21
26
|
};
|
|
22
|
-
function
|
|
27
|
+
function K({ key: a, shiftKey: e }, t, n) {
|
|
28
|
+
const i = le(a);
|
|
29
|
+
if (i == null)
|
|
30
|
+
return null;
|
|
31
|
+
const r = ce(a) || oe(a) && e ? de(t) : 1;
|
|
32
|
+
return {
|
|
33
|
+
direction: n ? i * -1 : i,
|
|
34
|
+
count: r
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function le(a) {
|
|
38
|
+
return a === p.increment || a === p.incrementHorizontal || a === p.pageIncrement ? 1 : a === p.decrement || a === p.decrementHorizontal || a === p.pageDecrement ? -1 : null;
|
|
39
|
+
}
|
|
40
|
+
function N(a) {
|
|
41
|
+
return a === p.jumpToEnd || a === p.jumpToStart;
|
|
42
|
+
}
|
|
43
|
+
function oe(a) {
|
|
44
|
+
return a === p.increment || a === p.decrement || a === p.decrementHorizontal || a === p.incrementHorizontal;
|
|
45
|
+
}
|
|
46
|
+
function ce(a) {
|
|
47
|
+
return a === p.pageIncrement || a === p.pageDecrement;
|
|
48
|
+
}
|
|
49
|
+
function de(a) {
|
|
50
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
51
|
+
return Math.max(1, e);
|
|
52
|
+
}
|
|
53
|
+
const ue = te`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;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-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-start: 0;--arcgis-slider-internal-value-labels-placement-end: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-end: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-slider-internal-value-labels-placement-start: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-slider-internal-value-labels-placement-end: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-slider-internal-range-labels-placement-end: var(--arcgis-slider-internal-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-slider-internal-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)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}: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{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-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;position:absolute}.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))))}}.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(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--calcite-animation-timing, .125s) ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.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}: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-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height)) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-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-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-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;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-end) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`;
|
|
54
|
+
var he = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, D = (a, e, t, n) => {
|
|
55
|
+
for (var i = n > 1 ? void 0 : n ? ge(e, t) : e, r = a.length - 1, o; r >= 0; r--)
|
|
56
|
+
(o = a[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
57
|
+
return n && i && he(e, t, i), i;
|
|
58
|
+
};
|
|
59
|
+
function me() {
|
|
23
60
|
return {
|
|
24
61
|
min: 0,
|
|
25
62
|
max: 100,
|
|
26
63
|
values: []
|
|
27
64
|
};
|
|
28
65
|
}
|
|
29
|
-
let
|
|
66
|
+
let w = class extends ie {
|
|
30
67
|
//--------------------------------------------------------------------------
|
|
31
68
|
//
|
|
32
69
|
// Lifecycle
|
|
33
70
|
//
|
|
34
71
|
//--------------------------------------------------------------------------
|
|
35
|
-
constructor(
|
|
36
|
-
super({ ...
|
|
72
|
+
constructor(a = {}) {
|
|
73
|
+
super({ ...me(), properties: a }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1;
|
|
37
74
|
}
|
|
38
75
|
startup() {
|
|
39
|
-
const { precision:
|
|
40
|
-
let { min: e, max: t, values:
|
|
41
|
-
t =
|
|
42
|
-
const i = new Map(
|
|
43
|
-
this._entries = i,
|
|
76
|
+
const { precision: a } = this;
|
|
77
|
+
let { min: e, max: t, values: n } = this;
|
|
78
|
+
t = x(t, a), e = x(e, a), n = n?.map((r) => T(x(r, a), e, t)), this._set("min", e), this._set("max", t), this._set("values", n);
|
|
79
|
+
const i = new Map(n?.map((r) => [B(), r]));
|
|
80
|
+
this._entries = i, O(
|
|
44
81
|
() => this.min,
|
|
45
82
|
(r) => {
|
|
46
|
-
const
|
|
47
|
-
r != null &&
|
|
48
|
-
s < r && this._entries.set(
|
|
83
|
+
const o = this.values;
|
|
84
|
+
r != null && o?.length && o.some((s) => s < r) && (this._entries.forEach((s, l) => {
|
|
85
|
+
s < r && this._entries.set(l, r);
|
|
49
86
|
}), this._updatesValues());
|
|
50
87
|
},
|
|
51
88
|
{ sync: !0 }
|
|
52
|
-
),
|
|
89
|
+
), O(
|
|
53
90
|
() => this.max,
|
|
54
91
|
(r) => {
|
|
55
|
-
const
|
|
56
|
-
r != null &&
|
|
57
|
-
s > r && this._entries.set(
|
|
92
|
+
const o = this.values;
|
|
93
|
+
r != null && o?.length && o.some((s) => s > r) && (this._entries.forEach((s, l) => {
|
|
94
|
+
s > r && this._entries.set(l, r);
|
|
58
95
|
}), this._updatesValues());
|
|
59
96
|
},
|
|
60
97
|
{ sync: !0 }
|
|
61
|
-
),
|
|
98
|
+
), O(
|
|
62
99
|
() => this.precision,
|
|
63
100
|
(r) => {
|
|
64
|
-
const { min:
|
|
65
|
-
this._set("min",
|
|
66
|
-
this._entries.set(
|
|
101
|
+
const { min: o, max: s, values: l } = this;
|
|
102
|
+
this._set("min", x(o, r)), this._set("max", x(s, r)), l?.length && (this._entries.forEach((c, d) => {
|
|
103
|
+
this._entries.set(d, x(c, r));
|
|
67
104
|
}), this._updatesValues());
|
|
68
105
|
},
|
|
69
106
|
{ sync: !0 }
|
|
@@ -72,40 +109,40 @@ let _ = class extends te {
|
|
|
72
109
|
get entries() {
|
|
73
110
|
return this._entries;
|
|
74
111
|
}
|
|
75
|
-
set max(
|
|
112
|
+
set max(a) {
|
|
76
113
|
if (!this.ready) {
|
|
77
|
-
this._set("max",
|
|
114
|
+
this._set("max", a);
|
|
78
115
|
return;
|
|
79
116
|
}
|
|
80
|
-
const e = this._get("max"), t =
|
|
117
|
+
const e = this._get("max"), t = x(a, this.precision);
|
|
81
118
|
e !== t && this._set("max", t);
|
|
82
119
|
}
|
|
83
|
-
set min(
|
|
120
|
+
set min(a) {
|
|
84
121
|
if (!this.ready) {
|
|
85
|
-
this._set("min",
|
|
122
|
+
this._set("min", a);
|
|
86
123
|
return;
|
|
87
124
|
}
|
|
88
|
-
const e = this._get("min"), t =
|
|
125
|
+
const e = this._get("min"), t = x(a, this.precision);
|
|
89
126
|
e !== t && this._set("min", t);
|
|
90
127
|
}
|
|
91
|
-
set values(
|
|
128
|
+
set values(a) {
|
|
92
129
|
if (!this.ready) {
|
|
93
|
-
this._set("values",
|
|
130
|
+
this._set("values", a);
|
|
94
131
|
return;
|
|
95
132
|
}
|
|
96
133
|
const e = this._get("values");
|
|
97
|
-
if (
|
|
134
|
+
if (a = a?.map((n) => T(x(n, this.precision), this.min, this.max)).sort((n, i) => n - i), e && a && e.length === a.length && e.every((n, i) => n === a[i]))
|
|
98
135
|
return;
|
|
99
|
-
const t = new Map(
|
|
100
|
-
this._entries = t, this._set("values",
|
|
136
|
+
const t = new Map(a?.map((n) => [B(), n]));
|
|
137
|
+
this._entries = t, this._set("values", a);
|
|
101
138
|
}
|
|
102
139
|
//--------------------------------------------------------------------------
|
|
103
140
|
//
|
|
104
141
|
// Public Methods
|
|
105
142
|
//
|
|
106
143
|
//--------------------------------------------------------------------------
|
|
107
|
-
getValue(
|
|
108
|
-
return this._entries.get(
|
|
144
|
+
getValue(a) {
|
|
145
|
+
return this._entries.get(a);
|
|
109
146
|
}
|
|
110
147
|
/**
|
|
111
148
|
* Updates a thumb [value](#values) based on the provided index. The provided value
|
|
@@ -114,287 +151,354 @@ let _ = class extends te {
|
|
|
114
151
|
*
|
|
115
152
|
* @returns `true` if the value was changed, otherwise `false`.
|
|
116
153
|
*/
|
|
117
|
-
setValue(
|
|
154
|
+
setValue(a, e) {
|
|
118
155
|
if (this.values == null)
|
|
119
156
|
return !1;
|
|
120
|
-
const { min: t, max:
|
|
121
|
-
return i === r ? !1 : (this._entries.set(
|
|
157
|
+
const { min: t, max: n } = this, i = this._entries.get(a), r = T(x(e, this.precision), t, n);
|
|
158
|
+
return i === r ? !1 : (this._entries.set(a, r), this._updatesValues(), !0);
|
|
122
159
|
}
|
|
123
|
-
setValues(
|
|
160
|
+
setValues(a) {
|
|
124
161
|
if (this.values == null)
|
|
125
162
|
return !1;
|
|
126
163
|
let e = !1;
|
|
127
|
-
const { min: t, max:
|
|
128
|
-
for (const [i, r] of
|
|
129
|
-
const
|
|
130
|
-
|
|
164
|
+
const { min: t, max: n } = this;
|
|
165
|
+
for (const [i, r] of a) {
|
|
166
|
+
const o = this._entries.get(i), s = T(x(r, this.precision), t, n);
|
|
167
|
+
o !== s && (e = !0, this._entries.set(i, s));
|
|
131
168
|
}
|
|
132
169
|
return e ? (this._updatesValues(), !0) : !1;
|
|
133
170
|
}
|
|
134
171
|
_updatesValues() {
|
|
135
|
-
const
|
|
136
|
-
this._set("values",
|
|
172
|
+
const a = Array.from(this._entries.values()).sort((e, t) => e - t);
|
|
173
|
+
this._set("values", a);
|
|
137
174
|
}
|
|
138
175
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
],
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
],
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
],
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
],
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
],
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
],
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
],
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
],
|
|
163
|
-
function
|
|
164
|
-
return Math.min(Math.max(
|
|
165
|
-
}
|
|
166
|
-
function
|
|
167
|
-
return Number.parseFloat(
|
|
168
|
-
}
|
|
169
|
-
class
|
|
176
|
+
D([
|
|
177
|
+
I()
|
|
178
|
+
], w.prototype, "_entries", 2);
|
|
179
|
+
D([
|
|
180
|
+
I({ readOnly: !0 })
|
|
181
|
+
], w.prototype, "entries", 1);
|
|
182
|
+
D([
|
|
183
|
+
I()
|
|
184
|
+
], w.prototype, "max", 1);
|
|
185
|
+
D([
|
|
186
|
+
I()
|
|
187
|
+
], w.prototype, "min", 1);
|
|
188
|
+
D([
|
|
189
|
+
I({ cast: (a) => T(a, 0, 20) })
|
|
190
|
+
], w.prototype, "precision", 2);
|
|
191
|
+
D([
|
|
192
|
+
I({ readOnly: !0 })
|
|
193
|
+
], w.prototype, "ready", 2);
|
|
194
|
+
D([
|
|
195
|
+
I()
|
|
196
|
+
], w.prototype, "values", 1);
|
|
197
|
+
w = D([
|
|
198
|
+
se("esri.widgets.Slider.SliderData")
|
|
199
|
+
], w);
|
|
200
|
+
function T(a, e, t) {
|
|
201
|
+
return Math.min(Math.max(a, e), t);
|
|
202
|
+
}
|
|
203
|
+
function x(a, e) {
|
|
204
|
+
return Number.parseFloat(a.toFixed(e));
|
|
205
|
+
}
|
|
206
|
+
class fe {
|
|
170
207
|
constructor(e) {
|
|
171
208
|
this.steps = e, this.minIndex = 0, this.maxIndex = this.steps.length - 1;
|
|
172
209
|
}
|
|
173
210
|
indexToValue(e) {
|
|
174
|
-
return this.steps[
|
|
211
|
+
return this.steps[k(e, this.minIndex, this.maxIndex)];
|
|
175
212
|
}
|
|
176
213
|
valueToIndex(e) {
|
|
177
214
|
const t = this.steps.indexOf(e);
|
|
178
215
|
return t !== -1 ? t : this.steps.reduce(
|
|
179
|
-
(
|
|
216
|
+
(n, i, r, o) => Math.abs(i - e) < Math.abs(o[n] - e) ? r : n
|
|
180
217
|
);
|
|
181
218
|
}
|
|
219
|
+
getClosestStepDistances(e, t) {
|
|
220
|
+
if (t <= 0)
|
|
221
|
+
return [];
|
|
222
|
+
const n = [];
|
|
223
|
+
for (let i = this.minIndex; i <= this.maxIndex; i++) {
|
|
224
|
+
const r = this.indexToValue(i), o = Math.abs(r - e);
|
|
225
|
+
let s = !1;
|
|
226
|
+
for (let l = 0; l < n.length; l++)
|
|
227
|
+
if (o < n[l].dist) {
|
|
228
|
+
n.splice(l, 0, { idx: i, value: r, dist: o }), s = !0;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
!s && n.length < t && n.push({ idx: i, value: r, dist: o }), n.length > t && (n.length = t);
|
|
232
|
+
}
|
|
233
|
+
return n;
|
|
234
|
+
}
|
|
182
235
|
}
|
|
183
|
-
class
|
|
184
|
-
constructor(e, t,
|
|
185
|
-
this.min = e, this.max = t, this.stepSize =
|
|
236
|
+
class pe {
|
|
237
|
+
constructor(e, t, n) {
|
|
238
|
+
this.min = e, this.max = t, this.stepSize = n, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
|
|
186
239
|
}
|
|
187
240
|
indexToValue(e) {
|
|
188
|
-
return this.min +
|
|
241
|
+
return this.min + k(e, this.minIndex, this.maxIndex) * this.stepSize;
|
|
189
242
|
}
|
|
190
243
|
valueToIndex(e) {
|
|
191
|
-
return e =
|
|
244
|
+
return e = k(e, this.min, this.max), Math.round((e - this.min) / this.stepSize);
|
|
245
|
+
}
|
|
246
|
+
getClosestStepDistances(e, t) {
|
|
247
|
+
if (t <= 0)
|
|
248
|
+
return [];
|
|
249
|
+
const n = [], i = this.minIndex, r = this.maxIndex, s = (k(e, this.min, this.max) - this.min) / this.stepSize;
|
|
250
|
+
let l = Math.floor(s), c = l + 1;
|
|
251
|
+
for (; n.length < t && (l >= i || c <= r); ) {
|
|
252
|
+
if (l < i) {
|
|
253
|
+
const h = this.indexToValue(c);
|
|
254
|
+
n.push({ idx: c, value: h, dist: Math.abs(h - e) }), c++;
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (c > r) {
|
|
258
|
+
const h = this.indexToValue(l);
|
|
259
|
+
n.push({ idx: l, value: h, dist: Math.abs(h - e) }), l--;
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
const d = this.indexToValue(l), u = this.indexToValue(c), g = Math.abs(d - e), f = Math.abs(u - e);
|
|
263
|
+
g <= f ? (n.push({ idx: l, value: d, dist: g }), l--) : (n.push({ idx: c, value: u, dist: f }), c++);
|
|
264
|
+
}
|
|
265
|
+
return n;
|
|
192
266
|
}
|
|
193
267
|
}
|
|
194
|
-
function
|
|
195
|
-
if (
|
|
268
|
+
function ve(a) {
|
|
269
|
+
if (a.steps == null)
|
|
196
270
|
return null;
|
|
197
|
-
const e =
|
|
198
|
-
return Array.isArray(e) ? e.length === 0 ? null : new
|
|
271
|
+
const e = a.steps;
|
|
272
|
+
return Array.isArray(e) ? e.length === 0 ? null : new fe(e) : e <= 0 ? null : new pe(a.min, a.max, e);
|
|
199
273
|
}
|
|
200
|
-
function
|
|
201
|
-
if (
|
|
274
|
+
function be(a, e, t) {
|
|
275
|
+
if (a == null) {
|
|
202
276
|
const s = /* @__PURE__ */ new Map();
|
|
203
|
-
for (const [
|
|
204
|
-
s.set(
|
|
277
|
+
for (const [l, c] of e.entries())
|
|
278
|
+
s.set(l, c + t);
|
|
205
279
|
return s;
|
|
206
280
|
}
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
for (let p = 0; p < c.length; p++)
|
|
213
|
-
if (m < c[p].dist) {
|
|
214
|
-
c.splice(p, 0, { idx: h, value: u, dist: m }), f = !0;
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
!f && c.length < a && c.push({ idx: h, value: u, dist: m }), c.length > a && (c.length = a);
|
|
218
|
-
}
|
|
219
|
-
return { uuid: s, stepDistances: c };
|
|
220
|
-
}), r = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
221
|
-
i.sort((s, o) => s.stepDistances[0].dist - o.stepDistances[0].dist);
|
|
281
|
+
const n = e.size, i = Array.from(e.entries()).map(([s, l]) => {
|
|
282
|
+
const c = l + t, d = a.getClosestStepDistances(c, n);
|
|
283
|
+
return { uuid: s, stepDistances: d };
|
|
284
|
+
}), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
285
|
+
i.sort((s, l) => s.stepDistances[0].dist - l.stepDistances[0].dist);
|
|
222
286
|
for (const s of i) {
|
|
223
|
-
const
|
|
224
|
-
|
|
287
|
+
const l = s.stepDistances.find((c) => !r.has(c.idx));
|
|
288
|
+
l ? (r.add(l.idx), o.set(s.uuid, l.value)) : o.set(s.uuid, e.get(s.uuid));
|
|
225
289
|
}
|
|
226
|
-
return
|
|
290
|
+
return o;
|
|
227
291
|
}
|
|
228
|
-
function
|
|
292
|
+
function U(a, e, t, n, i) {
|
|
229
293
|
const r = e.get(t) ?? 0;
|
|
230
|
-
if (!
|
|
231
|
-
return r +
|
|
232
|
-
const
|
|
294
|
+
if (!a)
|
|
295
|
+
return r + n;
|
|
296
|
+
const o = r + n, s = a.minIndex, l = a.maxIndex, c = /* @__PURE__ */ new Set();
|
|
233
297
|
if (!i)
|
|
234
|
-
for (const [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
298
|
+
for (const [h, v] of e.entries())
|
|
299
|
+
h !== t && c.add(a.valueToIndex(v));
|
|
300
|
+
const d = k(a.valueToIndex(o), s, l);
|
|
301
|
+
if (!c.has(d))
|
|
302
|
+
return a.indexToValue(d);
|
|
303
|
+
let u = null, g = 1 / 0;
|
|
304
|
+
const f = Math.min(Math.max(d - s, l - d), c.size + 1);
|
|
305
|
+
for (let h = 1; h <= f; h++) {
|
|
306
|
+
const v = d - h;
|
|
307
|
+
if (v >= s && !c.has(v)) {
|
|
308
|
+
const m = a.indexToValue(v), b = Math.abs(m - o);
|
|
309
|
+
u = v, g = b;
|
|
310
|
+
}
|
|
311
|
+
const _ = d + h;
|
|
312
|
+
if (_ <= l && !c.has(_)) {
|
|
313
|
+
const m = a.indexToValue(_), b = Math.abs(m - o);
|
|
314
|
+
(u == null || b < g) && (u = _, g = b);
|
|
315
|
+
}
|
|
316
|
+
if (u != null)
|
|
317
|
+
return a.indexToValue(u);
|
|
318
|
+
}
|
|
319
|
+
return u == null ? r : a.indexToValue(u);
|
|
320
|
+
}
|
|
321
|
+
function _e(a, e, t, n = 1) {
|
|
322
|
+
const i = q(n);
|
|
323
|
+
let r = e, o = !1;
|
|
324
|
+
for (let s = 0; s < i; s++) {
|
|
325
|
+
const l = ye(a, r, t);
|
|
326
|
+
if (o ||= l.changed, r = l.entries, !l.changed)
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
return { changed: o, entries: r };
|
|
330
|
+
}
|
|
331
|
+
function xe(a, e, t, n, i = 1) {
|
|
332
|
+
const r = q(i);
|
|
333
|
+
if (r === 1)
|
|
334
|
+
return A(a, e, t, n);
|
|
335
|
+
const o = new Map(e);
|
|
336
|
+
let s = o.get(t);
|
|
337
|
+
for (let l = 0; l < r; l++) {
|
|
338
|
+
const c = A(a, o, t, n);
|
|
339
|
+
if (c === s)
|
|
340
|
+
break;
|
|
341
|
+
s = c, o.set(t, s);
|
|
342
|
+
}
|
|
343
|
+
return s;
|
|
344
|
+
}
|
|
345
|
+
function q(a) {
|
|
346
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
347
|
+
return Math.max(1, e);
|
|
348
|
+
}
|
|
349
|
+
function ye(a, e, t) {
|
|
350
|
+
const n = /* @__PURE__ */ new Map(), i = t > 0 ? De : G, r = Array.from(e).sort((l, c) => i(l[1], c[1]));
|
|
351
|
+
let o = !1, s = !0;
|
|
352
|
+
for (const [l, c] of r)
|
|
353
|
+
if (n.set(l, c), s) {
|
|
354
|
+
const d = A(a, n, l, t);
|
|
355
|
+
c === d && (s = !1), o ||= s, n.set(l, d);
|
|
252
356
|
}
|
|
253
|
-
return { changed:
|
|
357
|
+
return { changed: o, entries: n };
|
|
254
358
|
}
|
|
255
|
-
function
|
|
256
|
-
const { allowValuesOverlap: i, stepsProvider: r, resolution:
|
|
257
|
-
if (
|
|
258
|
-
let
|
|
359
|
+
function A(a, e, t, n) {
|
|
360
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
361
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
362
|
+
let m = k(c + n * o, s, l);
|
|
259
363
|
if (i)
|
|
260
|
-
return
|
|
261
|
-
const
|
|
262
|
-
for (const [
|
|
263
|
-
|
|
264
|
-
for (;
|
|
265
|
-
|
|
266
|
-
return
|
|
267
|
-
}
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
return
|
|
364
|
+
return m;
|
|
365
|
+
const b = /* @__PURE__ */ new Set();
|
|
366
|
+
for (const [$, M] of e)
|
|
367
|
+
$ !== t && b.add(M);
|
|
368
|
+
for (; b.has(m) && m <= l && m >= s; )
|
|
369
|
+
m = k(m + n * o, s, l);
|
|
370
|
+
return b.has(m) || m > l || m < s ? c : m;
|
|
371
|
+
}
|
|
372
|
+
const d = r.valueToIndex(c);
|
|
373
|
+
if (d === -1)
|
|
374
|
+
return c;
|
|
271
375
|
if (i) {
|
|
272
|
-
const
|
|
273
|
-
return r.indexToValue(
|
|
274
|
-
}
|
|
275
|
-
const
|
|
276
|
-
for (const [
|
|
277
|
-
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
let
|
|
281
|
-
for (;
|
|
282
|
-
if (!
|
|
283
|
-
|
|
376
|
+
const m = k(d + n, r.minIndex, r.maxIndex);
|
|
377
|
+
return r.indexToValue(m);
|
|
378
|
+
}
|
|
379
|
+
const u = /* @__PURE__ */ new Set();
|
|
380
|
+
for (const [m, b] of e)
|
|
381
|
+
m !== t && u.add(r.valueToIndex(b));
|
|
382
|
+
let g = d, f = !1;
|
|
383
|
+
const h = r.minIndex, v = r.maxIndex;
|
|
384
|
+
let _ = 0;
|
|
385
|
+
for (; _ < Math.abs(v - h) && (g += n, !(g < h || g > v)); ) {
|
|
386
|
+
if (!u.has(g)) {
|
|
387
|
+
f = !0;
|
|
284
388
|
break;
|
|
285
389
|
}
|
|
286
|
-
|
|
390
|
+
_++;
|
|
287
391
|
}
|
|
288
|
-
return
|
|
392
|
+
return f ? r.indexToValue(g) : c;
|
|
289
393
|
}
|
|
290
|
-
function
|
|
291
|
-
const { allowValuesOverlap: i, stepsProvider: r, resolution:
|
|
292
|
-
if (
|
|
293
|
-
const
|
|
294
|
-
Array.from(e).filter(([
|
|
394
|
+
function we(a, e, t, n) {
|
|
395
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
396
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
397
|
+
const f = new Set(
|
|
398
|
+
Array.from(e).filter(([v]) => v !== t).map(([, v]) => v)
|
|
295
399
|
);
|
|
296
|
-
let
|
|
400
|
+
let h = n > 0 ? l : s;
|
|
297
401
|
if (i)
|
|
298
|
-
return
|
|
299
|
-
for (;
|
|
300
|
-
if (
|
|
301
|
-
|
|
402
|
+
return h;
|
|
403
|
+
for (; f.has(h); )
|
|
404
|
+
if (h -= n * o, n > 0 && h > l || n < 0 && h < s) {
|
|
405
|
+
h = c;
|
|
302
406
|
break;
|
|
303
407
|
}
|
|
304
|
-
return
|
|
408
|
+
return h;
|
|
305
409
|
}
|
|
306
410
|
if (i)
|
|
307
|
-
return
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
310
|
-
return
|
|
311
|
-
const
|
|
312
|
-
Array.from(e).filter(([
|
|
411
|
+
return n > 0 ? r.indexToValue(r.maxIndex) : r.indexToValue(r.minIndex);
|
|
412
|
+
const d = r.valueToIndex(c);
|
|
413
|
+
if (d === -1)
|
|
414
|
+
return c;
|
|
415
|
+
const u = new Set(
|
|
416
|
+
Array.from(e).filter(([f]) => f !== t).map(([, f]) => r.valueToIndex(f))
|
|
313
417
|
);
|
|
314
|
-
let
|
|
315
|
-
for (;
|
|
316
|
-
if (
|
|
317
|
-
|
|
418
|
+
let g = n > 0 ? r.maxIndex : r.minIndex;
|
|
419
|
+
for (; u.has(g); )
|
|
420
|
+
if (g -= n, n > 0 && g > l || n < 0 && g < s) {
|
|
421
|
+
g = d;
|
|
318
422
|
break;
|
|
319
423
|
}
|
|
320
|
-
return r.indexToValue(
|
|
424
|
+
return r.indexToValue(g);
|
|
321
425
|
}
|
|
322
|
-
function
|
|
323
|
-
const { stepsProvider:
|
|
324
|
-
if (
|
|
325
|
-
let
|
|
426
|
+
function ke(a, e, t) {
|
|
427
|
+
const { stepsProvider: n, min: i, max: r } = a, o = /* @__PURE__ */ new Map(), s = Array.from(e).sort((c, d) => G(c[1], d[1]));
|
|
428
|
+
if (n) {
|
|
429
|
+
let c = 0;
|
|
326
430
|
if (t > 0) {
|
|
327
|
-
const
|
|
328
|
-
|
|
431
|
+
const d = s[s.length - 1], u = n.valueToIndex(d[1]);
|
|
432
|
+
c = n.maxIndex - u;
|
|
329
433
|
} else {
|
|
330
|
-
const
|
|
331
|
-
|
|
434
|
+
const d = s[0], u = n.valueToIndex(d[1]);
|
|
435
|
+
c = n.minIndex - u;
|
|
332
436
|
}
|
|
333
|
-
if (
|
|
334
|
-
for (const [
|
|
335
|
-
|
|
336
|
-
for (const [
|
|
337
|
-
const
|
|
338
|
-
|
|
437
|
+
if (c === 0)
|
|
438
|
+
for (const [d, u] of s)
|
|
439
|
+
o.set(d, u);
|
|
440
|
+
for (const [d, u] of s) {
|
|
441
|
+
const g = n.indexToValue(n.valueToIndex(u) + c);
|
|
442
|
+
o.set(d, g);
|
|
339
443
|
}
|
|
340
|
-
return
|
|
444
|
+
return o;
|
|
341
445
|
}
|
|
342
|
-
let
|
|
446
|
+
let l = 0;
|
|
343
447
|
if (t > 0) {
|
|
344
|
-
const
|
|
345
|
-
|
|
448
|
+
const c = s[s.length - 1];
|
|
449
|
+
l = r - c[1];
|
|
346
450
|
} else {
|
|
347
|
-
const
|
|
348
|
-
|
|
451
|
+
const c = s[0];
|
|
452
|
+
l = i - c[1];
|
|
349
453
|
}
|
|
350
|
-
for (const [
|
|
351
|
-
|
|
352
|
-
return
|
|
454
|
+
for (const [c, d] of s)
|
|
455
|
+
o.set(c, d + l);
|
|
456
|
+
return o;
|
|
353
457
|
}
|
|
354
|
-
function
|
|
355
|
-
return
|
|
458
|
+
function G(a, e) {
|
|
459
|
+
return a - e;
|
|
356
460
|
}
|
|
357
|
-
function
|
|
358
|
-
return e -
|
|
461
|
+
function De(a, e) {
|
|
462
|
+
return e - a;
|
|
359
463
|
}
|
|
360
|
-
function
|
|
361
|
-
return Math.max(e, Math.min(t,
|
|
464
|
+
function k(a, e, t) {
|
|
465
|
+
return Math.max(e, Math.min(t, a));
|
|
362
466
|
}
|
|
363
|
-
const
|
|
364
|
-
class
|
|
467
|
+
const Ie = Q(w);
|
|
468
|
+
class Ee extends Y {
|
|
365
469
|
constructor() {
|
|
366
|
-
super(...arguments), this._popoverElement =
|
|
470
|
+
super(...arguments), this._stepsProvider = null, this._popoverElement = H(), this._trackElement = H(), this.messages = ae({}), this._onPointerMoveDragUpdate = (e) => {
|
|
367
471
|
this._updateDrag(this._mapEventToRange(e));
|
|
368
472
|
}, this._onPointerUpDragEnd = (e) => {
|
|
369
|
-
|
|
473
|
+
S(e) && this._endDrag();
|
|
370
474
|
}, this._onPointerCancelDragEnd = () => {
|
|
371
475
|
this._endDrag();
|
|
372
|
-
}, this._formatLabel = (e, t,
|
|
373
|
-
const i =
|
|
476
|
+
}, this._formatLabel = (e, t, n) => {
|
|
477
|
+
const i = re(this.messages._lang, t), r = this.labelFormatter;
|
|
374
478
|
if (!r)
|
|
375
|
-
return i.format(
|
|
376
|
-
const
|
|
377
|
-
return
|
|
479
|
+
return i.format(n);
|
|
480
|
+
const o = r(n, e, (s) => i.format(s));
|
|
481
|
+
return o ?? i.format(n);
|
|
378
482
|
}, 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(() => {
|
|
379
483
|
this._layoutLabelInputs();
|
|
380
|
-
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._sliderData =
|
|
484
|
+
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._activePart = null, this._sliderData = Ie(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.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, 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 = P({ cancelable: !1 }), this.arcgisChange = P({ cancelable: !1 }), this.arcgisInput = P({ cancelable: !1 }), this.arcgisRangeChange = P({ cancelable: !1 });
|
|
381
485
|
}
|
|
382
486
|
static {
|
|
383
487
|
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, popoverLabel: 1, popoverPlacement: 3, precision: 11, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
|
|
384
488
|
fromAttribute(e) {
|
|
385
489
|
if (e.includes(","))
|
|
386
|
-
return e.split(",").filter((
|
|
490
|
+
return e.split(",").filter((n) => n.trim() !== "").map(parseFloat).filter((n) => Number.isFinite(n));
|
|
387
491
|
const t = parseFloat(e);
|
|
388
492
|
return Number.isFinite(t) ? t : void 0;
|
|
389
493
|
}
|
|
390
|
-
} }], valueLabelsDisplay: 3, valueLabelsPlacement: 3, valueLabelsEditingEnabled: 5, values: [1, { converter: {
|
|
494
|
+
} }], valueLabelsDisplay: 3, valueLabelsPlacement: 3, valueLabelsEditingEnabled: 5, keyboardLargeStep: 9, values: [1, { converter: {
|
|
391
495
|
fromAttribute(e) {
|
|
392
496
|
return e.includes(",") ? e.split(",").filter((t) => t.trim() !== "").map(parseFloat).filter((t) => Number.isFinite(t)) : [parseFloat(e)].filter((t) => Number.isFinite(t));
|
|
393
497
|
}
|
|
394
498
|
} }], messageOverrides: 0 };
|
|
395
499
|
}
|
|
396
500
|
static {
|
|
397
|
-
this.styles =
|
|
501
|
+
this.styles = ue;
|
|
398
502
|
}
|
|
399
503
|
static {
|
|
400
504
|
this.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
|
|
@@ -419,8 +523,8 @@ class pe extends j {
|
|
|
419
523
|
return this.disabled || this.values.length === 0 || this._invalid;
|
|
420
524
|
}
|
|
421
525
|
get _invalid() {
|
|
422
|
-
const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min,
|
|
423
|
-
return this.min >= this.max || !e || !t || !
|
|
526
|
+
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;
|
|
527
|
+
return this.min >= this.max || !e || !t || !n;
|
|
424
528
|
}
|
|
425
529
|
get resolution() {
|
|
426
530
|
const e = (this._sliderData.max - this._sliderData.min) / this._trackWidthOrHeight;
|
|
@@ -437,7 +541,7 @@ class pe extends j {
|
|
|
437
541
|
this._sliderData.startup();
|
|
438
542
|
}
|
|
439
543
|
willUpdate(e) {
|
|
440
|
-
if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider =
|
|
544
|
+
if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider = ve(this)), e.has("messages") || e.has("min") || e.has("max") || e.has("precision") || e.has("labelFormatter")) {
|
|
441
545
|
const t = this.max != null && this.min != null && this.max - this.min > 10 ? 2 : this.precision;
|
|
442
546
|
this._numberFormatOptions = { maximumFractionDigits: t }, this._minFormatter = this._createFormatter("min", this._numberFormatOptions), this._maxFormatter = this._createFormatter("max", this._numberFormatOptions), this._valueFormatter = this._createFormatter("value", this._numberFormatOptions);
|
|
443
547
|
}
|
|
@@ -466,20 +570,20 @@ class pe extends j {
|
|
|
466
570
|
if (this._labelInputsUpdateComplete = t, await t, t !== this._labelInputsUpdateComplete)
|
|
467
571
|
return;
|
|
468
572
|
this._labelInputsUpdateComplete = null;
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
573
|
+
const n = this._trackElement.value;
|
|
574
|
+
if (!n)
|
|
471
575
|
return;
|
|
472
|
-
const i =
|
|
576
|
+
const i = n.getBoundingClientRect();
|
|
473
577
|
for (const r of this._sliderData.entries.keys()) {
|
|
474
|
-
const
|
|
475
|
-
if (this.valueLabelsDisplay === "always" ||
|
|
476
|
-
const
|
|
477
|
-
if (!
|
|
578
|
+
const o = this._activePart === "range" || this._activePart === r;
|
|
579
|
+
if (this.valueLabelsDisplay === "always" || o) {
|
|
580
|
+
const l = Me(this, r), c = j(this, r);
|
|
581
|
+
if (!l || !c)
|
|
478
582
|
continue;
|
|
479
|
-
const
|
|
480
|
-
let
|
|
481
|
-
const
|
|
482
|
-
|
|
583
|
+
const d = l.getBoundingClientRect(), u = c.getBoundingClientRect(), g = c.getLabelBoundingClientRect(), f = d.width / 2, h = Math.round(d.left + f), v = Math.round(g.width / 2);
|
|
584
|
+
let _ = u.width / 2;
|
|
585
|
+
const m = i.left - f, b = i.right + f, $ = h - v, M = h + v;
|
|
586
|
+
$ < m ? _ += $ - m : M > b && (_ += M - b), c.style.transform = `translateX(${-Math.round(_)}px)`;
|
|
483
587
|
}
|
|
484
588
|
}
|
|
485
589
|
}
|
|
@@ -490,10 +594,10 @@ class pe extends j {
|
|
|
490
594
|
this._setActivePart(null);
|
|
491
595
|
}
|
|
492
596
|
_onTrackRangePointerDown(e) {
|
|
493
|
-
this._disabledOrInvalid || !
|
|
597
|
+
this._disabledOrInvalid || !S(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
|
|
494
598
|
}
|
|
495
599
|
async _onPointerDown(e) {
|
|
496
|
-
if (this._disabledOrInvalid || !
|
|
600
|
+
if (this._disabledOrInvalid || !S(e))
|
|
497
601
|
return;
|
|
498
602
|
const t = this.renderRoot.querySelector("arcgis-label-input[editing]");
|
|
499
603
|
if (e.target === t)
|
|
@@ -502,19 +606,19 @@ class pe extends j {
|
|
|
502
606
|
t.blur(), this._focusEntry(V(t));
|
|
503
607
|
return;
|
|
504
608
|
}
|
|
505
|
-
if (
|
|
609
|
+
if (Ve(e.target) || this.values?.length > 1)
|
|
506
610
|
return;
|
|
507
|
-
const
|
|
611
|
+
const n = this._mapEventToRange(e), [i, r] = this._sliderData.entries.entries().next().value, o = n * this._fullRange + this._fullMin - r, s = z(this._fullMin, this._fullMax, r) / 100;
|
|
508
612
|
this._startDrag(i, s);
|
|
509
|
-
const
|
|
510
|
-
this._setValue(i,
|
|
613
|
+
const l = U(this._stepsProvider, this._sliderData.entries, i, o, this.allowValuesOverlap);
|
|
614
|
+
this._setValue(i, l), this._focusEntry(i);
|
|
511
615
|
}
|
|
512
616
|
_onThumbPointerDown(e) {
|
|
513
617
|
const t = V(e.currentTarget);
|
|
514
|
-
if (!
|
|
618
|
+
if (!S(e) || this._disabledOrInvalid || !t)
|
|
515
619
|
return;
|
|
516
|
-
const
|
|
517
|
-
e.target ===
|
|
620
|
+
const n = j(this, t);
|
|
621
|
+
e.target === n && n?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
|
|
518
622
|
}
|
|
519
623
|
_endDrag() {
|
|
520
624
|
if (this._disabledOrInvalid)
|
|
@@ -523,8 +627,8 @@ class pe extends j {
|
|
|
523
627
|
let e = !1;
|
|
524
628
|
if (this._dragInfo) {
|
|
525
629
|
const { entries: t } = this._dragInfo;
|
|
526
|
-
for (const [
|
|
527
|
-
if (this._sliderData.getValue(
|
|
630
|
+
for (const [n, i] of t)
|
|
631
|
+
if (this._sliderData.getValue(n) !== i) {
|
|
528
632
|
e = !0;
|
|
529
633
|
break;
|
|
530
634
|
}
|
|
@@ -534,38 +638,38 @@ class pe extends j {
|
|
|
534
638
|
_startDrag(e, t) {
|
|
535
639
|
if (this._disabledOrInvalid)
|
|
536
640
|
return;
|
|
537
|
-
const { min:
|
|
538
|
-
let
|
|
641
|
+
const { min: n, max: i, values: r } = this;
|
|
642
|
+
let o = n, s = i;
|
|
539
643
|
if (this._setActivePart(e), e === "range") {
|
|
540
644
|
if (this.segmentsDraggingDisabled)
|
|
541
645
|
return;
|
|
542
|
-
|
|
646
|
+
o = n - r[0], s = i - r[r.length - 1];
|
|
543
647
|
}
|
|
544
648
|
this._dragInfo = {
|
|
545
649
|
position: t,
|
|
546
650
|
entries: new Map(this._sliderData.entries.entries()),
|
|
547
|
-
minDiff:
|
|
651
|
+
minDiff: o,
|
|
548
652
|
maxDiff: s
|
|
549
653
|
}, this._addDragListeners();
|
|
550
654
|
}
|
|
551
655
|
_updateDrag(e) {
|
|
552
656
|
if (!this._dragInfo || !this._activePart)
|
|
553
657
|
return;
|
|
554
|
-
const { _activePart: t, _dragInfo: { position:
|
|
555
|
-
if (
|
|
658
|
+
const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff: r, maxDiff: o } } = this;
|
|
659
|
+
if (n === e)
|
|
556
660
|
return;
|
|
557
|
-
let s = (e -
|
|
661
|
+
let s = (e - n) * this._fullRange;
|
|
558
662
|
if (t === "range") {
|
|
559
|
-
s = Math.min(
|
|
560
|
-
const
|
|
561
|
-
this._setValues(
|
|
663
|
+
s = Math.min(o, Math.max(r, s));
|
|
664
|
+
const l = be(this._stepsProvider, i, s);
|
|
665
|
+
this._setValues(l);
|
|
562
666
|
} else {
|
|
563
|
-
const
|
|
564
|
-
this._setValue(t,
|
|
667
|
+
const l = U(this._stepsProvider, i, t, s, this.allowValuesOverlap);
|
|
668
|
+
this._setValue(t, l);
|
|
565
669
|
}
|
|
566
670
|
}
|
|
567
671
|
_focusEntry(e) {
|
|
568
|
-
e &&
|
|
672
|
+
e && $e(this, e)?.focus();
|
|
569
673
|
}
|
|
570
674
|
_addDragListeners() {
|
|
571
675
|
document.addEventListener("pointerup", this._onPointerUpDragEnd), document.addEventListener("pointermove", this._onPointerMoveDragUpdate), document.addEventListener("pointercancel", this._onPointerCancelDragEnd);
|
|
@@ -587,262 +691,226 @@ class pe extends j {
|
|
|
587
691
|
this._setActivePart(null);
|
|
588
692
|
}
|
|
589
693
|
_onRangeInputChange(e) {
|
|
590
|
-
const t = e.currentTarget,
|
|
694
|
+
const t = e.currentTarget, n = t.value, i = t.dataset.type;
|
|
591
695
|
let r = !1;
|
|
592
696
|
switch (e.stopPropagation(), i) {
|
|
593
697
|
case "min": {
|
|
594
|
-
|
|
698
|
+
n < this.max ? (this.min = n, r = !0) : t.value = this.min;
|
|
595
699
|
break;
|
|
596
700
|
}
|
|
597
701
|
case "max": {
|
|
598
|
-
|
|
702
|
+
n > this.min ? (this.max = n, r = !0) : t.value = this.max;
|
|
599
703
|
break;
|
|
600
704
|
}
|
|
601
705
|
}
|
|
602
706
|
r && this.arcgisRangeChange.emit();
|
|
603
707
|
}
|
|
604
708
|
_onValueInputChange(e) {
|
|
605
|
-
const t = e.currentTarget,
|
|
606
|
-
|
|
709
|
+
const t = e.currentTarget, n = V(t), i = t.value;
|
|
710
|
+
n && (e.stopPropagation(), this._setValue(n, i), t.value = this._sliderData.getValue(n));
|
|
607
711
|
}
|
|
608
712
|
_mapEventToRange(e) {
|
|
609
713
|
const t = this._trackElement.value?.getBoundingClientRect();
|
|
610
714
|
if (!t)
|
|
611
715
|
return 0;
|
|
612
|
-
const
|
|
613
|
-
return this.mirrored ? 1 -
|
|
716
|
+
const n = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
|
|
717
|
+
return this.mirrored ? 1 - n : n;
|
|
614
718
|
}
|
|
615
719
|
_getPositionStyleForElement(e) {
|
|
616
|
-
const t =
|
|
720
|
+
const t = z(this._fullMin, this._fullMax, e);
|
|
617
721
|
return {
|
|
618
722
|
[this.isHorizontal ? this.mirrored ? "right" : "left" : this.mirrored ? "top" : "bottom"]: `${t}%`
|
|
619
723
|
};
|
|
620
724
|
}
|
|
621
725
|
_popoverSlotChange(e) {
|
|
622
|
-
this._hasPopoverContent =
|
|
726
|
+
this._hasPopoverContent = L(e);
|
|
623
727
|
}
|
|
624
728
|
_onContentStartSlotChange(e) {
|
|
625
|
-
this._hasContentStart =
|
|
729
|
+
this._hasContentStart = L(e);
|
|
626
730
|
}
|
|
627
731
|
_onContentEndSlotChange(e) {
|
|
628
|
-
this._hasContentEnd =
|
|
732
|
+
this._hasContentEnd = L(e);
|
|
629
733
|
}
|
|
630
734
|
_onThumbKeyDown(e) {
|
|
631
735
|
const t = V(e.currentTarget);
|
|
632
736
|
if (!t)
|
|
633
737
|
return;
|
|
634
|
-
const
|
|
635
|
-
if (!
|
|
738
|
+
const n = e.currentTarget.querySelector("arcgis-label-input");
|
|
739
|
+
if (!n || n.editing)
|
|
740
|
+
return;
|
|
741
|
+
if (e.key === p.confirmEdit) {
|
|
742
|
+
n.edit();
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const i = K(e, this.keyboardLargeStep, this.mirrored);
|
|
746
|
+
if (i) {
|
|
747
|
+
e.preventDefault();
|
|
748
|
+
const r = xe(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
|
|
749
|
+
this._setValue(t, r);
|
|
636
750
|
return;
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
// Shortcuts taken from:
|
|
644
|
-
// https://w3c.github.io/aria-practices/#slider_kbd_interaction
|
|
645
|
-
// --
|
|
646
|
-
// Move target anchor in increments of 1 pixel or 1 step
|
|
647
|
-
case "ArrowUp":
|
|
648
|
-
case "ArrowDown":
|
|
649
|
-
case "ArrowLeft":
|
|
650
|
-
case "ArrowRight": {
|
|
651
|
-
e.preventDefault();
|
|
652
|
-
let r = i === "ArrowUp" || i === "ArrowRight" ? 1 : -1;
|
|
653
|
-
r = this.mirrored ? r * -1 : r;
|
|
654
|
-
const l = N({
|
|
655
|
-
allowValuesOverlap: this.allowValuesOverlap,
|
|
656
|
-
stepsProvider: this._stepsProvider,
|
|
657
|
-
resolution: this.resolution,
|
|
658
|
-
min: this.min,
|
|
659
|
-
max: this.max
|
|
660
|
-
}, this._sliderData.entries, t, r);
|
|
661
|
-
this._setValue(t, l);
|
|
662
|
-
break;
|
|
663
|
-
}
|
|
664
|
-
case "End":
|
|
665
|
-
case "Home": {
|
|
666
|
-
e.preventDefault();
|
|
667
|
-
const l = this.isHorizontal && this.mirrored || this.layout === "vertical" ? i === "End" ? -1 : 1 : i === "Home" ? -1 : 1, s = ue({
|
|
668
|
-
allowValuesOverlap: this.allowValuesOverlap,
|
|
669
|
-
stepsProvider: this._stepsProvider,
|
|
670
|
-
resolution: this.resolution,
|
|
671
|
-
min: this.min,
|
|
672
|
-
max: this.max
|
|
673
|
-
}, this._sliderData.entries, t, l);
|
|
674
|
-
this._setValue(t, s);
|
|
675
|
-
break;
|
|
676
|
-
}
|
|
751
|
+
}
|
|
752
|
+
if (N(e.key)) {
|
|
753
|
+
e.preventDefault();
|
|
754
|
+
const r = we(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
|
|
755
|
+
this._setValue(t, r);
|
|
677
756
|
}
|
|
678
757
|
}
|
|
679
758
|
_onTrackRangeKeyDown(e) {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
case "ArrowLeft":
|
|
689
|
-
case "ArrowRight": {
|
|
690
|
-
e.preventDefault();
|
|
691
|
-
let a = t === "ArrowUp" || t === "ArrowRight" ? 1 : -1;
|
|
692
|
-
a = this.mirrored ? a * -1 : a;
|
|
693
|
-
const { entries: i } = he({
|
|
694
|
-
allowValuesOverlap: this.allowValuesOverlap,
|
|
695
|
-
stepsProvider: this._stepsProvider,
|
|
696
|
-
resolution: this.resolution,
|
|
697
|
-
min: this.min,
|
|
698
|
-
max: this.max
|
|
699
|
-
}, this._sliderData.entries, a);
|
|
700
|
-
this._setValues(i);
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
case "End":
|
|
704
|
-
case "Home": {
|
|
705
|
-
e.preventDefault();
|
|
706
|
-
const i = this.isHorizontal && this.mirrored || this.layout === "vertical" ? t === "End" ? -1 : 1 : t === "Home" ? -1 : 1, r = ge({
|
|
707
|
-
allowValuesOverlap: this.allowValuesOverlap,
|
|
708
|
-
stepsProvider: this._stepsProvider,
|
|
709
|
-
resolution: this.resolution,
|
|
710
|
-
min: this.min,
|
|
711
|
-
max: this.max
|
|
712
|
-
}, this._sliderData.entries, i);
|
|
713
|
-
this._setValues(r);
|
|
714
|
-
break;
|
|
715
|
-
}
|
|
759
|
+
if (this._disabledOrInvalid)
|
|
760
|
+
return;
|
|
761
|
+
const t = K(e, this.keyboardLargeStep, this.mirrored);
|
|
762
|
+
if (t) {
|
|
763
|
+
e.preventDefault();
|
|
764
|
+
const { entries: n } = _e(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
|
|
765
|
+
this._setValues(n);
|
|
766
|
+
return;
|
|
716
767
|
}
|
|
768
|
+
if (N(e.key)) {
|
|
769
|
+
e.preventDefault();
|
|
770
|
+
const n = ke(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
|
|
771
|
+
this._setValues(n);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
_getStepsConfiguration() {
|
|
775
|
+
return {
|
|
776
|
+
allowValuesOverlap: this.allowValuesOverlap,
|
|
777
|
+
stepsProvider: this._stepsProvider,
|
|
778
|
+
resolution: this.resolution,
|
|
779
|
+
min: this.min,
|
|
780
|
+
max: this.max
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
_getDirectionForHomeEndKey(e) {
|
|
784
|
+
return this.isHorizontal && this.mirrored || this.layout === "vertical" ? e === p.jumpToEnd ? -1 : 1 : e === p.jumpToStart ? -1 : 1;
|
|
717
785
|
}
|
|
718
786
|
_setActivePart(e) {
|
|
719
787
|
this._activePart !== e && (this._activePart = e, this.arcgisActiveValueChange.emit());
|
|
720
788
|
}
|
|
721
789
|
render() {
|
|
722
|
-
return
|
|
790
|
+
return y`<div class=${C({
|
|
723
791
|
content: !0,
|
|
724
792
|
disabled: this._disabledOrInvalid
|
|
725
793
|
})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`;
|
|
726
794
|
}
|
|
727
795
|
_renderPopover() {
|
|
728
|
-
const { _activePart: e, layout: t, popoverPlacement:
|
|
729
|
-
let
|
|
730
|
-
return r !== "hidden" &&
|
|
796
|
+
const { _activePart: e, layout: t, popoverPlacement: n, valueLabelsPlacement: i, valueLabelsDisplay: r, popoverLabel: o } = this, s = e ? Te(e) ? e : "track-range" : "", l = this._hasPopoverContent && !!s, c = t === "horizontal" ? n === "start" ? "top" : "bottom" : n === "start" ? "left" : "right";
|
|
797
|
+
let d = 14;
|
|
798
|
+
return r !== "hidden" && n === i && (d += 24), y`<calcite-popover flip-disabled focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${R(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
|
|
731
799
|
}
|
|
732
800
|
_renderContentStart() {
|
|
733
|
-
return
|
|
801
|
+
return y`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
|
|
734
802
|
}
|
|
735
803
|
_renderContentEnd() {
|
|
736
|
-
return
|
|
804
|
+
return y`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`;
|
|
737
805
|
}
|
|
738
806
|
_renderTrackRange() {
|
|
739
|
-
return
|
|
807
|
+
return y`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`;
|
|
740
808
|
}
|
|
741
809
|
_renderTrack() {
|
|
742
|
-
return
|
|
810
|
+
return y`<div class="track" ${R(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
|
|
743
811
|
}
|
|
744
812
|
_renderTrackBackground() {
|
|
745
|
-
const { max: e, min: t, fillPlacement:
|
|
746
|
-
let
|
|
747
|
-
const
|
|
748
|
-
return this._invalid ?
|
|
749
|
-
this.mirrored ? "track-effective-
|
|
750
|
-
!r &&
|
|
751
|
-
])),
|
|
752
|
-
this.mirrored ? "track-effective-
|
|
753
|
-
!r &&
|
|
754
|
-
])), s = e),
|
|
813
|
+
const { max: e, min: t, fillPlacement: n, values: i } = this, r = i.length > 1;
|
|
814
|
+
let o = this._fullMin, s = this._fullMax;
|
|
815
|
+
const l = [];
|
|
816
|
+
return this._invalid ? y`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (o < t && (l.push(this._renderSegment(o, t, [
|
|
817
|
+
this.mirrored ? "track-effective-end" : "track-effective-start",
|
|
818
|
+
!r && n === "start" ? "track-fill" : null
|
|
819
|
+
])), o = t), s > e && (l.push(this._renderSegment(e, s, [
|
|
820
|
+
this.mirrored ? "track-effective-start" : "track-effective-end",
|
|
821
|
+
!r && n === "end" ? "track-fill" : null
|
|
822
|
+
])), s = e), l.push(this._renderSegment(o, s, ["track-bounds"])), l);
|
|
755
823
|
}
|
|
756
824
|
_renderFillSegment() {
|
|
757
|
-
const { values: e, fillPlacement: t, min:
|
|
825
|
+
const { values: e, fillPlacement: t, min: n, max: i } = this;
|
|
758
826
|
if (!e?.length || this._invalid)
|
|
759
827
|
return;
|
|
760
|
-
const r = [...e].sort((s,
|
|
828
|
+
const r = [...e].sort((s, l) => s - l);
|
|
761
829
|
if (r.length === 1)
|
|
762
830
|
switch (t) {
|
|
763
831
|
case "start":
|
|
764
|
-
if (
|
|
765
|
-
return this._renderSegment(
|
|
832
|
+
if (n < r[0])
|
|
833
|
+
return this._renderSegment(n, r[0], ["track-range"]);
|
|
766
834
|
break;
|
|
767
835
|
case "end":
|
|
768
836
|
if (i > r[0])
|
|
769
837
|
return this._renderSegment(r[0], i, ["track-range"]);
|
|
770
838
|
break;
|
|
771
839
|
}
|
|
772
|
-
const
|
|
773
|
-
return this._renderSegment(r[0], r[r.length - 1], ["track-range",
|
|
840
|
+
const o = this.segmentsDraggingDisabled;
|
|
841
|
+
return this._renderSegment(r[0], r[r.length - 1], ["track-range", o ? null : "interactive", this._activePart === "range" ? "active" : null], {
|
|
774
842
|
id: "track-range",
|
|
775
|
-
onFocus:
|
|
776
|
-
onBlur:
|
|
777
|
-
onPointerDown:
|
|
778
|
-
onKeyDown:
|
|
843
|
+
onFocus: o ? void 0 : this._onTrackFocus,
|
|
844
|
+
onBlur: o ? void 0 : this._onTrackBlur,
|
|
845
|
+
onPointerDown: o ? void 0 : this._onTrackRangePointerDown,
|
|
846
|
+
onKeyDown: o ? void 0 : this._onTrackRangeKeyDown
|
|
779
847
|
});
|
|
780
848
|
}
|
|
781
|
-
_renderSegment(e, t,
|
|
782
|
-
const { _fullMin: r, _fullMax:
|
|
783
|
-
|
|
784
|
-
100 -
|
|
849
|
+
_renderSegment(e, t, n, i) {
|
|
850
|
+
const { _fullMin: r, _fullMax: o, mirrored: s } = this, l = [
|
|
851
|
+
z(r, o, X(e, r, o)),
|
|
852
|
+
100 - z(r, o, X(t, r, o))
|
|
785
853
|
];
|
|
786
|
-
s &&
|
|
787
|
-
const
|
|
788
|
-
left: `${
|
|
789
|
-
right: `${
|
|
854
|
+
s && l.reverse();
|
|
855
|
+
const c = this.isHorizontal ? {
|
|
856
|
+
left: `${l[0]}%`,
|
|
857
|
+
right: `${l[1]}%`
|
|
790
858
|
} : {
|
|
791
|
-
top: `${
|
|
792
|
-
bottom: `${
|
|
793
|
-
},
|
|
794
|
-
return
|
|
859
|
+
top: `${l[1]}%`,
|
|
860
|
+
bottom: `${l[0]}%`
|
|
861
|
+
}, d = Z("segment", ...n);
|
|
862
|
+
return y`<div id=${i?.id ?? E} class=${C(d)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
|
|
795
863
|
}
|
|
796
864
|
_renderThumbs() {
|
|
797
|
-
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([,
|
|
798
|
-
return
|
|
865
|
+
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, n]) => n >= this._fullMin && n <= this._fullMax);
|
|
866
|
+
return ne(t, ([n, i]) => this._renderThumb(n, i));
|
|
799
867
|
}
|
|
800
868
|
_renderThumb(e, t) {
|
|
801
|
-
const { valueLabelsDisplay:
|
|
802
|
-
return
|
|
869
|
+
const { valueLabelsDisplay: n } = this, i = this._disabledOrInvalid, r = this._activePart === e || this._activePart === "range", o = this._activePart === "range" || this._activePart === e, s = n === "always" || n === "auto" && o, l = this.isHorizontal, c = l ? "horizontal" : "vertical", d = `label-${e}`, u = l ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
|
|
870
|
+
return J(e, y`<div id=${e ?? E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(n ? d : void 0) ?? E} .ariaOrientation=${c} .ariaValueMin=${this._minFormatter(this.min)} .ariaValueMax=${this._maxFormatter(this.max)} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${C({
|
|
803
871
|
thumb: !0,
|
|
804
872
|
active: r
|
|
805
|
-
})} data-entry=${e ??
|
|
873
|
+
})} data-entry=${e ?? E} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${F({
|
|
806
874
|
...this._getPositionStyleForElement(t),
|
|
807
875
|
"z-index": this._activePart === e ? 1 : 0
|
|
808
|
-
})} .tabIndex=${i ? -1 : 0}><span class="handle"></span><arcgis-label-input .alignment=${
|
|
876
|
+
})} .tabIndex=${i ? -1 : 0}><span class="handle"></span><arcgis-label-input .alignment=${u} class="label" .hidden=${!s} id=${d ?? E} .labelFormatter=${this._valueFormatter} @focus=${i ? void 0 : this._onThumbFocus} @blur=${i ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${R(this._makeResizeRef())}></arcgis-label-input></div>`);
|
|
809
877
|
}
|
|
810
878
|
_renderRangeLabel(e) {
|
|
811
879
|
let t = "center";
|
|
812
|
-
return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "
|
|
880
|
+
return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")), y`<arcgis-label-input .alignment=${t} class=${C(e)} data-type=${e ?? E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
|
|
813
881
|
}
|
|
814
882
|
}
|
|
815
|
-
function
|
|
816
|
-
return "dataset" in
|
|
883
|
+
function Ve(a) {
|
|
884
|
+
return "dataset" in a && a.tagName === "ARCGIS-LABEL-INPUT" && (a.dataset.type === "min" || a.dataset.type === "max");
|
|
817
885
|
}
|
|
818
|
-
function V(
|
|
819
|
-
const e =
|
|
886
|
+
function V(a) {
|
|
887
|
+
const e = ee(a, "[data-entry]");
|
|
820
888
|
return e && "dataset" in e ? e.dataset.entry : null;
|
|
821
889
|
}
|
|
822
|
-
function
|
|
823
|
-
return typeof
|
|
890
|
+
function Te(a) {
|
|
891
|
+
return typeof a != null && a !== "range";
|
|
824
892
|
}
|
|
825
|
-
function
|
|
826
|
-
return e ?
|
|
893
|
+
function $e(a, e) {
|
|
894
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
|
|
827
895
|
}
|
|
828
|
-
function
|
|
829
|
-
return e ?
|
|
896
|
+
function Me(a, e) {
|
|
897
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
|
|
830
898
|
}
|
|
831
|
-
function
|
|
832
|
-
return e ?
|
|
899
|
+
function j(a, e) {
|
|
900
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
|
|
833
901
|
}
|
|
834
|
-
function
|
|
835
|
-
return
|
|
902
|
+
function S(a) {
|
|
903
|
+
return a.isPrimary && a.button === 0;
|
|
836
904
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
const
|
|
840
|
-
return Number.parseFloat(i.toFixed(
|
|
905
|
+
const Pe = 5;
|
|
906
|
+
function z(a, e, t) {
|
|
907
|
+
const n = e - a, i = (t - a) / n * 100;
|
|
908
|
+
return Number.parseFloat(i.toFixed(Pe));
|
|
841
909
|
}
|
|
842
|
-
function
|
|
843
|
-
return Math.max(e, Math.min(t,
|
|
910
|
+
function X(a, e, t) {
|
|
911
|
+
return Math.max(e, Math.min(t, a));
|
|
844
912
|
}
|
|
845
|
-
|
|
913
|
+
W("arcgis-slider", Ee);
|
|
846
914
|
export {
|
|
847
|
-
|
|
915
|
+
Ee as ArcgisSlider
|
|
848
916
|
};
|