@arcgis/core 4.33.11 → 4.33.12

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 (88) hide show
  1. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  2. package/applications/KnowledgeStudio/reshape.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → 012dee84d97b71461397.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{342f61e784c9364a493b.js → 1ebff223f0f241686669.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{fdfb5d601d318d6a49f9.js → 2f2cb0348f36a5157293.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{cb16ba9512ae0a09c55d.js → 4ab87eea6345818de60f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{e9aa1d9ded8a52a40c57.js → 5d74b754ee0140afbd22.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 64aebb3780ac4c8bfdc7.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{c6cd8784a3e222eb2d4a.js → 8edd8ebca441d670380f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{cf25f487fe4eb1579aee.js → 9128902b127d0ec70fe0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{17c623db3d9a06a9b711.js → a5fab8d7d8403b4de682.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{bac5e1d50b69f0d94694.js → ad2a29aca4e5bcd545cc.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{9049c81445cc044286f1.js → bbb92d0ba6a34c7a7d1b.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{7b9d14cc4a466ef18d71.js → bfd51df0a44a05596061.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3ca6f893fd58f5b17af5.js → c410b2b9d0645e9cea89.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{8008f5479f4d16964088.js → dded6853cebf2165cb37.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{db192728fa0ee08a776a.js → e7ca7ced4dfb04c81e84.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{0155e6806621f3588ffa.js → fe71a2ea7965e75ee881.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{71e1a8bd432947c66357.js → ffeda53fee883f8025ed.js} +1 -1
  21. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +16 -2
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/themes/light/view.css +1 -1
  25. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  26. package/chunks/MultiPathImpl.js +1 -1
  27. package/chunks/OperatorGeodesicBuffer.js +1 -1
  28. package/chunks/OperatorGeodeticArea.js +1 -1
  29. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  30. package/chunks/OperatorGeodeticLength.js +1 -1
  31. package/chunks/OperatorProximityGeodesic.js +1 -1
  32. package/chunks/OperatorShapePreservingLength.js +1 -1
  33. package/chunks/OperatorShapePreservingProject.js +1 -1
  34. package/chunks/Point2D.js +1 -1
  35. package/chunks/ProjectionTransformation.js +1 -1
  36. package/chunks/sphere.js +1 -1
  37. package/chunks/vec42.js +1 -1
  38. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  39. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  40. package/core/quantityFormatUtils.js +1 -1
  41. package/core/unitFormatUtils.js +1 -1
  42. package/geometry/coordinateFormatter.js +1 -1
  43. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  44. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  45. package/geometry/support/sphere.js +1 -1
  46. package/interfaces.d.ts +128 -0
  47. package/kernel.js +1 -1
  48. package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
  49. package/package.json +1 -1
  50. package/renderers/support/RasterSymbolizer.js +1 -1
  51. package/support/revision.js +1 -1
  52. package/symbols/support/previewSymbol3D.js +1 -1
  53. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  54. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  55. package/views/3d/camera/constraintUtils/distance.js +1 -1
  56. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  57. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  58. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  59. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  60. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  61. package/views/3d/state/utils/navigationUtils.js +1 -1
  62. package/views/3d/terrain/OverlayManager.js +1 -1
  63. package/views/3d/terrain/TerrainSurface.js +1 -1
  64. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  65. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  66. package/views/LinkChartView.js +1 -1
  67. package/views/draw/DrawOperation.js +1 -1
  68. package/views/draw/support/GraphicMover.js +1 -1
  69. package/views/draw/support/HighlightHelper.js +1 -1
  70. package/views/draw/support/Reshape.js +1 -1
  71. package/views/interactive/Tooltip.js +1 -1
  72. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  73. package/views/interactive/sketch/SketchOptions.js +1 -1
  74. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  75. package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
  76. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  77. package/views/interactive/sketch/Units.js +1 -1
  78. package/views/interactive/sketch/constraints.js +1 -1
  79. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  80. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  81. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  82. package/views/interactive/tooltip/fields/fields.js +1 -1
  83. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  84. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  85. package/views/support/angularMeasurementUtils.js +1 -1
  86. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  87. package/widgets/VideoPlayer/css.js +1 -1
  88. package/widgets/VideoPlayer.js +1 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{removeUnordered as o}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as i,allSettledValues as n,whenOrAbort as a}from"../../../../core/promiseUtils.js";import{initial as p,watch as l,on as d}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import y from"../../../../geometry/Polygon.js";import{initializeProjection as m,canProjectWithoutEngine as g,project as f}from"../../../../geometry/projectionUtils.js";import{normalizeCentralMeridianForDisplay as _}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as v}from"../../../../geometry/support/typeUtils.js";import{convertFromGeometry as S}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as w}from"../../../../layers/graphics/OptimizedFeature.js";import{executeQueryForSnapping as j}from"../../../../layers/graphics/data/executeQueryForSnapping.js";import b from"../../../../layers/graphics/data/FeatureStore.js";import{QueryEngine as E}from"../../../../layers/graphics/data/QueryEngine.js";import k from"../../../../layers/support/FieldsIndex.js";import{elevationContextAffectsAlignment as C}from"../../../../support/elevationInfoUtils.js";import{symbolHasExtrudeSymbolLayer as F}from"../../../../symbols/support/utils.js";import{sortCandidatesInPlace as A,makeSnappingQuery as I}from"../snappingUtils.js";import{convertSnappingCandidate as P,makeGetGroundElevation as G}from"./queryEngineUtils.js";import{getSnappingCandidateElevationAligner as H}from"./snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as R}from"./snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as U}from"./symbologySnappingCandidates.js";import{TaskPriority as x}from"../../../support/Scheduler.js";const z="graphics-collections";let O=class extends t{get updating(){return this._updatingHandles.updating}get _hasZ(){const e=this.view;return null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type}get _snappingElevationAligner(){const{view:e}=this,{layer:t}=this.layerSource,o=null!=e&&"3d"===e.type;if(!o||"map-notes"===t.type)return H();const r=async(o,r)=>(await a(e.whenLayerView(t),r)).elevationAlignPointsInFeatures(o,r);return H(o,{elevationInfo:t.elevationInfo,alignPointsInFeatures:r})}get _snappingElevationFilter(){const{view:e}=this,t=null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type;return R(t)}get _symbologySnappingFetcher(){const{view:e}=this,{layer:t}=this.layerSource,o=null!=e&&"3d"===e.type,r=this._extrudedPolygonSymbolsCount>0;return o&&"map-notes"!==t.type&&r?U(r,(async(o,r)=>{const s=await e.whenLayerView(t);return i(r),s.queryForSymbologySnapping({candidates:o,spatialReference:e.spatialReference},r)})):U()}constructor(e){super(e),this.availability=1,this._sources={multipoint:null,point:null,polygon:null,polyline:null},this._loadedWkids=new Set,this._loadedWkts=new Set,this._pendingAdds=[],this._extrudedPolygonSymbolsCount=0,this._updatingHandles=new h,this._memoizedMakeGetGroundElevation=s(G)}destroy(){for(const e of this._pendingAdds)e.task.abort();this._pendingAdds.length=0,this._mapSources((e=>this._destroySource(e))),this._updatingHandles.destroy()}initialize(){this._updatingHandles.add((()=>this.getGraphicsLayers()),(e=>{this._updatingHandles.removeHandles(z);for(const t of e)this._addMany(t.graphics.toArray()),this.addHandles([t.on("graphic-update",(e=>this._onGraphicUpdate(e))),this._updatingHandles.addOnCollectionChange((()=>t.graphics),(e=>this._onGraphicsChanged(e)))],z)}),p);const{view:e}=this,{layer:t}=this.layerSource;null!=e&&"3d"===e.type&&"map-notes"!==t.type&&e.elevationProvider&&this.addHandles([e.elevationProvider.on("elevation-change",(({context:e})=>{C(e,t.elevationInfo)&&this._snappingElevationAligner.notifyElevationSourceChange()})),l((()=>t.elevationInfo),(()=>this._snappingElevationAligner.notifyElevationSourceChange()),p),d((()=>t),["edits","apply-edits","graphic-update"],(()=>this._symbologySnappingFetcher.notifySymbologyChange()))])}async fetchCandidates(e,t){const{point:o,coordinateHelper:{spatialReference:r}}=e,s=await n(this._mapSources((o=>this._fetchCandidatesForSource(o,e,t))));i(t);const a=this._memoizedMakeGetGroundElevation(this.view,r),p=s.flat().map((e=>P(e,a)));return A(o,p),p}async _fetchCandidatesForSource(e,t,o){const r=I({parameters:t,mode:this.view?.type??"2d"}),s=await j(e.queryEngine,r,o);i(o);const n=await this._snappingElevationAligner.alignCandidates(s.candidates,t.coordinateHelper.spatialReference,o);i(o);const a=await this._symbologySnappingFetcher.fetch(n,o);i(o);const p=0===a.length?n:[...n,...a];return this._snappingElevationFilter.filter(r,p)}refresh(){}_onGraphicUpdate(e){if(this.getGraphicsLayers().some((t=>t.graphics.includes(e.graphic))))switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],o=new Map;for(const r of e)null!=r.geometry&&(this._needsInitializeProjection(r.geometry.spatialReference)?(t.push(r.geometry.spatialReference),o.set(r.uid,r)):this._add(r));this._createPendingAdd(t,o)}_createPendingAdd(e,t){if(!e.length)return;const s=r((async o=>{await m(e.map((e=>({source:e,dest:this.spatialReference}))),{signal:o}),this._markLoadedSpatialReferences(e);for(const e of t.values())this._add(e)}));this._updatingHandles.addPromise(s.promise);const i={task:s,graphics:t},n=()=>o(this._pendingAdds,i);s.promise.then(n,n),this._pendingAdds.push(i)}_markLoadedSpatialReferences(e){for(const t of e){null!=t.wkid&&this._loadedWkids.add(t.wkid);const e=t.wkt2||t.wkt;e&&this._loadedWkts.add(e)}}_add(e){if(null==e.geometry||!e.visible)return;let t=e.geometry;if("mesh"===t.type)return;"extent"===t.type&&(t=y.fromExtent(t));const o=this._ensureSource(t.type);if(null==o)return;const r=this._createOptimizedFeature(e.uid,t);null!=r&&(o.featureStore.add(r),F(e.symbol)&&this._extrudedPolygonSymbolsCount++)}_needsInitializeProjection(e){if(null!=e.wkid&&this._loadedWkids.has(e.wkid))return!1;const t=e.wkt2||e.wkt;return(!t||!this._loadedWkts.has(t))&&!g(e,this.spatialReference)}_createOptimizedFeature(e,t){const o=f(_(t),this.spatialReference);if(!o)return null;const r=this._ensureGeometryHasZ(o),s=S(r,this._hasZ,!1);return new w(s,{[Z]:e},null,e)}_ensureGeometryHasZ(e){if(!this._hasZ)return e;const t=e=>{for(;e.length<3;)e.push(0)},o=e.clone();switch(o.hasZ=!0,o.type){case"point":o.z=o.z??0;break;case"multipoint":o.points.forEach(t);break;case"polyline":o.paths.forEach((e=>e.forEach(t)));break;case"polygon":o.rings.forEach((e=>e.forEach(t)))}return o}_ensureSource(e){const t=this._sources[e];if(null!=t)return t;const o=this._createSource(e);return this._sources[e]=o,o}_createSource(e){const t=v.toJSON(e),o=this._hasZ,r=new b({geometryType:t,hasZ:o,hasM:!1});return{featureStore:r,queryEngine:new E({featureStore:r,fieldsIndex:k.fromLayerJSON({fields:[{name:Z,type:"esriFieldTypeOID",alias:Z}]}),geometryType:t,hasM:!1,hasZ:o,featureIdInfo:{type:"object-id",fieldName:Z},spatialReference:this.spatialReference,priority:x.SNAPPING,scheduler:null!=this.view&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources((t=>this._removeFromSource(t,e)));for(const t of this._pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const o=t.uid;e.featureStore.has(o)&&(e.featureStore.removeById(t.uid),F(t.symbol)&&this._extrudedPolygonSymbolsCount--)}_destroySource(e){e.queryEngine.destroy(),this._sources[e.type]=null}_mapSources(e){const{point:t,polygon:o,polyline:r,multipoint:s}=this._sources,i=[];return null!=t&&i.push(e(t)),null!=o&&i.push(e(o)),null!=r&&i.push(e(r)),null!=s&&i.push(e(s)),i}};e([c()],O.prototype,"getGraphicsLayers",void 0),e([c({constructOnly:!0})],O.prototype,"layerSource",void 0),e([c({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c({readOnly:!0})],O.prototype,"updating",null),e([c({readOnly:!0})],O.prototype,"availability",void 0),e([c()],O.prototype,"_hasZ",null),e([c()],O.prototype,"_snappingElevationAligner",null),e([c()],O.prototype,"_snappingElevationFilter",null),e([c()],O.prototype,"_symbologySnappingFetcher",null),e([c()],O.prototype,"_extrudedPolygonSymbolsCount",void 0),O=e([u("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],O);const Z="OBJECTID";export{O as GraphicsSnappingSource};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{removeUnordered as o}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as i,allSettledValues as n,whenOrAbort as a}from"../../../../core/promiseUtils.js";import{initial as p,watch as l,on as d}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import y from"../../../../geometry/Polygon.js";import{initializeProjection as m,canProjectWithoutEngine as g,project as f}from"../../../../geometry/projectionUtils.js";import{normalizeCentralMeridianForDisplay as _}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as v}from"../../../../geometry/support/typeUtils.js";import{convertFromGeometry as S}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as w}from"../../../../layers/graphics/OptimizedFeature.js";import{executeQueryForSnapping as j}from"../../../../layers/graphics/data/executeQueryForSnapping.js";import b from"../../../../layers/graphics/data/FeatureStore.js";import{QueryEngine as E}from"../../../../layers/graphics/data/QueryEngine.js";import k from"../../../../layers/support/FieldsIndex.js";import{elevationContextAffectsAlignment as C}from"../../../../support/elevationInfoUtils.js";import{symbolHasExtrudeSymbolLayer as F}from"../../../../symbols/support/utils.js";import{sortCandidatesInPlace as A,makeSnappingQuery as I}from"../snappingUtils.js";import{makeGetGroundElevation as P,convertSnappingCandidate as G}from"./queryEngineUtils.js";import{getSnappingCandidateElevationAligner as H}from"./snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as R}from"./snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as U}from"./symbologySnappingCandidates.js";import{TaskPriority as x}from"../../../support/Scheduler.js";const z="graphics-collections";let O=class extends t{get updating(){return this._updatingHandles.updating}get _hasZ(){const e=this.view;return null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type}get _snappingElevationAligner(){const{view:e}=this,{layer:t}=this.layerSource,o=null!=e&&"3d"===e.type;if(!o||"map-notes"===t.type)return H();const r=async(o,r)=>(await a(e.whenLayerView(t),r)).elevationAlignPointsInFeatures(o,r);return H(o,{elevationInfo:t.elevationInfo,alignPointsInFeatures:r})}get _snappingElevationFilter(){const{view:e}=this,t=null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type;return R(t)}get _symbologySnappingFetcher(){const{view:e}=this,{layer:t}=this.layerSource,o=null!=e&&"3d"===e.type,r=this._extrudedPolygonSymbolsCount>0;return o&&"map-notes"!==t.type&&r?U(r,(async(o,r)=>{const s=await e.whenLayerView(t);return i(r),s.queryForSymbologySnapping({candidates:o,spatialReference:e.spatialReference},r)})):U()}constructor(e){super(e),this.availability=1,this._sources={multipoint:null,point:null,polygon:null,polyline:null},this._loadedWkids=new Set,this._loadedWkts=new Set,this._pendingAdds=[],this._extrudedPolygonSymbolsCount=0,this._updatingHandles=new h,this._memoizedMakeGetGroundElevation=s(P)}destroy(){for(const e of this._pendingAdds)e.task.abort();this._pendingAdds.length=0,this._mapSources((e=>this._destroySource(e))),this._updatingHandles.destroy()}initialize(){this._updatingHandles.add((()=>this.getGraphicsLayers()),(e=>{this._updatingHandles.removeHandles(z);for(const t of e)this._addMany(t.graphics.toArray()),this.addHandles([t.on("graphic-update",(e=>this._onGraphicUpdate(e))),this._updatingHandles.addOnCollectionChange((()=>t.graphics),(e=>this._onGraphicsChanged(e)))],z)}),p);const{view:e}=this,{layer:t}=this.layerSource;null!=e&&"3d"===e.type&&"map-notes"!==t.type&&e.elevationProvider&&this.addHandles([e.elevationProvider.on("elevation-change",(({context:e})=>{C(e,t.elevationInfo)&&this._snappingElevationAligner.notifyElevationSourceChange()})),l((()=>t.elevationInfo),(()=>this._snappingElevationAligner.notifyElevationSourceChange()),p),d((()=>t),["edits","apply-edits","graphic-update"],(()=>this._symbologySnappingFetcher.notifySymbologyChange()))])}async fetchCandidates(e,t){const{point:o,coordinateHelper:{spatialReference:r}}=e,s=await n(this._mapSources((o=>this._fetchCandidatesForSource(o,e,t))));i(t);const a=this._memoizedMakeGetGroundElevation(this.view,r),p=s.flat().map((e=>G(e,a)));return A(o,p),p}async _fetchCandidatesForSource(e,t,o){const r=I({parameters:t,mode:this.view?.type??"2d"}),s=await j(e.queryEngine,r,o);i(o);const n=await this._snappingElevationAligner.alignCandidates(s.candidates,t.coordinateHelper.spatialReference,o);i(o);const a=await this._symbologySnappingFetcher.fetch(n,o);i(o);const p=0===a.length?n:[...n,...a];return this._snappingElevationFilter.filter(r,p)}refresh(){}_onGraphicUpdate(e){if(this.getGraphicsLayers().some((t=>t.graphics.includes(e.graphic))))switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],o=new Map;for(const r of e)null!=r.geometry&&(this._needsInitializeProjection(r.geometry.spatialReference)?(t.push(r.geometry.spatialReference),o.set(r.uid,r)):this._add(r));this._createPendingAdd(t,o)}_createPendingAdd(e,t){if(!e.length)return;const s=r((async o=>{await m(e.map((e=>({source:e,dest:this.spatialReference}))),{signal:o}),this._markLoadedSpatialReferences(e);for(const e of t.values())this._add(e)}));this._updatingHandles.addPromise(s.promise);const i={task:s,graphics:t},n=()=>o(this._pendingAdds,i);s.promise.then(n,n),this._pendingAdds.push(i)}_markLoadedSpatialReferences(e){for(const t of e){null!=t.wkid&&this._loadedWkids.add(t.wkid);const e=t.wkt2||t.wkt;e&&this._loadedWkts.add(e)}}_add(e){if(null==e.geometry||!e.visible)return;let t=e.geometry;if("mesh"===t.type)return;"extent"===t.type&&(t=y.fromExtent(t));const o=this._ensureSource(t.type);if(null==o)return;const r=this._createOptimizedFeature(e.uid,t);null!=r&&(o.featureStore.add(r),F(e.symbol)&&this._extrudedPolygonSymbolsCount++)}_needsInitializeProjection(e){if(null!=e.wkid&&this._loadedWkids.has(e.wkid))return!1;const t=e.wkt2||e.wkt;return(!t||!this._loadedWkts.has(t))&&!g(e,this.spatialReference)}_createOptimizedFeature(e,t){const o=f(_(t),this.spatialReference);if(!o)return null;const r=this._ensureGeometryHasZ(o),s=S(r,this._hasZ,!1);return new w(s,{[Z]:e},null,e)}_ensureGeometryHasZ(e){if(!this._hasZ)return e;const t=e=>{for(;e.length<3;)e.push(0)},o=e.clone();switch(o.hasZ=!0,o.type){case"point":o.z=o.z??0;break;case"multipoint":o.points.forEach(t);break;case"polyline":o.paths.forEach((e=>e.forEach(t)));break;case"polygon":o.rings.forEach((e=>e.forEach(t)))}return o}_ensureSource(e){const t=this._sources[e];if(null!=t)return t;const o=this._createSource(e);return this._sources[e]=o,o}_createSource(e){const t=v.toJSON(e),o=this._hasZ,r=new b({geometryType:t,hasZ:o,hasM:!1});return{featureStore:r,queryEngine:new E({featureStore:r,fieldsIndex:k.fromLayerJSON({fields:[{name:Z,type:"esriFieldTypeOID",alias:Z}]}),geometryType:t,hasM:!1,hasZ:o,featureIdInfo:{type:"object-id",fieldName:Z},spatialReference:this.spatialReference,priority:x.SNAPPING,scheduler:null!=this.view&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources((t=>this._removeFromSource(t,e)));for(const t of this._pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const o=t.uid;e.featureStore.has(o)&&(e.featureStore.removeById(t.uid),F(t.symbol)&&this._extrudedPolygonSymbolsCount--)}_destroySource(e){e.queryEngine.destroy(),this._sources[e.type]=null}_mapSources(e){const{point:t,polygon:o,polyline:r,multipoint:s}=this._sources,i=[];return null!=t&&i.push(e(t)),null!=o&&i.push(e(o)),null!=r&&i.push(e(r)),null!=s&&i.push(e(s)),i}};e([c()],O.prototype,"getGraphicsLayers",void 0),e([c({constructOnly:!0})],O.prototype,"layerSource",void 0),e([c({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c({readOnly:!0})],O.prototype,"updating",null),e([c({readOnly:!0})],O.prototype,"availability",void 0),e([c()],O.prototype,"_hasZ",null),e([c()],O.prototype,"_snappingElevationAligner",null),e([c()],O.prototype,"_snappingElevationFilter",null),e([c()],O.prototype,"_symbologySnappingFetcher",null),e([c()],O.prototype,"_extrudedPolygonSymbolsCount",void 0),O=e([u("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],O);const Z="OBJECTID";export{O as GraphicsSnappingSource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{createScalar as t,zeroSquareMeters as e,toUnit as a,zeroDegrees as n,zeroMeters as r,createLength as i,createAngle as o,createArea as s}from"../../../../core/quantityUtils.js";import{makeQuantityParser as u,formatLongitudeDecimalDegreesForInputMode as l,parseLongitude as c,formatLatitudeDecimalDegreesForInputMode as f,parseLatitude as m,sanitizeAngle as p}from"./parsingAndFormattingUtils.js";import{TooltipField as g}from"./TooltipField.js";import{TooltipFieldElevation as d}from"./TooltipFieldElevation.js";import{TooltipFieldOrientation as h}from"./TooltipFieldOrientation.js";import{TooltipFieldSize as v}from"./TooltipFieldSize.js";import{DirectionMode as I,getNormalizedDirection as b}from"../../../support/angularMeasurementUtils.js";function y(t){const e=t=>t.inputUnitInfos.angle.unit,r=t=>t.sketchOptions.values.effectiveDirectionMode;return new g({name:"direction",actual:n,parse:u({createQuantity:(t,a)=>o(t,e(a),"geographic"),sanitize:p}),format:(t,e)=>{const a=r(e),n=b(t,a);switch(a){case I.Absolute:return e.formatters.direction(n);case I.Relative:return e.formatters.directionRelative(n);case I.RelativeBilateral:return e.formatters.directionRelativeBilateral(n)}},formatForInputMode:(t,n)=>{const i=b(t,r(n));return n.formatters.scalar(a(i,e(n)))},suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>{const e=r(t),{absolute:a,relative:n}=t.messages.sketch.direction;switch(e){case I.Absolute:return a;case I.Relative:case I.RelativeBilateral:return n}},...t})}function U(t){const e=t=>t.inputUnitInfos.length.unit;return new g({name:"distance",actual:r,parse:u({createQuantity:(t,a)=>i(Math.max(t,0),e(a))}),format:(t,e)=>e.formatters.length(t),formatForInputMode:(t,n)=>n.formatters.scalar(a(t,e(n))),suffix:t=>t.inputUnitInfos.length.abbreviation,title:t=>t.messages.sketch.distance,...t})}function w(t){return U({format:(t,e)=>e.formatters.totalLength(t),title:t=>t.messages.sketch.totalLength,readOnly:!0,...t})}function F(t){return U({...t})}function x(t){const e=t=>t.inputUnitInfos.length.unit;return U({...t,parse:u({createQuantity:(t,a)=>i(t,e(a))}),format:(t,e)=>e.formatters.lengthRelative(t)})}function M(t){return new d(t)}function k(t){return new h(t)}function j(t){return new v(t)}function R(e){return B("scale",{name:"scale",actual:null,parse:u({createQuantity:e=>t(Math.abs(e))}),...e})}function Q(t){const n=t=>t.inputUnitInfos.area.unit;return new g({name:"area",actual:e,parse:u({createQuantity:(t,e)=>s(t,n(e))}),format:(t,e)=>e.formatters.area(t),formatForInputMode:(t,e)=>e.formatters.scalar(a(t,n(e))),suffix:t=>t.inputUnitInfos.area.abbreviation,title:t=>t.messages.sketch.area,readOnly:!0,...t})}function D(t){return new g({name:"x",actual:n,parse:c,format:(t,e)=>e.formatters.longitudeDecimalDegrees(t),formatForInputMode:t=>l(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.longitude,...t})}function O(t){return new g({name:"y",actual:n,parse:m,format:(t,e)=>e.formatters.latitudeDecimalDegrees(t),formatForInputMode:t=>f(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.latitude,...t})}function T(t){return B("x",{name:"x",...t})}function A(t){return B("y",{name:"y",...t})}function B(e,a){return new g({actual:t(0),parse:u({createQuantity:e=>t(e)}),format:(t,e)=>e.formatters.scalar(t),formatForInputMode:(t,e)=>e.formatters.scalar(t),title:t=>t.messages.sketch[e],...a})}export{Q as makeAreaField,y as makeDirectionField,F as makeDistanceField,M as makeElevationField,O as makeLatitudeField,U as makeLengthField,D as makeLongitudeField,k as makeOrientationField,x as makeRelativeDistanceField,R as makeScaleField,j as makeSizeField,w as makeTotalLengthField,T as makeXField,A as makeYField};
5
+ import{zeroDegrees as t,createScalar as e,zeroSquareMeters as a,toUnit as n,createArea as r,zeroMeters as i,createLength as o,createAngle as s}from"../../../../core/quantityUtils.js";import{formatLongitudeDecimalDegreesForInputMode as u,parseLongitude as l,formatLatitudeDecimalDegreesForInputMode as c,parseLatitude as f,makeQuantityParser as m,sanitizeAngle as p}from"./parsingAndFormattingUtils.js";import{TooltipField as g}from"./TooltipField.js";import{TooltipFieldElevation as d}from"./TooltipFieldElevation.js";import{TooltipFieldOrientation as h}from"./TooltipFieldOrientation.js";import{TooltipFieldSize as v}from"./TooltipFieldSize.js";import{DirectionMode as I,getNormalizedDirection as b}from"../../../support/angularMeasurementUtils.js";function y(e){const a=t=>t.inputUnitInfos.angle.unit,r=t=>t.sketchOptions.values.effectiveDirectionMode;return new g({name:"direction",actual:t,parse:m({createQuantity:(t,e)=>s(t,a(e),"geographic"),sanitize:p}),format:(t,e)=>{const a=r(e),n=b(t,a);switch(a){case I.Absolute:return e.formatters.direction(n);case I.Relative:return e.formatters.directionRelative(n);case I.RelativeBilateral:return e.formatters.directionRelativeBilateral(n)}},formatForInputMode:(t,e)=>{const i=b(t,r(e));return e.formatters.scalar(n(i,a(e)))},suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>{const e=r(t),{absolute:a,relative:n}=t.messages.sketch.direction;switch(e){case I.Absolute:return a;case I.Relative:case I.RelativeBilateral:return n}},...e})}function U(t){const e=t=>t.inputUnitInfos.length.unit;return new g({name:"distance",actual:i,parse:m({createQuantity:(t,a)=>o(Math.max(t,0),e(a))}),format:(t,e)=>e.formatters.length(t),formatForInputMode:(t,a)=>a.formatters.scalar(n(t,e(a))),suffix:t=>t.inputUnitInfos.length.abbreviation,title:t=>t.messages.sketch.distance,...t})}function w(t){return U({format:(t,e)=>e.formatters.totalLength(t),title:t=>t.messages.sketch.totalLength,readOnly:!0,...t})}function F(t){return U({...t})}function x(t){const e=t=>t.inputUnitInfos.length.unit;return U({...t,parse:m({createQuantity:(t,a)=>o(t,e(a))}),format:(t,e)=>e.formatters.lengthRelative(t)})}function M(t){return new d(t)}function k(t){return new h(t)}function j(t){return new v(t)}function R(t){return B("scale",{name:"scale",actual:null,parse:m({createQuantity:t=>e(Math.abs(t))}),...t})}function Q(t){const e=t=>t.inputUnitInfos.area.unit;return new g({name:"area",actual:a,parse:m({createQuantity:(t,a)=>r(t,e(a))}),format:(t,e)=>e.formatters.area(t),formatForInputMode:(t,a)=>a.formatters.scalar(n(t,e(a))),suffix:t=>t.inputUnitInfos.area.abbreviation,title:t=>t.messages.sketch.area,readOnly:!0,...t})}function D(e){return new g({name:"x",actual:t,parse:l,format:(t,e)=>e.formatters.longitudeDecimalDegrees(t),formatForInputMode:t=>u(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.longitude,...e})}function O(e){return new g({name:"y",actual:t,parse:f,format:(t,e)=>e.formatters.latitudeDecimalDegrees(t),formatForInputMode:t=>c(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.latitude,...e})}function T(t){return B("x",{name:"x",...t})}function A(t){return B("y",{name:"y",...t})}function B(t,a){return new g({actual:e(0),parse:m({createQuantity:t=>e(t)}),format:(t,e)=>e.formatters.scalar(t),formatForInputMode:(t,e)=>e.formatters.scalar(t),title:e=>e.messages.sketch[t],...a})}export{Q as makeAreaField,y as makeDirectionField,F as makeDistanceField,M as makeElevationField,O as makeLatitudeField,U as makeLengthField,D as makeLongitudeField,k as makeOrientationField,x as makeRelativeDistanceField,R as makeScaleField,j as makeSizeField,w as makeTotalLengthField,T as makeXField,A as makeYField};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Cyclical as t}from"../../../../core/Cyclical.js";import{formatRelativeVerticalLength as n,formatVerticalLength as e,formatLength as r,formatRelativeLength as i,formatArea as o,formatAngle as l}from"../../../../core/quantityFormatUtils.js";import{createScalar as u,createAngle as a,toUnit as c}from"../../../../core/quantityUtils.js";import{isLoaded as s,fromLatitudeLongitude as f,fromLongitude as g,fromLatitude as m}from"../../../../geometry/coordinateFormatter.js";import{parseNumber as p,formatNumber as d}from"../../../../intl/number.js";import{getDegreesGeographic as h}from"../../../support/angularMeasurementUtils.js";const v=1,y=6;function D(t,l){return{angleRelative:x,direction:j,directionRelative:R,directionRelativeBilateral:$,latitudeDecimalDegrees:L,longitudeDecimalDegrees:F,area:(n,e)=>o(t,n,e??l.area),length:(n,e,i)=>r(t,n,e??l.length,i),lengthRelative:(n,e)=>i(t,n,e??l.length),totalLength:(n,e)=>r(t,n,e??l.length),verticalLength:(n,r)=>e(t,n,r??l.verticalLength),verticalLengthRelative:(e,r)=>n(t,e,r??l.verticalLength),percentage:z,scalar:Z,scale:T}}function x(t){return d(t,{signDisplay:"exceptZero",...b(v)})}function j(t){return l(t,t.rotationType,v)}function R(t){const n=h(t);return d(n,{style:"unit",unitDisplay:"narrow",unit:"degree",signDisplay:n>0?"never":"exceptZero",...b(v)})}function $(t){return l(t,t.rotationType,v)}function F(t){return U(t,N)}function L(t){return U(t,O)}function w(t){return q(t,N)}function A(t){return q(t,O)}function U(t,n){const e=!1,r="geographic";return l(c(t,"degrees"),r,y,n,e)}function q(t,n){const e=!1,r=n.normalize(c(t,"degrees").value,void 0,e);return Z(u(r),y)}function z(t){return d(t.value,{style:"percent"})}function T(t){return d(t,{style:"percent",maximumFractionDigits:0})}function Z(t,n){return d(t.value,b(n))}function b(t){return{minimumFractionDigits:t,maximumFractionDigits:t}}function B({createQuantity:t,sanitize:n}){return(e,r)=>{if(null==e)return null;n&&(e=n(e));const i=p(e);return null==i?null:t(i,r)}}function C(t){return t.replaceAll(/[*^~°º]/g,"")}const E=t=>{let n=`[-+]?[0-9${t.thousands}]+`;return""!==t.decimal&&(n+=`${t.decimal}[0-9]+`),new RegExp(`^(${n}\\s*)${t.separator}(\\s*${n})$`,"i")},I=" ",M=[];for(const P of[",","\\|","\\s+"])for(const t of["\\.",",",""])for(const n of["",",","\\.",I,"\\s+"])P!==t&&P!==n&&t!==n&&M.push({separator:P,decimal:t,thousands:n,pattern:E({decimal:t,thousands:n,separator:P})});function Q(t){for(const{decimal:n,thousands:e,pattern:r}of M){r.lastIndex=0;const i=t.match(r);if(!i)continue;const o=p(k(i[1],n,e)),l=p(k(i[2],n,e));if(null!=o&&null!=l)return{x:u(o),y:u(l)}}return null}function k(t,n,e){let r=t.replaceAll(/[\s+]/g,"");return""!==e&&(r=r.replaceAll(e,"")),""!==n&&(r=r.replaceAll(n,".")),r}function G(t){if(!t||null!=p(t)||!s())return null;const n=f(t),e=K(n?.latitude),r=K(n?.longitude);return null!=r&&null!=e?{latitude:e,longitude:r}:null}function H(t){return K(g(t))}function J(t){return K(m(t))}function K(t){return null!=t?a(t,"degrees","geographic"):null}const N=new t(-180,180),O=new t(-90,90);export{k as cleanNumber,K as createGeographicCoordinate,A as formatLatitudeDecimalDegreesForInputMode,w as formatLongitudeDecimalDegreesForInputMode,D as getFormatters,B as makeQuantityParser,J as parseLatitude,G as parseLatitudeLongitude,H as parseLongitude,Q as parseXY,C as sanitizeAngle};
5
+ import{Cyclical as t}from"../../../../core/Cyclical.js";import{formatRelativeVerticalLength as n,formatVerticalLength as e,formatLength as r,formatRelativeLength as i,formatArea as o,formatAngle as l}from"../../../../core/quantityFormatUtils.js";import{createAngle as u,toUnit as a,createScalar as c}from"../../../../core/quantityUtils.js";import{fromLongitude as s,fromLatitude as f,isLoaded as g,fromLatitudeLongitude as m}from"../../../../geometry/coordinateFormatter.js";import{parseNumber as p,formatNumber as d}from"../../../../intl/number.js";import{getDegreesGeographic as h}from"../../../support/angularMeasurementUtils.js";const v=1,y=6;function D(t,l){return{angleRelative:x,direction:j,directionRelative:R,directionRelativeBilateral:$,latitudeDecimalDegrees:L,longitudeDecimalDegrees:F,area:(n,e)=>o(t,n,e??l.area),length:(n,e,i)=>r(t,n,e??l.length,i),lengthRelative:(n,e)=>i(t,n,e??l.length),totalLength:(n,e)=>r(t,n,e??l.length),verticalLength:(n,r)=>e(t,n,r??l.verticalLength),verticalLengthRelative:(e,r)=>n(t,e,r??l.verticalLength),percentage:z,scalar:Z,scale:T}}function x(t){return d(t,{signDisplay:"exceptZero",...b(v)})}function j(t){return l(t,t.rotationType,v)}function R(t){const n=h(t);return d(n,{style:"unit",unitDisplay:"narrow",unit:"degree",signDisplay:n>0?"never":"exceptZero",...b(v)})}function $(t){return l(t,t.rotationType,v)}function F(t){return U(t,N)}function L(t){return U(t,O)}function w(t){return q(t,N)}function A(t){return q(t,O)}function U(t,n){const e=!1,r="geographic";return l(a(t,"degrees"),r,y,n,e)}function q(t,n){const e=!1,r=n.normalize(a(t,"degrees").value,void 0,e);return Z(c(r),y)}function z(t){return d(t.value,{style:"percent"})}function T(t){return d(t,{style:"percent",maximumFractionDigits:0})}function Z(t,n){return d(t.value,b(n))}function b(t){return{minimumFractionDigits:t,maximumFractionDigits:t}}function B({createQuantity:t,sanitize:n}){return(e,r)=>{if(null==e)return null;n&&(e=n(e));const i=p(e);return null==i?null:t(i,r)}}function C(t){return t.replaceAll(/[*^~°º]/g,"")}const E=t=>{let n=`[-+]?[0-9${t.thousands}]+`;return""!==t.decimal&&(n+=`${t.decimal}[0-9]+`),new RegExp(`^(${n}\\s*)${t.separator}(\\s*${n})$`,"i")},I=" ",M=[];for(const P of[",","\\|","\\s+"])for(const t of["\\.",",",""])for(const n of["",",","\\.",I,"\\s+"])P!==t&&P!==n&&t!==n&&M.push({separator:P,decimal:t,thousands:n,pattern:E({decimal:t,thousands:n,separator:P})});function Q(t){for(const{decimal:n,thousands:e,pattern:r}of M){r.lastIndex=0;const i=t.match(r);if(!i)continue;const o=p(k(i[1],n,e)),l=p(k(i[2],n,e));if(null!=o&&null!=l)return{x:c(o),y:c(l)}}return null}function k(t,n,e){let r=t.replaceAll(/[\s+]/g,"");return""!==e&&(r=r.replaceAll(e,"")),""!==n&&(r=r.replaceAll(n,".")),r}function G(t){if(!t||null!=p(t)||!g())return null;const n=m(t),e=K(n?.latitude),r=K(n?.longitude);return null!=r&&null!=e?{latitude:e,longitude:r}:null}function H(t){return K(s(t))}function J(t){return K(f(t))}function K(t){return null!=t?u(t,"degrees","geographic"):null}const N=new t(-180,180),O=new t(-90,90);export{k as cleanNumber,K as createGeographicCoordinate,A as formatLatitudeDecimalDegreesForInputMode,w as formatLongitudeDecimalDegreesForInputMode,D as getFormatters,B as makeQuantityParser,J as parseLatitude,G as parseLatitudeLongitude,H as parseLongitude,Q as parseXY,C as sanitizeAngle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as l}from"../../../core/quantityUtils.js";import{watch as a}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/unitUtils.js";import{g as u,G as c,u as p}from"../../../chunks/vec32.js";import{clone as f,ONES as m,create as d,UNIT_Z as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoaded as y,load as v}from"../../../geometry/coordinateFormatter.js";import j from"../../../geometry/support/MeshTransform.js";import{isRelativeVertexSpace as x}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as h}from"../../../geometry/support/webMercatorUtils.js";import{tooltipKeys as U}from"../keybindings.js";import S from"../Tooltip.js";import{parseLatitudeLongitude as w,parseXY as A}from"./fields/parsingAndFormattingUtils.js";import{getDegreesArithmetic as M,getDegreesGeographic as k}from"../../support/angularMeasurementUtils.js";function R(t){const o=new S(t());return o.addHandles(a((()=>t()),(({view:t,options:e,info:n})=>{o.view=t,void 0!==e&&(o.options=e),void 0!==n&&(o.info=n)}))),o}function V(t,o){const e=x(o.vertexSpace),{scale:n,orientation:l}=t,{transform:a}=o,s=T(a);e&&null!=s?(l.actual=r(s,"degrees","arithmetic"),l.visible=!0):(l.actual=null,l.visible=!1),e?(n.actual=i(G(a)),n.visible=!0):(n.actual=null,n.visible=!1)}function z(t,o,e){if(!o||!x(o.vertexSpace))return;const n=o.transform??=new j;D(t,n,e),P(t,n,e)}function D(t,o,e){const n=M(t.orientation.actual),r=q(o.rotationAxis);if(null==n||null==r)return;const i=o.rotationAngle,l=n*r,a=(n-i)*r;i!==l&&(e?.onRotateStart(0),o.rotationAngle=l,e?.onRotate(a),e?.onRotateStop(a))}function P(t,o,e){const n=t.scale.actual?.value,r=G(o);if(null==n||n===r)return;const{scale:i}=o;let l;if(0===r)l=f(m);else{const t=n/r;l=u(d(),i,t)}e?.onScaleStart(i[0],i[1],i[2]),o.scale=l,e?.onScale(l[0],l[1],l[2]),e?.onScaleStop(l[0],l[1],l[2])}function F(t,o){const{x:e,y:r,z:i}=o,{x:l,y:a,z:s}=E(t,o.spatialReference);return{dx:null==l||n(l,e)?0:l-e,dy:null==a||n(a,r)?0:a-r,dz:null==s||null==i||n(s,i)?0:s-i}}function E(t,o){let e,n;t.geographic?(e=k(t.longitude.actual),n=k(t.latitude.actual),b(o)&&(null!=e&&null!=n?[e,n]=h(e,n,I):null!=e?e=h(e,0,I)[0]:null!=n&&(n=h(0,n,I)[1]))):(e=t.x.actual?.value,n=t.y.actual?.value);const r=t.elevation.actual,i=s(o);return{x:e,y:n,z:null!=i&&null!=r?l(r,i):void 0}}const I=[0,0];function T(t){if(!t)return 0;const o=q(t.rotationAxis);return null!=o?o*t.rotationAngle:null}function q(t){return c(t,g)?1:c(t,B)?-1:null}const B=p(d(),g);function G(t){return t?Math.max(...t.scale):1}function H(t,o){return!("key-down"!==t.type||t.key!==U.enterInputMode||!o||!O(o.info))&&(o.enterInputMode(),t.preventDefault(),t.stopPropagation(),!0)}function O(t){const o=t?.sketchOptions;if(!o)return!1;const{inputEnabled:e,visibleElements:n}=o.tooltips;return e&&!0===t.editableFields.some((({name:t})=>"x"===t||"y"===t?n.coordinates:n[t]))}function C(n,r){let i=null;return o([n.on("paste",(async o=>{i?.abort(),i=t((async()=>{y()||await v(),J(o,n.info,r)}))})),t((()=>v())),e((()=>i?.abort()))])}function J(t,o,e){if(!o||!("geographic"in o))return;const n=t.clipboardData?.getData("text");if(!n)return;const r=o=>{t.stopPropagation(),t.preventDefault(),e?.onBeforePaste(),o(),e?.onAfterPaste()};if(o.geographic){const t=w(n);t&&r((()=>{o.longitude.applyValue(t.longitude),o.latitude.applyValue(t.latitude)}))}else{const t=A(n);t&&r((()=>{o.x.applyValue(t.x),o.y.applyValue(t.y)}))}}export{C as connectPasteEvent,H as enterInputModeIfAvailable,F as getXYZDeltasFromTooltipInfo,R as makeTooltip,J as pasteLocation,z as updateMeshTransformFromTooltipInfo,V as updateTooltipInfoFromMeshTransform};
5
+ import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as l}from"../../../core/quantityUtils.js";import{watch as a}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/unitUtils.js";import{u,g as c,G as p}from"../../../chunks/vec32.js";import{UNIT_Z as f,create as m,clone as d,ONES as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoaded as y,load as v}from"../../../geometry/coordinateFormatter.js";import j from"../../../geometry/support/MeshTransform.js";import{isRelativeVertexSpace as x}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as h}from"../../../geometry/support/webMercatorUtils.js";import{tooltipKeys as U}from"../keybindings.js";import S from"../Tooltip.js";import{parseLatitudeLongitude as w,parseXY as A}from"./fields/parsingAndFormattingUtils.js";import{getDegreesArithmetic as M,getDegreesGeographic as k}from"../../support/angularMeasurementUtils.js";function R(t){const o=new S(t());return o.addHandles(a((()=>t()),(({view:t,options:e,info:n})=>{o.view=t,void 0!==e&&(o.options=e),void 0!==n&&(o.info=n)}))),o}function V(t,o){const e=x(o.vertexSpace),{scale:n,orientation:l}=t,{transform:a}=o,s=T(a);e&&null!=s?(l.actual=r(s,"degrees","arithmetic"),l.visible=!0):(l.actual=null,l.visible=!1),e?(n.actual=i(G(a)),n.visible=!0):(n.actual=null,n.visible=!1)}function z(t,o,e){if(!o||!x(o.vertexSpace))return;const n=o.transform??=new j;D(t,n,e),P(t,n,e)}function D(t,o,e){const n=M(t.orientation.actual),r=q(o.rotationAxis);if(null==n||null==r)return;const i=o.rotationAngle,l=n*r,a=(n-i)*r;i!==l&&(e?.onRotateStart(0),o.rotationAngle=l,e?.onRotate(a),e?.onRotateStop(a))}function P(t,o,e){const n=t.scale.actual?.value,r=G(o);if(null==n||n===r)return;const{scale:i}=o;let l;if(0===r)l=d(g);else{const t=n/r;l=c(m(),i,t)}e?.onScaleStart(i[0],i[1],i[2]),o.scale=l,e?.onScale(l[0],l[1],l[2]),e?.onScaleStop(l[0],l[1],l[2])}function F(t,o){const{x:e,y:r,z:i}=o,{x:l,y:a,z:s}=E(t,o.spatialReference);return{dx:null==l||n(l,e)?0:l-e,dy:null==a||n(a,r)?0:a-r,dz:null==s||null==i||n(s,i)?0:s-i}}function E(t,o){let e,n;t.geographic?(e=k(t.longitude.actual),n=k(t.latitude.actual),b(o)&&(null!=e&&null!=n?[e,n]=h(e,n,I):null!=e?e=h(e,0,I)[0]:null!=n&&(n=h(0,n,I)[1]))):(e=t.x.actual?.value,n=t.y.actual?.value);const r=t.elevation.actual,i=s(o);return{x:e,y:n,z:null!=i&&null!=r?l(r,i):void 0}}const I=[0,0];function T(t){if(!t)return 0;const o=q(t.rotationAxis);return null!=o?o*t.rotationAngle:null}function q(t){return p(t,f)?1:p(t,B)?-1:null}const B=u(m(),f);function G(t){return t?Math.max(...t.scale):1}function H(t,o){return!("key-down"!==t.type||t.key!==U.enterInputMode||!o||!O(o.info))&&(o.enterInputMode(),t.preventDefault(),t.stopPropagation(),!0)}function O(t){const o=t?.sketchOptions;if(!o)return!1;const{inputEnabled:e,visibleElements:n}=o.tooltips;return e&&!0===t.editableFields.some((({name:t})=>"x"===t||"y"===t?n.coordinates:n[t]))}function C(n,r){let i=null;return o([n.on("paste",(async o=>{i?.abort(),i=t((async()=>{y()||await v(),J(o,n.info,r)}))})),t((()=>v())),e((()=>i?.abort()))])}function J(t,o,e){if(!o||!("geographic"in o))return;const n=t.clipboardData?.getData("text");if(!n)return;const r=o=>{t.stopPropagation(),t.preventDefault(),e?.onBeforePaste(),o(),e?.onAfterPaste()};if(o.geographic){const t=w(n);t&&r((()=>{o.longitude.applyValue(t.longitude),o.latitude.applyValue(t.latitude)}))}else{const t=A(n);t&&r((()=>{o.x.applyValue(t.x),o.y.applyValue(t.y)}))}}export{C as connectPasteEvent,H as enterInputModeIfAvailable,F as getXYZDeltasFromTooltipInfo,R as makeTooltip,J as pasteLocation,z as updateMeshTransformFromTooltipInfo,V as updateTooltipInfoFromMeshTransform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{cyclicalDegrees as e,Cyclical as t}from"../../core/Cyclical.js";import{convertRotationType as r,createAngle as i}from"../../core/quantityUtils.js";import{convertUnit as o}from"../../core/unitUtils.js";import{angle as n}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as a,UNIT_Y as s}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{q as c,c as l,i as u}from"../../chunks/vec32.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as m}from"../../geometry/projection/projectVectorToVector.js";import{geodesicCompatibleSpatialReference as g,inverseGeodeticSolver as p,InverseGeodeticSolverResult as v,directGeodeticSolver as d}from"../../geometry/support/geodesicUtils.js";import{equals as h}from"../../geometry/support/spatialReferenceUtils.js";var j;function R(e,t){if(null==e||null==t)return;const r=b(e,t);return null!=r?i(r,"radians","geographic"):void 0}!function(e){e.Absolute="absolute",e.Relative="relative",e.RelativeBilateral="relative-bilateral"}(j||(j={}));const b=(()=>{const e=f(),t=f();return(r,i)=>(u(e,r.x,r.y,r.z??0),u(t,i.x,i.y,i.z??0),y(e,t,r.spatialReference,i.spatialReference))})(),y=(()=>{const e=a(),t=f(),r=f();return(i,a,l,u)=>{if(c(i,a))return;const f=g(l),v=g(u);if(f&&v&&h(f,v)&&m(i,l,t,f)&&m(a,u,r,v)){const{azimuth:e}=p(V,t,r,f);return null!=e?o(e,"degrees","radians"):void 0}e[0]=a[0]-i[0],e[1]=a[1]-i[1];let d=n(s,e);return e[0]<0&&(d=k-d),d}})();function x(e,t,r,i=j.Absolute){if(t&&r)switch(i){case j.Absolute:return R(t,r);case j.Relative:return w(z(e,t,r),j.Relative);case j.RelativeBilateral:return w(z(e,t,r),j.RelativeBilateral)}}function z(e,t,r){if(!e||!t||!r)return;const o=b(e,t),n=b(t,r);return null!=o&&null!=n?i(n-o,"radians","geographic"):void 0}function w(e,t){if(null!=e)switch(t){case j.Absolute:return A(e);case j.Relative:{const t=T(e);let r=I.normalize(t,0,!0);return-180===r&&(r=180),i(r,"degrees","geographic")}case j.RelativeBilateral:{const t=T(e),r=Math.abs(I.normalize(t,0,!0));return i(r,"degrees","geographic")}}}function A(e){const t=T(e),r=C.normalize(t,0,!0);return i(r,"degrees","geographic")}function B(e,t,n){let a=o(e.value,e.unit,"degrees");return a=r(a,e.rotationType,n),a=o(a,"degrees",t),i(a,t,n)}const M=(()=>{const e=f();return(t,i,n,a,s,c="geodesic")=>{l(e,i);const f=T(s);if("geodesic"===c){const r=g(n);if(r&&m(e,n,e,r))return d(t,e,f,a,r),t[2]=i[2],!!m(t,r,t,n)}const p=r(f,"geographic","arithmetic"),v=o(p,"degrees","radians"),h=i[0]+a*Math.cos(v),j=i[1]+a*Math.sin(v),R=i[2];return u(t,h,j,R),!0}})();function T(e){if(null!=e)return r(q(e),e.rotationType,"geographic")}function U(e){if(null!=e)return r(q(e),e.rotationType,"arithmetic")}function q(e){return o(e.value,e.unit,"degrees")}const V=new v,k=2*Math.PI,C=e,I=new t(-180,180);export{j as DirectionMode,B as convertAngle,R as directionBetweenPoints,x as directionForVertices,U as getDegreesArithmetic,T as getDegreesGeographic,w as getNormalizedDirection,A as getNormalizedGeographicOrientation,M as pointFromDistanceAlongAzimuth,y as radiansGeographicBetweenVec};
5
+ import{cyclicalDegrees as e,Cyclical as t}from"../../core/Cyclical.js";import{createAngle as r,convertRotationType as i}from"../../core/quantityUtils.js";import{convertUnit as o}from"../../core/unitUtils.js";import{angle as n}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as a,UNIT_Y as s}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{q as c,c as l,i as u}from"../../chunks/vec32.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as m}from"../../geometry/projection/projectVectorToVector.js";import{geodesicCompatibleSpatialReference as g,inverseGeodeticSolver as p,InverseGeodeticSolverResult as v,directGeodeticSolver as d}from"../../geometry/support/geodesicUtils.js";import{equals as h}from"../../geometry/support/spatialReferenceUtils.js";var j;function R(e,t){if(null==e||null==t)return;const i=b(e,t);return null!=i?r(i,"radians","geographic"):void 0}!function(e){e.Absolute="absolute",e.Relative="relative",e.RelativeBilateral="relative-bilateral"}(j||(j={}));const b=(()=>{const e=f(),t=f();return(r,i)=>(u(e,r.x,r.y,r.z??0),u(t,i.x,i.y,i.z??0),y(e,t,r.spatialReference,i.spatialReference))})(),y=(()=>{const e=a(),t=f(),r=f();return(i,a,l,u)=>{if(c(i,a))return;const f=g(l),v=g(u);if(f&&v&&h(f,v)&&m(i,l,t,f)&&m(a,u,r,v)){const{azimuth:e}=p(V,t,r,f);return null!=e?o(e,"degrees","radians"):void 0}e[0]=a[0]-i[0],e[1]=a[1]-i[1];let d=n(s,e);return e[0]<0&&(d=k-d),d}})();function x(e,t,r,i=j.Absolute){if(t&&r)switch(i){case j.Absolute:return R(t,r);case j.Relative:return w(z(e,t,r),j.Relative);case j.RelativeBilateral:return w(z(e,t,r),j.RelativeBilateral)}}function z(e,t,i){if(!e||!t||!i)return;const o=b(e,t),n=b(t,i);return null!=o&&null!=n?r(n-o,"radians","geographic"):void 0}function w(e,t){if(null!=e)switch(t){case j.Absolute:return A(e);case j.Relative:{const t=T(e);let i=I.normalize(t,0,!0);return-180===i&&(i=180),r(i,"degrees","geographic")}case j.RelativeBilateral:{const t=T(e),i=Math.abs(I.normalize(t,0,!0));return r(i,"degrees","geographic")}}}function A(e){const t=T(e),i=C.normalize(t,0,!0);return r(i,"degrees","geographic")}function B(e,t,n){let a=o(e.value,e.unit,"degrees");return a=i(a,e.rotationType,n),a=o(a,"degrees",t),r(a,t,n)}const M=(()=>{const e=f();return(t,r,n,a,s,c="geodesic")=>{l(e,r);const f=T(s);if("geodesic"===c){const i=g(n);if(i&&m(e,n,e,i))return d(t,e,f,a,i),t[2]=r[2],!!m(t,i,t,n)}const p=i(f,"geographic","arithmetic"),v=o(p,"degrees","radians"),h=r[0]+a*Math.cos(v),j=r[1]+a*Math.sin(v),R=r[2];return u(t,h,j,R),!0}})();function T(e){if(null!=e)return i(q(e),e.rotationType,"geographic")}function U(e){if(null!=e)return i(q(e),e.rotationType,"arithmetic")}function q(e){return o(e.value,e.unit,"degrees")}const V=new v,k=2*Math.PI,C=e,I=new t(-180,180);export{j as DirectionMode,B as convertAngle,R as directionBetweenPoints,x as directionForVertices,U as getDegreesArithmetic,T as getDegreesGeographic,w as getNormalizedDirection,A as getNormalizedGeographicOrientation,M as pointFromDistanceAlongAzimuth,y as radiansGeographicBetweenVec};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as t}from"../../support/jsxFactory.js";import{css as i}from"../css.js";const n=()=>e({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")});function c({viewModel:e,messages:n}){const{state:c,playing:a}=e,o="not-ready"===c||"waiting"===c,s=a?n.pause:n.play,l=t("calcite-action",{active:a,alignment:"center",bind:e,disabled:o,icon:a?"pause-f":"play-f",key:"play",onclick:a?e.pause:e.play,scale:"s",text:s,title:s}),r=n.reverse,d=t("calcite-action",{alignment:"center",bind:e,disabled:o,icon:"reverse-f",key:"reverse",onclick:e.seekBackward,scale:"s",text:r,title:r}),p=n.forward,m=t("calcite-action",{alignment:"center",bind:e,disabled:o,icon:"forward-f",key:"forward",onclick:e.seekForward,scale:"s",text:p,title:p}),g=n.beginning,b=t("calcite-action",{alignment:"center",bind:e,disabled:o,icon:"beginning-f",key:"beginning",onclick:e.seekToBeginning,scale:"s",text:g,title:g}),k=n.end,y=t("calcite-action",{alignment:"center",bind:e,disabled:o,icon:"end-f",key:"end",onclick:e.seekToEnding,scale:"s",text:k,title:k});return t("calcite-action-bar",{class:i.playerActions,expandDisabled:!0,layout:"horizontal",scale:"s"},[b,d,l,m,y])}export{c as PlayerActionsGroup,n as loadPlayerActionsGroupComponents};
5
+ import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as i}from"../../support/jsxFactory.js";import{css as t}from"../css.js";const n=()=>e({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")});function c({viewModel:e,messages:n}){const{state:c,playing:a,layer:o}=e,s=!!o?.isLive,l="not-ready"===c||"waiting"===c,r=a?n.pause:n.play,d=i("calcite-action",{active:a,alignment:"center",bind:e,disabled:l,icon:a?"pause-f":"play-f",key:"play",onclick:a?e.pause:e.play,scale:"s",text:r,title:r}),p=n.reverse,m=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"reverse-f",key:"reverse",onclick:e.seekBackward,scale:"s",text:p,title:p}),g=n.forward,b=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"forward-f",key:"forward",onclick:e.seekForward,scale:"s",text:g,title:g}),k=n.beginning,y=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"beginning-f",key:"beginning",onclick:e.seekToBeginning,scale:"s",text:k,title:k}),f=n.end,u=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"end-f",key:"end",onclick:e.seekToEnding,scale:"s",text:f,title:f});return i("calcite-action-bar",{class:t.playerActions,expandDisabled:!0,layout:"horizontal",scale:"s"},[y,m,d,b,u])}export{c as PlayerActionsGroup,n as loadPlayerActionsGroupComponents};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const e="esri-video-player",o={base:e,color:`${e}__color-block`,colorActive:`${e}__color-block__active`,colorPicker:`${e}__color-picker`,playerActions:`${e}__actions`,playerControls:`${e}__controls`,playerTimecode:`${e}__timecode`,playerToolbar:`${e}__toolbar`,progress:`${e}__progress`,rangeSlider:`${e}__range-slider`,settings:`${e}__settings`,settingsFlow:`${e}__settings-flow`,slider:`${e}__slider`,sliderProgressContainer:`${e}__slider-progress-container`,videoView:`${e}__video-view`};export{o as css};
5
+ const o="esri-video-player",e={base:o,color:`${o}__color-block`,colorActive:`${o}__color-block__active`,colorPicker:`${o}__color-picker`,playerActionsGroup:`${o}__actions-group`,playerActions:`${o}__actions`,playerControls:`${o}__controls`,playerTimecode:`${o}__timecode`,playerToolbar:`${o}__toolbar`,playerToolbarTopPadding:`${o}__toolbar--top-padding`,playerLiveIcon:`${o}__live-icon`,progress:`${o}__progress`,rangeSlider:`${o}__range-slider`,settings:`${o}__settings`,settingsFlow:`${o}__settings-flow`,slider:`${o}__slider`,sliderProgressContainer:`${o}__slider-progress-container`,videoView:`${o}__video-view`};export{e as css};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as i}from"../core/deprecate.js";import{clone as t}from"../core/lang.js";import o from"../core/Logger.js";import{watch as s,initial as r}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as d}from"../intl/date.js";import l from"../views/VideoView.js";import m from"./Slider.js";import c from"./Widget.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as u}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{tsx as v}from"./support/jsxFactory.js";import{css as w}from"./VideoPlayer/css.js";import g from"./VideoPlayer/VideoPlayerViewModel.js";import{loadMetadataSectionComponents as y,MetadataSection as V}from"./VideoPlayer/components/MetadataSection.js";import{loadPlayerActionsGroupComponents as f,PlayerActionsGroup as b}from"./VideoPlayer/components/PlayerActionsGroup.js";import{loadPlayerControlsGroupComponents as M,PlayerControlsGroup as j}from"./VideoPlayer/components/PlayerControlsGroup.js";import{defaultSettings as _}from"./VideoPlayer/components/SettingsButton.js";let P=class extends c{constructor(e,s){super(e,s),this._settings=t(_),this._metadataVisible=!1,this._slider=new m({visibleElements:{labels:!1,rangeLabels:!1},min:0,max:100,values:[0],thumbsConstrained:!1}),this.videoView=new l({container:document.createElement("div"),constraints:{rotationEnabled:!1}}),this.viewModel=new g,i(o.getLogger(this),"Video Player","arcgis-video-player",{version:"4.33"})}initialize(){this.addHandles([s((()=>this.viewModel.layer),(()=>{this.videoView.layer=this.viewModel.layer}),r),s((()=>this.view?.map),(()=>{this.videoView.map=this.view?.map}),r),this._slider.on(["thumb-change","thumb-drag"],(({value:e})=>{const i=e*this.viewModel.duration/100;this.viewModel.seekTo(i)}))])}loadDependencies(){return Promise.all([f(),M(),y(),p({progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim")})])}get icon(){return"video-web"}set icon(e){this._overrideIfSome("icon",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get rotationEnabled(){return this.videoView.constraints.rotationEnabled}set rotationEnabled(e){this.videoView.constraints.rotationEnabled=e,this.videoView.ui.components=e?[...this.videoView.ui.components,"compass"]:this.videoView.ui.components.filter((e=>"compass"!==e))}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get zoomEnabled(){return this.videoView.navigation.mouseWheelZoomEnabled}set zoomEnabled(e){this.videoView.navigation.mouseWheelZoomEnabled=e,this.videoView.ui.components=e?[...this.videoView.ui.components,"zoom"]:this.videoView.ui.components.filter((e=>"zoom"!==e))}render(){return v("div",{class:this.classes(w.base,u.widget)},v("calcite-panel",{heading:this.layer?.title||"Video Player"},this._renderLoadingScrim(),this._renderBuffering(),this._renderVideoSection(),this._renderActionBar(),this._renderMetadataSection()))}_renderLoadingScrim(){const{state:e}=this.viewModel;return this.videoView.ready?null:v("calcite-scrim",{loading:"error"!==e},"error"===e?this.messages.errorLoadingLayer:null)}_renderBuffering(){const{currentTime:e,buffered:i,duration:t}=this.viewModel,o=i/(t||1),s=e/(t||1);return this.viewModel.ended||o>s?null:v("calcite-progress",{type:"indeterminate"})}_renderVideoSection(){const{buffered:e,currentTime:i,duration:t}=this.viewModel,o=this.videoView.container;if(!o)return null;o.className=w.videoView;const s=e/(t||1),r=i/(t||1);return this._slider.values=[100*r],v("section",{afterCreate:S,bind:o},v("div",{class:w.sliderProgressContainer},v("progress",{class:w.progress,max:"1",value:`${s}`}),v("div",{class:w.slider},this._slider.render())))}_renderActionBar(){return v("div",{class:w.playerToolbar},v(b,{messages:this.messages,viewModel:this.viewModel}),v("div",{class:w.playerTimecode},E(this.viewModel.currentTime)," / ",E(this.viewModel.duration)),v(j,{messages:this.messages,settings:this._settings,toggleMetadata:()=>this._metadataVisible=!this._metadataVisible,viewModel:this.viewModel}))}_renderMetadataSection(){return this._metadataVisible?v(V,{messages:this.messages,viewModel:this.viewModel}):null}};function E(e){return isFinite(e)?d(1e3*Math.round(e),{minute:"2-digit",second:"2-digit"}):""}function S(e){const i=this;e.prepend(i)}e([n()],P.prototype,"_settings",void 0),e([n()],P.prototype,"icon",null),e([n()],P.prototype,"layer",null),e([n(),h("esri/widgets/VideoPlayer/t9n/VideoPlayer")],P.prototype,"messages",void 0),e([n()],P.prototype,"rotationEnabled",null),e([n()],P.prototype,"videoView",void 0),e([n({type:g})],P.prototype,"viewModel",void 0),e([n()],P.prototype,"view",null),e([n()],P.prototype,"zoomEnabled",null),P=e([a("esri.widgets.VideoPlayer")],P);const L=P;export{L as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as i}from"../core/deprecate.js";import{clone as o}from"../core/lang.js";import t from"../core/Logger.js";import{watch as s,initial as r}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as l}from"../intl/date.js";import d from"../views/VideoView.js";import c from"./Slider.js";import m from"./Widget.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as v}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as u}from"./support/decorators/messageBundle.js";import{tsx as h}from"./support/jsxFactory.js";import{css as w}from"./VideoPlayer/css.js";import g from"./VideoPlayer/VideoPlayerViewModel.js";import{loadMetadataSectionComponents as y,MetadataSection as V}from"./VideoPlayer/components/MetadataSection.js";import{loadPlayerActionsGroupComponents as f,PlayerActionsGroup as b}from"./VideoPlayer/components/PlayerActionsGroup.js";import{loadPlayerControlsGroupComponents as M,PlayerControlsGroup as j}from"./VideoPlayer/components/PlayerControlsGroup.js";import{defaultSettings as _}from"./VideoPlayer/components/SettingsButton.js";let P=class extends m{constructor(e,s){super(e,s),this._settings=o(_),this._metadataVisible=!1,this._slider=new c({visibleElements:{labels:!1,rangeLabels:!1},min:0,max:100,values:[0],thumbsConstrained:!1}),this.videoView=new d({container:document.createElement("div"),constraints:{rotationEnabled:!1}}),this.viewModel=new g,i(t.getLogger(this),"Video Player","arcgis-video-player",{version:"4.33"})}initialize(){this.addHandles([s((()=>this.viewModel.layer),(()=>{this.videoView.layer=this.viewModel.layer}),r),s((()=>this.view?.map),(()=>{this.videoView.map=this.view?.map}),r),this._slider.on(["thumb-change","thumb-drag"],(({value:e})=>{const i=e*this.viewModel.duration/100;this.viewModel.seekTo(i)}))])}loadDependencies(){return Promise.all([f(),M(),y(),p({progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")})])}get icon(){return"video-web"}set icon(e){this._overrideIfSome("icon",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get rotationEnabled(){return this.videoView.constraints.rotationEnabled}set rotationEnabled(e){this.videoView.constraints.rotationEnabled=e,this.videoView.ui.components=e?[...this.videoView.ui.components,"compass"]:this.videoView.ui.components.filter((e=>"compass"!==e))}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get zoomEnabled(){return this.videoView.navigation.mouseWheelZoomEnabled}set zoomEnabled(e){this.videoView.navigation.mouseWheelZoomEnabled=e,this.videoView.ui.components=e?[...this.videoView.ui.components,"zoom"]:this.videoView.ui.components.filter((e=>"zoom"!==e))}render(){return h("div",{class:this.classes(w.base,v.widget)},h("calcite-panel",{heading:this.layer?.title||"Video Player"},this._renderLoadingScrim(),this._renderBuffering(),this._renderVideoSection(),this._renderActionBar(),this._renderMetadataSection()))}_renderLoadingScrim(){const{state:e}=this.viewModel;return this.videoView.ready?null:h("calcite-scrim",{loading:"error"!==e},"error"===e?this.messages.errorLoadingLayer:null)}_renderBuffering(){const{currentTime:e,buffered:i,duration:o}=this.viewModel,t=i/(o||1),s=e/(o||1);return this.viewModel.ended||t>s?null:h("calcite-progress",{type:"indeterminate"})}_renderVideoSection(){const{buffered:e,currentTime:i,duration:o,layer:t}=this.viewModel,s=this.videoView.container,r=!!t?.isLive;if(!s)return null;s.className=w.videoView;const n=e/(o||1),a=i/(o||1);return this._slider.values=[100*a],h("section",{afterCreate:S,bind:s},r?null:h("div",{class:w.sliderProgressContainer},h("progress",{class:w.progress,max:"1",value:`${n}`}),h("div",{class:w.slider},this._slider.render())))}_renderActionBar(){const e=!!this.viewModel.layer?.isLive,i=e?w.playerToolbarTopPadding:void 0;return h("div",{class:this.classes(w.playerToolbar,i)},h("div",{class:w.playerActionsGroup},h(b,{messages:this.messages,viewModel:this.viewModel}),e?h("calcite-icon",{class:w.playerLiveIcon,icon:"beacon"}):null,h("div",{class:w.playerTimecode},E(this.viewModel.currentTime)," / ",E(this.viewModel.duration))),h(j,{messages:this.messages,settings:this._settings,toggleMetadata:()=>this._metadataVisible=!this._metadataVisible,viewModel:this.viewModel}))}_renderMetadataSection(){return this._metadataVisible?h(V,{messages:this.messages,viewModel:this.viewModel}):null}};function E(e){return isFinite(e)?l(1e3*Math.round(e),{minute:"2-digit",second:"2-digit"}):""}function S(e){const i=this;e.prepend(i)}e([n()],P.prototype,"_settings",void 0),e([n()],P.prototype,"icon",null),e([n()],P.prototype,"layer",null),e([n(),u("esri/widgets/VideoPlayer/t9n/VideoPlayer")],P.prototype,"messages",void 0),e([n()],P.prototype,"rotationEnabled",null),e([n()],P.prototype,"videoView",void 0),e([n({type:g})],P.prototype,"viewModel",void 0),e([n()],P.prototype,"view",null),e([n()],P.prototype,"zoomEnabled",null),P=e([a("esri.widgets.VideoPlayer")],P);const L=P;export{L as default};