@arcgis/map-components 5.2.0-next.6 → 5.2.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/cdn/{32HC6PWY.js → 2EOQ5G2R.js} +1 -1
  2. package/dist/cdn/{Z5YGVWFI.js → 3AZCF2P5.js} +1 -1
  3. package/dist/cdn/{QEPCYJLX.js → 52XUYHPM.js} +1 -1
  4. package/dist/cdn/{WTL3FIGS.js → 55JA345T.js} +1 -1
  5. package/dist/cdn/5UUUR4LF.js +2 -0
  6. package/dist/cdn/{PNBNM2CX.js → BJF74GDX.js} +1 -1
  7. package/dist/cdn/{L4EHCDIJ.js → DITXUZMH.js} +1 -1
  8. package/dist/cdn/FGSOMLKL.js +2 -0
  9. package/dist/cdn/LM56QFP5.js +2 -0
  10. package/dist/cdn/{7DIC4O5E.js → NOHLNRB4.js} +1 -1
  11. package/dist/cdn/{MF5STJJO.js → RJM52R4G.js} +1 -1
  12. package/dist/cdn/W42XLSER.js +2 -0
  13. package/dist/cdn/WMH7TCIP.js +2 -0
  14. package/dist/cdn/{VNYFKVJ2.js → WQDUJLSY.js} +1 -1
  15. package/dist/cdn/index.js +1 -1
  16. package/dist/chunks/time-utils.js +14 -14
  17. package/dist/components/arcgis-daylight/customElement.js +237 -205
  18. package/dist/components/arcgis-elevation-profile/customElement.d.ts +14 -0
  19. package/dist/components/arcgis-elevation-profile/customElement.js +77 -75
  20. package/dist/components/arcgis-feature-table/customElement.d.ts +1 -0
  21. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  22. package/dist/components/arcgis-features-next/customElement.d.ts +7 -1
  23. package/dist/components/arcgis-legend/customElement.js +6 -6
  24. package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
  25. package/dist/components/arcgis-legend-classic-view/customElement.js +16 -16
  26. package/dist/components/arcgis-map/customElement.d.ts +47 -4
  27. package/dist/components/arcgis-popup/customElement.d.ts +7 -1
  28. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +1 -1
  29. package/dist/components/arcgis-slider-scale-range/customElement.js +52 -18
  30. package/dist/components/arcgis-version-management/customElement.d.ts +9 -1
  31. package/dist/components/arcgis-weather/customElement.js +96 -94
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/vscode.html-custom-data.json +1 -1
  35. package/dist/docs/web-types.json +1 -1
  36. package/dist/loader.js +1 -1
  37. package/dist/types/lumina.d.ts +1 -1
  38. package/dist/types/preact.d.ts +1 -1
  39. package/dist/types/react.d.ts +1 -1
  40. package/dist/types/stencil.d.ts +1 -1
  41. package/package.json +6 -6
  42. package/dist/cdn/5DNVHLO6.js +0 -2
  43. package/dist/cdn/6OOQ7GIC.js +0 -2
  44. package/dist/cdn/JFVZHHIX.js +0 -2
  45. package/dist/cdn/MHRXFE7S.js +0 -2
  46. package/dist/cdn/RAQVHNVI.js +0 -2
