@arcgis/map-components 5.2.0-next.31 → 5.2.0-next.33

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.
@@ -1,41 +1,41 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as he } from "../../chunks/runtime.js";
3
- import { watch as ge, when as ue, whenOnce as pe } from "@arcgis/core/core/reactiveUtils.js";
2
+ import { c as ge } from "../../chunks/runtime.js";
3
+ import { watch as ue, when as pe, whenOnce as fe } from "@arcgis/core/core/reactiveUtils.js";
4
4
  import * as me from "@arcgis/core/intl.js";
5
- import fe from "@arcgis/core/views/3d/environment/SunLighting.js";
5
+ import q from "@arcgis/core/views/3d/environment/SunLighting.js";
6
6
  import _e from "@arcgis/core/views/3d/environment/VirtualLighting.js";
7
- import { LitElement as be, createEvent as B, safeStyleMap as V, nothing as R } from "@arcgis/lumina";
8
- import { css as ve, html as m } from "lit";
9
- import { createRef as q, ref as G } from "lit/directives/ref.js";
7
+ import { LitElement as be, createEvent as G, safeStyleMap as Y, nothing as j } from "@arcgis/lumina";
8
+ import { css as ve, html as f } from "lit";
9
+ import { createRef as Z, ref as W } from "lit/directives/ref.js";
10
10
  import { u as we } from "../../chunks/useT9n.js";
11
11
  import { u as ye } from "../../chunks/useView.js";
12
- import { t as Y } from "../../chunks/earth-utils.js";
13
- import { m as N } from "../../chunks/handle.js";
14
- import { o as C, i as p, l as Z, b as D, d as W, g as xe } from "../../chunks/time-utils.js";
12
+ import { t as A } from "../../chunks/earth-utils.js";
13
+ import { m as J } from "../../chunks/handle.js";
14
+ import { o as H, i as u, l as I, b as D, d as K, g as xe } from "../../chunks/time-utils.js";
15
15
  import { r as Se, b as De, d as Te } from "../../chunks/async-utils.js";
16
- import { createTrackingTarget as ke, runTracked as K, signal as Pe } from "@arcgis/core/applications/Components/reactiveUtils.js";
17
- import { C as Q } from "../../chunks/component-wrapper.js";
16
+ import { createTrackingTarget as ke, runTracked as Q, signal as Ce } from "@arcgis/core/applications/Components/reactiveUtils.js";
17
+ import { C as X } from "../../chunks/component-wrapper.js";
18
18
  import { V as T } from "../../chunks/visible-element.js";
19
- function ne(r, e) {
19
+ function ae(r, e) {
20
20
  return (r % e + e) % e;
21
21
  }
22
- class Ce {
22
+ class Pe {
23
23
  #e;
24
- #i;
25
- #r = ke(() => {
24
+ #n;
25
+ #a = ke(() => {
26
26
  this.#t();
27
27
  });
28
28
  constructor(e) {
29
- this.#i = e;
29
+ this.#n = e;
30
30
  let t;
31
- K(this.#r, () => {
31
+ Q(this.#a, () => {
32
32
  t = e();
33
- }), this.#e = Pe(t);
33
+ }), this.#e = Ce(t);
34
34
  }
35
35
  #t() {
36
36
  const e = this.#e.value;
37
- K(this.#r, () => {
38
- this.#e.value = this.#i(e);
37
+ Q(this.#a, () => {
38
+ this.#e.value = this.#n(e);
39
39
  });
40
40
  }
41
41
  mutate(e) {
@@ -45,32 +45,32 @@ class Ce {
45
45
  return this.#e.value;
46
46
  }
47
47
  }
