@arcgis/core 4.31.0-next.20240620 → 4.31.0-next.20240621

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 (146) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{3a74d3fc690177a703f5.js → 019ce38b02e3bf517125.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{222807cfaa2e17d0efea.js → 6745cedf6f82c8917904.js} +1 -1
  4. package/assets/esri/core/workers/chunks/7b6cd976367a0dd297d6.js +1 -0
  5. package/assets/esri/core/workers/chunks/{8a948d46d0377a6adb86.js → 9d677af08238d9e09e72.js} +2 -2
  6. package/assets/esri/core/workers/chunks/bedf60888f07b78b314d.js +1 -0
  7. package/assets/esri/core/workers/chunks/c39237c00c1d588dc107.js +1 -0
  8. package/assets/esri/core/workers/chunks/de7fa31d86a65ccdffc1.js +1 -0
  9. package/assets/esri/core/workers/chunks/{8ee8f3c54b2cce217845.js → f13fb6b712e364bbf48c.js} +1 -1
  10. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  11. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  12. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  13. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  14. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  15. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  16. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  17. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  18. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  19. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  20. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  21. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  22. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  23. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  24. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  25. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  26. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  27. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  28. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  29. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  30. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  31. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nb.json +1 -1
  32. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  33. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  34. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  35. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  36. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  37. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  38. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  39. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  40. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  41. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  42. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  43. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  44. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  45. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  46. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  47. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  48. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  55. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  58. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  59. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  60. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  61. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  62. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  63. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  64. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  65. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  66. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  67. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  68. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  69. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  70. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
  71. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  72. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  73. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  74. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  75. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  76. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  77. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  78. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  79. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  80. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  81. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  82. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  83. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  84. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  85. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  86. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  87. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  88. package/chunks/CheckerBoard.glsl.js +9 -6
  89. package/chunks/ComponentShader.glsl.js +4 -4
  90. package/chunks/ImageMaterial.glsl.js +1 -2
  91. package/interfaces.d.ts +50 -14
  92. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  93. package/layers/mixins/EditBusLayer.js +1 -1
  94. package/layers/mixins/FeatureLayerBase.js +1 -1
  95. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  96. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  97. package/layers/support/featureLayerUtils.js +1 -1
  98. package/package.json +1 -1
  99. package/portal/schemas/definitions.js +1 -1
  100. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/views/2d/layers/support/ExportStrategy.js +1 -1
  103. package/views/3d/layers/I3SMeshView3D.js +1 -1
  104. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  105. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  106. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  108. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  109. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +1 -2
  110. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  111. package/views/3d/webgl-engine/lib/Material.js +1 -1
  112. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  113. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  114. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  115. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  116. package/views/3d/webgl-engine/lib/edgeRendering/interfaces.js +1 -1
  117. package/views/3d/webgl-engine/lib/edgeRendering/util.js +1 -1
  118. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  119. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  120. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  121. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  122. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  123. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  124. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  125. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  126. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  127. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  128. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  129. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  130. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  131. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  132. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  133. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  134. package/views/SelectionManager.js +1 -1
  135. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  136. package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter2D.js +1 -1
  137. package/widgets/OrientedImageryViewer/utils.js +1 -1
  138. package/widgets/OrientedImageryViewer.js +1 -1
  139. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  140. package/widgets/PanoramicViewer/constants.js +1 -1
  141. package/widgets/PanoramicViewer/utils.js +1 -1
  142. package/widgets/Print.js +1 -1
  143. package/assets/esri/core/workers/chunks/4f2be9fd4ff5b3ad3110.js +0 -1
  144. package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +0 -1
  145. package/assets/esri/core/workers/chunks/986520dd0de64105dbff.js +0 -1
  146. package/assets/esri/core/workers/chunks/ad0a87dba95785ad6171.js +0 -1
@@ -260,7 +260,7 @@ return fallOffFunction(vv, vn, 0.1);
260
260
 
261
261
  fragBlur = b / w_total;
262
262
  }
