@arcgis/map-components 6.0.0-next.21 → 6.0.0-next.23

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 (134) hide show
  1. package/dist/cdn/{G56N6RF4.js → 2S6RQ6Q4.js} +1 -1
  2. package/dist/cdn/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
  3. package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
  4. package/dist/cdn/4N4XDCDQ.js +2 -0
  5. package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
  6. package/dist/cdn/{UFK7DHVC.js → 4WZ7Y57Q.js} +1 -1
  7. package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
  8. package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
  9. package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
  10. package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
  11. package/dist/cdn/6GGKA7MT.js +2 -0
  12. package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
  13. package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
  14. package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
  15. package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
  16. package/dist/cdn/{FDESUDJ5.js → AIF4MCBB.js} +1 -1
  17. package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
  18. package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
  19. package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
  20. package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
  21. package/dist/cdn/EJVFK7JX.js +2 -0
  22. package/dist/cdn/{SDLZ4BNM.js → EVWWTIEQ.js} +1 -1
  23. package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
  24. package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
  25. package/dist/cdn/GIQT67VT.js +2 -0
  26. package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
  27. package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
  28. package/dist/cdn/{GQQTIX2X.js → HQXC5XLE.js} +1 -1
  29. package/dist/cdn/HTONXZBP.js +2 -0
  30. package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
  31. package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
  32. package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
  33. package/dist/cdn/KXDLX4RE.js +2 -0
  34. package/dist/cdn/{4I6F64B2.js → LKKCTKMQ.js} +1 -1
  35. package/dist/cdn/MW27GSDX.js +2 -0
  36. package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
  37. package/dist/cdn/{4LNXCEM5.js → NORQIOSX.js} +1 -1
  38. package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
  39. package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
  40. package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
  41. package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
  42. package/dist/cdn/{NHMHVWNB.js → QKNHYZYS.js} +1 -1
  43. package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
  44. package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
  45. package/dist/cdn/RFO3M46K.js +2 -0
  46. package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
  47. package/dist/cdn/SLWZHNVT.js +2 -0
  48. package/dist/cdn/TKIWKCDA.js +2 -0
  49. package/dist/cdn/{WTAAQHO3.js → TM4FFRX5.js} +1 -1
  50. package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
  51. package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
  52. package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
  53. package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
  54. package/dist/cdn/V3J5GQHD.js +2 -0
  55. package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
  56. package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
  57. package/dist/cdn/XWBR6FXI.js +2 -0
  58. package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
  59. package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
  60. package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
  61. package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
  62. package/dist/cdn/ZF7NUFAT.js +2 -0
  63. package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
  64. package/dist/cdn/index.js +1 -1
  65. package/dist/cdn/main.css +1 -1
  66. package/dist/chunks/useArcgisViewReadyError.js +155 -151
  67. package/dist/chunks/useViewModel.js +7 -7
  68. package/dist/components/arcgis-basemap-layer-list-next/customElement.js +88 -86
  69. package/dist/components/arcgis-daylight/customElement.js +2 -1
  70. package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
  71. package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
  72. package/dist/components/arcgis-features-next/customElement.js +14 -15
  73. package/dist/components/arcgis-layer-list-item-indicator/customElement.js +2 -2
  74. package/dist/components/arcgis-layer-list-item-panel/customElement.js +9 -9
  75. package/dist/components/arcgis-layer-list-next/customElement.js +97 -95
  76. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
  77. package/dist/components/arcgis-search/customElement.d.ts +12 -0
  78. package/dist/components/arcgis-search/customElement.js +3 -0
  79. package/dist/components/arcgis-sketch/customElement.d.ts +308 -30
  80. package/dist/components/arcgis-sketch/customElement.js +48 -21
  81. package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
  82. package/dist/components/arcgis-swipe/customElement.js +45 -63
  83. package/dist/components/arcgis-table-list-next/customElement.js +55 -54
  84. package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
  85. package/dist/components/arcgis-time-bar/types.d.ts +36 -15
  86. package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
  87. package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
  88. package/dist/components/arcgis-track/customElement.d.ts +12 -3
  89. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
  90. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
  91. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
  92. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
  93. package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
  94. package/dist/components/arcgis-video-player/customElement.js +72 -72
  95. package/dist/components/arcgis-video-player/index.js +4 -4
  96. package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
  97. package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
  98. package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
  99. package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
  100. package/dist/components/arcgis-video-player-slider/index.js +1 -0
  101. package/dist/docs/api.json +1 -1
  102. package/dist/docs/docs.json +1 -1
  103. package/dist/docs/vscode.html-custom-data.json +1 -1
  104. package/dist/docs/web-types.json +1 -1
  105. package/dist/index.d.ts +0 -20
  106. package/dist/loader.js +4 -5
  107. package/dist/types/lumina.d.ts +3 -24
  108. package/dist/types/preact.d.ts +3 -26
  109. package/dist/types/react.d.ts +3 -28
  110. package/dist/types/stencil.d.ts +3 -24
  111. package/package.json +6 -6
  112. package/dist/cdn/COSETVX4.js +0 -2
  113. package/dist/cdn/ED2T4ASN.js +0 -2
  114. package/dist/cdn/F74YQZ2X.js +0 -2
  115. package/dist/cdn/KXD4VEKE.js +0 -2
  116. package/dist/cdn/MBLS5ES4.js +0 -2
  117. package/dist/cdn/OJJSIN3V.js +0 -2
  118. package/dist/cdn/P3565WG3.js +0 -2
  119. package/dist/cdn/PHVKEWZ7.js +0 -2
  120. package/dist/cdn/QAOT2TJ6.js +0 -2
  121. package/dist/cdn/QKGJVGXJ.js +0 -2
  122. package/dist/cdn/QVJ2FUNW.js +0 -2
  123. package/dist/cdn/UI4IEVSV.js +0 -2
  124. package/dist/cdn/UPCWZNTA.js +0 -2
  125. package/dist/cdn/VEV3AAVP.js +0 -2
  126. package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
  127. package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
  128. package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
  129. package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
  130. package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
  131. package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
  132. package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
  133. package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
  134. /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