48
- function A(r) {
49
- return new Ce(r);
48
+ function N(r) {
49
+ return new Pe(r);
50
50
  }
51
- var L = Math.PI, u = Math.sin, k = Math.cos, $e = Math.asin, ze = Math.acos, y = L / 180, ae = 1e3 * 60 * 60 * 24, oe = 2440588, le = 2451545;
52
- function Oe(r) {
53
- return r.valueOf() / ae - 0.5 + oe;
51
+ var M = Math.PI, p = Math.sin, k = Math.cos, $e = Math.asin, Oe = Math.acos, y = M / 180, oe = 1e3 * 60 * 60 * 24, le = 2440588, ce = 2451545;
52
+ function ze(r) {
53
+ return r.valueOf() / oe - 0.5 + le;
54
54
  }
55
55
  function O(r) {
56
- return new Date((r + 0.5 - oe) * ae);
56
+ return new Date((r + 0.5 - le) * oe);
57
57
  }
58
- function Ue(r) {
59
- return Oe(r) - le;
58
+ function Le(r) {
59
+ return ze(r) - ce;
60
60
  }
61
- var X = y * 23.4397;
61
+ var ee = y * 23.4397;
62
62
  function Me(r, e) {
63
- return $e(u(e) * k(X) + k(e) * u(X) * u(r));
63
+ return $e(p(e) * k(ee) + k(e) * p(ee) * p(r));
64
64
  }
65
- function Le(r) {
65
+ function Ue(r) {
66
66
  return y * (357.5291 + 0.98560028 * r);
67
67
  }
68
68
  function Ee(r) {
69
- return y * (1.9148 * u(r) + 0.02 * u(2 * r) + 3e-4 * u(3 * r));
69
+ return y * (1.9148 * p(r) + 0.02 * p(2 * r) + 3e-4 * p(3 * r));
70
70
  }
71
- function He(r, e) {
71
+ function Ae(r, e) {
72
72
  var t = y * 102.9372;
73
- return r + e + t + L;
73
+ return r + e + t + M;
74
74
  }
75
75
  var S = {};
76
76
  S.PolarException = {
@@ -78,7 +78,7 @@ S.PolarException = {
78
78
  MIDNIGHT_SUN: 1,
79
79
  POLAR_NIGHT: 2
80
80
  };
81
- var I = [
81
+ var F = [
82
82
  [-0.83, "sunrise", "sunset"]
83
83
  // none of the below are currently used -> disabled to avoid unnecessary calculations,
84
84
  // as all elements of 'times' are evaluated on every sunCalc.getTimes call.
@@ -89,37 +89,37 @@ var I = [
89
89
  [ -18, "nightEnd", "night" ],
90
90
  [ 6, "goldenHourEnd", "goldenHour" ]
91
91
  */
92
- ], ce = 9e-4;
93
- function Ae(r, e) {
94
- return Math.round(r - ce - e / (2 * L));
95
- }
96
- function ee(r, e, t) {
97
- return ce + (r + e) / (2 * L) + t;
92
+ ], de = 9e-4;
93
+ function He(r, e) {
94
+ return Math.round(r - de - e / (2 * M));
98
95
  }
99
96
  function te(r, e, t) {
100
- return le + r + 53e-4 * u(e) - 69e-4 * u(2 * t);
97
+ return de + (r + e) / (2 * M) + t;
98
+ }
99
+ function ie(r, e, t) {
100
+ return ce + r + 53e-4 * p(e) - 69e-4 * p(2 * t);
101
101
  }
102
102
  function Ie(r, e, t) {
103
- return ze((u(r) - u(e) * u(t)) / (k(e) * k(t)));
103
+ return Oe((p(r) - p(e) * p(t)) / (k(e) * k(t)));
104
104
  }
105
105
  S.getTimes = function(r, e, t) {
106
- var i = y * -t, s = y * e, n = Ue(r), a = Ae(n, i), o = ee(0, i, a), c = Le(o), d = Ee(c), l = He(c, d), h = Me(l, 0), g = te(o, c, l);
107
- function w(H) {
108
- var z = Ie(H, s, h), de = ee(z, i, a);
109
- return te(de, c, l);
106
+ var i = y * -t, s = y * e, n = Le(r), a = He(n, i), o = te(0, i, a), c = Ue(o), d = Ee(c), l = Ae(c, d), h = Me(l, 0), g = ie(o, c, l);
107
+ function w(E) {
108
+ var $ = Ie(E, s, h), he = te($, i, a);
109
+ return ie(he, c, l);
110
110
  }
111
- function x(H) {
112
- var z = (u(H) - u(s) * u(h)) / (k(s) * k(h));
113
- return z < -1 ? S.PolarException.MIDNIGHT_SUN : z > 1 ? S.PolarException.POLAR_NIGHT : S.PolarException.NORMAL;
111
+ function x(E) {
112
+ var $ = (p(E) - p(s) * p(h)) / (k(s) * k(h));
113
+ return $ < -1 ? S.PolarException.MIDNIGHT_SUN : $ > 1 ? S.PolarException.POLAR_NIGHT : S.PolarException.NORMAL;
114
114
  }
115
115
  var _ = {
116
116
  solarNoon: O(g),
117
117
  nadir: O(g - 0.5),
118
118
  polarException: S.PolarException.NORMAL
119
- }, b, f, $, E, j;
120
- for (b = 0, f = I.length; b < f; b += 1)
121
- $ = I[b], E = w($[0] * y), j = g - (E - g), _[$[1]] = O(j), _[$[2]] = O(E);
122
- return _.polarException = x(I[0][0] * y), _;
119
+ }, b, m, P, U, B;
120
+ for (b = 0, m = F.length; b < m; b += 1)
121
+ P = F[b], U = w(P[0] * y), B = g - (U - g), _[P[1]] = O(B), _[P[2]] = O(U);
122
+ return _.polarException = x(F[0][0] * y), _;
123
123
  };
124
124
  const Ne = {
125
125
  spring: { dayOfMonth: 20, month: 2 },
@@ -130,32 +130,32 @@ const Ne = {
130
130
  // Northern Fall equinox in 2014 - September 23
131
131
  winter: { dayOfMonth: 21, month: 11 }
132
132
  // Northern Winter solstice in 2014 - December 21
133
- }, J = ["spring", "summer", "fall", "winter"];
134
- function P(r, e, t) {
135
- const i = F(e, t), { dayOfMonth: s, month: n } = Ne[i], a = new Date(r.getTime());
133
+ }, R = ["spring", "summer", "fall", "winter"];
134
+ function C(r, e, t) {
135
+ const i = V(e, t), { dayOfMonth: s, month: n } = Ne[i], a = new Date(r.getTime());
136
136
  return a.setMonth(n, s), a;
137
137
  }
138
- function Je(r, e) {
139
- const t = Re(r);
140
- return F(t, e);
138
+ function Fe(r, e) {
139
+ const t = Je(r);
140
+ return V(t, e);
141
141
  }
142
- function Re(r) {
143
- const e = r.getTime(), t = P(r, "spring", "northern").getTime(), i = P(r, "summer", "northern").getTime(), s = P(r, "fall", "northern").getTime(), n = P(r, "winter", "northern").getTime();
142
+ function Je(r) {
143
+ const e = r.getTime(), t = C(r, "spring", "northern").getTime(), i = C(r, "summer", "northern").getTime(), s = C(r, "fall", "northern").getTime(), n = C(r, "winter", "northern").getTime();
144
144
  return e >= t && e < i ? "spring" : e >= i && e < s ? "summer" : e >= s && e < n ? "fall" : "winter";
145
145
  }
146
- function F(r, e) {
147
- return e === "northern" ? r : Fe(r);
146
+ function V(r, e) {
147
+ return e === "northern" ? r : Re(r);
148
148
  }
149
- function ie(r) {
149
+ function re(r) {
150
150
  return r >= 0 ? "northern" : "southern";
151
151
  }
152
- function Fe(r) {
153
- const e = J.indexOf(r);
154
- return J[(e + 2) % 4];
152
+ function Re(r) {
153
+ const e = R.indexOf(r);
154
+ return R[(e + 2) % 4];
155
155
  }
156
- const je = 1440, Be = 864e5;
157
- function Ve(r, e, t, i) {
158
- const s = S.getTimes(r, e, t), n = s.sunrise, a = s.sunset, o = C(r, i), c = C(n, i), d = C(a, i);
156
+ const je = 1440, Ve = 864e5;
157
+ function Be(r, e, t, i) {
158
+ const s = S.getTimes(r, e, t), n = s.sunrise, a = s.sunset, o = H(r, i), c = H(n, i), d = H(a, i);
159
159
  if (o.getUTCDate() !== c.getUTCDate() || o.getUTCDate() !== d.getUTCDate()) {
160
160
  const l = o.getTime() - c.getTime() > 0 ? 1 : -1;
161
161
  n.setUTCDate(n.getUTCDate() + l), a.setUTCDate(a.getUTCDate() + l);
@@ -165,9 +165,9 @@ function Ve(r, e, t, i) {
165
165
  sunset: a
166
166
  };
167
167
  }
168
- const qe = 100, Ge = 1e3, v = 12e5, U = 72e5;
169
- function re(r, e) {
170
- return ne(r + e, 24);
168
+ const qe = 100, Ge = 1e3, v = 12e5, z = 72e5;
169
+ function se(r, e) {
170
+ return ae(r + e, 24);
171
171
  }
172
172
  function Ye({
173
173
  mode: r,
@@ -184,8 +184,8 @@ function Ye({
184
184
  const h = t() / qe * d;
185
185
  if (h > 0) {
186
186
  let g = new Date(c.getTime() + h);
187
- const w = e.displayUTCOffset ?? 0, x = re(g.getUTCHours(), w), _ = re(c.getUTCHours(), w);
188
- x < _ && (g = new Date(c.getTime() + h - Be));
187
+ const w = e.displayUTCOffset ?? 0, x = se(g.getUTCHours(), w), _ = se(c.getUTCHours(), w);
188
+ x < _ && (g = new Date(c.getTime() + h - Ve));
189
189
  const b = e.clone();
190
190
  s?.(), e.date = g, i?.(b, e);
191
191
  }
@@ -198,20 +198,20 @@ function Ye({
198
198
  }
199
199
  n = requestAnimationFrame(() => a(o));
200
200
  }
201
- return a(), N(() => cancelAnimationFrame(n));
201
+ return a(), J(() => cancelAnimationFrame(n));
202
202
  }
203
- const M = v / 4;
203
+ const L = v / 4;
204
204
  function Ze(r, e, t, i) {
205
205
  const {
206
206
  day: s,
207
207
  night: n = s,
208
208
  twilight: a = s
209
- } = i, o = s * M, c = n * M, d = a * M;
209
+ } = i, o = s * L, c = n * L, d = a * L;
210
210
  if (r == null || e == null || Number.isNaN(r.getTime()) && Number.isNaN(e.getTime()))
211
211
  return o;
212
- const l = t.getTime(), h = r.getTime(), g = e.getTime(), w = h - U / 2, x = h + U / 2, _ = g - U / 3 * 2, b = g + U / 3;
213
- let f = o;
214
- return l >= w && l <= x ? l - w <= v ? f = c - (l - w) / v * (c - d) : x - l <= v / 2 ? f = o - (x - l) / v * 2 * (o - d) : f = d : l >= _ && l <= b ? l - _ <= v / 2 ? f = o - (l - _) / v * 2 * (o - d) : b - l <= v ? f = c - (b - l) / v * (c - d) : f = d : (l < h || l > g) && (f = c), f;
212
+ const l = t.getTime(), h = r.getTime(), g = e.getTime(), w = h - z / 2, x = h + z / 2, _ = g - z / 3 * 2, b = g + z / 3;
213
+ let m = o;
214
+ return l >= w && l <= x ? l - w <= v ? m = c - (l - w) / v * (c - d) : x - l <= v / 2 ? m = o - (x - l) / v * 2 * (o - d) : m = d : l >= _ && l <= b ? l - _ <= v / 2 ? m = o - (l - _) / v * 2 * (o - d) : b - l <= v ? m = c - (b - l) / v * (c - d) : m = d : (l < h || l > g) && (m = c), m;
215
215
  }
216
216
  const We = ve`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted var(--calcite-color-foreground-current)}}.esri-slider{-webkit-user-select:none;user-select:none;direction:ltr;width:100%;height:100%;display:flex}.esri-disabled{pointer-events:none}.esri-disabled .esri-slider__content,.esri-disabled .esri-slider__min,.esri-disabled .esri-slider__max{opacity:var(--calcite-opacity-light)}.esri-slider--reversed.esri-slider--horizontal{flex-direction:row-reverse}.esri-slider--reversed.esri-slider--vertical{flex-direction:column}.esri-slider--horizontal{flex-direction:row}.esri-slider--horizontal .esri-slider__content{height:auto}.esri-slider--horizontal .esri-slider__track{width:100%;height:2px}.esri-slider--horizontal .esri-slider__segment--interactive:hover{cursor:ew-resize}.esri-slider--horizontal .esri-slider__anchor{width:1px;height:100%}.esri-slider--horizontal .esri-slider__label{text-align:center;margin:0 11px;top:-30px;left:-50px}.esri-slider--horizontal .esri-slider__label-input{text-align:center}.esri-slider--horizontal .esri-slider__max,.esri-slider--horizontal .esri-slider__min{flex:none;width:50px;height:auto;margin:auto}.esri-slider--horizontal .esri-slider__ticks{width:100%;margin:9px 0 0;top:100%;left:0}.esri-slider--horizontal .esri-slider__tick{width:1px;height:5px}.esri-slider--horizontal .esri-slider__tick-label{margin-top:18px}.esri-slider--vertical{flex-direction:column-reverse}.esri-slider--vertical .esri-slider__content{flex-direction:column;width:auto}.esri-slider--vertical .esri-slider__track{flex-direction:column;flex:1 0 0;width:2px;height:100%}.esri-slider--vertical .esri-slider__segment--interactive:hover{cursor:ns-resize}.esri-slider--vertical .esri-slider__anchor{width:100%;height:1px}.esri-slider--vertical .esri-slider__label{text-align:left;top:-10px;left:20px}.esri-slider--vertical .esri-slider__max,.esri-slider--vertical .esri-slider__min{flex:0 0 22px;width:100%;margin:auto}.esri-slider--vertical .esri-slider__ticks{margin:0 0 0 11px;top:0;left:100%}.esri-slider--vertical .esri-slider__tick{width:5px;height:1px}.esri-slider--vertical .esri-slider__tick-label{margin-left:30px}.esri-slider__content{z-index:0;flex:1 0 auto;justify-content:center;align-items:center;margin:auto;line-height:0;display:flex;position:relative}.esri-slider__track{touch-action:none;background-color:var(--calcite-color-border-ghost);display:inline-block;position:relative}.esri-slider__segment{transform-origin:0 0;will-change:transform;touch-action:none;width:100%;height:100%;position:absolute;top:0;left:0}.esri-slider__segment:hover{cursor:pointer}.esri-slider__anchor{touch-action:none;-webkit-user-select:none;user-select:none;background-color:var(--calcite-color-brand);position:absolute}.esri-slider__anchor:focus .esri-slider__thumb,.esri-slider__anchor:focus .esri-slider__label{outline:inherit}.esri-slider__anchor--moving:focus .esri-slider__thumb{cursor:grabbing;border:3px solid var(--calcite-color-brand-press)}.esri-slider__anchor--moving .esri-slider__label:hover,.esri-slider__anchor--moving .esri-slider__label--interactive:hover{cursor:grabbing}.esri-slider__thumb{box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-2);border:2px solid var(--calcite-color-brand);border-radius:16px;width:16px;height:16px;transition:all .125s ease-in-out;position:absolute;top:-7px;left:-7px}.esri-slider__thumb:hover{cursor:grab;border-width:3px;border-color:var(--calcite-color-brand-press);width:19.2px;height:19.2px;top:-8.6px;left:-8.6px}.esri-slider__label{min-width:80px;line-height:var(--calcite-font-line-height-fixed-xl);position:absolute}.esri-slider__label:hover{cursor:grab}.esri-slider__label--interactive:hover,.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{cursor:pointer;text-decoration:underline}.esri-slider__label-input{z-index:1;width:100%;position:relative}.esri-slider__extra-content{display:inline-block}.esri-slider__max,.esri-slider__min{text-align:center;justify-content:center;align-items:center;height:22px;line-height:var(--calcite-font-line-height-fixed-xl);display:flex}.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{background-color:var(--calcite-color-foreground-2)}.esri-slider__range-input{text-align:center;width:100%;padding:1px 0}.esri-slider__ticks{z-index:0;height:100%;display:inline-block;position:absolute}.esri-slider__tick{background:var(--calcite-color-foreground-1);position:absolute}.esri-slider__tick-label{width:max-content;position:absolute}:dir(rtl) .esri-slider__label,:dir(rtl) .esri-slider__max,:dir(rtl) .esri-slider__min,:dir(rtl) .esri-slider__tick-label{direction:rtl;unicode-bidi:plaintext}:dir(rtl) .esri-slider__range-input,:dir(rtl) .esri-slider__label-input{unicode-bidi:plaintext}:host{width:350px}.root{display:flex;flex-direction:column;overflow:visible;gap:var(--calcite-spacing-md);justify-content:space-between;padding:var(--arcgis-internal-padding);position:relative;calcite-label{--calcite-label-margin-bottom: 0}&.loading>*:not(calcite-scrim){opacity:0}}.unsupported{padding:0 var(--calcite-spacing-lg);animation:esri-fade-in .25s ease-in-out}.slider{margin-block-start:0rem}.time-configuration{--date-play-button-offset: 11px;--slider-play-button-offset: var(--calcite-spacing-md);display:grid;gap:var(--calcite-spacing-md);grid-template-columns:1fr min-content;.slider-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--slider-play-button-offset))}}.timezone-input-container{grid-column:1;min-width:0;+span{grid-column:2}}.date-picker-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--date-play-button-offset))}}calcite-button{place-self:center}}`, Ke = {
217
217
  day: 1,
@@ -220,28 +220,28 @@ const We = ve`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0
220
220
  };
221
221
  class Qe extends be {
222
222
  constructor() {
223
- super(...arguments), this.messages = we({ blocking: !0 }), this.#i = "none", this.#r = null, this.#l = q(), this.#g = q(), this.#u = 200, this.#p = 200, this.#c = !1, this.#a = {}, this._offset = A((e) => {
224
- const t = this._lighting, i = p(t) ? t.displayUTCOffset : void 0;
223
+ super(...arguments), this.messages = we({ blocking: !0 }), this.#n = "none", this.#a = null, this.#g = Z(), this.#_ = Z(), this.#b = 200, this.#v = 200, this.#u = !1, this.#c = {}, this.#d = N((e) => {
224
+ const t = this._lighting, i = u(t) ? t.displayUTCOffset : void 0;
225
225
  return this.#t ? e : i ?? e;
226
- }), this._timesliderPosition = A((e) => {
226
+ }), this.#i = N((e) => {
227
227
  const t = this._lighting;
228
- if (!p(t))
228
+ if (!u(t))
229
229
  return e;
230
230
  const i = t.displayUTCOffset ?? this.utcOffset ?? 0, s = t.date;
231
231
  if (this.#t)
232
232
  return e;
233
- if (W(s)) {
233
+ if (K(s)) {
234
234
  const { minutesSinceMidnight: n } = D(s, i);
235
235
  return n;
236
236
  }
237
237
  return e;
238
- }), this._localDate = A((e) => {
238
+ }), this.#r = N((e) => {
239
239
  const t = xe(this._view, this.utcOffset);
240
240
  return this.#t ? e : t ?? e;
241
- }), this.view = ye(this), this.autoDestroyDisabled = !1, this.dateOrSeason = "date", this.headingLevel = 2, this.hideDatePicker = !1, this.hideHeader = !1, this.hidePlayButtons = !1, this.hideShadowsToggle = !1, this.hideSunLightingToggle = !1, this.hideTimezone = !1, this.icon = "brightness", this.playSpeedMultiplier = 1, this.timeSliderSteps = 5, this.arcgisReady = B(), this.arcgisUserDateTimeChange = B(), this.#o = !1;
241
+ }), this.view = ye(this), this.autoDestroyDisabled = !1, this.dateOrSeason = "date", this.headingLevel = 2, this.hideDatePicker = !1, this.hideHeader = !1, this.hidePlayButtons = !1, this.hideShadowsToggle = !1, this.hideSunLightingToggle = !1, this.hideTimezone = !1, this.icon = "brightness", this.playSpeedMultiplier = 1, this.timeSliderSteps = 5, this.arcgisReady = G(), this.arcgisUserDateTimeChange = G(), this.#h = !1;
242
242
  }
243
243
  static {
244
- this.properties = { localDateAsString: 32, view: 0, _playingState: 16, _sunlightingDisabled: 16, autoDestroyDisabled: 5, currentSeason: 1, dateOrSeason: 3, dayPlaying: 5, _directShadowsDisabled: 16, headingLevel: 9, hideDatePicker: 5, hideHeader: 5, hidePlayButtons: 5, hideShadowsToggle: 5, hideSunLightingToggle: 5, hideTimezone: 5, icon: 3, label: 1, playSpeedMultiplier: 9, referenceElement: 1, timeSliderSteps: 9, utcOffset: 9, timeSliderPosition: 9, localDate: 1, yearPlaying: 5 };
244
+ this.properties = { _playingState: 16, localDateAsString: 32, view: 0, _sunlightingDisabled: 16, autoDestroyDisabled: 5, currentSeason: 1, dateOrSeason: 3, dayPlaying: 5, _directShadowsDisabled: 16, headingLevel: 9, hideDatePicker: 5, hideHeader: 5, hidePlayButtons: 5, hideShadowsToggle: 5, hideSunLightingToggle: 5, hideTimezone: 5, icon: 3, label: 1, playSpeedMultiplier: 9, referenceElement: 1, timeSliderSteps: 9, utcOffset: 9, timeSliderPosition: 9, localDate: 1, yearPlaying: 5 };
245
245
  }
246
246
  static {
247
247
  this.styles = We;
@@ -250,110 +250,109 @@ class Qe extends be {
250
250
  return this.view?.type === "3d" ? this.view : void 0;
251
251
  }
252
252
  #e;
253
- #i;
254
- #r;
253
+ #n;
254
+ #a;
255
255
  #t;
256
- #l;
257
256
  #g;
257
+ #_;
258
+ #b;
259
+ #v;
258
260
  #u;
259
- #p;
260
- #c;
261
- #s(e, t) {
262
- return this.#o || this.#c ? !1 : (this.#a[e] = t, !0);
261
+ #o(e, t) {
262
+ return this.#h || this.#u ? !1 : (this.#c[e] = t, !0);
263
263
  }
264
- #m() {
265
- const { utcOffset: e, timeSliderPosition: t, localDate: i, directShadowsDisabled: s, sunlightingDisabled: n } = this.#a;
266
- if (this.#c = !0, e != null)
264
+ #x() {
265
+ const { utcOffset: e, timeSliderPosition: t, localDate: i, directShadowsDisabled: s, sunlightingDisabled: n } = this.#c;
266
+ if (this.#u = !0, e != null)
267
267
  if (t == null && i == null) {
268
268
  const a = this._lighting;
269
- p(a) ? (a.displayUTCOffset = e, this.#h(e, a)) : this._offset.mutate(e);
269
+ u(a) ? (a.displayUTCOffset = e, this.#f(e, a)) : this.#d.mutate(e);
270
270
  } else
271
271
  this.utcOffset = e;
272
- t != null && (this.timeSliderPosition = t), i && (this.localDate = i), s != null && (this._directShadowsDisabled = s), n != null && (this._sunlightingDisabled = n), this.#a = {}, this.#c = !1;
272
+ t != null && (this.timeSliderPosition = t), i && (this.localDate = i), s != null && (this._directShadowsDisabled = s), n != null && (this._sunlightingDisabled = n), this.#c = {}, this.#u = !1;
273
273
  }
274
- #d() {
274
+ #p() {
275
275
  if (this.requestUpdate(), this.#t)
276
276
  return;
277
277
  const e = Se(() => {
278
- if (p(this._lighting)) {
278
+ if (u(this._lighting)) {
279
279
  const t = this.utcOffset ?? 0, i = this.timeSliderPosition ?? 0, s = this.localDate;
280
- this._lighting.date = Z(s, i, t), this._lighting.displayUTCOffset = t;
280
+ this._lighting.date = I(s, i, t), this._lighting.displayUTCOffset = t;
281
281
  }
282
282
  this.#t?.remove();
283
- }, { timeout: this.#u });
284
- this.#t = N(() => {
283
+ }, { timeout: this.#b });
284
+ this.#t = J(() => {
285
285
  Te(e), this.#t = void 0;
286
286
  });
287
287
  }
288
- #f(e) {
288
+ #S(e) {
289
289
  const t = this.utcOffset ?? e.displayUTCOffset ?? 0, { minutesSinceMidnight: i, localDate: s } = D(e.date, t), n = this.timeSliderPosition ?? i, a = this.localDateAsString ?? s;
290
- this.#t?.remove(), e.date = Z(a, n, t), e.displayUTCOffset = t;
290
+ this.#t?.remove(), e.date = I(a, n, t), e.displayUTCOffset = t;
291
291
  }
292
- #_({ scale: e, disabled: t }) {
292
+ #D({ scale: e, disabled: t }) {
293
293
  const { messages: i } = this;
294
- return m`<calcite-label .scale=${e} class="date-picker-container">${i.date}${Xe({ disabled: t, scale: e, date: this.localDateAsString, onDateChange: (s) => {
294
+ return f`<calcite-label .scale=${e} class="date-picker-container">${i.date}${Xe({ disabled: t, scale: e, date: this.localDateAsString, onDateChange: (s) => {
295
295
  const n = s.currentTarget.value, a = Array.isArray(n) ? n[0] : n;
296
- this._stopPlaying(), this.localDate = a, this._emitUserDateTimeChangeEvent();
297
- } })}</calcite-label>${T({ hidden: this.hidePlayButtons, children: se({ playing: this.yearPlaying, disabled: t, label: i.playYear, onClick: () => {
296
+ this.#s(), this.localDate = a, this.#m();
297
+ } })}</calcite-label>${T({ hidden: this.hidePlayButtons, children: ne({ playing: this.yearPlaying, disabled: t, label: i.playYear, onClick: () => {
298
298
  this._playingState === "year" ? this._playingState = "none" : this._playingState = "year";
299
299
  }, scale: e }) })}`;
300
300
  }
301
- #b({ scale: e, disabled: t }) {
301
+ #T({ scale: e, disabled: t }) {
302
302
  const { messages: i } = this;
303
- return m`<calcite-label .scale=${e} class="date-picker-container">${i.season}${et({ scale: e, selectedSeason: this.currentSeason, disabled: t, messages: i, onSeasonChange: (s) => {
304
- this._stopPlaying(), this.currentSeason = s.currentTarget.value;
303
+ return f`<calcite-label .scale=${e} class="date-picker-container">${i.season}${et({ scale: e, selectedSeason: this.currentSeason, disabled: t, messages: i, onSeasonChange: (s) => {
304
+ this.#s(), this.currentSeason = s.currentTarget.value;
305
305
  } })}</calcite-label>`;
306
306
  }
307
- #a;
308
- get #v() {
309
- return this.#g?.value?.startTime;
310
- }
311
- get localDateAsString() {
312
- return this._localDate.value ?? void 0;
307
+ #c;
308
+ get #k() {
309
+ return this.#_?.value?.startTime;
313
310
  }
311
+ #d;
312
+ #i;
313
+ #r;
314
314
  get _playingState() {
315
- return this.#i;
315
+ return this.#n;
316
316
  }
317
317
  set _playingState(e) {
318
- this.#i = e, this.#n?.remove(), e === "none" ? this.#e?.remove() : (this._play(e), this._emitUserDateTimeChangeEvent());
318
+ this.#n = e, this.#l?.remove(), e === "none" ? this.#e?.remove() : (this.#y(e), this.#m());
319
319
  }
320
320
  get _lighting() {
321
321
  return this._view?.environment?.lighting;
322
322
  }
323
+ get localDateAsString() {
324
+ return this.#r.value ?? void 0;
325
+ }
323
326
  get _sunlightingDisabled() {
324
- return !p(this._lighting);
327
+ return !u(this._lighting);
325
328
  }
326
329
  set _sunlightingDisabled(e) {
327
- this.#s("sunlightingDisabled", e);
330
+ this.#o("sunlightingDisabled", e);
328
331
  const t = this._view?.environment;
329
332
  if (t == null)
330
333
  return;
331
- const i = t.lighting, s = this.#r;
332
- this.#r = i;
334
+ const i = t.lighting, s = this.#a;
335
+ this.#a = i;
333
336
  const n = {
334
337
  directShadowsEnabled: i.directShadowsEnabled,
335
338
  glow: i.glow
336
339
  };
337
- p(i) && (n.cameraTrackingEnabled = i.cameraTrackingEnabled);
340
+ u(i) && (n.cameraTrackingEnabled = i.cameraTrackingEnabled);
338
341
  const a = e ? "virtual" : "sun";
339
342
  let o;
340
- s?.type === a ? o = s : o = e ? new _e() : new fe({
341
- date: C(
342
- C(this.localDate, this.timeSliderPosition ?? 0, "minutes"),
343
- // this.localDate already includes the UTC offset, so we need to remove the offset to get the correct UTC date for the SunLighting configuration
344
- this.utcOffset ?? 0
345
- ),
343
+ s?.type === a ? o = s : o = e ? new _e() : new q({
344
+ date: I(this.localDateAsString ?? this.localDate, this.timeSliderPosition ?? 0, this.utcOffset ?? 0),
346
345
  displayUTCOffset: this.utcOffset
347
- }), o.set(n), t.lighting = o, e || (this._stopPlaying(), this.#l.value && (this.#l.value.open = !1));
346
+ }), o.set(n), t.lighting = o, e || (this.#s(), this.#g.value && (this.#g.value.open = !1));
348
347
  }
349
348
  get currentSeason() {
350
- const e = this._view?.camera?.position?.latitude ?? 0, t = ie(e);
351
- return Je(this.localDate, t);
349
+ const e = this._view?.camera?.position?.latitude ?? 0, t = re(e);
350
+ return Fe(this.localDate, t);
352
351
  }
353
352
  set currentSeason(e) {
354
- this._stopPlaying();
355
- const t = this._view?.camera?.position?.latitude ?? 0, i = ie(t), s = F(e, i);
356
- this.localDate = P(this.localDate, s, "northern"), this._emitUserDateTimeChangeEvent();
353
+ this.#s();
354
+ const t = this._view?.camera?.position?.latitude ?? 0, i = re(t), s = V(e, i);
355
+ this.localDate = C(this.localDate, s, "northern"), this.#m();
357
356
  }
358
357
  get dayPlaying() {
359
358
  return this._playingState === "day";
@@ -365,37 +364,37 @@ class Qe extends be {
365
364
  return !this._lighting?.directShadowsEnabled;
366
365
  }
367
366
  set _directShadowsDisabled(e) {
368
- this.#s("directShadowsDisabled", e), this._lighting && (this._lighting.directShadowsEnabled = !e);
367
+ this.#o("directShadowsDisabled", e), this._lighting && (this._lighting.directShadowsEnabled = !e);
369
368
  }
370
369
  get utcOffset() {
371
- return this._offset.value;
370
+ return this.#d.value;
372
371
  }
373
372
  set utcOffset(e) {
374
- this._offset.mutate(e), !this.#s("utcOffset", e) && this.#d();
373
+ this.#d.mutate(e), !this.#o("utcOffset", e) && this.#p();
375
374
  }
376
375
  get timeSliderPosition() {
377
- return this._timesliderPosition.value;
376
+ return this.#i.value;
378
377
  }
379
378
  set timeSliderPosition(e) {
380
- this._timesliderPosition.mutate(ne(e ?? 0, je)), !this.#s("timeSliderPosition", e) && this.#d();
379
+ this.#i.mutate(ae(e ?? 0, je)), !this.#o("timeSliderPosition", e) && this.#p();
381
380
  }
382
381
  get localDate() {
383
- return this._localDate.value != null ? new Date(this._localDate.value) : /* @__PURE__ */ new Date();
382
+ return this.#r.value != null ? new Date(this.#r.value) : /* @__PURE__ */ new Date();
384
383
  }
385
384
  set localDate(e) {
386
385
  if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/u.test(e)) {
387
- if (this._localDate.mutate(e), this.#s("localDate", e))
386
+ if (this.#r.mutate(e), this.#o("localDate", e))
388
387
  return;
389
- this.#d();
388
+ this.#p();
390
389
  return;
391
390
  }
392
391
  const t = new Date(e);
393
- if (W(t)) {
392
+ if (K(t)) {
394
393
  t.setUTCFullYear(t.getFullYear(), t.getMonth(), t.getDate());
395
394
  const i = t.toISOString().slice(0, 10);
396
- if (this._localDate.mutate(i), this.#s("localDate", i))
395
+ if (this.#r.mutate(i), this.#o("localDate", i))
397
396
  return;
398
- this.#d();
397
+ this.#p();
399
398
  }
400
399
  }
401
400
  get yearPlaying() {
@@ -411,150 +410,156 @@ class Qe extends be {
411
410
  this.manager.onLifecycle(() => [
412
411
  // When camera tracking is enabled, update the displayed timezone whenever the camera crosses into a new rounded
413
412
  // UTC offset.
414
- ge(() => {
413
+ ue(() => {
415
414
  const e = this._view?.camera?.position;
416
- return e ? Y(e) : void 0;
415
+ return e ? A(e) : void 0;
417
416
  }, (e, t) => {
418
- this.#w(e, t);
417
+ this.#C(e, t);
419
418
  }, { sync: !0, initial: !0 }),
420
- ue(() => !p(this._lighting), () => {
421
- this._stopPlaying();
419
+ pe(() => !u(this._lighting), () => {
420
+ this.#s();
422
421
  }),
423
422
  me.onLocaleChange(() => {
424
423
  this.requestUpdate();
425
424
  })
426
425
  ]), this.manager.onDisconnected(() => {
427
- this.#e?.remove(), this.#t?.remove(), this.#n?.remove();
426
+ this.#e?.remove(), this.#t?.remove(), this.#l?.remove();
428
427
  });
429
428
  }
430
429
  willUpdate(e) {
431
- if (super.willUpdate(e), !!this.#o && p(this._lighting) && e.has("utcOffset") && !e.has("localDate") && !e.has("timeSliderPosition")) {
430
+ if (super.willUpdate(e), !!this.#h && u(this._lighting) && e.has("utcOffset") && !e.has("localDate") && !e.has("timeSliderPosition")) {
432
431
  const t = this.utcOffset ?? 0, { minutesSinceMidnight: i, localDate: s } = D(this._lighting.date, t);
433
- this._timesliderPosition.mutate(i), this._localDate.mutate(s);
432
+ this.#i.mutate(i), this.#r.mutate(s);
434
433
  }
435
434
  }
436
- #o;
435
+ #h;
437
436
  async loaded() {
438
437
  const e = new AbortController();
439
438
  this.manager.onDisconnected(() => ({
440
439
  remove: () => {
441
440
  e.abort();
442
441
  }
443
- })), await De(pe(() => this._view?.ready, { signal: e.signal }).then(() => {
442
+ })), await De(fe(() => this._view?.ready, { signal: e.signal }).then(() => {
444
443
  const t = this._lighting, i = this._view?.camera?.position;
445
- if (this.#a.utcOffset == null && p(t) && t.displayUTCOffset == null && i) {
446
- const n = Y(i);
447
- this.#h(n, t);
444
+ if (this.#c.utcOffset == null && u(t) && t.displayUTCOffset == null && i) {
445
+ const n = A(i);
446
+ this.#f(n, t);
448
447
  }
449
- this.#o = !0, this.#m();
448
+ this.#h = !0, this.#x(), u(this._lighting) || this.#P();
450
449
  const s = this._playingState;
451
- s !== "none" && this.#e == null && this._play(s);
450
+ s !== "none" && this.#e == null && this.#y(s);
452
451
  }));
453
452
  }
454
- #w(e, t) {
453
+ #C(e, t) {
455
454
  const i = this._lighting;
456
- if (!(!this.#o || !p(i) || !i.cameraTrackingEnabled || e == null)) {
455
+ if (!(!this.#h || !u(i) || !i.cameraTrackingEnabled || e == null)) {
457
456
  if (t == null && i.displayUTCOffset == null) {
458
- this.#h(e, i);
457
+ this.#f(e, i);
459
458
  return;
460
459
  }
461
- i.displayUTCOffset != null && (i.displayUTCOffset = e), this.#h(e, i);
460
+ i.displayUTCOffset != null && (i.displayUTCOffset = e), this.#f(e, i);
462
461
  }
463
462
  }
464
- #h(e, t) {
465
- t.displayUTCOffset = e, this._offset.mutate(e);
466
- const { minutesSinceMidnight: i, localDate: s } = D(t.date, e);
467
- this._timesliderPosition.mutate(i), this._localDate.mutate(s), this.requestUpdate();
463
+ #f(e, t) {
464
+ t.displayUTCOffset = e, this.#w(e, t.date);
465
+ }
466
+ #P() {
467
+ const e = this._view?.camera?.position, t = this.utcOffset ?? (e ? A(e) : 0), i = new q({ displayUTCOffset: t });
468
+ this.#w(t, i.date, { fillMissingOnly: !0 });
468
469
  }
469
- _emitUserDateTimeChangeEvent() {
470
+ #w(e, t, { fillMissingOnly: i = !1 } = {}) {
471
+ const { minutesSinceMidnight: s, localDate: n } = D(t, e);
472
+ (!i || this.utcOffset == null) && this.#d.mutate(e), (!i || this.timeSliderPosition == null) && this.#i.mutate(s), (!i || this.localDateAsString == null) && this.#r.mutate(n), this.requestUpdate();
473
+ }
474
+ #m() {
470
475
  this.isConnected && this.arcgisUserDateTimeChange.emit();
471
476
  }
472
- _stopPlaying() {
477
+ #s() {
473
478
  this._playingState = "none";
474
479
  }
475
- #n;
476
- #y(e) {
477
- if (this.#n)
480
+ #l;
481
+ #$(e) {
482
+ if (this.#l)
478
483
  return;
479
484
  const t = setTimeout(() => {
480
485
  const i = e.displayUTCOffset ?? 0, s = e.date, { minutesSinceMidnight: n } = D(s, i);
481
- this._timesliderPosition.mutate(n), this.#n?.remove();
482
- }, this.#p);
483
- this.#n = N(() => {
484
- clearTimeout(t), this.#n = void 0;
486
+ this.#i.mutate(n), this.#l?.remove();
487
+ }, this.#v);
488
+ this.#l = J(() => {
489
+ clearTimeout(t), this.#l = void 0;
485
490
  const i = this._lighting;
486
- if (p(i)) {
491
+ if (u(i)) {
487
492
  const s = i.displayUTCOffset ?? 0, n = i.date, { minutesSinceMidnight: a } = D(n, s);
488
- this._timesliderPosition.mutate(a);
493
+ this.#i.mutate(a);
489
494
  }
490
495
  });
491
496
  }
492
- _play(e) {
497
+ #y(e) {
493
498
  this.#e?.remove();
494
499
  const t = this._view;
495
500
  if (t == null || this._sunlightingDisabled)
496
501
  return;
497
502
  const i = t.environment.lighting;
498
- if (!p(i))
503
+ if (!u(i))
499
504
  return;
500
- this.#f(i);
505
+ this.#S(i);
501
506
  let s = 0;
502
507
  this.#e = Ye({
503
508
  mode: e,
504
509
  lighting: i,
505
510
  beforeProgress: () => {
506
- s = this.#v ?? 0;
511
+ s = this.#k ?? 0;
507
512
  },
508
513
  onProgress: (n, a) => {
509
- this._timesliderPosition.mutate(s), this.#y(a);
514
+ this.#i.mutate(s), this.#$(a);
510
515
  },
511
516
  getPlaySpeed: () => {
512
517
  const n = this._view, a = this._view?.environment.lighting;
513
- if (n != null && p(a)) {
514
- const o = n.camera.position.latitude ?? 0, c = n.camera.position.longitude ?? 0, { sunrise: d, sunset: l } = Ve(a.date, o, c, a.displayUTCOffset ?? 0);
518
+ if (n != null && u(a)) {
519
+ const o = n.camera.position.latitude ?? 0, c = n.camera.position.longitude ?? 0, { sunrise: d, sunset: l } = Be(a.date, o, c, a.displayUTCOffset ?? 0);
515
520
  return Ze(d, l, a.date, Ke) * this.playSpeedMultiplier;
516
521
  } else
517
- return M * this.playSpeedMultiplier;
522
+ return L * this.playSpeedMultiplier;
518
523
  }
519
524
  });
520
525
  }
521
526
  render() {
522
527
  const { messages: e, dateOrSeason: t } = this, i = this._sunlightingDisabled, s = "m";
523
528
  if (!(this._view?.type === "3d"))
524
- return Q({ class: "root", label: e.componentLabel, title: e.title, hideHeader: this.hideHeader, headingLevel: this.headingLevel, children: m`<div class="unsupported"><p>${e.unsupported}</p></div>` });
529
+ return X({ class: "root", label: e.componentLabel, title: e.title, hideHeader: this.hideHeader, headingLevel: this.headingLevel, children: f`<div class="unsupported"><p>${e.unsupported}</p></div>` });
525
530
  const a = (this.utcOffset ?? 0) * 60, o = this.view?.ready === !0, c = Array.isArray(this.timeSliderSteps) ? this.timeSliderSteps.at(0) : this.timeSliderSteps;
526
- return Q({ class: { root: !0, loading: !o }, label: e.componentLabel, title: e.title, hideHeader: this.hideHeader, headingLevel: this.headingLevel, children: m`${o ? void 0 : m`<calcite-scrim loading></calcite-scrim>`}<div class="time-configuration" style=${V({ columnGap: this.hidePlayButtons ? "0" : void 0 })}><calcite-label class="slider-container" .scale=${s}>${e.timeSliderLabel}<arcgis-time-of-day-slider class="slider" .disabled=${this._sunlightingDisabled} mode=single .startTime=${this.timeSliderPosition ?? 0} .steps=${c} style=${V({ gridArea: "slider" })} @arcgisTimeChange=${({ currentTarget: d }) => {
527
- this._stopPlaying(), this._emitUserDateTimeChangeEvent(), this.timeSliderPosition = d.startTime;
528
- }} ${G(this.#g)}></arcgis-time-of-day-slider></calcite-label>${T({ hidden: this.hidePlayButtons, children: se({ disabled: this._sunlightingDisabled, playing: this.dayPlaying, label: e.playDay, onClick: () => {
529
- this._playingState === "day" ? this._stopPlaying() : this._playingState = "day";
530
- }, scale: s }) })}${T({ hidden: this.hideTimezone, children: m`<calcite-label .scale=${s} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${s} .disabled=${this._sunlightingDisabled} .value=${`${a}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${(d) => {
531
+ return X({ class: { root: !0, loading: !o }, label: e.componentLabel, title: e.title, hideHeader: this.hideHeader, headingLevel: this.headingLevel, children: f`${o ? void 0 : f`<calcite-scrim loading></calcite-scrim>`}<div class="time-configuration" style=${Y({ columnGap: this.hidePlayButtons ? "0" : void 0 })}><calcite-label class="slider-container" .scale=${s}>${e.timeSliderLabel}<arcgis-time-of-day-slider class="slider" .disabled=${this._sunlightingDisabled} mode=single .startTime=${this.timeSliderPosition ?? 0} .steps=${c} style=${Y({ gridArea: "slider" })} @arcgisTimeChange=${({ currentTarget: d }) => {
532
+ this.#s(), this.#m(), this.timeSliderPosition = d.startTime;
533
+ }} ${W(this.#_)}></arcgis-time-of-day-slider></calcite-label>${T({ hidden: this.hidePlayButtons, children: ne({ disabled: this._sunlightingDisabled, playing: this.dayPlaying, label: e.playDay, onClick: () => {
534
+ this._playingState === "day" ? this.#s() : this._playingState = "day";
535
+ }, scale: s }) })}${T({ hidden: this.hideTimezone, children: f`<calcite-label .scale=${s} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${s} .disabled=${this._sunlightingDisabled} .value=${`${a}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${(d) => {
531
536
  const l = +d.target.value;
532
- this.utcOffset = l / 60, this._stopPlaying();
533
- }} ${G(this.#l)}></calcite-input-time-zone></calcite-label><span></span>` })}${T({ hidden: this.hideDatePicker, children: t === "date" ? this.#_({ scale: s, disabled: i }) : this.#b({ scale: s, disabled: i }) })}</div>${T({ hidden: this.hideSunLightingToggle, children: tt({ scale: s, messages: e.sunLightingToggle, sunlightingEnabled: !this._sunlightingDisabled, onSunLightingToggle: (d) => {
537
+ this.utcOffset = l / 60, this.#s();
538
+ }} ${W(this.#g)}></calcite-input-time-zone></calcite-label><span></span>` })}${T({ hidden: this.hideDatePicker, children: t === "date" ? this.#D({ scale: s, disabled: i }) : this.#T({ scale: s, disabled: i }) })}</div>${T({ hidden: this.hideSunLightingToggle, children: tt({ scale: s, messages: e.sunLightingToggle, sunlightingEnabled: !this._sunlightingDisabled, onSunLightingToggle: (d) => {
534
539
  this._sunlightingDisabled = !d;
535
540
  } }) })}${T({ hidden: this.hideShadowsToggle, children: it({ scale: s, messages: e.shadowsToggle, onShadowCheckboxChange: (d) => {
536
541
  this._directShadowsDisabled = !d;
537
542
  }, shadowEnabled: !this._directShadowsDisabled }) })}` });
538
543
  }
539
544
  }
540
- function se({ disabled: r, playing: e, onClick: t, label: i, scale: s = "m" }) {
541
- return m`<calcite-button appearance=solid .scale=${s} .disabled=${r} .iconStart=${e ? "pause-f" : "play-f"} .label=${i} @click=${t} round title=${i ?? R} type=button></calcite-button>`;
545
+ function ne({ disabled: r, playing: e, onClick: t, label: i, scale: s = "m" }) {
546
+ return f`<calcite-button appearance=solid .scale=${s} .disabled=${r} .iconStart=${e ? "pause-f" : "play-f"} .label=${i} @click=${t} round title=${i ?? j} type=button></calcite-button>`;
542
547
  }
543
548
  function Xe({ disabled: r, date: e, onDateChange: t, scale: i }) {
544
- return m`<calcite-input-date-picker data-testid=daylight-date-picker .disabled=${r} overlay-positioning=fixed placement=bottom .value=${e} .scale=${i} @calciteInputDatePickerChange=${t}></calcite-input-date-picker>`;
549
+ return f`<calcite-input-date-picker data-testid=daylight-date-picker .disabled=${r} overlay-positioning=fixed placement=bottom .value=${e} .scale=${i} @calciteInputDatePickerChange=${t}></calcite-input-date-picker>`;
545
550
  }
546
551
  function et({ messages: r, disabled: e, scale: t, selectedSeason: i, onSeasonChange: s }) {
547
- return m`<calcite-select .disabled=${e} .label=${r.season} .scale=${t} .value=${i} @calciteSelectChange=${(n) => {
552
+ return f`<calcite-select .disabled=${e} .label=${r.season} .scale=${t} .value=${i} @calciteSelectChange=${(n) => {
548
553
  s(n);
549
- }}>${J.map((n) => m`<calcite-option .selected=${i === n} .value=${n}>${r[n]}</calcite-option>`)}</calcite-select>`;
554
+ }}>${R.map((n) => f`<calcite-option .selected=${i === n} .value=${n}>${r[n]}</calcite-option>`)}</calcite-select>`;
550
555
  }
551
556
  function tt({ messages: r, sunlightingEnabled: e, onSunLightingToggle: t, scale: i }) {
552
- return m`<calcite-label layout=inline .scale=${i} title=${r?.tooltip ?? R}><calcite-checkbox .scale=${i} .checked=${e} @calciteCheckboxChange=${(s) => t(s.target.checked)}></calcite-checkbox>${r?.label}</calcite-label>`;
557
+ return f`<calcite-label layout=inline .scale=${i} title=${r?.tooltip ?? j}><calcite-checkbox .scale=${i} .checked=${e} @calciteCheckboxChange=${(s) => t(s.target.checked)}></calcite-checkbox>${r?.label}</calcite-label>`;
553
558
  }
554
559
  function it({ messages: r, shadowEnabled: e, onShadowCheckboxChange: t, scale: i }) {
555
- return m`<calcite-label layout=inline .scale=${i} title=${r?.tooltip ?? R}><calcite-checkbox .checked=${e} @calciteCheckboxChange=${(s) => t(s.target.checked)}></calcite-checkbox>${r.label}</calcite-label>`;
560
+ return f`<calcite-label layout=inline .scale=${i} title=${r?.tooltip ?? j}><calcite-checkbox .checked=${e} @calciteCheckboxChange=${(s) => t(s.target.checked)}></calcite-checkbox>${r.label}</calcite-label>`;
556
561
  }
557
- he("arcgis-daylight", Qe);
562
+ ge("arcgis-daylight", Qe);
558
563
  export {
559
564
  Qe as ArcgisDaylight
560
565
  };