263
- `),e}const f=Object.freeze(Object.defineProperty({__proto__:null,build:m},Symbol.toStringTag,{value:"Module"}))},76412:(e,t,r)=>{r.d(t,{a:()=>_,b:()=>x,c:()=>p,f:()=>b,g:()=>T,j:()=>w,n:()=>L}),r(44208),r(53966);var o=r(34727),i=r(58083),n=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(34304),d=r(88582),u=r(71351),h=r(44280),m=r(32114);const f=p();function p(){return(0,l.vt)()}const v=s.e,g=s.e;function _(e,t){return(0,s.c)(t,e)}function x(e){return e[3]}function T(e){return e}function b(e,t,r,o){return(0,l.fA)(e,t,r,o)}function y(e,t,r){if(null==t)return!1;if(!E(e,t,A))return!1;let{t0:o,t1:i}=A;if((o<0||i<o&&i>0)&&(o=i),o<0)return!1;if(r){const{origin:e,direction:i}=t;r[0]=e[0]+i[0]*o,r[1]=e[1]+i[1]*o,r[2]=e[2]+i[2]*o}return!0}const A={t0:0,t1:0};function E(e,t,r){const{origin:o,direction:i}=t,n=S;n[0]=o[0]-e[0],n[1]=o[1]-e[1],n[2]=o[2]-e[2];const a=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===a)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),l=s*s-4*a*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*a),r.t1=(-s+c)/(2*a),!0}const S=(0,a.vt)();function w(e,t){return y(e,t,null)}function M(e,t,r){const o=m.rq.get(),a=m.Rc.get();(0,n.b)(o,t.origin,t.direction);const s=x(e);(0,n.b)(r,o,t.origin),(0,n.j)(r,r,1/(0,n.l)(r)*s);const l=O(e,t.origin),c=(0,h.g7)(t.origin,r);return(0,i.$0)(a,c+l,o),(0,n.h)(r,r,a),r}function C(e,t,r){const o=(0,n.f)(m.rq.get(),t,e),i=(0,n.j)(m.rq.get(),o,e[3]/(0,n.l)(o));return(0,n.g)(r,i,e)}function O(e,t){const r=(0,n.f)(m.rq.get(),t,e),i=(0,n.l)(r),a=x(e),s=a+Math.abs(a-i);return(0,o.XM)(a/s)}const R=(0,a.vt)();function I(e,t,r,i){const a=(0,n.f)(R,t,e);switch(r){case d._.X:{const e=(0,o.jU)(a,R)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case d._.Y:{const e=(0,o.jU)(a,R),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case d._.Z:return(0,n.n)(i,a);default:return}}function N(e,t){const r=(0,n.f)(P,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),o=x(e);return r<=o*o}const P=(0,a.vt)(),H=p();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:f,altitudeAt:N,angleToSilhouette:O,axisAt:I,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return y(e,t,r)?r:((0,u.oC)(t,e,r),C(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:_,create:p,distanceToSilhouette:function(e,t){const r=(0,n.f)(m.rq.get(),t,e),o=(0,n.q)(r),i=e[3]*e[3];return Math.sqrt(Math.abs(o-i))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:g,exactEquals:v,fromCenterAndRadius:function(e,t){return(0,l.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:T,getRadius:x,intersectLine:function(e,t,r){const o=(0,u.Cr)(t,r);if(!E(e,o,A))return[];const{origin:i,direction:s}=o,{t0:l,t1:d}=A,h=t=>{const r=(0,a.vt)();return(0,n.r)(r,i,s,t),C(e,r,r)};return Math.abs(l-d)<(0,c.FD)()?[h(l)]:[h(l),h(d)]},intersectRay:y,intersectRayClosestSilhouette:function(e,t,r){if(y(e,t,r))return r;const o=M(e,t,m.rq.get());return(0,n.g)(r,t.origin,(0,n.j)(m.rq.get(),t.direction,(0,n.p)(t.origin,o)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:C,setAltitudeAt:function(e,t,r,o){const i=N(e,t),a=I(e,t,d._.Z,P),s=(0,n.j)(P,a,r-i);return(0,n.g)(o,t,s)},setExtent:function(e,t,r){return e!==r&&_(e,r),r},tmpSphere:H,union:function(e,t,r=(0,l.vt)()){const o=(0,n.p)(e,t),i=e[3],a=t[3];return o+a<i?((0,s.c)(r,e),r):o+i<a?((0,s.c)(r,t),r):((0,n.o)(r,e,t,(o+a-i)/(2*o)),r[3]=(o+i+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>n,f:()=>a,n:()=>i});var o=r(34275);function i(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,i=r){const n=t.length/2;let a=0,s=0;if((0,o.cy)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=i;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=i;else for(let o=0;o<n;++o)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=i}function a(e,t,r,o){const i=e.typedBuffer,n=e.typedBufferStride,a=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<a;++e)i[s]=t,i[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:n,normalizeIntegerBufferView:i},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{function o(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return e;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[4],d=r[5],u=r[6],h=r[8],m=r[9],f=r[10],p=r[12],v=r[13],g=r[14];let _=0,x=0;for(let r=0;r<n;r++){const r=t[_],n=t[_+1],T=t[_+2];e[x]=a*r+c*n+h*T+p,e[x+1]=s*r+d*n+m*T+v,e[x+2]=l*r+u*n+f*T+g,_+=i,x+=o}return e}function n(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],m=r[7],f=r[8];let p=0,v=0;for(let r=0;r<n;r++){const r=t[p],n=t[p+1],g=t[p+2];e[v]=a*r+c*n+h*g,e[v+1]=s*r+d*n+m*g,e[v+2]=l*r+u*n+f*g,p+=i,v+=o}}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,i=o){const n=Math.min(e.length/o,t.length/i);let a=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=i,s+=o;return e}function c(e,t,r,o=3,i=o){const n=e.length/o;if(n!==Math.ceil(t.length/i))return e;let a=0,s=0;for(let l=0;l<n;l++)e[s]=t[a]+r[0],e[s+1]=t[a+1]+r[1],e[s+2]=t[a+2]+r[2],a+=i,s+=o;return e}function d(e,t){u(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r=3,o=r){const i=Math.min(e.length/r,t.length/o);let n=0,a=0;for(let s=0;s<i;s++){const i=t[n],s=t[n+1],l=t[n+2],c=i*i+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*i,e[a+1]=t*s,e[a+2]=t*l}n+=o,a+=r}}r.d(t,{a:()=>i,b:()=>c,c:()=>n,d:()=>o,e:()=>d,f:()=>l,n:()=>u,s:()=>s,t:()=>a}),r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,normalize:u,normalizeView:d,scale:l,scaleView:s,shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)i[c]=a[l]>>r,i[c+1]=a[l+1]>>r,i[c+2]=a[l+2]>>r,l+=s,c+=n},transformMat3:a,transformMat3View:n,transformMat4:i,transformMat4View:o,translate:c},Symbol.toStringTag,{value:"Module"}))},51737:(e,t,r)=>{function o(e,t){i(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r=3,o=r){const i=t.length/o;let n=0,a=0;for(let s=0;s<i;++s)e[n]=t[a],e[n+1]=t[a+1],e[n+2]=t[a+2],n+=r,a+=o}function n(e,t,r,o,i){const n=e.typedBuffer,a=e.typedBufferStride,s=i?.count??e.count;let l=(i?.dstIndex??0)*a;for(let e=0;e<s;++e)n[l]=t,n[l+1]=r,n[l+2]=o,l+=a}r.d(t,{a:()=>o,c:()=>i,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:i,copyView:o,fill:n},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>i,b:()=>l,n:()=>a,s:()=>s,t:()=>n}),r(44208);var o=r(53966);function i(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,o=4,i=o){if(e.length/o!=t.length/i)return;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],m=r[7],f=r[8];let p=0,v=0;for(let r=0;r<n;r++){const r=t[p],n=t[p+1],g=t[p+2],_=t[p+3];e[v]=a*r+c*n+h*g,e[v+1]=s*r+d*n+m*g,e[v+2]=l*r+u*n+f*g,e[v+3]=_,p+=i,v+=o}}function a(e,t){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,n=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*i,r=e*a,s=n[r],l=n[r+1],c=n[r+2],d=s*s+l*l+c*c;if(d>0){const e=1/Math.sqrt(d);o[t]=e*s,o[t+1]=e*l,o[t+2]=e*c}}}function s(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,o=4){const i=Math.min(e.length/o,t.count),n=t.typedBuffer,a=t.typedBufferStride;let s=0,l=0;for(let t=0;t<i;t++)e[l]=r*n[s],e[l+1]=r*n[s+1],e[l+2]=r*n[s+2],e[l+3]=r*n[s+3],s+=a,l+=o}Object.freeze(Object.defineProperty({__proto__:null,normalize:a,scale:l,scaleView:s,transformMat3:n,transformMat3View:i,transformMat4:function(e,t,r,i=4,n=i){if(e.length/i!=t.length/n)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=e.length/i,s=r[0],l=r[1],c=r[2],d=r[3],u=r[4],h=r[5],m=r[6],f=r[7],p=r[8],v=r[9],g=r[10],_=r[11],x=r[12],T=r[13],b=r[14],y=r[15];let A=0,E=0;for(let r=0;r<a;r++){const r=t[A],o=t[A+1],a=t[A+2],S=t[A+3];e[E]=s*r+u*o+p*a+x*S,e[E+1]=l*r+h*o+v*a+T*S,e[E+2]=c*r+m*o+g*a+b*S,e[E+3]=d*r+f*o+_*a+y*S,A+=n,E+=i}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const o=e.count,i=r[0],n=r[1],a=r[2],s=r[3],l=r[4],c=r[5],d=r[6],u=r[7],h=r[8],m=r[9],f=r[10],p=r[11],v=r[12],g=r[13],_=r[14],x=r[15],T=e.typedBuffer,b=e.typedBufferStride,y=t.typedBuffer,A=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*b,r=e*A,o=y[r],E=y[r+1],S=y[r+2],w=y[r+3];T[t]=i*o+l*E+h*S+v*w,T[t+1]=n*o+c*E+m*S+g*w,T[t+2]=a*o+d*E+f*S+_*w,T[t+3]=s*o+u*E+p*S+x*w}}},Symbol.toStringTag,{value:"Module"}))},78358:(e,t,r)=>{function o(e,t){i(e.typedBuffer,t,e.typedBufferStride)}function i(e,t,r=4){const o=t.typedBuffer,i=t.typedBufferStride,n=t.count;let a=0,s=0;for(let t=0;t<n;++t)e[a]=o[s],e[a+1]=o[s+1],e[a+2]=o[s+2],e[a+3]=o[s+3],a+=r,s+=i}function n(e,t,r,o,i,n){const a=e.typedBuffer,s=e.typedBufferStride,l=n?.count??e.count;let c=(n?.dstIndex??0)*s;for(let e=0;e<l;++e)a[c]=t,a[c+1]=r,a[c+2]=o,a[c+3]=i,c+=s}r.d(t,{a:()=>i,c:()=>o,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:i,copyView:o,fill:n},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>i});var o=r(26390);class i{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*n);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,n));e++)this._items.push(this._allocator())}}const n=1024},46140:(e,t,r)=>{r.d(t,{R:()=>i});var o=r(49186);let i=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[i,n]=t.split("."),a=/^\s*\d+\s*$/;if(!i?.match||!a.test(i))throw new o.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new o.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(i,10),l=parseInt(n,10);return new e(s,l,r)}}},61473:(e,t,r)=>{function o(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function i(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{EM:()=>i,b5:()=>o});const n=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,a,/^jsapps\.esri\.com$/,s,l]},11964:(e,t,r)=>{r.d(t,{Cr:()=>c,_I:()=>d,vt:()=>l});var o=r(34727),i=r(4341),n=r(38954),a=r(51850),s=r(32114);function l(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function c(e,t,r=l()){return(0,n.c)(r.origin,e),(0,n.f)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,i,a){const{vector:l,origin:c}=e,d=(0,n.f)(s.rq.get(),t,c),u=(0,n.m)(l,d)/(0,n.q)(l);return(0,n.j)(a,l,(0,o.qE)(u,0,1)),(0,n.g)(a,a,e.origin)}(e,t,0,0,r)}(0,a.vt)(),(0,a.vt)(),new i.I((()=>l()))},71351:(e,t,r)=>{r.d(t,{Cr:()=>c,LV:()=>l,oC:()=>d,vt:()=>a}),r(4576);var o=r(4341),i=r(38954),n=r(51850);function a(e){return e?s((0,n.o8)(e.origin),(0,n.o8)(e.direction)):s((0,n.vt)(),(0,n.vt)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=a()){return(0,i.c)(r.origin,e),(0,i.f)(r.direction,t,e),r}function d(e,t,r){const o=(0,i.m)(e.direction,(0,i.f)(r,t,e.origin));return(0,i.g)(r,e.origin,(0,i.j)(r,e.direction,o)),r}r(32114);const u=new o.I((()=>a()));(0,n.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>l});var o=r(78888),i=r(60999),n=r(49186),a=r(74887),s=r(84952);class l{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,o.A)(t,{responseType:c[e]})).data;const s=await(0,i.Ke)(this._streamDataRequester.request(t,e,r));if(!0===s.ok)return s.value;throw(0,a.QP)(s.error),new n.A("",`Request for resource failed: ${s.error}`)}}const c={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var o=r(34275),i=r(97146),n=r(63907);function a(e,t){switch(t){case n.WR.TRIANGLES:return"number"==typeof(r=e)?(0,i.tM)(r):(0,o.mg)(r)?new Uint16Array(r):r;case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,i.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let i=0;i<r;i+=1)i%2==0?(o[t++]=e[i],o[t++]=e[i+1],o[t++]=e[i+2]):(o[t++]=e[i+1],o[t++]=e[i],o[t++]=e[i+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const i=e[0];let n=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];o[a++]=i,o[a++]=n,o[a++]=r,n=r}return o}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>l,x3:()=>a});var o=r(44208),i=r(89192);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function a(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function l(e,t){if(t===i.JS.KTX2_ENCODING)return new n(e);const r=new Blob([e],{type:t}),a=URL.createObjectURL(r),s=new Image;if((0,o.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{i(),e(s)},o=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(a),s.removeEventListener("load",r),s.removeEventListener("error",o)};s.addEventListener("load",r),s.addEventListener("error",o),s.src=a}));try{s.src=a,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),s}},55268:(e,t,r)=>{r.d(t,{fetch:()=>Sr});var o=r(61473),i=r(34727),n=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),d=r(38954),u=r(51850),h=r(70328),m=r(11868),f=r(13030),p=r(73354),v=r(65686),g=r(43609),_=r(51737),x=r(78358),T=r(21015),b=r(84498),y=r(51530),A=r(88340);function E(e){if(null==e)return null;const t=null!=e.offset?e.offset:A.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:A.Un,i=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,a.vt)();return(0,n.lw)(c,s,l),(0,n.lw)(c,i,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class w{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var M=r(78888),C=r(60999),O=r(86805),R=r(49186),I=r(53966);class N{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)}set(e,t,r){const o=this._outer.get(e);o?o.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)}}var L=r(74887),P=r(46140),H=r(97146);async function D(e,t){const{data:r}=await(0,M.A)(e,{responseType:"image",...t});return r}var B=r(46610),F=r(89192),z=r(34275);function V(e){if(e.length<z.y9)return Array.from(e);if((0,z.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var G=r(3694),U=r(620);class W{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,U.vA)(e.length>=1),(0,U.vA)(3===r.size||4===r.size);const{data:o,size:i,indices:n}=r;(0,U.vA)(n.length%this._numIndexPerPrimitive==0),(0,U.vA)(n.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let s=i*n[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(s);const l=(0,u.fA)(o[s],o[s+1],o[s+2]),c=(0,u.o8)(l);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){s=i*n[r+e],j.push(s);let t=o[s];l[0]=Math.min(t,l[0]),c[0]=Math.max(t,c[0]),t=o[s+1],l[1]=Math.min(t,l[1]),c[1]=Math.max(t,c[1]),t=o[s+2],l[2]=Math.min(t,l[2]),c[2]=Math.max(t,c[2])}}this.bbMin=l,this.bbMax=c;const h=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(c[0]-l[0],c[1]-l[1]),c[2]-l[2]);let m=this.radius*this.radius;for(let e=0;e<j.length;++e){s=j.at(e);const t=o[s]-h[0],r=o[s+1]-h[1],i=o[s+2]-h[2],n=t*t+r*r+i*i;if(n<=m)continue;const a=Math.sqrt(n),l=.5*(a-this.radius);this.radius=this.radius+l,m=this.radius*this.radius;const c=l/a;h[0]+=t*c,h[1]+=r*c,h[2]+=i*c}this.center=h,j.clear()}getChildren(){if(this._children||(0,d.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),o=new Array(8);for(let e=0;e<8;++e)o[e]=0;const{data:i,size:n,indices:a}=this.position;for(let s=0;s<t;++s){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[s];let c=n*a[l],d=i[c],u=i[c+1],h=i[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=n*a[l+e];const t=i[c],r=i[c+1],o=i[c+2];t<d&&(d=t),r<u&&(u=r),o<h&&(h=o)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[s]=t,++o[t]}let s=0;for(let e=0;e<8;++e)o[e]>0&&++s;if(s<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=o[e]>0?new Uint32Array(o[e]):void 0;for(let e=0;e<8;++e)o[e]=0;for(let e=0;e<t;++e){const t=r[e];l[t][o[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new W(l[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new G.A({deallocator:null});var q=r(69720),k=r(96672),$=r(4341),Y=r(11964);function X(e,t,r){return(0,d.f)(Z,t,e),(0,d.f)(J,r,e),.5*(0,d.l)((0,d.b)(Z,Z,J))}r(32114),new $.I(Y.vt),new $.I((()=>{return e?{p0:(0,u.o8)(e.p0),p1:(0,u.o8)(e.p1),p2:(0,u.o8)(e.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var e}));const Z=(0,u.vt)(),J=(0,u.vt)(),K=(0,u.vt)(),Q=(0,u.vt)(),ee=(0,u.vt)(),te=(0,u.vt)();var re=r(24326);class oe{constructor(e){this.channel=e,this.id=(0,re.c)()}}var ie=r(46540);r(28449),(0,u.vt)(),new Float32Array(6);class ne extends q.J{constructor(e,t,r=null,o=k.X.Mesh,i=null,n=-1){super(),this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=i,this.edgeIndicesLength=n,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,H.Dg)(r.indices)}),e===ie.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:V(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r&&this._attributes.set(e,{...r,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===k.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===k.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,d.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:i}=e;(0,d.s)(t,0,0,0),(0,d.s)(te,0,0,0);let n=0,a=0;for(let e=0;e<i.length-2;e+=3){const s=i[e]*r,l=i[e+1]*r,c=i[e+2]*r;(0,d.s)(K,o[s],o[s+1],o[s+2]),(0,d.s)(Q,o[l],o[l+1],o[l+2]),(0,d.s)(ee,o[c],o[c+1],o[c+2]);const u=X(K,Q,ee);u?((0,d.g)(K,K,Q),(0,d.g)(K,K,ee),(0,d.j)(K,K,1/3*u),(0,d.g)(t,t,K),n+=u):((0,d.g)(te,te,K),(0,d.g)(te,te,Q),(0,d.g)(te,te,ee),a+=3)}return!(0===a&&0===n||(0!==n?((0,d.j)(t,t,1/n),0):0===a||((0,d.j)(t,te,1/a),0)))}(this.attributes.get(ie.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(ie.r.POSITION);return function(e,t,r){if(!e)return!1;(0,d.s)(r,0,0,0),(0,d.s)(te,0,0,0);let o=0,i=0;const{size:n,data:a,indices:s}=e,l=s.length-1,c=l+(t?2:0);for(let e=0;e<c;e+=2){const t=e<l?e+1:0,c=s[e<l?e:l]*n,u=s[t]*n;K[0]=a[c],K[1]=a[c+1],K[2]=a[c+2],Q[0]=a[u],Q[1]=a[u+1],Q[2]=a[u+2],(0,d.j)(K,(0,d.g)(K,K,Q),.5);const h=(0,d.F)(K,Q);h>0?((0,d.g)(r,r,(0,d.j)(K,K,h)),o+=h):0===o&&((0,d.g)(te,te,K),i++)}return 0!==o?((0,d.j)(r,r,1/o),!0):0!==i&&((0,d.j)(r,te,1/i),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:i}=e;(0,d.s)(t,0,0,0);let n=-1,a=0;for(let e=0;e<i.length;e++){const s=i[e]*r;n!==s&&(t[0]+=o[s],t[1]+=o[s+1],t[2]+=o[s+2],a++),n=s}return a>1&&(0,d.j)(t,t,1/a),a>0}(this.attributes.get(ie.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(ie.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===k.X.Mesh?3:1;(0,U.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,H.tM)(e.indices.length/t);return new W(r,t,e)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}addHighlight(){const e=new oe(F.Mg.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const r=e.filter((e=>e!==t));return 0===r.length?null:r}(this.highlights,e)}}var ae=r(44208),se=r(65529),le=r(97768),ce=r(84952),de=r(56058),ue=r(2741);let he;var me,fe;(fe=me||(me={}))[fe.ETC1_RGB=0]="ETC1_RGB",fe[fe.ETC2_RGBA=1]="ETC2_RGBA",fe[fe.BC1_RGB=2]="BC1_RGB",fe[fe.BC3_RGBA=3]="BC3_RGBA",fe[fe.BC4_R=4]="BC4_R",fe[fe.BC5_RG=5]="BC5_RG",fe[fe.BC7_M6_RGB=6]="BC7_M6_RGB",fe[fe.BC7_M5_RGBA=7]="BC7_M5_RGBA",fe[fe.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",fe[fe.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",fe[fe.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",fe[fe.ATC_RGB=11]="ATC_RGB",fe[fe.ATC_RGBA=12]="ATC_RGBA",fe[fe.FXT1_RGB=17]="FXT1_RGB",fe[fe.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",fe[fe.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",fe[fe.ETC2_EAC_R11=20]="ETC2_EAC_R11",fe[fe.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",fe[fe.RGBA32=13]="RGBA32",fe[fe.RGB565=14]="RGB565",fe[fe.BGR565=15]="BGR565",fe[fe.RGBA4444=16]="RGBA4444";var pe=r(63907),ve=r(21231),ge=r(42293);let _e=null,xe=null;async function Te(){return null==xe&&(he??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,ue.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),xe=he,_e=await xe),xe}function be(e,t,r,o,i){const n=(0,ge.IB)(t?pe.CQ.COMPRESSED_RGBA8_ETC2_EAC:pe.CQ.COMPRESSED_RGB8_ETC2),a=i&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*o*n*a)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function Ae(e){return e.getFaces()>=1&&e.isETC1S()}function Ee(e,t,r,o,i,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?o?[me.ETC2_RGBA,pe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[me.ETC1_RGB,pe.CQ.COMPRESSED_RGB8_ETC2]:c?o?[me.BC3_RGBA,pe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[me.BC1_RGB,pe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[me.RGBA32,pe.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.Cj.LINEAR,t.width=i,t.height=n,new ve.g(e,t,{type:"compressed",levels:m})}const Se=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function we(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Me=we("DXT1"),Ce=we("DXT3"),Oe=we("DXT5");function Re(e,t,r){if(e instanceof ImageData)return Re(Ie(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}function Ie(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var Ne,Le,Pe=r(67171);class He extends q.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=k.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new se.A,this._parameters={...Be,...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,ce.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,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Pe.R;return t.wrapMode=this._parameters.wrap??pe.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.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,z.mw)(e)||(0,z.mg)(e))return t.encoding===F.JS.KTX2_ENCODING?function(e,t){if(null==_e)return e.byteLength;const r=new _e.KTX2File(new Uint8Array(e)),o=Ae(r)?be(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),o}(e,!!t.mipmap):t.encoding===F.JS.BASIS_ENCODING?function(e,t){if(null==_e)return e.byteLength;const r=new _e.BasisFile(new Uint8Array(e)),o=ye(r)?be(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),o}(e,!!t.mipmap):e.byteLength;const{width:r,height:o}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?De(e):t;return(t.mipmap?4/3:1)*r*o*(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 ve.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,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,z.mg)(t)?this._loadFromPixelData(e,t):(0,z.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<Ne.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 o=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return Se().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Se().error("Unsupported format, must contain a FourCC code"),null;const o=r[21];let i,n;switch(o){case Me:i=8,n=pe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:i=16,n=pe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Oe:i=16,n=pe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Se().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(o)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(Se().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*i,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:n,width:c,height:d}}(r,t.hasMipmap??!1);if(null==o)throw new Error("DDS texture data is null");const{textureData:i,internalFormat:n,width:a,height:s}=o;return t.samplingMode=i.levels.length>1?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.Cj.LINEAR,t.hasMipmap=i.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new ve.g(e,t,i)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_e&&(_e=await Te());const o=new _e.KTX2File(new Uint8Array(r));if(!Ae(o))return null;o.startTranscoding();const i=Ee(e,t,o.getLevels(),o.getHasAlpha(),o.getWidth(),o.getHeight(),((e,t)=>o.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>o.transcodeImage(r,e,0,0,t,0,-1,-1)));return o.close(),o.delete(),i}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_e&&(_e=await Te());const o=new _e.BasisFile(new Uint8Array(r));if(!ye(o))return null;o.startTranscoding();const i=Ee(e,t,o.getNumLevels(0),o.getHasAlpha(),o.getImageWidth(0,0),o.getImageHeight(0,0),((e,t)=>o.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>o.transcodeImage(r,0,e,t,0,0)));return o.close(),o.delete(),i}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,U.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?pe.Ab.LUMINANCE:3===this._parameters.components?pe.Ab.RGB:pe.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new ve.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const o=await D(t,{signal:r});return(0,L.Te)(r),this._loadFromImage(e,o)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const o=await(0,de.Sx)(t,t.src,!1,r);return(0,L.Te)(r),this._loadFromImage(e,o)}))}_loadFromVideoElement(e,t){return t.readyState>=Ne.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,i)=>{const n=()=>{t.removeEventListener("loadeddata",a),t.removeEventListener("error",s),(0,le.xt)(l)},a=()=>{t.readyState>=Ne.HAVE_CURRENT_DATA&&(n(),o(this._loadFromImage(e,t)))},s=e=>{n(),i(e||new R.A("Failed to load video"))};t.addEventListener("loadeddata",a),t.addEventListener("error",s);const l=(0,L.u7)(r,(()=>s((0,L.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?Ie(e):e;let o=e.width,i=e.height;do{o=Math.ceil(o/2),i=Math.ceil(i/2),r=o*i}while(r>1048576||null!=t&&(o>t||i>t));return Re(e,o,i)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const o=t/r;return Re(e,Math.round(e.width*o),Math.round(e.height*o))}(r,t)}const o=De(r);this._parameters.width=o.width,this._parameters.height=o.height;const i=this._createDescriptor(e);return i.pixelFormat=3===this._parameters.components?pe.Ab.RGB:pe.Ab.RGBA,i.width=o.width,i.height=o.height,this._glTexture=new ve.g(e,i,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const o=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(o,o),r}unload(){if(this._glTexture=(0,le.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function De(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(Le=Ne||(Ne={}))[Le.HAVE_NOTHING=0]="HAVE_NOTHING",Le[Le.HAVE_METADATA=1]="HAVE_METADATA",Le[Le.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",Le[Le.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",Le[Le.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Be={wrap:{s:pe.pF.REPEAT,t:pe.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var Fe=r(24151),ze=r(1843),Ve=r(49255),Ge=r(96336),Ue=r(62602),We=r(59469),je=r(25634),qe=r(14903),ke=r(14327),$e=r(90644);const Ye=(0,$e.p3)(pe.dn.SRC_ALPHA,pe.dn.ONE,pe.dn.ONE_MINUS_SRC_ALPHA,pe.dn.ONE_MINUS_SRC_ALPHA),Xe=(0,$e.p3)(pe.dn.ONE,pe.dn.ZERO,pe.dn.ONE,pe.dn.ONE_MINUS_SRC_ALPHA);function Ze(e){switch(e){case ke.y.NONE:return Ye;case ke.y.ColorAlpha:return Xe;case ke.y.FrontFace:case ke.y.COUNT:return null}}const Je={factor:-1,units:-2};function Ke(e,t=pe.MT.LESS){return e===ke.y.NONE||e===ke.y.FrontFace?t:pe.MT.LEQUAL}function Qe(e){return e===ke.y.ColorAlpha?{buffers:[pe.Nm.COLOR_ATTACHMENT0,pe.Nm.COLOR_ATTACHMENT1]}:null}class et{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const tt=(0,h.vt)();function rt(e,t,r,o,i,n){if(!e.visible)return;const a=(0,d.z)(pt,o,r),s=(e,t,r)=>{n(e,r,t,!1)},l=new et(!1,t.options.normalRequired);if(e.boundingInfo){(0,U.vA)(e.type===k.X.Mesh);const o=t.tolerance;it(e.boundingInfo,r,a,o,i,l,s)}else{const t=e.attributes.get(ie.r.POSITION),o=t.indices;!function(e,t,r,o,i,n,a,s,l,c){const u=t,h=vt,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,x=(v+_)%3,T=(v+(3-_))%3,b=u[x]/u[g],y=u[T]/u[g],A=1/u[g],E=at,S=st,w=lt,{normalRequired:M}=l;for(let t=r;t<o;++t){const r=3*t,o=a*i[r];(0,d.s)(h[0],n[o+0],n[o+1],n[o+2]);const l=a*i[r+1];(0,d.s)(h[1],n[l+0],n[l+1],n[l+2]);const u=a*i[r+2];(0,d.s)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.c)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.c)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.c)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.z)(E,h[0],e),(0,d.z)(S,h[1],e),(0,d.z)(w,h[2],e);const m=E[x]-b*E[g],f=E[T]-y*E[g],p=S[x]-b*S[g],v=S[T]-y*S[g],_=w[x]-b*w[g],C=w[T]-y*w[g],O=_*v-C*p,R=m*C-f*_,I=p*f-v*m;if((O<0||R<0||I<0)&&(O>0||R>0||I>0))continue;const N=O+R+I;if(0===N)continue;const L=O*(A*E[g])+R*(A*S[g])+I*(A*w[g]);if(L*Math.sign(N)<0)continue;const P=L/N;P>=0&&c(P,t,M?dt(h):null)}}(r,a,0,o.length/3,o,t.data,t.stride,i,l,s)}}const ot=(0,u.vt)();function it(e,t,r,o,i,n,a){if(null==e)return;const s=function(e,t){return(0,d.s)(t,1/e[0],1/e[1],1/e[2])}(r,ot);if((0,h.Ne)(tt,e.bbMin),(0,h.vI)(tt,e.bbMax),null!=i&&i.applyToAabb(tt),function(e,t,r,o){return function(e,t,r,o,i){const n=(e[0]-o-t[0])*r[0],a=(e[3]+o-t[0])*r[0];let s=Math.min(n,a),l=Math.max(n,a);const c=(e[1]-o-t[1])*r[1],d=(e[4]+o-t[1])*r[1];if(l=Math.min(l,Math.max(c,d)),l<0)return!1;if(s=Math.max(s,Math.min(c,d)),s>l)return!1;const u=(e[2]-o-t[2])*r[2],h=(e[5]+o-t[2])*r[2];return l=Math.min(l,Math.max(u,h)),!(l<0)&&(s=Math.max(s,Math.min(u,h)),!(s>l)&&s<1/0)}(e,t,r,o)}(tt,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>mt){const s=e.getChildren();if(void 0!==s){for(const e of s)it(e,t,r,o,i,n,a);return}}!function(e,t,r,o,i,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=a*i[r];let c=n[o],_=n[o+1],x=n[o+2];const T=a*i[r+1];let b=n[T],y=n[T+1],A=n[T+2];const E=a*i[r+2];let S=n[E],w=n[E+1],M=n[E+2];null!=l&&([c,_,x]=l.applyToVertex(c,_,x,e),[b,y,A]=l.applyToVertex(b,y,A,e),[S,w,M]=l.applyToVertex(S,w,M,e));const C=b-c,O=y-_,R=A-x,I=S-c,N=w-_,L=M-x,P=p*L-N*v,H=v*I-L*f,D=f*N-I*p,B=C*P+O*H+R*D;if(Math.abs(B)<=ft)continue;const F=u-c,z=h-_,V=m-x,G=F*P+z*H+V*D;if(B>0){if(G<0||G>B)continue}else if(G>0||G<B)continue;const U=z*R-O*V,W=V*C-R*F,j=F*O-C*z,q=f*U+p*W+v*j;if(B>0){if(q<0||G+q>B)continue}else if(q>0||G+q<B)continue;const k=(I*U+N*W+L*j)/B;k>=0&&d(k,t,g?ct(C,O,R,I,N,L,nt):null)}}(t,r,0,c,l.indices,l.data,l.stride,s,i,n,a)}}const nt=(0,u.vt)();const at=(0,u.vt)(),st=(0,u.vt)(),lt=(0,u.vt)();function ct(e,t,r,o,i,n,a){return(0,d.s)(ut,e,t,r),(0,d.s)(ht,o,i,n),(0,d.b)(a,ut,ht),(0,d.n)(a,a),a}function dt(e){return(0,d.z)(ut,e[1],e[0]),(0,d.z)(ht,e[2],e[0]),(0,d.b)(nt,ut,ht),(0,d.n)(nt,nt),nt}const ut=(0,u.vt)(),ht=(0,u.vt)(),mt=1e3,ft=1e-7,pt=(0,u.vt)(),vt=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()];var gt,_t;(_t=gt||(gt={}))[_t.INTEGRATED_MESH=0]="INTEGRATED_MESH",_t[_t.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",_t[_t.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",_t[_t.OPAQUE_NO_SSAO_DEPTH=3]="OPAQUE_NO_SSAO_DEPTH",_t[_t.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",_t[_t.TRANSPARENT_NO_SSAO_DEPTH=5]="TRANSPARENT_NO_SSAO_DEPTH",_t[_t.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",_t[_t.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL=7]="TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL",_t[_t.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",_t[_t.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",_t[_t.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",_t[_t.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",_t[_t.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",_t[_t.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",_t[_t.LASERLINES=14]="LASERLINES",_t[_t.LASERLINES_CONTRAST_CONTROL=15]="LASERLINES_CONTRAST_CONTROL",_t[_t.HUD_MATERIAL=16]="HUD_MATERIAL",_t[_t.LABEL_MATERIAL=17]="LABEL_MATERIAL",_t[_t.LINE_CALLOUTS=18]="LINE_CALLOUTS",_t[_t.LINE_CALLOUTS_HUD_DEPTH=19]="LINE_CALLOUTS_HUD_DEPTH",_t[_t.DRAPED_MATERIAL=20]="DRAPED_MATERIAL",_t[_t.DRAPED_WATER=21]="DRAPED_WATER",_t[_t.VIEWSHED=22]="VIEWSHED",_t[_t.VOXEL=23]="VOXEL",_t[_t.MAX_SLOTS=24]="MAX_SLOTS";var xt=r(76412),Tt=r(57005);const bt=new class{constructor(e=0){this.offset=e,this.sphere=(0,xt.c)(),this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,i=(0,d.s)(yt,e,t,r),n=(0,d.h)(i,i,o),a=this.offset/(0,d.l)(n);(0,d.r)(n,n,n,a);const s=this.objectTransform.inverse;return(0,d.h)(this.tmpVertex,n,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,d.l)(e);(0,d.r)(e,e,e,r);const o=this.offset/(0,d.l)(t);(0,d.r)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,d.l)((0,xt.g)(e)),r=this.offset/t;return(0,d.r)((0,xt.g)(this.sphere),(0,xt.g)(e),(0,xt.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,u.vt)(),this._tmpMbs=(0,xt.c)(),this._tmpObb=new Tt.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,d.l)(e)}applyToVertex(e,t,r){const o=(0,d.s)(yt,e,t,r),i=(0,d.s)(At,e,t,r+this.componentLocalOriginLength),n=this._totalOffset/(0,d.l)(i);return(0,d.r)(this._tmpVertex,o,i,n),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],o=e[1],i=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(o),d=Math.abs(i),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*n))*Math.min(l,u),p=.5*(1+Math.sign(o*a))*Math.min(c,h),v=.5*(1+Math.sign(i*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),b=Math.sign(l+r),y=Math.sign(c+o),A=Math.sign(d+i),E=Math.sign(u+n),S=Math.sign(h+a),w=Math.sign(m+s),M=this._totalOffset;if(T<M)return e[0]-=(1-b)*M,e[1]-=(1-y)*M,e[2]-=(1-A)*M,e[3]+=E*M,e[4]+=S*M,e[5]+=w*M,e;const C=M/Math.sqrt(g*g+_*_+x*x),O=M/T,R=O-C,I=-R;return e[0]+=r*(b*I+O),e[1]+=o*(y*I+O),e[2]+=i*(A*I+O),e[3]+=n*(E*R+C),e[4]+=a*(S*R+C),e[5]+=s*(w*R+C),e}applyToMbs(e){const t=(0,d.l)((0,xt.g)(e)),r=this._totalOffset/t;return(0,d.r)((0,xt.g)(this._tmpMbs),(0,xt.g)(e),(0,xt.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,Tt.gm)(e,this._totalOffset,this._totalOffset,Fe.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=(0,d.s)(yt,e,t,r),i=(0,d.g)(At,o,this.localOrigin),n=this.offset/(0,d.l)(i);return(0,d.r)(this.tmpVertex,o,i,n),this.tmpVertex}applyToAabb(e){const t=Et,r=St,o=wt;for(let i=0;i<3;++i)t[i]=e[0+i]+this.localOrigin[i],r[i]=e[3+i]+this.localOrigin[i],o[i]=t[i];const i=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=i[t],e[t+3]=i[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let i=0;i<3;++i)o[i]=e&1<<i?r[i]:t[i];n(o)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let i=0;i<3;++i)o[i]=a&1<<i?0:e&1<<i?t[i]:r[i];n(o)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const yt=(0,u.vt)(),At=(0,u.vt)(),Et=(0,u.vt)(),St=(0,u.vt)(),wt=(0,u.vt)();function Mt(e,t,r){const{data:o,indices:i}=e,n=t.typedBuffer,a=t.typedBufferStride,s=i.length;r*=a;for(let e=0;e<s;++e){const t=2*i[e];n[r]=o[t],n[r+1]=o[t+1],r+=a}}function Ct(e,t,r,o){const{data:i,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,null==o||1===o)for(let e=0;e<l;++e){const t=3*n[e];a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<o;++e)a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],r+=s}}function Ot(e,t,r,o=1){const{data:i,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=4*n[e];a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],a[r+3]=i[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<o;++e)a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],a[r+3]=i[t+3],r+=s}}function Rt(e,t,r,o,i=1){const n=t.typedBuffer,a=t.typedBufferStride;if(o*=a,1===i)for(let t=0;t<r;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=a;else for(let t=0;t<r;++t)for(let t=0;t<i;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=a}function It(e,t,r,o,i,n){switch(e){case ie.r.POSITION:{(0,U.vA)(3===t.size);const o=i.getField(e,f.xs);(0,U.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,o,i=1){if(!t)return void Ct(e,r,o,i);const{data:n,indices:a}=e,l=r.typedBuffer,c=r.typedBufferStride,d=a.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],b=t[13],y=t[14];o*=c;let A=0,E=0,S=0;const w=(0,s.tZ)(t)?e=>{A=n[e]+T,E=n[e+1]+b,S=n[e+2]+y}:e=>{const t=n[e],r=n[e+1],o=n[e+2];A=u*t+f*r+g*o+T,E=h*t+p*r+_*o+b,S=m*t+v*r+x*o+y};if(1===i)for(let e=0;e<d;++e)w(3*a[e]),l[o]=A,l[o+1]=E,l[o+2]=S,o+=c;else for(let e=0;e<d;++e){w(3*a[e]);for(let e=0;e<i;++e)l[o]=A,l[o+1]=E,l[o+2]=S,o+=c}}(t,r,o,n);break}case ie.r.NORMAL:{(0,U.vA)(3===t.size);const r=i.getField(e,f.xs);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,o,i=1){if(!t)return void Ct(e,r,o,i);const{data:n,indices:a}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=a.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],b=!(0,s.ut)(l),y=1e-6,A=1-y;o*=d;let E=0,S=0,w=0;const M=(0,s.tZ)(l)?e=>{E=n[e],S=n[e+1],w=n[e+2]}:e=>{const t=n[e],r=n[e+1],o=n[e+2];E=h*t+p*r+_*o,S=m*t+v*r+x*o,w=f*t+g*r+T*o};if(1===i)if(b)for(let e=0;e<u;++e){M(3*a[e]);const t=E*E+S*S+w*w;if(t<A&&t>y){const e=1/Math.sqrt(t);c[o]=E*e,c[o+1]=S*e,c[o+2]=w*e}else c[o]=E,c[o+1]=S,c[o+2]=w;o+=d}else for(let e=0;e<u;++e)M(3*a[e]),c[o]=E,c[o+1]=S,c[o+2]=w,o+=d;else for(let e=0;e<u;++e){if(M(3*a[e]),b){const e=E*E+S*S+w*w;if(e<A&&e>y){const t=1/Math.sqrt(e);E*=t,S*=t,w*=t}}for(let e=0;e<i;++e)c[o]=E,c[o+1]=S,c[o+2]=w,o+=d}}(t,o,r,n);break}case ie.r.NORMALCOMPRESSED:{(0,U.vA)(2===t.size);const r=i.getField(e,f.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Mt(t,r,n);break}case ie.r.UV0:{(0,U.vA)(2===t.size);const r=i.getField(e,f.gH);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Mt(t,r,n);break}case ie.r.COLOR:case ie.r.SYMBOLCOLOR:{const r=i.getField(e,f.XP);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,o,i=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(o*=l,t!==n.length||4!==t)if(1!==i)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<i;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<i;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}}else{s[o]=n[0],s[o+1]=n[1],s[o+2]=n[2],s[o+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[o/=4];o+=t;const d=c*i;for(let r=1;r<d;++r)e[o]=a,o+=t}}(t,t.size,r,n);break}case ie.r.COLORFEATUREATTRIBUTE:{const r=i.getField(e,f.Y$);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:o,indices:i}=e,n=t.typedBuffer,a=t.typedBufferStride,s=i.length,l=o[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,n);break}case ie.r.TANGENT:{(0,U.vA)(4===t.size);const o=i.getField(e,f.Eq);(0,U.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,o,i=1){if(!t)return void Ot(e,r,o,i);const{data:n,indices:a}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=a.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],b=!(0,s.ut)(l),y=1e-6,A=1-y;if(o*=d,1===i)for(let e=0;e<u;++e){const t=4*a[e],r=n[t],i=n[t+1],s=n[t+2],l=n[t+3];let u=h*r+p*i+_*s,E=m*r+v*i+x*s,S=f*r+g*i+T*s;if(b){const e=u*u+E*E+S*S;if(e<A&&e>y){const t=1/Math.sqrt(e);u*=t,E*=t,S*=t}}c[o]=u,c[o+1]=E,c[o+2]=S,c[o+3]=l,o+=d}else for(let e=0;e<u;++e){const t=4*a[e],r=n[t],s=n[t+1],l=n[t+2],u=n[t+3];let E=h*r+p*s+_*l,S=m*r+v*s+x*l,w=f*r+g*s+T*l;if(b){const e=E*E+S*S+w*w;if(e<A&&e>y){const t=1/Math.sqrt(e);E*=t,S*=t,w*=t}}for(let e=0;e<i;++e)c[o]=E,c[o+1]=S,c[o+2]=w,c[o+3]=u,o+=d}}(t,r,o,n);break}case ie.r.PROFILERIGHT:case ie.r.PROFILEUP:case ie.r.PROFILEVERTEXANDNORMAL:case ie.r.FEATUREVALUE:{(0,U.vA)(4===t.size);const r=i.getField(e,f.Eq);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Ot(t,r,n)}}}class Nt{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(ie.r.POSITION).indices.length}write(e,t,r,o,i){!function(e,t,r,o,i,n){for(const a of t.fields.keys()){const t=e.attributes.get(a),s=t?.indices;if(t&&s)It(a,t,r,o,i,n);else if(a===ie.r.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(ie.r.POSITION)?.indices;if(t){const r=t.length,o=i.getField(a,f.XP);Rt(e.objectAndLayerIdColor,o,r,n)}}}}(r,this.vertexBufferLayout,e,t,o,i)}}var Lt=r(19245),Pt=r(91829),Ht=r(53466),Dt=r(72824),Bt=r(35093),Ft=r(97220),zt=r(84867),Vt=r(39341),Gt=r(34886);pe.MT.LESS,pe.MT.ALWAYS;const Ut={mask:255},Wt={function:{func:pe.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:pe.eA.KEEP,zFail:pe.eA.KEEP,zPass:pe.eA.ZERO}},jt={function:{func:pe.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:pe.eA.KEEP,zFail:pe.eA.KEEP,zPass:pe.eA.REPLACE}};pe.MT.EQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,pe.eA.KEEP,pe.eA.KEEP,pe.eA.KEEP,pe.MT.NOTEQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,pe.eA.KEEP,pe.eA.KEEP,pe.eA.KEEP;const qt=[1,1,.5],kt=[0,.6,.2],$t=[0,1,.2];var Yt=r(28491);class Xt extends Dt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,u.ci)(qt),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=F.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,u.fA)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ge.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,u.fA)(.2,.2,.2),this.diffuse=(0,u.fA)(.8,.8,.8),this.externalColor=(0,Pt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,u.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=F.it.Less,this.textureAlphaMode=F.sf.Blend,this.textureAlphaCutoff=Bt.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=qe.m$.Occlude,this.isDecoration=!1}}Dt.gy;class Zt extends zt.w{initializeConfiguration(e,t){t.spherical=e.viewingMode===Fe.RT.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?Ht.q.Default:Ht.q.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,Zt.shader)}_initializeProgram(e,t){return new Gt.B(e.rctx,t.get().build(this.configuration),Vt.D)}_makePipeline(e,t){const r=this.configuration,o=e===ke.y.NONE,i=e===ke.y.FrontFace;return(0,$e.Ey)({blending:r.output===Ve.V.Color&&r.transparent?Ze(e):null,culling:Kt(r)?(0,$e.Xt)(r.cullFace):null,depthTest:{func:Ke(e,Jt(r.customDepthTest))},depthWrite:(o||i)&&r.writeDepth?$e.kn:null,drawBuffers:r.output===Ve.V.Depth?{buffers:[pe.Hr.NONE]}:Qe(e),colorWrite:$e.wE,stencilWrite:r.hasOccludees?Ut:null,stencilTest:r.hasOccludees?t?jt:Wt:null,polygonOffset:o||i?null:(n=r.enableOffset,n?Je:null)});var n}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function Jt(e){return e===F.it.Lequal?pe.MT.LEQUAL:pe.MT.LESS}function Kt(e){return e.cullFace!==F.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}Zt.shader=new Ft.$(Yt.D,(()=>r.e(5141).then(r.bind(r,5141))));var Qt=r(90237),er=r(99769),tr=r(82991),rr=r(46263);class or extends tr.nW{}(0,Qt._)([(0,er.W)({constValue:!0})],or.prototype,"hasSliceHighlight",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],or.prototype,"hasSliceInVertexProgram",void 0),(0,Qt._)([(0,er.W)({constValue:rr.c.Pass})],or.prototype,"pbrTextureBindType",void 0);class ir extends or{constructor(){super(...arguments),this.output=Ve.V.Color,this.alphaDiscardMode=F.sf.Opaque,this.doubleSidedMode=Ue.W.None,this.pbrMode=We.A9.Disabled,this.cullFace=F.s2.None,this.transparencyPassType=ke.y.NONE,this.normalType=Ge.W.Attribute,this.textureCoordinateType=Ht.q.None,this.customDepthTest=F.it.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,Qt._)([(0,er.W)({count:Ve.V.COUNT})],ir.prototype,"output",void 0),(0,Qt._)([(0,er.W)({count:F.sf.COUNT})],ir.prototype,"alphaDiscardMode",void 0),(0,Qt._)([(0,er.W)({count:Ue.W.COUNT})],ir.prototype,"doubleSidedMode",void 0),(0,Qt._)([(0,er.W)({count:We.A9.COUNT})],ir.prototype,"pbrMode",void 0),(0,Qt._)([(0,er.W)({count:F.s2.COUNT})],ir.prototype,"cullFace",void 0),(0,Qt._)([(0,er.W)({count:ke.y.COUNT})],ir.prototype,"transparencyPassType",void 0),(0,Qt._)([(0,er.W)({count:Ge.W.COUNT})],ir.prototype,"normalType",void 0),(0,Qt._)([(0,er.W)({count:Ht.q.COUNT})],ir.prototype,"textureCoordinateType",void 0),(0,Qt._)([(0,er.W)({count:F.it.COUNT})],ir.prototype,"customDepthTest",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"spherical",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVertexColors",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSymbolColors",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVerticalOffset",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSlicePlane",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSliceHighlight",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasColorTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasMetallicRoughnessTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasEmissionTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOcclusionTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasNormalTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasScreenSizePerspective",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVertexTangents",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOccludees",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"multipassEnabled",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasModelTransformation",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"offsetBackfaces",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"vvSize",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"vvColor",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"receiveShadows",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"receiveAmbientOcclusion",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"textureAlphaPremultiplied",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instanced",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instancedColor",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"objectAndLayerIdColorInstanced",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instancedDoublePrecision",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"writeDepth",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"transparent",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"enableOffset",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"cullAboveGround",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"snowCover",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasColorTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasEmissionTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasNormalTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOcclusionTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"occlusionPass",void 0),(0,Qt._)([(0,er.W)({constValue:!0})],ir.prototype,"hasVvInstancing",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"useCustomDTRExponentForWater",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"supportsTextureAtlas",void 0),(0,Qt._)([(0,er.W)({constValue:!0})],ir.prototype,"useFillLights",void 0);var nr=r(57323);class ar extends Zt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ge.W.Attribute,t.doubleSidedMode=Ue.W.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,ar.shader)}}ar.shader=new Ft.$(nr.R,(()=>r.e(9933).then(r.bind(r,39933))));class sr extends qe.im{constructor(e){super(e,cr),this.supportsEdges=!0,this.produces=new Map([[gt.OPAQUE_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&!this.parameters.transparent],[gt.TRANSPARENT_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[gt.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new ir,this._vertexBufferLayout=function(e){const t=(0,ze.BP)().vec3f(ie.r.POSITION);return e.normalType===Ge.W.Compressed?t.vec2i16(ie.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(ie.r.NORMAL),e.hasVertexTangents&&t.vec4f(ie.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(ie.r.UV0),e.hasVertexColors&&t.vec4u8(ie.r.COLOR),e.hasSymbolColors&&t.vec4u8(ie.r.SYMBOLCOLOR),(0,ae.A)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(ie.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==Ve.V.Shadow&&e!==Ve.V.ShadowExcludeHighlight&&e!==Ve.V.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:o,vvColor:i}=e,n="replace"===e.colorMixMode,a=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||i||o;return r&&l?n||a:r?n?s:a:l?n||a:n?s:a}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?F.s2.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e===Ve.V.Color&&(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=Ue.W.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?Ue.W.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?Ue.W.WindingOrder:Ue.W.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?We.A9.Schematic:We.A9.Normal:We.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,o,i,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.s)(pr,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case Fe.RT.Global:n=(0,d.n)(mr,pr);break;case Fe.RT.Local:n=(0,d.c)(mr,hr)}let a=0;const s=(0,d.f)(vr,pr,e.eye),l=(0,d.l)(s),c=(0,d.j)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,d.m)(n,c)),a+=(0,Lt.kE)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,d.j)(n,n,a),(0,d.t)(fr,n,r.transform.inverseRotation),o=(0,d.f)(dr,o,fr),i=(0,d.f)(ur,i,fr)}var a;rt(e,r,o,i,null!=(a=r.verticalOffset)?(bt.offset=a,bt):null,n)}createGLMaterial(e){return new lr(e)}createBufferWriter(){return new Nt(this._vertexBufferLayout)}}class lr extends je.m{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output===Ve.V.Color&&(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?ar:Zt,e)}}const cr=new class extends Xt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},dr=(0,u.vt)(),ur=(0,u.vt)(),hr=(0,u.fA)(0,0,1),mr=(0,u.vt)(),fr=(0,u.vt)(),pr=(0,u.vt)(),vr=(0,u.vt)(),gr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function _r(e){throw new R.A("",`Request for object resource failed: ${e}`)}function xr(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(gr().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(gr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(gr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(gr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else gr().warn("Indexed geometries must specify faces"),o=!1;break}default:gr().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(gr().warn("Geometry requires material"),o=!1);const i=e.params.vertexAttributes;for(const e in i)i[e].values||(gr().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function Tr(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function br(e){switch(e){case"mask":return F.sf.Mask;case"maskAndTransparency":return F.sf.MaskBlend;case"none":return F.sf.Opaque;default:return F.sf.Blend}}function yr(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ar=new P.R(1,2,"wosr");var Er=r(61765);async function Sr(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const o=await(0,C.Ke)(t.request(e,"json",r));if(!0===o.ok)return o.value;(0,L.QP)(o.error),_r(o.error.details.url)}(e,r,t);const o=await(0,C.Ke)((0,M.A)(e,t));if(!0===o.ok)return o.value.data;(0,L.QP)(o.error),_r(o.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const i=e[o],n=i.images[0].data;if(!n){gr().warn("Externally referenced texture data is not yet supported");continue}const a=i.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===i.channels?i.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:pe.pF.REPEAT,t:pe.pF.REPEAT},preMultiplyAlpha:br(l)!==F.sf.Opaque},d=t?.disableTextures?Promise.resolve(null):D(a,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const o=await Promise.all(r),i={};for(const e of o)i[e.refId]=e;return i}(r.textureDefinitions??{},t);let i=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];i+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:o,size:i+(0,O.iL)(r)}}(a.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,i=new Array,n=new N,a=e.resource,s=P.R.parse(a.version||"1.0","wosr");Ar.validate(s);const l=a.model.name,c=a.model.geometries,d=a.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!xr(a))continue;const s=yr(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[ie.r.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,H.tM)(_);p.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new He(e,t);o.push(r),f.set(x,r)}const b=f.get(x),y=b?b.id:void 0,A=s.material;let E=n.get(A,x);if(null==E){const e=d[A.substring(A.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,o=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,i=T?br(T.alphaChannelUsage):void 0,a={ambient:(0,u.ci)(e.diffuse),diffuse:(0,u.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:o,textureAlphaMode:i,textureAlphaCutoff:.33,textureId:y,initTextureTransparent:!0,doubleSided:!0,cullFace:F.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(a,t.materialParameters),E=new sr(a),n.set(A,x,E)}i.push(E);const S=new ne(E,p);m+=p.find((e=>e[0]===ie.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:o,materials:i,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Tr(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let A;if(t.cache)A=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));A=await e(new T.R(t.streamDataRequester),a.url,t,t.usePBR)}const S=A.model.meta?.ESRI_proxyEllipsoid,R=A.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===A.meta.ESRI_webstyle;R&&!A.customMeta.esriTreeRendering&&(A.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const i of o.parts){const o=i.attributes.normal;if(null==o)return;const n=i.attributes.position,a=n.count,c=(0,u.vt)(),h=(0,u.vt)(),m=(0,u.vt)(),p=new Uint8Array(4*a),v=new Float64Array(3*a),g=(0,s.B8)((0,l.vt)(),i.transform);let _=0,x=0;for(let s=0;s<a;s++){n.getVec(s,h),o.getVec(s,c),(0,d.h)(h,h,i.transform),(0,d.f)(m,h,t.center),(0,d.D)(m,m,t.radius);const a=m[2],l=(0,d.l)(m),u=Math.min(.45+.55*l*l,1);(0,d.D)(m,m,t.radius),null!==g&&(0,d.h)(m,m,g),(0,d.n)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.o)(m,m,c,a>-1?.2:Math.min(-4*a-3.8,1)),v[_]=m[0],v[_+1]=m[1],v[_+2]=m[2],_+=3,p[x]=255*u,p[x+1]=255*u,p[x+2]=255*u,p[x+3]=255,x+=4}i.attributes.normal=new f.xs(v),i.attributes.color=new f.XP(p)}}}(A,S));const I=!!t.usePBR,z=A.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:R,mrrFactors:[...$t]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...qt]},V={...t.materialParameters,treeRendering:R},{engineResources:G,referenceBoundingBox:U}=function(e,t,r,o){const a=e.model,s=new Array,l=new Map,T=new Map,A=a.lods.length,S=(0,h.Ie)();return a.lods.forEach(((e,M)=>{const C=!0===o.skipHighLods&&(A>1&&0===M||A>3&&1===M)||!1===o.skipHighLods&&null!=o.singleLodIndex&&M!==o.singleLodIndex;if(C&&0!==M)return;const O=new w(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const o=C?new sr({}):function(e,t,r,o,i,n,a){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),l=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==l)return null;const f=function(e){switch(e){case"BLEND":return F.sf.Blend;case"MASK":return F.sf.Mask;case"OPAQUE":case null:case void 0:return F.sf.Opaque}}(l.alphaMode);if(!n.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(null!=o){const e=o.data;a.set(t,new He((0,y.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&r,encoding:(0,y.x3)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(l.textureColor,f!==F.sf.Opaque),t(l.textureNormal),t(l.textureOcclusion),t(l.textureEmissive),t(l.textureMetallicRoughness)}const r=l.color[0]**(1/Er.T),p=l.color[1]**(1/Er.T),v=l.color[2]**(1/Er.T),g=l.emissiveFactor[0]**(1/Er.T),_=l.emissiveFactor[1]**(1/Er.T),x=l.emissiveFactor[2]**(1/Er.T),T=null!=l.textureColor&&h?a.get(l.textureColor):null,b=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:i,emissiveFactor:n,occlusionTexture:a}){return null==e&&null==t&&null==i&&(null==n||(0,d.e)(n,u.uY))&&null==a&&(null==o||1===o)&&(null==r||1===r)}({normalTexture:l.textureNormal,metallicRoughnessTexture:l.textureMetallicRoughness,metallicFactor:l.metallicFactor,roughnessFactor:l.roughnessFactor,emissiveTexture:l.textureEmissive,emissiveFactor:l.emissiveFactor,occlusionTexture:l.textureOcclusion}),A=null!=l.normalTextureTransform?.scale?l.normalTextureTransform?.scale:c.Un;n.set(s,new sr({...o,transparent:f===F.sf.Blend,customDepthTest:F.it.Lequal,textureAlphaMode:f,textureAlphaCutoff:l.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:l.opacity,doubleSided:l.doubleSided,doubleSidedType:"winding-order",cullFace:l.doubleSided?F.s2.None:F.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ge.W.Attribute:Ge.W.ScreenDerivative,castShadows:!0,receiveShadows:l.receiveShadows,receiveAmbientOcclusion:l.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:l.colorMixMode,normalTextureId:null!=l.textureNormal&&h?a.get(l.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=l.textureOcclusion&&h?a.get(l.textureOcclusion).id:void 0,emissiveTextureId:null!=l.textureEmissive&&h?a.get(l.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=l.textureMetallicRoughness&&h?a.get(l.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:b?[...kt]:[l.metallicFactor,l.roughnessFactor,o.mrrFactors[2]],isSchematic:b,colorTextureTransformMatrix:E(l.colorTextureTransform),normalTextureTransformMatrix:E(l.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:E(l.occlusionTextureTransform),emissiveTextureTransformMatrix:E(l.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:E(l.metallicRoughnessTextureTransform),...i}))}const p=n.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(l.textureColor),e(l.textureNormal),e(l.textureOcclusion),e(l.textureEmissive),e(l.textureMetallicRoughness)}return p}(a,e,O,t,r,l,T),{geometry:s,vertexCount:A}=function(e,t){const r=e.attributes.position.count,o=(0,b.x)(e.indices||r,e.primitiveType),a=(0,m.oe)(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,p.a)(a,s,e.transform,3,l);const c=[[ie.r.POSITION,new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=(0,m.oe)(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,n.Ge)(wr,e.transform),(0,p.t)(t,a,wr,3,s),(0,i.or)(wr)&&(0,p.n)(t,t),c.push([ie.r.NORMAL,new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=(0,m.oe)(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,n.z0)(wr,e.transform),(0,v.t)(t,a,wr,4,s),(0,i.or)(wr)&&(0,p.n)(t,t,4),c.push([ie.r.TANGENT,new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,m.oe)(2*r),{typedBuffer:i,typedBufferStride:n}=e.attributes.texCoord0;(0,g.a)(t,i,2,n),c.push([ie.r.UV0,new B.n(t,o,2,!0)])}const d=e.attributes.color;if(null!=d){const t=new Uint8Array(4*r);4===d.elementCount?d instanceof f.Eq?(0,v.b)(t,d,255):d instanceof f.XP?(0,x.a)(t,d):d instanceof f.Uz&&(0,v.b)(t,d,1/256):(t.fill(255),d instanceof f.xs?(0,p.f)(t,d.typedBuffer,255,4,d.typedBufferStride):e.attributes.color instanceof f.eI?(0,_.c)(t,d.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof f.nS&&(0,p.f)(t,d.typedBuffer,1/256,4,d.typedBufferStride)),c.push([ie.r.COLOR,new B.n(t,o,4,!0)])}return{geometry:new ne(t,c),vertexCount:r}}(e,null!=o?o:new sr({})),w=s.boundingInfo;null!=w&&0===M&&((0,h.iT)(S,w.bbMin),(0,h.iT)(S,w.bbMax)),null!=o&&(O.stageResources.geometries.push(s),O.numberOfVertices+=A)})),C||s.push(O)})),{engineResources:s,referenceBoundingBox:S}}(A,z,V,t.skipHighLods&&null==a.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:a.specifiedLodIndex});return{lods:G,referenceBoundingBox:U,isEsriSymbolResource:A.meta.isEsriSymbolResource,isWosr:!1}}const wr=(0,a.vt)()},66104:(e,t,r)=>{var o,i;r.d(t,{k5:()=>o}),r(34727),(i=o||(o={}))[i.Multiply=1]="Multiply",i[i.Ignore=2]="Ignore",i[i.Replace=3]="Replace",i[i.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>n});var o=r(66104),i=r(2597);function n(e){e.vertex.code.add(i.H`
263
+ `),e}const f=Object.freeze(Object.defineProperty({__proto__:null,build:m},Symbol.toStringTag,{value:"Module"}))},76412:(e,t,r)=>{r.d(t,{a:()=>_,b:()=>x,c:()=>p,f:()=>b,g:()=>T,j:()=>w,n:()=>L}),r(44208),r(53966);var o=r(34727),i=r(58083),n=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(34304),d=r(88582),u=r(71351),h=r(44280),m=r(32114);const f=p();function p(){return(0,l.vt)()}const v=s.e,g=s.e;function _(e,t){return(0,s.c)(t,e)}function x(e){return e[3]}function T(e){return e}function b(e,t,r,o){return(0,l.fA)(e,t,r,o)}function y(e,t,r){if(null==t)return!1;if(!E(e,t,A))return!1;let{t0:o,t1:i}=A;if((o<0||i<o&&i>0)&&(o=i),o<0)return!1;if(r){const{origin:e,direction:i}=t;r[0]=e[0]+i[0]*o,r[1]=e[1]+i[1]*o,r[2]=e[2]+i[2]*o}return!0}const A={t0:0,t1:0};function E(e,t,r){const{origin:o,direction:i}=t,n=S;n[0]=o[0]-e[0],n[1]=o[1]-e[1],n[2]=o[2]-e[2];const a=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===a)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),l=s*s-4*a*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*a),r.t1=(-s+c)/(2*a),!0}const S=(0,a.vt)();function w(e,t){return y(e,t,null)}function M(e,t,r){const o=m.rq.get(),a=m.Rc.get();(0,n.b)(o,t.origin,t.direction);const s=x(e);(0,n.b)(r,o,t.origin),(0,n.j)(r,r,1/(0,n.l)(r)*s);const l=O(e,t.origin),c=(0,h.g7)(t.origin,r);return(0,i.$0)(a,c+l,o),(0,n.h)(r,r,a),r}function C(e,t,r){const o=(0,n.f)(m.rq.get(),t,e),i=(0,n.j)(m.rq.get(),o,e[3]/(0,n.l)(o));return(0,n.g)(r,i,e)}function O(e,t){const r=(0,n.f)(m.rq.get(),t,e),i=(0,n.l)(r),a=x(e),s=a+Math.abs(a-i);return(0,o.XM)(a/s)}const R=(0,a.vt)();function I(e,t,r,i){const a=(0,n.f)(R,t,e);switch(r){case d._.X:{const e=(0,o.jU)(a,R)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case d._.Y:{const e=(0,o.jU)(a,R),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case d._.Z:return(0,n.n)(i,a);default:return}}function N(e,t){const r=(0,n.f)(P,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),o=x(e);return r<=o*o}const P=(0,a.vt)(),H=p();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:f,altitudeAt:N,angleToSilhouette:O,axisAt:I,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return y(e,t,r)?r:((0,u.oC)(t,e,r),C(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:_,create:p,distanceToSilhouette:function(e,t){const r=(0,n.f)(m.rq.get(),t,e),o=(0,n.q)(r),i=e[3]*e[3];return Math.sqrt(Math.abs(o-i))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:g,exactEquals:v,fromCenterAndRadius:function(e,t){return(0,l.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:T,getRadius:x,intersectLine:function(e,t,r){const o=(0,u.Cr)(t,r);if(!E(e,o,A))return[];const{origin:i,direction:s}=o,{t0:l,t1:d}=A,h=t=>{const r=(0,a.vt)();return(0,n.r)(r,i,s,t),C(e,r,r)};return Math.abs(l-d)<(0,c.FD)()?[h(l)]:[h(l),h(d)]},intersectRay:y,intersectRayClosestSilhouette:function(e,t,r){if(y(e,t,r))return r;const o=M(e,t,m.rq.get());return(0,n.g)(r,t.origin,(0,n.j)(m.rq.get(),t.direction,(0,n.p)(t.origin,o)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:C,setAltitudeAt:function(e,t,r,o){const i=N(e,t),a=I(e,t,d._.Z,P),s=(0,n.j)(P,a,r-i);return(0,n.g)(o,t,s)},setExtent:function(e,t,r){return e!==r&&_(e,r),r},tmpSphere:H,union:function(e,t,r=(0,l.vt)()){const o=(0,n.p)(e,t),i=e[3],a=t[3];return o+a<i?((0,s.c)(r,e),r):o+i<a?((0,s.c)(r,t),r):((0,n.o)(r,e,t,(o+a-i)/(2*o)),r[3]=(o+i+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>n,f:()=>a,n:()=>i});var o=r(34275);function i(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,i=r){const n=t.length/2;let a=0,s=0;if((0,o.cy)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=i;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=i;else for(let o=0;o<n;++o)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=i}function a(e,t,r,o){const i=e.typedBuffer,n=e.typedBufferStride,a=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<a;++e)i[s]=t,i[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:n,normalizeIntegerBufferView:i},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{function o(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return e;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[4],d=r[5],u=r[6],h=r[8],m=r[9],f=r[10],p=r[12],v=r[13],g=r[14];let _=0,x=0;for(let r=0;r<n;r++){const r=t[_],n=t[_+1],T=t[_+2];e[x]=a*r+c*n+h*T+p,e[x+1]=s*r+d*n+m*T+v,e[x+2]=l*r+u*n+f*T+g,_+=i,x+=o}return e}function n(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],m=r[7],f=r[8];let p=0,v=0;for(let r=0;r<n;r++){const r=t[p],n=t[p+1],g=t[p+2];e[v]=a*r+c*n+h*g,e[v+1]=s*r+d*n+m*g,e[v+2]=l*r+u*n+f*g,p+=i,v+=o}}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,i=o){const n=Math.min(e.length/o,t.length/i);let a=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=i,s+=o;return e}function c(e,t,r,o=3,i=o){const n=e.length/o;if(n!==Math.ceil(t.length/i))return e;let a=0,s=0;for(let l=0;l<n;l++)e[s]=t[a]+r[0],e[s+1]=t[a+1]+r[1],e[s+2]=t[a+2]+r[2],a+=i,s+=o;return e}function d(e,t){u(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r=3,o=r){const i=Math.min(e.length/r,t.length/o);let n=0,a=0;for(let s=0;s<i;s++){const i=t[n],s=t[n+1],l=t[n+2],c=i*i+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*i,e[a+1]=t*s,e[a+2]=t*l}n+=o,a+=r}}r.d(t,{a:()=>i,b:()=>c,c:()=>n,d:()=>o,e:()=>d,f:()=>l,n:()=>u,s:()=>s,t:()=>a}),r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,normalize:u,normalizeView:d,scale:l,scaleView:s,shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)i[c]=a[l]>>r,i[c+1]=a[l+1]>>r,i[c+2]=a[l+2]>>r,l+=s,c+=n},transformMat3:a,transformMat3View:n,transformMat4:i,transformMat4View:o,translate:c},Symbol.toStringTag,{value:"Module"}))},51737:(e,t,r)=>{function o(e,t){i(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r=3,o=r){const i=t.length/o;let n=0,a=0;for(let s=0;s<i;++s)e[n]=t[a],e[n+1]=t[a+1],e[n+2]=t[a+2],n+=r,a+=o}function n(e,t,r,o,i){const n=e.typedBuffer,a=e.typedBufferStride,s=i?.count??e.count;let l=(i?.dstIndex??0)*a;for(let e=0;e<s;++e)n[l]=t,n[l+1]=r,n[l+2]=o,l+=a}r.d(t,{a:()=>o,c:()=>i,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:i,copyView:o,fill:n},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>i,b:()=>l,n:()=>a,s:()=>s,t:()=>n}),r(44208);var o=r(53966);function i(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,o=4,i=o){if(e.length/o!=t.length/i)return;const n=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],m=r[7],f=r[8];let p=0,v=0;for(let r=0;r<n;r++){const r=t[p],n=t[p+1],g=t[p+2],_=t[p+3];e[v]=a*r+c*n+h*g,e[v+1]=s*r+d*n+m*g,e[v+2]=l*r+u*n+f*g,e[v+3]=_,p+=i,v+=o}}function a(e,t){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,n=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*i,r=e*a,s=n[r],l=n[r+1],c=n[r+2],d=s*s+l*l+c*c;if(d>0){const e=1/Math.sqrt(d);o[t]=e*s,o[t+1]=e*l,o[t+2]=e*c}}}function s(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,o=4){const i=Math.min(e.length/o,t.count),n=t.typedBuffer,a=t.typedBufferStride;let s=0,l=0;for(let t=0;t<i;t++)e[l]=r*n[s],e[l+1]=r*n[s+1],e[l+2]=r*n[s+2],e[l+3]=r*n[s+3],s+=a,l+=o}Object.freeze(Object.defineProperty({__proto__:null,normalize:a,scale:l,scaleView:s,transformMat3:n,transformMat3View:i,transformMat4:function(e,t,r,i=4,n=i){if(e.length/i!=t.length/n)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=e.length/i,s=r[0],l=r[1],c=r[2],d=r[3],u=r[4],h=r[5],m=r[6],f=r[7],p=r[8],v=r[9],g=r[10],_=r[11],x=r[12],T=r[13],b=r[14],y=r[15];let A=0,E=0;for(let r=0;r<a;r++){const r=t[A],o=t[A+1],a=t[A+2],S=t[A+3];e[E]=s*r+u*o+p*a+x*S,e[E+1]=l*r+h*o+v*a+T*S,e[E+2]=c*r+m*o+g*a+b*S,e[E+3]=d*r+f*o+_*a+y*S,A+=n,E+=i}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const o=e.count,i=r[0],n=r[1],a=r[2],s=r[3],l=r[4],c=r[5],d=r[6],u=r[7],h=r[8],m=r[9],f=r[10],p=r[11],v=r[12],g=r[13],_=r[14],x=r[15],T=e.typedBuffer,b=e.typedBufferStride,y=t.typedBuffer,A=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*b,r=e*A,o=y[r],E=y[r+1],S=y[r+2],w=y[r+3];T[t]=i*o+l*E+h*S+v*w,T[t+1]=n*o+c*E+m*S+g*w,T[t+2]=a*o+d*E+f*S+_*w,T[t+3]=s*o+u*E+p*S+x*w}}},Symbol.toStringTag,{value:"Module"}))},78358:(e,t,r)=>{function o(e,t){i(e.typedBuffer,t,e.typedBufferStride)}function i(e,t,r=4){const o=t.typedBuffer,i=t.typedBufferStride,n=t.count;let a=0,s=0;for(let t=0;t<n;++t)e[a]=o[s],e[a+1]=o[s+1],e[a+2]=o[s+2],e[a+3]=o[s+3],a+=r,s+=i}function n(e,t,r,o,i,n){const a=e.typedBuffer,s=e.typedBufferStride,l=n?.count??e.count;let c=(n?.dstIndex??0)*s;for(let e=0;e<l;++e)a[c]=t,a[c+1]=r,a[c+2]=o,a[c+3]=i,c+=s}r.d(t,{a:()=>i,c:()=>o,f:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:i,copyView:o,fill:n},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>i});var o=r(26390);class i{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*n);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,n));e++)this._items.push(this._allocator())}}const n=1024},46140:(e,t,r)=>{r.d(t,{R:()=>i});var o=r(49186);let i=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[i,n]=t.split("."),a=/^\s*\d+\s*$/;if(!i?.match||!a.test(i))throw new o.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new o.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(i,10),l=parseInt(n,10);return new e(s,l,r)}}},61473:(e,t,r)=>{function o(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function i(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{EM:()=>i,b5:()=>o});const n=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,a,/^jsapps\.esri\.com$/,s,l]},11964:(e,t,r)=>{r.d(t,{Cr:()=>c,_I:()=>d,vt:()=>l});var o=r(34727),i=r(4341),n=r(38954),a=r(51850),s=r(32114);function l(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function c(e,t,r=l()){return(0,n.c)(r.origin,e),(0,n.f)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,i,a){const{vector:l,origin:c}=e,d=(0,n.f)(s.rq.get(),t,c),u=(0,n.m)(l,d)/(0,n.q)(l);return(0,n.j)(a,l,(0,o.qE)(u,0,1)),(0,n.g)(a,a,e.origin)}(e,t,0,0,r)}(0,a.vt)(),(0,a.vt)(),new i.I((()=>l()))},71351:(e,t,r)=>{r.d(t,{Cr:()=>c,LV:()=>l,oC:()=>d,vt:()=>a}),r(4576);var o=r(4341),i=r(38954),n=r(51850);function a(e){return e?s((0,n.o8)(e.origin),(0,n.o8)(e.direction)):s((0,n.vt)(),(0,n.vt)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=a()){return(0,i.c)(r.origin,e),(0,i.f)(r.direction,t,e),r}function d(e,t,r){const o=(0,i.m)(e.direction,(0,i.f)(r,t,e.origin));return(0,i.g)(r,e.origin,(0,i.j)(r,e.direction,o)),r}r(32114);const u=new o.I((()=>a()));(0,n.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>l});var o=r(78888),i=r(60999),n=r(49186),a=r(74887),s=r(84952);class l{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,o.A)(t,{responseType:c[e]})).data;const s=await(0,i.Ke)(this._streamDataRequester.request(t,e,r));if(!0===s.ok)return s.value;throw(0,a.QP)(s.error),new n.A("",`Request for resource failed: ${s.error}`)}}const c={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var o=r(34275),i=r(97146),n=r(63907);function a(e,t){switch(t){case n.WR.TRIANGLES:return"number"==typeof(r=e)?(0,i.tM)(r):(0,o.mg)(r)?new Uint16Array(r):r;case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,i.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let i=0;i<r;i+=1)i%2==0?(o[t++]=e[i],o[t++]=e[i+1],o[t++]=e[i+2]):(o[t++]=e[i+1],o[t++]=e[i],o[t++]=e[i+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const i=e[0];let n=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];o[a++]=i,o[a++]=n,o[a++]=r,n=r}return o}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>l,x3:()=>a});var o=r(44208),i=r(89192);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function a(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function l(e,t){if(t===i.JS.KTX2_ENCODING)return new n(e);const r=new Blob([e],{type:t}),a=URL.createObjectURL(r),s=new Image;if((0,o.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{i(),e(s)},o=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(a),s.removeEventListener("load",r),s.removeEventListener("error",o)};s.addEventListener("load",r),s.addEventListener("error",o),s.src=a}));try{s.src=a,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),s}},55268:(e,t,r)=>{r.d(t,{fetch:()=>Sr});var o=r(61473),i=r(34727),n=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),d=r(38954),u=r(51850),h=r(70328),m=r(11868),f=r(13030),p=r(73354),v=r(65686),g=r(43609),_=r(51737),x=r(78358),T=r(21015),b=r(84498),y=r(51530),A=r(88340);function E(e){if(null==e)return null;const t=null!=e.offset?e.offset:A.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:A.Un,i=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,a.vt)();return(0,n.lw)(c,s,l),(0,n.lw)(c,i,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class w{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var M=r(78888),C=r(60999),O=r(86805),R=r(49186),I=r(53966);class N{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)}set(e,t,r){const o=this._outer.get(e);o?o.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)}}var L=r(74887),P=r(46140),H=r(97146);async function D(e,t){const{data:r}=await(0,M.A)(e,{responseType:"image",...t});return r}var B=r(46610),F=r(89192),z=r(34275);function V(e){if(e.length<z.y9)return Array.from(e);if((0,z.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var G=r(3694),U=r(620);class W{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,U.vA)(e.length>=1),(0,U.vA)(3===r.size||4===r.size);const{data:o,size:i,indices:n}=r;(0,U.vA)(n.length%this._numIndexPerPrimitive==0),(0,U.vA)(n.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let s=i*n[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(s);const l=(0,u.fA)(o[s],o[s+1],o[s+2]),c=(0,u.o8)(l);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){s=i*n[r+e],j.push(s);let t=o[s];l[0]=Math.min(t,l[0]),c[0]=Math.max(t,c[0]),t=o[s+1],l[1]=Math.min(t,l[1]),c[1]=Math.max(t,c[1]),t=o[s+2],l[2]=Math.min(t,l[2]),c[2]=Math.max(t,c[2])}}this.bbMin=l,this.bbMax=c;const h=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(c[0]-l[0],c[1]-l[1]),c[2]-l[2]);let m=this.radius*this.radius;for(let e=0;e<j.length;++e){s=j.at(e);const t=o[s]-h[0],r=o[s+1]-h[1],i=o[s+2]-h[2],n=t*t+r*r+i*i;if(n<=m)continue;const a=Math.sqrt(n),l=.5*(a-this.radius);this.radius=this.radius+l,m=this.radius*this.radius;const c=l/a;h[0]+=t*c,h[1]+=r*c,h[2]+=i*c}this.center=h,j.clear()}getChildren(){if(this._children||(0,d.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),o=new Array(8);for(let e=0;e<8;++e)o[e]=0;const{data:i,size:n,indices:a}=this.position;for(let s=0;s<t;++s){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[s];let c=n*a[l],d=i[c],u=i[c+1],h=i[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=n*a[l+e];const t=i[c],r=i[c+1],o=i[c+2];t<d&&(d=t),r<u&&(u=r),o<h&&(h=o)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[s]=t,++o[t]}let s=0;for(let e=0;e<8;++e)o[e]>0&&++s;if(s<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=o[e]>0?new Uint32Array(o[e]):void 0;for(let e=0;e<8;++e)o[e]=0;for(let e=0;e<t;++e){const t=r[e];l[t][o[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new W(l[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new G.A({deallocator:null});var q=r(69720),k=r(96672),$=r(4341),Y=r(11964);function X(e,t,r){return(0,d.f)(Z,t,e),(0,d.f)(J,r,e),.5*(0,d.l)((0,d.b)(Z,Z,J))}r(32114),new $.I(Y.vt),new $.I((()=>{return e?{p0:(0,u.o8)(e.p0),p1:(0,u.o8)(e.p1),p2:(0,u.o8)(e.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var e}));const Z=(0,u.vt)(),J=(0,u.vt)(),K=(0,u.vt)(),Q=(0,u.vt)(),ee=(0,u.vt)(),te=(0,u.vt)();var re=r(24326);class oe{constructor(e){this.channel=e,this.id=(0,re.c)()}}var ie=r(46540);r(28449),(0,u.vt)(),new Float32Array(6);class ne extends q.J{constructor(e,t,r=null,o=k.X.Mesh,i=null,n=-1){super(),this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=i,this.edgeIndicesLength=n,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,H.Dg)(r.indices)}),e===ie.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:V(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r&&this._attributes.set(e,{...r,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===k.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===k.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,d.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:i}=e;(0,d.s)(t,0,0,0),(0,d.s)(te,0,0,0);let n=0,a=0;for(let e=0;e<i.length-2;e+=3){const s=i[e]*r,l=i[e+1]*r,c=i[e+2]*r;(0,d.s)(K,o[s],o[s+1],o[s+2]),(0,d.s)(Q,o[l],o[l+1],o[l+2]),(0,d.s)(ee,o[c],o[c+1],o[c+2]);const u=X(K,Q,ee);u?((0,d.g)(K,K,Q),(0,d.g)(K,K,ee),(0,d.j)(K,K,1/3*u),(0,d.g)(t,t,K),n+=u):((0,d.g)(te,te,K),(0,d.g)(te,te,Q),(0,d.g)(te,te,ee),a+=3)}return!(0===a&&0===n||(0!==n?((0,d.j)(t,t,1/n),0):0===a||((0,d.j)(t,te,1/a),0)))}(this.attributes.get(ie.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(ie.r.POSITION);return function(e,t,r){if(!e)return!1;(0,d.s)(r,0,0,0),(0,d.s)(te,0,0,0);let o=0,i=0;const{size:n,data:a,indices:s}=e,l=s.length-1,c=l+(t?2:0);for(let e=0;e<c;e+=2){const t=e<l?e+1:0,c=s[e<l?e:l]*n,u=s[t]*n;K[0]=a[c],K[1]=a[c+1],K[2]=a[c+2],Q[0]=a[u],Q[1]=a[u+1],Q[2]=a[u+2],(0,d.j)(K,(0,d.g)(K,K,Q),.5);const h=(0,d.F)(K,Q);h>0?((0,d.g)(r,r,(0,d.j)(K,K,h)),o+=h):0===o&&((0,d.g)(te,te,K),i++)}return 0!==o?((0,d.j)(r,r,1/o),!0):0!==i&&((0,d.j)(r,te,1/i),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:i}=e;(0,d.s)(t,0,0,0);let n=-1,a=0;for(let e=0;e<i.length;e++){const s=i[e]*r;n!==s&&(t[0]+=o[s],t[1]+=o[s+1],t[2]+=o[s+2],a++),n=s}return a>1&&(0,d.j)(t,t,1/a),a>0}(this.attributes.get(ie.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(ie.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===k.X.Mesh?3:1;(0,U.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,H.tM)(e.indices.length/t);return new W(r,t,e)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}addHighlight(){const e=new oe(F.Mg.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const r=e.filter((e=>e!==t));return 0===r.length?null:r}(this.highlights,e)}}var ae=r(44208),se=r(65529),le=r(97768),ce=r(84952),de=r(56058),ue=r(2741);let he;var me,fe;(fe=me||(me={}))[fe.ETC1_RGB=0]="ETC1_RGB",fe[fe.ETC2_RGBA=1]="ETC2_RGBA",fe[fe.BC1_RGB=2]="BC1_RGB",fe[fe.BC3_RGBA=3]="BC3_RGBA",fe[fe.BC4_R=4]="BC4_R",fe[fe.BC5_RG=5]="BC5_RG",fe[fe.BC7_M6_RGB=6]="BC7_M6_RGB",fe[fe.BC7_M5_RGBA=7]="BC7_M5_RGBA",fe[fe.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",fe[fe.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",fe[fe.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",fe[fe.ATC_RGB=11]="ATC_RGB",fe[fe.ATC_RGBA=12]="ATC_RGBA",fe[fe.FXT1_RGB=17]="FXT1_RGB",fe[fe.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",fe[fe.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",fe[fe.ETC2_EAC_R11=20]="ETC2_EAC_R11",fe[fe.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",fe[fe.RGBA32=13]="RGBA32",fe[fe.RGB565=14]="RGB565",fe[fe.BGR565=15]="BGR565",fe[fe.RGBA4444=16]="RGBA4444";var pe=r(63907),ve=r(21231),ge=r(42293);let _e=null,xe=null;async function Te(){return null==xe&&(he??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,ue.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),xe=he,_e=await xe),xe}function be(e,t,r,o,i){const n=(0,ge.IB)(t?pe.CQ.COMPRESSED_RGBA8_ETC2_EAC:pe.CQ.COMPRESSED_RGB8_ETC2),a=i&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*o*n*a)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function Ae(e){return e.getFaces()>=1&&e.isETC1S()}function Ee(e,t,r,o,i,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?o?[me.ETC2_RGBA,pe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[me.ETC1_RGB,pe.CQ.COMPRESSED_RGB8_ETC2]:c?o?[me.BC3_RGBA,pe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[me.BC1_RGB,pe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[me.RGBA32,pe.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.Cj.LINEAR,t.width=i,t.height=n,new ve.g(e,t,{type:"compressed",levels:m})}const Se=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function we(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Me=we("DXT1"),Ce=we("DXT3"),Oe=we("DXT5");function Re(e,t,r){if(e instanceof ImageData)return Re(Ie(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}function Ie(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var Ne,Le,Pe=r(67171);class He extends q.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=k.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new se.A,this._parameters={...Be,...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,ce.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,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Pe.R;return t.wrapMode=this._parameters.wrap??pe.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.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,z.mw)(e)||(0,z.mg)(e))return t.encoding===F.JS.KTX2_ENCODING?function(e,t){if(null==_e)return e.byteLength;const r=new _e.KTX2File(new Uint8Array(e)),o=Ae(r)?be(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),o}(e,!!t.mipmap):t.encoding===F.JS.BASIS_ENCODING?function(e,t){if(null==_e)return e.byteLength;const r=new _e.BasisFile(new Uint8Array(e)),o=ye(r)?be(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),o}(e,!!t.mipmap):e.byteLength;const{width:r,height:o}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?De(e):t;return(t.mipmap?4/3:1)*r*o*(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 ve.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,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&this._parameters.encoding===F.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,z.mg)(t)?this._loadFromPixelData(e,t):(0,z.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<Ne.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 o=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return Se().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Se().error("Unsupported format, must contain a FourCC code"),null;const o=r[21];let i,n;switch(o){case Me:i=8,n=pe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:i=16,n=pe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Oe:i=16,n=pe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Se().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(o)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(Se().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*i,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:n,width:c,height:d}}(r,t.hasMipmap??!1);if(null==o)throw new Error("DDS texture data is null");const{textureData:i,internalFormat:n,width:a,height:s}=o;return t.samplingMode=i.levels.length>1?pe.Cj.LINEAR_MIPMAP_LINEAR:pe.Cj.LINEAR,t.hasMipmap=i.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new ve.g(e,t,i)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_e&&(_e=await Te());const o=new _e.KTX2File(new Uint8Array(r));if(!Ae(o))return null;o.startTranscoding();const i=Ee(e,t,o.getLevels(),o.getHasAlpha(),o.getWidth(),o.getHeight(),((e,t)=>o.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>o.transcodeImage(r,e,0,0,t,0,-1,-1)));return o.close(),o.delete(),i}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_e&&(_e=await Te());const o=new _e.BasisFile(new Uint8Array(r));if(!ye(o))return null;o.startTranscoding();const i=Ee(e,t,o.getNumLevels(0),o.getHasAlpha(),o.getImageWidth(0,0),o.getImageHeight(0,0),((e,t)=>o.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>o.transcodeImage(r,0,e,t,0,0)));return o.close(),o.delete(),i}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,U.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?pe.Ab.LUMINANCE:3===this._parameters.components?pe.Ab.RGB:pe.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new ve.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const o=await D(t,{signal:r});return(0,L.Te)(r),this._loadFromImage(e,o)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const o=await(0,de.Sx)(t,t.src,!1,r);return(0,L.Te)(r),this._loadFromImage(e,o)}))}_loadFromVideoElement(e,t){return t.readyState>=Ne.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,i)=>{const n=()=>{t.removeEventListener("loadeddata",a),t.removeEventListener("error",s),(0,le.xt)(l)},a=()=>{t.readyState>=Ne.HAVE_CURRENT_DATA&&(n(),o(this._loadFromImage(e,t)))},s=e=>{n(),i(e||new R.A("Failed to load video"))};t.addEventListener("loadeddata",a),t.addEventListener("error",s);const l=(0,L.u7)(r,(()=>s((0,L.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?Ie(e):e;let o=e.width,i=e.height;do{o=Math.ceil(o/2),i=Math.ceil(i/2),r=o*i}while(r>1048576||null!=t&&(o>t||i>t));return Re(e,o,i)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const o=t/r;return Re(e,Math.round(e.width*o),Math.round(e.height*o))}(r,t)}const o=De(r);this._parameters.width=o.width,this._parameters.height=o.height;const i=this._createDescriptor(e);return i.pixelFormat=3===this._parameters.components?pe.Ab.RGB:pe.Ab.RGBA,i.width=o.width,i.height=o.height,this._glTexture=new ve.g(e,i,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const o=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(o,o),r}unload(){if(this._glTexture=(0,le.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function De(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(Le=Ne||(Ne={}))[Le.HAVE_NOTHING=0]="HAVE_NOTHING",Le[Le.HAVE_METADATA=1]="HAVE_METADATA",Le[Le.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",Le[Le.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",Le[Le.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Be={wrap:{s:pe.pF.REPEAT,t:pe.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var Fe=r(24151),ze=r(1843),Ve=r(49255),Ge=r(96336),Ue=r(62602),We=r(59469),je=r(25634),qe=r(14903),ke=r(14327),$e=r(90644);const Ye=(0,$e.p3)(pe.dn.SRC_ALPHA,pe.dn.ONE,pe.dn.ONE_MINUS_SRC_ALPHA,pe.dn.ONE_MINUS_SRC_ALPHA),Xe=(0,$e.p3)(pe.dn.ONE,pe.dn.ZERO,pe.dn.ONE,pe.dn.ONE_MINUS_SRC_ALPHA);function Ze(e){switch(e){case ke.y.NONE:return Ye;case ke.y.ColorAlpha:return Xe;case ke.y.FrontFace:case ke.y.COUNT:return null}}const Je={factor:-1,units:-2};function Ke(e,t=pe.MT.LESS){return e===ke.y.NONE||e===ke.y.FrontFace?t:pe.MT.LEQUAL}function Qe(e){return e===ke.y.ColorAlpha?{buffers:[pe.Nm.COLOR_ATTACHMENT0,pe.Nm.COLOR_ATTACHMENT1]}:null}class et{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const tt=(0,h.vt)();function rt(e,t,r,o,i,n){if(!e.visible)return;const a=(0,d.z)(pt,o,r),s=(e,t,r)=>{n(e,r,t,!1)},l=new et(!1,t.options.normalRequired);if(e.boundingInfo){(0,U.vA)(e.type===k.X.Mesh);const o=t.tolerance;it(e.boundingInfo,r,a,o,i,l,s)}else{const t=e.attributes.get(ie.r.POSITION),o=t.indices;!function(e,t,r,o,i,n,a,s,l,c){const u=t,h=vt,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,x=(v+_)%3,T=(v+(3-_))%3,b=u[x]/u[g],y=u[T]/u[g],A=1/u[g],E=at,S=st,w=lt,{normalRequired:M}=l;for(let t=r;t<o;++t){const r=3*t,o=a*i[r];(0,d.s)(h[0],n[o+0],n[o+1],n[o+2]);const l=a*i[r+1];(0,d.s)(h[1],n[l+0],n[l+1],n[l+2]);const u=a*i[r+2];(0,d.s)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.c)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.c)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.c)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.z)(E,h[0],e),(0,d.z)(S,h[1],e),(0,d.z)(w,h[2],e);const m=E[x]-b*E[g],f=E[T]-y*E[g],p=S[x]-b*S[g],v=S[T]-y*S[g],_=w[x]-b*w[g],C=w[T]-y*w[g],O=_*v-C*p,R=m*C-f*_,I=p*f-v*m;if((O<0||R<0||I<0)&&(O>0||R>0||I>0))continue;const N=O+R+I;if(0===N)continue;const L=O*(A*E[g])+R*(A*S[g])+I*(A*w[g]);if(L*Math.sign(N)<0)continue;const P=L/N;P>=0&&c(P,t,M?dt(h):null)}}(r,a,0,o.length/3,o,t.data,t.stride,i,l,s)}}const ot=(0,u.vt)();function it(e,t,r,o,i,n,a){if(null==e)return;const s=function(e,t){return(0,d.s)(t,1/e[0],1/e[1],1/e[2])}(r,ot);if((0,h.Ne)(tt,e.bbMin),(0,h.vI)(tt,e.bbMax),null!=i&&i.applyToAabb(tt),function(e,t,r,o){return function(e,t,r,o,i){const n=(e[0]-o-t[0])*r[0],a=(e[3]+o-t[0])*r[0];let s=Math.min(n,a),l=Math.max(n,a);const c=(e[1]-o-t[1])*r[1],d=(e[4]+o-t[1])*r[1];if(l=Math.min(l,Math.max(c,d)),l<0)return!1;if(s=Math.max(s,Math.min(c,d)),s>l)return!1;const u=(e[2]-o-t[2])*r[2],h=(e[5]+o-t[2])*r[2];return l=Math.min(l,Math.max(u,h)),!(l<0)&&(s=Math.max(s,Math.min(u,h)),!(s>l)&&s<1/0)}(e,t,r,o)}(tt,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>mt){const s=e.getChildren();if(void 0!==s){for(const e of s)it(e,t,r,o,i,n,a);return}}!function(e,t,r,o,i,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=a*i[r];let c=n[o],_=n[o+1],x=n[o+2];const T=a*i[r+1];let b=n[T],y=n[T+1],A=n[T+2];const E=a*i[r+2];let S=n[E],w=n[E+1],M=n[E+2];null!=l&&([c,_,x]=l.applyToVertex(c,_,x,e),[b,y,A]=l.applyToVertex(b,y,A,e),[S,w,M]=l.applyToVertex(S,w,M,e));const C=b-c,O=y-_,R=A-x,I=S-c,N=w-_,L=M-x,P=p*L-N*v,H=v*I-L*f,D=f*N-I*p,B=C*P+O*H+R*D;if(Math.abs(B)<=ft)continue;const F=u-c,z=h-_,V=m-x,G=F*P+z*H+V*D;if(B>0){if(G<0||G>B)continue}else if(G>0||G<B)continue;const U=z*R-O*V,W=V*C-R*F,j=F*O-C*z,q=f*U+p*W+v*j;if(B>0){if(q<0||G+q>B)continue}else if(q>0||G+q<B)continue;const k=(I*U+N*W+L*j)/B;k>=0&&d(k,t,g?ct(C,O,R,I,N,L,nt):null)}}(t,r,0,c,l.indices,l.data,l.stride,s,i,n,a)}}const nt=(0,u.vt)();const at=(0,u.vt)(),st=(0,u.vt)(),lt=(0,u.vt)();function ct(e,t,r,o,i,n,a){return(0,d.s)(ut,e,t,r),(0,d.s)(ht,o,i,n),(0,d.b)(a,ut,ht),(0,d.n)(a,a),a}function dt(e){return(0,d.z)(ut,e[1],e[0]),(0,d.z)(ht,e[2],e[0]),(0,d.b)(nt,ut,ht),(0,d.n)(nt,nt),nt}const ut=(0,u.vt)(),ht=(0,u.vt)(),mt=1e3,ft=1e-7,pt=(0,u.vt)(),vt=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()];var gt,_t;(_t=gt||(gt={}))[_t.INTEGRATED_MESH=0]="INTEGRATED_MESH",_t[_t.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",_t[_t.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",_t[_t.OPAQUE_NO_SSAO_DEPTH=3]="OPAQUE_NO_SSAO_DEPTH",_t[_t.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",_t[_t.TRANSPARENT_NO_SSAO_DEPTH=5]="TRANSPARENT_NO_SSAO_DEPTH",_t[_t.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",_t[_t.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL=7]="TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL",_t[_t.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",_t[_t.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",_t[_t.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",_t[_t.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",_t[_t.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",_t[_t.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",_t[_t.LASERLINES=14]="LASERLINES",_t[_t.LASERLINES_CONTRAST_CONTROL=15]="LASERLINES_CONTRAST_CONTROL",_t[_t.HUD_MATERIAL=16]="HUD_MATERIAL",_t[_t.LABEL_MATERIAL=17]="LABEL_MATERIAL",_t[_t.LINE_CALLOUTS=18]="LINE_CALLOUTS",_t[_t.LINE_CALLOUTS_HUD_DEPTH=19]="LINE_CALLOUTS_HUD_DEPTH",_t[_t.DRAPED_MATERIAL=20]="DRAPED_MATERIAL",_t[_t.DRAPED_WATER=21]="DRAPED_WATER",_t[_t.VIEWSHED=22]="VIEWSHED",_t[_t.VOXEL=23]="VOXEL",_t[_t.MAX_SLOTS=24]="MAX_SLOTS";var xt=r(76412),Tt=r(57005);const bt=new class{constructor(e=0){this.offset=e,this.sphere=(0,xt.c)(),this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,i=(0,d.s)(yt,e,t,r),n=(0,d.h)(i,i,o),a=this.offset/(0,d.l)(n);(0,d.r)(n,n,n,a);const s=this.objectTransform.inverse;return(0,d.h)(this.tmpVertex,n,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,d.l)(e);(0,d.r)(e,e,e,r);const o=this.offset/(0,d.l)(t);(0,d.r)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,d.l)((0,xt.g)(e)),r=this.offset/t;return(0,d.r)((0,xt.g)(this.sphere),(0,xt.g)(e),(0,xt.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,u.vt)(),this._tmpMbs=(0,xt.c)(),this._tmpObb=new Tt.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,d.l)(e)}applyToVertex(e,t,r){const o=(0,d.s)(yt,e,t,r),i=(0,d.s)(At,e,t,r+this.componentLocalOriginLength),n=this._totalOffset/(0,d.l)(i);return(0,d.r)(this._tmpVertex,o,i,n),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],o=e[1],i=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(o),d=Math.abs(i),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*n))*Math.min(l,u),p=.5*(1+Math.sign(o*a))*Math.min(c,h),v=.5*(1+Math.sign(i*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),b=Math.sign(l+r),y=Math.sign(c+o),A=Math.sign(d+i),E=Math.sign(u+n),S=Math.sign(h+a),w=Math.sign(m+s),M=this._totalOffset;if(T<M)return e[0]-=(1-b)*M,e[1]-=(1-y)*M,e[2]-=(1-A)*M,e[3]+=E*M,e[4]+=S*M,e[5]+=w*M,e;const C=M/Math.sqrt(g*g+_*_+x*x),O=M/T,R=O-C,I=-R;return e[0]+=r*(b*I+O),e[1]+=o*(y*I+O),e[2]+=i*(A*I+O),e[3]+=n*(E*R+C),e[4]+=a*(S*R+C),e[5]+=s*(w*R+C),e}applyToMbs(e){const t=(0,d.l)((0,xt.g)(e)),r=this._totalOffset/t;return(0,d.r)((0,xt.g)(this._tmpMbs),(0,xt.g)(e),(0,xt.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,Tt.gm)(e,this._totalOffset,this._totalOffset,Fe.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=(0,d.s)(yt,e,t,r),i=(0,d.g)(At,o,this.localOrigin),n=this.offset/(0,d.l)(i);return(0,d.r)(this.tmpVertex,o,i,n),this.tmpVertex}applyToAabb(e){const t=Et,r=St,o=wt;for(let i=0;i<3;++i)t[i]=e[0+i]+this.localOrigin[i],r[i]=e[3+i]+this.localOrigin[i],o[i]=t[i];const i=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=i[t],e[t+3]=i[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let i=0;i<3;++i)o[i]=e&1<<i?r[i]:t[i];n(o)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let i=0;i<3;++i)o[i]=a&1<<i?0:e&1<<i?t[i]:r[i];n(o)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const yt=(0,u.vt)(),At=(0,u.vt)(),Et=(0,u.vt)(),St=(0,u.vt)(),wt=(0,u.vt)();function Mt(e,t,r){const{data:o,indices:i}=e,n=t.typedBuffer,a=t.typedBufferStride,s=i.length;r*=a;for(let e=0;e<s;++e){const t=2*i[e];n[r]=o[t],n[r+1]=o[t+1],r+=a}}function Ct(e,t,r,o){const{data:i,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,null==o||1===o)for(let e=0;e<l;++e){const t=3*n[e];a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<o;++e)a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],r+=s}}function Ot(e,t,r,o=1){const{data:i,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=4*n[e];a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],a[r+3]=i[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<o;++e)a[r]=i[t],a[r+1]=i[t+1],a[r+2]=i[t+2],a[r+3]=i[t+3],r+=s}}function Rt(e,t,r,o,i=1){const n=t.typedBuffer,a=t.typedBufferStride;if(o*=a,1===i)for(let t=0;t<r;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=a;else for(let t=0;t<r;++t)for(let t=0;t<i;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=a}function It(e,t,r,o,i,n){switch(e){case ie.r.POSITION:{(0,U.vA)(3===t.size);const o=i.getField(e,f.xs);(0,U.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,o,i=1){if(!t)return void Ct(e,r,o,i);const{data:n,indices:a}=e,l=r.typedBuffer,c=r.typedBufferStride,d=a.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],b=t[13],y=t[14];o*=c;let A=0,E=0,S=0;const w=(0,s.tZ)(t)?e=>{A=n[e]+T,E=n[e+1]+b,S=n[e+2]+y}:e=>{const t=n[e],r=n[e+1],o=n[e+2];A=u*t+f*r+g*o+T,E=h*t+p*r+_*o+b,S=m*t+v*r+x*o+y};if(1===i)for(let e=0;e<d;++e)w(3*a[e]),l[o]=A,l[o+1]=E,l[o+2]=S,o+=c;else for(let e=0;e<d;++e){w(3*a[e]);for(let e=0;e<i;++e)l[o]=A,l[o+1]=E,l[o+2]=S,o+=c}}(t,r,o,n);break}case ie.r.NORMAL:{(0,U.vA)(3===t.size);const r=i.getField(e,f.xs);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,o,i=1){if(!t)return void Ct(e,r,o,i);const{data:n,indices:a}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=a.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],b=!(0,s.ut)(l),y=1e-6,A=1-y;o*=d;let E=0,S=0,w=0;const M=(0,s.tZ)(l)?e=>{E=n[e],S=n[e+1],w=n[e+2]}:e=>{const t=n[e],r=n[e+1],o=n[e+2];E=h*t+p*r+_*o,S=m*t+v*r+x*o,w=f*t+g*r+T*o};if(1===i)if(b)for(let e=0;e<u;++e){M(3*a[e]);const t=E*E+S*S+w*w;if(t<A&&t>y){const e=1/Math.sqrt(t);c[o]=E*e,c[o+1]=S*e,c[o+2]=w*e}else c[o]=E,c[o+1]=S,c[o+2]=w;o+=d}else for(let e=0;e<u;++e)M(3*a[e]),c[o]=E,c[o+1]=S,c[o+2]=w,o+=d;else for(let e=0;e<u;++e){if(M(3*a[e]),b){const e=E*E+S*S+w*w;if(e<A&&e>y){const t=1/Math.sqrt(e);E*=t,S*=t,w*=t}}for(let e=0;e<i;++e)c[o]=E,c[o+1]=S,c[o+2]=w,o+=d}}(t,o,r,n);break}case ie.r.NORMALCOMPRESSED:{(0,U.vA)(2===t.size);const r=i.getField(e,f.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Mt(t,r,n);break}case ie.r.UV0:{(0,U.vA)(2===t.size);const r=i.getField(e,f.gH);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Mt(t,r,n);break}case ie.r.COLOR:case ie.r.SYMBOLCOLOR:{const r=i.getField(e,f.XP);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,o,i=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(o*=l,t!==n.length||4!==t)if(1!==i)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<i;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<i;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}}else{s[o]=n[0],s[o+1]=n[1],s[o+2]=n[2],s[o+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[o/=4];o+=t;const d=c*i;for(let r=1;r<d;++r)e[o]=a,o+=t}}(t,t.size,r,n);break}case ie.r.COLORFEATUREATTRIBUTE:{const r=i.getField(e,f.Y$);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:o,indices:i}=e,n=t.typedBuffer,a=t.typedBufferStride,s=i.length,l=o[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,n);break}case ie.r.TANGENT:{(0,U.vA)(4===t.size);const o=i.getField(e,f.Eq);(0,U.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,o,i=1){if(!t)return void Ot(e,r,o,i);const{data:n,indices:a}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=a.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],b=!(0,s.ut)(l),y=1e-6,A=1-y;if(o*=d,1===i)for(let e=0;e<u;++e){const t=4*a[e],r=n[t],i=n[t+1],s=n[t+2],l=n[t+3];let u=h*r+p*i+_*s,E=m*r+v*i+x*s,S=f*r+g*i+T*s;if(b){const e=u*u+E*E+S*S;if(e<A&&e>y){const t=1/Math.sqrt(e);u*=t,E*=t,S*=t}}c[o]=u,c[o+1]=E,c[o+2]=S,c[o+3]=l,o+=d}else for(let e=0;e<u;++e){const t=4*a[e],r=n[t],s=n[t+1],l=n[t+2],u=n[t+3];let E=h*r+p*s+_*l,S=m*r+v*s+x*l,w=f*r+g*s+T*l;if(b){const e=E*E+S*S+w*w;if(e<A&&e>y){const t=1/Math.sqrt(e);E*=t,S*=t,w*=t}}for(let e=0;e<i;++e)c[o]=E,c[o+1]=S,c[o+2]=w,c[o+3]=u,o+=d}}(t,r,o,n);break}case ie.r.PROFILERIGHT:case ie.r.PROFILEUP:case ie.r.PROFILEVERTEXANDNORMAL:case ie.r.FEATUREVALUE:{(0,U.vA)(4===t.size);const r=i.getField(e,f.Eq);(0,U.vA)(!!r,`No buffer view for ${e}`),r&&Ot(t,r,n)}}}class Nt{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(ie.r.POSITION).indices.length}write(e,t,r,o,i){!function(e,t,r,o,i,n){for(const a of t.fields.keys()){const t=e.attributes.get(a),s=t?.indices;if(t&&s)It(a,t,r,o,i,n);else if(a===ie.r.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(ie.r.POSITION)?.indices;if(t){const r=t.length,o=i.getField(a,f.XP);Rt(e.objectAndLayerIdColor,o,r,n)}}}}(r,this.vertexBufferLayout,e,t,o,i)}}var Lt=r(19245),Pt=r(91829),Ht=r(53466),Dt=r(72824),Bt=r(35093),Ft=r(97220),zt=r(84867),Vt=r(39341),Gt=r(34886);pe.MT.LESS,pe.MT.ALWAYS;const Ut={mask:255},Wt={function:{func:pe.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:pe.eA.KEEP,zFail:pe.eA.KEEP,zPass:pe.eA.ZERO}},jt={function:{func:pe.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:pe.eA.KEEP,zFail:pe.eA.KEEP,zPass:pe.eA.REPLACE}};pe.MT.EQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,pe.eA.KEEP,pe.eA.KEEP,pe.eA.KEEP,pe.MT.NOTEQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,pe.eA.KEEP,pe.eA.KEEP,pe.eA.KEEP;const qt=[1,1,.5],kt=[0,.6,.2],$t=[0,1,.2];var Yt=r(28491);class Xt extends Dt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,u.ci)(qt),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=F.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,u.fA)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ge.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,u.fA)(.2,.2,.2),this.diffuse=(0,u.fA)(.8,.8,.8),this.externalColor=(0,Pt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,u.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=F.it.Less,this.textureAlphaMode=F.sf.Blend,this.textureAlphaCutoff=Bt.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=qe.m$.Occlude,this.isDecoration=!1}}Dt.gy;class Zt extends zt.w{initializeConfiguration(e,t){t.spherical=e.viewingMode===Fe.RT.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?Ht.q.Default:Ht.q.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,Zt.shader)}_initializeProgram(e,t){return new Gt.B(e.rctx,t.get().build(this.configuration),Vt.D)}_makePipeline(e,t){const r=this.configuration,o=e===ke.y.NONE,i=e===ke.y.FrontFace;return(0,$e.Ey)({blending:r.output===Ve.V.Color&&r.transparent?Ze(e):null,culling:Kt(r)?(0,$e.Xt)(r.cullFace):null,depthTest:{func:Ke(e,Jt(r.customDepthTest))},depthWrite:(o||i)&&r.writeDepth?$e.kn:null,drawBuffers:r.output===Ve.V.Depth?{buffers:[pe.Hr.NONE]}:Qe(e),colorWrite:$e.wE,stencilWrite:r.hasOccludees?Ut:null,stencilTest:r.hasOccludees?t?jt:Wt:null,polygonOffset:o||i?null:(n=r.enableOffset,n?Je:null)});var n}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function Jt(e){return e===F.it.Lequal?pe.MT.LEQUAL:pe.MT.LESS}function Kt(e){return e.cullFace!==F.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}Zt.shader=new Ft.$(Yt.D,(()=>r.e(5141).then(r.bind(r,5141))));var Qt=r(90237),er=r(99769),tr=r(82991),rr=r(46263);class or extends tr.nW{}(0,Qt._)([(0,er.W)({constValue:!0})],or.prototype,"hasSliceHighlight",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],or.prototype,"hasSliceInVertexProgram",void 0),(0,Qt._)([(0,er.W)({constValue:rr.c.Pass})],or.prototype,"pbrTextureBindType",void 0);class ir extends or{constructor(){super(...arguments),this.output=Ve.V.Color,this.alphaDiscardMode=F.sf.Opaque,this.doubleSidedMode=Ue.W.None,this.pbrMode=We.A9.Disabled,this.cullFace=F.s2.None,this.transparencyPassType=ke.y.NONE,this.normalType=Ge.W.Attribute,this.textureCoordinateType=Ht.q.None,this.customDepthTest=F.it.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,Qt._)([(0,er.W)({count:Ve.V.COUNT})],ir.prototype,"output",void 0),(0,Qt._)([(0,er.W)({count:F.sf.COUNT})],ir.prototype,"alphaDiscardMode",void 0),(0,Qt._)([(0,er.W)({count:Ue.W.COUNT})],ir.prototype,"doubleSidedMode",void 0),(0,Qt._)([(0,er.W)({count:We.A9.COUNT})],ir.prototype,"pbrMode",void 0),(0,Qt._)([(0,er.W)({count:F.s2.COUNT})],ir.prototype,"cullFace",void 0),(0,Qt._)([(0,er.W)({count:ke.y.COUNT})],ir.prototype,"transparencyPassType",void 0),(0,Qt._)([(0,er.W)({count:Ge.W.COUNT})],ir.prototype,"normalType",void 0),(0,Qt._)([(0,er.W)({count:Ht.q.COUNT})],ir.prototype,"textureCoordinateType",void 0),(0,Qt._)([(0,er.W)({count:F.it.COUNT})],ir.prototype,"customDepthTest",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"spherical",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVertexColors",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSymbolColors",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVerticalOffset",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSlicePlane",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasSliceHighlight",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasColorTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasMetallicRoughnessTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasEmissionTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOcclusionTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasNormalTexture",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasScreenSizePerspective",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasVertexTangents",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOccludees",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"multipassEnabled",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasModelTransformation",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"offsetBackfaces",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"vvSize",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"vvColor",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"receiveShadows",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"receiveAmbientOcclusion",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"textureAlphaPremultiplied",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instanced",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instancedColor",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"objectAndLayerIdColorInstanced",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"instancedDoublePrecision",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"writeDepth",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"transparent",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"enableOffset",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"cullAboveGround",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"snowCover",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasColorTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasEmissionTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasNormalTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasOcclusionTextureTransform",void 0),(0,Qt._)([(0,er.W)()],ir.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"occlusionPass",void 0),(0,Qt._)([(0,er.W)({constValue:!0})],ir.prototype,"hasVvInstancing",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"useCustomDTRExponentForWater",void 0),(0,Qt._)([(0,er.W)({constValue:!1})],ir.prototype,"supportsTextureAtlas",void 0),(0,Qt._)([(0,er.W)({constValue:!0})],ir.prototype,"useFillLights",void 0);var nr=r(57323);class ar extends Zt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ge.W.Attribute,t.doubleSidedMode=Ue.W.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,ar.shader)}}ar.shader=new Ft.$(nr.R,(()=>r.e(9933).then(r.bind(r,39933))));class sr extends qe.im{constructor(e){super(e,cr),this._configuration=new ir,this.supportsEdges=!0,this.produces=new Map([[gt.OPAQUE_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&!this.parameters.transparent],[gt.TRANSPARENT_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[gt.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,Ve.XY)(e)||(0,Ve.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,ze.BP)().vec3f(ie.r.POSITION);return e.normalType===Ge.W.Compressed?t.vec2i16(ie.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(ie.r.NORMAL),e.hasVertexTangents&&t.vec4f(ie.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(ie.r.UV0),e.hasVertexColors&&t.vec4u8(ie.r.COLOR),e.hasSymbolColors&&t.vec4u8(ie.r.SYMBOLCOLOR),(0,ae.A)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(ie.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==Ve.V.Shadow&&e!==Ve.V.ShadowExcludeHighlight&&e!==Ve.V.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:o,vvColor:i}=e,n="replace"===e.colorMixMode,a=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||i||o;return r&&l?n||a:r?n?s:a:l?n||a:n?s:a}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?F.s2.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e===Ve.V.Color&&(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=Ue.W.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?Ue.W.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?Ue.W.WindingOrder:Ue.W.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?We.A9.Schematic:We.A9.Normal:We.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,o,i,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.s)(pr,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case Fe.RT.Global:n=(0,d.n)(mr,pr);break;case Fe.RT.Local:n=(0,d.c)(mr,hr)}let a=0;const s=(0,d.f)(vr,pr,e.eye),l=(0,d.l)(s),c=(0,d.j)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,d.m)(n,c)),a+=(0,Lt.kE)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,d.j)(n,n,a),(0,d.t)(fr,n,r.transform.inverseRotation),o=(0,d.f)(dr,o,fr),i=(0,d.f)(ur,i,fr)}var a;rt(e,r,o,i,null!=(a=r.verticalOffset)?(bt.offset=a,bt):null,n)}createGLMaterial(e){return new lr(e)}createBufferWriter(){return new Nt(this._vertexBufferLayout)}}class lr extends je.m{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output===Ve.V.Color&&(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?ar:Zt,e)}}const cr=new class extends Xt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},dr=(0,u.vt)(),ur=(0,u.vt)(),hr=(0,u.fA)(0,0,1),mr=(0,u.vt)(),fr=(0,u.vt)(),pr=(0,u.vt)(),vr=(0,u.vt)(),gr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function _r(e){throw new R.A("",`Request for object resource failed: ${e}`)}function xr(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(gr().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(gr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(gr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(gr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else gr().warn("Indexed geometries must specify faces"),o=!1;break}default:gr().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(gr().warn("Geometry requires material"),o=!1);const i=e.params.vertexAttributes;for(const e in i)i[e].values||(gr().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function Tr(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function br(e){switch(e){case"mask":return F.sf.Mask;case"maskAndTransparency":return F.sf.MaskBlend;case"none":return F.sf.Opaque;default:return F.sf.Blend}}function yr(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ar=new P.R(1,2,"wosr");var Er=r(61765);async function Sr(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const o=await(0,C.Ke)(t.request(e,"json",r));if(!0===o.ok)return o.value;(0,L.QP)(o.error),_r(o.error.details.url)}(e,r,t);const o=await(0,C.Ke)((0,M.A)(e,t));if(!0===o.ok)return o.value.data;(0,L.QP)(o.error),_r(o.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const i=e[o],n=i.images[0].data;if(!n){gr().warn("Externally referenced texture data is not yet supported");continue}const a=i.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===i.channels?i.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:pe.pF.REPEAT,t:pe.pF.REPEAT},preMultiplyAlpha:br(l)!==F.sf.Opaque},d=t?.disableTextures?Promise.resolve(null):D(a,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const o=await Promise.all(r),i={};for(const e of o)i[e.refId]=e;return i}(r.textureDefinitions??{},t);let i=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];i+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:o,size:i+(0,O.iL)(r)}}(a.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,i=new Array,n=new N,a=e.resource,s=P.R.parse(a.version||"1.0","wosr");Ar.validate(s);const l=a.model.name,c=a.model.geometries,d=a.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!xr(a))continue;const s=yr(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[ie.r.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,H.tM)(_);p.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new He(e,t);o.push(r),f.set(x,r)}const b=f.get(x),y=b?b.id:void 0,A=s.material;let E=n.get(A,x);if(null==E){const e=d[A.substring(A.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,o=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,i=T?br(T.alphaChannelUsage):void 0,a={ambient:(0,u.ci)(e.diffuse),diffuse:(0,u.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:o,textureAlphaMode:i,textureAlphaCutoff:.33,textureId:y,initTextureTransparent:!0,doubleSided:!0,cullFace:F.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(a,t.materialParameters),E=new sr(a),n.set(A,x,E)}i.push(E);const S=new ne(E,p);m+=p.find((e=>e[0]===ie.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:o,materials:i,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Tr(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let A;if(t.cache)A=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));A=await e(new T.R(t.streamDataRequester),a.url,t,t.usePBR)}const S=A.model.meta?.ESRI_proxyEllipsoid,R=A.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===A.meta.ESRI_webstyle;R&&!A.customMeta.esriTreeRendering&&(A.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const i of o.parts){const o=i.attributes.normal;if(null==o)return;const n=i.attributes.position,a=n.count,c=(0,u.vt)(),h=(0,u.vt)(),m=(0,u.vt)(),p=new Uint8Array(4*a),v=new Float64Array(3*a),g=(0,s.B8)((0,l.vt)(),i.transform);let _=0,x=0;for(let s=0;s<a;s++){n.getVec(s,h),o.getVec(s,c),(0,d.h)(h,h,i.transform),(0,d.f)(m,h,t.center),(0,d.D)(m,m,t.radius);const a=m[2],l=(0,d.l)(m),u=Math.min(.45+.55*l*l,1);(0,d.D)(m,m,t.radius),null!==g&&(0,d.h)(m,m,g),(0,d.n)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.o)(m,m,c,a>-1?.2:Math.min(-4*a-3.8,1)),v[_]=m[0],v[_+1]=m[1],v[_+2]=m[2],_+=3,p[x]=255*u,p[x+1]=255*u,p[x+2]=255*u,p[x+3]=255,x+=4}i.attributes.normal=new f.xs(v),i.attributes.color=new f.XP(p)}}}(A,S));const I=!!t.usePBR,z=A.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:R,mrrFactors:[...$t]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...qt]},V={...t.materialParameters,treeRendering:R},{engineResources:G,referenceBoundingBox:U}=function(e,t,r,o){const a=e.model,s=new Array,l=new Map,T=new Map,A=a.lods.length,S=(0,h.Ie)();return a.lods.forEach(((e,M)=>{const C=!0===o.skipHighLods&&(A>1&&0===M||A>3&&1===M)||!1===o.skipHighLods&&null!=o.singleLodIndex&&M!==o.singleLodIndex;if(C&&0!==M)return;const O=new w(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const o=C?new sr({}):function(e,t,r,o,i,n,a){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),l=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==l)return null;const f=function(e){switch(e){case"BLEND":return F.sf.Blend;case"MASK":return F.sf.Mask;case"OPAQUE":case null:case void 0:return F.sf.Opaque}}(l.alphaMode);if(!n.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(null!=o){const e=o.data;a.set(t,new He((0,y.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&r,encoding:(0,y.x3)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(l.textureColor,f!==F.sf.Opaque),t(l.textureNormal),t(l.textureOcclusion),t(l.textureEmissive),t(l.textureMetallicRoughness)}const r=l.color[0]**(1/Er.T),p=l.color[1]**(1/Er.T),v=l.color[2]**(1/Er.T),g=l.emissiveFactor[0]**(1/Er.T),_=l.emissiveFactor[1]**(1/Er.T),x=l.emissiveFactor[2]**(1/Er.T),T=null!=l.textureColor&&h?a.get(l.textureColor):null,b=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:i,emissiveFactor:n,occlusionTexture:a}){return null==e&&null==t&&null==i&&(null==n||(0,d.e)(n,u.uY))&&null==a&&(null==o||1===o)&&(null==r||1===r)}({normalTexture:l.textureNormal,metallicRoughnessTexture:l.textureMetallicRoughness,metallicFactor:l.metallicFactor,roughnessFactor:l.roughnessFactor,emissiveTexture:l.textureEmissive,emissiveFactor:l.emissiveFactor,occlusionTexture:l.textureOcclusion}),A=null!=l.normalTextureTransform?.scale?l.normalTextureTransform?.scale:c.Un;n.set(s,new sr({...o,transparent:f===F.sf.Blend,customDepthTest:F.it.Lequal,textureAlphaMode:f,textureAlphaCutoff:l.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:l.opacity,doubleSided:l.doubleSided,doubleSidedType:"winding-order",cullFace:l.doubleSided?F.s2.None:F.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ge.W.Attribute:Ge.W.ScreenDerivative,castShadows:!0,receiveShadows:l.receiveShadows,receiveAmbientOcclusion:l.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:l.colorMixMode,normalTextureId:null!=l.textureNormal&&h?a.get(l.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=l.textureOcclusion&&h?a.get(l.textureOcclusion).id:void 0,emissiveTextureId:null!=l.textureEmissive&&h?a.get(l.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=l.textureMetallicRoughness&&h?a.get(l.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:b?[...kt]:[l.metallicFactor,l.roughnessFactor,o.mrrFactors[2]],isSchematic:b,colorTextureTransformMatrix:E(l.colorTextureTransform),normalTextureTransformMatrix:E(l.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:E(l.occlusionTextureTransform),emissiveTextureTransformMatrix:E(l.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:E(l.metallicRoughnessTextureTransform),...i}))}const p=n.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(l.textureColor),e(l.textureNormal),e(l.textureOcclusion),e(l.textureEmissive),e(l.textureMetallicRoughness)}return p}(a,e,O,t,r,l,T),{geometry:s,vertexCount:A}=function(e,t){const r=e.attributes.position.count,o=(0,b.x)(e.indices||r,e.primitiveType),a=(0,m.oe)(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,p.a)(a,s,e.transform,3,l);const c=[[ie.r.POSITION,new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=(0,m.oe)(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,n.Ge)(wr,e.transform),(0,p.t)(t,a,wr,3,s),(0,i.or)(wr)&&(0,p.n)(t,t),c.push([ie.r.NORMAL,new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=(0,m.oe)(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,n.z0)(wr,e.transform),(0,v.t)(t,a,wr,4,s),(0,i.or)(wr)&&(0,p.n)(t,t,4),c.push([ie.r.TANGENT,new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,m.oe)(2*r),{typedBuffer:i,typedBufferStride:n}=e.attributes.texCoord0;(0,g.a)(t,i,2,n),c.push([ie.r.UV0,new B.n(t,o,2,!0)])}const d=e.attributes.color;if(null!=d){const t=new Uint8Array(4*r);4===d.elementCount?d instanceof f.Eq?(0,v.b)(t,d,255):d instanceof f.XP?(0,x.a)(t,d):d instanceof f.Uz&&(0,v.b)(t,d,1/256):(t.fill(255),d instanceof f.xs?(0,p.f)(t,d.typedBuffer,255,4,d.typedBufferStride):e.attributes.color instanceof f.eI?(0,_.c)(t,d.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof f.nS&&(0,p.f)(t,d.typedBuffer,1/256,4,d.typedBufferStride)),c.push([ie.r.COLOR,new B.n(t,o,4,!0)])}return{geometry:new ne(t,c),vertexCount:r}}(e,null!=o?o:new sr({})),w=s.boundingInfo;null!=w&&0===M&&((0,h.iT)(S,w.bbMin),(0,h.iT)(S,w.bbMax)),null!=o&&(O.stageResources.geometries.push(s),O.numberOfVertices+=A)})),C||s.push(O)})),{engineResources:s,referenceBoundingBox:S}}(A,z,V,t.skipHighLods&&null==a.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:a.specifiedLodIndex});return{lods:G,referenceBoundingBox:U,isEsriSymbolResource:A.meta.isEsriSymbolResource,isWosr:!1}}const wr=(0,a.vt)()},66104:(e,t,r)=>{var o,i;r.d(t,{k5:()=>o}),r(34727),(i=o||(o={}))[i.Multiply=1]="Multiply",i[i.Ignore=2]="Ignore",i[i.Replace=3]="Replace",i[i.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>n});var o=r(66104),i=r(2597);function n(e){e.vertex.code.add(i.H`
264
264
  vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) {
265
265
  float symbolAlpha = 0.0;
266
266
 
@@ -1084,4 +1084,4 @@ const vec4 RGBA4_2_FLOAT_FACTORS = vec4(
1084
1084
  );
1085
1085
  float rgba4ToFloat(vec4 rgba) {
1086
1086
  return dot(rgba, RGBA4_2_FLOAT_FACTORS);
1087
- }`)}},26835:(e,t,r)=>{r(2597)},20693:(e,t,r)=>{r.d(t,{yu:()=>m,NB:()=>f,S7:()=>g});var o=r(58083),i=r(9093),n=r(38954),a=r(51850),s=r(40710),l=r(33079),c=(r(20304),r(39589)),d=r(46263);class u extends c.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,o,i)=>r.setUniformMatrix4fv(e,t(o,i))))}}var h=r(40095);function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new s.W("cameraPosition",((e,t)=>(0,n.s)(v,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 h.X("proj",((e,t)=>t.camera.projectionMatrix)),new u("view",((e,t)=>(0,o.Tl)(p,t.camera.viewMatrix,e.origin))),new s.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.s)(v,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new h.X("proj",((e,t)=>t.camera.projectionMatrix)),new h.X("view",((e,t)=>(0,o.Tl)(p,t.camera.viewMatrix,r(t)))),new l.t("localOrigin",((e,t)=>r(t))))}const p=(0,i.vt)(),v=(0,a.vt)();function g(e){e.uniforms.add(new h.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Draw,((r,o,i,n)=>r.setUniform2fv(e,t(o,i,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,o,i)=>r.setUniform2fv(e,t(o,i))))}}},40710:(e,t,r)=>{r.d(t,{W:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec3",i.c.Draw,((r,o,i,n)=>r.setUniform3fv(e,t(o,i,n))))}}},33079:(e,t,r)=>{r.d(t,{t:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec3",i.c.Pass,((r,o,i)=>r.setUniform3fv(e,t(o,i))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec4",i.c.Pass,((r,o,i)=>r.setUniform4fv(e,t(o,i))))}}},20304:(e,t,r)=>{r.d(t,{m:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"float",i.c.Pass,((r,o,i)=>r.setUniform1f(e,t(o,i))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"int",i.c.Pass,((r,o,i)=>r.setUniform1i(e,t(o,i))))}}},98353:(e,t,r)=>{r.d(t,{h:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat3",i.c.Draw,((r,o,i)=>r.setUniformMatrix3fv(e,t(o,i))))}}},35644:(e,t,r)=>{r.d(t,{k:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat3",i.c.Pass,((r,o,i)=>r.setUniformMatrix3fv(e,t(o,i))))}}},40095:(e,t,r)=>{r.d(t,{X:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat4",i.c.Pass,((r,o,i)=>r.setUniformMatrix4fv(e,t(o,i))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>l});var o=r(49186),i=(r(44208),r(53966)),n=r(46263),a=r(620);class s{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 l extends s{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new h,this.varyings=new m,this.extensions=new f,this.constants=new v,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),o=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,n=i.uniforms.generateSource(),a=i.code.generateSource(),s="vertex"===e?_:g,l=this.constants.generateSource().concat(i.constants.generateSource()),c=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${s}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${o.join("\n")}\n\n${c.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()),o=r.length;return(t,i)=>{for(let n=0;n<o;++n)r[n](e,t,i)}}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()),o=r.length;return(t,i,n)=>{for(let a=0;a<o;++a)r[a](e,t,i,n)}}}class c{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 o.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else i.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 d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends s{constructor(){super(...arguments),this.uniforms=new c(this),this.code=new d(this),this.constants=new v}get builder(){return this}}class h{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,a.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,o)=>t.push("vertex"===e?`out ${r} ${o};`:`in ${r} ${o};`))),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 o=this._entries.get(r);o?(0,a.vA)(o.name===e&&o.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 v{constructor(){this._entries=new Set}add(e,t,r){let o="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":o=v._numberToFloatStr(r);break;case"int":o=v._numberToIntStr(r);break;case"bool":o=r.toString();break;case"vec2":o=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":o=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":o=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":o=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":o=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":o=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":o=`${t}(${Array.prototype.map.call(r,(e=>v._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${o};`),this}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 g="#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",_="precision highp float;\nprecision highp sampler2D;"},15976:(e,t,r)=>{r.d(t,{o:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Draw,((r,o,i)=>r.bindTexture(e,t(o,i))))}}},63761:(e,t,r)=>{r.d(t,{N:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Pass,((r,o,i)=>r.bindTexture(e,t(o,i))))}}},39589:(e,t,r)=>{r.d(t,{n:()=>i});var o=r(46263);class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={[o.c.Pass]:null,[o.c.Draw]:null},i)switch(r){case o.c.Pass:this.bind[o.c.Pass]=i;break;case o.c.Draw:this.bind[o.c.Draw]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},2597:(e,t,r)=>{r.d(t,{H:()=>i,Y:()=>o});const o=class{};function i(e,...t){let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r}var n;(n=i||(i={})).int=function(e){return Math.round(e).toString()},n.float=function(e){return e.toPrecision(8)}},97220:(e,t,r)=>{r.d(t,{$:()=>o});class o{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:()=>n});var o=r(97768),i=r(63907);class n{constructor(e,t,r){this.release=r,this.initializeConfiguration(e,t),this._configuration=t.snapshot(),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=(0,o.WD)(this._program),this._pipeline=this._configuration=null}reload(e){(0,o.WD)(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get compiled(){return this.program.compiled}get key(){return this._configuration.key}get configuration(){return this._configuration}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return i.WR.TRIANGLES}getPipeline(e,t,r){return this._pipeline}initializeConfiguration(e,t){}}},99769:(e,t,r)=>{r.d(t,{K:()=>i,W:()=>n});var o=r(2597);class i extends o.Y{constructor(){super(),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?this._parameterBits.map((()=>0)):[],this._parameterNames||(this._parameterNames=[])}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,t={key:this.key};for(const r of e)t[r]=this[r];return t}}function n(e={}){return(t,r)=>{if(t._parameterNames=t._parameterNames??[],t._parameterNames.push(r),null!=e.constValue)Object.defineProperty(t,r,{get:()=>e.constValue});else{const o=t._parameterNames.length-1,i=e.count||2,n=Math.ceil(Math.log2(i)),a=t._parameterBits??[0];let s=0;for(;a[s]+n>16;)s++,s>=a.length&&a.push(0);t._parameterBits=a;const l=a[s],c=(1<<n)-1<<l;a[s]+=n,Object.defineProperty(t,r,{get(){return this[o]},set(e){if(this[o]!==e&&(this[o]=e,this._keyDirty=!0,this._parameterBits[s]=this._parameterBits[s]&~c|+e<<l&c,"number"!=typeof e&&"boolean"!=typeof e))throw new Error("Configuration value for "+r+" must be boolean or number, got "+typeof e)}})}}}},69720:(e,t,r)=>{r.d(t,{J:()=>i});var o=r(24326);class i{constructor(){this.id=(0,o.c)()}}},96672:(e,t,r)=>{var o;r.d(t,{X:()=>o}),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"}(o||(o={}))},39341:(e,t,r)=>{r.d(t,{D:()=>i});var o=r(46540);const i=new Map([[o.r.POSITION,0],[o.r.NORMAL,1],[o.r.NORMALCOMPRESSED,1],[o.r.UV0,2],[o.r.COLOR,3],[o.r.COLORFEATUREATTRIBUTE,3],[o.r.SIZE,4],[o.r.TANGENT,4],[o.r.CENTEROFFSETANDDISTANCE,5],[o.r.SYMBOLCOLOR,5],[o.r.FEATUREATTRIBUTE,6],[o.r.INSTANCEFEATUREATTRIBUTE,6],[o.r.INSTANCECOLOR,7],[o.r.OBJECTANDLAYERIDCOLOR,7],[o.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[o.r.INSTANCEMODEL,8],[o.r.INSTANCEMODELNORMAL,12],[o.r.INSTANCEMODELORIGINHI,11],[o.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m:()=>l});var o=r(97768),i=r(74887),n=r(2597),a=r(89192);class s{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){this._techniques.release(this._technique)}get technique(){return this._technique}get _stippleTextures(){return this._techniques.constructionContext.stippleTextures}get _markerTextures(){return this._techniques.constructionContext.markerTextures}ensureTechnique(e,t){return this._technique=this._techniques.releaseAndAcquire(e,this._material.getConfiguration(this._output,t),this._technique),this._technique}ensureResources(e){return a.Am.LOADED}}class l extends s{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(){this._texture=(0,o.Gz)(this._texture),this._textureNormal=(0,o.Gz)(this._textureNormal),this._textureEmissive=(0,o.Gz)(this._textureEmissive),this._textureOcclusion=(0,o.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,o.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?a.Am.LOADED:a.Am.LOADING}get textureBindParameters(){return new c(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,o.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,i.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,o.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class c extends n.Y{constructor(e=null,t=null,r=null,o=null,i=null,n,a){super(),this.texture=e,this.textureNormal=t,this.textureEmissive=r,this.textureOcclusion=o,this.textureMetallicRoughness=i,this.scale=n,this.normalTextureTransformMatrix=a}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>o});var o,i,n=r(51850),a=r(2597),s=r(89192),l=r(69720),c=r(96672),d=r(39341),u=r(19245);class h extends l.J{constructor(e,t){super(),this.type=c.X.Material,this.supportsEdges=!1,this._visible=!0,this._renderPriority=0,this._vertexAttributeLocations=d.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=(0,u.qu)(e,t),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this.parametersChanged())}validateParameters(e){}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.parametersChanged())}shouldRender(e){return this.isVisible()&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bindParameters.decorations===s.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}isVisible(){return this._visible}parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.isVisible()&&this.parameters.renderOccluded===e}intersectDraped(e,t,r,o,i,n){return this._pp0[0]=this._pp1[0]=o[0],this._pp0[1]=this._pp1[1]=o[1],this.intersect(e,t,r,this._pp0,this._pp1,i)}}(i=o||(o={}))[i.None=0]="None",i[i.Occlude=1]="Occlude",i[i.Transparent=2]="Transparent",i[i.OccludeAndTransparent=4]="OccludeAndTransparent",i[i.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",i[i.Opaque=16]="Opaque",a.Y},34886:(e,t,r)=>{r.d(t,{B:()=>n});var o=r(3694),i=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new o.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,i.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)}}},14327:(e,t,r)=>{var o;r.d(t,{y:()=>o}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(o||(o={}))},89192:(e,t,r)=>{var o,i,n,a,s,l,c,d,u;r.d(t,{Am:()=>a,C7:()=>n,ID:()=>d,JS:()=>u,Mg:()=>l,dd:()=>s,it:()=>i,s2:()=>o,sf:()=>c}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(o||(o={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),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"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),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"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(d||(d={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(u||(u={}))},61765:(e,t,r)=>{r.d(t,{T:()=>o});const o=2.1},19245:(e,t,r)=>{r.d(t,{Um:()=>u,qu:()=>l,MB:()=>c,kE:()=>s});var o=r(4576),i=r(34727);function n(e,t,r,o){return function(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}(e,function(e,t,r){const o=r.parameters;return a.scale=Math.min(o.divisor/(t-o.offset),1),a.factor=function(e){return Math.abs(e*e*e)}(e),a}(t,r,o))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const a={scale:0,factor:0,minScaleFactor:0};function s(e,t,r,o,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=n(s,o,t,a));const l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,i.qE)(l*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function l(e,t){const r=t?l(t):{};for(const t in e){let o=e[t];o?.forEach&&(o=d(o)),null==o&&t in r||(r[t]=o)}return r}function c(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(Array.isArray(n)?null===e[i]?(e[i]=n.slice(),r=!0):(0,o.yo)(e[i],n)&&(r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}function d(e){const t=[];return e.forEach((e=>t.push(e))),t}const u={multiply:1,ignore:2,replace:3,tint:4}},28449:(e,t,r)=>{function o(e,t){const r=e.length;for(let o=0;o<r;++o)n[0]=e[o],t[o]=n[0];return t}function i(e,t){const r=e.length;for(let o=0;o<r;++o)n[0]=e[o],n[1]=e[o]-n[0],t[o]=n[1];return t}r.d(t,{Zo:()=>o,jA:()=>i});const n=new Float32Array(2)},90644:(e,t,r)=>{r.d(t,{Ey:()=>T,Xt:()=>l,kn:()=>c,p3:()=>n,wE:()=>d});var o=r(89192),i=r(63907);function n(e,t,r,o,n=i.Tb.ADD,a=i.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:o,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}const a={face:i.Y7.BACK,mode:i.Ac.CCW},s={face:i.Y7.FRONT,mode:i.Ac.CCW},l=e=>e===o.s2.Back?a:e===o.s2.Front?s:null,c={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function u(e){return A.intern(e)}function h(e){return S.intern(e)}function m(e){return M.intern(e)}function f(e){return O.intern(e)}function p(e){return I.intern(e)}function v(e){return L.intern(e)}function g(e){return H.intern(e)}function _(e){return B.intern(e)}function x(e){return z.intern(e)}function T(e){return G.intern(e)}class b{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 y(e){return"["+e.join(",")+"]"}const A=new b(E,(e=>({__tag:"Blending",...e})));function E(e){return e?y([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 S=new b(w,(e=>({__tag:"Culling",...e})));function w(e){return e?y([e.face,e.mode]):null}const M=new b(C,(e=>({__tag:"PolygonOffset",...e})));function C(e){return e?y([e.factor,e.units]):null}const O=new b(R,(e=>({__tag:"DepthTest",...e})));function R(e){return e?y([e.func]):null}const I=new b(N,(e=>({__tag:"StencilTest",...e})));function N(e){return e?y([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new b(P,(e=>({__tag:"DepthWrite",...e})));function P(e){return e?y([e.zNear,e.zFar]):null}const H=new b(D,(e=>({__tag:"ColorWrite",...e})));function D(e){return e?y([e.r,e.g,e.b,e.a]):null}const B=new b(F,(e=>({__tag:"StencilWrite",...e})));function F(e){return e?y([e.mask]):null}const z=new b(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?y(e.buffers):null}const G=new b((function(e){return e?y([E(e.blending),w(e.culling),C(e.polygonOffset),R(e.depthTest),N(e.stencilTest),P(e.depthWrite),D(e.colorWrite),F(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:u(e.blending),culling:h(e.culling),polygonOffset:m(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:v(e.depthWrite),colorWrite:g(e.colorWrite),stencilWrite:_(e.stencilWrite),drawBuffers:x(e.drawBuffers)})))}}]);
1087
+ }`)}},26835:(e,t,r)=>{r(2597)},20693:(e,t,r)=>{r.d(t,{yu:()=>m,NB:()=>f,S7:()=>g});var o=r(58083),i=r(9093),n=r(38954),a=r(51850),s=r(40710),l=r(33079),c=(r(20304),r(39589)),d=r(46263);class u extends c.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,o,i)=>r.setUniformMatrix4fv(e,t(o,i))))}}var h=r(40095);function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new s.W("cameraPosition",((e,t)=>(0,n.s)(v,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 h.X("proj",((e,t)=>t.camera.projectionMatrix)),new u("view",((e,t)=>(0,o.Tl)(p,t.camera.viewMatrix,e.origin))),new s.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.s)(v,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new h.X("proj",((e,t)=>t.camera.projectionMatrix)),new h.X("view",((e,t)=>(0,o.Tl)(p,t.camera.viewMatrix,r(t)))),new l.t("localOrigin",((e,t)=>r(t))))}const p=(0,i.vt)(),v=(0,a.vt)();function g(e){e.uniforms.add(new h.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Draw,((r,o,i,n)=>r.setUniform2fv(e,t(o,i,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,o,i)=>r.setUniform2fv(e,t(o,i))))}}},40710:(e,t,r)=>{r.d(t,{W:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec3",i.c.Draw,((r,o,i,n)=>r.setUniform3fv(e,t(o,i,n))))}}},33079:(e,t,r)=>{r.d(t,{t:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec3",i.c.Pass,((r,o,i)=>r.setUniform3fv(e,t(o,i))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"vec4",i.c.Pass,((r,o,i)=>r.setUniform4fv(e,t(o,i))))}}},20304:(e,t,r)=>{r.d(t,{m:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"float",i.c.Pass,((r,o,i)=>r.setUniform1f(e,t(o,i))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"int",i.c.Pass,((r,o,i)=>r.setUniform1i(e,t(o,i))))}}},98353:(e,t,r)=>{r.d(t,{h:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat3",i.c.Draw,((r,o,i)=>r.setUniformMatrix3fv(e,t(o,i))))}}},35644:(e,t,r)=>{r.d(t,{k:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat3",i.c.Pass,((r,o,i)=>r.setUniformMatrix3fv(e,t(o,i))))}}},40095:(e,t,r)=>{r.d(t,{X:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"mat4",i.c.Pass,((r,o,i)=>r.setUniformMatrix4fv(e,t(o,i))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>l});var o=r(49186),i=(r(44208),r(53966)),n=r(46263),a=r(620);class s{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 l extends s{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new h,this.varyings=new m,this.extensions=new f,this.constants=new v,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),o=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,n=i.uniforms.generateSource(),a=i.code.generateSource(),s="vertex"===e?_:g,l=this.constants.generateSource().concat(i.constants.generateSource()),c=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${s}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${o.join("\n")}\n\n${c.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()),o=r.length;return(t,i)=>{for(let n=0;n<o;++n)r[n](e,t,i)}}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()),o=r.length;return(t,i,n)=>{for(let a=0;a<o;++a)r[a](e,t,i,n)}}}class c{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 o.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else i.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 d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends s{constructor(){super(...arguments),this.uniforms=new c(this),this.code=new d(this),this.constants=new v}get builder(){return this}}class h{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,a.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,o)=>t.push("vertex"===e?`out ${r} ${o};`:`in ${r} ${o};`))),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 o=this._entries.get(r);o?(0,a.vA)(o.name===e&&o.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 v{constructor(){this._entries=new Set}add(e,t,r){let o="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":o=v._numberToFloatStr(r);break;case"int":o=v._numberToIntStr(r);break;case"bool":o=r.toString();break;case"vec2":o=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":o=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":o=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":o=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":o=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":o=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":o=`${t}(${Array.prototype.map.call(r,(e=>v._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${o};`),this}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 g="#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",_="precision highp float;\nprecision highp sampler2D;"},15976:(e,t,r)=>{r.d(t,{o:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Draw,((r,o,i)=>r.bindTexture(e,t(o,i))))}}},63761:(e,t,r)=>{r.d(t,{N:()=>n});var o=r(39589),i=r(46263);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Pass,((r,o,i)=>r.bindTexture(e,t(o,i))))}}},39589:(e,t,r)=>{r.d(t,{n:()=>i});var o=r(46263);class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={[o.c.Pass]:null,[o.c.Draw]:null},i)switch(r){case o.c.Pass:this.bind[o.c.Pass]=i;break;case o.c.Draw:this.bind[o.c.Draw]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},2597:(e,t,r)=>{r.d(t,{H:()=>i,Y:()=>o});const o=class{};function i(e,...t){let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r}var n;(n=i||(i={})).int=function(e){return Math.round(e).toString()},n.float=function(e){return e.toPrecision(8)}},97220:(e,t,r)=>{r.d(t,{$:()=>o});class o{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:()=>n});var o=r(97768),i=r(63907);class n{constructor(e,t,r){this.release=r,this.initializeConfiguration(e,t),this._configuration=t.snapshot(),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=(0,o.WD)(this._program),this._pipeline=this._configuration=null}reload(e){(0,o.WD)(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get compiled(){return this.program.compiled}get key(){return this._configuration.key}get configuration(){return this._configuration}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return i.WR.TRIANGLES}getPipeline(e,t,r){return this._pipeline}initializeConfiguration(e,t){}}},99769:(e,t,r)=>{r.d(t,{K:()=>i,W:()=>n});var o=r(2597);class i extends o.Y{constructor(){super(),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?this._parameterBits.map((()=>0)):[],this._parameterNames||(this._parameterNames=[])}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,t={key:this.key};for(const r of e)t[r]=this[r];return t}}function n(e={}){return(t,r)=>{if(t._parameterNames=t._parameterNames??[],t._parameterNames.push(r),null!=e.constValue)Object.defineProperty(t,r,{get:()=>e.constValue});else{const o=t._parameterNames.length-1,i=e.count||2,n=Math.ceil(Math.log2(i)),a=t._parameterBits??[0];let s=0;for(;a[s]+n>16;)s++,s>=a.length&&a.push(0);t._parameterBits=a;const l=a[s],c=(1<<n)-1<<l;a[s]+=n,Object.defineProperty(t,r,{get(){return this[o]},set(e){if(this[o]!==e&&(this[o]=e,this._keyDirty=!0,this._parameterBits[s]=this._parameterBits[s]&~c|+e<<l&c,"number"!=typeof e&&"boolean"!=typeof e))throw new Error("Configuration value for "+r+" must be boolean or number, got "+typeof e)}})}}}},69720:(e,t,r)=>{r.d(t,{J:()=>i});var o=r(24326);class i{constructor(){this.id=(0,o.c)()}}},96672:(e,t,r)=>{var o;r.d(t,{X:()=>o}),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"}(o||(o={}))},39341:(e,t,r)=>{r.d(t,{D:()=>i});var o=r(46540);const i=new Map([[o.r.POSITION,0],[o.r.NORMAL,1],[o.r.NORMALCOMPRESSED,1],[o.r.UV0,2],[o.r.COLOR,3],[o.r.COLORFEATUREATTRIBUTE,3],[o.r.SIZE,4],[o.r.TANGENT,4],[o.r.CENTEROFFSETANDDISTANCE,5],[o.r.SYMBOLCOLOR,5],[o.r.FEATUREATTRIBUTE,6],[o.r.INSTANCEFEATUREATTRIBUTE,6],[o.r.INSTANCECOLOR,7],[o.r.OBJECTANDLAYERIDCOLOR,7],[o.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[o.r.INSTANCEMODEL,8],[o.r.INSTANCEMODELNORMAL,12],[o.r.INSTANCEMODELORIGINHI,11],[o.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m:()=>l});var o=r(97768),i=r(74887),n=r(2597),a=r(89192);class s{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){this._techniques.release(this._technique)}get technique(){return this._technique}get _stippleTextures(){return this._techniques.constructionContext.stippleTextures}get _markerTextures(){return this._techniques.constructionContext.markerTextures}ensureTechnique(e,t){return this._technique=this._techniques.releaseAndAcquire(e,this._material.getConfiguration(this._output,t),this._technique),this._technique}ensureResources(e){return a.Am.LOADED}}class l extends s{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(){this._texture=(0,o.Gz)(this._texture),this._textureNormal=(0,o.Gz)(this._textureNormal),this._textureEmissive=(0,o.Gz)(this._textureEmissive),this._textureOcclusion=(0,o.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,o.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?a.Am.LOADED:a.Am.LOADING}get textureBindParameters(){return new c(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,o.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,i.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,o.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class c extends n.Y{constructor(e=null,t=null,r=null,o=null,i=null,n,a){super(),this.texture=e,this.textureNormal=t,this.textureEmissive=r,this.textureOcclusion=o,this.textureMetallicRoughness=i,this.scale=n,this.normalTextureTransformMatrix=a}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>o});var o,i,n=r(51850),a=r(2597),s=r(89192),l=r(69720),c=r(96672),d=r(39341),u=r(19245);class h extends l.J{constructor(e,t){super(),this.type=c.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=d.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=(0,u.qu)(e,t),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.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.bindParameters.decorations===s.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}get visible(){return!0}parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}intersectDraped(e,t,r,o,i,n){return this._pp0[0]=this._pp1[0]=o[0],this._pp0[1]=this._pp1[1]=o[1],this.intersect(e,t,r,this._pp0,this._pp1,i)}}(i=o||(o={}))[i.None=0]="None",i[i.Occlude=1]="Occlude",i[i.Transparent=2]="Transparent",i[i.OccludeAndTransparent=4]="OccludeAndTransparent",i[i.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",i[i.Opaque=16]="Opaque",a.Y},34886:(e,t,r)=>{r.d(t,{B:()=>n});var o=r(3694),i=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new o.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,i.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)}}},14327:(e,t,r)=>{var o;r.d(t,{y:()=>o}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(o||(o={}))},89192:(e,t,r)=>{var o,i,n,a,s,l,c,d,u;r.d(t,{Am:()=>a,C7:()=>n,ID:()=>d,JS:()=>u,Mg:()=>l,dd:()=>s,it:()=>i,s2:()=>o,sf:()=>c}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(o||(o={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),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"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),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"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(d||(d={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(u||(u={}))},61765:(e,t,r)=>{r.d(t,{T:()=>o});const o=2.1},19245:(e,t,r)=>{r.d(t,{Um:()=>u,qu:()=>l,MB:()=>c,kE:()=>s});var o=r(4576),i=r(34727);function n(e,t,r,o){return function(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}(e,function(e,t,r){const o=r.parameters;return a.scale=Math.min(o.divisor/(t-o.offset),1),a.factor=function(e){return Math.abs(e*e*e)}(e),a}(t,r,o))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const a={scale:0,factor:0,minScaleFactor:0};function s(e,t,r,o,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=n(s,o,t,a));const l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,i.qE)(l*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function l(e,t){const r=t?l(t):{};for(const t in e){let o=e[t];o?.forEach&&(o=d(o)),null==o&&t in r||(r[t]=o)}return r}function c(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(Array.isArray(n)?null===e[i]?(e[i]=n.slice(),r=!0):(0,o.yo)(e[i],n)&&(r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}function d(e){const t=[];return e.forEach((e=>t.push(e))),t}const u={multiply:1,ignore:2,replace:3,tint:4}},28449:(e,t,r)=>{function o(e,t){const r=e.length;for(let o=0;o<r;++o)n[0]=e[o],t[o]=n[0];return t}function i(e,t){const r=e.length;for(let o=0;o<r;++o)n[0]=e[o],n[1]=e[o]-n[0],t[o]=n[1];return t}r.d(t,{Zo:()=>o,jA:()=>i});const n=new Float32Array(2)},90644:(e,t,r)=>{r.d(t,{Ey:()=>T,Xt:()=>l,kn:()=>c,p3:()=>n,wE:()=>d});var o=r(89192),i=r(63907);function n(e,t,r,o,n=i.Tb.ADD,a=i.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:o,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}const a={face:i.Y7.BACK,mode:i.Ac.CCW},s={face:i.Y7.FRONT,mode:i.Ac.CCW},l=e=>e===o.s2.Back?a:e===o.s2.Front?s:null,c={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function u(e){return A.intern(e)}function h(e){return S.intern(e)}function m(e){return M.intern(e)}function f(e){return O.intern(e)}function p(e){return I.intern(e)}function v(e){return L.intern(e)}function g(e){return H.intern(e)}function _(e){return B.intern(e)}function x(e){return z.intern(e)}function T(e){return G.intern(e)}class b{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 y(e){return"["+e.join(",")+"]"}const A=new b(E,(e=>({__tag:"Blending",...e})));function E(e){return e?y([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 S=new b(w,(e=>({__tag:"Culling",...e})));function w(e){return e?y([e.face,e.mode]):null}const M=new b(C,(e=>({__tag:"PolygonOffset",...e})));function C(e){return e?y([e.factor,e.units]):null}const O=new b(R,(e=>({__tag:"DepthTest",...e})));function R(e){return e?y([e.func]):null}const I=new b(N,(e=>({__tag:"StencilTest",...e})));function N(e){return e?y([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new b(P,(e=>({__tag:"DepthWrite",...e})));function P(e){return e?y([e.zNear,e.zFar]):null}const H=new b(D,(e=>({__tag:"ColorWrite",...e})));function D(e){return e?y([e.r,e.g,e.b,e.a]):null}const B=new b(F,(e=>({__tag:"StencilWrite",...e})));function F(e){return e?y([e.mask]):null}const z=new b(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?y(e.buffers):null}const G=new b((function(e){return e?y([E(e.blending),w(e.culling),C(e.polygonOffset),R(e.depthTest),N(e.stencilTest),P(e.depthWrite),D(e.colorWrite),F(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:u(e.blending),culling:h(e.culling),polygonOffset:m(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:v(e.depthWrite),colorWrite:g(e.colorWrite),stencilWrite:_(e.stencilWrite),drawBuffers:x(e.drawBuffers)})))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4796],{81457:(e,t,r)=>{r.d(t,{A:()=>I});var n,o=r(90237),i=r(61147),s=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),c=r(10107),p=(r(53966),r(36005)),d=r(40608),y=r(43937),h=(r(87811),r(32730));let f=n=class extends a.oY{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,h.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,h.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,o._)([(0,c.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,o._)([(0,p.w)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,o._)([(0,y.K)("expression")],f.prototype,"writeExpression",null),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,o._)([(0,c.MZ)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,o._)([(0,d.$)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var b,w=r(83531),v=r(59868),g=r(73838);const S=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function x(e,t,r){return{enabled:!(0,w.TU)(r?.layer)}}function A(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function M(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let P=b=class extends a.oY{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),o=n[3],i=r(t[n[4]],n[5],n[6]);switch(o){case"AND":return e&&i;case"OR":return e||i}}return!1}catch(e){}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=v.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,h.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,h.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&A(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const o=e.toJSON(n);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,h.XJ)(this)}getLabelExpressionArcade(){return(0,h.BI)(this)}getLabelExpressionSingleField(){return(0,h.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new b({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],P.prototype,"name",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:x}}}}})],P.prototype,"allowOverrun",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:x}}}}})],P.prototype,"deconflictionStrategy",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&M(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],P.prototype,"labelExpression",void 0),(0,o._)([(0,p.w)("labelExpression")],P.prototype,"readLabelExpression",null),(0,o._)([(0,y.K)("labelExpression")],P.prototype,"writeLabelExpression",null),(0,o._)([(0,c.MZ)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return A(e)||M(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],P.prototype,"labelExpressionInfo",void 0),(0,o._)([(0,y.K)("labelExpressionInfo")],P.prototype,"writeLabelExpressionInfo",null),(0,o._)([(0,c.MZ)({type:S.apiValues,json:{type:S.jsonValues,read:S.read,write:S.write}})],P.prototype,"labelPlacement",void 0),(0,o._)([(0,c.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],P.prototype,"labelPosition",void 0),(0,o._)([(0,c.MZ)({type:Number})],P.prototype,"maxScale",void 0),(0,o._)([(0,y.K)("maxScale")],P.prototype,"writeMaxScale",null),(0,o._)([(0,c.MZ)({type:Number})],P.prototype,"minScale",void 0),(0,o._)([(0,y.K)("minScale")],P.prototype,"writeMinScale",null),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],P.prototype,"repeatLabel",void 0),(0,o._)([(0,c.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],P.prototype,"repeatLabelDistance",void 0),(0,o._)([(0,c.MZ)({types:i.em,json:{origins:{"web-scene":{types:i.Rv,write:g.oO,default:null}},write:g.oO,default:null}})],P.prototype,"symbol",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],P.prototype,"useCodedValues",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],P.prototype,"where",void 0),P=b=(0,o._)([(0,d.$)("esri.layers.support.LabelClass")],P);const I=P},15426:(e,t,r)=>{r.d(t,{Xl:()=>v,ct:()=>x,C$:()=>G,PD:()=>V,VZ:()=>C,mm:()=>M,VA:()=>D,WP:()=>P,iX:()=>w,Nv:()=>q,xd:()=>k,GA:()=>H,jp:()=>F,tG:()=>$,lV:()=>I,B5:()=>E,Ye:()=>L,sg:()=>j,hM:()=>_,S2:()=>Z,jD:()=>O,Zm:()=>R,$4:()=>N,Pt:()=>J,bt:()=>S,rn:()=>A});var n=r(70333),o=r(61147),i=r(60999),s=r(49186),a=r(66552),l=r(39516),u=r(90360),c=r(61956);async function p(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=d(e));const n=function(e){return d(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),o=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let i=null;for(;;){const s=await e.source.queryFeaturesJSON(t,r);if(null==i?i=s:i.features=i.features.concat(s.features),i.exceededTransferLimit=s.exceededTransferLimit,!o||!s.exceededTransferLimit)break;t.start+=n}return i}function d(e){return e.capabilities.query.supportsMaxRecordCountFactor?c.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(83531),h=r(96576),f=r(93618),m=r(54546),b=r(26591);const w=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function v(e,t,r,n){const o=await B(e);if(await g(e,t,n),!o.addAttachment)throw new s.A(n,"Layer source does not support addAttachment capability");return o.addAttachment(t,r)}function g(e,t,r){const{attributes:n}=t,{objectIdField:o}=e;return e.capabilities?.data?.supportsAttachment?t?n?o&&n[o]?Promise.resolve():Promise.reject(new s.A(r,`feature is missing the identifying attribute ${o}`)):Promise.reject(new s.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new s.A(r,"this layer doesn't support attachments"))}async function S(e,t,r,n,o){const i=await B(e);if(await g(e,t,o),!i.updateAttachment)throw new s.A(o,"Layer source does not support updateAttachment capability");return i.updateAttachment(t,r,n)}async function x(e,t,n){const{applyEdits:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();let s=n;return"feature"===i.type&&i.infoFor3D&&null!=t.deleteFeatures&&null!=i.globalIdField&&(s={...s,globalIdToObjectId:await H(i,t.deleteFeatures,i.globalIdField)}),o(i,i.source,t,n)}async function A(e,t,n){const{uploadAssets:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();return o(i,i.source,t,n)}async function M(e,t,r,n){const o=await B(e);if(await g(e,t,n),!o.deleteAttachments)throw new s.A(n,"Layer source does not support deleteAttachments capability");return o.deleteAttachments(t,r)}async function P(e,t,r){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new s.A(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function I(e,t,r,n){t=m.A.from(t),await e.load();const o=e.source,i=e.capabilities;if(!i?.data?.supportsAttachment)throw new s.A(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:c,size:p,start:d,where:y}=t;if(!i?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||p?.length>0||c||d||y))throw new s.A(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new s.A(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!o.queryAttachments)throw new s.A(n,"Layer source does not support queryAttachments capability",t);return o.queryAttachments(t)}async function j(e,t,r,n){const o=await B(e);if(!o.queryObjectIds)throw new s.A(n,"Layer source does not support queryObjectIds capability");return o.queryObjectIds(c.A.from(t)??e.createQuery(),r)}async function L(e,t,r,n){const o=await B(e);if(!o.queryFeatureCount)throw new s.A(n,"Layer source does not support queryFeatureCount capability");return o.queryFeatureCount(c.A.from(t)??e.createQuery(),r)}async function E(e,t,r,n){const o=await B(e);if(!o.queryExtent)throw new s.A(n,"Layer source does not support queryExtent capability");return o.queryExtent(c.A.from(t)??e.createQuery(),r)}async function _(e,t,r,n){const o=await B(e);if(!o.queryRelatedFeatures)throw new s.A(n,"Layer source does not support queryRelatedFeatures capability");return o.queryRelatedFeatures(b.default.from(t),r)}async function Z(e,t,r,n){const o=await B(e);if(!o.queryRelatedFeaturesCount)throw new s.A(n,"Layer source does not support queryRelatedFeaturesCount capability");return o.queryRelatedFeaturesCount(b.default.from(t),r)}async function F(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function C(e){const t=new c.A,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function O(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function R(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function N(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function q(e,t){const{subtypes:r,subtypeField:n}=e;if(!t||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find((e=>e.code===o))}async function B(e){return(await e.load()).source}async function D(e,t,r){const o=e.parsedUrl?.path;o&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let r;try{const o=await(0,y.wI)(e,t);o&&(r=await n.id.checkSignInStatus(`${o}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await n.id.getCredential(e,{signal:r})}catch(e){}}(o,r)}function G(e){return!J(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const T=(0,u.C)({types:o.xK});function V(e,t){if(e.defaultSymbol)return e.types?.length?new f.A({defaultSymbol:T(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:T(e.symbol,e,t)})))}):new h.A({symbol:T(e.defaultSymbol,e,t)})}function $(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function H(e,t,r){if(null==t)return null;const n=[],{objectIdField:o}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[r],objectId:null!=n[o]&&-1!==n[o]?n[o]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${r}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[o,r],s.cacheHint=!1;const a=await(0,i.DZ)(p(e,s));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[r],n=e.attributes[o];null!=t&&null!=n&&-1!==n&&l.set(t,n)}return l}function k(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function J(e){return e.sourceJSON?.isMultiServicesView||function(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}(e)}},39383:(e,t,r)=>{r.d(t,{w:()=>l,z:()=>c});var n=r(49186),o=r(53966),i=r(81457);const s=()=>o.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map((e=>{const n=new i.A;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;n.labelExpression=n.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`))}return n})):null}const u={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const o of e){const e=o.labelPlacement,i=u[t];if(!o.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!i)return s().error(new n.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(i.includes(e))r.push(o);else{const n=i[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${n}`);const a=o.clone();a.labelPlacement=n,r.push(a)}}return r}},54546:(e,t,r)=>{r.d(t,{A:()=>d});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937);let p=n=class extends i.oY{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],p.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=n=(0,o._)([(0,u.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n,o=r(90237),i=(r(59456),r(25482)),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937),p=r(27733),d=r(16930);let y=n=class extends i.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:p.L,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,o._)([(0,a.MZ)({type:Date})],y.prototype,"historicMoment",void 0),(0,o._)([(0,c.K)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,o._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],y.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=n=(0,o._)([(0,u.$)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.dp)(y);const h=y},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var n=r(13874),o=r(30524),i=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},y){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||h).map((t=>new a.A({fieldName:t.name,isEditable:(0,o.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},y);if(!f.length)return null;const m=function(e){const t=(0,o.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.A,new i.A];return new n.A({title:m,content:b,fieldInfos:f})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:y(e)?-1:y(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,o.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function y(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const h=["geometry","blob","raster","guid","xml"]}}]);