@arcgis/core 6.0.0-next.33 → 6.0.0-next.34
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.
- package/README.md +2 -2
- package/applications/Urban/meshUtils.d.ts +1 -0
- package/applications/Urban/meshUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f3dc0bc0e00635855a7a.js → 03daf6f235c6edef6268.js} +1 -1
- package/assets/esri/core/workers/chunks/04a1d08c3b5b1dc7628f.js +1 -0
- package/assets/esri/core/workers/chunks/{1eaf8bfdd3765a90ccc2.js → 0523f893870a1546d7d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{72d20d3957d612f86431.js → 0a508e25ec05363e1f04.js} +1 -1
- package/assets/esri/core/workers/chunks/{84038dd85005fea413eb.js → 139e753d95cfc9470e74.js} +1 -1
- package/assets/esri/core/workers/chunks/15950c2fb173b62ee0ec.js +1 -0
- package/assets/esri/core/workers/chunks/{418addce122dbb8897b4.js → 1a614bac5db42c6263f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{58c3ae6030def2ed5f31.js → 1b17f5f720f6cf3f6d73.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9dc38761b314d33890f.js → 1f51567f47c2e2fc8a23.js} +1 -1
- package/assets/esri/core/workers/chunks/2211ff0a1f1ae8100231.js +1 -0
- package/assets/esri/core/workers/chunks/24ada9511b074dc5ae27.js +1 -0
- package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +1 -0
- package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +2 -0
- package/assets/esri/core/workers/chunks/2c8ca43563c4f3e94535.js +1 -0
- package/assets/esri/core/workers/chunks/{55a9eaeb152a3abada67.js → 311e4969f19df63451dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{8da2a10318f49d0dc73a.js → 31ef7b7074b3e3829763.js} +1 -1
- package/assets/esri/core/workers/chunks/{360c944c610efa2051fc.js → 379db67f78161ebd5468.js} +2 -2
- package/assets/esri/core/workers/chunks/{b8fd7c3b36981261378b.js → 38df7b1d58c4bcf693d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{be55771758e4bcef0976.js → 3e406043a374ee17475b.js} +1 -1
- package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +1 -0
- package/assets/esri/core/workers/chunks/{a596779eaeec7310671d.js → 478a89317a12e9b4d146.js} +1 -1
- package/assets/esri/core/workers/chunks/{fcc3902d6d9eda6f09f5.js → 48b8b57f559a53c6c513.js} +1 -1
- package/assets/esri/core/workers/chunks/4f3e0d583cfa9d1d6727.js +2 -0
- package/assets/esri/core/workers/chunks/507ecc3692e6d0700958.js +1 -0
- package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js → 5864bce1498a13ee5b7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{f4d91d470ca5fea0bd26.js → 5bd1414220e42cb8ebcf.js} +1 -1
- package/assets/esri/core/workers/chunks/5c3aa8386705c5e40358.js +1 -0
- package/assets/esri/core/workers/chunks/{176d75e76318bfc25a53.js → 60c8eedd06080edab3e3.js} +1 -1
- package/assets/esri/core/workers/chunks/661847f1b7044f21600f.js +1 -0
- package/assets/esri/core/workers/chunks/{1a8d8274df292d65f82e.js → 676c8c0329d68f9f3ac4.js} +1 -1
- package/assets/esri/core/workers/chunks/{29cc6b1705418b1be5d7.js → 687deb918eb48a963c8f.js} +1 -1
- package/assets/esri/core/workers/chunks/{0694c7bcfe71692e2ccf.js → 723df53cfa0189837d01.js} +1 -1
- package/assets/esri/core/workers/chunks/7582654a0fc70910731c.js +1 -0
- package/assets/esri/core/workers/chunks/{1ee4df0fd61440cb5f02.js → 7810586c35dfe1437516.js} +1 -1
- package/assets/esri/core/workers/chunks/8517d96fc8ba7b21d845.js +2 -0
- package/assets/esri/core/workers/chunks/90360c0bd053d3e3fd77.js +1 -0
- package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +1 -0
- package/assets/esri/core/workers/chunks/{0e445ec3523de9f2dfa2.js → a107f16cd004626b5018.js} +1 -1
- package/assets/esri/core/workers/chunks/{e3b212f8af448ec29eef.js → a1e8209d00809c9520a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{46453ebfee17b5421d9d.js → bf62be00f3040f91aaee.js} +1 -1
- package/assets/esri/core/workers/chunks/{89dc49e784f7ba3b93ea.js → c034c30e577d620b8e28.js} +1 -1
- package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +2 -0
- package/assets/esri/core/workers/chunks/{2226c20c38e20713bcb5.js.LICENSE.txt → c5bf19da62a3d31009fe.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{6bb191b19ce43a27f205.js → caad4f475d6eb01c2850.js} +1 -1
- package/assets/esri/core/workers/chunks/cd55cad81accf51d2989.js +1 -0
- package/assets/esri/core/workers/chunks/db1f7b2562de495b3401.js +2 -0
- package/assets/esri/core/workers/chunks/e0a37d3bcb9a944e53dd.js +1 -0
- package/assets/esri/core/workers/chunks/{fe6dcb21570395e46ce8.js → e0a7a75709121a26f255.js} +1 -1
- package/assets/esri/core/workers/chunks/{096b2bf1c0d69d27f20c.js → e8e54faf947a582b4cf7.js} +1 -1
- package/assets/esri/core/workers/chunks/{636e9c4ac1f9ae98f9d1.js → ea81f9d71b0842a4be26.js} +1 -1
- package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js → eaa0e906b46ae4c84d72.js} +2 -2
- package/assets/esri/core/workers/chunks/{a504a5e06cb89a620799.js → ec8b7476eac4718eb0ac.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +55 -46
- package/chunks/GlobalIlluminationBlur.glsl.js +13 -9
- package/chunks/RibbonLine.glsl.js +90 -88
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/workers.d.ts +1 -0
- package/geometry/support/MeshLocalVertexSpace.d.ts +3 -3
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/kernel.d.ts +3 -3
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/WFSLayer.d.ts +8 -4
- package/layers/graphics/sources/WFSSource.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/mixins/ArcGISMapService.d.ts +17 -0
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/ogc/wfsUtils.d.ts +7 -2
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/ogc/xmlUtils.js +1 -1
- package/package.json +4 -4
- package/rest/route.d.ts +1 -1
- package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
- package/rest/support/LengthsParameters.d.ts +1 -1
- package/symbols/TextSymbol.d.ts +0 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/state/ScreenSizePerspective.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCache.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/assets/esri/core/workers/chunks/0cc7fba402a93e6d2455.js +0 -2
- package/assets/esri/core/workers/chunks/131185d26343a997495e.js +0 -1
- package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +0 -1
- package/assets/esri/core/workers/chunks/2226c20c38e20713bcb5.js +0 -2
- package/assets/esri/core/workers/chunks/2981e904ab62f3ed80d0.js +0 -2
- package/assets/esri/core/workers/chunks/32cc59e126df8c96a0cf.js +0 -2
- package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +0 -1
- package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +0 -1
- package/assets/esri/core/workers/chunks/7084dd6e10c6c1393e92.js +0 -1
- package/assets/esri/core/workers/chunks/7566321c6a2913f2852b.js +0 -1
- package/assets/esri/core/workers/chunks/7b5cd150a4d0139850be.js +0 -1
- package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +0 -1
- package/assets/esri/core/workers/chunks/844eedda8f749972f707.js +0 -2
- package/assets/esri/core/workers/chunks/87177e0f82e8a6ae3189.js +0 -1
- package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +0 -1
- package/assets/esri/core/workers/chunks/a2196a49f89d57a0a1c7.js +0 -1
- package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +0 -1
- package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +0 -1
- package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +0 -1
- package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +0 -1
- /package/assets/esri/core/workers/chunks/{844eedda8f749972f707.js.LICENSE.txt → 2b4dd42920d37b1ff0a9.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{32cc59e126df8c96a0cf.js.LICENSE.txt → 4f3e0d583cfa9d1d6727.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js.LICENSE.txt → 5864bce1498a13ee5b7e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{0cc7fba402a93e6d2455.js.LICENSE.txt → 8517d96fc8ba7b21d845.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2981e904ab62f3ed80d0.js.LICENSE.txt → db1f7b2562de495b3401.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js.LICENSE.txt → eaa0e906b46ae4c84d72.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9567],{29242(t,n,r){function e(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,r,e,a,u,i,o,c){return[t,n,r,e,a,u,i,o,c]}r.d(n,{fA:()=>a,vt:()=>e});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:a},Symbol.toStringTag,{value:"Module"})),r.d(n,["zK",0,u])},34304(t,n,r){r.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let e=1e-6;function a(){return e}const u=Math.random,i=Math.PI/180,o=180/Math.PI;function c(t){return t*i}function f(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:u,equals:function(t,n){return Math.abs(t-n)<=e*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){e=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),r.d(n,["Ov",0,u])},77690(t,n,r){r.d(n,{B8:()=>o,Ge:()=>M,I0:()=>s,KC:()=>c,a4:()=>f,hZ:()=>u,hs:()=>l,lw:()=>h,mg:()=>i,z0:()=>a});var e=r(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,a,u,i,o,c,f){return t[0]=n,t[1]=r,t[2]=e,t[3]=a,t[4]=u,t[5]=i,t[6]=o,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let r=n[1],e=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;return m?(m=1/m,t[0]=l*m,t[1]=(-h*e+a*f)*m,t[2]=(o*e-a*i)*m,t[3]=s*m,t[4]=(h*r-a*c)*m,t[5]=(-o*r+a*u)*m,t[6]=M*m,t[7]=(-f*r+e*c)*m,t[8]=(i*r-e*u)*m,t):null}function c(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8];return t[0]=i*h-o*f,t[1]=a*f-e*h,t[2]=e*o-a*i,t[3]=o*c-u*h,t[4]=r*h-a*c,t[5]=a*u-r*o,t[6]=u*f-i*c,t[7]=e*c-r*f,t[8]=r*i-e*u,t}function f(t){let n=t[0],r=t[1],e=t[2],a=t[3],u=t[4],i=t[5],o=t[6],c=t[7],f=t[8];return n*(f*u-i*c)+r*(-f*a+i*o)+e*(c*a-u*o)}function h(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1],m=r[2],b=r[3],d=r[4],x=r[5],p=r[6],y=r[7],v=r[8];return t[0]=s*e+M*i+m*f,t[1]=s*a+M*o+m*h,t[2]=s*u+M*c+m*l,t[3]=b*e+d*i+x*f,t[4]=b*a+d*o+x*h,t[5]=b*u+d*c+x*l,t[6]=p*e+y*i+v*f,t[7]=p*a+y*o+v*h,t[8]=p*u+y*c+v*l,t}function l(t,n,r){let e=r[0],a=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function s(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=r+r,o=e+e,c=a+a,f=r*i,h=e*i,l=e*o,s=a*i,M=a*o,m=a*c,b=u*i,d=u*o,x=u*c;return t[0]=1-l-m,t[3]=h-x,t[6]=s+d,t[1]=h+x,t[4]=1-f-m,t[7]=M-b,t[2]=s-d,t[5]=M+b,t[8]=1-f-l,t}function M(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=n[9],s=n[10],M=n[11],m=n[12],b=n[13],d=n[14],x=n[15],p=r*o-e*i,y=r*c-a*i,v=r*f-u*i,g=e*c-a*o,q=e*f-u*o,P=a*f-u*c,I=h*b-l*m,S=h*d-s*m,R=h*x-M*m,E=l*d-s*b,k=l*x-M*b,N=s*x-M*d,F=p*N-y*k+v*E+g*R-q*S+P*I;return F?(F=1/F,t[0]=(o*N-c*k+f*E)*F,t[1]=(c*R-i*N-f*S)*F,t[2]=(i*k-o*R+f*I)*F,t[3]=(a*k-e*N-u*E)*F,t[4]=(r*N-a*R+u*S)*F,t[5]=(e*R-r*k-u*I)*F,t[6]=(b*P-d*q+x*g)*F,t[7]=(d*v-m*P-x*y)*F,t[8]=(m*q-b*v+x*p)*F,t):null}function m(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const b=h,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8],s=n[0],M=n[1],m=n[2],b=n[3],d=n[4],x=n[5],p=n[6],y=n[7],v=n[8],g=(0,e.FD)();return Math.abs(r-s)<=g*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-M)<=g*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-m)<=g*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(i-b)<=g*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-d)<=g*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(c-x)<=g*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-p)<=g*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-y)<=g*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-v)<=g*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:s,fromRotation:function(t,n){let r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){let n=(0,e.FD)(),r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+i*i+f*f))<=n&&Math.abs(1-(a*a+o*o+h*h))<=n&&Math.abs(1-(u*u+c*c+l*l))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let r=n[0],e=n[1],a=n[2],u=n[4],i=n[5],o=n[6],c=n[8],f=n[9],h=n[10],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;if(!m)return null;let b=1/m;return t[0]=l*b,t[1]=(-h*e+a*f)*b,t[2]=(o*e-a*i)*b,t[3]=s*b,t[4]=(h*r-a*c)*b,t[5]=(-o*r+a*u)*b,t[6]=M*b,t[7]=(-f*r+e*c)*b,t[8]=(i*r-e*u)*b,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=Math.sin(r),M=Math.cos(r);return t[0]=M*e+s*i,t[1]=M*a+s*o,t[2]=M*u+s*c,t[3]=M*i-s*e,t[4]=M*o-s*a,t[5]=M*c-s*u,t[6]=f,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){let e=r[0],a=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1];return t[0]=e,t[1]=a,t[2]=u,t[3]=i,t[4]=o,t[5]=c,t[6]=s*e+M*i+f,t[7]=s*a+M*o+h,t[8]=s*u+M*c+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,r){r.d(n,{C:()=>u,Cc:()=>q,Io:()=>d,LI:()=>M,Ln:()=>b,Om:()=>g,Re:()=>c,S8:()=>v,T9:()=>l,WQ:()=>o,aI:()=>R,e$:()=>I,hG:()=>x,hZ:()=>i,hs:()=>m,l0:()=>P,qE:()=>s,t2:()=>S});var e=r(34727),a=r(34304);function u(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function s(t,n,r,a){return t[0]=(0,e.qE)(n[0],r[0],a[0]),t[1]=(0,e.qE)(n[1],r[1],a[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function d(t,n){let r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function x(t,n){let r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function p(t){let n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function y(t){let n=t[0],r=t[1];return n*n+r*r}function v(t,n){let r=n[0],e=n[1],a=r*r+e*e;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function q(t,n,r,e){let a=n[0],u=n[1];return t[0]=a+e*(r[0]-a),t[1]=u+e*(r[1]-u),t}function P(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a+r[4],t[1]=r[1]*e+r[3]*a+r[5],t}function I(t,n,r,e){let a=n[0]-r[0],u=n[1]-r[1],i=Math.sin(e),o=Math.cos(e);return t[0]=a*o-u*i+r[0],t[1]=a*i+u*o+r[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function R(t,n){let r=t[0],e=t[1],u=n[0],i=n[1],o=(0,a.FD)();return Math.abs(r-u)<=o*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))}const E=p,k=c,N=f,F=h,_=d,K=x,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(t,n){let r=t[0],e=t[1],a=n[0],u=n[1],i=r*r+e*e;i>0&&(i=1/Math.sqrt(i));let o=a*a+u*u;o>0&&(o=1/Math.sqrt(o));let c=(r*a+e*u)*i*o;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:s,copy:u,cross:function(t,n,r){let e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:_,distance:d,div:F,divide:h,dot:g,equals:R,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:E,length:p,lerp:q,max:l,min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:N,multiply:f,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:v,projectAndScale:function(t,n,r,e,a){let u=n[0]-r[0],i=n[1]-r[1],o=(e[0]*u+e[1]*i)*(a-1);return u=e[0]*o,i=e[1]*o,t[0]=n[0]+u,t[1]=n[1]+i,t},random:function(t,n=1){let r=2*(0,a.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:I,round:M,scale:m,scaleAndAdd:b,set:i,sqrDist:K,sqrLen:D,squaredDistance:x,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:k,subtract:c,transformMat2:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a,t[1]=r[1]*e+r[3]*a,t},transformMat2d:P,transformMat3:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[3]*a+r[6],t[1]=r[1]*e+r[4]*a+r[7],t},transformMat4:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[4]*a+r[12],t[1]=r[1]*e+r[5]*a+r[13],t}},Symbol.toStringTag,{value:"Module"})),r.d(n,["Il",0,E,"jb",0,k,"xg",0,_])},34727(t,n,r){r.d(n,{$8:()=>P,Cc:()=>i,Hx:()=>b,Io:()=>g,KJ:()=>f,OS:()=>R,Sp:()=>s,XM:()=>h,YN:()=>l,ZH:()=>m,b6:()=>q,cU:()=>a,gg:()=>M,hs:()=>o,kU:()=>c,or:()=>S,pF:()=>k,qE:()=>u});const e=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n,r){return t+(n-t)*r}function o(t,n,r,e,a){return i(e,a,(t-n)/(r-n))}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function h(t){return Math.acos(u(t,-1,1))}function l(t){return Math.asin(u(t,-1,1))}function s(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function M(t,n,r=1e-6){return!s(t,n,r)&&t>n}function m(t,n,r=1e-6){return!s(t,n,r)&&t<n}function b(t,n,r=1e-6){return s(t,n,r)||t>n}const d=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function x(t){return d.setFloat64(0,t),d.getBigInt64(0)}const p=1000000n,y=v(1);function v(t){let n=x(t=Math.abs(t)),r=function(t){return d.setBigInt64(0,t),d.getFloat64(0)}(n<=p?p:n-p);return Math.abs(t-r)}function g(t,n,r=y){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&v(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;let e=x(t),a=x(n);return!(e<0!=a<0||(e<a?a-e:e-a)>p)}function q(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let e=Math.abs(t-n),a=Math.abs(t),u=Math.abs(n);if(0===t||0===n||a<1e-12&&u<1e-12){if(e>.01*r)return!1}else if(e/(a+u)>r)return!1;return!0}function P(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return e[0]=t,e[0]}function S(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(s(n,1)&&s(r,1)&&s(e,1))}function R(t,n){return(t%n+n)%n}const E=I(34028234663852886e22);function k(t,n,r){if(void 0===r||0==+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}r.d(n,["pq",0,E])},19419(t,n,r){r.d(n,{$9:()=>P,C:()=>u,DC:()=>m,HY:()=>q,IO:()=>l,Ie:()=>S,Rj:()=>g,Uc:()=>v,VL:()=>b,VY:()=>o,Wc:()=>x,aI:()=>E,bx:()=>s,fA:()=>i,fT:()=>M,gR:()=>I,gX:()=>p,ib:()=>y,nw:()=>h,pJ:()=>k,tK:()=>f,uJ:()=>d,vt:()=>a,w1:()=>c}),r(34727);var e=r(5443);function a(t=F){return[t[0],t[1],t[2],t[3]]}function u(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function i(t,n,r,e,u=a()){return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u}function o(t,n=a()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function c(t,n,r=new e.A){return r.xmin=t[0],r.ymin=t[1],r.xmax=t[2],r.ymax=t[3],r.spatialReference=n,r}function f(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function h(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function l(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function s(t,{xmin:n,ymin:r,xmax:e,ymax:a}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],a)}function M(t,n,r){if(null==n)u(r,t);else if("length"in n)R(n)?(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[2]),r[3]=Math.max(t[3],n[3])):(2===n.length||3===n.length)&&(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[0]),r[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":r[0]=Math.min(t[0],n.xmin),r[1]=Math.min(t[1],n.ymin),r[2]=Math.max(t[2],n.xmax),r[3]=Math.max(t[3],n.ymax);break;case"point":r[0]=Math.min(t[0],n.x),r[1]=Math.min(t[1],n.y),r[2]=Math.max(t[2],n.x),r[3]=Math.max(t[3],n.y)}}function m(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])}function b(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function d(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function x(t){return b(t)*d(t)}function p(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function y(t){let n=b(t),r=d(t);return Math.sqrt(n*n+r*r)}function v(t,n){return g(t,n[0],n[1])}function g(t,n,r){return n>=t[0]&&r>=t[1]&&n<=t[2]&&r<=t[3]}function q(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function P(t,n,r){return Math.max(n[0],t[0])-r<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-r<=Math.min(n[3],t[3])}function I(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function S(t){return t?u(t,N):a(N)}function R(t){return null!=t&&4===t.length}function E(t,n){return R(t)&&R(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:null==t&&null==n||t===n}function k(t,n){if(4!==n.length||t[0]===t[2]||t[1]===t[3])return!1;for(let r=0;r<n.length;r++){let e=n[r],a=n[(r+1)%n.length];if(e[0]!==t[0]&&e[0]!==t[2]||e[1]!==t[1]&&e[1]!==t[3])return!1;let u=e[1]===a[1]&&e[0]!==a[0],i=e[0]===a[0]&&e[1]!==a[1];if(!u&&!i)return!1}return!0}const N=[1/0,1/0,-1/0,-1/0],F=[0,0,0,0];r.d(n,["qv",0,N])},4305(t,n,r){r.d(n,{B4:()=>c,jK:()=>h,lM:()=>s,m_:()=>l,ty:()=>m});var e=r(34727),a=(r(37585),r(19419)),u=r(15507);const i=[0,0];function o(t){let n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function c(t,n,r,e,a){let[u,i,c,f]=o(a);return[t[0]*u+n[0]*i+r[0]*c+e[0]*f,t[1]*u+n[1]*i+r[1]*c+e[1]*f]}function f(t,n,r,e,a){let[u,i,c,f]=o(a);return t*u+n*i+r*c+e*f}function h(t,n,r){let e=t,[a,o,c]=n.b,f=(0,u.RS)([0,0],e,o,r),h=(0,u.RS)(i,o,c,r),l=(0,u.RS)([0,0],c,a,r),s=(0,u.RS)([0,0],f,h,r),M=(0,u.RS)([0,0],h,l,r);return[{b:[(0,u.RS)([],s,M,r),f,s]},{b:[[...a],M,l]}]}function l(t,n,r){let a=t,[i,o,f]=n.b,h=(0,u.R)(r,[.1,.5,.9],t=>{let n=1-t,[r,e]=c(a,o,f,i,t);return[r,e,3*n*n*(o[0]-a[0])+6*n*t*(f[0]-o[0])+3*t*t*(i[0]-f[0]),3*n*n*(o[1]-a[1])+6*n*t*(f[1]-o[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*o[0]+a[0])+6*t*(i[0]-2*f[0]+o[0]),6*n*(f[1]-2*o[1]+a[1])+6*t*(i[1]-2*f[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0,s=h.map(t=>{let n=c(a,o,f,i,t),[e,u]=n,h=r[0]-e,s=r[1]-u,M=Math.sqrt(h*h+s*s);return l=Math.min(M,l),{t,curvePoint:n,distance:M}}),M=[];for(let t of s){let{t:n,distance:r}=t;(0,e.b6)(r,l)&&!M.some(({t})=>(0,e.Sp)(t,n))&&M.push(t)}return M}function s(t,n,r){let e=n,[u,i,o]=r.b;if((0,a.tK)(t,e),(0,a.tK)(t,u),(0,a.Rj)(t,i[0],i[1])&&(0,a.Rj)(t,o[0],o[1]))return t;for(let n of M(e[0],i[0],o[0],u[0]))n>0&&n<1&&(0,a.nw)(t,f(e[0],i[0],o[0],u[0],n));for(let n of M(e[1],i[1],o[1],u[1]))n>0&&n<1&&(0,a.IO)(t,f(e[1],i[1],o[1],u[1],n));return t}function M(t,n,r,e){let a=3*(3*(n-r)-t+e),u=6*(t-2*n+r),i=3*(n-t);if(0===a)return 0===u?[]:[-i/u];let o=Math.sqrt(u*u-4*a*i);return[(-u+o)/(2*a),(-u-o)/(2*a)]}function m(t,n,r){let e=0,a=[n];for(let n=0;n<16;n++){let n=t,i=[];for(let t of a)i.push(...h(n,t,.5)),n=t.b[0];a=i,n=t,e=0;let o=0;for(let t of a){let[r,a,i]=t.b,c=Math.sqrt((0,u.kb)(n,r));e+=(c+(Math.sqrt((0,u.kb)(n,a))+Math.sqrt((0,u.kb)(a,i))+Math.sqrt((0,u.kb)(i,r))))/2,o+=c,n=r}if(e-o<r)return e}return e}},513(t,n,r){r.d(n,{KP:()=>i,X0:()=>h,fM:()=>f,mq:()=>c,zW:()=>l});var e=r(19419),a=r(59803),u=r(15507);class i{constructor(t,n,r,e,a,u){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=a,this.isInvalid=u}get startPoint(){let{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){let{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){let{cx:r,cy:e,radius:a}=t;return[r+a*Math.cos(n),e+a*Math.sin(n)]}function c(t,n){if(t.isInvalid)return(0,u.RS)([0,0],t.startPoint,t.endPoint,n);let{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function f(t,n){if(t.isInvalid)return(0,a.T)(t.startPoint,t.endPoint,n);let{cx:r,cy:e,thetaStart:i,thetaEnd:c}=t,[f,h]=n,l=(0,u.Pf)((0,u.yN)(i,c),Math.atan2(h-e,f-r)),s=o(t,l);return{t:(l-i)/(c-i),curvePoint:s,distance:Math.sqrt((0,u.kb)(n,s))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;let{cx:r,cy:a,radius:i,thetaStart:c,thetaEnd:f}=n;(0,e.tK)(t,o(n,c)),(0,e.tK)(t,o(n,f));let h=(0,u.yN)(c,f),l=Math.PI/2,s=0;for(let n of[[r+i,a],[r,a+i],[r-i,a],[r,a-i]])s=(0,u.Cp)(h,s),s>h.min&&s<h.max&&(0,e.tK)(t,n),s+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;let{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},50954(t,n,r){r.d(n,{GX:()=>h,pM:()=>f});var e=r(77690),a=r(29242),u=(r(37585),r(513)),i=r(15507);const o=(0,a.vt)();function c(t,n,r){let[a,u]=t,[c,f]=n,[h,l]=r;(0,e.hZ)(o,a,c,h,u,f,l,1,1,1);let s=(0,e.a4)(o),M=4*s/((0,i.kb)(t,n)+(0,i.kb)(n,r)+(0,i.kb)(r,t));if(!isFinite(M)||Math.abs(M)<1e-8)return null;let m=a**2+u**2,b=c**2+f**2,d=h**2+l**2;(0,e.hZ)(o,m,b,d,u,f,l,1,1,1);let x=(0,e.a4)(o);return(0,e.hZ)(o,m,b,d,a,c,h,1,1,1),[x/s*.5,(0,e.a4)(o)/s*-.5]}function f(t,n){let[r,e]=n.c,a=c(t,e,r),o=null==a,f=a??(0,i.RS)([],t,r,.5),[h,l]=t,[s,M]=e,[m,b]=r,[d,x]=f,p=h-d,y=l-x,v=Math.sqrt(p*p+y*y),g=(0,i.t7)(l-x,h-d),q=(0,i.t7)(M-x,s-d),P=(0,i.t7)(b-x,m-d);return(q-g)*(P-q)<0&&(P+=2*Math.sign(g-P)*Math.PI),new u.KP(d,x,v,g,P,o)}function h(t,n,r){let e=(0,u.mq)(t,r/2),a=(0,u.mq)(t,r),i=(0,u.mq)(t,(r+1)/2);return[{c:[a,e]},{c:[[...n.c[0]],i]}]}},79567(t,n,r){r.d(n,{e:()=>h});var e=r(19419),a=r(4305),u=r(513),i=r(50954),o=r(52006),c=r(49663),f=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,a.lM)(t,n,r);if((0,o.aO)(r)){let e=(0,i.pM)(n,r);return(0,u.X0)(t,e)}if((0,o.DA)(r)){let e=(0,c.io)(n,r);return(0,u.X0)(t,e)}return(0,f.DL)(t,n,r)}},52006(t,n,r){function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function a(t){return"curveRings"in t?t.curveRings:t.curvePaths}function u(t){return"b"in t}function i(t){return"c"in t}function o(t){return Array.isArray(t)}function c(t){return"a"in t}function f(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function l(t,n){return a(t).flat().some(t=>function(t,n){return!(o(t)||(u(t)?n.has("cubic-bezier"):i(t)?n.has("circular-arc"):!f(t)&&!h(t)||n.has("elliptic-arc")))}(t,n))}function s(t){return o(t)?t:u(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function M(t){if(u(t)){let[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(i(t)){let[n,r]=t.c;return{c:[[...n],[...r]]}}if(o(t))return[...t];if(f(t)){let[n,r,e,a]=t.a;return{a:[[...n],[...r],e,a]}}if(h(t)){let[n,r,e,a,u,i,o]=t.a;return{a:[[...n],[...r],e,a,u,i,o]}}return t}r.d(n,{DA:()=>f,Ed:()=>e,FD:()=>a,FG:()=>c,V8:()=>l,Xq:()=>o,aO:()=>i,n1:()=>u,tk:()=>M,wY:()=>h,yP:()=>s}),r(4576)},49663(t,n,r){r.d(n,{io:()=>i,xG:()=>o});var e=r(34727),a=(r(37585),r(513)),u=r(15507);function i(t,n){let[r,i,o,c]=n.a,[f,h]=t,[l,s]=r,[M,m]=i,b=f-M,d=h-m,x=Math.sqrt(b*b+d*d),p=l-M,y=s-m,v=Math.sqrt(p*p+y*y),g=0===x||0===v||!(0,e.b6)(x,v),q=x,[P,I]=(0,u.Gz)((0,u.t7)(h-m,f-M),Math.atan2(s-m,l-M),o,c);return new a.KP(M,m,q,P,I,g)}function o(t,n,r){let{cx:e,cy:u,thetaStart:i,thetaEnd:o}=t,[c,f,h,l]=n.a,s=i*(1-r)+o*r;return[{a:[(0,a.mq)(t,r),[e,u],+(Math.abs(s-i)<Math.PI),l]},{a:[[...c],[e,u],+(Math.abs(o-s)<Math.PI),l]}]}},46068(t,n,r){r.d(n,{DL:()=>M,ED:()=>l,SW:()=>c,Uk:()=>h,pb:()=>s,xm:()=>m}),r(77690);var e=r(29242),a=(r(37585),r(19419)),u=r(52006),i=r(15507);class o{constructor(t,n,r,e,a,u,i,o,c){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=a,this.sinR=u,this.u1=i,this.u2=o,this.isInvalid=c}}function c(t,n){let[r,e,a,u,c,f,h]=n.a,[l,s]=t,[M,m]=r,[b,d]=e,x=f*h,p=Math.cos(c),y=Math.sin(c),[v,g]=(0,i.Gz)((0,i.t7)(1/x*(s-d)*p-1/x*(l-b)*y,1/f*(s-d)*y+1/f*(l-b)*p),Math.atan2(1/x*(m-d)*p-1/x*(M-b)*y,1/f*(m-d)*y+1/f*(M-b)*p),a,u);return new o(b,d,f,x,p,y,v,g,0===f||0===x)}function f(t,n){let{a:r,b:e,cosR:a,sinR:u,cx:i,cy:o}=t,c=Math.cos(n),f=Math.sin(n);return[r*c*a-e*f*u+i,r*c*u+e*f*a+o]}function h(t,n){let{u1:r,u2:e}=t;return f(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,u.tk)(n)];let[e,[a,i],o,c,f,l,s]=n.a,{u1:M,u2:m}=t,b=M*(1-r)+m*r;return[{a:[[...h(t,r)],[a,i],+(Math.abs(b-M)<Math.PI),c,f,l,s]},{a:[[...e],[a,i],+(Math.abs(m-b)<Math.PI),c,f,l,s]}]}function s(t,n){let{a:r,b:e,cosR:a,sinR:u,u1:o,u2:c}=t,h=Math.PI/6,l=[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],s=(0,i.R)(n,l,n=>{let i=Math.cos(n),o=Math.sin(n),[c,h]=f(t,n);return[c,h,-r*a*o-e*u*i,-r*u*o+e*a*i,-r*a*i+e*u*o,-r*u*i-e*a*o]}),M=(0,i.yN)(o,c),m=new Set(s.map(t=>(0,i.Cp)(M,t)).filter(t=>t>M.min&&t<M.max));m.add(o),m.add(c);let b,d,x=1/0;for(let r of m){let e=f(t,r),[a,u]=e,i=n[0]-a,h=n[1]-u,l=i*i+h*h;l<x&&(b=(r-o)/(c-o),d=e,x=l)}return{t:b,curvePoint:d,distance:Math.sqrt(x)}}function M(t,n,r){let e=c(n,r),{a:u,b:o,u1:h,u2:l,cosR:s,sinR:M,isInvalid:m}=e,b=r.a[0];if((0,a.tK)(t,n),(0,a.tK)(t,b),m)return t;let d=Math.atan2(-o*M,u*s),x=d+Math.PI,p=Math.atan2(o*s,u*M),y=p+Math.PI,v=(0,i.yN)(h,l);for(let n of[d,x,p,y].map(t=>(0,i.Cp)(v,t)))n>v.min&&n<v.max&&(0,a.tK)(t,f(e,n));return t}function m(t,n,r){let[e,a,u,o,l,s,M]=n.a,m=c(t,n),{u1:b,u2:d,isInvalid:x}=m,p=d-b;if(x)return Math.sqrt((0,i.kb)(t,e));let y=[0,0],v=0,g=[h(m,0),h(m,.25),h(m,.5),h(m,.75),h(m,1)];for(let t=0;t<14;t++){let t=g.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(g[r]),e.push(f(m,b+(2*r+1)*n));e.push(g[g.length-1]),g=e,v=0;let u=0;for(let t=1;t<g.length;t++){let n=g[t-1],r=g[t];if(v+=Math.sqrt((0,i.kb)(n,r)),t>1){let e=g[t-2],o=(0,i.M_)(y,e,n,a,r);u+=o?Math.sqrt((0,i.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else u+=v}if(u-v<r)return v}return v}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},59803(t,n,r){r.d(n,{T:()=>u});var e=r(34727),a=r(15507);function u(t,n,r){let[u,i]=t,[o,c]=n,[f,h]=r,[l,s]=[o-u,c-i],M=l*(f-u)+s*(h-i);M/=l**2+s**2,M=isNaN(M)?0:(0,e.qE)(M,0,1);let m=(0,a.RS)([0,0],t,n,M);return{t:M,curvePoint:m,distance:Math.sqrt((0,a.kb)(m,r))}}},15507(t,n,r){r.d(n,{Cp:()=>b,Gz:()=>m,M_:()=>c,Pf:()=>d,R:()=>x,RS:()=>u,kb:()=>i,t7:()=>h,yE:()=>o,yN:()=>M});var e=r(34727),a=r(37585);function u(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function i(t,n){return(0,a.hG)(t,n)}function o(t,n,r){let e=i(n,r);if(0===e)return i(n,t);let a=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return a*a/e}function c(t,n,r,e,a){let[u,i]=n,[o,c]=r,[f,h]=e,[l,s]=a,M=(u-o)*(h-s)-(i-c)*(f-l);if(0===M)return null;let m=(u*c-i*o)*(f-l)-(u-o)*(f*s-h*l),b=(u*c-i*o)*(h-s)-(i-c)*(f*s-h*l);return t[0]=m/M,t[1]=b/M,t}const f=2*Math.PI;function h(t,n){let r=Math.atan2(t,n);return r<0?r+f:r}function l(t){return Math.abs(t)%f}function s(t){let n=l(t);return n<Math.PI?n:f-n}function M(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,a){if((0,e.Sp)(l(t-n),0))return r?[t,t]:[t,a?t-f:t+f];let[u,i]=a?[t-f,t]:[t,t+f];return[t,b({min:u,max:i},n)]}function b({min:t,max:n},r){let e;return e=n-r,e>=f?(e-=e%f,r+e):(e=r-t,e>=f?(e-=e%f,r-e):r)}function d(t,n){let r=b(t,n);return r>t.min&&r<t.max?r:s(r-t.min)<s(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let a=n;for(let n=0;n<e;n++){let[n,e,u,i,o,c]=r(a),f=t[0]-n,h=t[1]-e,l=-u,s=-i;a+=-(2*f*l+2*h*s)/(2*l*l+2*f*-o+2*s*s+2*h*-c||1e-6)}return a})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9567],{29242(t,n,r){function e(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,r,e,a,u,i,o,c){return[t,n,r,e,a,u,i,o,c]}r.d(n,{fA:()=>a,vt:()=>e});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:a},Symbol.toStringTag,{value:"Module"})),r.d(n,["zK",0,u])},34304(t,n,r){r.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let e=1e-6;function a(){return e}const u=Math.random,i=Math.PI/180,o=180/Math.PI;function c(t){return t*i}function f(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:u,equals:function(t,n){return Math.abs(t-n)<=e*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){e=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),r.d(n,["Ov",0,u])},77690(t,n,r){r.d(n,{B8:()=>o,Ge:()=>M,I0:()=>s,KC:()=>c,a4:()=>f,hZ:()=>u,hs:()=>l,lw:()=>h,mg:()=>i,z0:()=>a});var e=r(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,a,u,i,o,c,f){return t[0]=n,t[1]=r,t[2]=e,t[3]=a,t[4]=u,t[5]=i,t[6]=o,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let r=n[1],e=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;return m?(m=1/m,t[0]=l*m,t[1]=(-h*e+a*f)*m,t[2]=(o*e-a*i)*m,t[3]=s*m,t[4]=(h*r-a*c)*m,t[5]=(-o*r+a*u)*m,t[6]=M*m,t[7]=(-f*r+e*c)*m,t[8]=(i*r-e*u)*m,t):null}function c(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8];return t[0]=i*h-o*f,t[1]=a*f-e*h,t[2]=e*o-a*i,t[3]=o*c-u*h,t[4]=r*h-a*c,t[5]=a*u-r*o,t[6]=u*f-i*c,t[7]=e*c-r*f,t[8]=r*i-e*u,t}function f(t){let n=t[0],r=t[1],e=t[2],a=t[3],u=t[4],i=t[5],o=t[6],c=t[7],f=t[8];return n*(f*u-i*c)+r*(-f*a+i*o)+e*(c*a-u*o)}function h(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1],m=r[2],b=r[3],d=r[4],x=r[5],p=r[6],y=r[7],v=r[8];return t[0]=s*e+M*i+m*f,t[1]=s*a+M*o+m*h,t[2]=s*u+M*c+m*l,t[3]=b*e+d*i+x*f,t[4]=b*a+d*o+x*h,t[5]=b*u+d*c+x*l,t[6]=p*e+y*i+v*f,t[7]=p*a+y*o+v*h,t[8]=p*u+y*c+v*l,t}function l(t,n,r){let e=r[0],a=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function s(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=r+r,o=e+e,c=a+a,f=r*i,h=e*i,l=e*o,s=a*i,M=a*o,m=a*c,b=u*i,d=u*o,x=u*c;return t[0]=1-l-m,t[3]=h-x,t[6]=s+d,t[1]=h+x,t[4]=1-f-m,t[7]=M-b,t[2]=s-d,t[5]=M+b,t[8]=1-f-l,t}function M(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=n[9],s=n[10],M=n[11],m=n[12],b=n[13],d=n[14],x=n[15],p=r*o-e*i,y=r*c-a*i,v=r*f-u*i,g=e*c-a*o,q=e*f-u*o,P=a*f-u*c,I=h*b-l*m,S=h*d-s*m,R=h*x-M*m,E=l*d-s*b,k=l*x-M*b,N=s*x-M*d,F=p*N-y*k+v*E+g*R-q*S+P*I;return F?(F=1/F,t[0]=(o*N-c*k+f*E)*F,t[1]=(c*R-i*N-f*S)*F,t[2]=(i*k-o*R+f*I)*F,t[3]=(a*k-e*N-u*E)*F,t[4]=(r*N-a*R+u*S)*F,t[5]=(e*R-r*k-u*I)*F,t[6]=(b*P-d*q+x*g)*F,t[7]=(d*v-m*P-x*y)*F,t[8]=(m*q-b*v+x*p)*F,t):null}function m(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const b=h,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8],s=n[0],M=n[1],m=n[2],b=n[3],d=n[4],x=n[5],p=n[6],y=n[7],v=n[8],g=(0,e.FD)();return Math.abs(r-s)<=g*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-M)<=g*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-m)<=g*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(i-b)<=g*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-d)<=g*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(c-x)<=g*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-p)<=g*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-y)<=g*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-v)<=g*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:s,fromRotation:function(t,n){let r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){let n=(0,e.FD)(),r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+i*i+f*f))<=n&&Math.abs(1-(a*a+o*o+h*h))<=n&&Math.abs(1-(u*u+c*c+l*l))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let r=n[0],e=n[1],a=n[2],u=n[4],i=n[5],o=n[6],c=n[8],f=n[9],h=n[10],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;if(!m)return null;let b=1/m;return t[0]=l*b,t[1]=(-h*e+a*f)*b,t[2]=(o*e-a*i)*b,t[3]=s*b,t[4]=(h*r-a*c)*b,t[5]=(-o*r+a*u)*b,t[6]=M*b,t[7]=(-f*r+e*c)*b,t[8]=(i*r-e*u)*b,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=Math.sin(r),M=Math.cos(r);return t[0]=M*e+s*i,t[1]=M*a+s*o,t[2]=M*u+s*c,t[3]=M*i-s*e,t[4]=M*o-s*a,t[5]=M*c-s*u,t[6]=f,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){let e=r[0],a=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1];return t[0]=e,t[1]=a,t[2]=u,t[3]=i,t[4]=o,t[5]=c,t[6]=s*e+M*i+f,t[7]=s*a+M*o+h,t[8]=s*u+M*c+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,r){r.d(n,{C:()=>u,Cc:()=>q,Io:()=>d,LI:()=>M,Ln:()=>b,Om:()=>g,Re:()=>c,S8:()=>v,T9:()=>l,WQ:()=>o,aI:()=>R,e$:()=>I,hG:()=>x,hZ:()=>i,hs:()=>m,l0:()=>P,qE:()=>s,t2:()=>S});var e=r(34727),a=r(34304);function u(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function s(t,n,r,a){return t[0]=(0,e.qE)(n[0],r[0],a[0]),t[1]=(0,e.qE)(n[1],r[1],a[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function d(t,n){let r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function x(t,n){let r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function p(t){let n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function y(t){let n=t[0],r=t[1];return n*n+r*r}function v(t,n){let r=n[0],e=n[1],a=r*r+e*e;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function q(t,n,r,e){let a=n[0],u=n[1];return t[0]=a+e*(r[0]-a),t[1]=u+e*(r[1]-u),t}function P(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a+r[4],t[1]=r[1]*e+r[3]*a+r[5],t}function I(t,n,r,e){let a=n[0]-r[0],u=n[1]-r[1],i=Math.sin(e),o=Math.cos(e);return t[0]=a*o-u*i+r[0],t[1]=a*i+u*o+r[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function R(t,n){let r=t[0],e=t[1],u=n[0],i=n[1],o=(0,a.FD)();return Math.abs(r-u)<=o*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))}const E=p,k=c,N=f,F=h,_=d,K=x,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(t,n){let r=t[0],e=t[1],a=n[0],u=n[1],i=r*r+e*e;i>0&&(i=1/Math.sqrt(i));let o=a*a+u*u;o>0&&(o=1/Math.sqrt(o));let c=(r*a+e*u)*i*o;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:s,copy:u,cross:function(t,n,r){let e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:_,distance:d,div:F,divide:h,dot:g,equals:R,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:E,length:p,lerp:q,max:l,min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:N,multiply:f,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:v,projectAndScale:function(t,n,r,e,a){let u=n[0]-r[0],i=n[1]-r[1],o=(e[0]*u+e[1]*i)*(a-1);return u=e[0]*o,i=e[1]*o,t[0]=n[0]+u,t[1]=n[1]+i,t},random:function(t,n=1){let r=2*(0,a.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:I,round:M,scale:m,scaleAndAdd:b,set:i,sqrDist:K,sqrLen:D,squaredDistance:x,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:k,subtract:c,transformMat2:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a,t[1]=r[1]*e+r[3]*a,t},transformMat2d:P,transformMat3:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[3]*a+r[6],t[1]=r[1]*e+r[4]*a+r[7],t},transformMat4:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[4]*a+r[12],t[1]=r[1]*e+r[5]*a+r[13],t}},Symbol.toStringTag,{value:"Module"})),r.d(n,["Il",0,E,"jb",0,k,"xg",0,_])},34727(t,n,r){r.d(n,{$8:()=>P,Cc:()=>i,Hx:()=>b,Io:()=>g,KJ:()=>f,OS:()=>R,Sp:()=>s,XM:()=>h,YN:()=>l,ZH:()=>m,b6:()=>q,cU:()=>a,gg:()=>M,hs:()=>o,kU:()=>c,or:()=>S,pF:()=>k,qE:()=>u});const e=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n,r){return t+(n-t)*r}function o(t,n,r,e,a){return i(e,a,(t-n)/(r-n))}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function h(t){return Math.acos(u(t,-1,1))}function l(t){return Math.asin(u(t,-1,1))}function s(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function M(t,n,r=1e-6){return!s(t,n,r)&&t>n}function m(t,n,r=1e-6){return!s(t,n,r)&&t<n}function b(t,n,r=1e-6){return s(t,n,r)||t>n}const d=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function x(t){return d.setFloat64(0,t),d.getBigInt64(0)}const p=1000000n,y=v(1);function v(t){let n=x(t=Math.abs(t)),r=function(t){return d.setBigInt64(0,t),d.getFloat64(0)}(n<=p?p:n-p);return Math.abs(t-r)}function g(t,n,r=y){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&v(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;let e=x(t),a=x(n);return!(e<0!=a<0||(e<a?a-e:e-a)>p)}function q(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let e=Math.abs(t-n),a=Math.abs(t),u=Math.abs(n);if(0===t||0===n||a<1e-12&&u<1e-12){if(e>.01*r)return!1}else if(e/(a+u)>r)return!1;return!0}function P(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return e[0]=t,e[0]}function S(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(s(n,1)&&s(r,1)&&s(e,1))}function R(t,n){return(t%n+n)%n}const E=I(34028234663852886e22);function k(t,n,r){if(void 0===r||0==+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}r.d(n,["pq",0,E])},19419(t,n,r){r.d(n,{$9:()=>P,C:()=>u,DC:()=>m,HY:()=>q,IO:()=>l,Ie:()=>S,Rj:()=>g,Uc:()=>v,VL:()=>b,VY:()=>o,Wc:()=>x,aI:()=>E,bx:()=>s,fA:()=>i,fT:()=>M,gR:()=>I,gX:()=>p,ib:()=>y,nw:()=>h,pJ:()=>k,tK:()=>f,uJ:()=>d,vt:()=>a,w1:()=>c}),r(34727);var e=r(5443);function a(t=F){return[t[0],t[1],t[2],t[3]]}function u(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function i(t,n,r,e,u=a()){return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u}function o(t,n=a()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function c(t,n,r=new e.A){return r.xmin=t[0],r.ymin=t[1],r.xmax=t[2],r.ymax=t[3],r.spatialReference=n,r}function f(t,n){!function(t,n,r){h(t,n),l(t,r)}(t,n[0],n[1])}function h(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function l(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function s(t,{xmin:n,ymin:r,xmax:e,ymax:a}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],a)}function M(t,n,r){if(null==n)u(r,t);else if("length"in n)R(n)?(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[2]),r[3]=Math.max(t[3],n[3])):(2===n.length||3===n.length)&&(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[0]),r[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":r[0]=Math.min(t[0],n.xmin),r[1]=Math.min(t[1],n.ymin),r[2]=Math.max(t[2],n.xmax),r[3]=Math.max(t[3],n.ymax);break;case"point":r[0]=Math.min(t[0],n.x),r[1]=Math.min(t[1],n.y),r[2]=Math.max(t[2],n.x),r[3]=Math.max(t[3],n.y)}}function m(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])}function b(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function d(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function x(t){return b(t)*d(t)}function p(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function y(t){let n=b(t),r=d(t);return Math.sqrt(n*n+r*r)}function v(t,n){return g(t,n[0],n[1])}function g(t,n,r){return n>=t[0]&&r>=t[1]&&n<=t[2]&&r<=t[3]}function q(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function P(t,n,r){return Math.max(n[0],t[0])-r<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-r<=Math.min(n[3],t[3])}function I(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function S(t){return t?u(t,N):a(N)}function R(t){return null!=t&&4===t.length}function E(t,n){return R(t)&&R(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:null==t&&null==n||t===n}function k(t,n){if(4!==n.length||t[0]===t[2]||t[1]===t[3])return!1;for(let r=0;r<n.length;r++){let e=n[r],a=n[(r+1)%n.length];if(e[0]!==t[0]&&e[0]!==t[2]||e[1]!==t[1]&&e[1]!==t[3])return!1;let u=e[1]===a[1]&&e[0]!==a[0],i=e[0]===a[0]&&e[1]!==a[1];if(!u&&!i)return!1}return!0}const N=[1/0,1/0,-1/0,-1/0],F=[0,0,0,0];r.d(n,["qv",0,N])},4305(t,n,r){r.d(n,{B4:()=>c,jK:()=>h,lM:()=>s,m_:()=>l,ty:()=>m});var e=r(34727),a=(r(37585),r(19419)),u=r(15507);const i=[0,0];function o(t){let n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function c(t,n,r,e,a){let[u,i,c,f]=o(a);return[t[0]*u+n[0]*i+r[0]*c+e[0]*f,t[1]*u+n[1]*i+r[1]*c+e[1]*f]}function f(t,n,r,e,a){let[u,i,c,f]=o(a);return t*u+n*i+r*c+e*f}function h(t,n,r){let e=t,[a,o,c]=n.b,f=(0,u.RS)([0,0],e,o,r),h=(0,u.RS)(i,o,c,r),l=(0,u.RS)([0,0],c,a,r),s=(0,u.RS)([0,0],f,h,r),M=(0,u.RS)([0,0],h,l,r);return[{b:[(0,u.RS)([],s,M,r),f,s]},{b:[[...a],M,l]}]}function l(t,n,r){let a=t,[i,o,f]=n.b,h=(0,u.R)(r,[.1,.5,.9],t=>{let n=1-t,[r,e]=c(a,o,f,i,t);return[r,e,3*n*n*(o[0]-a[0])+6*n*t*(f[0]-o[0])+3*t*t*(i[0]-f[0]),3*n*n*(o[1]-a[1])+6*n*t*(f[1]-o[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*o[0]+a[0])+6*t*(i[0]-2*f[0]+o[0]),6*n*(f[1]-2*o[1]+a[1])+6*t*(i[1]-2*f[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0,s=h.map(t=>{let n=c(a,o,f,i,t),[e,u]=n,h=r[0]-e,s=r[1]-u,M=Math.sqrt(h*h+s*s);return l=Math.min(M,l),{t,curvePoint:n,distance:M}}),M=[];for(let t of s){let{t:n,distance:r}=t;(0,e.b6)(r,l)&&!M.some(({t})=>(0,e.Sp)(t,n))&&M.push(t)}return M}function s(t,n,r){let e=n,[u,i,o]=r.b;if((0,a.tK)(t,e),(0,a.tK)(t,u),(0,a.Rj)(t,i[0],i[1])&&(0,a.Rj)(t,o[0],o[1]))return t;for(let n of M(e[0],i[0],o[0],u[0]))n>0&&n<1&&(0,a.nw)(t,f(e[0],i[0],o[0],u[0],n));for(let n of M(e[1],i[1],o[1],u[1]))n>0&&n<1&&(0,a.IO)(t,f(e[1],i[1],o[1],u[1],n));return t}function M(t,n,r,e){let a=3*(3*(n-r)-t+e),u=6*(t-2*n+r),i=3*(n-t);if(0===a)return 0===u?[]:[-i/u];let o=Math.sqrt(u*u-4*a*i);return[(-u+o)/(2*a),(-u-o)/(2*a)]}function m(t,n,r){let e=0,a=[n];for(let n=0;n<16;n++){let n=t,i=[];for(let t of a)i.push(...h(n,t,.5)),n=t.b[0];a=i,n=t,e=0;let o=0;for(let t of a){let[r,a,i]=t.b,c=Math.sqrt((0,u.kb)(n,r));e+=(c+(Math.sqrt((0,u.kb)(n,a))+Math.sqrt((0,u.kb)(a,i))+Math.sqrt((0,u.kb)(i,r))))/2,o+=c,n=r}if(e-o<r)return e}return e}},513(t,n,r){r.d(n,{KP:()=>i,X0:()=>h,fM:()=>f,mq:()=>c,zW:()=>l});var e=r(19419),a=r(59803),u=r(15507);class i{constructor(t,n,r,e,a,u){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=a,this.isInvalid=u}get startPoint(){let{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){let{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){let{cx:r,cy:e,radius:a}=t;return[r+a*Math.cos(n),e+a*Math.sin(n)]}function c(t,n){if(t.isInvalid)return(0,u.RS)([0,0],t.startPoint,t.endPoint,n);let{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function f(t,n){if(t.isInvalid)return(0,a.T)(t.startPoint,t.endPoint,n);let{cx:r,cy:e,thetaStart:i,thetaEnd:c}=t,[f,h]=n,l=(0,u.Pf)((0,u.yN)(i,c),Math.atan2(h-e,f-r)),s=o(t,l);return{t:(l-i)/(c-i),curvePoint:s,distance:Math.sqrt((0,u.kb)(n,s))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;let{cx:r,cy:a,radius:i,thetaStart:c,thetaEnd:f}=n;(0,e.tK)(t,o(n,c)),(0,e.tK)(t,o(n,f));let h=(0,u.yN)(c,f),l=Math.PI/2,s=0;for(let n of[[r+i,a],[r,a+i],[r-i,a],[r,a-i]])s=(0,u.Cp)(h,s),s>h.min&&s<h.max&&(0,e.tK)(t,n),s+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;let{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},50954(t,n,r){r.d(n,{GX:()=>h,pM:()=>f});var e=r(77690),a=r(29242),u=(r(37585),r(513)),i=r(15507);const o=(0,a.vt)();function c(t,n,r){let[a,u]=t,[c,f]=n,[h,l]=r;(0,e.hZ)(o,a,c,h,u,f,l,1,1,1);let s=(0,e.a4)(o),M=4*s/((0,i.kb)(t,n)+(0,i.kb)(n,r)+(0,i.kb)(r,t));if(!isFinite(M)||Math.abs(M)<1e-8)return null;let m=a**2+u**2,b=c**2+f**2,d=h**2+l**2;(0,e.hZ)(o,m,b,d,u,f,l,1,1,1);let x=(0,e.a4)(o);return(0,e.hZ)(o,m,b,d,a,c,h,1,1,1),[x/s*.5,(0,e.a4)(o)/s*-.5]}function f(t,n){let[r,e]=n.c,a=c(t,e,r),o=null==a,f=a??(0,i.RS)([],t,r,.5),[h,l]=t,[s,M]=e,[m,b]=r,[d,x]=f,p=h-d,y=l-x,v=Math.sqrt(p*p+y*y),g=(0,i.t7)(l-x,h-d),q=(0,i.t7)(M-x,s-d),P=(0,i.t7)(b-x,m-d);return(q-g)*(P-q)<0&&(P+=2*Math.sign(g-P)*Math.PI),new u.KP(d,x,v,g,P,o)}function h(t,n,r){let e=(0,u.mq)(t,r/2),a=(0,u.mq)(t,r),i=(0,u.mq)(t,(r+1)/2);return[{c:[a,e]},{c:[[...n.c[0]],i]}]}},79567(t,n,r){r.d(n,{e:()=>h});var e=r(19419),a=r(4305),u=r(513),i=r(50954),o=r(52006),c=r(49663),f=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,a.lM)(t,n,r);if((0,o.aO)(r)){let e=(0,i.pM)(n,r);return(0,u.X0)(t,e)}if((0,o.DA)(r)){let e=(0,c.io)(n,r);return(0,u.X0)(t,e)}return(0,f.DL)(t,n,r)}},52006(t,n,r){function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function a(t){return"curveRings"in t?t.curveRings:t.curvePaths}function u(t){return"b"in t}function i(t){return"c"in t}function o(t){return Array.isArray(t)}function c(t){return"a"in t}function f(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function l(t,n){return a(t).flat().some(t=>function(t,n){return!(o(t)||(u(t)?n.has("cubic-bezier"):i(t)?n.has("circular-arc"):!f(t)&&!h(t)||n.has("elliptic-arc")))}(t,n))}function s(t){return o(t)?t:u(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function M(t){if(u(t)){let[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(i(t)){let[n,r]=t.c;return{c:[[...n],[...r]]}}if(o(t))return[...t];if(f(t)){let[n,r,e,a]=t.a;return{a:[[...n],[...r],e,a]}}if(h(t)){let[n,r,e,a,u,i,o]=t.a;return{a:[[...n],[...r],e,a,u,i,o]}}return t}r.d(n,{DA:()=>f,Ed:()=>e,FD:()=>a,FG:()=>c,V8:()=>l,Xq:()=>o,aO:()=>i,n1:()=>u,tk:()=>M,wY:()=>h,yP:()=>s}),r(4576)},49663(t,n,r){r.d(n,{io:()=>i,xG:()=>o});var e=r(34727),a=(r(37585),r(513)),u=r(15507);function i(t,n){let[r,i,o,c]=n.a,[f,h]=t,[l,s]=r,[M,m]=i,b=f-M,d=h-m,x=Math.sqrt(b*b+d*d),p=l-M,y=s-m,v=Math.sqrt(p*p+y*y),g=0===x||0===v||!(0,e.b6)(x,v),q=x,[P,I]=(0,u.Gz)((0,u.t7)(h-m,f-M),Math.atan2(s-m,l-M),o,c);return new a.KP(M,m,q,P,I,g)}function o(t,n,r){let{cx:e,cy:u,thetaStart:i,thetaEnd:o}=t,[c,f,h,l]=n.a,s=i*(1-r)+o*r;return[{a:[(0,a.mq)(t,r),[e,u],+(Math.abs(s-i)<Math.PI),l]},{a:[[...c],[e,u],+(Math.abs(o-s)<Math.PI),l]}]}},46068(t,n,r){r.d(n,{DL:()=>M,ED:()=>l,SW:()=>c,Uk:()=>h,pb:()=>s,xm:()=>m}),r(77690);var e=r(29242),a=(r(37585),r(19419)),u=r(52006),i=r(15507);class o{constructor(t,n,r,e,a,u,i,o,c){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=a,this.sinR=u,this.u1=i,this.u2=o,this.isInvalid=c}}function c(t,n){let[r,e,a,u,c,f,h]=n.a,[l,s]=t,[M,m]=r,[b,d]=e,x=f*h,p=Math.cos(c),y=Math.sin(c),[v,g]=(0,i.Gz)((0,i.t7)(1/x*(s-d)*p-1/x*(l-b)*y,1/f*(s-d)*y+1/f*(l-b)*p),Math.atan2(1/x*(m-d)*p-1/x*(M-b)*y,1/f*(m-d)*y+1/f*(M-b)*p),a,u);return new o(b,d,f,x,p,y,v,g,0===f||0===x)}function f(t,n){let{a:r,b:e,cosR:a,sinR:u,cx:i,cy:o}=t,c=Math.cos(n),f=Math.sin(n);return[r*c*a-e*f*u+i,r*c*u+e*f*a+o]}function h(t,n){let{u1:r,u2:e}=t;return f(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,u.tk)(n)];let[e,[a,i],o,c,f,l,s]=n.a,{u1:M,u2:m}=t,b=M*(1-r)+m*r;return[{a:[[...h(t,r)],[a,i],+(Math.abs(b-M)<Math.PI),c,f,l,s]},{a:[[...e],[a,i],+(Math.abs(m-b)<Math.PI),c,f,l,s]}]}function s(t,n){let{a:r,b:e,cosR:a,sinR:u,u1:o,u2:c}=t,h=Math.PI/6,l=[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],s=(0,i.R)(n,l,n=>{let i=Math.cos(n),o=Math.sin(n),[c,h]=f(t,n);return[c,h,-r*a*o-e*u*i,-r*u*o+e*a*i,-r*a*i+e*u*o,-r*u*i-e*a*o]}),M=(0,i.yN)(o,c),m=new Set(s.map(t=>(0,i.Cp)(M,t)).filter(t=>t>M.min&&t<M.max));m.add(o),m.add(c);let b,d,x=1/0;for(let r of m){let e=f(t,r),[a,u]=e,i=n[0]-a,h=n[1]-u,l=i*i+h*h;l<x&&(b=(r-o)/(c-o),d=e,x=l)}return{t:b,curvePoint:d,distance:Math.sqrt(x)}}function M(t,n,r){let e=c(n,r),{a:u,b:o,u1:h,u2:l,cosR:s,sinR:M,isInvalid:m}=e,b=r.a[0];if((0,a.tK)(t,n),(0,a.tK)(t,b),m)return t;let d=Math.atan2(-o*M,u*s),x=d+Math.PI,p=Math.atan2(o*s,u*M),y=p+Math.PI,v=(0,i.yN)(h,l);for(let n of[d,x,p,y].map(t=>(0,i.Cp)(v,t)))n>v.min&&n<v.max&&(0,a.tK)(t,f(e,n));return t}function m(t,n,r){let[e,a,u,o,l,s,M]=n.a,m=c(t,n),{u1:b,u2:d,isInvalid:x}=m,p=d-b;if(x)return Math.sqrt((0,i.kb)(t,e));let y=[0,0],v=0,g=[h(m,0),h(m,.25),h(m,.5),h(m,.75),h(m,1)];for(let t=0;t<14;t++){let t=g.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(g[r]),e.push(f(m,b+(2*r+1)*n));e.push(g[g.length-1]),g=e,v=0;let u=0;for(let t=1;t<g.length;t++){let n=g[t-1],r=g[t];if(v+=Math.sqrt((0,i.kb)(n,r)),t>1){let e=g[t-2],o=(0,i.M_)(y,e,n,a,r);u+=o?Math.sqrt((0,i.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else u+=v}if(u-v<r)return v}return v}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},59803(t,n,r){r.d(n,{T:()=>u});var e=r(34727),a=r(15507);function u(t,n,r){let[u,i]=t,[o,c]=n,[f,h]=r,[l,s]=[o-u,c-i],M=l*(f-u)+s*(h-i);M/=l**2+s**2,M=isNaN(M)?0:(0,e.qE)(M,0,1);let m=(0,a.RS)([0,0],t,n,M);return{t:M,curvePoint:m,distance:Math.sqrt((0,a.kb)(m,r))}}},15507(t,n,r){r.d(n,{Cp:()=>b,Gz:()=>m,M_:()=>c,Pf:()=>d,R:()=>x,RS:()=>u,kb:()=>i,t7:()=>h,yE:()=>o,yN:()=>M});var e=r(34727),a=r(37585);function u(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function i(t,n){return(0,a.hG)(t,n)}function o(t,n,r){let e=i(n,r);if(0===e)return i(n,t);let a=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return a*a/e}function c(t,n,r,e,a){let[u,i]=n,[o,c]=r,[f,h]=e,[l,s]=a,M=(u-o)*(h-s)-(i-c)*(f-l);if(0===M)return null;let m=(u*c-i*o)*(f-l)-(u-o)*(f*s-h*l),b=(u*c-i*o)*(h-s)-(i-c)*(f*s-h*l);return t[0]=m/M,t[1]=b/M,t}const f=2*Math.PI;function h(t,n){let r=Math.atan2(t,n);return r<0?r+f:r}function l(t){return Math.abs(t)%f}function s(t){let n=l(t);return n<Math.PI?n:f-n}function M(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,a){if((0,e.Sp)(l(t-n),0))return r?[t,t]:[t,a?t-f:t+f];let[u,i]=a?[t-f,t]:[t,t+f];return[t,b({min:u,max:i},n)]}function b({min:t,max:n},r){let e;return e=n-r,e>=f?(e-=e%f,r+e):(e=r-t,e>=f?(e-=e%f,r-e):r)}function d(t,n){let r=b(t,n);return r>t.min&&r<t.max?r:s(r-t.min)<s(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let a=n;for(let n=0;n<e;n++){let[n,e,u,i,o,c]=r(a),f=t[0]-n,h=t[1]-e,l=-u,s=-i;a+=-(2*f*l+2*h*s)/(2*l*l+2*f*-o+2*s*s+2*h*-c||1e-6)}return a})}}}]);
|
|
@@ -600,7 +600,7 @@ vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),g&&r.code.a
|
|
|
600
600
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
601
601
|
0.0, 0.0, 0.0 );
|
|
602
602
|
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
603
|
-
}`))}(e,t)}},68785(e,t,r){r.d(t,{n:()=>zt});var i=r(31821),n=r(12791),o=r(32198),a=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(69540);let f=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],f);const m=f;var p=r(69052),v=r(25482),g=r(78888),x=r(86738),_=r(43937),b=r(36005);let y=class extends((0,h.OU)(v.o)){constructor(...e){super(...e),this.position=new x.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new m}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){let n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){let n=e.clone();n.x=(0,g.GB)(e.x||0),n.y=(0,g.GB)(e.y||0),n.z=e.hasZ?(0,g.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){let r=new x.A;return r.read(e,t),r.x=(0,g.GB)(r.x||0),r.y=(0,g.GB)(r.y||0),r.z=r.hasZ?(0,g.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:x.A,json:{write:{isRequired:!0}}})],y.prototype,"position",void 0),(0,o.Cg)([(0,_.K)("position")],y.prototype,"writePosition",null),(0,o.Cg)([(0,b.w)("position")],y.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>p.ie.normalize((0,g.GB)(e)))],y.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e),-180,180))],y.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e,55),1,170))],y.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:m,nonNullable:!0,json:{read:!1,write:!1}})],y.prototype,"layout",void 0),y=(0,o.Cg)([(0,u.$K)("esri.Camera")],y);var w=r(9093),M=r(35522),T=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),A=r(27993),E=r(73941),I=(r(19419),r(58083)),O=r(65720),P=r(71351),D=r(69622),R=r(53966),F=r(90629),B=r(48163),N=r(78955),z=r(91829),L=r(44280);function H(e,t,r){e.worldUpAtPosition(t,V),(0,M.Re)(U,r,t);let i=(0,M.Bw)(U);return 0===i?0:(0,a.XM)((0,M.Om)(U,V)/i)}const V=(0,T.vt)(),U=(0,T.vt)();var j;let k=j=class extends D.A{constructor(e){super(e),this._ray=(0,P.vt)(),this._viewport=(0,z.fA)(0,0,1,1),this._padding=(0,z.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,B.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,w.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,w.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,w.vt)(),this._frustumDirty=!0,this._frustum=(0,O.vt)(),this._fullViewport=(0,z.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.pixelScale=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin,"eye")}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,I.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,I.Qw)((0,w.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,w.vt)()}get viewForward(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;let e=(0,N.hs)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,N.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;let e=(0,N.hs)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,N.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&=(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,N.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,N.C)(this._padding,e),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&=((0,I.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,I.B8)((0,w.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,w.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,I.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,I.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){let{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get renderPixelSizePerDistance(){return Math.tan(this.fovX/2)/(this.width/2)}get screenPixelSizePerDistance(){return this.renderPixelSizePerDistance*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){let e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,u=(0,I.$h)((0,w.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,I.t2)(d,u)?d:u}copyFrom(e){(0,M.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,N.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,N.C)(this._padding,e.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,d.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;let t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,I.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||=((0,O.C)(this._frustum,e.frustum),!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,I.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=e.pixelRatio,this.pixelScale=e.pixelScale,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new j).copyFrom(this)}equals(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&(0,N.t2)(this._viewport,e.viewport)&&(0,N.t2)(this._padding,e.padding)&&(0,d.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}equalsView(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&this._fov===e.fov}almostEquals(e){let t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,N.hG)(e.screenPadding,this.screenPadding)>=t||(0,N.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.jb)(Z,e.eye,e.center),(0,M.jb)($,this.eye,this.center);let r=(0,M.Om)(Z,$),i=(0,M.uE)(Z),n=(0,M.uE)($),o=5e-4;return r*r>=.9999999999*i*n&&(0,M.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDistance(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDistance(e){return e*this.renderPixelSizePerDistance}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDistance(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,M.Re)(Z,e,this.eye)))}computeScreenPixelSizeAtDistance(e){return e*this.screenPixelSizePerDistance}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){let t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==G&&(0,M.C)(G,e),G[3]=1,(0,N.Z0)(G,G,this.projectionMatrix);let r=Math.abs(G[3]);(0,M.hs)(G,G,1/r);let i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*G[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*G[1]),t[2]=.5*(G[2]+1),t[3]=r}unapplyProjection(e,t){let r=this.fullViewport;G[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],G[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],G[2]=(2*e[2]-1)*e[3],G[3]=e[3],null!=this.inverseProjectionMatrix&&((0,N.Z0)(G,G,this.inverseProjectionMatrix),t[0]=G[0],t[1]=G[1],t[2]=G[2])}projectToScreen(e,t){return null==this.projectToRenderScreen(e,q)?null:(this.renderToScreen(q,t),t)}projectToRenderScreen(e,t){if(G[0]=e[0],G[1]=e[1],G[2]=e[2],G[3]=1,(0,N.Z0)(G,G,this.viewProjectionMatrix),0===G[3])return null;let r=G;(0,M.hs)(r,r,1/Math.abs(G[3]));let i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,q),t)}unprojectFromRenderScreen(e,t){if((0,I.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,I.B8)(W,W))return null;let r=this.fullViewport;return G[0]=2*(e[0]-r[0])/r[2]-1,G[1]=2*(e[1]-r[1])/r[3]-1,G[2]=2*e[2]-1,G[3]=1,(0,N.Z0)(G,G,W),0===G[3]?null:(t[0]=G[0]/G[3],t[1]=G[1]/G[3],t[2]=G[2]/G[3],t)}constrainWindowSize(e,t,r,i){let n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),u=r-l- -Math.min(this.fullWidth-n-r/2,0),d=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){let r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){let r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){let{center:r,eye:i,distance:n,fovY:o}=this,a=Math.abs(Math.PI/2-H(t,r,i));return e.frustumCoverage(a,n,o)}_computeUpGlobal(){(0,M.Re)(Z,this.center,this.eye);let e=(0,M.Bw)(this.center);e<1?(0,M.t2)(this._up,T.Cb)&&((0,M.C)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.Om)(Z,this.center))>.9999*(0,M.Bw)(Z)*e||((0,M.$A)($,Z,this.center),(0,M.$A)($,$,Z),(0,M.S8)($,$),(0,M.t2)(this._up,$)||((0,M.C)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.oW)(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&((0,M.hs)(Z,Z,Z[2]),(0,M.hZ)(Z,-Z[0],-Z[1],1-Z[2]),(0,M.S8)(Z,Z),(0,M.t2)(this._up,Z)||((0,M.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.t2)(e,t)||((0,M.C)(t,e),this._markViewDirty(),this.notifyChange(r)):R.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&=((0,O.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),!1)}_ensureViewClean(){this._viewDirty&&((0,I.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelScale",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseViewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"relativeElevation",void 0),k=j=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],k);const G=(0,z.vt)(),W=(0,w.vt)(),Z=(0,T.vt)(),$=(0,T.vt)(),q=(0,F.r_)();r(49718),r(6867),r(16396),(0,w.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){let n=function(e,t){let r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=+(0===r);return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return+(1===n);let s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){let i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,B.o8)(ee));break;case 2:Q(e,(0,B.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,d.aI)(e.at(-1),t)||e.push(t)}const ee=(0,B.vt)();var te=r(11964),re=r(27921);const ie=(0,T.vt)(),ne=(0,T.vt)();function oe(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function ae(e,t,r,i,n){let o=(0,M.S8)(ie,e),s=(0,M.Om)(o,i),l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,M.Om)(t,i)),s<.99?((0,M.C)(o,t),l&&(0,M.hs)(o,o,-1)):o=null);let c=0;if(o){(0,M.hs)(ne,i,(0,M.Om)(i,o)),(0,M.Re)(o,o,ne);let e=(0,M.Om)(o,n)/((0,M.Bw)(o)*(0,M.Bw)(n));(0,M.$A)(ne,o,n),c=((0,M.Om)(ne,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}let u=(0,a.KJ)((0,a.XM)(-(0,M.Om)(i,e)/(0,M.Bw)(e)));return r?(r.heading=c,r.tilt=u,r):{heading:c,tilt:u}}function se(e,t,r,i){(0,M.Re)(le,r,t),!(0,re.T7)(i,(0,te.LV)(t,le),e)&&e!==r&&(0,M.C)(e,r)}const le=(0,T.vt)(),ce=(0,T.fA)(0,1,0),ue=(0,T.fA)(0,0,1),de=(0,w.vt)(),he=(0,T.vt)(),fe=(0,T.vt)();function me(e,t,r,i=oe()){let{direction:n,up:o}=i;return(0,I.N9)(de,-(0,a.kU)(t)),(0,I.eL)(de,de,(0,a.kU)(r)),(0,M.Z0)(n,ue,de),(0,M.hs)(n,n,-1),(0,M.Z0)(o,ce,de),i}function pe(e,t,r,i,n){let o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,M.Ln)(e,i,o,a)}const ve=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return ae(t,r,i,ue,ce)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n=me(0,r,i),o=(0,T.vt)();return(0,M.hs)(o,n.direction,-t),(0,M.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){let r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){let t=r.lines[e];i.intersectInfiniteManifold((0,P.LV)(t.origin,t.direction),n,ve)||pe(ve,r,i,t.endpoint,n),se(ve,a,ve,l),s.push((0,B.fA)(ve[0],ve[1]))}return function(e,t,r){let i=e.map(e=>((0,M.hZ)(ve,e[0],e[1],0),t.fromRenderCoords(ve,ve,r),[ve[0],ve[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){let r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){let o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,C.g)(t,he,o),(0,C.g)(t,fe,o),he[0]-=r/2,fe[0]+=r/2,he[1]-=i/2,fe[1]+=i/2,(0,A.F)(he,o,he,a),(0,A.F)(fe,o,fe,a),n?(n.xmin=he[0],n.ymin=he[1],n.xmax=fe[0],n.ymax=fe[1],n.spatialReference=a):n=new Y.A(he[0],he[1],fe[0],fe[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ge=r(34304),xe=r(52039),_e=r(28540),be=r(28735);class ye{get planes(){return this.frustum}get points(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,O.vt)(),this._points=(0,O.Qy)(),this.lines=Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.i,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,O.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.C)(this._origin,e.eye),(0,M.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}get altitude(){return this._altitude}intersectsSphere(e){return(0,O.m7)(this.frustum,e)}isConvexHullOutsideViewPyramid(e,t){return(0,O.Pi)(this.frustum,e,t)}intersectsRay(e){return(0,O.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,O.ST)(this.frustum,e,t)}lineSegmentIntersectsViewPyramid(e,t){return(0,O.LJ)(this.frustum,e,t)}intersectsPoint(e){return(0,O.bU)(this.frustum,e)}_updateLines(){let e=this._points;for(let t=0;t<4;t++){let r=t+4;we(this.lines[t],e[t],e[r]),we(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),we(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){let{origin:e}=this,t=Te;(0,M.S8)(t,this.direction);let r=Me;(0,M.jb)(r,this.points[4],e);let i=.5*(0,M.Om)(r,r)/(0,M.Om)(t,r),n=this._boundingSphere;n.center=(0,M.Ln)(Se,e,t,i),n.radius=i}static{this.planePointIndices=O.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function we(e,t,r){e.origin=t,e.endpoint=r,(0,M.oW)(e.direction,t,r)}const Me=(0,T.vt)(),Te=(0,T.vt)(),Se=(0,T.vt)();r(86211);const Ce=(0,T.fA)(5802e-9,13558e-9,331e-7),Ae=(0,T.fA)(195e-8,5643e-9,255e-9);(0,T.fA)(Ce[0]+Ae[0],Ce[1]+Ae[1],Ce[2]+Ae[2]);class Ee{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ee(0,0)}static{this.Infinite=new Ee}}(0,T.vt)(),(0,T.vt)(),new _e.i,(0,P.vt)(),new Y.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Ie=r(32728);const Oe=(0,T.fA)(0,0,1),Pe=(0,M.S8)((0,T.vt)(),(0,T.fA)(1,1,1)),De=(0,w.vt)(),Re=(0,T.vt)(),Fe=(0,T.vt)();function Be(e,t,r,i=oe()){(0,M.$A)(Re,e,Oe),0===(0,M.Om)(Re,Re)&&(0,M.$A)(Re,e,Pe),(0,I.$0)(De,-(0,a.kU)(t),e),(0,I.e$)(De,De,-(0,a.kU)(r),Re);let{up:n,direction:o}=i;return(0,M.$A)(n,Re,e),(0,M.S8)(n,n),(0,M.Z0)(n,n,De),(0,M.S8)(o,e),(0,M.ze)(o,o),(0,M.Z0)(o,o,De),i}function Ne(e){let t=e[1];e[1]=-e[2],e[2]=t}function ze(e,t){return e.up=Be(t,e.heading,e.tilt).up,e}function Le(e,t){let{renderCoordsHelper:r,state:i}=e;if(1!==i.viewingMode)return 1;let n=r.getAltitude(t),o=r.referenceEllipsoid.radius,s=1+(0,M.Io)(i.camera.eye,t)/(o+n),l=Math.sqrt(s*s-1),{minCurvature:c,maxCurvature:u,minSamples:d,maxSamples:h}=Ve,f=(0,a.qE)((l-c)/(u-c),0,1);return Math.round((0,a.Cc)(d,h,f))}function He(e,t){let r=[],i=[],n=(0,ge.FD)();for(let o=0;o<e.length;o++){let a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,te.Cr)(a,s,$e),c=(0,re.vE)(t,l.origin,l.vector,0,We);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{let[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,re.Qj)(t),u=(0,M.Ln)((0,T.vt)(),We,l,e*n),d=(0,M.Ln)((0,T.vt)(),We,l,e*-n);o.push(a),o.push(u),s.push(d)}}}let o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Ve={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Ue=(0,T.fA)(1,0,0),je=(0,T.fA)(0,1,0),ke=(0,T.vt)(),Ge=(0,T.vt)(),We=(0,T.vt)(),Ze=new _e.i,$e=(0,te.vt)(),qe=(0,z.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){let n=Re,o=Fe;return(0,M.S8)(n,e),(0,M.$A)(Fe,n,Oe),0===(0,M.Om)(Fe,Fe)&&(0,M.$A)(Fe,n,Pe),(0,M.$A)(o,Fe,n),ae(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Re;o[0]=e[0],o[1]=e[2],o[2]=-e[1];let s,l=t,c=(0,a.kU)(r),u=(0,a.kU)(i),d=Math.sin(c),h=Math.cos(c),f=Math.sin(u),m=Math.cos(u),p=(0,M.Bw)(o);if(Math.abs(u)<1e-8)s=l+p;else{let e=p/f,t=(0,a.YN)(l/e),r=Math.PI-u-t;s=e*Math.sin(r)}let v=m*l,g=l*l*(f*f),x=h*h*g,_=s-v,b=_*_,y=x*(x+b-o[1]*o[1]);if(y<0)return(0,M.hs)(n.eye,o,s/p),n.tilt=0,ze(n,e);let w,S=Math.sqrt(y),C=o[1]*_,A=x+b;if(w=h>0?-S+C:S+C,Math.abs(A)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=l):(0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e);n.eye[1]=w/A;let E=d*d*g,I=f*l,O=h*I*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,R=Math.sqrt(D),F=x*P+E-2*O*R*_+D*b;return Math.abs(F)<1e-8?((0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e)):(n.eye[0]=(D*(s*o[0]-v*o[0])-I*R*(o[0]*n.eye[1]*h+o[2]*d))/F,n.eye[2]=(D*(s*o[2]-v*o[2])-I*R*(o[2]*n.eye[1]*h-o[0]*d))/F,(0,M.hs)(n.eye,n.eye,s),Ne(n.eye),ze(n,e))},eyeTiltToLookAtTilt:function(e,t,r){let i=(0,a.kU)(e),n=(0,M.Bw)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},getCurvatureSamples:Le,headingTiltToDirectionUp:Be,lookAtTiltToEyeTilt:function(e,t,r){let i=(0,M.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){let{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ye(r);i.near=2,n.update(i);let o=r.getAltitude(t),s=e.spatialReference,l=i.eye,c=function(e){let{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return Ze.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(Ze,t)}(e),u=Le(e,t),d=i.aboveGround,h=n.planes[5],f=[],m=(0,re.O_)(T.uY,Ue,(0,re.vt)()),p=(0,re.O_)(T.uY,je,(0,re.vt)());(0,N.hZ)(qe,0,0,0,0);for(let e=0;e<4;e++){let t=1===e&&!d||3===e&&d?1-c:0,i=1===e&&d||3===e&&!d?c:1,s=n.lines[e],v=n.lines[3===e?0:e+1];for(let n=0;n<u;n++){let c=n/u,d=1===e?1-(1-c)**2:3===e?c**2:c,g=0===n?0:(0,a.Cc)(t,i,d),x=(0,M.Cc)(Ge,s.origin,v.origin,g),_=(0,Ie.nu)(s.direction,v.direction,g,ke);r.intersectManifoldClosestSilhouette((0,P.LV)(x,_),o,We),se(We,l,We,h),f.push((0,T.o8)(We)),0!==f.length&&(0,M.lo)(f.at(-1),We);let b=+!!(0,re.BX)(m,We)|((0,re.BX)(p,We)?2:0);qe[b]=1}}f.length>2&&(0,M.lo)(f[0],f.at(-1));let v=function(e,t,r){let i=2*(0,ge.FD)();return e.map(e=>{let n=[],o=!1;for(let a of e)t.fromRenderCoords(a,We,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,We[1]]),n.push([null,We[1]]),o=!0):n.push([We[0],We[1]]);if(o)for(let e=0;e<n.length;e++){let t=n[e];if(null!=t[0])continue;let r=n[e+1];t[0]=n.at(0===e?-1:e-1)[0],e++,r[0]=n.at(e===n.length-1?0:e+1)[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,N.m3)(qe)>1?function(e,t){let r=[];for(let i of e)r.push(...He(i,t));return r}(He(f,m),p):[f],r,s);return new X.A({rings:v,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c,u=t.latitude,d=(0,E.tO)(e.spatialReference).radius,h=t.longitude,f=function(e,t,r){let i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(u,r,d)/2;o=h-f,s=h+f;let m=(0,a.kU)(u),v=(1+Math.sin(m))/(1-Math.sin(m)),g=(v+1)*Math.tan(i/d/2),x=g*g;function _(e){let t=Math.PI/2;return(e=p.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*v+x))),c=l+i/d,l=_(l),c=_(c),c<l){let e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=xe.Y_.monotonic(o,s),s-o>180){let e=(s-o-180)/2;o+=e,s-=e}let b=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=b):n=new Y.A(o,l,s,c,b),e.spatialReference&&e.spatialReference.isWebMercator&&(0,be.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ye="composite-color",Xe=["final-color",Ye,"opaque-color","transparent-color"],Je={ANTIALIASING:"antialiasing",CUTFILL:"cutfill",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA:"focusarea",FOCUSAREA_MASK:"focusarea-mask",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT:"highlight",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Je)).concat(Xe),(0,T.vt)();var Ke=r(49186),Qe=r(10107),et=r(64108),tt=r(44208),rt=(r(17676),r(94656)),it=r(63907);r(93637),r(4576),"layout.centroid.smooth.case.mat2x2.mat2x3.mat2x4.mat3x2.mat3x3.mat3x4.mat4x2.mat4x3.mat4x4.uint.uvec2.uvec3.uvec4.samplerCubeShadow.sampler2DArray.sampler2DArrayShadow.isampler2D.isampler3D.isamplerCube.isampler2DArray.usampler2D.usampler3D.usamplerCube.usampler2DArray.coherent.restrict.readonly.writeonly.resource.atomic_uint.noperspective.patch.sample.subroutine.common.partition.active.filter.image1D.image2D.image3D.imageCube.iimage1D.iimage2D.iimage3D.iimageCube.uimage1D.uimage2D.uimage3D.uimageCube.image1DArray.image2DArray.iimage1DArray.iimage2DArray.uimage1DArray.uimage2DArray.image1DShadow.image2DShadow.image1DArrayShadow.image2DArrayShadow.imageBuffer.iimageBuffer.uimageBuffer.sampler1DArray.sampler1DArrayShadow.isampler1D.isampler1DArray.usampler1D.usampler1DArray.isampler2DRect.usampler2DRect.samplerBuffer.isamplerBuffer.usamplerBuffer.sampler2DMS.isampler2DMS.usampler2DMS.sampler2DMSArray.isampler2DMSArray.usampler2DMSArray.trunc.round.roundEven.isnan.isinf.floatBitsToInt.floatBitsToUint.intBitsToFloat.uintBitsToFloat.packSnorm2x16.unpackSnorm2x16.packUnorm2x16.unpackUnorm2x16.packHalf2x16.unpackHalf2x16.outerProduct.transpose.determinant.inverse.texture.textureSize.textureProj.textureLod.textureOffset.texelFetch.texelFetchOffset.textureProjOffset.textureLodOffset.textureProjLod.textureProjLodOffset.textureGrad.textureGradOffset.textureProjGrad.textureProjGradOffset".split("."),"precision.highp.mediump.lowp.attribute.const.uniform.varying.break.continue.do.for.while.if.else.in.out.inout.float.int.void.bool.true.false.discard.return.mat2.mat3.mat4.vec2.vec3.vec4.ivec2.ivec3.ivec4.uvec2.uvec3.uvec4.bvec2.bvec3.bvec4.sampler1D.sampler2D.sampler3D.usampler1D.usampler2D.usampler3D.samplerCube.sampler1DShadow.sampler2DShadow.struct.asm.class.union.enum.typedef.template.this.packed.goto.switch.default.inline.noinline.volatile.public.static.extern.external.interface.long.short.double.half.fixed.unsigned.input.output.hvec2.hvec3.hvec4.dvec2.dvec3.dvec4.fvec2.fvec3.fvec4.sampler2DRect.sampler3DRect.sampler2DRectShadow.sizeof.cast.namespace.using".split("."),"<<= >>= ++ -- << >> <= >= == != && || += -= *= /= %= &= ^^ ^= |= ( ) [ ] . ! ~ * / % + - < > & ^ | ? : = , ; { }".split(" "),"abs.acos.all.any.asin.atan.ceil.clamp.cos.cross.dFdx.dFdy.degrees.distance.dot.equal.exp.exp2.faceforward.floor.fract.gl_BackColor.gl_BackLightModelProduct.gl_BackLightProduct.gl_BackMaterial.gl_BackSecondaryColor.gl_ClipPlane.gl_ClipVertex.gl_Color.gl_DepthRange.gl_DepthRangeParameters.gl_EyePlaneQ.gl_EyePlaneR.gl_EyePlaneS.gl_EyePlaneT.gl_Fog.gl_FogCoord.gl_FogFragCoord.gl_FogParameters.gl_FragColor.gl_FragCoord.gl_FragData.gl_FragDepth.gl_FragDepthEXT.gl_FrontColor.gl_FrontFacing.gl_FrontLightModelProduct.gl_FrontLightProduct.gl_FrontMaterial.gl_FrontSecondaryColor.gl_LightModel.gl_LightModelParameters.gl_LightModelProducts.gl_LightProducts.gl_LightSource.gl_LightSourceParameters.gl_MaterialParameters.gl_MaxClipPlanes.gl_MaxCombinedTextureImageUnits.gl_MaxDrawBuffers.gl_MaxFragmentUniformComponents.gl_MaxLights.gl_MaxTextureCoords.gl_MaxTextureImageUnits.gl_MaxTextureUnits.gl_MaxVaryingFloats.gl_MaxVertexAttribs.gl_MaxVertexTextureImageUnits.gl_MaxVertexUniformComponents.gl_ModelViewMatrix.gl_ModelViewMatrixInverse.gl_ModelViewMatrixInverseTranspose.gl_ModelViewMatrixTranspose.gl_ModelViewProjectionMatrix.gl_ModelViewProjectionMatrixInverse.gl_ModelViewProjectionMatrixInverseTranspose.gl_ModelViewProjectionMatrixTranspose.gl_MultiTexCoord0.gl_MultiTexCoord1.gl_MultiTexCoord2.gl_MultiTexCoord3.gl_MultiTexCoord4.gl_MultiTexCoord5.gl_MultiTexCoord6.gl_MultiTexCoord7.gl_Normal.gl_NormalMatrix.gl_NormalScale.gl_ObjectPlaneQ.gl_ObjectPlaneR.gl_ObjectPlaneS.gl_ObjectPlaneT.gl_Point.gl_PointCoord.gl_PointParameters.gl_PointSize.gl_Position.gl_ProjectionMatrix.gl_ProjectionMatrixInverse.gl_ProjectionMatrixInverseTranspose.gl_ProjectionMatrixTranspose.gl_SecondaryColor.gl_TexCoord.gl_TextureEnvColor.gl_TextureMatrix.gl_TextureMatrixInverse.gl_TextureMatrixInverseTranspose.gl_TextureMatrixTranspose.gl_Vertex.greaterThan.greaterThanEqual.inversesqrt.length.lessThan.lessThanEqual.log.log2.matrixCompMult.max.min.mix.mod.normalize.not.notEqual.pow.radians.reflect.refract.sign.sin.smoothstep.sqrt.step.tan.texture2D.texture2DLod.texture2DProj.texture2DProjLod.textureCube.textureCubeLod.texture2DLodEXT.texture2DProjLodEXT.textureCubeLodEXT.texture2DGradEXT.texture2DProjGradEXT.textureCubeGradEXT.textureSize.texelFetch".split("."),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,tt.A)("esri-tests-disable-gpu-memory-measurements"),(0,rt.en)();(0,rt.en)();var nt=r(90644),ot=r(21231),at=r(48852),st=r(42293);const lt=!!(0,tt.A)("esri-tests-disable-gpu-memory-measurements");class ct{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(it.vt.Renderbuffer,this);let r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);let{width:i,height:n,internalFormat:o,multisampled:a}=t;a?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){let e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return lt?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,st.MW)(e.internalFormat);var e}resize(e,t){let r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;let i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&=(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(it.vt.Renderbuffer,this),null)}}class ut{constructor(e,t,r){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(it.vt.FramebufferObject,this),null!=t){let r=function(e,t){return dt(t)||ht(t)?t:ft(t)?new ot.A(e,t):function(e){return 3===mt(e)||null!=e&&"samples"in e}(t)?new ct(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(36064,r),dt(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=r)if(function(e){return dt(e)||ft(e)}(r))this._depthStencilTexture=dt(r)?r:new ot.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=ht(r)?r:new ct(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(36064);return dt(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return t&&dt(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=36064){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=36064){let t=this._colorAttachments.get(e);if(!t)return;let r=dt(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(r)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{dt(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=36064,r=0){let i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,r):this._framebufferTexture2D(i.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;let{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041!==r&&6402!==r?console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"):34041===r&&i!==it.ld.UNSIGNED_INT_24_8?console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):6402===r&&i!==it.ld.UNSIGNED_INT&&i!==it.ld.UNSIGNED_SHORT?console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,gt(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,gt(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,r=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,a){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");let s=a.descriptor;3553!==a.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==s?.width||null==s?.height||e+r>this.width||t+i>this.height||n+r>s.width||o+i>s.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");let l=this._context,c=l.bindTexture(a,ot.A.TEXTURE_UNIT_FOR_UPDATES);l.setActiveTexture(ot.A.TEXTURE_UNIT_FOR_UPDATES),l.bindFramebuffer(this),l.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),l.bindTexture(c,ot.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,a){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),a||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,a)}async readPixelsAsync(e,t,r,i,n,o,a,s){let{gl:l}=this._context,c=at.g.createPixelPack(this._context,35041,a.byteLength);this._context.bindBuffer(c);let u=this._context.boundFramebuffer;this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,n,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(u);try{await c.getSubDataAsync(a,void 0,void 0,void 0,s)}finally{c.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let r={width:e,height:t};if(pt(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._glName&&(pt(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,rt.en)())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,r)=>{if(dt(t)){let i=vt(t);35866===i?this._framebufferTextureLayer(t.glName,r,e):this._framebufferTexture2D(t.glName,r,i,e)}else if(ht(t)){let i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=gt(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,vt(this._depthStencilTexture),e)}(0,rt.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(e,t=36064,r=3553,i=36160){this._context.gl.framebufferTexture2D(i,t,r,e,this._level)}_framebufferTextureLayer(e,t=36064,r=36160,i=0){this._context.gl.framebufferTextureLayer(r,t,e,this._level,i)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,s.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,gt(this._depthStencilTexture.descriptor.pixelFormat))),(0,s.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),pt(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){pt(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error("Attachment size must match framebuffer size!")}_getGLAttachmentPoint(e){switch(e.internalFormat){case it.SB.DEPTH_COMPONENT16:case it.SB.DEPTH_COMPONENT24:case it.SB.DEPTH_COMPONENT32F:return 36096;case it.iE.DEPTH24_STENCIL8:case it.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(e){if(-1===ut._MAX_COLOR_ATTACHMENTS){let{gl:e}=this._context;ut._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let t=e-36064;t+1>ut._MAX_COLOR_ATTACHMENTS&&R.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${ut._MAX_COLOR_ATTACHMENTS} color attachments`)}}function dt(e){return 1===mt(e)}function ht(e){return 2===mt(e)}function ft(e){return 0===mt(e)}function mt(e){return null!=e&&"type"in e?e.type:null}function pt(e,t){let r=Math.max(e.width,e.height);if(r>t){R.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function vt(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function gt(e){return 6402===e?36096:33306}var xt=r(67171),_t=(r(21818),r(69397),r(85079));const bt=[new(r(74038)._)("position",2,it.pe.UNSIGNED_SHORT,0,4)];(0,_t.Xk)(bt),r(66289);const yt=new Image;yt.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",yt.width=5,yt.height=5,yt.decode();let wt=class extends D.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=Ye,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Ke.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){let e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){e.initializeAndBind(),this.gl.drawBuffers(function(e){return e?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029]}(e))}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(e){return null}get input(){return this._frameBuffer}};(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"view",void 0),(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"consumes",void 0),(0,o.Cg)([(0,Qe.MZ)()],wt.prototype,"produces",void 0),(0,o.Cg)([(0,Qe.MZ)({readOnly:!0})],wt.prototype,"techniques",null),wt=(0,o.Cg)([(0,et.$)("esri.views.3d.webgl.RenderNode")],wt);let Mt=class extends wt{constructor(){super(...arguments),this.consumes={required:["normals"]},this.produces="disabled"}get enabled(){return!this.destroying&&!this.destroyed&&this.produces===Je.AMBIENT_ILLUMINATION}get _belowMaxElevation(){return(this.view.state.camera.relativeElevation??1/0)<5e5}get _useGlobalIllumination(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(11)}get _useSSAO(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(3)}_enable(){this.produces=Je.AMBIENT_ILLUMINATION,this.requestRender(1)}_disable(){this.produces="disabled",this.requestRender(1)}};(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"produces",void 0),Mt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.AmbientIllumination")],Mt);var Tt=r(15581),St=r(13840),Ct=r(42958),At=r(95774);let Et=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(At.S,()=>r.e(1285).then(()=>r(91285)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Et=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],Et);var It=r(65786);class Ot extends It.Y{constructor(){super(...arguments),this.projScale=1}}class Pt extends Ot{constructor(){super(...arguments),this.intensity=1}}class Dt extends It.Y{}class Rt extends Dt{constructor(){super(...arguments),this.blurSize=(0,B.vt)()}}let Ft=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Tt.S,()=>r.e(6122).then(()=>r(86122)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Ft=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],Ft);let Bt=class extends Mt{constructor(e){super(e),this._enableTime=(0,c.l5)(0),this._passParameters=new Pt,this._drawParameters=new Rt}initialize(){let e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new xt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new ot.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this._useSSAO,e=>{this._enableTime=(0,c.l5)(0),e?this._enable():this._disable()},l.pc))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){let t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(33306);if(!r||!i)return;let n=this.techniques.getCompiled(Ft),o=this.techniques.getCompiled(Et);if(!n||!o)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));let s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,f=h.relativeElevation,m=(0,a.qE)((5e5-f)/2e5,0,1),p=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=p*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDistance(1),this._passParameters.intensity=4*Nt/(0,Tt.g)(h)**6*v;let g=h.fullViewport[2],x=h.fullViewport[3],_=this.fboCache.acquire(g,x,"ssao input",2);s.bindFramebuffer(_.fbo),s.setViewport(0,0,g,x),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();let b=Math.round(g/2),y=Math.round(x/2),w=this.fboCache.acquire(b,y,"ssao blur",0);s.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=_.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/x),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,b,y),s.screen.draw(),_.release();let M=this.fboCache.acquire(b,y,Je.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,g,x),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=w.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/g,0),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,b,y),s.screen.draw(),s.setViewport4fv(h.fullViewport),w.release(),p<1&&this.requestRender(2),M}};Bt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Bt);const Nt=.5;function zt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
603
|
+
}`))}(e,t)}},68785(e,t,r){r.d(t,{n:()=>zt});var i=r(31821),n=r(12791),o=r(32198),a=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(69540);let f=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],f);const m=f;var p=r(69052),v=r(25482),g=r(78888),x=r(86738),_=r(43937),b=r(36005);let y=class extends((0,h.OU)(v.o)){constructor(...e){super(...e),this.position=new x.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new m}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){let n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){let n=e.clone();n.x=(0,g.GB)(e.x||0),n.y=(0,g.GB)(e.y||0),n.z=e.hasZ?(0,g.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){let r=new x.A;return r.read(e,t),r.x=(0,g.GB)(r.x||0),r.y=(0,g.GB)(r.y||0),r.z=r.hasZ?(0,g.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:x.A,json:{write:{isRequired:!0}}})],y.prototype,"position",void 0),(0,o.Cg)([(0,_.K)("position")],y.prototype,"writePosition",null),(0,o.Cg)([(0,b.w)("position")],y.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>p.ie.normalize((0,g.GB)(e)))],y.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e),-180,180))],y.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e,55),1,170))],y.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:m,nonNullable:!0,json:{read:!1,write:!1}})],y.prototype,"layout",void 0),y=(0,o.Cg)([(0,u.$K)("esri.Camera")],y);var w=r(9093),M=r(35522),T=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),A=r(27993),E=r(73941),I=(r(19419),r(58083)),O=r(65720),P=r(71351),D=r(69622),R=r(53966),F=r(90629),B=r(48163),N=r(78955),z=r(91829),L=r(44280);function H(e,t,r){e.worldUpAtPosition(t,V),(0,M.Re)(U,r,t);let i=(0,M.Bw)(U);return 0===i?0:(0,a.XM)((0,M.Om)(U,V)/i)}const V=(0,T.vt)(),U=(0,T.vt)();var j;let k=j=class extends D.A{constructor(e){super(e),this._ray=(0,P.vt)(),this._viewport=(0,z.fA)(0,0,1,1),this._padding=(0,z.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,B.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,w.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,w.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,w.vt)(),this._frustumDirty=!0,this._frustum=(0,O.vt)(),this._fullViewport=(0,z.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.pixelScale=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin,"eye")}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,I.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,I.Qw)((0,w.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,w.vt)()}get viewForward(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;let e=(0,N.hs)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,N.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;let e=(0,N.hs)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,N.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&=(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,N.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,N.C)(this._padding,e),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&=((0,I.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,I.B8)((0,w.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,w.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,I.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,I.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){let{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get renderPixelSizePerDistance(){return Math.tan(this.fovX/2)/(this.width/2)}get screenPixelSizePerDistance(){return this.renderPixelSizePerDistance*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){let e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,u=(0,I.$h)((0,w.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,I.t2)(d,u)?d:u}copyFrom(e){(0,M.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,N.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,N.C)(this._padding,e.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,d.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;let t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,I.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||=((0,O.C)(this._frustum,e.frustum),!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,I.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=e.pixelRatio,this.pixelScale=e.pixelScale,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new j).copyFrom(this)}equals(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&(0,N.t2)(this._viewport,e.viewport)&&(0,N.t2)(this._padding,e.padding)&&(0,d.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}equalsView(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&this._fov===e.fov}almostEquals(e){let t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,N.hG)(e.screenPadding,this.screenPadding)>=t||(0,N.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.jb)(Z,e.eye,e.center),(0,M.jb)($,this.eye,this.center);let r=(0,M.Om)(Z,$),i=(0,M.uE)(Z),n=(0,M.uE)($),o=5e-4;return r*r>=.9999999999*i*n&&(0,M.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDistance(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDistance(e){return e*this.renderPixelSizePerDistance}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDistance(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,M.Re)(Z,e,this.eye)))}computeScreenPixelSizeAtDistance(e){return e*this.screenPixelSizePerDistance}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){let t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==G&&(0,M.C)(G,e),G[3]=1,(0,N.Z0)(G,G,this.projectionMatrix);let r=Math.abs(G[3]);(0,M.hs)(G,G,1/r);let i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*G[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*G[1]),t[2]=.5*(G[2]+1),t[3]=r}unapplyProjection(e,t){let r=this.fullViewport;G[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],G[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],G[2]=(2*e[2]-1)*e[3],G[3]=e[3],null!=this.inverseProjectionMatrix&&((0,N.Z0)(G,G,this.inverseProjectionMatrix),t[0]=G[0],t[1]=G[1],t[2]=G[2])}projectToScreen(e,t){return null==this.projectToRenderScreen(e,q)?null:(this.renderToScreen(q,t),t)}projectToRenderScreen(e,t){if(G[0]=e[0],G[1]=e[1],G[2]=e[2],G[3]=1,(0,N.Z0)(G,G,this.viewProjectionMatrix),0===G[3])return null;let r=G;(0,M.hs)(r,r,1/Math.abs(G[3]));let i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,q),t)}unprojectFromRenderScreen(e,t){if((0,I.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,I.B8)(W,W))return null;let r=this.fullViewport;return G[0]=2*(e[0]-r[0])/r[2]-1,G[1]=2*(e[1]-r[1])/r[3]-1,G[2]=2*e[2]-1,G[3]=1,(0,N.Z0)(G,G,W),0===G[3]?null:(t[0]=G[0]/G[3],t[1]=G[1]/G[3],t[2]=G[2]/G[3],t)}constrainWindowSize(e,t,r,i){let n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),u=r-l- -Math.min(this.fullWidth-n-r/2,0),d=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){let r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){let r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){let{center:r,eye:i,distance:n,fovY:o}=this,a=Math.abs(Math.PI/2-H(t,r,i));return e.frustumCoverage(a,n,o)}_computeUpGlobal(){(0,M.Re)(Z,this.center,this.eye);let e=(0,M.Bw)(this.center);e<1?(0,M.t2)(this._up,T.Cb)&&((0,M.C)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.Om)(Z,this.center))>.9999*(0,M.Bw)(Z)*e||((0,M.$A)($,Z,this.center),(0,M.$A)($,$,Z),(0,M.S8)($,$),(0,M.t2)(this._up,$)||((0,M.C)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.oW)(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&((0,M.hs)(Z,Z,Z[2]),(0,M.hZ)(Z,-Z[0],-Z[1],1-Z[2]),(0,M.S8)(Z,Z),(0,M.t2)(this._up,Z)||((0,M.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.t2)(e,t)||((0,M.C)(t,e),this._markViewDirty(),this.notifyChange(r)):R.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&=((0,O.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),!1)}_ensureViewClean(){this._viewDirty&&((0,I.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelScale",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseViewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"relativeElevation",void 0),k=j=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],k);const G=(0,z.vt)(),W=(0,w.vt)(),Z=(0,T.vt)(),$=(0,T.vt)(),q=(0,F.r_)();r(49718),r(6867),r(16396),(0,w.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){let n=function(e,t){let r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=+(0===r);return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return+(1===n);let s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){let i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,B.o8)(ee));break;case 2:Q(e,(0,B.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,d.aI)(e.at(-1),t)||e.push(t)}const ee=(0,B.vt)();var te=r(11964),re=r(27921);const ie=(0,T.vt)(),ne=(0,T.vt)();function oe(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function ae(e,t,r,i,n){let o=(0,M.S8)(ie,e),s=(0,M.Om)(o,i),l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,M.Om)(t,i)),s<.99?((0,M.C)(o,t),l&&(0,M.hs)(o,o,-1)):o=null);let c=0;if(o){(0,M.hs)(ne,i,(0,M.Om)(i,o)),(0,M.Re)(o,o,ne);let e=(0,M.Om)(o,n)/((0,M.Bw)(o)*(0,M.Bw)(n));(0,M.$A)(ne,o,n),c=((0,M.Om)(ne,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}let u=(0,a.KJ)((0,a.XM)(-(0,M.Om)(i,e)/(0,M.Bw)(e)));return r?(r.heading=c,r.tilt=u,r):{heading:c,tilt:u}}function se(e,t,r,i){(0,M.Re)(le,r,t),!(0,re.T7)(i,(0,te.LV)(t,le),e)&&e!==r&&(0,M.C)(e,r)}const le=(0,T.vt)(),ce=(0,T.fA)(0,1,0),ue=(0,T.fA)(0,0,1),de=(0,w.vt)(),he=(0,T.vt)(),fe=(0,T.vt)();function me(e,t,r,i=oe()){let{direction:n,up:o}=i;return(0,I.N9)(de,-(0,a.kU)(t)),(0,I.eL)(de,de,(0,a.kU)(r)),(0,M.Z0)(n,ue,de),(0,M.hs)(n,n,-1),(0,M.Z0)(o,ce,de),i}function pe(e,t,r,i,n){let o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,M.Ln)(e,i,o,a)}const ve=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return ae(t,r,i,ue,ce)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n=me(0,r,i),o=(0,T.vt)();return(0,M.hs)(o,n.direction,-t),(0,M.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){let r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){let t=r.lines[e];i.intersectInfiniteManifold((0,P.LV)(t.origin,t.direction),n,ve)||pe(ve,r,i,t.endpoint,n),se(ve,a,ve,l),s.push((0,B.fA)(ve[0],ve[1]))}return function(e,t,r){let i=e.map(e=>((0,M.hZ)(ve,e[0],e[1],0),t.fromRenderCoords(ve,ve,r),[ve[0],ve[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){let r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){let o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,C.g)(t,he,o),(0,C.g)(t,fe,o),he[0]-=r/2,fe[0]+=r/2,he[1]-=i/2,fe[1]+=i/2,(0,A.F)(he,o,he,a),(0,A.F)(fe,o,fe,a),n?(n.xmin=he[0],n.ymin=he[1],n.xmax=fe[0],n.ymax=fe[1],n.spatialReference=a):n=new Y.A(he[0],he[1],fe[0],fe[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ge=r(34304),xe=r(52039),_e=r(28540),be=r(28735);class ye{get planes(){return this.frustum}get points(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,O.vt)(),this._points=(0,O.Qy)(),this.lines=Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.i,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,O.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.C)(this._origin,e.eye),(0,M.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}get altitude(){return this._altitude}intersectsSphere(e){return(0,O.m7)(this.frustum,e)}isConvexHullOutsideViewPyramid(e,t){return(0,O.Pi)(this.frustum,e,t)}intersectsRay(e){return(0,O.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,O.ST)(this.frustum,e,t)}lineSegmentIntersectsViewPyramid(e,t){return(0,O.LJ)(this.frustum,e,t)}intersectsPoint(e){return(0,O.bU)(this.frustum,e)}_updateLines(){let e=this._points;for(let t=0;t<4;t++){let r=t+4;we(this.lines[t],e[t],e[r]),we(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),we(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){let{origin:e}=this,t=Te;(0,M.S8)(t,this.direction);let r=Me;(0,M.jb)(r,this.points[4],e);let i=.5*(0,M.Om)(r,r)/(0,M.Om)(t,r),n=this._boundingSphere;n.center=(0,M.Ln)(Se,e,t,i),n.radius=i}static{this.planePointIndices=O.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function we(e,t,r){e.origin=t,e.endpoint=r,(0,M.oW)(e.direction,t,r)}const Me=(0,T.vt)(),Te=(0,T.vt)(),Se=(0,T.vt)();r(86211);const Ce=(0,T.fA)(5802e-9,13558e-9,331e-7),Ae=(0,T.fA)(195e-8,5643e-9,255e-9);(0,T.fA)(Ce[0]+Ae[0],Ce[1]+Ae[1],Ce[2]+Ae[2]);class Ee{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ee(0,0)}static{this.Infinite=new Ee}}(0,T.vt)(),(0,T.vt)(),new _e.i,(0,P.vt)(),new Y.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Ie=r(32728);const Oe=(0,T.fA)(0,0,1),Pe=(0,M.S8)((0,T.vt)(),(0,T.fA)(1,1,1)),De=(0,w.vt)(),Re=(0,T.vt)(),Fe=(0,T.vt)();function Be(e,t,r,i=oe()){(0,M.$A)(Re,e,Oe),0===(0,M.Om)(Re,Re)&&(0,M.$A)(Re,e,Pe),(0,I.$0)(De,-(0,a.kU)(t),e),(0,I.e$)(De,De,-(0,a.kU)(r),Re);let{up:n,direction:o}=i;return(0,M.$A)(n,Re,e),(0,M.S8)(n,n),(0,M.Z0)(n,n,De),(0,M.S8)(o,e),(0,M.ze)(o,o),(0,M.Z0)(o,o,De),i}function Ne(e){let t=e[1];e[1]=-e[2],e[2]=t}function ze(e,t){return e.up=Be(t,e.heading,e.tilt).up,e}function Le(e,t){let{renderCoordsHelper:r,state:i}=e;if(1!==i.viewingMode)return 1;let n=r.getAltitude(t),o=r.referenceEllipsoid.radius,s=1+(0,M.Io)(i.camera.eye,t)/(o+n),l=Math.sqrt(s*s-1),{minCurvature:c,maxCurvature:u,minSamples:d,maxSamples:h}=Ve,f=(0,a.qE)((l-c)/(u-c),0,1);return Math.round((0,a.Cc)(d,h,f))}function He(e,t){let r=[],i=[],n=(0,ge.FD)();for(let o=0;o<e.length;o++){let a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,te.Cr)(a,s,$e),c=(0,re.vE)(t,l.origin,l.vector,0,We);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{let[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,re.Qj)(t),u=(0,M.Ln)((0,T.vt)(),We,l,e*n),d=(0,M.Ln)((0,T.vt)(),We,l,e*-n);o.push(a),o.push(u),s.push(d)}}}let o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Ve={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Ue=(0,T.fA)(1,0,0),je=(0,T.fA)(0,1,0),ke=(0,T.vt)(),Ge=(0,T.vt)(),We=(0,T.vt)(),Ze=new _e.i,$e=(0,te.vt)(),qe=(0,z.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){let n=Re,o=Fe;return(0,M.S8)(n,e),(0,M.$A)(Fe,n,Oe),0===(0,M.Om)(Fe,Fe)&&(0,M.$A)(Fe,n,Pe),(0,M.$A)(o,Fe,n),ae(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Re;o[0]=e[0],o[1]=e[2],o[2]=-e[1];let s,l=t,c=(0,a.kU)(r),u=(0,a.kU)(i),d=Math.sin(c),h=Math.cos(c),f=Math.sin(u),m=Math.cos(u),p=(0,M.Bw)(o);if(Math.abs(u)<1e-8)s=l+p;else{let e=p/f,t=(0,a.YN)(l/e),r=Math.PI-u-t;s=e*Math.sin(r)}let v=m*l,g=l*l*(f*f),x=h*h*g,_=s-v,b=_*_,y=x*(x+b-o[1]*o[1]);if(y<0)return(0,M.hs)(n.eye,o,s/p),n.tilt=0,ze(n,e);let w,S=Math.sqrt(y),C=o[1]*_,A=x+b;if(w=h>0?-S+C:S+C,Math.abs(A)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=l):(0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e);n.eye[1]=w/A;let E=d*d*g,I=f*l,O=h*I*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,R=Math.sqrt(D),F=x*P+E-2*O*R*_+D*b;return Math.abs(F)<1e-8?((0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e)):(n.eye[0]=(D*(s*o[0]-v*o[0])-I*R*(o[0]*n.eye[1]*h+o[2]*d))/F,n.eye[2]=(D*(s*o[2]-v*o[2])-I*R*(o[2]*n.eye[1]*h-o[0]*d))/F,(0,M.hs)(n.eye,n.eye,s),Ne(n.eye),ze(n,e))},eyeTiltToLookAtTilt:function(e,t,r){let i=(0,a.kU)(e),n=(0,M.Bw)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},getCurvatureSamples:Le,headingTiltToDirectionUp:Be,lookAtTiltToEyeTilt:function(e,t,r){let i=(0,M.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){let{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ye(r);i.near=2,n.update(i);let o=r.getAltitude(t),s=e.spatialReference,l=i.eye,c=function(e){let{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return Ze.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(Ze,t)}(e),u=Le(e,t),d=i.aboveGround,h=n.planes[5],f=[],m=(0,re.O_)(T.uY,Ue,(0,re.vt)()),p=(0,re.O_)(T.uY,je,(0,re.vt)());(0,N.hZ)(qe,0,0,0,0);for(let e=0;e<4;e++){let t=1===e&&!d||3===e&&d?1-c:0,i=1===e&&d||3===e&&!d?c:1,s=n.lines[e],v=n.lines[3===e?0:e+1];for(let n=0;n<u;n++){let c=n/u,d=1===e?1-(1-c)**2:3===e?c**2:c,g=0===n?0:(0,a.Cc)(t,i,d),x=(0,M.Cc)(Ge,s.origin,v.origin,g),_=(0,Ie.nu)(s.direction,v.direction,g,ke);r.intersectManifoldClosestSilhouette((0,P.LV)(x,_),o,We),se(We,l,We,h),f.push((0,T.o8)(We)),0!==f.length&&(0,M.lo)(f.at(-1),We);let b=+!!(0,re.BX)(m,We)|((0,re.BX)(p,We)?2:0);qe[b]=1}}f.length>2&&(0,M.lo)(f[0],f.at(-1));let v=function(e,t,r){let i=2*(0,ge.FD)();return e.map(e=>{let n=[],o=!1;for(let a of e)t.fromRenderCoords(a,We,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,We[1]]),n.push([null,We[1]]),o=!0):n.push([We[0],We[1]]);if(o)for(let e=0;e<n.length;e++){let t=n[e];if(null!=t[0])continue;let r=n[e+1];t[0]=n.at(0===e?-1:e-1)[0],e++,r[0]=n.at(e===n.length-1?0:e+1)[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,N.m3)(qe)>1?function(e,t){let r=[];for(let i of e)r.push(...He(i,t));return r}(He(f,m),p):[f],r,s);return new X.A({rings:v,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c,u=t.latitude,d=(0,E.tO)(e.spatialReference).radius,h=t.longitude,f=function(e,t,r){let i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(u,r,d)/2;o=h-f,s=h+f;let m=(0,a.kU)(u),v=(1+Math.sin(m))/(1-Math.sin(m)),g=(v+1)*Math.tan(i/d/2),x=g*g;function _(e){let t=Math.PI/2;return(e=p.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*v+x))),c=l+i/d,l=_(l),c=_(c),c<l){let e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=xe.Y_.monotonic(o,s),s-o>180){let e=(s-o-180)/2;o+=e,s-=e}let b=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=b):n=new Y.A(o,l,s,c,b),e.spatialReference&&e.spatialReference.isWebMercator&&(0,be.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ye="composite-color",Xe=["final-color",Ye,"opaque-color","transparent-color"],Je={ANTIALIASING:"antialiasing",CUTFILL:"cutfill",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA:"focusarea",FOCUSAREA_MASK:"focusarea-mask",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT:"highlight",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Je)).concat(Xe),(0,T.vt)();var Ke=r(49186),Qe=r(10107),et=r(64108),tt=r(44208),rt=(r(17676),r(94656)),it=r(63907);r(93637),r(4576),"layout.centroid.smooth.case.mat2x2.mat2x3.mat2x4.mat3x2.mat3x3.mat3x4.mat4x2.mat4x3.mat4x4.uint.uvec2.uvec3.uvec4.samplerCubeShadow.sampler2DArray.sampler2DArrayShadow.isampler2D.isampler3D.isamplerCube.isampler2DArray.usampler2D.usampler3D.usamplerCube.usampler2DArray.coherent.restrict.readonly.writeonly.resource.atomic_uint.noperspective.patch.sample.subroutine.common.partition.active.filter.image1D.image2D.image3D.imageCube.iimage1D.iimage2D.iimage3D.iimageCube.uimage1D.uimage2D.uimage3D.uimageCube.image1DArray.image2DArray.iimage1DArray.iimage2DArray.uimage1DArray.uimage2DArray.image1DShadow.image2DShadow.image1DArrayShadow.image2DArrayShadow.imageBuffer.iimageBuffer.uimageBuffer.sampler1DArray.sampler1DArrayShadow.isampler1D.isampler1DArray.usampler1D.usampler1DArray.isampler2DRect.usampler2DRect.samplerBuffer.isamplerBuffer.usamplerBuffer.sampler2DMS.isampler2DMS.usampler2DMS.sampler2DMSArray.isampler2DMSArray.usampler2DMSArray.trunc.round.roundEven.isnan.isinf.floatBitsToInt.floatBitsToUint.intBitsToFloat.uintBitsToFloat.packSnorm2x16.unpackSnorm2x16.packUnorm2x16.unpackUnorm2x16.packHalf2x16.unpackHalf2x16.outerProduct.transpose.determinant.inverse.texture.textureSize.textureProj.textureLod.textureOffset.texelFetch.texelFetchOffset.textureProjOffset.textureLodOffset.textureProjLod.textureProjLodOffset.textureGrad.textureGradOffset.textureProjGrad.textureProjGradOffset".split("."),"precision.highp.mediump.lowp.attribute.const.uniform.varying.break.continue.do.for.while.if.else.in.out.inout.float.int.void.bool.true.false.discard.return.mat2.mat3.mat4.vec2.vec3.vec4.ivec2.ivec3.ivec4.uvec2.uvec3.uvec4.bvec2.bvec3.bvec4.sampler1D.sampler2D.sampler3D.usampler1D.usampler2D.usampler3D.samplerCube.sampler1DShadow.sampler2DShadow.struct.asm.class.union.enum.typedef.template.this.packed.goto.switch.default.inline.noinline.volatile.public.static.extern.external.interface.long.short.double.half.fixed.unsigned.input.output.hvec2.hvec3.hvec4.dvec2.dvec3.dvec4.fvec2.fvec3.fvec4.sampler2DRect.sampler3DRect.sampler2DRectShadow.sizeof.cast.namespace.using".split("."),"<<= >>= ++ -- << >> <= >= == != && || += -= *= /= %= &= ^^ ^= |= ( ) [ ] . ! ~ * / % + - < > & ^ | ? : = , ; { }".split(" "),"abs.acos.all.any.asin.atan.ceil.clamp.cos.cross.dFdx.dFdy.degrees.distance.dot.equal.exp.exp2.faceforward.floor.fract.gl_BackColor.gl_BackLightModelProduct.gl_BackLightProduct.gl_BackMaterial.gl_BackSecondaryColor.gl_ClipPlane.gl_ClipVertex.gl_Color.gl_DepthRange.gl_DepthRangeParameters.gl_EyePlaneQ.gl_EyePlaneR.gl_EyePlaneS.gl_EyePlaneT.gl_Fog.gl_FogCoord.gl_FogFragCoord.gl_FogParameters.gl_FragColor.gl_FragCoord.gl_FragData.gl_FragDepth.gl_FragDepthEXT.gl_FrontColor.gl_FrontFacing.gl_FrontLightModelProduct.gl_FrontLightProduct.gl_FrontMaterial.gl_FrontSecondaryColor.gl_LightModel.gl_LightModelParameters.gl_LightModelProducts.gl_LightProducts.gl_LightSource.gl_LightSourceParameters.gl_MaterialParameters.gl_MaxClipPlanes.gl_MaxCombinedTextureImageUnits.gl_MaxDrawBuffers.gl_MaxFragmentUniformComponents.gl_MaxLights.gl_MaxTextureCoords.gl_MaxTextureImageUnits.gl_MaxTextureUnits.gl_MaxVaryingFloats.gl_MaxVertexAttribs.gl_MaxVertexTextureImageUnits.gl_MaxVertexUniformComponents.gl_ModelViewMatrix.gl_ModelViewMatrixInverse.gl_ModelViewMatrixInverseTranspose.gl_ModelViewMatrixTranspose.gl_ModelViewProjectionMatrix.gl_ModelViewProjectionMatrixInverse.gl_ModelViewProjectionMatrixInverseTranspose.gl_ModelViewProjectionMatrixTranspose.gl_MultiTexCoord0.gl_MultiTexCoord1.gl_MultiTexCoord2.gl_MultiTexCoord3.gl_MultiTexCoord4.gl_MultiTexCoord5.gl_MultiTexCoord6.gl_MultiTexCoord7.gl_Normal.gl_NormalMatrix.gl_NormalScale.gl_ObjectPlaneQ.gl_ObjectPlaneR.gl_ObjectPlaneS.gl_ObjectPlaneT.gl_Point.gl_PointCoord.gl_PointParameters.gl_PointSize.gl_Position.gl_ProjectionMatrix.gl_ProjectionMatrixInverse.gl_ProjectionMatrixInverseTranspose.gl_ProjectionMatrixTranspose.gl_SecondaryColor.gl_TexCoord.gl_TextureEnvColor.gl_TextureMatrix.gl_TextureMatrixInverse.gl_TextureMatrixInverseTranspose.gl_TextureMatrixTranspose.gl_Vertex.greaterThan.greaterThanEqual.inversesqrt.length.lessThan.lessThanEqual.log.log2.matrixCompMult.max.min.mix.mod.normalize.not.notEqual.pow.radians.reflect.refract.sign.sin.smoothstep.sqrt.step.tan.texture2D.texture2DLod.texture2DProj.texture2DProjLod.textureCube.textureCubeLod.texture2DLodEXT.texture2DProjLodEXT.textureCubeLodEXT.texture2DGradEXT.texture2DProjGradEXT.textureCubeGradEXT.textureSize.texelFetch".split("."),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,tt.A)("esri-tests-disable-gpu-memory-measurements"),(0,rt.en)();(0,rt.en)();var nt=r(90644),ot=r(21231),at=r(48852),st=r(42293);const lt=!!(0,tt.A)("esri-tests-disable-gpu-memory-measurements");class ct{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(it.vt.Renderbuffer,this);let r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);let{width:i,height:n,internalFormat:o,multisampled:a}=t;a?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){let e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return lt?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,st.MW)(e.internalFormat);var e}resize(e,t){let r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;let i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&=(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(it.vt.Renderbuffer,this),null)}}class ut{constructor(e,t,r){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(it.vt.FramebufferObject,this),null!=t){let r=function(e,t){return dt(t)||ht(t)?t:ft(t)?new ot.A(e,t):function(e){return 3===mt(e)||null!=e&&"samples"in e}(t)?new ct(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(36064,r),dt(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=r)if(function(e){return dt(e)||ft(e)}(r))this._depthStencilTexture=dt(r)?r:new ot.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=ht(r)?r:new ct(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(36064);return dt(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return t&&dt(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=36064){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=36064){let t=this._colorAttachments.get(e);if(!t)return;let r=dt(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(r)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{dt(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=36064,r=0){let i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,r):this._framebufferTexture2D(i.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;let{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041!==r&&6402!==r?console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"):34041===r&&i!==it.ld.UNSIGNED_INT_24_8?console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):6402===r&&i!==it.ld.UNSIGNED_INT&&i!==it.ld.UNSIGNED_SHORT?console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,gt(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,gt(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,r=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,a){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");let s=a.descriptor;3553!==a.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==s?.width||null==s?.height||e+r>this.width||t+i>this.height||n+r>s.width||o+i>s.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");let l=this._context,c=l.bindTexture(a,ot.A.TEXTURE_UNIT_FOR_UPDATES);l.setActiveTexture(ot.A.TEXTURE_UNIT_FOR_UPDATES),l.bindFramebuffer(this),l.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),l.bindTexture(c,ot.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,a){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),a||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,a)}async readPixelsAsync(e,t,r,i,n,o,a,s){let{gl:l}=this._context,c=at.g.createPixelPack(this._context,35041,a.byteLength);try{this._context.bindBuffer(c);let u=this._context.boundFramebuffer;try{this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,n,o,0)}finally{this._context.unbindBuffer(35051),this._context.bindFramebuffer(u)}await c.getSubDataAsync(a,void 0,void 0,void 0,s)}finally{c.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let r={width:e,height:t};if(pt(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._glName&&(pt(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,rt.en)())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,r)=>{if(dt(t)){let i=vt(t);35866===i?this._framebufferTextureLayer(t.glName,r,e):this._framebufferTexture2D(t.glName,r,i,e)}else if(ht(t)){let i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=gt(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,vt(this._depthStencilTexture),e)}(0,rt.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(e,t=36064,r=3553,i=36160){this._context.gl.framebufferTexture2D(i,t,r,e,this._level)}_framebufferTextureLayer(e,t=36064,r=36160,i=0){this._context.gl.framebufferTextureLayer(r,t,e,this._level,i)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,s.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,gt(this._depthStencilTexture.descriptor.pixelFormat))),(0,s.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),pt(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){pt(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error("Attachment size must match framebuffer size!")}_getGLAttachmentPoint(e){switch(e.internalFormat){case it.SB.DEPTH_COMPONENT16:case it.SB.DEPTH_COMPONENT24:case it.SB.DEPTH_COMPONENT32F:return 36096;case it.iE.DEPTH24_STENCIL8:case it.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(e){if(-1===ut._MAX_COLOR_ATTACHMENTS){let{gl:e}=this._context;ut._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let t=e-36064;t+1>ut._MAX_COLOR_ATTACHMENTS&&R.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${ut._MAX_COLOR_ATTACHMENTS} color attachments`)}}function dt(e){return 1===mt(e)}function ht(e){return 2===mt(e)}function ft(e){return 0===mt(e)}function mt(e){return null!=e&&"type"in e?e.type:null}function pt(e,t){let r=Math.max(e.width,e.height);if(r>t){R.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function vt(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function gt(e){return 6402===e?36096:33306}var xt=r(67171),_t=(r(21818),r(69397),r(85079));const bt=[new(r(74038)._)("position",2,it.pe.UNSIGNED_SHORT,0,4)];(0,_t.Xk)(bt),r(66289);const yt=new Image;yt.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",yt.width=5,yt.height=5,yt.decode();let wt=class extends D.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=Ye,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Ke.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){let e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){e.initializeAndBind(),this.gl.drawBuffers(function(e){return e?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029]}(e))}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(e){return null}get input(){return this._frameBuffer}};(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"view",void 0),(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"consumes",void 0),(0,o.Cg)([(0,Qe.MZ)()],wt.prototype,"produces",void 0),(0,o.Cg)([(0,Qe.MZ)({readOnly:!0})],wt.prototype,"techniques",null),wt=(0,o.Cg)([(0,et.$)("esri.views.3d.webgl.RenderNode")],wt);let Mt=class extends wt{constructor(){super(...arguments),this.consumes={required:["normals"]},this.produces="disabled"}get enabled(){return!this.destroying&&!this.destroyed&&this.produces===Je.AMBIENT_ILLUMINATION}get _belowMaxElevation(){return(this.view.state.camera.relativeElevation??1/0)<5e5}get _useGlobalIllumination(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(11)}get _useSSAO(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(3)}_enable(){this.produces=Je.AMBIENT_ILLUMINATION,this.requestRender(1)}_disable(){this.produces="disabled",this.requestRender(1)}};(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"produces",void 0),Mt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.AmbientIllumination")],Mt);var Tt=r(15581),St=r(13840),Ct=r(42958),At=r(95774);let Et=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(At.S,()=>r.e(1285).then(()=>r(91285)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Et=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],Et);var It=r(65786);class Ot extends It.Y{constructor(){super(...arguments),this.projScale=1}}class Pt extends Ot{constructor(){super(...arguments),this.intensity=1}}class Dt extends It.Y{}class Rt extends Dt{constructor(){super(...arguments),this.blurSize=(0,B.vt)()}}let Ft=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Tt.S,()=>r.e(6122).then(()=>r(86122)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Ft=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],Ft);let Bt=class extends Mt{constructor(e){super(e),this._enableTime=(0,c.l5)(0),this._passParameters=new Pt,this._drawParameters=new Rt}initialize(){let e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new xt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new ot.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this._useSSAO,e=>{this._enableTime=(0,c.l5)(0),e?this._enable():this._disable()},l.pc))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){let t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(33306);if(!r||!i)return;let n=this.techniques.getCompiled(Ft),o=this.techniques.getCompiled(Et);if(!n||!o)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));let s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,f=h.relativeElevation,m=(0,a.qE)((5e5-f)/2e5,0,1),p=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=p*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDistance(1),this._passParameters.intensity=4*Nt/(0,Tt.g)(h)**6*v;let g=h.fullViewport[2],x=h.fullViewport[3],_=this.fboCache.acquire(g,x,"ssao input",2);s.bindFramebuffer(_.fbo),s.setViewport(0,0,g,x),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();let b=Math.round(g/2),y=Math.round(x/2),w=this.fboCache.acquire(b,y,"ssao blur",0);s.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=_.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/x),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,b,y),s.screen.draw(),_.release();let M=this.fboCache.acquire(b,y,Je.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,g,x),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=w.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/g,0),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,b,y),s.screen.draw(),s.setViewport4fv(h.fullViewport),w.release(),p<1&&this.requestRender(2),M}};Bt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Bt);const Nt=.5;function zt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
604
604
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
605
605
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
606
606
|
}
|
|
@@ -1118,4 +1118,4 @@ mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
|
1118
1118
|
calculateOcclusionAndOutputHighlight();
|
|
1119
1119
|
${(0,l.If)(_,"outputObjectAndLayerIdColor();")}
|
|
1120
1120
|
}
|
|
1121
|
-
`)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q),e.constants.add("opacityCutoff","float",i.v)}},72458(e,t,r){r.d(t,{O:()=>a});var i=r(32198),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.useFloatBlend=!0}}function a(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/16),e.constants.add("floatBlendInputScale","float",16)),e.constants.add("maxEmissiveStrength","float",16)}(0,i.Cg)([(0,n.W)()],o.prototype,"useFloatBlend",void 0)},48852(e,t,r){r.d(t,{g:()=>f});var i=r(4576),n=r(44208),o=r(53966),a=r(17676),s=r(78659),l=r(34275),c=r(94656),u=r(63907);const d=()=>o.A.getLogger("esri.views.webgl.BufferObject"),h=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(e,t,r){return new f(e,34963,t,r)}static createUniform(e,t,r){return new f(e,35345,t,r)}static createPixelPack(e,t=35041,r){let i=new f(e,35051,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=35040,r){return new f(e,35052,t,r)}static createTransformFeedback(e,t=35044,r){let i=new f(e,35982,t);return i.setSize(r),i}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(u.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,c.Y2)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case u.pe.UNSIGNED_INT:return this._sizeBytes/4;case u.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case u.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return h?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&=(this._context.gl.deleteBuffer(this._glName),null),this._context.instanceCounter.decrement(u.vt.BufferObject,this),this._context=null):this._glName&&d().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(34963===this.bufferType&&null!=t)switch(this._indexType=t,t){case u.pe.UNSIGNED_SHORT:e*=2;break;case u.pe.UNSIGNED_INT:e*=4;case u.pe.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;34963===this.bufferType&&((0,l.mg)(e)?this._indexType=u.pe.UNSIGNED_BYTE:(0,l.jq)(e)?this._indexType=u.pe.UNSIGNED_SHORT:(0,l.XJ)(e)&&(this._indexType=u.pe.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){34963===this.bufferType&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;let r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let i=this._context.gl;null==t?i.bufferData(this.bufferType,e,this.usage):i.bufferData(this.bufferType,t,this.usage),(0,c.Y2)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;let n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let{gl:o}=this._context;o.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r),(0,c.Y2)(o),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,n){if(r<0||n<0)return;let o=function(e){return(0,i.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(n??0))>e.byteLength)return;t+o*(n??0)>this.usedMemory&&d().warn("Potential problem getting subdata: requested data exceeds buffer size!");let a=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),a.getBufferSubData(35982,t,e,r,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),a.getBufferSubData(36662,t,e,r,n),this._context.unbindBuffer(36662))}async getSubDataAsync(e,t=0,r,i,n){if(await this._context.clientWaitAsync((0,s.l5)(10),n),!this._context||!this._glName)throw(0,a.NK)();this.getSubData(e,t,r,i)}}},65786(e,t,r){const i=class{};new i,r.d(t,["Y",0,i])},14113(e,t,r){r.d(t,{N5:()=>s});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new f,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){let r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),a=n.code.generateSource(),s=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?x:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${a.join("\n")}\n${s.join("\n")}`}generateBind(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,n,t)}}generateBindDraw(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(let t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null==e)o().error(`Trying to add null Uniform from ${Error().stack}.`);else{if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null==t?`uniform ${r} ${e};`:`uniform ${r} ${e}[${t}];`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(){this._entries=new Map}add(e,t){if(this._entries.has(e))throw new i.A("shaderbuilder:duplicate-input",`Duplicate input for ${e}`);this._entries.set(e,t)}get(e){let t=this._entries.get(e);if(null==t)throw new i.A("shaderbuilder:input-resolver-error",`No resolver for input ${e} found.`);return t()}}class u{constructor(e){this._stage=e,this._bodies=[]}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0){let e=[];for(let t of this._bodies)"string"==typeof t?e.push(t):e.push(...t());return[`void main() {\n ${e.join("\n")||""} \n}`]}if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class d{constructor(e){this._stage=e,this._entries=[]}add(e){return this._entries.push(e),this._stage}generateSource(){let e=[];for(let t of this._entries)"string"==typeof t?e.push(t):e.push(...t());return e}}class h extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new v(this),this.inputs=new c}get builder(){return this}}class f{constructor(){this._entries=[]}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,flat:r?.flat??!1,invariant:r?.invariant??!1})}generateSource(e){let t=[];return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+(r.flat?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){let i=this._entries.get(r);i?.name===e&&i?.type===t?o().warn(`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});let t=[];return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class v{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=v._numberToFloatStr(r);break;case"int":i=v._numberToIntStr(r);break;case"uint":i=v._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])}, ${v._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>v._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}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 int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",x="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},66289(e,t,r){r.d(t,{R:()=>n});var i=r(48852);class n extends i.g{constructor(e,t,r,i=35044){super(e,34962,i,r),this.layout=t}}},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}r.d(t,{Ey:()=>b,nk:()=>d,p3:()=>n}),r(4718);const o=i(0,771),a=(i(1,0),i(1,1),i(1,771)),s=(i(773,1),n(770,1,771,771)),l=n(0,0,768,0),c={face:1029,mode:2305},u={face:1028,mode:2305};function d(e,t,r){return{ref:e,readMask:t,stencilFront:r,stencilBack:r}}function h(e){return M.intern(e)}function f(e){return S.intern(e)}function m(e){return A.intern(e)}function p(e){return I.intern(e)}function v(e){return P.intern(e)}function g(e){return R.intern(e)}function x(e){return B.intern(e)}function _(e){return z.intern(e)}function b(e){return H.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;let t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function w(e){return"["+e.join(",")+"]"}const M=new y(T,e=>({__tag:"Blending",...e}));function T(e){return e?w([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 y(C,e=>({__tag:"Culling",...e}));function C(e){return e?w([e.face,e.mode]):null}const A=new y(E,e=>({__tag:"PolygonOffset",...e}));function E(e){return e?w([e.factor,e.units]):null}const I=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?w([e.func]):null}const P=new y(D,e=>({__tag:"StencilTest",...e}));function D(e){return e?w([e.ref,e.readMask,e.stencilFront.compare,e.stencilFront.fail,e.stencilFront.zFail,e.stencilFront.zPass,e.stencilBack.compare,e.stencilBack.fail,e.stencilBack.zFail,e.stencilBack.zPass]):null}const R=new y(F,e=>({__tag:"DepthWrite",...e}));function F(e){return e?w([e.zNear,e.zFar]):null}const B=new y(N,e=>({__tag:"ColorWrite",...e}));function N(e){return e?w([e.r,e.g,e.b,e.a]):null}const z=new y(L,e=>({__tag:"StencilWrite",...e}));function L(e){return e?w([e.mask]):null}const H=new y(function(e){return e?w([T(e.blending),C(e.culling),E(e.polygonOffset),O(e.depthTest),D(e.stencilTest),F(e.depthWrite),N(e.colorWrite),L(e.stencilWrite)]):null},e=>({blending:h(e.blending),culling:f(e.culling),polygonOffset:m(e.polygonOffset),depthTest:p(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:_(e.stencilWrite)}));r.d(t,["RC",0,a,"T8",0,s,"Uy",0,{zNear:0,zFar:1},"Xt",0,e=>2===e?c:1===e?u:null,"iD",0,o,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,l])}}]);
|
|
1121
|
+
`)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q),e.constants.add("opacityCutoff","float",i.v)}},72458(e,t,r){r.d(t,{O:()=>a});var i=r(32198),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.useFloatBlend=!0}}function a(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/16),e.constants.add("floatBlendInputScale","float",16)),e.constants.add("maxEmissiveStrength","float",16)}(0,i.Cg)([(0,n.W)()],o.prototype,"useFloatBlend",void 0)},48852(e,t,r){r.d(t,{g:()=>f});var i=r(4576),n=r(44208),o=r(53966),a=r(17676),s=r(78659),l=r(34275),c=r(94656),u=r(63907);const d=()=>o.A.getLogger("esri.views.webgl.BufferObject"),h=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(e,t,r){return new f(e,34963,t,r)}static createUniform(e,t,r){return new f(e,35345,t,r)}static createPixelPack(e,t=35041,r){let i=new f(e,35051,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=35040,r){return new f(e,35052,t,r)}static createTransformFeedback(e,t=35044,r){let i=new f(e,35982,t);return i.setSize(r),i}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(u.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,c.Y2)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case u.pe.UNSIGNED_INT:return this._sizeBytes/4;case u.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case u.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return h?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&=(this._context.gl.deleteBuffer(this._glName),null),this._context.instanceCounter.decrement(u.vt.BufferObject,this),this._context=null):this._glName&&d().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(34963===this.bufferType&&null!=t)switch(this._indexType=t,t){case u.pe.UNSIGNED_SHORT:e*=2;break;case u.pe.UNSIGNED_INT:e*=4;case u.pe.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;34963===this.bufferType&&((0,l.mg)(e)?this._indexType=u.pe.UNSIGNED_BYTE:(0,l.jq)(e)?this._indexType=u.pe.UNSIGNED_SHORT:(0,l.XJ)(e)&&(this._indexType=u.pe.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){34963===this.bufferType&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;let r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let i=this._context.gl;null==t?i.bufferData(this.bufferType,e,this.usage):i.bufferData(this.bufferType,t,this.usage),(0,c.Y2)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;let n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let{gl:o}=this._context;o.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r),(0,c.Y2)(o),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,n){if(r<0||n<0)return;let o=function(e){return(0,i.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(n??0))>e.byteLength)return;t+o*(n??0)>this.usedMemory&&d().warn("Potential problem getting subdata: requested data exceeds buffer size!");let a=this._context.gl,s=35982===this.bufferType?35982:36662;this._context.bindBuffer(this,s);try{a.getBufferSubData(s,t,e,r,n)}finally{this._context.unbindBuffer(s)}}async getSubDataAsync(e,t=0,r,i,n){if(await this._context.clientWaitAsync((0,s.l5)(10),n),!this._context||!this._glName)throw(0,a.NK)();this.getSubData(e,t,r,i)}}},65786(e,t,r){const i=class{};new i,r.d(t,["Y",0,i])},14113(e,t,r){r.d(t,{N5:()=>s});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new f,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){let r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),a=n.code.generateSource(),s=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?x:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${a.join("\n")}\n${s.join("\n")}`}generateBind(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,n,t)}}generateBindDraw(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(let t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null==e)o().error(`Trying to add null Uniform from ${Error().stack}.`);else{if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null==t?`uniform ${r} ${e};`:`uniform ${r} ${e}[${t}];`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(){this._entries=new Map}add(e,t){if(this._entries.has(e))throw new i.A("shaderbuilder:duplicate-input",`Duplicate input for ${e}`);this._entries.set(e,t)}get(e){let t=this._entries.get(e);if(null==t)throw new i.A("shaderbuilder:input-resolver-error",`No resolver for input ${e} found.`);return t()}}class u{constructor(e){this._stage=e,this._bodies=[]}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0){let e=[];for(let t of this._bodies)"string"==typeof t?e.push(t):e.push(...t());return[`void main() {\n ${e.join("\n")||""} \n}`]}if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class d{constructor(e){this._stage=e,this._entries=[]}add(e){return this._entries.push(e),this._stage}generateSource(){let e=[];for(let t of this._entries)"string"==typeof t?e.push(t):e.push(...t());return e}}class h extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new v(this),this.inputs=new c}get builder(){return this}}class f{constructor(){this._entries=[]}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,flat:r?.flat??!1,invariant:r?.invariant??!1})}generateSource(e){let t=[];return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+(r.flat?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){let i=this._entries.get(r);i?.name===e&&i?.type===t?o().warn(`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});let t=[];return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class v{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=v._numberToFloatStr(r);break;case"int":i=v._numberToIntStr(r);break;case"uint":i=v._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])}, ${v._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>v._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}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 int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",x="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},66289(e,t,r){r.d(t,{R:()=>n});var i=r(48852);class n extends i.g{constructor(e,t,r,i=35044){super(e,34962,i,r),this.layout=t}}},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}r.d(t,{Ey:()=>b,nk:()=>d,p3:()=>n}),r(4718);const o=i(0,771),a=(i(1,0),i(1,1),i(1,771)),s=(i(773,1),n(770,1,771,771)),l=n(0,0,768,0),c={face:1029,mode:2305},u={face:1028,mode:2305};function d(e,t,r){return{ref:e,readMask:t,stencilFront:r,stencilBack:r}}function h(e){return M.intern(e)}function f(e){return S.intern(e)}function m(e){return A.intern(e)}function p(e){return I.intern(e)}function v(e){return P.intern(e)}function g(e){return R.intern(e)}function x(e){return B.intern(e)}function _(e){return z.intern(e)}function b(e){return H.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;let t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function w(e){return"["+e.join(",")+"]"}const M=new y(T,e=>({__tag:"Blending",...e}));function T(e){return e?w([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 y(C,e=>({__tag:"Culling",...e}));function C(e){return e?w([e.face,e.mode]):null}const A=new y(E,e=>({__tag:"PolygonOffset",...e}));function E(e){return e?w([e.factor,e.units]):null}const I=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?w([e.func]):null}const P=new y(D,e=>({__tag:"StencilTest",...e}));function D(e){return e?w([e.ref,e.readMask,e.stencilFront.compare,e.stencilFront.fail,e.stencilFront.zFail,e.stencilFront.zPass,e.stencilBack.compare,e.stencilBack.fail,e.stencilBack.zFail,e.stencilBack.zPass]):null}const R=new y(F,e=>({__tag:"DepthWrite",...e}));function F(e){return e?w([e.zNear,e.zFar]):null}const B=new y(N,e=>({__tag:"ColorWrite",...e}));function N(e){return e?w([e.r,e.g,e.b,e.a]):null}const z=new y(L,e=>({__tag:"StencilWrite",...e}));function L(e){return e?w([e.mask]):null}const H=new y(function(e){return e?w([T(e.blending),C(e.culling),E(e.polygonOffset),O(e.depthTest),D(e.stencilTest),F(e.depthWrite),N(e.colorWrite),L(e.stencilWrite)]):null},e=>({blending:h(e.blending),culling:f(e.culling),polygonOffset:m(e.polygonOffset),depthTest:p(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:_(e.stencilWrite)}));r.d(t,["RC",0,a,"T8",0,s,"Uy",0,{zNear:0,zFar:1},"Xt",0,e=>2===e?c:1===e?u:null,"iD",0,o,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,l])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2387],{69052(e,t,r){r.d(t,{hr:()=>o});var n=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+l(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,n,o=0,i=!1){return(n-=o)<t?n+=l(e,t-n):n>r&&(n-=l(e,n-r)),i&&n===r&&(n=t),n+o}function l(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new o(0,2*Math.PI),a=(new o(-Math.PI,Math.PI),new o(0,360));r.d(t,["ie",0,a,"uC",0,s])},18370(e,t,r){r.d(t,{z:()=>o});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>c,el:()=>u});var n=r(69052),o=(r(49186),r(18370)),i=r(17676),l=(r(5443),r(39829)),s=(r(82799),r(16930)),a=(r(80754),r(21325));async function u(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let o=(0,a.Vp)(n);if(!o)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(o);return["xmin"in t?t:new l.A(t)]}let[s,u]=o.valid,c=!1;for(let t of e){if(!t)continue;if("point"===t.type){c||=t.x>=u,c||=t.x<=s;continue}let{extent:e}=t;if(null==e){c=!0;break}c||=e.xmin>=u,c||=e.xmin<=s,c||=e.xmax>=u,c||=e.xmax<=s}if(!c)return e;let[{foldInto360Range:m},y]=await(0,i.qr)(Promise.all([f.getImportPromise(),p.getImportPromise()]),r),h=y.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=y.fromGeometry(e),r=y.toGeometry(m(t,h),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const f=(0,o.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),p=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function c(e,t,r){let n=(0,a.Vp)(r);if(null==n)return e;let[o,i]=n.valid,l=2*i,s=0,u=0;t>i?s=Math.ceil(Math.abs(t-i)/l):t<o&&(s=-Math.ceil(Math.abs(t-o)/l)),e>i?u=Math.ceil(Math.abs(e-i)/l):e<o&&(u=-Math.ceil(Math.abs(e-o)/l));let f=e+(s-u)*l,p=f-t;return p>i?f-=l:p<o&&(f+=l),f}function m(e){let t=(0,a.Vp)(e);if(null==t)return null;let[r,o]=t.valid;return new n.hr(r,o)}const y=m(s.A.WGS84);m(s.A.WebMercator),r.d(t,["Y_",0,y])},80754(e,t,r){r.d(t,{kS:()=>u,kd:()=>a});var n=r(82799),o=r(16930),i=r(60408),l=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,l.Ed)(e))for(let r of function(e){return(0,i.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,l.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,l.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,l.n1)(e)){let[r,n,o]=e.b;r[0]+=t,n[0]+=t,o[0]+=t}else e[0]+=t;for(let r of function(e){return(0,i.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,s])},41653(e,t,r){r.r(t),r.d(t,{queryModel:()=>g,queryModels:()=>d});var n=r(56507),o=r(4576),i=r(49186),l=r(91869),s=r(84952),a=r(32198),u=r(69622),f=r(91429);let p=class extends u.A{constructor(e){super(e),this.name="",this.size=0}arrayBuffer(e){return this.loadArrayBuffer(e)}};(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"flags",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"loadArrayBuffer",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"name",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"size",void 0),p=(0,a.Cg)([(0,f.$K)("esri.layers.scene.ModelFileInfo")],p);let c=class extends u.A{constructor(e){super(e),this.files=[],this.format="",this.isSource=!1,this.name="",this.size=0}};(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"files",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"format",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"isSource",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"name",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"size",void 0),c=(0,a.Cg)([(0,f.$K)("esri.layers.scene.ModelInfo")],c);var m=r(20557),y=r(99199),h=r(97552);async function d(e,t,r,n){let a=e.infoFor3D;if(!a)throw new i.A("scenelayer:query-models-not-available","Model queries are not available without 3D object metadata",{layer:e});let{objectIdField:u,globalIdField:f}=t;if(!u||!f)throw new i.A("scenelayer:query-models-not-available","Missing required fields for model queries",{layer:e});let p=function(e,t,r,n){let o=function(e,t){let r=h.A.from(t)?.clone()??e.createQuery();return r.outFields=null,r.formatOf3DObjects=null,r.returnGeometry=!1,r}(e,t);return o.outFields=[r,n],o.returnGeometry=!1,o}(e,r,u,f),c=await t.queryFeatures(p,n);return await async function(e){let{infoFor3D:t,associatedLayer:r,options:n}=e,i=r.globalIdField,a=r.parsedUrl;if(!i||!a)return new Map;let u=await async function(e){let{options:t,infoFor3D:r,featureInfos:n}=e,i=[...n.keys()];if(t?.requestedFormat){let e=(0,m.fE)(t.requestedFormat,r.supportedFormats);return e?[{formatId:e,objectIds:i}]:[]}return await async function({options:e,infoFor3D:t,featureInfos:r,requestQuery:n,associatedLayer:i},a){let u=t.assetMapFieldRoles.parentGlobalId,f=t.assetMapFieldRoles.assetType,p=t.assetMapFieldRoles.flags,c=new Map;for(let[e,{globalId:t}]of r)t&&c.set(e,t);let d=(0,o.Am)(c.values()),g=(0,m.JZ)(t);if(!g||!d.length)return[];let M=(0,s.fj)(i.parsedUrl?.path??"",`../${g.id}`),w=!!e?.sourceOnly,b=new h.A({where:`${u} IN (${d.map(A).join(",")})`,outFields:w?[u,f,p]:[u,f],returnDistinctValues:!0,returnGeometry:!1}),{features:x}=await(0,y.s)(M,b,{query:n,signal:e?.signal}),F=new Set(a),v=new Map;for(let e of x){let t=e.getAttribute(u),r=e.getAttribute(f),n=e.getAttribute(p)??0;!r||!F.has(r)||!t||1&n||(0,l.tE)(v,t,()=>new Set).add(r)}let q=new Map;for(let[e,t]of c)for(let r of v.get(t)??[])(0,l.tE)(q,r,()=>[]).push(e);return a.map(e=>({formatId:e,objectIds:q.get(e)??[]})).filter(({objectIds:e})=>e.length>0)}(e,(0,o.Am)([...r.queryFormats,...r.editFormats]))}(e),f=new Map,p=await Promise.all(u.map(async({formatId:o,objectIds:l})=>{let s=(0,m.be)(o,t.supportedFormats),a=r.parsedUrl;if(null==s||!a||!l.length)return null;let u=(0,m._h)(o,t.supportedFormats),f=(0,m.qv)(u),p=r.createQuery();return p.objectIds=l,p.outFields=[i],p.formatOf3DObjects=o,p.returnGeometry=!0,{modelFormat:s,modelFileExtensions:f,featureSetJSON:await(0,y.e)(a.path,p,{query:e.requestQuery,signal:n?.signal},{uniqueIdFields:r.uniqueIdFields})}}));for(let t of p)t&&M(e,t.modelFormat,t.modelFileExtensions,t.featureSetJSON,f);return f}(new F(e,t,function(e){let t=new Map;for(let r of e.features){let e=r.getObjectId(),n=r.getGlobalId();null!=e&&null!=n&&t.set(e,{globalId:n})}return t}(c),a,n))}async function g(e,t,r,n){let o=n?.format;return((await d(e,t,{objectIds:[r]},{...n,requestedFormat:o,sourceOnly:null==o})).get(r)??[]).find(e=>o&&e.format===o||!o&&e.isSource)}function M({featureInfos:e,requestQuery:t,infoFor3D:r},n,o,i,s){let a=new Map;for(let e of i.assetMaps??[])(0,l.tE)(a,e.parentGlobalId,()=>[]).push(e);for(let[i,u]of e){let e=a.get(u.globalId);if(!e?.length)continue;let f=w(e,t,r);if(!f.length)continue;let p=f.reduce((e,t)=>e+t.size,0),m=x(f,o),y=!m.flags.includes("DERIVED");(0,l.tE)(s,i,()=>[]).push(new c({name:m.name,size:p,format:n,isSource:y,files:f}))}}function w(e,t,r){let n=new Map,o=({assetType:e})=>null!=(0,m.be)(e,r.supportedFormats),i=e.some(e=>o(e)&&!e.flags.includes("DERIVED"));for(let t of e)i&&o(t)&&t.flags.includes("DERIVED")||(0,l.tE)(n,t.assetName,()=>[]).push(t);let s=[];for(let[e,r]of n){r.sort((e,t)=>e.seqNo-t.seqNo);let n=r.reduce((e,t)=>e+t.size,0),o=r.map(({assetURL:e})=>e).filter(e=>!!e);o.length&&s.push(new p({name:e,size:n,flags:r[0].flags,loadArrayBuffer:e=>b(o,t,e)}))}return s}async function b(e,t,r){let o=await Promise.all(e.map(e=>(0,n.A)(e,{responseType:"array-buffer",query:t,signal:r?.signal}).then(({data:e})=>e)));return 1===o.length?o[0]:function(e){let t=e.reduce((e,t)=>e+t.byteLength,0),r=new Uint8Array(t),n=0;for(let t of e)r.set(new Uint8Array(t),n),n+=t.byteLength;return r.buffer}(o)}function x(e,t){return e.find(({name:e})=>t.some(t=>e.toLowerCase().endsWith(`.${t}`)))??e[0]}function A(e){return`'${e.replaceAll("'","''")}'`}class F{constructor(e,t,r,n,o){this.layer=e,this.associatedLayer=t,this.featureInfos=r,this.infoFor3D=n,this.options=o,this.requestQuery={...t.parsedUrl?.query,...e.customParameters,...e.apiKey?{token:e.apiKey}:{}}}}},99199(e,t,r){r.d(t,{e:()=>a,s:()=>s});var n=r(2272),o=r(80893),i=r(22671),l=r(97552);async function s(e,t,r,n){let o=await a(e,t,r,n);return i.A.fromJSON(o)}function a(e,t,r,i){let s=(0,n.Dl)(e),a={...r},u=l.A.from(t);return(0,o.eW)(s,u,u.sourceSpatialReference,a,i)}},22671(e,t,r){r.d(t,{A:()=>M});var n,o=r(32198),i=r(52106),l=r(66552),s=r(25482),a=r(4718),u=r(91429),f=r(16930),p=r(60408),c=r(65864),m=r(50498),y=r(20437),h=r(36005),d=r(43937);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let M=n=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,i.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,n=(0,c.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let n=t.features[r];n.geometry&&=(e?.[r])?.toJSON()||n.geometry}return t}quantize(e){let{scale:[t,r],translate:[n,o]}=e,i=this.features,l=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((o-e)/r));for(let e=0,t=i.length;e<t;e++)l?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[n,o],scale:[i,l]}=r,s=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*i+n,e=>o-e*l,s,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let n=f.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let i=e[t],l=r.fromJSON(i),s=i.geometry?.spatialReference;null!=l.geometry&&!s&&(l.geometry.spatialReference=n);let a=i.aggregateGeometries,u=l.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=n)}o.push(l)}return o}_quantizePoints(e,t,r){let n,o,i=[];for(let l=0,s=e.length;l<s;l++){let s=e[l];if(l>0){let e=t(s[0]),l=r(s[1]);(e!==n||l!==o)&&(i.push([e-n,l-o]),n=e,o=l)}else n=t(s[0]),o=r(s[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let n=(0,p.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){let i=n[e],l=this._quantizePoints(i,t,r);l&&o.push(l)}return o.length>0?((0,p.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{let i,l,s=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,n=s.length;e<n;e++){let n=s[e];for(let e=0,o=n.length;e<o;e++){let o=n[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}}if(n&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let i,l,s=e.points;for(let e=0,n=s.length;e<n;e++){let n=s[e];e>0?(i+=n[0],l+=n[1]):(i=n[0],l=n[1]),n[0]=t(i),n[1]=r(l)}if(n&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=n(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[i.A],json:{write:!0}})],M.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],M.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],M.prototype,"geometryType",void 0),(0,o.Cg)([(0,d.K)("geometryType")],M.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],M.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],M.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:f.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),(0,o.Cg)([(0,d.K)("spatialReference")],M.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],M.prototype,"transform",void 0),M=n=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],M),M.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>p,jV:()=>a,lF:()=>f});var n=r(92602),o=r(70333),i=r(4718),l=r(84952),s=r(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,l.An)(e):(0,i.o8)(e)}function f(e,t,r){let n={};for(let o in e){if("declaredClass"===o)continue;let i=e[o];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[o]=i.map(e=>f(e));else if("object"==typeof i)if(i.toJSON){let e=i.toJSON(r?.[o]);n[o]=t?e:JSON.stringify(e)}else n[o]=t?i:JSON.stringify(i);else n[o]=i}return n}async function p(e,t,i){return function(e,t){return e?t&&(0,s.Qc)(e)?t:(0,s.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t)||(!o.id&&n.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(6475),r.e(3713)]).then(()=>r(50148)),(await o.id.getCredential(e,i))?.token)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2387],{69052(e,t,r){r.d(t,{hr:()=>o});var n=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+l(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,n,o=0,i=!1){return(n-=o)<t?n+=l(e,t-n):n>r&&(n-=l(e,n-r)),i&&n===r&&(n=t),n+o}function l(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new o(0,2*Math.PI),a=(new o(-Math.PI,Math.PI),new o(0,360));r.d(t,["ie",0,a,"uC",0,s])},18370(e,t,r){r.d(t,{z:()=>o});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>c,el:()=>u});var n=r(69052),o=(r(49186),r(18370)),i=r(17676),l=(r(5443),r(39829)),s=(r(82799),r(16930)),a=(r(80754),r(21325));async function u(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let o=(0,a.Vp)(n);if(!o)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(o);return["xmin"in t?t:new l.A(t)]}let[s,u]=o.valid,c=!1;for(let t of e){if(!t)continue;if("point"===t.type){c||=t.x>=u,c||=t.x<=s;continue}let{extent:e}=t;if(null==e){c=!0;break}c||=e.xmin>=u,c||=e.xmin<=s,c||=e.xmax>=u,c||=e.xmax<=s}if(!c)return e;let[{foldInto360Range:m},y]=await(0,i.qr)(Promise.all([f.getImportPromise(),p.getImportPromise()]),r),h=y.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=y.fromGeometry(e),r=y.toGeometry(m(t,h),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const f=(0,o.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),p=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function c(e,t,r){let n=(0,a.Vp)(r);if(null==n)return e;let[o,i]=n.valid,l=2*i,s=0,u=0;t>i?s=Math.ceil(Math.abs(t-i)/l):t<o&&(s=-Math.ceil(Math.abs(t-o)/l)),e>i?u=Math.ceil(Math.abs(e-i)/l):e<o&&(u=-Math.ceil(Math.abs(e-o)/l));let f=e+(s-u)*l,p=f-t;return p>i?f-=l:p<o&&(f+=l),f}function m(e){let t=(0,a.Vp)(e);if(null==t)return null;let[r,o]=t.valid;return new n.hr(r,o)}const y=m(s.A.WGS84);m(s.A.WebMercator),r.d(t,["Y_",0,y])},80754(e,t,r){r.d(t,{kS:()=>u,kd:()=>a});var n=r(82799),o=r(16930),i=r(60408),l=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,l.Ed)(e))for(let r of function(e){return(0,i.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,l.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,l.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,l.n1)(e)){let[r,n,o]=e.b;r[0]+=t,n[0]+=t,o[0]+=t}else e[0]+=t;for(let r of function(e){return(0,i.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,s])},41653(e,t,r){r.r(t),r.d(t,{queryModel:()=>g,queryModels:()=>d});var n=r(56507),o=r(4576),i=r(49186),l=r(91869),s=r(84952),a=r(32198),u=r(69622),f=r(91429);let p=class extends u.A{constructor(e){super(e),this.name="",this.size=0}arrayBuffer(e){return this.loadArrayBuffer(e)}};(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"flags",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"loadArrayBuffer",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"name",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],p.prototype,"size",void 0),p=(0,a.Cg)([(0,f.$K)("esri.layers.scene.ModelFileInfo")],p);let c=class extends u.A{constructor(e){super(e),this.files=[],this.format="",this.isSource=!1,this.name="",this.size=0}};(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"files",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"format",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"isSource",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"name",void 0),(0,a.Cg)([(0,f.MZ)({constructOnly:!0})],c.prototype,"size",void 0),c=(0,a.Cg)([(0,f.$K)("esri.layers.scene.ModelInfo")],c);var m=r(20557),y=r(99199),h=r(97552);async function d(e,t,r,n){let a=e.infoFor3D;if(!a)throw new i.A("scenelayer:query-models-not-available","Model queries are not available without 3D object metadata",{layer:e});let{objectIdField:u,globalIdField:f}=t;if(!u||!f)throw new i.A("scenelayer:query-models-not-available","Missing required fields for model queries",{layer:e});let p=function(e,t,r,n){let o=function(e,t){let r=h.A.from(t)?.clone()??e.createQuery();return r.outFields=null,r.formatOf3DObjects=null,r.returnGeometry=!1,r}(e,t);return o.outFields=[r,n],o.returnGeometry=!1,o}(e,r,u,f),c=await t.queryFeatures(p,n);return await async function(e){let{infoFor3D:t,associatedLayer:r,options:n}=e,i=r.globalIdField,a=r.parsedUrl;if(!i||!a)return new Map;let u=await async function(e){let{options:t,infoFor3D:r,featureInfos:n}=e,i=[...n.keys()];if(t?.requestedFormat){let e=(0,m.fE)(t.requestedFormat,r.supportedFormats);return e?[{formatId:e,objectIds:i}]:[]}return await async function({options:e,infoFor3D:t,featureInfos:r,requestQuery:n,associatedLayer:i},a){let u=t.assetMapFieldRoles.parentGlobalId,f=t.assetMapFieldRoles.assetType,p=t.assetMapFieldRoles.flags,c=new Map;for(let[e,{globalId:t}]of r)t&&c.set(e,t);let d=(0,o.Am)(c.values()),g=(0,m.JZ)(t);if(!g||!d.length)return[];let M=(0,s.fj)(i.parsedUrl?.path??"",`../${g.id}`),w=!!e?.sourceOnly,b=new h.A({where:`${u} IN (${d.map(A).join(",")})`,outFields:w?[u,f,p]:[u,f],returnDistinctValues:!0,returnGeometry:!1}),{features:x}=await(0,y.s)(M,b,{query:n,signal:e?.signal}),F=new Set(a),v=new Map;for(let e of x){let t=e.getAttribute(u),r=e.getAttribute(f),n=e.getAttribute(p)??0;!r||!F.has(r)||!t||1&n||(0,l.tE)(v,t,()=>new Set).add(r)}let q=new Map;for(let[e,t]of c)for(let r of v.get(t)??[])(0,l.tE)(q,r,()=>[]).push(e);return a.map(e=>({formatId:e,objectIds:q.get(e)??[]})).filter(({objectIds:e})=>e.length>0)}(e,(0,o.Am)([...r.queryFormats,...r.editFormats]))}(e),f=new Map,p=await Promise.all(u.map(async({formatId:o,objectIds:l})=>{let s=(0,m.be)(o,t.supportedFormats),a=r.parsedUrl;if(null==s||!a||!l.length)return null;let u=(0,m._h)(o,t.supportedFormats),f=(0,m.qv)(u),p=r.createQuery();return p.objectIds=l,p.outFields=[i],p.formatOf3DObjects=o,p.returnGeometry=!0,{modelFormat:s,modelFileExtensions:f,featureSetJSON:await(0,y.e)(a.path,p,{query:e.requestQuery,signal:n?.signal},{uniqueIdFields:r.uniqueIdFields})}}));for(let t of p)t&&M(e,t.modelFormat,t.modelFileExtensions,t.featureSetJSON,f);return f}(new F(e,t,function(e){let t=new Map;for(let r of e.features){let e=r.getObjectId(),n=r.getGlobalId();null!=e&&null!=n&&t.set(e,{globalId:n})}return t}(c),a,n))}async function g(e,t,r,n){let o=n?.format;return((await d(e,t,{objectIds:[r]},{...n,requestedFormat:o,sourceOnly:null==o})).get(r)??[]).find(e=>o&&e.format===o||!o&&e.isSource)}function M({featureInfos:e,requestQuery:t,infoFor3D:r},n,o,i,s){let a=new Map;for(let e of i.assetMaps??[])(0,l.tE)(a,e.parentGlobalId,()=>[]).push(e);for(let[i,u]of e){let e=a.get(u.globalId);if(!e?.length)continue;let f=w(e,t,r);if(!f.length)continue;let p=f.reduce((e,t)=>e+t.size,0),m=x(f,o),y=!m.flags.includes("DERIVED");(0,l.tE)(s,i,()=>[]).push(new c({name:m.name,size:p,format:n,isSource:y,files:f}))}}function w(e,t,r){let n=new Map,o=({assetType:e})=>null!=(0,m.be)(e,r.supportedFormats),i=e.some(e=>o(e)&&!e.flags.includes("DERIVED"));for(let t of e)i&&o(t)&&t.flags.includes("DERIVED")||(0,l.tE)(n,t.assetName,()=>[]).push(t);let s=[];for(let[e,r]of n){r.sort((e,t)=>e.seqNo-t.seqNo);let n=r.reduce((e,t)=>e+t.size,0),o=r.map(({assetURL:e})=>e).filter(e=>!!e);o.length&&s.push(new p({name:e,size:n,flags:r[0].flags,loadArrayBuffer:e=>b(o,t,e)}))}return s}async function b(e,t,r){let o=await Promise.all(e.map(e=>(0,n.A)(e,{responseType:"array-buffer",query:t,signal:r?.signal}).then(({data:e})=>e)));return 1===o.length?o[0]:function(e){let t=e.reduce((e,t)=>e+t.byteLength,0),r=new Uint8Array(t),n=0;for(let t of e)r.set(new Uint8Array(t),n),n+=t.byteLength;return r.buffer}(o)}function x(e,t){return e.find(({name:e})=>t.some(t=>e.toLowerCase().endsWith(`.${t}`)))??e[0]}function A(e){return`'${e.replaceAll("'","''")}'`}class F{constructor(e,t,r,n,o){this.layer=e,this.associatedLayer=t,this.featureInfos=r,this.infoFor3D=n,this.options=o,this.requestQuery={...t.parsedUrl?.query,...e.customParameters,...e.apiKey?{token:e.apiKey}:{}}}}},99199(e,t,r){r.d(t,{e:()=>a,s:()=>s});var n=r(2272),o=r(80893),i=r(22671),l=r(97552);async function s(e,t,r,n){let o=await a(e,t,r,n);return i.A.fromJSON(o)}function a(e,t,r,i){let s=(0,n.Dl)(e),a={...r},u=l.A.from(t);return(0,o.eW)(s,u,u.sourceSpatialReference,a,i)}},22671(e,t,r){r.d(t,{A:()=>M});var n,o=r(32198),i=r(52106),l=r(66552),s=r(25482),a=r(4718),u=r(91429),f=r(16930),p=r(60408),c=r(65864),m=r(50498),y=r(20437),h=r(36005),d=r(43937);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let M=n=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,i.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,n=(0,c.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let n=t.features[r];n.geometry&&=(e?.[r])?.toJSON()||n.geometry}return t}quantize(e){let{scale:[t,r],translate:[n,o]}=e,i=this.features,l=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((o-e)/r));for(let e=0,t=i.length;e<t;e++)l?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[n,o],scale:[i,l]}=r,s=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*i+n,e=>o-e*l,s,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let n=f.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let i=e[t],l=r.fromJSON(i),s=i.geometry?.spatialReference;null!=l.geometry&&!s&&(l.geometry.spatialReference=n);let a=i.aggregateGeometries,u=l.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=n)}o.push(l)}return o}_quantizePoints(e,t,r){let n,o,i=[];for(let l=0,s=e.length;l<s;l++){let s=e[l];if(l>0){let e=t(s[0]),l=r(s[1]);(e!==n||l!==o)&&(i.push([e-n,l-o]),n=e,o=l)}else n=t(s[0]),o=r(s[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let n=(0,p.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){let i=n[e],l=this._quantizePoints(i,t,r);l&&o.push(l)}return o.length>0?((0,p.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{let i,l,s=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,n=s.length;e<n;e++){let n=s[e];for(let e=0,o=n.length;e<o;e++){let o=n[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}}if(n&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let i,l,s=e.points;for(let e=0,n=s.length;e<n;e++){let n=s[e];e>0?(i+=n[0],l+=n[1]):(i=n[0],l=n[1]),n[0]=t(i),n[1]=r(l)}if(n&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=n(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[i.A],json:{write:!0}})],M.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],M.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],M.prototype,"geometryType",void 0),(0,o.Cg)([(0,d.K)("geometryType")],M.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],M.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],M.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:f.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),(0,o.Cg)([(0,d.K)("spatialReference")],M.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],M.prototype,"transform",void 0),M=n=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],M),M.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>p,jV:()=>a,lF:()=>f});var n=r(92602),o=r(70333),i=r(4718),l=r(84952),s=r(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,l.An)(e):(0,i.o8)(e)}function f(e,t,r){let n={};for(let o in e){if("declaredClass"===o)continue;let i=e[o];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[o]=i.map(e=>f(e));else if("object"==typeof i)if(i.toJSON){let e=i.toJSON(r?.[o]);n[o]=t?e:JSON.stringify(e)}else n[o]=t?i:JSON.stringify(i);else n[o]=i}return n}async function p(e,t,i){return function(e,t){return e?t&&(0,s.Qc)(e)?t:(0,s.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t)||(!o.id&&n.A.request.useIdentity&&await Promise.all([r.e(8673),r.e(7956),r.e(3713)]).then(()=>r(50148)),(await o.id.getCredential(e,i))?.token)}}}]);
|