@@ -1,21 +1,21 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as g } from "../../chunks/runtime.js";
3
- import { css as v, html as s } from "lit";
2
+ import { c as p } from "../../chunks/runtime.js";
3
+ import { css as v, html as a } from "lit";
4
4
  import { watch as d } from "@arcgis/core/core/reactiveUtils.js";
5
5
  import { LitElement as w, createEvent as u, safeClassMap as _ } from "@arcgis/lumina";
6
6
  import { usePropertyChange as T } from "@arcgis/lumina/controllers";
7
- import { classes as M } from "@arcgis/toolkit/dom";
8
- import { createRef as b, ref as D } from "lit/directives/ref.js";
7
+ import { classes as b } from "@arcgis/toolkit/dom";
8
+ import { createRef as M, ref as D } from "lit/directives/ref.js";
9
9
  import { u as V } from "../../chunks/useT9n.js";
10
10
  import { m as $ } from "../../chunks/useViewModel.js";
11
11
  import { g as P } from "../../chunks/globalCss.js";
12
12
  import { n as f } from "../../chunks/video-utils.js";
13
13
  import C from "@arcgis/core/core/Accessor.js";
14
14
  import { property as l, subclass as S } from "@arcgis/core/core/accessorSupport/decorators.js";
15
- var L = Object.defineProperty, k = Object.getOwnPropertyDescriptor, a = (e, i, n, h) => {
16
- for (var r = h > 1 ? void 0 : h ? k(i, n) : i, y = e.length - 1, c; y >= 0; y--)
17
- (c = e[y]) && (r = (h ? c(i, n, r) : c(r)) || r);
18
- return h && r && L(i, n, r), r;
15
+ var L = Object.defineProperty, k = Object.getOwnPropertyDescriptor, s = (e, t, n, h) => {
16
+ for (var r = h > 1 ? void 0 : h ? k(t, n) : t, y = e.length - 1, c; y >= 0; y--)
17
+ (c = e[y]) && (r = (h ? c(t, n, r) : c(r)) || r);
18
+ return h && r && L(t, n, r), r;
19
19
  };
20
20
  const o = {
21
21
  FrameCenterElevation: 10025,
@@ -29,15 +29,15 @@ const o = {
29
29
  PlatformTrueAirspeed: 10008,
30
30
  PrecisionTimeStamp: 10002
31
31
  };
32
- function m(e, i) {
32
+ function m(e, t) {
33
33
  const n = {};
34
- for (const h of i) {
34
+ for (const h of t) {
35
35
  const r = e.get(h);
36
36
  r && (n[r.name] = String(r.value));
37
37
  }
38
38
  return n;
39
39
  }
40
- let t = class extends C {
40
+ let i = class extends C {
41
41
  //#region Lifecycle
42
42
  constructor(e) {
43
43
  super(e), this.followingMode = "follow-both", this.seekLength = 10;
@@ -46,8 +46,8 @@ let t = class extends C {
46
46
  this.addHandles([
47
47
  d(
48
48
  () => this.layer,
49
- (e, i) => {
50
- i && i.pause(), e && e.load().then(() => this._followTelemetry()).catch(() => {
49
+ (e, t) => {
50
+ t && t.pause(), e && e.load().then(() => this._followTelemetry()).catch(() => {
51
51
  });
52
52
  },
53
53
  { initial: !0 }
@@ -164,8 +164,8 @@ let t = class extends C {
164
164
  d(
165
165
  () => this.layer?.telemetry,
166
166
  () => {
167
- const e = [], i = this.followingMode === "follow-frame" || this.followingMode === "follow-both";
168
- if ((this.followingMode === "follow-sensor" || this.followingMode === "follow-both") && this.layer?.telemetry.sensorLocation && e.push(this.layer.telemetry.sensorLocation), i && this.layer?.telemetry.frameCenter && e.push(this.layer.telemetry.frameCenter), !e.length) {
167
+ const e = [], t = this.followingMode === "follow-frame" || this.followingMode === "follow-both";
168
+ if ((this.followingMode === "follow-sensor" || this.followingMode === "follow-both") && this.layer?.telemetry.sensorLocation && e.push(this.layer.telemetry.sensorLocation), t && this.layer?.telemetry.frameCenter && e.push(this.layer.telemetry.frameCenter), !e.length) {
169
169
  this.layer?.initialExtent && this.followingMode !== "none" && this.view?.goTo(this.layer.initialExtent).catch(() => {
170
170
  });
171
171
  return;
@@ -180,108 +180,108 @@ let t = class extends C {
180
180
  }
181
181
  //#endregion
182
182
  };
183
- a([
183
+ s([
184
184
  l({ readOnly: !0 })
185
- ], t.prototype, "buffered", 1);
186
- a([
185
+ ], i.prototype, "buffered", 1);
186
+ s([
187
187
  l({ readOnly: !0 })
188
- ], t.prototype, "currentTime", 1);
189
- a([
188
+ ], i.prototype, "currentTime", 1);
189
+ s([
190
190
  l({ readOnly: !0 })
191
- ], t.prototype, "duration", 1);
192
- a([
191
+ ], i.prototype, "duration", 1);
192
+ s([
193
193
  l({ readOnly: !0 })
194
- ], t.prototype, "ended", 1);
195
- a([
194
+ ], i.prototype, "ended", 1);
195
+ s([
196
196
  l()
197
- ], t.prototype, "followingMode", 2);
198
- a([
197
+ ], i.prototype, "followingMode", 2);
198
+ s([
199
199
  l()
200
- ], t.prototype, "layer", 2);
201
- a([
200
+ ], i.prototype, "layer", 2);
201
+ s([
202
202
  l({ readOnly: !0 })
203
- ], t.prototype, "metadata", 1);
204
- a([
203
+ ], i.prototype, "metadata", 1);
204
+ s([
205
205
  l({ readOnly: !0 })
206
- ], t.prototype, "playing", 1);
207
- a([
206
+ ], i.prototype, "playing", 1);
207
+ s([
208
208
  l({ readOnly: !0 })
209
- ], t.prototype, "previewsInfo", 1);
210
- a([
209
+ ], i.prototype, "previewsInfo", 1);
210
+ s([
211
211
  l()
212
- ], t.prototype, "seekLength", 2);
213
- a([
212
+ ], i.prototype, "seekLength", 2);
213
+ s([
214
214
  l({ readOnly: !0 })
215
- ], t.prototype, "state", 1);
216
- a([
215
+ ], i.prototype, "state", 1);
216
+ s([
217
217
  l()
218
- ], t.prototype, "view", 2);
219
- t = a([
218
+ ], i.prototype, "view", 2);
219
+ i = s([
220
220
  S("map-components.video-player.VideoPlayerViewModel")
221
- ], t);
222
- const x = t, O = v`:host{--arcgis-internal-video-player-controls-spacing: 16px;width:531px;height:100%}:host([inline]){width:auto;height:auto}.root,.content{height:100%}.inline{display:flex;gap:var(--calcite-spacing-xs);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.footer{flex:1}arcgis-video{display:flex;flex:1 1 auto;aspect-ratio:16 / 9;min-height:0}`, F = $(x);
221
+ ], i);
222
+ const x = i, O = v`:host{--arcgis-internal-video-player-controls-spacing: 16px;width:531px;height:100%}:host([inline]){width:auto;height:auto}.root,.content{height:100%}.inline{display:flex;gap:var(--calcite-spacing-xs);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.footer{flex:1}arcgis-video{display:flex;flex:1 1 auto;aspect-ratio:16 / 9;min-height:0}`, F = $(x);
223
223
  class R extends w {
224
224
  constructor() {
225
- super(...arguments), this.messages = V({ blocking: !0 }), this.viewModel = F(this), this._videoViewRef = b(), this._metadataVisible = !1, this._duration = 0, this._currentTime = 0, this._bufferedValue = 0, this._currentValue = 0, this._isBuffering = !1, this._videoViewReady = !1, this._loopPlayback = !1, this.icon = "video-web", this.state = this.viewModel.state, this.layer = this.viewModel.layer, this.autoDestroyDisabled = !1, this.inline = !1, this.showFullscreenToggle = !1, this.operationalDataVisible = !1, this.hideHeader = !1, this.view = this.viewModel.view, this.arcgisPropertyChange = T()("state", "layer"), this.arcgisReady = u(), this.arcgisVideoReady = u();
225
+ super(...arguments), this.messages = V({ blocking: !0 }), this._viewModel = F(this), this._videoViewRef = M(), this._bufferedValue = 0, this._currentTime = 0, this._currentValue = 0, this._duration = 0, this._isBuffering = !1, this._loopPlayback = !1, this._metadataVisible = !1, this._videoViewReady = !1, this.icon = "video-web", this.state = this._viewModel.state, this.layer = this._viewModel.layer, this.autoDestroyDisabled = !1, this.inline = !1, this.showFullscreenToggle = !1, this.operationalDataVisible = !1, this.hideHeader = !1, this.view = this._viewModel.view, this.arcgisPropertyChange = T()("state", "layer"), this.arcgisReady = u(), this.arcgisVideoReady = u();
226
226
  }
227
227
  static {
228
- this.properties = { _metadataVisible: 16, _duration: 16, _currentTime: 16, _bufferedValue: 16, _currentValue: 16, _isBuffering: 16, _videoViewReady: 16, _layerTitle: 16, _isLive: 16, _loopPlayback: 16, referenceElement: 1, icon: 1, state: 32, followingMode: 1, layer: 0, autoDestroyDisabled: 5, messageOverrides: 0, label: 3, inline: 7, showFullscreenToggle: 5, operationalDataVisible: 5, hideHeader: 5, view: 0 };
228
+ this.properties = { _bufferedValue: 16, _currentTime: 16, _currentValue: 16, _duration: 16, _isBuffering: 16, _isLive: 16, _layerTitle: 16, _loopPlayback: 16, _metadataVisible: 16, _videoViewReady: 16, referenceElement: 1, icon: 1, state: 32, followingMode: 1, layer: 0, autoDestroyDisabled: 5, messageOverrides: 0, label: 3, inline: 7, showFullscreenToggle: 5, operationalDataVisible: 5, hideHeader: 5, view: 0 };
229
229
  }
230
230
  static {
231
231
  this.styles = O;
232
232
  }
233
233
  get followingMode() {
234
- return this.viewModel.followingMode;
234
+ return this._viewModel.followingMode;
235
235
  }
236
- set followingMode(i) {
237
- this.viewModel.followingMode = i;
236
+ set followingMode(t) {
237
+ this._viewModel.followingMode = t;
238
238
  }
239
239
  async destroy() {
240
240
  await this.manager.destroy();
241
241
  }
242
242
  loaded() {
243
243
  this.manager.onLifecycle(() => [
244
- d(() => [this.viewModel.currentTime, this.viewModel.duration, this.viewModel.buffered, this.viewModel.ended], () => {
245
- const { buffered: i, currentTime: n, duration: h, ended: r } = this.viewModel, y = f(h), c = f(n), p = f(i);
246
- this._duration = y, this._currentTime = c, this._bufferedValue = p / (y || 1), this._currentValue = c / (y || 1), this._isBuffering = !r && this._bufferedValue < this._currentValue;
244
+ d(() => [this._viewModel.currentTime, this._viewModel.duration, this._viewModel.buffered, this._viewModel.ended], () => {
245
+ const { buffered: t, currentTime: n, duration: h, ended: r } = this._viewModel, y = f(h), c = f(n), g = f(t);
246
+ this._duration = y, this._currentTime = c, this._bufferedValue = g / (y || 1), this._currentValue = c / (y || 1), this._isBuffering = !r && this._bufferedValue < this._currentValue;
247
247
  }),
248
- d(() => this.layer?.title, (i) => {
249
- this._layerTitle = i ?? void 0;
248
+ d(() => this.layer?.title, (t) => {
249
+ this._layerTitle = t ?? void 0;
250
250
  }, { initial: !0 }),
251
- d(() => this.layer?.isLive, (i) => {
252
- this._isLive = i ?? void 0;
251
+ d(() => this.layer?.isLive, (t) => {
252
+ this._isLive = t ?? void 0;
253
253
  }, { initial: !0 }),
254
- d(() => this.layer?.playbackRate, (i) => {
255
- typeof i == "number" && this.viewModel.changePlaybackSpeed(i);
254
+ d(() => this.layer?.playbackRate, (t) => {
255
+ typeof t == "number" && this._viewModel.changePlaybackSpeed(t);
256
256
  }, { initial: !0 }),
257
- d(() => this.viewModel.view?.map, () => this.requestUpdate())
257
+ d(() => this._viewModel.view?.map, () => this.requestUpdate())
258
258
  ]);
259
259
  }
260
260
  render() {
261
- return s`<div class=${_(M(this.inline ? "inline" : "root", P.widget))}><calcite-panel .heading=${this.hideHeader || this.inline ? void 0 : this._layerTitle ?? this.messages.videoPlayer}>${this.inline || this.hideHeader || !this.showFullscreenToggle ? null : s`<calcite-action slot=header-actions-end icon=full-screen-exit text=minimize @click=${() => this.inline = !this.inline}></calcite-action>`}${this.inline ? s`<div class="inline">${this._renderActionBar()}${this._renderSlider()}${this.showFullscreenToggle ? s`<calcite-action icon=full-screen text=maximize @click=${() => this.inline = !this.inline}></calcite-action>` : null}</div>` : s`<div class="content">${this._renderLoadingScrim()}${this._renderBuffering()}${this._renderVideoSection()}</div>`}${this.inline ? null : s`<div slot=footer class="footer">${this._renderSlider()}${this._renderActionBar()}${this._renderMetadataSection()}</div>`}</calcite-panel></div>`;
261
+ return a`<div class=${_(b(this.inline ? "inline" : "root", P.widget))}><calcite-panel .heading=${this.hideHeader || this.inline ? void 0 : this._layerTitle ?? this.messages.videoPlayer}>${this.inline || this.hideHeader || !this.showFullscreenToggle ? null : a`<calcite-action slot=header-actions-end icon=full-screen-exit .text=${this.messages.minimize} @click=${() => this.inline = !this.inline}></calcite-action>`}${this.inline ? a`<div class="inline">${this._renderActionBar()}${this._renderSlider()}${this.showFullscreenToggle ? a`<calcite-action icon=full-screen .text=${this.messages.maximize} @click=${() => this.inline = !this.inline}></calcite-action>` : null}</div>` : a`<div class="content">${this._renderLoadingScrim()}${this._renderBuffering()}${this._renderVideoSection()}</div>`}${this.inline ? null : a`<div slot=footer class="footer">${this._renderSlider()}${this._renderActionBar()}${this._renderMetadataSection()}</div>`}</calcite-panel></div>`;
262
262
  }
263
- _renderLoadingScrim() {
264
- return this._videoViewReady ? null : s`<calcite-scrim .loading=${this.state !== "error"}>${this.state === "error" ? this.messages.errorLoadingLayer : null}</calcite-scrim>`;
263
+ _renderActionBar() {
264
+ return a`<arcgis-video-player-action-bar .currentTime=${this._currentTime} .duration=${this._duration} .messages=${this.messages} .toggleMetadata=${() => this._metadataVisible = !this._metadataVisible} .viewModel=${this._viewModel} .inline=${this.inline}></arcgis-video-player-action-bar>`;
265
265
  }
266
266
  _renderBuffering() {
267
- return this._isBuffering ? s`<calcite-progress type=indeterminate></calcite-progress>` : null;
267
+ return this._isBuffering ? a`<calcite-progress .label=${this.messages.buffering} type=indeterminate></calcite-progress>` : null;
268
268
  }
269
- _renderVideoSection() {
270
- return s`<arcgis-video .layer=${this.layer} .map=${this.viewModel.view?.map} .operationalDataVisible=${this.operationalDataVisible} @arcgisViewReadyChange=${() => {
271
- this._videoViewReady = !0, this.arcgisVideoReady.emit();
272
- }} ${D(this._videoViewRef)}></arcgis-video>`;
269
+ _renderLoadingScrim() {
270
+ return !this._videoViewReady && (this.state === "not-ready" || this.state === "error") ? a`<calcite-scrim .loading=${this.state === "not-ready"}>${this.state === "error" ? this.messages.errorLoadingLayer : null}</calcite-scrim>` : null;
273
271
  }
274
- _renderSlider() {
275
- return this._isLive ? null : s`<arcgis-video-player-slider .buffered=${this._bufferedValue} .messages=${this.messages} .value=${this._currentValue * 100} .viewModel=${this.viewModel}></arcgis-video-player-slider>`;
272
+ _renderMetadataSection() {
273
+ return this._metadataVisible ? a`<arcgis-video-player-metadata .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-video-player-metadata>` : null;
276
274
  }
277
- _renderActionBar() {
278
- return s`<arcgis-video-player-action-bar .currentTime=${this._currentTime} .duration=${this._duration} .messages=${this.messages} .toggleMetadata=${() => this._metadataVisible = !this._metadataVisible} .viewModel=${this.viewModel} .inline=${this.inline}></arcgis-video-player-action-bar>`;
275
+ _renderSlider() {
276
+ return this._isLive ? null : a`<arcgis-video-player-slider .buffered=${this._bufferedValue} .messages=${this.messages} .value=${this._currentValue * 100} .viewModel=${this._viewModel}></arcgis-video-player-slider>`;
279
277
  }
280
- _renderMetadataSection() {
281
- return this._metadataVisible ? s`<arcgis-video-player-metadata .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-video-player-metadata>` : null;
278
+ _renderVideoSection() {
279
+ return a`<arcgis-video .layer=${this.layer} .map=${this._viewModel.view?.map} .operationalDataVisible=${this.operationalDataVisible} @arcgisViewReadyChange=${() => {
280
+ this._videoViewReady = !0, this.arcgisVideoReady.emit();
281
+ }} ${D(this._videoViewRef)}></arcgis-video>`;
282
282
  }
283
283
  }
284
- g("arcgis-video-player", R);
284
+ p("arcgis-video-player", R);
285
285
  export {
286
286
  R as ArcgisVideoPlayer
287
287
  };
@@ -1,9 +1,9 @@
1
1
  import "@esri/calcite-components/components/calcite-panel";
2
2
  import "@esri/calcite-components/components/calcite-action";
3
- import "@esri/calcite-components/components/calcite-scrim";
4
- import "@esri/calcite-components/components/calcite-progress";
5
- import "../arcgis-video/index.js";
6
- import "../arcgis-video-player-slider/index.js";
7
3
  import "../arcgis-video-player-action-bar/index.js";
4
+ import "@esri/calcite-components/components/calcite-progress";
5
+ import "@esri/calcite-components/components/calcite-scrim";
8
6
  import "../arcgis-video-player-metadata/index.js";
7
+ import "../arcgis-video-player-slider/index.js";
8
+ import "../arcgis-video/index.js";
9
9
  export * from "./customElement.js";
@@ -24,7 +24,7 @@ class v extends r {
24
24
  const { messages: i } = this;
25
25
  this._isLive === void 0 && (this._isLive = this.viewModel.layer?.isLive);
26
26
  const s = this._isLive ? t(this.currentTime) : `${t(this.currentTime)} / ${t(this.duration)}`;
27
- return e`<div class=${c(n("toolbar"))}><div class="controls-container"><arcgis-video-player-actions-group .inline=${this.inline} .messages=${i} .viewModel=${this.viewModel}></arcgis-video-player-actions-group>${this._isLive ? e`<calcite-icon class="live-icon" icon=beacon></calcite-icon>` : null}${!this.inline || this._isLive ? e`<div class="timecode">${s}</div>` : null}</div>${this.inline ? null : e`<arcgis-video-player-controls-group class="controls-group" .messages=${i} .toggleMetadata=${() => this.toggleMetadata()} .viewModel=${this.viewModel}></arcgis-video-player-controls-group>`}</div>`;
27
+ return e`<div class=${c(n("toolbar"))}><div class="controls-container"><arcgis-video-player-actions-group .inline=${this.inline} .messages=${i} .viewModel=${this.viewModel}></arcgis-video-player-actions-group>${this._isLive ? e`<calcite-icon class="live-icon" icon=beacon .textLabel=${i.live}></calcite-icon>` : null}${!this.inline || this._isLive ? e`<div class="timecode">${s}</div>` : null}</div>${this.inline ? null : e`<arcgis-video-player-controls-group class="controls-group" .messages=${i} .toggleMetadata=${() => this.toggleMetadata()} .viewModel=${this.viewModel}></arcgis-video-player-controls-group>`}</div>`;
28
28
  }
29
29
  }
30
30
  o("arcgis-video-player-action-bar", v);
@@ -0,0 +1,159 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import { c as v } from "../../chunks/runtime.js";
3
+ import { ref as d } from "lit/directives/ref.js";
4
+ import { css as c, html as w } from "lit";
5
+ import m from "@arcgis/core/core/Error.js";
6
+ import u from "@arcgis/core/core/Handles.js";
7
+ import { on as a, watch as f, whenOnce as b } from "@arcgis/core/core/reactiveUtils.js";
8
+ import g from "@arcgis/core/request.js";
9
+ import { LitElement as _, nothing as p } from "@arcgis/lumina";
10
+ import { i as C, l as I } from "../../chunks/async-utils.js";
11
+ import { f as L } from "../../chunks/video-utils.js";
12
+ const M = c`:host{position:absolute;inset:0;pointer-events:none}.video-preview-container{position:absolute;bottom:calc(100% + var(--calcite-space-xs));z-index:1;box-sizing:border-box;transform:translate(-50%);pointer-events:none;border:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-surface-2)}.video-preview-container canvas{display:block;width:100%;height:auto}.video-preview-container .thumbnail-time{position:absolute;bottom:0;right:0;padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-xs);line-height:1;text-align:center;white-space:nowrap}`;
13
+ class P extends _ {
14
+ constructor() {
15
+ super(...arguments), this._previewsLoadId = 0, this.previewLeft = 0, this.previewTime = "", this.previewVisible = !1, this.previewWidth = 0;
16
+ }
17
+ static {
18
+ this.properties = { previewLeft: 16, previewTime: 16, previewVisible: 16, previewWidth: 16, referenceElement: 0, viewModel: 0 };
19
+ }
20
+ static {
21
+ this.styles = M;
22
+ }
23
+ updated() {
24
+ this.#o();
25
+ }
26
+ loaded() {
27
+ this.manager.onLifecycle(() => {
28
+ const i = new u(), t = (e) => this.#p(e);
29
+ return i.add([
30
+ a(() => this.referenceElement, "pointerenter", t),
31
+ a(() => this.referenceElement, "pointermove", t),
32
+ a(() => this.referenceElement, "pointerleave", () => this.#i()),
33
+ f(() => this.viewModel.layer, (e) => {
34
+ this.#l(e);
35
+ }, { initial: !0 }),
36
+ {
37
+ remove: () => {
38
+ this.#t(), this._previews?.close(), this._previews = void 0, this._previewsInfo = void 0, this.#i();
39
+ }
40
+ }
41
+ ]), { remove: () => i.destroy() };
42
+ });
43
+ }
44
+ #t() {
45
+ this._previewsLoadId++, this._previewsLoadController?.abort(), this._previewsLoadController = void 0;
46
+ }
47
+ #r(i, t) {
48
+ try {
49
+ return new URL(i, t);
50
+ } catch (e) {
51
+ throw new m("video-player:invalid-previews-url", "Unable to construct the video previews image URL.", {
52
+ urlFragment: i,
53
+ baseUrl: t,
54
+ error: e
55
+ });
56
+ }
57
+ }
58
+ #o() {
59
+ const { _previewContainer: i, _previews: t, _previewClip: e } = this;
60
+ !i || !t || !e || i.getContext("2d")?.drawImage(t, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height);
61
+ }
62
+ async #s({ previewsImageUrl: i, previewsInfo: t, loadId: e, signal: r }) {
63
+ const { data: o } = await g(i.href, { responseType: "blob", signal: r }), s = await createImageBitmap(o);
64
+ if (e !== this._previewsLoadId || r.aborted) {
65
+ s.close();
66
+ return;
67
+ }
68
+ this._previews?.close(), this._previews = s, this._previewsInfo = t, this.requestUpdate();
69
+ }
70
+ #n(i, t, e) {
71
+ return e.thumbnailInfo.length > 0 ? this.#h(i, e) : this.#a(i, t, e);
72
+ }
73
+ #e(i, t) {
74
+ const e = Math.min(t.thumbnailInfo.length || t.count, t.numCols * t.numRows);
75
+ if (!(i < 0 || i >= e))
76
+ return {
77
+ x: i % t.numCols * t.width,
78
+ y: Math.floor(i / t.numCols) * t.height,
79
+ width: t.width,
80
+ height: t.height
81
+ };
82
+ }
83
+ #a(i, t, e) {
84
+ const r = Math.min(e.count, e.numCols * e.numRows);
85
+ if (r <= 0 || t <= 0)
86
+ return;
87
+ const o = Math.min(r - 1, Math.floor(i / t * r));
88
+ return this.#e(o, e);
89
+ }
90
+ #h(i, t) {
91
+ const e = t.thumbnailInfo, r = e.reduce((o, s, n) => Math.abs(s.offset - i) < Math.abs(e[o].offset - i) ? n : o, 0);
92
+ return this.#e(r, t);
93
+ }
94
+ async #l(i) {
95
+ const t = ++this._previewsLoadId;
96
+ if (this._previewsLoadController?.abort(), this._previewsLoadController = void 0, this._previews?.close(), this._previews = void 0, this._previewsInfo = void 0, this._previewClip = void 0, this.previewVisible = !1, this.requestUpdate(), !i)
97
+ return;
98
+ const e = new AbortController();
99
+ this._previewsLoadController = e;
100
+ try {
101
+ if (await b(() => i.loaded, e.signal), t !== this._previewsLoadId || e.signal.aborted)
102
+ return;
103
+ const r = i.previewsInfo;
104
+ if (!i.capabilities?.operations?.supportsPreviews || !r)
105
+ return;
106
+ const o = {
107
+ ...r,
108
+ count: r.count > 0 ? r.count : r.thumbnailInfo.length > 0 ? r.thumbnailInfo.length : r.numCols * r.numRows
109
+ }, s = this.#r(o.urlFragment, `${i.url}/${i.layerId}/`);
110
+ await this.#s({
111
+ previewsImageUrl: s,
112
+ previewsInfo: o,
113
+ loadId: t,
114
+ signal: e.signal
115
+ });
116
+ } catch (r) {
117
+ if (t !== this._previewsLoadId || e.signal.aborted || C(r))
118
+ return;
119
+ I(r, this, "Failed to load the video previews");
120
+ } finally {
121
+ this._previewsLoadController === e && (this._previewsLoadController = void 0);
122
+ }
123
+ }
124
+ #i() {
125
+ this.previewVisible = !1, this._previewClip = void 0;
126
+ }
127
+ #p(i) {
128
+ if (!(i instanceof PointerEvent))
129
+ return;
130
+ const t = this.viewModel.duration;
131
+ if (i.pointerType === "touch" || !this._previewsInfo || !this._previews || this._previewsInfo.numCols <= 0 || this._previewsInfo.numRows <= 0 || this._previewsInfo.width <= 0 || this._previewsInfo.height <= 0 || !Number.isFinite(t) || t <= 0) {
132
+ this.previewVisible = !1;
133
+ return;
134
+ }
135
+ const e = i.currentTarget instanceof HTMLElement ? i.currentTarget.getBoundingClientRect() : null;
136
+ if (!e || e.width <= 0) {
137
+ this.previewVisible = !1;
138
+ return;
139
+ }
140
+ const r = Math.max(0, Math.min(e.width, i.clientX - e.left)), s = r / e.width * t * 1e3, n = this.#n(s, t * 1e3, this._previewsInfo);
141
+ if (!n) {
142
+ this.previewVisible = !1;
143
+ return;
144
+ }
145
+ this._previewClip = n;
146
+ const h = Math.min(this._previewsInfo.width, e.width), l = h / 2;
147
+ this.previewLeft = Math.max(l, Math.min(e.width - l, r)), this.previewWidth = h, this.previewTime = L(s / 1e3), this.previewVisible = !0;
148
+ }
149
+ #v(i) {
150
+ this._previewContainer = i ?? void 0;
151
+ }
152
+ render() {
153
+ return this._previewsInfo ? w`<div class="video-preview-container" aria-hidden=true .hidden=${!this.previewVisible} style=${`left: ${this.previewLeft}px; width: ${this.previewWidth}px`}><canvas height=${this._previewsInfo.height ?? p} width=${this._previewsInfo.width ?? p} ${d(this.#v)}></canvas><span class="thumbnail-time">${this.previewTime}</span></div>` : null;
154
+ }
155
+ }
156
+ v("arcgis-video-player-previews", P);
157
+ export {
158
+ P as VideoPlayerPreviews
159
+ };
@@ -1,15 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
2
+ import { c as g } from "../../chunks/runtime.js";
3
3
  import { html as c } from "lit";
4
- import d from "@arcgis/core/Color.js";
5
- import { watch as g } from "@arcgis/core/core/reactiveUtils.js";
4
+ import h from "@arcgis/core/Color.js";
5
+ import { watch as r } from "@arcgis/core/core/reactiveUtils.js";
6
6
  import { LitElement as _ } from "@arcgis/lumina";
7
7
  import { useDirection as b } from "@arcgis/lumina/controllers";
8
- const u = ["Auto"], w = [0.25, 0.5, 1, 1.5, 2], r = new d([255, 127, 0]);
9
- function o(s, t) {
8
+ const u = ["Auto"], w = [0.25, 0.5, 1, 1.5, 2], d = new h([255, 127, 0]);
9
+ function a(s, t) {
10
10
  return `${t.format(s)}x`;
11
11
  }
12
- class k extends _ {
12
+ class y extends _ {
13
13
  constructor() {
14
14
  super(...arguments), this._color = null, this._speed = 1, this._quality = "Auto", this._direction = b(), this._disabled = !1;
15
15
  }
@@ -18,27 +18,28 @@ class k extends _ {
18
18
  }
19
19
  loaded() {
20
20
  this.manager.onLifecycle(() => [
21
- g(() => this.viewModel.state, (t) => {
21
+ r(() => this.viewModel.state, (t) => {
22
22
  this._disabled = t === "not-ready" || t === "waiting";
23
- }, { initial: !0 })
23
+ }, { initial: !0 }),
24
+ r(() => this.viewModel.layer?.loop, () => this.requestUpdate(), { initial: !0 })
24
25
  ]);
25
26
  }
26
27
  render() {
27
- const { viewModel: t, messages: e } = this, l = this._direction === "rtl" ? "chevron-left" : "chevron-right", a = new Intl.NumberFormat(this.messages._lang, {
28
+ const { viewModel: t, messages: e } = this, l = this._direction === "rtl" ? "chevron-left" : "chevron-right", o = new Intl.NumberFormat(this.messages._lang, {
28
29
  minimumFractionDigits: 0,
29
30
  maximumFractionDigits: 2
30
- }), h = c`<calcite-flow-item .heading=${e.playbackSpeed} .selected=${this._active === "speed"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.playbackSpeed} selection-mode=single-persist>${w.map((i) => c`<calcite-list-item .disabled=${t?.layer?.isLive && i !== 1} .label=${o(i, a)} @click=${() => {
31
+ }), p = c`<calcite-flow-item .heading=${e.playbackSpeed} .selected=${this._active === "speed"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.playbackSpeed} selection-mode=single-persist>${w.map((i) => c`<calcite-list-item .disabled=${t?.layer?.isLive && i !== 1} .label=${a(i, o)} @click=${() => {
31
32
  this._speed = i, t.changePlaybackSpeed(i);
32
- }} .selected=${i === this._speed}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, m = c`<calcite-flow-item .heading=${e.quality} .selected=${this._active === "quality"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.quality} selection-mode=single-persist>${u.map((i) => c`<calcite-list-item .label=${i} @click=${() => this._quality = i} .selected=${i === this._quality}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, p = c`<calcite-flow-item .heading=${e.loopPlayback} .selected=${this._active === "loop"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .label=${e.loop} expanded><calcite-switch .disabled=${t?.layer?.isLive} .label=${e.loopPlayback} .checked=${t?.layer?.loop} .labelTextStart=${e.loop} @calciteSwitchChange=${() => {
33
+ }} .selected=${i === this._speed}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, m = c`<calcite-flow-item .heading=${e.quality} .selected=${this._active === "quality"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-list .label=${e.quality} selection-mode=single-persist>${u.map((i) => c`<calcite-list-item .label=${i} @click=${() => this._quality = i} .selected=${i === this._quality}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`, $ = c`<calcite-flow-item .heading=${e.loopPlayback} .selected=${this._active === "loop"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .label=${e.loop} expanded><calcite-switch .disabled=${t?.layer?.isLive} .label=${t.layer?.loop ? e.loopEnabled : e.loopDisabled} .checked=${t?.layer?.loop} .labelTextStart=${e.loop} @calciteSwitchChange=${() => {
33
34
  t.toggleLoopPlayback();
34
- }}></calcite-switch></calcite-block></calcite-flow-item>`, $ = c`<calcite-flow-item .heading=${e.graphics} .selected=${this._active === "color"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .heading=${e.color} expanded><calcite-color-picker channels-disabled format=hex saved-disabled scale=s .value=${this._color?.toHex() ?? r.toHex()} @calciteColorPickerChange=${({ currentTarget: i }) => {
35
+ }}></calcite-switch></calcite-block></calcite-flow-item>`, v = c`<calcite-flow-item .heading=${e.graphics} .selected=${this._active === "color"} @calciteFlowItemBack=${() => this._active = void 0}><calcite-block .heading=${e.color} expanded><calcite-color-picker channels-disabled format=hex saved-disabled scale=s .value=${this._color?.toHex() ?? d.toHex()} @calciteColorPickerChange=${({ currentTarget: i }) => {
35
36
  const n = i.value?.toString() ?? null;
36
- this._color = n ? new d(n) : null, this._color && t.changeGraphicsColor(this._color);
37
+ this._color = n ? new h(n) : null, this._color && t.changeGraphicsColor(this._color);
37
38
  }}></calcite-color-picker></calcite-block></calcite-flow-item>`;
38
- return c`<div><calcite-popover auto-close .label=${e.settings} overlay-positioning=fixed placement=top-end pointer-disabled reference-element=settings-action scale=s @calcitePopoverClose=${() => this._active = void 0}><calcite-flow><calcite-flow-item .heading=${e.settings} .selected=${!this._active}><calcite-list .label=${e.settings}><calcite-list-item .label=${e.loop} @click=${() => this._active = "loop"}><div slot=content-end><calcite-chip .label=${e.loopPlayback} .icon=${this.viewModel.layer?.loop ? "recurrence" : "break-recurrence"}></calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.speed} @click=${() => this._active = "speed"}><div slot=content-end><calcite-chip .label=${o(this._speed, a)} scale=s>${o(this._speed, a)}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.quality} @click=${() => this._active = "quality"}><div slot=content-end><calcite-chip .label=${this._quality} scale=s>${this._quality}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.graphics} @click=${() => this._active = "color"}><calcite-color-picker-swatch .color=${this._color?.toString() ?? r.toString()} scale=s slot=content-end></calcite-color-picker-swatch><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item></calcite-list></calcite-flow-item>${this._active === "speed" ? h : null}${this._active === "quality" ? m : null}${this._active === "color" ? $ : null}${this._active === "loop" ? p : null}</calcite-flow></calcite-popover><calcite-action alignment=center .disabled=${this._disabled} icon=sliders id=settings-action scale=s slot=trigger .text=${e.settings}></calcite-action></div>`;
39
+ return c`<div><calcite-popover auto-close .label=${e.settings} overlay-positioning=fixed placement=top-end pointer-disabled reference-element=settings-action scale=s @calcitePopoverClose=${() => this._active = void 0}><calcite-flow><calcite-flow-item .heading=${e.settings} .selected=${!this._active}><calcite-list .label=${e.settings}><calcite-list-item .label=${e.loop} @click=${() => this._active = "loop"}><div slot=content-end><calcite-chip .label=${e.loopPlayback} .icon=${this.viewModel.layer?.loop ? "recurrence" : "break-recurrence"}></calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.speed} @click=${() => this._active = "speed"}><div slot=content-end><calcite-chip .label=${a(this._speed, o)} scale=s>${a(this._speed, o)}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.quality} @click=${() => this._active = "quality"}><div slot=content-end><calcite-chip .label=${this._quality} scale=s>${this._quality}</calcite-chip></div><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item><calcite-list-item .label=${e.graphics} @click=${() => this._active = "color"}><calcite-color-picker-swatch .color=${this._color?.toString() ?? d.toString()} scale=s slot=content-end></calcite-color-picker-swatch><calcite-icon .icon=${l} scale=s slot=content-end></calcite-icon></calcite-list-item></calcite-list></calcite-flow-item>${this._active === "speed" ? p : null}${this._active === "quality" ? m : null}${this._active === "color" ? v : null}${this._active === "loop" ? $ : null}</calcite-flow></calcite-popover><calcite-action alignment=center .disabled=${this._disabled} icon=sliders id=settings-action scale=s slot=trigger .text=${e.settings}></calcite-action></div>`;
39
40
  }
40
41
  }
41
- v("arcgis-video-player-settings", k);
42
+ g("arcgis-video-player-settings", y);
42
43
  export {
43
- k as VideoPlayerSettings
44
+ y as VideoPlayerSettings
44
45
  };
@@ -1,27 +1,38 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as i } from "../../chunks/runtime.js";
3
- import { css as o, html as t } from "lit";
4
- import { LitElement as a } from "@arcgis/lumina";
5
- const l = o`:host{min-width:100px;flex:1 1 auto;display:flex;align-items:center;justify-content:center}.slider-progress-container{position:relative;z-index:1;flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}.progress{--arcgis-internal-video-player-progress-width: 2px;appearance:none;position:absolute;top:calc(50% - var(--arcgis-internal-video-player-progress-width) / 2);left:var(--calcite-spacing-xs);border:none;background:var(--calcite-color-border-1);cursor:pointer;width:calc(100% - var(--calcite-spacing-xs) * 2);height:var(--arcgis-internal-video-player-progress-width)}.progress::-webkit-progress-bar{background-color:var(--calcite-color-border-3)}.progress::-webkit-progress-value{background-color:var(--calcite-color-border-input)}.progress::-moz-progress-bar{background-color:var(--calcite-color-border-3)}.slider{--calcite-slider-track-color: transparent;width:100%}`;
6
- class c extends a {
2
+ import { c } from "../../chunks/runtime.js";
3
+ import { css as n, html as o } from "lit";
4
+ import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
5
+ import { LitElement as d } from "@arcgis/lumina";
6
+ import { createRef as v, ref as u } from "lit/directives/ref.js";
7
+ import { f as t } from "../../chunks/video-utils.js";
8
+ const g = n`:host{min-width:100px;flex:1 1 auto;display:flex;align-items:center;justify-content:center;overflow:visible;position:relative;z-index:2}.slider-progress-container{position:relative;z-index:2;flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}.progress{--arcgis-internal-video-player-progress-width: 2px;appearance:none;position:absolute;top:calc(50% - var(--arcgis-internal-video-player-progress-width) / 2);left:var(--calcite-spacing-xs);border:none;background:var(--calcite-color-border-1);cursor:pointer;width:calc(100% - var(--calcite-spacing-xs) * 2);height:var(--arcgis-internal-video-player-progress-width)}.progress::-webkit-progress-bar{background-color:var(--calcite-color-border-3)}.progress::-webkit-progress-value{background-color:var(--calcite-color-border-input)}.progress::-moz-progress-bar{background-color:var(--calcite-color-border-3)}.slider{--calcite-slider-track-color: transparent;cursor:pointer;width:100%}`;
9
+ class m extends d {
10
+ constructor() {
11
+ super(...arguments), this._progressContainer = v(), this._supportsPreviews = !1;
12
+ }
7
13
  static {
8
- this.properties = { viewModel: 0, buffered: 9, messages: 0, value: 9 };
14
+ this.properties = { _supportsPreviews: 16, buffered: 9, messages: 0, value: 9, viewModel: 0 };
9
15
  }
10
16
  static {
11
- this.styles = l;
17
+ this.styles = g;
18
+ }
19
+ loaded() {
20
+ this.manager.onLifecycle(() => p(() => this.viewModel.layer?.loaded && this.viewModel.layer.capabilities?.operations?.supportsPreviews, (e) => {
21
+ this._supportsPreviews = !!e;
22
+ }, { initial: !0 }));
12
23
  }
13
- _onSliderInput({ currentTarget: e }) {
24
+ #e({ currentTarget: e }) {
14
25
  if (typeof e.value == "number") {
15
26
  const r = e.value * this.viewModel.duration / 100;
16
27
  this.viewModel.seekTo(r);
17
28
  }
18
29
  }
19
30
  render() {
20
- const { buffered: e, messages: r, value: s } = this;
21
- return t`<div class="slider-progress-container" dir=ltr><progress class="progress" max=1 .value=${`${e}`}></progress><div class="slider"><calcite-slider .label=${r.playbackProgress} max=100 min=0 .value=${s} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div></div>`;
31
+ const { buffered: e, messages: r, value: s } = this, i = this.viewModel.duration, a = t(s * i / 100), l = t(i);
32
+ return o`<div class="slider-progress-container" dir=ltr ${u(this._progressContainer)}><progress class="progress" aria-hidden=true max=1 .value=${`${e}`}></progress><div class="slider"><calcite-slider .label=${`${r.playbackProgress}: ${a} / ${l}`} max=100 min=0 .value=${s} @calciteSliderInput=${this.#e}></calcite-slider></div>${this._supportsPreviews ? o`<arcgis-video-player-previews .referenceElement=${this._progressContainer.value} .viewModel=${this.viewModel}></arcgis-video-player-previews>` : null}</div>`;
22
33
  }
23
34
  }
24
- i("arcgis-video-player-slider", c);
35
+ c("arcgis-video-player-slider", m);
25
36
  export {
26
- c as VideoPlayerSlider
37
+ m as VideoPlayerSlider
27
38
  };
@@ -1,2 +1,3 @@
1
1
  import "@esri/calcite-components/components/calcite-slider";
2
+ import "../arcgis-video-player-previews/index.js";
2
3
  export * from "./customElement.js";