@arcgis/core 4.31.0-next.20240913 → 4.31.0-next.20240915

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 (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{17497abae2bb87c4f342.js → 06097550c6bf268f77e9.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{65b22b9f643ee79b0742.js → 55f4ef25bddd7396ef0d.js} +2 -2
  4. package/assets/esri/core/workers/chunks/{660c4a3fd496672c717c.js → ad5b4185a2f46571481e.js} +24 -16
  5. package/assets/esri/core/workers/chunks/{b51525d34957f71b9315.js → b372a0aab338a5ecad7c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{ff8d4d917755597dfc45.js → c05d02648b8e8b9caddd.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{681975f155355bb08532.js → f7865b33931bb8f67adc.js} +4 -4
  8. package/assets/esri/themes/base/widgets/_Print.scss +6 -4
  9. package/assets/esri/themes/dark/main.css +1 -1
  10. package/assets/esri/themes/light/main.css +1 -1
  11. package/assets/esri/themes/light/view.css +1 -1
  12. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  13. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  14. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  15. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  16. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  17. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  18. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  19. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  20. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  21. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  22. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  23. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  24. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  25. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  26. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  27. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  28. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  29. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  30. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  31. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  32. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  33. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  34. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  35. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  36. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  37. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  38. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  39. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  40. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  41. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  42. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  43. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  44. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  45. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  46. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  51. package/assets/esri/widgets/Print/t9n/Print.json +1 -1
  52. package/assets/esri/widgets/Print/t9n/Print_en.json +1 -1
  53. package/chunks/Centroid-DZi-eb9F.js +1 -1
  54. package/chunks/ComponentShader.glsl.js +3 -4
  55. package/chunks/GeometryCleaner-k94LXQsr.js +5 -0
  56. package/chunks/HUDMaterial.glsl.js +1 -1
  57. package/chunks/NativeLine.glsl.js +2 -2
  58. package/chunks/OperatorGeneralize.js +5 -0
  59. package/chunks/OperatorGeodesicBuffer.js +1 -1
  60. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  61. package/chunks/OperatorGeodeticDistance.js +1 -1
  62. package/chunks/OperatorProximity.js +1 -1
  63. package/chunks/Path.glsl.js +2 -2
  64. package/chunks/PointRenderer.glsl.js +1 -1
  65. package/chunks/Polyline.js +1 -1
  66. package/chunks/Terrain.glsl.js +33 -33
  67. package/chunks/WaterSurface.glsl.js +12 -12
  68. package/geometry/operators/bufferOperator.js +5 -0
  69. package/geometry/operators/containsOperator.js +1 -1
  70. package/geometry/operators/crossesOperator.js +1 -1
  71. package/geometry/operators/disjointOperator.js +1 -1
  72. package/geometry/operators/equalsOperator.js +1 -1
  73. package/geometry/operators/generalizeOperator.js +5 -0
  74. package/geometry/operators/geodesicBufferOperator.js +1 -1
  75. package/geometry/operators/geodeticDensifyByLengthOperator.js +1 -1
  76. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  77. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  78. package/geometry/operators/gx/operatorBuffer.js +5 -0
  79. package/geometry/operators/gx/operatorClip.js +1 -1
  80. package/geometry/operators/gx/operatorCut.js +1 -1
  81. package/geometry/operators/gx/operatorDensify.js +1 -1
  82. package/geometry/operators/gx/operatorDifference.js +1 -1
  83. package/geometry/operators/gx/operatorGeneralize.js +5 -0
  84. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  85. package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
  86. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  87. package/geometry/operators/gx/operatorIntersection.js +1 -1
  88. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  89. package/geometry/operators/gx/operatorOffset.js +1 -1
  90. package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
  91. package/geometry/operators/gx/operatorSimplify.js +1 -1
  92. package/geometry/operators/gx/operatorUnion.js +1 -1
  93. package/geometry/operators/intersectsOperator.js +1 -1
  94. package/geometry/operators/offsetOperator.js +1 -1
  95. package/geometry/operators/overlapsOperator.js +1 -1
  96. package/geometry/operators/relateOperator.js +1 -1
  97. package/geometry/operators/reshapeOperator.js +1 -1
  98. package/geometry/operators/support/geodeticCurveType.js +5 -0
  99. package/geometry/operators/touchesOperator.js +1 -1
  100. package/geometry/operators/withinOperator.js +1 -1
  101. package/package.json +1 -1
  102. package/rest/print.js +1 -1
  103. package/rest/support/fileFormat.js +1 -1
  104. package/support/revision.js +1 -1
  105. package/symbols/cim/cimAnalyzer.js +1 -1
  106. package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
  107. package/views/3d/terrain/OverlayRenderer.js +1 -1
  108. package/views/3d/terrain/TerrainRenderer.js +1 -1
  109. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +9 -9
  110. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +22 -14
  111. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +16 -18
  112. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  113. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  114. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  115. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +1 -1
  116. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  117. package/views/webgl/Texture.js +1 -1
  118. package/widgets/Editor/Upload.js +1 -1
  119. package/widgets/Editor/modelUploadUtils.js +1 -1
  120. package/widgets/Print/CustomTemplate.js +1 -1
  121. package/widgets/Print/FileLink.js +1 -1
  122. package/widgets/Print/PrintViewModel.js +1 -1
  123. package/widgets/Print.js +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5113],{81139:(e,t,r)=>{r.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>d,kb:()=>u,vt:()=>c});var i=r(34727),s=r(4341),n=r(38954),o=r(51850),a=r(32114);function c(e){return e?{origin:(0,o.o8)(e.origin),vector:(0,o.o8)(e.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function l(e,t,r=c()){return(0,n.c)(r.origin,e),(0,n.f)(r.vector,t,e),r}function u(e,t){const r=(0,n.f)(a.rq.get(),t,e.origin),s=(0,n.l)(e.vector,r),o=(0,n.l)(e.vector,e.vector),c=(0,i.qE)(s/o,0,1),l=(0,n.f)(a.rq.get(),(0,n.j)(a.rq.get(),e.vector,c),r);return(0,n.l)(l,l)}function d(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,s,o){const{vector:c,origin:l}=e,u=(0,n.f)(a.rq.get(),t,l),d=(0,n.l)(c,u)/(0,n.q)(c);return(0,n.j)(o,c,(0,i.qE)(d,r,s)),(0,n.g)(o,o,e.origin)}(0,o.vt)(),(0,o.vt)(),new s.I((()=>c()))},99677:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(78888);async function s(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}},78662:(e,t,r)=>{r.d(t,{Gd:()=>d,VC:()=>h}),r(44208);var i,s,n,o=r(34727),a=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),u=(r(31756),r(26857),r(2597));(n=i||(i={}))[n.Undefined=0]="Undefined",n[n.DefinedSize=1]="DefinedSize",n[n.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(s||(s={}));class d extends u.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.a)(e,1,1,1),e;for(let i=0;i<3;++i){const s=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,o.qE)(s,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,a.vt)(),(0,l.vt)(),(0,a.vt)()},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),s=r(69622),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,n.M)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,n.M)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,n.M)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,n.M)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,n.M)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,n.M)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,n.M)()],a.prototype,"SHOW_POI",void 0),(0,i._)([(0,n.M)()],a.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,n.M)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,n.M)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,n.M)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,n.M)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,n.M)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,n.M)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,n.M)()],a.prototype,"LINE_WIREFRAMES",void 0),a=(0,i._)([(0,o.$)("esri.views.3d.support.debugFlags")],a);const c=new a},76591:(e,t,r)=>{r.d(t,{HQ:()=>l});var i=r(58083),s=r(9093),n=r(38954),o=r(51850),a=r(40710),c=(r(33079),r(2597));function l(e,t){!function(e,t,...r){if(!t.hasSlicePlane){const r=c.H`#define rejectBySlice(_pos_) false
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4978],{81139:(e,t,r)=>{r.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>d,kb:()=>u,vt:()=>c});var i=r(34727),s=r(4341),n=r(38954),o=r(51850),a=r(32114);function c(e){return e?{origin:(0,o.o8)(e.origin),vector:(0,o.o8)(e.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function l(e,t,r=c()){return(0,n.c)(r.origin,e),(0,n.f)(r.vector,t,e),r}function u(e,t){const r=(0,n.f)(a.rq.get(),t,e.origin),s=(0,n.l)(e.vector,r),o=(0,n.l)(e.vector,e.vector),c=(0,i.qE)(s/o,0,1),l=(0,n.f)(a.rq.get(),(0,n.j)(a.rq.get(),e.vector,c),r);return(0,n.l)(l,l)}function d(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,s,o){const{vector:c,origin:l}=e,u=(0,n.f)(a.rq.get(),t,l),d=(0,n.l)(c,u)/(0,n.q)(c);return(0,n.j)(o,c,(0,i.qE)(d,r,s)),(0,n.g)(o,o,e.origin)}(0,o.vt)(),(0,o.vt)(),new s.I((()=>c()))},99677:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(78888);async function s(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}},78662:(e,t,r)=>{r.d(t,{Gd:()=>d,VC:()=>h}),r(44208);var i,s,n,o=r(34727),a=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),u=(r(31756),r(26857),r(2597));(n=i||(i={}))[n.Undefined=0]="Undefined",n[n.DefinedSize=1]="DefinedSize",n[n.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(s||(s={}));class d extends u.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.a)(e,1,1,1),e;for(let i=0;i<3;++i){const s=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,o.qE)(s,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,a.vt)(),(0,l.vt)(),(0,a.vt)()},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),s=r(69622),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,n.M)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,n.M)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,n.M)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,n.M)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,n.M)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,n.M)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,n.M)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,n.M)()],a.prototype,"SHOW_POI",void 0),(0,i._)([(0,n.M)()],a.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,n.M)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,n.M)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,n.M)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.M)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,n.M)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,n.M)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,n.M)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,n.M)()],a.prototype,"LINE_WIREFRAMES",void 0),a=(0,i._)([(0,o.$)("esri.views.3d.support.debugFlags")],a);const c=new a},76591:(e,t,r)=>{r.d(t,{HQ:()=>l});var i=r(58083),s=r(9093),n=r(38954),o=r(51850),a=r(40710),c=(r(33079),r(2597));function l(e,t){!function(e,t,...r){if(!t.hasSlicePlane){const r=c.H`#define rejectBySlice(_pos_) false
2
2
  #define discardBySlice(_pos_) {}
3
3
  #define highlightSlice(_color_, _pos_) (_color_)`;return t.hasSliceInVertexProgram&&e.vertex.code.add(r),void e.fragment.code.add(r)}const i=c.H`struct SliceFactors {
4
4
  float front;
@@ -132,25 +132,33 @@ return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
132
132
  ${(0,l.If)(m,`emissions *= textureLookup(texEmission, ${s?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)};
133
133
  return emissions;
134
134
  }
135
- `)}r(25634),(s=i||(i={}))[s.None=0]="None",s[s.Value=1]="Value",s[s.Texture=2]="Texture",s[s.COUNT=3]="COUNT"},76662:(e,t,r)=>{r.d(t,{Q:()=>a});var i=r(49255),s=r(93588),n=r(2597),o=r(63761);function a(e,t){t.output===i.V.Highlight?(e.fragment.uniforms.add(new o.N("depthTexture",((e,t)=>t.mainDepth))),e.fragment.uniforms.add(new o.N("highlightTexture",((e,t)=>t.highlightMixTexture))),e.fragment.uniforms.add(new s.c("highlightLevel",((e,t)=>t.highlightLevel))),e.outputs.add("fragHighlight","vec4",0),e.fragment.code.add(n.H`void outputHighlightNet(bool occluded) {
135
+ `)}r(25634),(s=i||(i={}))[s.None=0]="None",s[s.Value=1]="Value",s[s.Texture=2]="Texture",s[s.COUNT=3]="COUNT"},45935:(e,t,r)=>{r.d(t,{Q:()=>u});var i=r(49255),s=r(39589),n=r(46263);class o extends s.n{constructor(e,t){super(e,"ivec2",n.c.Pass,((r,i,s)=>r.setUniform2iv(e,t(i,s))))}}var a=r(93588),c=r(2597),l=r(63761);function u(e,t){const{fragment:r}=e;t.output===i.V.Highlight?(r.uniforms.add(new l.N("depthTexture",((e,t)=>t.mainDepth)),new l.N("highlightTexture",((e,t)=>t.highlightMixTexture)),new a.c("highlightLevel",((e,t)=>t.highlightLevel)),new o("highlightMixOrigin",((e,t)=>t.highlightMixOrigin))),e.outputs.add("fragHighlight","vec4",0),r.code.add(c.H`vec4 getAccumulatedHighlight() {
136
+ return texelFetch(highlightTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0);
137
+ }
138
+ void outputHighlight(bool occluded) {
136
139
  int ll = highlightLevel & 3;
137
- int newI = 0;
138
- newI |= 1 << (ll*2);
139
- if (occluded) { newI |= 2 << (ll*2); }
140
- vec4 prevHighlight = texelFetch(highlightTexture, ivec2(gl_FragCoord.xy), 0);
141
140
  int li = (highlightLevel >> 2) & 3;
142
- int prevI = int(prevHighlight[li] * 255.0);
143
- int cI = newI | prevI;
144
- float cf = float(cI) / 255.0;
145
- vec4 combinedHighlight = prevHighlight;
146
- combinedHighlight[li] = cf;
141
+ int newI = 1 << (ll*2);
142
+ if (occluded) { newI |= 2 << (ll*2); }
143
+ vec4 combinedHighlight = getAccumulatedHighlight();
144
+ int accumulatedI = int(combinedHighlight[li] * 255.0);
145
+ combinedHighlight[li] = float(newI | accumulatedI) / 255.0;
147
146
  fragHighlight = combinedHighlight;
148
147
  }
149
- void outputHighlight() {
148
+ bool isHighlightOccluded() {
150
149
  float sceneDepth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x;
151
- bool occluded = gl_FragCoord.z > sceneDepth + 5e-5;
152
- outputHighlightNet(occluded);
153
- }`)):e.fragment.code.add(n.H`void outputHighlight() {}`)}},52540:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(37585),s=r(48163),n=(r(26835),r(47286)),o=r(2597);function a(e){e.uniforms.add(new n.G("zProjectionMap",((e,t)=>function(e){const t=e.projectionMatrix;return(0,i.hZ)(c,t[14],t[10])}(t.camera)))),e.code.add(o.H`float linearizeDepth(float depth) {
150
+ return gl_FragCoord.z > sceneDepth + 5e-5;
151
+ }
152
+ void calculateOcclusionAndOutputHighlight() {
153
+ outputHighlight(isHighlightOccluded());
154
+ }`),t.canHaveOverlay&&(r.constants.add("occlusionAndMask","int",85),r.code.add(c.H`void outputAllHighlights(vec4 highlightToAdd) {
155
+ if (highlightToAdd == vec4(0.0)) { discard; }
156
+ int occludedOrMask = isHighlightOccluded() ? 0xaa : 0;
157
+ ivec4 accumulated = ivec4( getAccumulatedHighlight() * 255.0);
158
+ ivec4 added = ivec4(highlightToAdd * 255.0);
159
+ ivec4 masked = (added & ivec4(occlusionAndMask)) | (ivec4(occludedOrMask) & (added<<1));
160
+ fragHighlight = vec4(accumulated | masked) / 255.0;
161
+ }`))):r.code.add(c.H`void calculateOcclusionAndOutputHighlight() {}`)}},52540:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(37585),s=r(48163),n=(r(26835),r(47286)),o=r(2597);function a(e){e.uniforms.add(new n.G("zProjectionMap",((e,t)=>function(e){const t=e.projectionMatrix;return(0,i.hZ)(c,t[14],t[10])}(t.camera)))),e.code.add(o.H`float linearizeDepth(float depth) {
154
162
  float depthNdc = depth * 2.0 - 1.0;
155
163
  float c1 = zProjectionMap[0];
156
164
  float c2 = zProjectionMap[1];
@@ -247,4 +255,4 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
247
255
  return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y);
248
256
  }`),e.vertex.code.add(o.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
249
257
  return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
250
- }`)}function c(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>u(e.screenSizePerspective))))}function l(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>u(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function u(e){return(0,i.a)(d,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const d=(0,s.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>m,Nz:()=>v,NB:()=>f,S7:()=>T});var i=r(58083),s=r(9093),n=r(38954),o=r(51850),a=r(40710),c=r(33079),l=r(20304),u=r(39589),d=r(46263);class h extends u.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,i,s)=>r.setUniformMatrix4fv(e,t(i,s))))}}var _=r(40095);function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",o.uY):e.uniforms.add(new a.W("cameraPosition",((e,t)=>(0,n.a)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new h("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,e.origin))),new a.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.a)(g,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new _.X("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const p=(0,s.vt)(),g=(0,o.vt)();function T(e){e.uniforms.add(new _.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}function v(e){e.uniforms.add(new l.m("pixelRatio",((e,t)=>t.camera.pixelRatio/t.overlayStretch)))}},95250:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"bool",s.c.Pass,((r,i,s)=>r.setUniform1b(e,t(i,s))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",s.c.Pass,((r,i,s)=>r.setUniform2fv(e,t(i,s))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"vec4",s.c.Pass,((r,i,s)=>r.setUniform4fv(e,t(i,s))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"int",s.c.Pass,((r,i,s)=>r.setUniform1i(e,t(i,s))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),s=(r(44208),r(53966)),n=r(46263),o=r(620);class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new _,this.varyings=new m,this.extensions=new f,this.outputs=new p}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),s="vertex"===e?this.vertex:this.fragment,n=s.uniforms.generateSource(),o=s.code.generateSource(),a=s.main.generateSource(),c="vertex"===e?v:T,l=s.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${u.join("\n")}\n\n${o.join("\n")}\n\n${a.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,s)=>{for(let n=0;n<i;++n)r[n](e,t,s)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,s,n)=>{for(let o=0;o<i;++o)r[o](e,n,t,s)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else s.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder").error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class u{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];throw new i.A("Shader does not contain main function body.")}}class d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class h extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new g(this)}get builder(){return this}}class _{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,o.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,i)=>t.push("vertex"===e?`out ${r} ${i};`:`in ${r} ${i};`))),t}}class f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}f.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],f.ALLOWLIST_VERTEX=[];class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,o.vA)(i.name===e&&i.type===t,`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}p.DEFAULT_TYPE="vec4",p.DEFAULT_NAME="fragColor";class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const T="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif",v="precision highp float;\nprecision highp sampler2D;"},63761:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"sampler2D",s.c.Pass,((r,i,s)=>r.bindTexture(e,t(i,s))))}}},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._loadModule=t}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}}},84867:(e,t,r)=>{r.d(t,{w:()=>o});var i=r(97768),s=r(63907),n=r(90644);class o{constructor(e,t,r){this.release=r,this.primitiveType=s.WR.TRIANGLES,this.key=t.key,this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t),this.reload=()=>{if(!this.key.equals(t.key))throw new Error("Configuration was changed after construction, cannot reload shader");(0,i.WD)(this._program),this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,n.Ey)({blending:n.dH,colorWrite:n.kn})}}},51976:(e,t,r)=>{r.d(t,{K:()=>a,W:()=>c});var i=r(49186),s=r(2597),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}class a extends s.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const s=e.count||2,n=Math.ceil(Math.log2(s)),o=t._parameterBits;let a=0;for(;o[a]+n>16;)a++,a>=o.length&&o.push(0);const c=o[a],l=(1<<n)-1<<c;o[a]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[a]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~l|+t<<c&l,"number"!=typeof t)throw new i.A(`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[a]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A(`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},69720:(e,t,r)=>{r.d(t,{J:()=>s});var i=r(24326);class s{constructor(){this.id=(0,i.c)()}}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},39341:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(46540);const s=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OBJECTANDLAYERIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>u});var i=r(97768),s=r(74887),n=r(2597),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}acquireTechnique(e,t){return this._techniques.acquire(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return o.Am.LOADED}}class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this._textureId=e.textureId,this._acquire(e.textureId,(e=>this._texture=e)),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new u(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._textureId=e,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,s.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends n.Y{constructor(e=null){super(),this.textureEmissive=e}}class u extends l{constructor(e=null,t=null,r=null,i=null,s=null,n,o){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=s,this.scale=n,this.normalTextureTransformMatrix=o}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,s,n=r(51850),o=r(2597),a=r(89192),c=r(69720),l=r(96672),u=r(39341),d=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=u.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=new t,(0,d.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,d.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations===a.ID.ON)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,s,n){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,s)}}(s=i||(i={}))[s.None=0]="None",s[s.Occlude=1]="Occlude",s[s.Transparent=2]="Transparent",s[s.OccludeAndTransparent=4]="OccludeAndTransparent",s[s.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",s[s.Opaque=16]="Opaque",o.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(i||(i={}))},33524:(e,t,r)=>{r.d(t,{K_:()=>f,Yf:()=>u,aB:()=>m,ez:()=>l,m6:()=>p,xt:()=>h,z5:()=>d});var i=r(49255),s=r(59643),n=r(63907),o=r(90644);const a=(0,o.p3)(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),c=(0,o.p3)(n.dn.ONE,n.dn.ZERO,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===s.Y.FrontFace?null:c}function u(e){switch(e){case s.Y.NONE:return a;case s.Y.ColorAlpha:return c;case s.Y.FrontFace:case s.Y.COUNT:return null}}function d(e){if(e.draped)return null;switch(e.oitPass){case s.Y.NONE:case s.Y.FrontFace:return e.writeDepth?o.Uy:null;case s.Y.ColorAlpha:case s.Y.COUNT:return null}}const h=5e5,_={factor:-1,units:-2};function m(e){return e?_:null}function f(e,t=n.MT.LESS){return e===s.Y.NONE||e===s.Y.FrontFace?t:n.MT.LEQUAL}function p(e,t){const r=(0,i.LG)(t);return e===s.Y.ColorAlpha?r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1,n.Nm.COLOR_ATTACHMENT2]}:{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(3694),s=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new i.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex"),t.generate("fragment"),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,s.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e);return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",e[e.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",e[e.HUD_MATERIAL=14]="HUD_MATERIAL",e[e.LABEL_MATERIAL=15]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=16]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=17]="LINE_CALLOUTS_HUD_DEPTH",e[e.DRAPED_MATERIAL=18]="DRAPED_MATERIAL",e[e.DRAPED_WATER=19]="DRAPED_WATER",e[e.VOXEL=20]="VOXEL",e[e.MAX_SLOTS=21]="MAX_SLOTS"}(i||(i={}))},76844:(e,t,r)=>{r.d(t,{g:()=>V}),r(44208);var i=r(49186),s=r(65529),n=r(97768),o=r(74887),a=r(34275),c=r(84952),l=r(99677),u=r(56058),d=r(89192),h=r(2741);let _;var m,f;(f=m||(m={}))[f.ETC1_RGB=0]="ETC1_RGB",f[f.ETC2_RGBA=1]="ETC2_RGBA",f[f.BC1_RGB=2]="BC1_RGB",f[f.BC3_RGBA=3]="BC3_RGBA",f[f.BC4_R=4]="BC4_R",f[f.BC5_RG=5]="BC5_RG",f[f.BC7_M6_RGB=6]="BC7_M6_RGB",f[f.BC7_M5_RGBA=7]="BC7_M5_RGBA",f[f.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",f[f.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",f[f.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",f[f.ATC_RGB=11]="ATC_RGB",f[f.ATC_RGBA=12]="ATC_RGBA",f[f.FXT1_RGB=17]="FXT1_RGB",f[f.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",f[f.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",f[f.ETC2_EAC_R11=20]="ETC2_EAC_R11",f[f.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",f[f.RGBA32=13]="RGBA32",f[f.RGB565=14]="RGB565",f[f.BGR565=15]="BGR565",f[f.RGBA4444=16]="RGBA4444";var p=r(63907),g=r(21231),T=r(42293);let v=null,E=null;async function A(){return null==E&&(_??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),E=_,v=await E),E}function R(e,t,r,i,s){const n=(0,T.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),o=s&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*o)}function S(e){return e.getNumImages()>=1&&!e.isUASTC()}function I(e){return e.getFaces()>=1&&e.isETC1S()}function x(e,t,r,i,s,n,o,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,d]=c?i?[m.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[m.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[m.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[m.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[m.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),_=[];for(let e=0;e<h;e++)_.push(new Uint8Array(o(e,u))),a(e,u,_[e]);return t.internalFormat=d,t.hasMipmap=_.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=s,t.height=n,new g.g(e,t,{type:"compressed",levels:_})}var C=r(69720),N=r(96672),b=r(53966);const O=()=>b.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function M(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const w=M("DXT1"),P=M("DXT3"),D=M("DXT5");function L(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return O().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return O().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let s,n;switch(i){case w:s=8,n=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case P:s=16,n=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case D:s=16,n=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return O().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let o=1,a=r[4],c=r[3];(3&a||3&c)&&(O().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let d,h;131072&r[2]&&!1!==t&&(o=Math.max(1,r[7]));let _=r[1]+4;const m=[];for(let t=0;t<o;++t)h=(a+3>>2)*(c+3>>2)*s,d=new Uint8Array(e,_,h),m.push(d),_+=h,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:n,width:l,height:u}}function y(e,t,r){if(e instanceof ImageData)return y(H(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function H(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var F,U,B=r(620),G=r(67171);class V extends C.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=N.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new s.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new G.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,a.mw)(e)||(0,a.mg)(e))return t.encoding===d.JS.KTX2_ENCODING?function(e,t){if(null==v)return e.byteLength;const r=new v.KTX2File(new Uint8Array(e)),i=I(r)?R(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===d.JS.BASIS_ENCODING?function(e,t){if(null==v)return e.byteLength;const r=new v.BasisFile(new Uint8Array(e)),i=S(r)?R(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?W(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,a.mg)(t)?this._loadFromPixelData(e,t):(0,a.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<F.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=L(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:s,internalFormat:n,width:o,height:a}=i;return t.samplingMode=s.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=s.levels.length>1,t.internalFormat=n,t.width=o,t.height=a,new g.g(e,t,s)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==v&&(v=await A());const i=new v.KTX2File(new Uint8Array(r));if(!I(i))return null;i.startTranscoding();const s=x(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),s}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==v&&(v=await A());const i=new v.BasisFile(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const s=x(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),s}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,B.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,u.Sx)(t,t.src,!1,r);return(0,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=F.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((s,a)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",u),(0,n.xt)(d)},l=()=>{t.readyState>=F.HAVE_CURRENT_DATA&&(c(),s(this._loadFromImage(e,t)))},u=e=>{c(),a(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",u);const d=(0,o.u7)(r,(()=>u((0,o.NK)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?H(e):e;let i=e.width,s=e.height;do{i=Math.ceil(i/2),s=Math.ceil(s/2),r=i*s}while(r>1048576||null!=t&&(i>t||s>t));return y(e,i,s)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return y(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=W(r);this._parameters.width=i.width,this._parameters.height=i.height;const s=this._createDescriptor(e);return s.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,s.width=i.width,s.height=i.height,this._glTexture=new g.g(e,s,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function W(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(U=F||(F={}))[U.HAVE_NOTHING=0]="HAVE_NOTHING",U[U.HAVE_METADATA=1]="HAVE_METADATA",U[U.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",U[U.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",U[U.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},89192:(e,t,r)=>{var i,s,n,o,a,c,l,u,d;r.d(t,{Am:()=>o,C7:()=>n,ID:()=>u,JS:()=>d,Mg:()=>c,dd:()=>a,it:()=>s,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(s||(s={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(o||(o={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},30669:(e,t,r)=>{r.d(t,{MD:()=>q,m0:()=>$,cJ:()=>j,hs:()=>Y});var i=r(34727),s=(r(44208),r(53966)),n=r(4341),o=r(58083),a=r(9093),c=r(38954),l=r(51850),u=r(19419),d=r(88582),h=r(11964),_=r(240),m=r(71351),f=r(44280),p=r(32114);const g=()=>s.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function T(e=H){return{plane:(0,_.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function v(e,t=T()){return E(e.origin,e.basis1,e.basis2,t)}function E(e,t,r,i=T()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.l)(e.basis1,e.basis2)/((0,c.m)(e.basis1)*(0,c.m)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.l)(e.basis1,w(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.l)(w(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,_.mR)(e.basis2,e.basis1,e.origin,e.plane)}function R(e,t,r){e!==r&&v(e,r);const i=(0,c.j)(p.rq.get(),w(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function S(e,t=T()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.a)(t.origin,e[0]+r,e[1]+i,0),(0,c.a)(t.basis1,r,0,0),(0,c.a)(t.basis2,0,i,0),(0,_.fA)(0,0,1,0,t.plane),t}function I(e,t,r){return!!(0,_.Ui)(e.plane,t,r)&&P(e,r)}function x(e,t,r){const s=F.get();y(e,t,s,F.get());let n=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.T7)(s,a,l)){const e=(0,c.E)(p.rq.get(),t.origin,l),s=Math.abs((0,i.XM)((0,c.l)(t.direction,e)));s<n&&(n=s,(0,c.c)(r,l))}}return n===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(I(e,t,r))return r;const i=F.get(),s=F.get();y(e,t,i,s);let n=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.gv)(i,a,l)){const e=(0,m.kb)(t,l);if(!(0,_.Tj)(s,l))continue;e<n&&(n=e,(0,c.c)(r,l))}}return O(e,t.origin)<n&&N(e,t.origin,r),r}function N(e,t,r){const i=(0,_._I)(e.plane,t,p.rq.get()),s=(0,h.H6)(D(e,e.basis1),i,-1,1,p.rq.get()),n=(0,h.H6)(D(e,e.basis2),i,-1,1,p.rq.get());return(0,c.f)(r,(0,c.g)(p.rq.get(),s,n),e.origin),r}function b(e,t,r){const{origin:i,basis1:s,basis2:n}=e,o=(0,c.f)(p.rq.get(),t,i),a=(0,f.gr)(s,o),l=(0,f.gr)(n,o),u=(0,f.gr)(w(e),o);return(0,c.a)(r,a,l,u)}function O(e,t){const r=b(e,t,p.rq.get()),{basis1:i,basis2:s}=e,n=(0,c.m)(i),o=(0,c.m)(s),a=Math.max(Math.abs(r[0])-n,0),l=Math.max(Math.abs(r[1])-o,0),u=r[2];return a*a+l*l+u*u}function M(e,t){const r=-e.plane[3];return(0,f.gr)(w(e),t)-r}function w(e){return(0,_.Qj)(e.plane)}function P(e,t){const r=(0,c.f)(p.rq.get(),t,e.origin),i=(0,c.q)(e.basis1),s=(0,c.q)(e.basis2),n=(0,c.l)(e.basis1,r),o=(0,c.l)(e.basis2,r);return-n-i<0&&n-i<0&&-o-s<0&&o-s<0}function D(e,t){const r=U.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:s,origin:n}=e,o=(0,c.j)(p.rq.get(),i,t.origin[0]),a=(0,c.j)(p.rq.get(),s,t.origin[1]);(0,c.g)(r.origin,o,a),(0,c.g)(r.origin,r.origin,n);const l=(0,c.j)(p.rq.get(),i,t.direction[0]),u=(0,c.j)(p.rq.get(),s,t.direction[1]);return(0,c.j)(r.vector,(0,c.g)(l,l,u),2),r}function y(e,t,r,i){const s=w(e);(0,_.mR)(s,t.direction,t.origin,r),(0,_.mR)((0,_.Qj)(r),s,t.origin,i)}const H={plane:(0,_.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new n.I(_.vt),U=new n.I(h.vt),B=(0,l.vt)(),G=new n.I((()=>T())),V=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],W=(0,a.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,_.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:M,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case d._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case d._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case d._.Z:(0,c.c)(r,w(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:x,copy:v,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,_.C)(t.plane,e.plane)},create:T,distance:function(e,t){return Math.sqrt(O(e,t))},distance2:O,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of V){const s=L(e,i,U.get()),n=(0,h.kb)(s,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:R,equals:function(e,t){return(0,c.e)(e.basis1,t.basis1)&&(0,c.e)(e.basis2,t.basis2)&&(0,c.e)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,_.Tj)(e.plane,t)&&P(e,t)},fromAABoundingRect:S,fromValues:E,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[s,n]=e.origin;return(0,u.fA)(s-r,n-i,s+i,n+i,t)},intersectRay:I,intersectRayClosestSilhouette:function(e,t,r){if(I(e,t,r))return r;const i=x(e,t,p.rq.get());return(0,c.g)(r,t.origin,(0,c.j)(p.rq.get(),t.direction,(0,c.p)(t.origin,i)/(0,c.m)(t.direction))),r},normal:w,projectPoint:N,projectPointLocal:b,rotate:function(e,t,r,i){return e!==i&&v(e,i),(0,o.$0)(z,t,r),(0,c.h)(i.basis1,e.basis1,z),(0,c.h)(i.basis2,e.basis2,z),A(i),i},setAltitudeAt:function(e,t,r,i){const s=M(e,t),n=(0,c.j)(B,w(e),r-s);return(0,c.g)(i,t,n),i},setExtent:function(e,t,r){return S(t,r),R(r,M(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&v(e,r),(0,o.B8)(W,t),(0,o.mg)(W,W),(0,c.h)(r.basis1,e.basis1,W),(0,c.h)(r.basis2,e.basis2,W),(0,c.h)((0,_.Qj)(r.plane),(0,_.Qj)(e.plane),W),(0,c.h)(r.origin,e.origin,t),(0,_.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,_.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}));var X=r(97937);function k(e,t,r){const i=r.parameters;return Q.scale=Math.min(i.divisor/(t-i.offset),1),Q.factor=function(e){return Math.abs(e*e*e)}(e),Q}function $(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function j(e,t,r,i){i.scale=function(e,t,r){const i=k(e,t,r);return i.minScaleFactor=0,$(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function q(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function Y(e,t,r,i){return $(e,k(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const Q={scale:0,factor:0,minScaleFactor:0};(0,X.c)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),s=r(49255),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,n.W)()],o.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,n.W)()],o.prototype,"hasModelTransformation",void 0);var a=r(46263),c=r(59643);class l extends o{constructor(){super(...arguments),this.output=s.V.Color,this.oitPass=c.Y.NONE,this.hasSliceHighlight=!0,this.hasSliceInVertexProgram=!1,this.bindType=a.c.Pass,this.writeDepth=!0}}(0,i._)([(0,n.W)({count:s.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,n.W)({count:c.Y.COUNT})],l.prototype,"oitPass",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>a,Um:()=>c,kE:()=>o});var i=r(4576),s=r(34727),n=r(30669);function o(e,t,r,i,o){let a=(r.screenLength||0)*e.pixelRatio;null!=o&&(a=(0,n.hs)(a,i,t,o));const c=a*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,s.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function a(e,t){let r=!1;for(const s in t){const n=t[s];void 0!==n&&(Array.isArray(n)?Array.isArray(e[s])&&(0,i.aI)(n,e[s])||(e[s]=n.slice(),r=!0):e[s]!==n&&(r=!0,e[s]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>d,SA:()=>p,Ut:()=>u,p1:()=>_,tH:()=>f,tb:()=>m,uO:()=>a});var i=r(58083),s=r(13030),n=r(620),o=r(46540);function a(e,t,r,i=1){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,1===i)for(let e=0;e<c;++e)o[r]=s[n[e]],r+=a;else for(let e=0;e<c;++e){const t=s[n[e]];for(let e=0;e<i;e++)o[r]=t,r+=a}}function c(e,t,r){const{data:i,indices:s}=e,n=t.typedBuffer,o=t.typedBufferStride,a=s.length;r*=o;for(let e=0;e<a;++e){const t=2*s[e];n[r]=i[t],n[r+1]=i[t+1],r+=o}}function l(e,t,r,i){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,null==i||1===i)for(let e=0;e<c;++e){const t=3*n[e];o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<i;++e)o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],r+=a}}function u(e,t,r,i=1){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*n[e];o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],o[r+3]=s[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<i;++e)o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],o[r+3]=s[t+3],r+=a}}function d(e,t,r){const i=e.typedBuffer,s=e.typedBufferStride;t*=s;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=s}function h(e,t,r,s,n=1){if(!t)return void l(e,r,s,n);const{data:o,indices:a}=e,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=t[0],_=t[1],m=t[2],f=t[4],p=t[5],g=t[6],T=t[8],v=t[9],E=t[10],A=t[12],R=t[13],S=t[14];s*=u;let I=0,x=0,C=0;const N=(0,i.tZ)(t)?e=>{I=o[e]+A,x=o[e+1]+R,C=o[e+2]+S}:e=>{const t=o[e],r=o[e+1],i=o[e+2];I=h*t+f*r+T*i+A,x=_*t+p*r+v*i+R,C=m*t+g*r+E*i+S};if(1===n)for(let e=0;e<d;++e)N(3*a[e]),c[s]=I,c[s+1]=x,c[s+2]=C,s+=u;else for(let e=0;e<d;++e){N(3*a[e]);for(let e=0;e<n;++e)c[s]=I,c[s+1]=x,c[s+2]=C,s+=u}}function _(e,t,r,s,n=1){if(!t)return void l(e,r,s,n);const{data:o,indices:a}=e,c=t,u=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],T=c[6],v=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,I=1-S;s*=d;let x=0,C=0,N=0;const b=(0,i.tZ)(c)?e=>{x=o[e],C=o[e+1],N=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];x=_*t+p*r+v*i,C=m*t+g*r+E*i,N=f*t+T*r+A*i};if(1===n)if(R)for(let e=0;e<h;++e){b(3*a[e]);const t=x*x+C*C+N*N;if(t<I&&t>S){const e=1/Math.sqrt(t);u[s]=x*e,u[s+1]=C*e,u[s+2]=N*e}else u[s]=x,u[s+1]=C,u[s+2]=N;s+=d}else for(let e=0;e<h;++e)b(3*a[e]),u[s]=x,u[s+1]=C,u[s+2]=N,s+=d;else for(let e=0;e<h;++e){if(b(3*a[e]),R){const e=x*x+C*C+N*N;if(e<I&&e>S){const t=1/Math.sqrt(e);x*=t,C*=t,N*=t}}for(let e=0;e<n;++e)u[s]=x,u[s+1]=C,u[s+2]=N,s+=d}}function m(e,t,r,i,s=1){const{data:n,indices:o}=e,a=r.typedBuffer,c=r.typedBufferStride,l=o.length;if(i*=c,t!==n.length||4!==t)if(1!==s)if(4!==t)for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<s;++e)a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<s;++e)a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=n[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*o[e];a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=n[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*o[e];a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=255,i+=c}}else{a[i]=n[0],a[i+1]=n[1],a[i+2]=n[2],a[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,o=e[i/=4];i+=t;const u=l*s;for(let r=1;r<u;++r)e[i]=o,i+=t}}function f(e,t,r,i,s=1){const n=t.typedBuffer,o=t.typedBufferStride;if(i*=o,1===s)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=o;else for(let t=0;t<r;++t)for(let t=0;t<s;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=o}function p(e,t,r,i,n,a,c){for(const l of r.fields.keys()){const r=e.get(l),u=r?.indices;if(r&&u)g(l,r,i,n,a,c);else if(l===o.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(o.r.POSITION)?.indices;if(r){const e=r.length;f(t,a.getField(l,s.XP),e,c)}}}}function g(e,t,r,a,l,d){switch(e){case o.r.POSITION:{(0,n.vA)(3===t.size);const i=l.getField(e,s.xs);(0,n.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,d);break}case o.r.NORMAL:{(0,n.vA)(3===t.size);const r=l.getField(e,s.xs);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&_(t,a,r,d);break}case o.r.NORMALCOMPRESSED:{(0,n.vA)(2===t.size);const r=l.getField(e,s.mJ);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.UV0:{(0,n.vA)(2===t.size);const r=l.getField(e,s.gH);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.COLOR:case o.r.SYMBOLCOLOR:{const r=l.getField(e,s.XP);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||m(t,t.size,r,d);break}case o.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,s.Y$);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:s}=e,n=t.typedBuffer,o=t.typedBufferStride,a=s.length,c=i[0];r*=o;for(let e=0;e<a;++e)n[r]=c,r+=o}(t,r,d);break}case o.r.TANGENT:{(0,n.vA)(4===t.size);const o=l.getField(e,s.Eq);(0,n.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,s,n=1){if(!t)return void u(e,r,s,n);const{data:o,indices:a}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],T=c[6],v=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,I=1-S;if(s*=d,1===n)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],n=o[t+2],c=o[t+3];let u=_*r+p*i+v*n,h=m*r+g*i+E*n,x=f*r+T*i+A*n;if(R){const e=u*u+h*h+x*x;if(e<I&&e>S){const t=1/Math.sqrt(e);u*=t,h*=t,x*=t}}l[s]=u,l[s+1]=h,l[s+2]=x,l[s+3]=c,s+=d}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],c=o[t+2],u=o[t+3];let h=_*r+p*i+v*c,x=m*r+g*i+E*c,C=f*r+T*i+A*c;if(R){const e=h*h+x*x+C*C;if(e<I&&e>S){const t=1/Math.sqrt(e);h*=t,x*=t,C*=t}}for(let e=0;e<n;++e)l[s]=h,l[s+1]=x,l[s+2]=C,l[s+3]=u,s+=d}}(t,r,o,d);break}case o.r.PROFILERIGHT:case o.r.PROFILEUP:case o.r.PROFILEVERTEXANDNORMAL:case o.r.FEATUREVALUE:{(0,n.vA)(4===t.size);const r=l.getField(e,s.Eq);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,d)}}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),s=(r(44208),r(94656)),n=r(63907),o=r(36421),a=r(67171);class c extends a.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=o.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,a.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){if(!this._descriptor.context?.gl)return;const o=this._descriptor.context.gl;(0,s.Y2)(o),this._glName||(this._glName=o.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this)),void 0===t&&(t=null);const a=this._descriptor,c=r??a.target,l=f(c);null===t&&(a.width=a.width||4,a.height=a.height||4,l&&(a.depth=a.depth??1));const g=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),u(a),this._configurePixelStorage(),(0,s.Y2)(o);const T=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,l&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,T,a.hasMipmap,e,r,i),this._texImage(c,0,T,e,r,i,t),(0,s.Y2)(o),a.hasMipmap&&this.generateMipmap(),a.width||(a.width=e),a.height||(a.height=r),l&&!a.depth&&(a.depth=i)}else{const{width:e,height:r,depth:u}=a;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==u)throw new i.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,T,a.hasMipmap,e,r,u),_(t)){const s=t.levels,l=p(c,e,r,u),d=Math.min(l-1,s.length-1);o.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const h=T;if(!(h in n.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const n=s[Math.min(e,s.length-1)];this._compressedTexImage(c,e,h,t,r,i,n)}),d)}else this._texImage(c,0,T,e,r,u,t),(0,s.Y2)(o),a.hasMipmap&&this.generateMipmap()}d(o,this._descriptor),h(o,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,s.Y2)(o),this._descriptor.context.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,s,n,o,a,c=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,u=this._deriveInternalFormat(),{context:d,pixelFormat:h,dataType:f,target:p,isImmutable:g}=l;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const T=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+n>l.width||s+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:v}=d;c&&v.pixelStorei(v.UNPACK_SKIP_ROWS,c),m(a)?v.texSubImage2D(p,t,r,s,n,o,h,f,a):_(a)?v.compressedTexSubImage2D(p,t,r,s,n,o,u,a.levels[t]):v.texSubImage2D(p,t,r,s,n,o,h,f,a),c&&v.pixelStorei(v.UNPACK_SKIP_ROWS,0),d.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,s,n,o,a,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const u=this._descriptor,d=this._deriveInternalFormat(),{context:h,pixelFormat:m,dataType:p,isImmutable:g,target:T}=u;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");f(T)||console.warn("Attempting to set 3D texture data on a non-3D texture");const v=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||n<0||r+o>u.width||s+a>u.height||n+c>u.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=h;if(_(l))l=l.levels[t],E.compressedTexSubImage3D(T,t,r,s,n,o,a,c,d,l);else{const e=l;E.texSubImage3D(T,t,r,s,n,o,a,c,m,p,e)}h.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,u(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,u(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(d(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new i.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,s,o,a){const{gl:c}=this._descriptor.context;if(!(t in n.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?p(e,s,o,a):1;if(f(e)){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,s,o,a)}else c.texStorage2D(e,l,t,s,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,s,n,o,a){const c=this._descriptor.context.gl,l=f(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,s,n,o,d,h,r)}else c.texSubImage2D(e,t,0,0,s,n,d,h,r)}}else{const u=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,s,n,o,0,d,h,u)}else c.texImage2D(e,t,r,s,n,0,d,h,u)}}_compressedTexImage(e,t,r,s,n,o,a){const c=this._descriptor.context.gl,l=f(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,s,n,o,r,a)}else c.compressedTexSubImage2D(e,t,0,0,s,n,r,a)}else if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,s,n,o,0,a)}else c.compressedTexImage2D(e,t,r,s,n,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:s,depth:o,hasMipmap:a,target:c}=this._descriptor;const l=c===n.Ap.TEXTURE_3D;if(null==r||null==s||l&&null==o)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,s,o),a&&(1!==r||1!==s||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(o=Math.max(1,o>>1))}};function u(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function d(e,t){let r=t.samplingMode,i=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(i=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(i=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function _(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!_(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function f(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function p(e,t,r,i=1){let s=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(s=Math.max(s,i)),Math.round(Math.log(s)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>o});var i=r(63907),s=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,s.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{IB:()=>s}),r(44208),r(94656);var i=r(63907);function s(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>u,en:()=>c});var i=r(49186),s=r(44208),n=r(53966);const o=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,s.A)("enable-feature:webgl-debug");function c(){return a}function l(){return a}function u(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),s=(new Error).stack;o().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:s}))}}}},62298:(e,t,r)=>{r(63907)},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,Uy:()=>u,Xt:()=>l,dH:()=>o,kn:()=>d,p3:()=>n});var i=r(89192),s=r(63907);function n(e,t,r,i,n=s.Tb.ADD,o=s.Tb.ADD,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}const o=function(e,t,r=s.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}(s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA),a={face:s.Y7.BACK,mode:s.Ac.CCW},c={face:s.Y7.FRONT,mode:s.Ac.CCW},l=e=>e===i.s2.Back?a:e===i.s2.Front?c:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return I.intern(e)}function _(e){return C.intern(e)}function m(e){return b.intern(e)}function f(e){return M.intern(e)}function p(e){return P.intern(e)}function g(e){return L.intern(e)}function T(e){return H.intern(e)}function v(e){return U.intern(e)}function E(e){return G.intern(e)}function A(e){return W.intern(e)}class R{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function S(e){return"["+e.join(",")+"]"}const I=new R(x,(e=>({__tag:"Blending",...e})));function x(e){return e?S([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const C=new R(N,(e=>({__tag:"Culling",...e})));function N(e){return e?S([e.face,e.mode]):null}const b=new R(O,(e=>({__tag:"PolygonOffset",...e})));function O(e){return e?S([e.factor,e.units]):null}const M=new R(w,(e=>({__tag:"DepthTest",...e})));function w(e){return e?S([e.func]):null}const P=new R(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?S([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new R(y,(e=>({__tag:"DepthWrite",...e})));function y(e){return e?S([e.zNear,e.zFar]):null}const H=new R(F,(e=>({__tag:"ColorWrite",...e})));function F(e){return e?S([e.r,e.g,e.b,e.a]):null}const U=new R(B,(e=>({__tag:"StencilWrite",...e})));function B(e){return e?S([e.mask]):null}const G=new R(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?S(e.buffers):null}const W=new R((function(e){return e?S([x(e.blending),N(e.culling),O(e.polygonOffset),w(e.depthTest),D(e.stencilTest),y(e.depthWrite),F(e.colorWrite),B(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:h(e.blending),culling:_(e.culling),polygonOffset:m(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:T(e.colorWrite),stencilWrite:v(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
258
+ }`)}function c(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>u(e.screenSizePerspective))))}function l(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>u(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function u(e){return(0,i.a)(d,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const d=(0,s.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>m,Nz:()=>T,NB:()=>f,S7:()=>v});var i=r(58083),s=r(9093),n=r(38954),o=r(51850),a=r(40710),c=r(33079),l=r(20304),u=r(39589),d=r(46263);class h extends u.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,i,s)=>r.setUniformMatrix4fv(e,t(i,s))))}}var _=r(40095);function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",o.uY):e.uniforms.add(new a.W("cameraPosition",((e,t)=>(0,n.a)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new h("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,e.origin))),new a.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.a)(g,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new _.X("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const p=(0,s.vt)(),g=(0,o.vt)();function v(e){e.uniforms.add(new _.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new l.m("pixelRatio",((e,t)=>t.camera.pixelRatio/t.overlayStretch)))}},95250:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"bool",s.c.Pass,((r,i,s)=>r.setUniform1b(e,t(i,s))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",s.c.Pass,((r,i,s)=>r.setUniform2fv(e,t(i,s))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"vec4",s.c.Pass,((r,i,s)=>r.setUniform4fv(e,t(i,s))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"int",s.c.Pass,((r,i,s)=>r.setUniform1i(e,t(i,s))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),s=(r(44208),r(53966)),n=r(46263),o=r(620);class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new _,this.varyings=new m,this.extensions=new f,this.outputs=new p}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),s="vertex"===e?this.vertex:this.fragment,n=s.uniforms.generateSource(),o=s.code.generateSource(),a=s.main.generateSource(),c="vertex"===e?T:v,l=s.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${u.join("\n")}\n\n${o.join("\n")}\n\n${a.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,s)=>{for(let n=0;n<i;++n)r[n](e,t,s)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,s,n)=>{for(let o=0;o<i;++o)r[o](e,n,t,s)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else s.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder").error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class u{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];throw new i.A("Shader does not contain main function body.")}}class d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class h extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new g(this)}get builder(){return this}}class _{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,o.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,i)=>t.push("vertex"===e?`out ${r} ${i};`:`in ${r} ${i};`))),t}}class f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}f.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],f.ALLOWLIST_VERTEX=[];class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,o.vA)(i.name===e&&i.type===t,`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}p.DEFAULT_TYPE="vec4",p.DEFAULT_NAME="fragColor";class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const v="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif",T="precision highp float;\nprecision highp sampler2D;"},63761:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(39589),s=r(46263);class n extends i.n{constructor(e,t){super(e,"sampler2D",s.c.Pass,((r,i,s)=>r.bindTexture(e,t(i,s))))}}},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._loadModule=t}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}}},84867:(e,t,r)=>{r.d(t,{w:()=>o});var i=r(97768),s=r(63907),n=r(90644);class o{constructor(e,t,r){this.release=r,this.primitiveType=s.WR.TRIANGLES,this.key=t.key,this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t),this.reload=()=>{if(!this.key.equals(t.key))throw new Error("Configuration was changed after construction, cannot reload shader");(0,i.WD)(this._program),this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,n.Ey)({blending:n.dH,colorWrite:n.kn})}}},51976:(e,t,r)=>{r.d(t,{K:()=>a,W:()=>c});var i=r(49186),s=r(2597),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}class a extends s.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const s=e.count||2,n=Math.ceil(Math.log2(s)),o=t._parameterBits;let a=0;for(;o[a]+n>16;)a++,a>=o.length&&o.push(0);const c=o[a],l=(1<<n)-1<<c;o[a]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[a]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~l|+t<<c&l,"number"!=typeof t)throw new i.A(`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[a]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A(`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},69720:(e,t,r)=>{r.d(t,{J:()=>s});var i=r(24326);class s{constructor(){this.id=(0,i.c)()}}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},39341:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(46540);const s=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OBJECTANDLAYERIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>u});var i=r(97768),s=r(74887),n=r(2597),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}acquireTechnique(e,t){return this._techniques.acquire(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return o.Am.LOADED}}class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this._textureId=e.textureId,this._acquire(e.textureId,(e=>this._texture=e)),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new u(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._textureId=e,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,s.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends n.Y{constructor(e=null){super(),this.textureEmissive=e}}class u extends l{constructor(e=null,t=null,r=null,i=null,s=null,n,o){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=s,this.scale=n,this.normalTextureTransformMatrix=o}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,s,n=r(51850),o=r(2597),a=r(89192),c=r(69720),l=r(96672),u=r(39341),d=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=u.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=new t,(0,d.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,d.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations===a.ID.ON)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,s,n){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,s)}}(s=i||(i={}))[s.None=0]="None",s[s.Occlude=1]="Occlude",s[s.Transparent=2]="Transparent",s[s.OccludeAndTransparent=4]="OccludeAndTransparent",s[s.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",s[s.Opaque=16]="Opaque",o.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(i||(i={}))},33524:(e,t,r)=>{r.d(t,{K_:()=>f,Yf:()=>u,aB:()=>m,ez:()=>l,m6:()=>p,xt:()=>h,z5:()=>d});var i=r(49255),s=r(59643),n=r(63907),o=r(90644);const a=(0,o.p3)(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),c=(0,o.p3)(n.dn.ONE,n.dn.ZERO,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===s.Y.FrontFace?null:c}function u(e){switch(e){case s.Y.NONE:return a;case s.Y.ColorAlpha:return c;case s.Y.FrontFace:case s.Y.COUNT:return null}}function d(e){if(e.draped)return null;switch(e.oitPass){case s.Y.NONE:case s.Y.FrontFace:return e.writeDepth?o.Uy:null;case s.Y.ColorAlpha:case s.Y.COUNT:return null}}const h=5e5,_={factor:-1,units:-2};function m(e){return e?_:null}function f(e,t=n.MT.LESS){return e===s.Y.NONE||e===s.Y.FrontFace?t:n.MT.LEQUAL}function p(e,t){const r=(0,i.LG)(t);return e===s.Y.ColorAlpha?r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1,n.Nm.COLOR_ATTACHMENT2]}:{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(3694),s=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new i.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex"),t.generate("fragment"),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,s.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e);return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",e[e.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",e[e.HUD_MATERIAL=14]="HUD_MATERIAL",e[e.LABEL_MATERIAL=15]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=16]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=17]="LINE_CALLOUTS_HUD_DEPTH",e[e.DRAPED_MATERIAL=18]="DRAPED_MATERIAL",e[e.DRAPED_WATER=19]="DRAPED_WATER",e[e.VOXEL=20]="VOXEL",e[e.MAX_SLOTS=21]="MAX_SLOTS"}(i||(i={}))},76844:(e,t,r)=>{r.d(t,{g:()=>V}),r(44208);var i=r(49186),s=r(65529),n=r(97768),o=r(74887),a=r(34275),c=r(84952),l=r(99677),u=r(56058),d=r(89192),h=r(2741);let _;var m,f;(f=m||(m={}))[f.ETC1_RGB=0]="ETC1_RGB",f[f.ETC2_RGBA=1]="ETC2_RGBA",f[f.BC1_RGB=2]="BC1_RGB",f[f.BC3_RGBA=3]="BC3_RGBA",f[f.BC4_R=4]="BC4_R",f[f.BC5_RG=5]="BC5_RG",f[f.BC7_M6_RGB=6]="BC7_M6_RGB",f[f.BC7_M5_RGBA=7]="BC7_M5_RGBA",f[f.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",f[f.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",f[f.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",f[f.ATC_RGB=11]="ATC_RGB",f[f.ATC_RGBA=12]="ATC_RGBA",f[f.FXT1_RGB=17]="FXT1_RGB",f[f.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",f[f.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",f[f.ETC2_EAC_R11=20]="ETC2_EAC_R11",f[f.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",f[f.RGBA32=13]="RGBA32",f[f.RGB565=14]="RGB565",f[f.BGR565=15]="BGR565",f[f.RGBA4444=16]="RGBA4444";var p=r(63907),g=r(21231),v=r(42293);let T=null,E=null;async function A(){return null==E&&(_??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),E=_,T=await E),E}function R(e,t,r,i,s){const n=(0,v.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),o=s&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*o)}function S(e){return e.getNumImages()>=1&&!e.isUASTC()}function I(e){return e.getFaces()>=1&&e.isETC1S()}function x(e,t,r,i,s,n,o,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,d]=c?i?[m.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[m.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[m.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[m.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[m.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),_=[];for(let e=0;e<h;e++)_.push(new Uint8Array(o(e,u))),a(e,u,_[e]);return t.internalFormat=d,t.hasMipmap=_.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=s,t.height=n,new g.g(e,t,{type:"compressed",levels:_})}var C=r(69720),N=r(96672),b=r(53966);const O=()=>b.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function M(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const w=M("DXT1"),P=M("DXT3"),D=M("DXT5");function L(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return O().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return O().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let s,n;switch(i){case w:s=8,n=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case P:s=16,n=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case D:s=16,n=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return O().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let o=1,a=r[4],c=r[3];(3&a||3&c)&&(O().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let d,h;131072&r[2]&&!1!==t&&(o=Math.max(1,r[7]));let _=r[1]+4;const m=[];for(let t=0;t<o;++t)h=(a+3>>2)*(c+3>>2)*s,d=new Uint8Array(e,_,h),m.push(d),_+=h,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:n,width:l,height:u}}function H(e,t,r){if(e instanceof ImageData)return H(y(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function y(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var F,U,B=r(620),G=r(67171);class V extends C.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=N.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new s.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new G.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,a.mw)(e)||(0,a.mg)(e))return t.encoding===d.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=I(r)?R(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===d.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=S(r)?R(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?W(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,a.mg)(t)?this._loadFromPixelData(e,t):(0,a.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<F.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=L(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:s,internalFormat:n,width:o,height:a}=i;return t.samplingMode=s.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=s.levels.length>1,t.internalFormat=n,t.width=o,t.height=a,new g.g(e,t,s)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.KTX2File(new Uint8Array(r));if(!I(i))return null;i.startTranscoding();const s=x(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),s}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.BasisFile(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const s=x(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),s}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,B.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,u.Sx)(t,t.src,!1,r);return(0,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=F.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((s,a)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",u),(0,n.xt)(d)},l=()=>{t.readyState>=F.HAVE_CURRENT_DATA&&(c(),s(this._loadFromImage(e,t)))},u=e=>{c(),a(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",u);const d=(0,o.u7)(r,(()=>u((0,o.NK)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?y(e):e;let i=e.width,s=e.height;do{i=Math.ceil(i/2),s=Math.ceil(s/2),r=i*s}while(r>1048576||null!=t&&(i>t||s>t));return H(e,i,s)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return H(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=W(r);this._parameters.width=i.width,this._parameters.height=i.height;const s=this._createDescriptor(e);return s.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,s.width=i.width,s.height=i.height,this._glTexture=new g.g(e,s,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function W(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(U=F||(F={}))[U.HAVE_NOTHING=0]="HAVE_NOTHING",U[U.HAVE_METADATA=1]="HAVE_METADATA",U[U.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",U[U.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",U[U.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},89192:(e,t,r)=>{var i,s,n,o,a,c,l,u,d;r.d(t,{Am:()=>o,C7:()=>n,ID:()=>u,JS:()=>d,Mg:()=>c,dd:()=>a,it:()=>s,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(s||(s={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(o||(o={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},30669:(e,t,r)=>{r.d(t,{MD:()=>q,m0:()=>$,cJ:()=>j,hs:()=>Y});var i=r(34727),s=(r(44208),r(53966)),n=r(4341),o=r(58083),a=r(9093),c=r(38954),l=r(51850),u=r(19419),d=r(88582),h=r(11964),_=r(240),m=r(71351),f=r(44280),p=r(32114);const g=()=>s.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(e=y){return{plane:(0,_.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=v()){return E(e.origin,e.basis1,e.basis2,t)}function E(e,t,r,i=v()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.l)(e.basis1,e.basis2)/((0,c.m)(e.basis1)*(0,c.m)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.l)(e.basis1,w(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.l)(w(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,_.mR)(e.basis2,e.basis1,e.origin,e.plane)}function R(e,t,r){e!==r&&T(e,r);const i=(0,c.j)(p.rq.get(),w(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function S(e,t=v()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.a)(t.origin,e[0]+r,e[1]+i,0),(0,c.a)(t.basis1,r,0,0),(0,c.a)(t.basis2,0,i,0),(0,_.fA)(0,0,1,0,t.plane),t}function I(e,t,r){return!!(0,_.Ui)(e.plane,t,r)&&P(e,r)}function x(e,t,r){const s=F.get();H(e,t,s,F.get());let n=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.T7)(s,a,l)){const e=(0,c.E)(p.rq.get(),t.origin,l),s=Math.abs((0,i.XM)((0,c.l)(t.direction,e)));s<n&&(n=s,(0,c.c)(r,l))}}return n===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(I(e,t,r))return r;const i=F.get(),s=F.get();H(e,t,i,s);let n=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.gv)(i,a,l)){const e=(0,m.kb)(t,l);if(!(0,_.Tj)(s,l))continue;e<n&&(n=e,(0,c.c)(r,l))}}return O(e,t.origin)<n&&N(e,t.origin,r),r}function N(e,t,r){const i=(0,_._I)(e.plane,t,p.rq.get()),s=(0,h.H6)(D(e,e.basis1),i,-1,1,p.rq.get()),n=(0,h.H6)(D(e,e.basis2),i,-1,1,p.rq.get());return(0,c.f)(r,(0,c.g)(p.rq.get(),s,n),e.origin),r}function b(e,t,r){const{origin:i,basis1:s,basis2:n}=e,o=(0,c.f)(p.rq.get(),t,i),a=(0,f.gr)(s,o),l=(0,f.gr)(n,o),u=(0,f.gr)(w(e),o);return(0,c.a)(r,a,l,u)}function O(e,t){const r=b(e,t,p.rq.get()),{basis1:i,basis2:s}=e,n=(0,c.m)(i),o=(0,c.m)(s),a=Math.max(Math.abs(r[0])-n,0),l=Math.max(Math.abs(r[1])-o,0),u=r[2];return a*a+l*l+u*u}function M(e,t){const r=-e.plane[3];return(0,f.gr)(w(e),t)-r}function w(e){return(0,_.Qj)(e.plane)}function P(e,t){const r=(0,c.f)(p.rq.get(),t,e.origin),i=(0,c.q)(e.basis1),s=(0,c.q)(e.basis2),n=(0,c.l)(e.basis1,r),o=(0,c.l)(e.basis2,r);return-n-i<0&&n-i<0&&-o-s<0&&o-s<0}function D(e,t){const r=U.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:s,origin:n}=e,o=(0,c.j)(p.rq.get(),i,t.origin[0]),a=(0,c.j)(p.rq.get(),s,t.origin[1]);(0,c.g)(r.origin,o,a),(0,c.g)(r.origin,r.origin,n);const l=(0,c.j)(p.rq.get(),i,t.direction[0]),u=(0,c.j)(p.rq.get(),s,t.direction[1]);return(0,c.j)(r.vector,(0,c.g)(l,l,u),2),r}function H(e,t,r,i){const s=w(e);(0,_.mR)(s,t.direction,t.origin,r),(0,_.mR)((0,_.Qj)(r),s,t.origin,i)}const y={plane:(0,_.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new n.I(_.vt),U=new n.I(h.vt),B=(0,l.vt)(),G=new n.I((()=>v())),V=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],W=(0,a.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,_.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:M,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case d._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case d._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case d._.Z:(0,c.c)(r,w(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:x,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,_.C)(t.plane,e.plane)},create:v,distance:function(e,t){return Math.sqrt(O(e,t))},distance2:O,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of V){const s=L(e,i,U.get()),n=(0,h.kb)(s,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:R,equals:function(e,t){return(0,c.e)(e.basis1,t.basis1)&&(0,c.e)(e.basis2,t.basis2)&&(0,c.e)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,_.Tj)(e.plane,t)&&P(e,t)},fromAABoundingRect:S,fromValues:E,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[s,n]=e.origin;return(0,u.fA)(s-r,n-i,s+i,n+i,t)},intersectRay:I,intersectRayClosestSilhouette:function(e,t,r){if(I(e,t,r))return r;const i=x(e,t,p.rq.get());return(0,c.g)(r,t.origin,(0,c.j)(p.rq.get(),t.direction,(0,c.p)(t.origin,i)/(0,c.m)(t.direction))),r},normal:w,projectPoint:N,projectPointLocal:b,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,o.$0)(z,t,r),(0,c.h)(i.basis1,e.basis1,z),(0,c.h)(i.basis2,e.basis2,z),A(i),i},setAltitudeAt:function(e,t,r,i){const s=M(e,t),n=(0,c.j)(B,w(e),r-s);return(0,c.g)(i,t,n),i},setExtent:function(e,t,r){return S(t,r),R(r,M(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,o.B8)(W,t),(0,o.mg)(W,W),(0,c.h)(r.basis1,e.basis1,W),(0,c.h)(r.basis2,e.basis2,W),(0,c.h)((0,_.Qj)(r.plane),(0,_.Qj)(e.plane),W),(0,c.h)(r.origin,e.origin,t),(0,_.mP)(r.plane,r.plane,r.origin),r},up:y,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,_.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}));var k=r(97937);function X(e,t,r){const i=r.parameters;return Q.scale=Math.min(i.divisor/(t-i.offset),1),Q.factor=function(e){return Math.abs(e*e*e)}(e),Q}function $(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function j(e,t,r,i){i.scale=function(e,t,r){const i=X(e,t,r);return i.minScaleFactor=0,$(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function q(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function Y(e,t,r,i){return $(e,X(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const Q={scale:0,factor:0,minScaleFactor:0};(0,k.c)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),s=r(49255),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,n.W)()],o.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,n.W)()],o.prototype,"hasModelTransformation",void 0);var a=r(46263),c=r(59643);class l extends o{constructor(){super(...arguments),this.output=s.V.Color,this.oitPass=c.Y.NONE,this.hasSliceHighlight=!0,this.hasSliceInVertexProgram=!1,this.bindType=a.c.Pass,this.writeDepth=!0}}(0,i._)([(0,n.W)({count:s.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,n.W)({count:c.Y.COUNT})],l.prototype,"oitPass",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>a,Um:()=>c,kE:()=>o});var i=r(4576),s=r(34727),n=r(30669);function o(e,t,r,i,o){let a=(r.screenLength||0)*e.pixelRatio;null!=o&&(a=(0,n.hs)(a,i,t,o));const c=a*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,s.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function a(e,t){let r=!1;for(const s in t){const n=t[s];void 0!==n&&(Array.isArray(n)?Array.isArray(e[s])&&(0,i.aI)(n,e[s])||(e[s]=n.slice(),r=!0):e[s]!==n&&(r=!0,e[s]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>d,SA:()=>p,Ut:()=>u,p1:()=>_,tH:()=>f,tb:()=>m,uO:()=>a});var i=r(58083),s=r(13030),n=r(620),o=r(46540);function a(e,t,r,i=1){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,1===i)for(let e=0;e<c;++e)o[r]=s[n[e]],r+=a;else for(let e=0;e<c;++e){const t=s[n[e]];for(let e=0;e<i;e++)o[r]=t,r+=a}}function c(e,t,r){const{data:i,indices:s}=e,n=t.typedBuffer,o=t.typedBufferStride,a=s.length;r*=o;for(let e=0;e<a;++e){const t=2*s[e];n[r]=i[t],n[r+1]=i[t+1],r+=o}}function l(e,t,r,i){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,null==i||1===i)for(let e=0;e<c;++e){const t=3*n[e];o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<i;++e)o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],r+=a}}function u(e,t,r,i=1){const{data:s,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,c=n.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*n[e];o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],o[r+3]=s[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<i;++e)o[r]=s[t],o[r+1]=s[t+1],o[r+2]=s[t+2],o[r+3]=s[t+3],r+=a}}function d(e,t,r){const i=e.typedBuffer,s=e.typedBufferStride;t*=s;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=s}function h(e,t,r,s,n=1){if(!t)return void l(e,r,s,n);const{data:o,indices:a}=e,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=t[0],_=t[1],m=t[2],f=t[4],p=t[5],g=t[6],v=t[8],T=t[9],E=t[10],A=t[12],R=t[13],S=t[14];s*=u;let I=0,x=0,C=0;const N=(0,i.tZ)(t)?e=>{I=o[e]+A,x=o[e+1]+R,C=o[e+2]+S}:e=>{const t=o[e],r=o[e+1],i=o[e+2];I=h*t+f*r+v*i+A,x=_*t+p*r+T*i+R,C=m*t+g*r+E*i+S};if(1===n)for(let e=0;e<d;++e)N(3*a[e]),c[s]=I,c[s+1]=x,c[s+2]=C,s+=u;else for(let e=0;e<d;++e){N(3*a[e]);for(let e=0;e<n;++e)c[s]=I,c[s+1]=x,c[s+2]=C,s+=u}}function _(e,t,r,s,n=1){if(!t)return void l(e,r,s,n);const{data:o,indices:a}=e,c=t,u=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,I=1-S;s*=d;let x=0,C=0,N=0;const b=(0,i.tZ)(c)?e=>{x=o[e],C=o[e+1],N=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];x=_*t+p*r+T*i,C=m*t+g*r+E*i,N=f*t+v*r+A*i};if(1===n)if(R)for(let e=0;e<h;++e){b(3*a[e]);const t=x*x+C*C+N*N;if(t<I&&t>S){const e=1/Math.sqrt(t);u[s]=x*e,u[s+1]=C*e,u[s+2]=N*e}else u[s]=x,u[s+1]=C,u[s+2]=N;s+=d}else for(let e=0;e<h;++e)b(3*a[e]),u[s]=x,u[s+1]=C,u[s+2]=N,s+=d;else for(let e=0;e<h;++e){if(b(3*a[e]),R){const e=x*x+C*C+N*N;if(e<I&&e>S){const t=1/Math.sqrt(e);x*=t,C*=t,N*=t}}for(let e=0;e<n;++e)u[s]=x,u[s+1]=C,u[s+2]=N,s+=d}}function m(e,t,r,i,s=1){const{data:n,indices:o}=e,a=r.typedBuffer,c=r.typedBufferStride,l=o.length;if(i*=c,t!==n.length||4!==t)if(1!==s)if(4!==t)for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<s;++e)a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<s;++e)a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=n[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*o[e];a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=n[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*o[e];a[i]=n[t],a[i+1]=n[t+1],a[i+2]=n[t+2],a[i+3]=255,i+=c}}else{a[i]=n[0],a[i+1]=n[1],a[i+2]=n[2],a[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,o=e[i/=4];i+=t;const u=l*s;for(let r=1;r<u;++r)e[i]=o,i+=t}}function f(e,t,r,i,s=1){const n=t.typedBuffer,o=t.typedBufferStride;if(i*=o,1===s)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=o;else for(let t=0;t<r;++t)for(let t=0;t<s;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=o}function p(e,t,r,i,n,a,c){for(const l of r.fields.keys()){const r=e.get(l),u=r?.indices;if(r&&u)g(l,r,i,n,a,c);else if(l===o.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(o.r.POSITION)?.indices;if(r){const e=r.length;f(t,a.getField(l,s.XP),e,c)}}}}function g(e,t,r,a,l,d){switch(e){case o.r.POSITION:{(0,n.vA)(3===t.size);const i=l.getField(e,s.xs);(0,n.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,d);break}case o.r.NORMAL:{(0,n.vA)(3===t.size);const r=l.getField(e,s.xs);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&_(t,a,r,d);break}case o.r.NORMALCOMPRESSED:{(0,n.vA)(2===t.size);const r=l.getField(e,s.mJ);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.UV0:{(0,n.vA)(2===t.size);const r=l.getField(e,s.gH);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.COLOR:case o.r.SYMBOLCOLOR:{const r=l.getField(e,s.XP);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||m(t,t.size,r,d);break}case o.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,s.Y$);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:s}=e,n=t.typedBuffer,o=t.typedBufferStride,a=s.length,c=i[0];r*=o;for(let e=0;e<a;++e)n[r]=c,r+=o}(t,r,d);break}case o.r.TANGENT:{(0,n.vA)(4===t.size);const o=l.getField(e,s.Eq);(0,n.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,s,n=1){if(!t)return void u(e,r,s,n);const{data:o,indices:a}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,I=1-S;if(s*=d,1===n)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],n=o[t+2],c=o[t+3];let u=_*r+p*i+T*n,h=m*r+g*i+E*n,x=f*r+v*i+A*n;if(R){const e=u*u+h*h+x*x;if(e<I&&e>S){const t=1/Math.sqrt(e);u*=t,h*=t,x*=t}}l[s]=u,l[s+1]=h,l[s+2]=x,l[s+3]=c,s+=d}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],c=o[t+2],u=o[t+3];let h=_*r+p*i+T*c,x=m*r+g*i+E*c,C=f*r+v*i+A*c;if(R){const e=h*h+x*x+C*C;if(e<I&&e>S){const t=1/Math.sqrt(e);h*=t,x*=t,C*=t}}for(let e=0;e<n;++e)l[s]=h,l[s+1]=x,l[s+2]=C,l[s+3]=u,s+=d}}(t,r,o,d);break}case o.r.PROFILERIGHT:case o.r.PROFILEUP:case o.r.PROFILEVERTEXANDNORMAL:case o.r.FEATUREVALUE:{(0,n.vA)(4===t.size);const r=l.getField(e,s.Eq);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,d)}}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),s=(r(44208),r(94656)),n=r(63907),o=r(36421),a=r(67171);class c extends a.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=o.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,a.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){if(!this._descriptor.context?.gl)return;const{gl:o}=this._descriptor.context;(0,s.Y2)(o),this._glName||(this._glName=o.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this)),void 0===t&&(t=null);const a=this._descriptor,c=r??a.target,l=f(c);null===t&&(a.width=a.width||4,a.height=a.height||4,l&&(a.depth=a.depth??1));const g=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),u(a),this._configurePixelStorage(),(0,s.Y2)(o);const v=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,l&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,i),this._texImage(c,0,v,e,r,i,t),(0,s.Y2)(o),a.hasMipmap&&(this.generateMipmap(),(0,s.Y2)(o)),a.width||(a.width=e),a.height||(a.height=r),l&&!a.depth&&(a.depth=i)}else{const{width:e,height:r,depth:u}=a;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==u)throw new i.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,u),_(t)){const s=t.levels,l=p(c,e,r,u),d=Math.min(l-1,s.length-1);o.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const h=v;if(!(h in n.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const n=s[Math.min(e,s.length-1)];this._compressedTexImage(c,e,h,t,r,i,n)}),d)}else this._texImage(c,0,v,e,r,u,t),(0,s.Y2)(o),a.hasMipmap&&this.generateMipmap()}d(o,this._descriptor),h(o,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,s.Y2)(o),this._descriptor.context.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,s,n,o,a,c=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,u=this._deriveInternalFormat(),{context:d,pixelFormat:h,dataType:f,target:p,isImmutable:g}=l;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const v=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+n>l.width||s+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=d;c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,c),m(a)?T.texSubImage2D(p,t,r,s,n,o,h,f,a):_(a)?T.compressedTexSubImage2D(p,t,r,s,n,o,u,a.levels[t]):T.texSubImage2D(p,t,r,s,n,o,h,f,a),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),d.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,s,n,o,a,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const u=this._descriptor,d=this._deriveInternalFormat(),{context:h,pixelFormat:m,dataType:p,isImmutable:g,target:v}=u;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");f(v)||console.warn("Attempting to set 3D texture data on a non-3D texture");const T=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||n<0||r+o>u.width||s+a>u.height||n+c>u.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=h;if(_(l))l=l.levels[t],E.compressedTexSubImage3D(v,t,r,s,n,o,a,c,d,l);else{const e=l;E.texSubImage3D(v,t,r,s,n,o,a,c,m,p,e)}h.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,u(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,u(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(d(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new i.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,s,o,a){const{gl:c}=this._descriptor.context;if(!(t in n.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?p(e,s,o,a):1;if(f(e)){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,s,o,a)}else c.texStorage2D(e,l,t,s,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,s,n,o,a){const c=this._descriptor.context.gl,l=f(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,s,n,o,d,h,r)}else c.texSubImage2D(e,t,0,0,s,n,d,h,r)}}else{const u=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,s,n,o,0,d,h,u)}else c.texImage2D(e,t,r,s,n,0,d,h,u)}}_compressedTexImage(e,t,r,s,n,o,a){const c=this._descriptor.context.gl,l=f(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,s,n,o,r,a)}else c.compressedTexSubImage2D(e,t,0,0,s,n,r,a)}else if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,s,n,o,0,a)}else c.compressedTexImage2D(e,t,r,s,n,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:s,depth:o,hasMipmap:a,target:c}=this._descriptor;const l=c===n.Ap.TEXTURE_3D;if(null==r||null==s||l&&null==o)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,s,o),a&&(1!==r||1!==s||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(o=Math.max(1,o>>1))}};function u(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function d(e,t){let r=t.samplingMode,i=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(i=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(i=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function _(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!_(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function f(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function p(e,t,r,i=1){let s=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(s=Math.max(s,i)),Math.round(Math.log(s)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>o});var i=r(63907),s=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,s.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{IB:()=>s}),r(44208),r(94656);var i=r(63907);function s(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>u,en:()=>c});var i=r(49186),s=r(44208),n=r(53966);const o=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,s.A)("enable-feature:webgl-debug");function c(){return a}function l(){return a}function u(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),s=(new Error).stack;o().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:s}))}}}},62298:(e,t,r)=>{r(63907)},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,Uy:()=>u,Xt:()=>l,dH:()=>o,kn:()=>d,p3:()=>n});var i=r(89192),s=r(63907);function n(e,t,r,i,n=s.Tb.ADD,o=s.Tb.ADD,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}const o=function(e,t,r=s.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}(s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA),a={face:s.Y7.BACK,mode:s.Ac.CCW},c={face:s.Y7.FRONT,mode:s.Ac.CCW},l=e=>e===i.s2.Back?a:e===i.s2.Front?c:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return I.intern(e)}function _(e){return C.intern(e)}function m(e){return b.intern(e)}function f(e){return M.intern(e)}function p(e){return P.intern(e)}function g(e){return L.intern(e)}function v(e){return y.intern(e)}function T(e){return U.intern(e)}function E(e){return G.intern(e)}function A(e){return W.intern(e)}class R{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function S(e){return"["+e.join(",")+"]"}const I=new R(x,(e=>({__tag:"Blending",...e})));function x(e){return e?S([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const C=new R(N,(e=>({__tag:"Culling",...e})));function N(e){return e?S([e.face,e.mode]):null}const b=new R(O,(e=>({__tag:"PolygonOffset",...e})));function O(e){return e?S([e.factor,e.units]):null}const M=new R(w,(e=>({__tag:"DepthTest",...e})));function w(e){return e?S([e.func]):null}const P=new R(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?S([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new R(H,(e=>({__tag:"DepthWrite",...e})));function H(e){return e?S([e.zNear,e.zFar]):null}const y=new R(F,(e=>({__tag:"ColorWrite",...e})));function F(e){return e?S([e.r,e.g,e.b,e.a]):null}const U=new R(B,(e=>({__tag:"StencilWrite",...e})));function B(e){return e?S([e.mask]):null}const G=new R(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?S(e.buffers):null}const W=new R((function(e){return e?S([x(e.blending),N(e.culling),O(e.polygonOffset),w(e.depthTest),D(e.stencilTest),H(e.depthWrite),F(e.colorWrite),B(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:h(e.blending),culling:_(e.culling),polygonOffset:m(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:v(e.colorWrite),stencilWrite:T(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,s,t)=>{t.r(s),t.d(s,{build:()=>n.b,calculateAnchorPosForRendering:()=>n.c,shaderSettings:()=>n.s}),t(37585),t(48163),t(91829),t(79258),t(49255),t(76591),t(36782),t(47522),t(40268),t(63578),t(13755),t(76662),t(42398),t(63365),t(26835),t(52587),t(20693),t(47286),t(81961),t(71988),t(20304),t(2597),t(85977),t(63761),t(59643),t(46540);var n=t(13259)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,s,t)=>{t.r(s),t.d(s,{build:()=>n.b,calculateAnchorPosForRendering:()=>n.c,shaderSettings:()=>n.s}),t(37585),t(48163),t(91829),t(79258),t(49255),t(76591),t(36782),t(47522),t(40268),t(63578),t(13755),t(45935),t(42398),t(63365),t(26835),t(52587),t(20693),t(47286),t(81961),t(71988),t(20304),t(2597),t(85977),t(63761),t(59643),t(46540);var n=t(13259)}}]);