@@ -211,11 +211,34 @@ export abstract class ArcgisMap extends LitElement {
211
211
  * Specifies a basemap for the map. The basemap is a set of layers that give
212
212
  * geographic context to the view and the other operational layers
213
213
  * in the map.
214
- * It can either be set using a basemap ID string ([see values](https://developers.arcgis.com/javascript/latest/references/core/Map/#basemap)),
215
- * [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)
216
- * or [BasemapStyle](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/).
217
214
  *
218
- * [Read more](https://developers.arcgis.com/javascript/latest/references/core/Map/#basemap)
215
+ * The basemap can be set from a basemap ID string from the [basemap styles service](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/), such as `arcgis/navigation`, or from the [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/) class.
216
+ *
217
+ * > [!NOTE]
218
+ * > Accessing the basemap styles service requires authentication, see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/) for more information.
219
+ *
220
+ * @example
221
+ * ```html
222
+ * <!-- Basemap set using a basemap ID string from the basemap styles service -->
223
+ * <arcgis-map basemap="arcgis/navigation" center="-98, 39" zoom="4"></arcgis-map>
224
+ * ```
225
+ * @example
226
+ * ```js
227
+ * // Basemap set using a Basemap instance
228
+ * const viewElement = document.querySelector("arcgis-map");
229
+ * viewElement.basemap = new Basemap({
230
+ * title: "Terrain",
231
+ * baseLayers: [
232
+ * new VectorTileLayer({
233
+ * url: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/resources/styles/root.json",
234
+ * })
235
+ * ]
236
+ * });
237
+ * ```
238
+ * @see [Map.basemap](https://developers.arcgis.com/javascript/latest/references/core/Map/#basemap)
239
+ * @see [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)
240
+ * @see [BasemapStyle](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/)
241
+ * @see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/)
219
242
  */
220
243
  accessor basemap: Basemap | string | undefined;
221
244
  /** Represents the view for a single basemap after it has been added to the map. */
@@ -883,6 +906,26 @@ export abstract class ArcgisMap extends LitElement {
883
906
  * Represents the current view as a Viewpoint or point of observation on the view.
884
907
  * Setting the viewpoint immediately changes the current view. For animating
885
908
  * the view, see this component's [goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) method.
909
+ *
910
+ * @example
911
+ * ```js
912
+ * // Set the viewpoint to the Empire State Building in New York City
913
+ * const viewElement = document.querySelector("arcgis-map");
914
+ * viewElement.viewpoint = new Viewpoint({
915
+ * targetGeometry: new Point({
916
+ * longitude: -73.9857,
917
+ * latitude: 40.7484
918
+ * }),
919
+ * scale: 5000
920
+ * });
921
+ * ```
922
+ * @example
923
+ * ```js
924
+ * // Get the initial viewpoint of the view once the view is ready
925
+ * const viewElement = document.querySelector("arcgis-map");
926
+ * await viewElement.viewOnReady();
927
+ * const initialViewpoint = viewElement.viewpoint.clone();
928
+ * ```
886
929
  */
887
930
  accessor viewpoint: Viewpoint;
888
931
  /**
@@ -304,7 +304,13 @@ export abstract class ArcgisPopup extends LitElement {
304
304
  * ```
305
305
  */
306
306
  accessor features: Array<Graphic>;
307
- /** @default false */
307
+ /**
308
+ * When `true`, this prevents the popup from trapping focus when opened.
309
+ * Preventing focus trapping can be used in scenarios where interactions are expected within the user interface, such as when the popup resides in a panel.
310
+ *
311
+ * @default false
312
+ * @since 5.1
313
+ */
308
314
  accessor focusTrapDisabled: boolean;
309
315
  /**
310
316
  * This function provides the ability to override either the [arcgis-map.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) or [arcgis-scene.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) methods.
@@ -234,7 +234,7 @@ export abstract class ArcgisSliderScaleRange extends LitElement {
234
234
  * Each region comes from the [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
235
235
  * See [SupportedRegion](https://developers.arcgis.com/javascript/latest/references/core/widgets/ScaleRangeSlider/types/#SupportedRegion) for the list of regions that are currently supported.
236
236
  */
237
- accessor region: SupportedRegion | string | undefined;
237
+ accessor region: SupportedRegion | undefined;
238
238
  /**
239
239
  * Indicates whether the world scale value is shown in the scale menu.
240
240
  *
@@ -1,13 +1,13 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { g as x, c as p } from "../../chunks/runtime.js";
3
- import { keyed as _ } from "lit/directives/keyed.js";
4
- import { LitElement as g, createEvent as d, safeStyleMap as u, nothing as M } from "@arcgis/lumina";
3
+ import { keyed as g } from "lit/directives/keyed.js";
4
+ import { LitElement as _, createEvent as d, safeStyleMap as u, nothing as v } from "@arcgis/lumina";
5
5
  import { watch as f } from "@arcgis/core/core/reactiveUtils.js";
6
- import { u as v } from "../../chunks/useView.js";
6
+ import { u as M } from "../../chunks/useView.js";
7
7
  import { u as y } from "../../chunks/useT9n.js";
8
8
  import { css as L, html as r } from "lit";
9
- import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
10
- import { createRef as b, ref as w } from "lit/directives/ref.js";
9
+ import { usePropertyChange as b } from "@arcgis/lumina/controllers";
10
+ import { createRef as $, ref as w } from "lit/directives/ref.js";
11
11
  import T from "@arcgis/core/portal/Portal.js";
12
12
  const h = /* @__PURE__ */ new Set([
13
13
  "ar-iq",
@@ -84,7 +84,35 @@ const h = /* @__PURE__ */ new Set([
84
84
  "th-th",
85
85
  "zh-cn",
86
86
  "zh-tw"
87
- ]), P = L`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
87
+ ]), R = {
88
+ ar: "iq",
89
+ bg: "bg",
90
+ cs: "cz",
91
+ da: "dk",
92
+ de: "de",
93
+ el: "gr",
94
+ en: "us",
95
+ es: "es",
96
+ et: "ee",
97
+ fi: "fi",
98
+ fr: "fr",
99
+ is: "is",
100
+ it: "it",
101
+ ja: "jp",
102
+ ko: "kr",
103
+ lt: "lt",
104
+ lv: "lv",
105
+ nl: "nl",
106
+ nn: "no",
107
+ pl: "pl",
108
+ pt: "br",
109
+ ro: "ro",
110
+ ru: "ru",
111
+ sk: "sk",
112
+ sv: "se",
113
+ th: "th",
114
+ zh: "cn"
115
+ }, P = L`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
88
116
  { id: "world", scale: 147914382, minScale: 147914382, maxScale: 1e8 },
89
117
  { id: "continent", scale: 5e7, minScale: 99999999, maxScale: 35e6 },
90
118
  { id: "countriesBig", scale: 25e6, minScale: 34999999, maxScale: 15e6 },
@@ -106,9 +134,9 @@ const h = /* @__PURE__ */ new Set([
106
134
  { id: "rooms", scale: 400, minScale: 400, maxScale: 101 },
107
135
  { id: "room", scale: 100, minScale: 100, maxScale: 0 }
108
136
  ];
109
- class R extends g {
137
+ class I extends _ {
110
138
  constructor() {
111
- super(...arguments), this.messages = y(), this._sliderRef = b(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = v(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = $()("state", "minScale", "maxScale"), this.arcgisReady = d();
139
+ super(...arguments), this.messages = y(), this._sliderRef = $(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = M(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = b()("state", "minScale", "maxScale"), this.arcgisReady = d();
112
140
  }
113
141
  static {
114
142
  this.properties = { _activeMenu: 16, _customScaleSelected: 16, _portalRegion: 16, _layerMaxScaleLimit: 16, _layerMinScaleLimit: 16, autoDestroyDisabled: 5, disabled: 7, hidePreview: 5, hideMaxScaleMenu: 5, hideMinScaleMenu: 5, icon: 1, label: 1, layer: 0, maxScale: 9, maxScaleLimit: 9, minScale: 9, minScaleLimit: 9, mode: 1, referenceElement: 1, region: 1, showWorldValue: 5, state: 32, view: 0 };
@@ -183,18 +211,24 @@ class R extends g {
183
211
  if (h.has(e))
184
212
  return e;
185
213
  if (this.region) {
186
- const a = `${this.messages._t9nLocale}-${this.region.toLowerCase()}`;
187
- if (h.has(a))
188
- return a;
214
+ const a = this.region.toLowerCase(), t = `${this.messages._t9nLocale}-${a}`;
215
+ if (h.has(t))
216
+ return t;
217
+ for (const s of h)
218
+ if (s.endsWith(`-${a}`))
219
+ return s;
189
220
  }
190
221
  if (this._portalRegion) {
191
222
  const a = `${this.messages._t9nLocale}-${this._portalRegion}`;
192
223
  if (h.has(a))
193
224
  return a;
194
225
  }
195
- const i = `${this.messages._t9nLocale}-${this.messages._t9nLocale}`;
196
- if (h.has(i))
197
- return i;
226
+ const i = R[this.messages._t9nLocale];
227
+ if (i) {
228
+ const a = `${this.messages._t9nLocale}-${i}`;
229
+ if (h.has(a))
230
+ return a;
231
+ }
198
232
  for (const a of h)
199
233
  if (a.startsWith(`${this.messages._t9nLocale}-`))
200
234
  return a;
@@ -243,7 +277,7 @@ class R extends g {
243
277
  }
244
278
  _renderCurrentScaleIndicator(e) {
245
279
  const i = this._sliderRef.value, a = i?.fullRangeMax ?? this._mapScaleToSlider(l[l.length - 1].maxScale), t = i?.fullRangeMin ?? this._mapScaleToSlider(l[0].minScale), s = a - t, c = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - t) / s * 100));
246
- return _("scale-indicator", r`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
280
+ return g("scale-indicator", r`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
247
281
  position: "absolute",
248
282
  left: `${c}%`
249
283
  })} .title=${`${this.messages.currentScale} 1:${Math.round(e).toLocaleString(this.messages._t9nLocale)}`}><calcite-icon icon=caret-up scale=s></calcite-icon></div></div>`);
@@ -295,7 +329,7 @@ class R extends g {
295
329
  if (typeof e != "number")
296
330
  return null;
297
331
  const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), m = `-${s}px -${c}px`, n = this._getSpriteSheetFile();
298
- return r`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${n}.avif`) ?? M} style=${u({
332
+ return r`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${n}.avif`) ?? v} style=${u({
299
333
  display: "block",
300
334
  height: `${t}px`,
301
335
  width: `${t}px`,
@@ -304,7 +338,7 @@ class R extends g {
304
338
  })}></div>`;
305
339
  }
306
340
  }
307
- p("arcgis-slider-scale-range", R);
341
+ p("arcgis-slider-scale-range", I);
308
342
  export {
309
- R as ArcgisSliderScaleRange
343
+ I as ArcgisSliderScaleRange
310
344
  };
@@ -204,7 +204,15 @@ export abstract class ArcgisVersionManagement extends LitElement {
204
204
  */
205
205
  accessor referenceElement: ArcgisReferenceElement | string | undefined;
206
206
  /**
207
- * The current state of the component.
207
+ * The current component state.
208
+ *
209
+ * * `disabled` - an error occured during initialization
210
+ * * `executing` - an operation is being performed
211
+ * * `failed` - an error occurred during execution
212
+ * * `loading` - the object is loading
213
+ * * `ready` - object loaded successfully or operation completed successfully
214
+ *
215
+ * When the component is ready, all items in [versioningStates](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-version-management/#versioningStates) are loaded.
208
216
  *
209
217
  * @since 5.0
210
218
  */
@@ -2,42 +2,42 @@
2
2
  import { c as T } from "../../chunks/runtime.js";
3
3
  import { css as A, html as c } from "lit";
4
4
  import { ref as O } from "lit/directives/ref.js";
5
- import { useDirection as S, usePropertyChange as B } from "@arcgis/lumina/controllers";
6
- import { classes as L } from "@arcgis/toolkit/dom";
7
- import { LitElement as E, createEvent as F, nothing as v, safeClassMap as b, safeStyleMap as D } from "@arcgis/lumina";
8
- import { u as j } from "../../chunks/useT9n.js";
9
- import { m as R } from "../../chunks/useViewModel.js";
10
- import { H } from "../../chunks/heading.js";
11
- import { g as x } from "../../chunks/globalCss.js";
12
- import P from "@arcgis/core/core/Accessor.js";
13
- import { property as p, subclass as V } from "@arcgis/core/core/accessorSupport/decorators.js";
5
+ import { useDirection as W, usePropertyChange as F } from "@arcgis/lumina/controllers";
6
+ import { classes as B } from "@arcgis/toolkit/dom";
7
+ import { LitElement as L, createEvent as E, nothing as v, safeClassMap as w, safeStyleMap as P } from "@arcgis/lumina";
8
+ import { u as R } from "../../chunks/useT9n.js";
9
+ import { m as V } from "../../chunks/useViewModel.js";
10
+ import { H as D } from "../../chunks/heading.js";
11
+ import { g as z } from "../../chunks/globalCss.js";
12
+ import j from "@arcgis/core/core/Accessor.js";
13
+ import { property as p, subclass as H } from "@arcgis/core/core/accessorSupport/decorators.js";
14
14
  import { watch as I } from "@arcgis/core/core/reactiveUtils.js";
15
15
  import C from "@arcgis/core/views/3d/environment/CloudyWeather.js";
16
16
  import $ from "@arcgis/core/views/3d/environment/FoggyWeather.js";
17
17
  import k from "@arcgis/core/views/3d/environment/RainyWeather.js";
18
- import M from "@arcgis/core/views/3d/environment/SnowyWeather.js";
19
- import z from "@arcgis/core/views/3d/environment/SunnyWeather.js";
20
- const K = A`.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}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;height:var(--button-size);flex-shrink:0;flex-grow:0;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp(24px, calc((100% - var(--total-gap)) / var(--weather-type-count)), 64px);flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`;
21
- var q = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, d = (o, e, t, i) => {
22
- for (var r = i > 1 ? void 0 : i ? Z(e, t) : e, n = o.length - 1, a; n >= 0; n--)
23
- (a = o[n]) && (r = (i ? a(e, t, r) : a(r)) || r);
24
- return i && r && q(e, t, r), r;
18
+ import S from "@arcgis/core/views/3d/environment/SnowyWeather.js";
19
+ import M from "@arcgis/core/views/3d/environment/SunnyWeather.js";
20
+ const K = A`.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}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);--button-size-min: 24px;--button-size-s-max: 32px;--button-size-m-max: 64px;display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;flex-shrink:0;flex-grow:0;aspect-ratio:1 / 1;height:fit-content;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp( var(--button-size-min), calc((100% - var(--total-gap)) / var(--weather-type-count)), var(--button-size-m-max) );flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`;
21
+ var N = Object.defineProperty, q = Object.getOwnPropertyDescriptor, d = (o, e, i, t) => {
22
+ for (var r = t > 1 ? void 0 : t ? q(e, i) : e, n = o.length - 1, a; n >= 0; n--)
23
+ (a = o[n]) && (r = (t ? a(e, i, r) : a(r)) || r);
24
+ return t && r && N(e, i, r), r;
25
25
  };
26
- const U = {
27
- sunny: z,
26
+ const G = {
27
+ sunny: M,
28
28
  cloudy: C,
29
29
  rainy: k,
30
- snowy: M,
30
+ snowy: S,
31
31
  foggy: $
32
- }, u = Object.keys(U);
33
- let s = class extends P {
32
+ }, h = Object.keys(G);
33
+ let l = class extends j {
34
34
  //#region Lifecycle
35
35
  constructor(o) {
36
36
  super(o), this._settingWeather = !1, this._weatherByType = {
37
- sunny: new z(),
37
+ sunny: new M(),
38
38
  cloudy: new C(),
39
39
  rainy: new k(),
40
- snowy: new M(),
40
+ snowy: new S(),
41
41
  foggy: new $()
42
42
  };
43
43
  }
@@ -95,70 +95,73 @@ let s = class extends P {
95
95
  };
96
96
  d([
97
97
  p()
98
- ], s.prototype, "view", 2);
98
+ ], l.prototype, "view", 2);
99
99
  d([
100
100
  p()
101
- ], s.prototype, "state", 1);
101
+ ], l.prototype, "state", 1);
102
102
  d([
103
103
  p()
104
- ], s.prototype, "disabled", 1);
104
+ ], l.prototype, "disabled", 1);
105
105
  d([
106
106
  p()
107
- ], s.prototype, "weatherByType", 1);
107
+ ], l.prototype, "weatherByType", 1);
108
108
  d([
109
109
  p()
110
- ], s.prototype, "error", 1);
110
+ ], l.prototype, "error", 1);
111
111
  d([
112
112
  p()
113
- ], s.prototype, "current", 1);
113
+ ], l.prototype, "current", 1);
114
114
  d([
115
115
  p()
116
- ], s.prototype, "_weatherByType", 2);
116
+ ], l.prototype, "_weatherByType", 2);
117
117
  d([
118
118
  p()
119
- ], s.prototype, "_environment", 1);
120
- s = d([
121
- V("components.weather.WeatherViewModel")
122
- ], s);
123
- function g({ label: o, ariaLabel: e, value: t, disabled: i, onChange: r }) {
124
- const n = (l) => {
125
- const h = l.currentTarget.value;
126
- r?.(h ?? 0);
119
+ ], l.prototype, "_environment", 1);
120
+ l = d([
121
+ H("components.weather.WeatherViewModel")
122
+ ], l);
123
+ function u({ label: o, ariaLabel: e, value: i, disabled: t, onChange: r }) {
124
+ const n = (s) => {
125
+ const g = s.currentTarget.value;
126
+ r?.(g ?? 0);
127
127
  };
128
- return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${i} .ariaLabel=${e} .labelText=${o} .value=${t} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
128
+ return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${t} .ariaLabel=${e} .labelText=${o} .value=${i} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
129
129
  }
130
- const G = R(s), J = {
130
+ const Z = V(l), U = {
131
131
  sunny: "brightness",
132
132
  cloudy: "partly-cloudy",
133
133
  rainy: "rain",
134
134
  snowy: "snow",
135
135
  foggy: "fog"
136
136
  };
137
- class N extends E {
137
+ class J extends L {
138
138
  constructor() {
139
- super(...arguments), this.viewModel = G(this), this.messages = j(), this.direction = S(), this._resizeAnimationFrame = void 0, this._resizeObserver = new ResizeObserver((e) => {
140
- for (const t of e)
141
- t.target instanceof HTMLElement && this._updateButtonMetrics(t.contentRect.width);
142
- }), this._buttonWidth = 0, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.headingLevel = 4, this.hideHeader = !1, this.icon = "partly-cloudy", this.label = this.messages.componentLabel, this.state = this.viewModel.state, this.arcgisPropertyChange = B()("state"), this.arcgisReady = F();
139
+ super(...arguments), this.viewModel = Z(this), this.messages = R(), this.direction = W(), this._resizeAnimationFrame = void 0, this._weatherTypeSelector = void 0, this._resizeObserver = new ResizeObserver((e) => {
140
+ for (const i of e)
141
+ i.target instanceof HTMLElement && this._updateButtonScale(i.target, i.contentRect.width);
142
+ }), this._buttonScale = "m", this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.headingLevel = 4, this.hideHeader = !1, this.icon = "partly-cloudy", this.label = this.messages.componentLabel, this.state = this.viewModel.state, this.arcgisPropertyChange = F()("state"), this.arcgisReady = E();
143
143
  }
144
144
  static {
145
- this.properties = { _buttonWidth: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
145
+ this.properties = { _buttonScale: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
146
146
  }
147
147
  static {
148
148
  this.styles = K;
149
149
  }
150
150
  async destroy() {
151
- await this.manager.destroy();
151
+ this._cleanupResizeObserver(), await this.manager.destroy();
152
152
  }
153
- _makeWeatherTypeButtonRef() {
154
- let e;
155
- return (t) => {
156
- t ? (e = t, this._resizeObserver.observe(t), this._updateButtonMetrics(t.clientWidth)) : e && (this._resizeObserver.unobserve(e), e = void 0);
153
+ _cleanupResizeObserver() {
154
+ this._resizeObserver.disconnect(), this._weatherTypeSelector = void 0, this._resizeAnimationFrame && (cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = void 0);
155
+ }
156
+ _makeWeatherTypeSelectorRef() {
157
+ return (e) => {
158
+ e !== this._weatherTypeSelector && (this._weatherTypeSelector && this._resizeObserver.unobserve(this._weatherTypeSelector), this._weatherTypeSelector = e, e && (this._resizeObserver.observe(e), this._updateButtonScale(e, e.clientWidth)));
157
159
  };
158
160
  }
159
- _updateButtonMetrics(e) {
161
+ _updateButtonScale(e, i) {
160
162
  this._resizeAnimationFrame && cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = requestAnimationFrame(() => {
161
- this._buttonWidth = e, this._resizeAnimationFrame = void 0;
163
+ const t = getComputedStyle(e), r = Number.parseFloat(t.getPropertyValue("--button-gap")), n = Number.parseFloat(t.getPropertyValue("--button-size-min")), a = Number.parseFloat(t.getPropertyValue("--button-size-s-max")), s = Number.parseFloat(t.getPropertyValue("--button-size-m-max")), g = (h.length - 1) * r, m = Math.max(n, Math.min((i - g) / h.length, s));
164
+ this._buttonScale = m < a ? "s" : m < s ? "m" : "l", this._resizeAnimationFrame = void 0;
162
165
  });
163
166
  }
164
167
  _getWarningMessage() {
@@ -183,38 +186,37 @@ class N extends E {
183
186
  }
184
187
  }
185
188
  render() {
186
- return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${b({
189
+ return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${w({
187
190
  root: !0,
188
- [x.widget]: !0,
189
- [x.widgetDisabled]: this.viewModel.disabled
191
+ [z.widget]: !0,
192
+ [z.widgetDisabled]: this.viewModel.disabled
190
193
  })} role=region>${this._renderContent()}</div>`;
191
194
  }
192
195
  _renderContent() {
193
- const { headingLevel: e, messages: t, viewModel: i } = this, r = this._getWarningMessage(), n = i.current, a = i.state === "error";
194
- return c`${this.hideHeader ? void 0 : H({ level: e, children: t.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${b(L({ content: !0, error: a }))}><div .ariaLabel=${t.weatherType} class="weather-type-selector" role=radiogroup style=${D({
195
- "--weather-type-count": String(u.length),
196
- "--button-size": `${this._buttonWidth}px`
197
- })}>${u.map(this._renderWeatherTypeButton, this)}</div>${Object.values(i.weatherByType).map((l) => c`<div class=${b({
196
+ const { headingLevel: e, messages: i, viewModel: t } = this, r = this._getWarningMessage(), n = t.current, a = t.state === "error";
197
+ return c`${this.hideHeader ? void 0 : D({ level: e, children: i.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${w(B({ content: !0, error: a }))}><div .ariaLabel=${i.weatherType} class="weather-type-selector" role=radiogroup style=${P({
198
+ "--weather-type-count": String(h.length)
199
+ })} ${O(this._makeWeatherTypeSelectorRef())}>${h.map(this._renderWeatherTypeButton, this)}</div>${Object.values(t.weatherByType).map((s) => c`<div class=${w({
198
200
  options: !0,
199
- hidden: l.type !== n?.type
200
- })}>${this._renderOptions(l)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
201
+ hidden: s.type !== n?.type
202
+ })}>${this._renderOptions(s)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
201
203
  }
202
204
  _renderWeatherTypeButton(e) {
203
- const t = this.messages[e]?.label ?? "", { disabled: i } = this.viewModel, r = !i && this.viewModel.current.type === e;
204
- return c`<calcite-button role=radio .label=${t} .name=${t} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? v} .disabled=${i} .iconStart=${J[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonWidth < 32 ? "s" : this._buttonWidth < 64 ? "m" : "l"} @keydown=${(n) => {
205
+ const i = this.messages[e]?.label ?? "", { disabled: t } = this.viewModel, r = !t && this.viewModel.current.type === e;
206
+ return c`<calcite-button role=radio .label=${i} .name=${i} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? v} .disabled=${t} .iconStart=${U[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonScale} @keydown=${(n) => {
205
207
  const a = n.key;
206
- let l = ["ArrowRight", "ArrowDown"], h = ["ArrowLeft", "ArrowUp"];
208
+ let s = ["ArrowRight", "ArrowDown"], g = ["ArrowLeft", "ArrowUp"];
207
209
  if (this.direction === "rtl") {
208
- const m = l;
209
- l = h, h = m;
210
+ const b = s;
211
+ s = g, g = b;
210
212
  }
211
- const W = l.includes(a), w = h.includes(a);
212
- if (W || w) {
213
+ const m = s.includes(a), _ = g.includes(a);
214
+ if (m || _) {
213
215
  n.preventDefault();
214
- const m = u.indexOf(e), f = u.length, _ = (m + (w ? -1 : 1) + f) % f;
215
- this.viewModel.setWeatherByType(u[_]);
216
- const y = n.currentTarget.parentElement?.parentElement;
217
- y && Array.from(y.querySelectorAll("calcite-button") ?? [])[_]?.setFocus();
216
+ const b = h.indexOf(e), f = h.length, y = (b + (_ ? -1 : 1) + f) % f;
217
+ this.viewModel.setWeatherByType(h[y]);
218
+ const x = n.currentTarget.parentElement?.parentElement;
219
+ x && Array.from(x.querySelectorAll("calcite-button") ?? [])[y]?.setFocus();
218
220
  }
219
221
  }} @click=${(n) => {
220
222
  if (r)
@@ -224,7 +226,7 @@ class N extends E {
224
226
  requestAnimationFrame(() => {
225
227
  this.viewModel.current.type === e && a.setFocus();
226
228
  });
227
- }} title=${t ?? v} ${O(this._makeWeatherTypeButtonRef())}></calcite-button>`;
229
+ }} title=${i ?? v}></calcite-button>`;
228
230
  }
229
231
  _renderOptions(e) {
230
232
  switch (e.type) {
@@ -241,46 +243,46 @@ class N extends E {
241
243
  }
242
244
  }
243
245
  _renderSunnyOptions(e) {
244
- const t = this.messages.sunny;
245
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
246
- e.cloudCover = i;
246
+ const i = this.messages.sunny;
247
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
248
+ e.cloudCover = t;
247
249
  } });
248
250
  }
249
251
  _renderCloudyOptions(e) {
250
- const t = this.messages.cloudy;
251
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
252
- e.cloudCover = i;
252
+ const i = this.messages.cloudy;
253
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
254
+ e.cloudCover = t;
253
255
  } });
254
256
  }
255
257
  _renderRainyOptions(e) {
256
- const { disabled: t } = this.viewModel, i = this.messages.rainy;
257
- return c`${g({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
258
+ const { disabled: i } = this.viewModel, t = this.messages.rainy;
259
+ return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
258
260
  e.cloudCover = r;
259
- } })}${g({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
261
+ } })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
260
262
  e.precipitation = r;
261
263
  } })}`;
262
264
  }
263
265
  _renderSnowyOptions(e) {
264
- const { disabled: t } = this.viewModel, i = this.messages.snowy;
265
- return c`${g({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
266
+ const { disabled: i } = this.viewModel, t = this.messages.snowy;
267
+ return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
266
268
  e.cloudCover = r;
267
- } })}${g({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
269
+ } })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
268
270
  e.precipitation = r;
269
- } })}<calcite-label layout=inline title=${i?.snowCoverTooltip ?? v}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${t} @calciteCheckboxChange=${(r) => {
271
+ } })}<calcite-label layout=inline title=${t?.snowCoverTooltip ?? v}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${i} @calciteCheckboxChange=${(r) => {
270
272
  this.viewModel.setSnowCoverEnabled(r.currentTarget.checked);
271
- }}></calcite-checkbox>${i?.snowCover}</calcite-label>`;
273
+ }}></calcite-checkbox>${t?.snowCover}</calcite-label>`;
272
274
  }
273
275
  _renderFoggyOptions(e) {
274
- const t = this.messages.foggy;
275
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.fogStrengthAria, label: t?.fogStrength, value: e.fogStrength, onChange: (i) => {
276
- e.fogStrength = i;
276
+ const i = this.messages.foggy;
277
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.fogStrengthAria, label: i?.fogStrength, value: e.fogStrength, onChange: (t) => {
278
+ e.fogStrength = t;
277
279
  } });
278
280
  }
279
281
  _renderWarning(e) {
280
282
  return c`<calcite-notice aria-live=polite open icon=exclamation-mark-triangle-f kind=warning><div slot=title class="warning-title">${this.messages.warningTitle}</div><div slot=message>${e}</div></calcite-notice>`;
281
283
  }
282
284
  }
283
- T("arcgis-weather", N);
285
+ T("arcgis-weather", J);
284
286
  export {
285
- N as ArcgisWeather
287
+ J as ArcgisWeather
286
288
  };