@arcgis/core 4.34.0-next.25 → 4.34.0-next.26
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/applications/Components/imageryUtils.d.ts +3 -0
- package/applications/Components/imageryUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +1 -0
- package/assets/esri/core/workers/chunks/{453e536f566d80a9863b.js → 21a8ae88cfa644a30058.js} +1 -1
- package/assets/esri/core/workers/chunks/2c2128201c80a1b1aeb6.js +1 -0
- package/assets/esri/core/workers/chunks/{5a9b27f2b343cd5b0852.js → 2d3679289b34b7da6bf4.js} +1 -1
- package/assets/esri/core/workers/chunks/{07613c89255bdab6b7c6.js → 4de6c479df609398dee0.js} +1 -1
- package/assets/esri/core/workers/chunks/6b6ab092f578b20c8e56.js +1 -0
- package/assets/esri/core/workers/chunks/7359652de3d7f969a712.js +1 -0
- package/assets/esri/core/workers/chunks/{d81260303a11d3fbe940.js → 7b736885278af9676f3a.js} +1 -1
- package/assets/esri/core/workers/chunks/8161b0a674ef9bf536a2.js +1 -0
- package/assets/esri/core/workers/chunks/908ec8165d567f052155.js +1 -0
- package/assets/esri/core/workers/chunks/{97324f030738fc0d456b.js → 9182fe69b9863e1de714.js} +1 -1
- package/assets/esri/core/workers/chunks/91e6030a2845f5404e82.js +1 -0
- package/assets/esri/core/workers/chunks/9d85e20a3d6ca1161c26.js +1 -0
- package/assets/esri/core/workers/chunks/a19689f8d1ef48fd2159.js +1 -0
- package/assets/esri/core/workers/chunks/a8f37681f8f6feebbd50.js +1 -0
- package/assets/esri/core/workers/chunks/{92737419b66894799a34.js → aeedc543320ee307d14a.js} +1 -1
- package/assets/esri/core/workers/chunks/{29ae5723fa35aa73ff9b.js → b3794c513a13facc98d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a78cb291c966f8ddda6.js → c6c0263fbcf2ca245c1b.js} +2 -2
- package/assets/esri/core/workers/chunks/c6c3e703b18e1bb7113a.js +1 -0
- package/assets/esri/core/workers/chunks/f5ee10a8afb7f70833bb.js +346 -0
- package/assets/esri/core/workers/chunks/{4f14e78d0560050c1a81.js → fa7243f080bcf6444929.js} +1 -1
- package/config.js +1 -1
- package/core/PooledArray.js +1 -1
- package/core/heapSort.js +5 -0
- package/core/mathUtils.js +1 -1
- package/interfaces.d.ts +55 -0
- package/kernel.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/package.json +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/ParentChildStage.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
- package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +0 -1
- package/assets/esri/core/workers/chunks/60aeb7a5ccd8bc71be02.js +0 -1
- package/assets/esri/core/workers/chunks/6a1cf6b0ffdf6080b5c4.js +0 -1
- package/assets/esri/core/workers/chunks/7d0c4e1518a6a63a3f87.js +0 -1
- package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +0 -1
- package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +0 -1
- package/assets/esri/core/workers/chunks/cafcb46d723d38b377a9.js +0 -1
- package/assets/esri/core/workers/chunks/cb81d448ed6bad205346.js +0 -1
- package/assets/esri/core/workers/chunks/d08a523b548e892e1222.js +0 -1
- package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +0 -1
- package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +0 -346
- package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +0 -1
- package/core/HeapSort.js +0 -5
|
@@ -264,7 +264,7 @@ return dpDummy * hiD + loD;
|
|
|
264
264
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:F.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
265
265
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
266
266
|
outputColorHighlightOID(finalColor, vpos, albedo ${(0,F.If)(J,", snow")});
|
|
267
|
-
`),t}const j=Object.freeze(Object.defineProperty({__proto__:null,build:W},Symbol.toStringTag,{value:"Module"}))},29878:(e,t,r)=>{var i;r.d(t,{d:()=>i}),function(e){e[e.OBJECT=0]="OBJECT",e[e.HUD=1]="HUD",e[e.TERRAIN=2]="TERRAIN",e[e.OVERLAY=3]="OVERLAY",e[e.I3S=4]="I3S",e[e.PCL=5]="PCL",e[e.LOD=6]="LOD",e[e.VOXEL=7]="VOXEL",e[e.TILES3D=8]="TILES3D"}(i||(i={}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(
|
|
267
|
+
`),t}const j=Object.freeze(Object.defineProperty({__proto__:null,build:W},Symbol.toStringTag,{value:"Module"}))},29878:(e,t,r)=>{var i;r.d(t,{d:()=>i}),function(e){e[e.OBJECT=0]="OBJECT",e[e.HUD=1]="HUD",e[e.TERRAIN=2]="TERRAIN",e[e.OVERLAY=3]="OVERLAY",e[e.I3S=4]="I3S",e[e.PCL=5]="PCL",e[e.LOD=6]="LOD",e[e.VOXEL=7]="VOXEL",e[e.TILES3D=8]="TILES3D"}(i||(i={}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(15142),n=r(38954),o=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:c}=r;(0,a.vA)(c.length%this._numIndexPerPrimitive===0),(0,a.vA)(c.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*c[this._numIndexPerPrimitive*e[0]];l.clear(),l.push(u);const h=(0,o.fA)(i[u],i[u+1],i[u+2]),m=(0,o.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*c[r+e],l.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const p=(0,n.m)((0,o.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let f=this.radius*this.radius;for(let e=0;e<l.length;++e){u=l.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],n=i[u+2]-p[2],o=t*t+r*r+n*n;if(o<=f)continue;const a=Math.sqrt(o),s=.5*(a-this.radius);this.radius=this.radius+s,f=this.radius*this.radius;const c=s/a;p[0]+=t*c,p[1]+=r*c,p[2]+=n*c}this.center=p,l.clear()}getChildren(){if(this._children||(0,n.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,n.m)((0,o.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:l,indices:c}=this.position;for(let n=0;n<t;++n){let t=0;const o=this._numIndexPerPrimitive*this.primitiveIndices[n];let s=l*c[o],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=l*c[o+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[n]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){l.prune()}}const l=new i.A({deallocator:null})},31821:(e,t,r)=>{function i(e,...t){let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r}function n(e,t,r=""){return e?t:r}r.d(t,{H:()=>i,If:()=>n}),function(e){e.int=function(e){return Math.round(e).toString()},e.float=function(e){return e.toPrecision(8)}}(i||(i={}))},32680:(e,t,r)=>{r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
268
268
|
vec3 camToVert = posWorld - camPosWorld;
|
|
269
269
|
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
270
270
|
if (isBackface) {
|
|
@@ -564,7 +564,7 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
|
|
|
564
564
|
}`)}function l(e){e.uniforms.add(new o.t("screenSizePerspective",e=>d(e.screenSizePerspective)))}function c(e){e.uniforms.add(new o.t("screenSizePerspectiveAlignment",e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective)))}function d(e){return(0,i.i)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,n.vt)()},53466:(e,t,r)=>{r.d(t,{I:()=>i,U:()=>l});var i,n,o=r(21818),a=r(31821),s=r(46540);function l(e,t){switch(t.textureCoordinateType){case i.Default:return e.attributes.add(s.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case i.Atlas:return e.attributes.add(s.r.UV0,"vec2"),e.attributes.add(s.r.UVREGION,"vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() {
|
|
565
565
|
vuv0 = uv0;
|
|
566
566
|
vuvRegion = uvRegion;
|
|
567
|
-
}`);default:(0,o.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.COUNT=3]="COUNT"},53802:(e,t,r)=>{r.d(t,{n:()=>zt});var i=r(31821),n=r(12791),o=r(90237),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(10107),u=(r(44208),r(53966)),h=(r(87811),r(40608)),m=r(37585),p=r(69540);let f=class extends p.A{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._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o._)([(0,h.$)("esri.CameraLayout")],f);const v=f;var g=r(69052),_=r(25482),T=r(79901),x=r(36005),E=r(43937),M=r(56507),A=r(86738);let w=class extends(p.A.ClonableMixin(_.A)){constructor(...e){super(...e),this.position=new A.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new v}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const 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){const n=e.clone();n.x=(0,M.GB)(e.x||0),n.y=(0,M.GB)(e.y||0),n.z=e.hasZ?(0,M.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new A.A;return r.read(e,t),r.x=(0,M.GB)(r.x||0),r.y=(0,M.GB)(r.y||0),r.z=r.hasZ?(0,M.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._)([(0,d.MZ)({type:A.A,json:{write:{isRequired:!0}}})],w.prototype,"position",void 0),(0,o._)([(0,E.K)("position")],w.prototype,"writePosition",null),(0,o._)([(0,x.w)("position")],w.prototype,"readPosition",null),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,T.w)(e=>g.ie.normalize((0,M.GB)(e)))],w.prototype,"heading",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,T.w)(e=>(0,a.qE)((0,M.GB)(e),-180,180))],w.prototype,"tilt",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,T.w)(e=>(0,a.qE)((0,M.GB)(e,55),1,170))],w.prototype,"fov",void 0),(0,o._)([(0,d.MZ)({type:v,nonNullable:!0,json:{read:!1,write:!1}})],w.prototype,"layout",void 0),w=(0,o._)([(0,h.$)("esri.Camera")],w);var b,R,O,S,y=r(9093),C=r(38954),I=r(51850),N=r(16930),P=(r(48353),r(9762),r(65806)),D=r(27993),F=r(73941),L=(r(19419),r(69622)),H=r(90629),B=r(58083),G=r(48163),U=r(87317),z=r(91829),V=r(82919),W=r(71351),j=r(44280),k=r(24151);r(3694),(S=b||(b={}))[S.Default=0]="Default",S[S.Screenshot=1]="Screenshot",S[S.ObjectAndLayerID=2]="ObjectAndLayerID",function(e){e[e.TOP=0]="TOP",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM",e[e.LEFT=3]="LEFT"}(R||(R={}));let q=O=class extends L.A{constructor(e){super(e),this._ray=(0,W.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,G.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,y.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,y.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,y.vt)(),this._frustumDirty=!0,this._frustum=(0,V.vt)(),this._fullViewport=(0,z.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,I.vt)(),this._up=(0,I.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)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,C.d)(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,B.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,C.i)((0,I.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,C.i)((0,I.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,C.i)((0,I.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;const e=(0,U.d)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,U.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,U.d)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,U.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[R.LEFT],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[R.BOTTOM],this._viewport[1]!==e&&(this._viewport[1]=e,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._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._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[R.RIGHT]+this._padding[R.LEFT]}set fullWidth(e){this.width=e-(this._padding[R.RIGHT]+this._padding[R.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[R.TOP]+this._padding[R.BOTTOM]}set fullHeight(e){this.height=e-(this._padding[R.TOP]+this._padding[R.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[R.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[R.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,U.a)(this._padding,e)||(this._viewport[0]+=e[R.LEFT]-this._padding[R.LEFT],this._viewport[1]+=e[R.BOTTOM]-this._padding[R.BOTTOM],this._viewport[2]-=e[R.RIGHT]+e[R.LEFT]-(this._padding[R.RIGHT]+this._padding[R.LEFT]),this._viewport[3]-=e[R.TOP]+e[R.BOTTOM]-(this._padding[R.TOP]+this._padding[R.BOTTOM]),(0,U.c)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,B.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,B.B8)((0,y.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,y.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,C.j)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,B.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,B.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const 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,d=(0,B.$h)((0,y.vt)(),a*(1+2*this._padding[R.LEFT]/e),s*(1+2*this._padding[R.RIGHT]/e),l*(1+2*this._padding[R.BOTTOM]/t),c*(1+2*this._padding[R.TOP]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,B.aI)(u,d)?u:d}copyFrom(e){(0,C.c)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,U.c)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,U.c)(this._padding,e.padding),this.notifyChange("_padding"),(0,m.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;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,B.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,V.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,B.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,U.c)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new O).copyFrom(this)}equals(e){return(0,C.q)(this.eye,e.eye)&&(0,C.q)(this.center,e.center)&&(0,C.q)(this.up,e.up)&&(0,U.a)(this._viewport,e.viewport)&&(0,U.a)(this._padding,e.padding)&&(0,m.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}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,U.f)(e.screenPadding,this.screenPadding)>=t||(0,U.f)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,C.a)(Z,e.eye,e.center),(0,C.a)(X,this.eye,this.center);const r=(0,C.e)(Z,X),i=(0,C.y)(Z),n=(0,C.y)(X),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,C.x)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,j.gr)(this.viewForward,(0,C.d)(Z,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,H.gs)()){return e[0]=(this.padding[R.LEFT]+this.width/2)/this.pixelRatio,e[1]=(this.padding[R.TOP]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[R.LEFT]+this.width*t,e[1]=this.padding[R.BOTTOM]+this.height*r,e[2]=.5,e}setGLViewport(e){const 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!==$&&(0,C.c)($,e),$[3]=1,(0,U.t)($,$,this.projectionMatrix);const r=Math.abs($[3]);(0,C.g)($,$,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*$[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*$[1]),t[2]=.5*($[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;$[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],$[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],$[2]=(2*e[2]-1)*e[3],$[3]=e[3],null!=this.inverseProjectionMatrix&&((0,U.t)($,$,this.inverseProjectionMatrix),t[0]=$[0],t[1]=$[1],t[2]=$[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,J),this.renderToScreen(J,t),t}projectToRenderScreen(e,t){if($[0]=e[0],$[1]=e[1],$[2]=e[2],$[3]=1,(0,U.t)($,$,this.viewProjectionMatrix),0===$[3])return null;const r=$;(0,C.g)(r,r,1/Math.abs($[3]));const 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,J),t)}unprojectFromRenderScreen(e,t){if((0,B.lw)(Y,this.projectionMatrix,this.viewMatrix),!(0,B.B8)(Y,Y))return null;const r=this.fullViewport;return $[0]=2*(e[0]-r[0])/r[2]-1,$[1]=2*(e[1]-r[1])/r[3]-1,$[2]=2*e[2]-1,$[3]=1,(0,U.t)($,$,Y),0===$[3]?null:(t[0]=$[0]/$[3],t[1]=$[1]/$[3],t[2]=$[2]/$[3],t)}constrainWindowSize(e,t,r,i){const 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),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){e===k.RT.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}_computeUpGlobal(){(0,C.d)(Z,this.center,this.eye);const e=(0,C.l)(this.center);e<1?((0,C.i)(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,C.e)(Z,this.center))>.9999*(0,C.l)(Z)*e||((0,C.h)(this._up,Z,this.center),(0,C.h)(this._up,this._up,Z),(0,C.n)(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){(0,C.E)(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&((0,C.g)(Z,Z,Z[2]),(0,C.i)(this._up,-Z[0],-Z[1],1-Z[2]),(0,C.n)(this._up,this._up),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,C.q)(e,t)||((0,C.c)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):u.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,V.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,B.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o._)([(0,d.MZ)()],q.prototype,"_viewport",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_padding",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_fov",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_nearFar",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_viewDirty",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_viewMatrix",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_pixelRatio",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"pixelRatio",null),(0,o._)([(0,d.MZ)()],q.prototype,"row",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"column",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_rows",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"rows",null),(0,o._)([(0,d.MZ)()],q.prototype,"_columns",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"columns",null),(0,o._)([(0,d.MZ)()],q.prototype,"eye",null),(0,o._)([(0,d.MZ)()],q.prototype,"center",null),(0,o._)([(0,d.MZ)()],q.prototype,"_center",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"up",null),(0,o._)([(0,d.MZ)()],q.prototype,"_up",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"viewMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewForward",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewUp",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewRight",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"nearFar",null),(0,o._)([(0,d.MZ)()],q.prototype,"near",null),(0,o._)([(0,d.MZ)()],q.prototype,"far",null),(0,o._)([(0,d.MZ)()],q.prototype,"viewport",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"screenViewport",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"screenPadding",null),(0,o._)([(0,d.MZ)()],q.prototype,"x",null),(0,o._)([(0,d.MZ)()],q.prototype,"y",null),(0,o._)([(0,d.MZ)()],q.prototype,"width",null),(0,o._)([(0,d.MZ)()],q.prototype,"height",null),(0,o._)([(0,d.MZ)()],q.prototype,"fullWidth",null),(0,o._)([(0,d.MZ)()],q.prototype,"fullHeight",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"_aspect",null),(0,o._)([(0,d.MZ)()],q.prototype,"padding",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"projectionMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"inverseProjectionMatrix",null),(0,o._)([(0,d.MZ)()],q.prototype,"fov",null),(0,o._)([(0,d.MZ)()],q.prototype,"fovX",null),(0,o._)([(0,d.MZ)()],q.prototype,"fovY",null),(0,o._)([(0,d.MZ)()],q.prototype,"viewInverseTransposeMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"_projectionMatrixInternal",null),(0,o._)([(0,d.MZ)()],q.prototype,"relativeElevation",void 0),q=O=(0,o._)([(0,h.$)("esri.views.3d.webgl.RenderCamera")],q);const $=(0,z.vt)(),Y=(0,y.vt)(),Z=(0,I.vt)(),X=(0,I.vt)(),J=(0,H.r_)();class K{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far))}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.zero=new K(0,0)}static{this.infinite=new K}}r(49718),r(62258),r(6867),r(29878),r(16396),(0,I.vt)(),(0,I.vt)(),(0,I.vt)(),new WeakMap;var Q,ee,te,re,ie=r(5443),ne=r(39829),oe=r(95108);function ae(e,t,r,i){const n=function(e,t){const r=t===te.LEFT||t===te.RIGHT?0:1,i=e[t],n=t===te.LEFT||t===te.BOTTOM?Q.MIN:Q.MAX,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return n===Q.MIN?ee.OUTSIDE:ee.INSIDE;if(t[r]>i&&a[r]>i)return n===Q.MIN?ee.INSIDE:ee.OUTSIDE;const 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?ee.OUTSIDE_IN:ee.INSIDE_OUT}}(r,i);if(e.length=0,t.length){n(le,t[0],t[0])===ee.INSIDE&&se(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(le,t[r],i)){case ee.INSIDE:se(e,i);break;case ee.INSIDE_OUT:se(e,(0,G.o8)(le));break;case ee.OUTSIDE_IN:se(e,(0,G.o8)(le)),se(e,i);case ee.OUTSIDE:}}}}function se(e,t){0!==e.length&&(0,m.aI)(e.at(-1),t)||e.push(t)}(re=Q||(Q={}))[re.MIN=1]="MIN",re[re.MAX=-1]="MAX",function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INSIDE=1]="INSIDE",e[e.OUTSIDE_IN=2]="OUTSIDE_IN",e[e.INSIDE_OUT=3]="INSIDE_OUT"}(ee||(ee={})),function(e){e[e.LEFT=0]="LEFT",e[e.BOTTOM=1]="BOTTOM",e[e.RIGHT=2]="RIGHT",e[e.TOP=3]="TOP"}(te||(te={}));const le=(0,G.vt)();class ce{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,V.vt)(),this._points=(0,V.Qy)(),this.lines=new Array(12),this._origin=(0,I.vt)(),this._direction=(0,I.vt)(),this._altitude=null;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,I.vt)(),endpoint:null}}update(e){(0,V.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,C.c)(this._origin,e.eye),(0,C.c)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines()}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,C.c)(this._points[t],e[t]);(0,V.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,V.m7)(this.frustum,e)}intersectsRay(e){return(0,V.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,V.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,V.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;he(this.lines[t],e[t],e[r]),he(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),he(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}static{this.planePointIndices=V.c8}static{this.nearFarLineIndices=[[V.J7.NEAR_BOTTOM_LEFT,V.J7.FAR_BOTTOM_LEFT],[V.J7.NEAR_BOTTOM_RIGHT,V.J7.FAR_BOTTOM_RIGHT],[V.J7.NEAR_TOP_RIGHT,V.J7.FAR_TOP_RIGHT],[V.J7.NEAR_TOP_LEFT,V.J7.FAR_TOP_LEFT]]}}var de,ue;function he(e,t,r){e.origin=t,e.endpoint=r,(0,C.E)(e.direction,t,r)}(ue=de||(de={}))[ue.NEAR_FAR_BOTTOM_LEFT=0]="NEAR_FAR_BOTTOM_LEFT",ue[ue.NEAR_FAR_BOTTOM_RIGHT=1]="NEAR_FAR_BOTTOM_RIGHT",ue[ue.NEAR_FAR_TOP_RIGHT=2]="NEAR_FAR_TOP_RIGHT",ue[ue.NEAR_FAR_TOP_LEFT=3]="NEAR_FAR_TOP_LEFT",ue[ue.NEAR_BOTTOM=4]="NEAR_BOTTOM",ue[ue.NEAR_RIGHT=5]="NEAR_RIGHT",ue[ue.NEAR_TOP=6]="NEAR_TOP",ue[ue.NEAR_LEFT=7]="NEAR_LEFT",ue[ue.FAR_BOTTOM=8]="FAR_BOTTOM",ue[ue.FAR_RIGHT=9]="FAR_RIGHT",ue[ue.FAR_TOP=10]="FAR_TOP",ue[ue.FAR_LEFT=11]="FAR_LEFT";var me=r(11964),pe=r(27921);const fe=(0,I.vt)(),ve=(0,I.vt)();function ge(){return{direction:(0,I.vt)(),up:(0,I.vt)()}}function _e(e,t,r,i,n){let o=(0,C.n)(fe,e),s=(0,C.e)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,C.e)(t,i)),s<.99?((0,C.c)(o,t),l&&(0,C.g)(o,o,-1)):o=null);let c=0;if(o){(0,C.g)(ve,i,(0,C.e)(i,o)),(0,C.d)(o,o,ve);const e=(0,C.e)(o,n)/((0,C.l)(o)*(0,C.l)(n));(0,C.h)(ve,o,n),c=((0,C.e)(ve,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,C.e)(i,e)/(0,C.l)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function Te(e,t,r,i){(0,C.d)(xe,r,t),(0,pe.T7)(i,(0,me.LV)(t,xe),e)||e===r||(0,C.c)(e,r)}const xe=(0,I.vt)(),Ee=(0,I.fA)(0,1,0),Me=(0,I.fA)(0,0,1),Ae=(0,y.vt)(),we=(0,I.vt)(),be=(0,I.vt)();function Re(e,t,r,i=ge()){const{direction:n,up:o}=i;return(0,B.N9)(Ae,-(0,a.kU)(t)),(0,B.eL)(Ae,Ae,(0,a.kU)(r)),(0,C.t)(n,Me,Ae),(0,C.g)(n,n,-1),(0,C.t)(o,Ee,Ae),i}function Oe(e,t,r,i,n){const o=t.lines[de.FAR_LEFT].direction,a=(n-r.getAltitude(i))/o[2];(0,C.b)(e,i,o,a)}const Se=(0,I.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return _e(t,r,i,Me,Ee)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=Re(0,r,i),o=(0,I.vt)();return(0,C.g)(o,n.direction,-t),(0,C.f)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:Re,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[V.FB.FAR];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,W.LV)(t.origin,t.direction),n,Se)||Oe(Se,r,i,t.endpoint,n),Te(Se,a,Se,l),s.push((0,G.fA)(Se[0],Se[1]))}return function(e,t,r){const i=e.map(e=>((0,C.i)(Se,e[0],e[1],0),t.fromRenderCoords(Se,Se,r),[Se[0],Se[1]]));return i.length<=2?new ne.A({spatialReference:r}):(i.push(i[0].slice()),(0,oe.$3)(i)||i.reverse(),new ne.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return ae(r,e,t,te.LEFT),ae(i,r,t,te.BOTTOM),ae(r,i,t,te.RIGHT),ae(i,r,t,te.TOP),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,P.g)(t,we,o),(0,P.g)(t,be,o),we[0]-=r/2,be[0]+=r/2,we[1]-=i/2,be[1]+=i/2,(0,D.F)(we,o,we,a),(0,D.F)(be,o,be,a),n?(n.xmin=we[0],n.ymin=we[1],n.xmax=be[0],n.ymax=be[1],n.spatialReference=a):n=new ie.A(we[0],we[1],be[0],be[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ye=r(34304),Ce=r(97937),Ie=r(28735);r(83047);const Ne=(0,I.fA)(parseFloat(Number(5802e-9).toFixed(6)),parseFloat(Number(13558e-9).toFixed(6)),parseFloat(Number(331e-7).toFixed(6))),Pe=(0,I.fA)(3*parseFloat(Number(65e-8).toFixed(6)),3*parseFloat(Number(1881e-9).toFixed(6)),3*parseFloat(Number(85e-9).toFixed(6)));(0,I.fA)(parseFloat(Number(Ne[0]+Pe[0]).toFixed(6)),parseFloat(Number(Ne[1]+Pe[1]).toFixed(6)),parseFloat(Number(Ne[2]+Pe[2]).toFixed(6)));(0,I.vt)(),(0,I.vt)(),(0,Ce.c)(),(0,W.vt)();const De=(0,I.vt)(),Fe=(0,I.vt)();var Le=r(32728);const He=(0,I.fA)(0,0,1),Be=(0,C.n)((0,I.vt)(),(0,I.fA)(1,1,1)),Ge=new g.hr(-180,180),Ue=(0,y.vt)(),ze=(0,I.vt)(),Ve=(0,I.vt)();function We(e,t,r,i=ge()){(0,C.h)(ze,e,He),0===(0,C.e)(ze,ze)&&(0,C.h)(ze,e,Be),(0,B.$0)(Ue,-(0,a.kU)(t),e),(0,B.e$)(Ue,Ue,-(0,a.kU)(r),ze);const{up:n,direction:o}=i;return(0,C.h)(n,ze,e),(0,C.n)(n,n),(0,C.t)(n,n,Ue),(0,C.n)(o,e),(0,C.u)(o,o),(0,C.t)(o,o,Ue),i}function je(e){const t=e[1];e[1]=-e[2],e[2]=t}function ke(e,t){const r=We(t,e.heading,e.tilt);return e.up=r.up,e}function qe(e,t){const r=[],i=[],n=(0,ye.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,me.Cr)(a,s,et),c=(0,pe.vE)(t,l.origin,l.vector,pe.v1.NONE,Ke);switch(c){case pe.Nj.INSIDE:r.push(a);break;case pe.Nj.OUTSIDE:i.push(a);break;case pe.Nj.INTERSECTS_INSIDE_OUT:case pe.Nj.INTERSECTS_OUTSIDE_IN:{const[e,o,s]=c===pe.Nj.INTERSECTS_INSIDE_OUT?[1,r,i]:[-1,i,r],l=(0,pe.Qj)(t),d=(0,C.b)((0,I.vt)(),Ke,l,e*n),u=(0,C.b)((0,I.vt)(),Ke,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const $e={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Ye=(0,I.fA)(1,0,0),Ze=(0,I.fA)(0,1,0),Xe=(0,I.vt)(),Je=(0,I.vt)(),Ke=(0,I.vt)(),Qe=(0,Ce.c)(),et=(0,me.vt)(),tt=(0,z.vt)();var rt,it,nt;Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=ze,o=Ve;return(0,C.n)(n,e),(0,C.h)(Ve,n,He),0===(0,C.e)(Ve,Ve)&&(0,C.h)(Ve,n,Be),(0,C.h)(o,Ve,n),_e(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,I.vt)(),up:null,tilt:i,heading:r},o=ze;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),m=Math.cos(c),p=(0,C.l)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const v=m*s,g=s*s*(h*h),_=u*u*g,T=f-v,x=T*T,E=_*(_+x-o[1]*o[1]);if(E<0)return(0,C.g)(n.eye,o,f/p),n.tilt=0,ke(n,e);const M=Math.sqrt(E),A=o[1]*T,w=_+x;let b;if(b=u>0?-M+A:M+A,Math.abs(w)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,C.g)(n.eye,o,f/p),n.tilt=0,je(n.eye),ke(n,e);n.eye[1]=b/w;const R=d*d*g,O=h*s,S=u*O*n.eye[1],y=n.eye[1]*n.eye[1],N=1-y,P=Math.sqrt(N),D=_*y+R-2*S*P*T+N*x;return Math.abs(D)<1e-8?((0,C.g)(n.eye,o,f/p),n.tilt=0,je(n.eye),ke(n,e)):(n.eye[0]=(N*(f*o[0]-v*o[0])-O*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(N*(f*o[2]-v*o[2])-O*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,C.g)(n.eye,n.eye,f),je(n.eye),ke(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,C.l)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:We,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,C.l)(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){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ce(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,C.j)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=$e,v=function(e){const{renderCoordsHelper:t,state:{camera:r}}=e,{center:i,eye:n}=r,o=Math.abs(t.getAltitude(i)),s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,De),(0,C.d)(Fe,r,t);const i=(0,C.l)(Fe);return 0===i?0:(0,a.XM)((0,C.e)(Fe,De)/i)}(t,i,n));return(0,Ce.b)(Qe,t.referenceEllipsoid.radius+o),(0,Ce.d)(Qe,s,r.distance,r.fovY)}(e),g=(0,a.qE)((u-h)/(m-h),0,1),_=Math.round((0,a.Cc)(p,f,g)),T=i.aboveGround,x=n.planes[V.FB.FAR],E=[],M=(0,pe.O_)(I.uY,Ye,(0,pe.vt)()),A=(0,pe.O_)(I.uY,Ze,(0,pe.vt)());(0,U.s)(tt,0,0,0,0);const w=e=>{};for(let e=0;e<4;e++){const t=e===de.NEAR_FAR_BOTTOM_RIGHT&&!T||e===de.NEAR_FAR_TOP_LEFT&&T?1-v:0,i=e===de.NEAR_FAR_BOTTOM_RIGHT&&T||e===de.NEAR_FAR_TOP_LEFT&&!T?v:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=e===de.NEAR_FAR_BOTTOM_RIGHT?1-(1-d)**2:e===de.NEAR_FAR_TOP_LEFT?d**2:d,h=0===n?0:(0,a.Cc)(t,i,u),m=(0,C.m)(Je,s.origin,l.origin,h),p=(0,Le.nu)(s.direction,l.direction,h,Xe);r.intersectManifoldClosestSilhouette((0,W.LV)(m,p),o,Ke),Te(Ke,c,Ke,x),E.push((0,I.o8)(Ke)),0!==E.length&&w((0,C.x)(E.at(-1),Ke));const f=((0,pe.Tj)(M,Ke)?1:0)|((0,pe.Tj)(A,Ke)?2:0);tt[f]=1}}E.length>2&&(0,C.x)(E[0],E.at(-1));const b=function(e,t,r){const i=2*(0,ye.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,Ke,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,Ke[1]]),n.push([null,Ke[1]]),o=!0):n.push([Ke[0],Ke[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,oe.$3)(n)||n.reverse(),n})}((0,U.b)(tt)>1?function(e,t){const r=[];for(const i of e)r.push(...qe(i,t));return r}(qe(E,M),A):[E],r,s);return new ne.A({rings:b,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,F.tO)(e.spatialReference).radius,h=t.longitude,m=function(e,t,r){const 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)}(d,r,u)/2;o=h-m,s=h+m;const p=(0,a.kU)(d),f=(1+Math.sin(p))/(1-Math.sin(p)),v=(f+1)*Math.tan(i/u/2),_=v*v;function T(e){const t=Math.PI/2;return(e=g.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*f+_))),c=l+i/u,l=T(l),c=T(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=Ge.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const x=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:N.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=x):n=new ie.A(o,l,s,c,x),e.spatialReference&&e.spatialReference.isWebMercator&&(0,Ie.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"})),(nt=rt||(rt={})).OPAQUE="opaque-color",nt.TRANSPARENT="transparent-color",nt.COMPOSITE="composite-color",nt.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_TERRAIN="opaque-terrain-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(it||(it={})),(0,I.vt)();var ot=r(49186),at=r(89192);let st=class extends L.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=rt.COMPOSITE,this.requireGeometryDepth=!1,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 ot.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(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===at.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),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}}};(0,o._)([(0,d.MZ)({constructOnly:!0})],st.prototype,"view",void 0),(0,o._)([(0,d.MZ)({constructOnly:!0})],st.prototype,"consumes",void 0),(0,o._)([(0,d.MZ)()],st.prototype,"produces",void 0),(0,o._)([(0,d.MZ)({readOnly:!0})],st.prototype,"techniques",null),st=(0,o._)([(0,h.$)("esri.views.3d.webgl.RenderNode")],st);var lt,ct,dt,ut=r(63907),ht=r(67171),mt=r(12541);(dt=lt||(lt={}))[dt.R8UNORM=0]="R8UNORM",dt[dt.R8UINT=1]="R8UINT",dt[dt.RG8UNORM=2]="RG8UNORM",dt[dt.RG8UINT=3]="RG8UINT",dt[dt.RGBA4UNORM=4]="RGBA4UNORM",dt[dt.RGBA8UNORM=5]="RGBA8UNORM",dt[dt.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",dt[dt.R16FLOAT=7]="R16FLOAT",dt[dt.RGBA16FLOAT=8]="RGBA16FLOAT",dt[dt.R32FLOAT=9]="R32FLOAT",dt[dt.COUNT=10]="COUNT",function(e){e[e.DEPTH16=10]="DEPTH16",e[e.DEPTH24_STENCIL8=11]="DEPTH24_STENCIL8"}(ct||(ct={})),lt.R8UNORM,lt.R8UINT,lt.R16FLOAT,lt.R32FLOAT,lt.RG8UNORM,lt.RG8UINT,lt.RGBA8UNORM,lt.RGBA4UNORM,lt.RGBA8UNORM_MIPMAP,lt.RGBA16FLOAT,ct.DEPTH16,ct.DEPTH24_STENCIL8;const pt=new ht.R;pt.pixelFormat=ut.Ab.RED,pt.internalFormat=ut.H0.R8,pt.wrapMode=ut.pF.CLAMP_TO_EDGE;const ft=new ht.R;ft.pixelFormat=ut.Ab.RED_INTEGER,ft.internalFormat=ut.H0.R8UI,ft.wrapMode=ut.pF.CLAMP_TO_EDGE,ft.samplingMode=ut.Cj.NEAREST;const vt=new ht.R;vt.pixelFormat=ut.Ab.RG,vt.internalFormat=ut.H0.RG8,vt.wrapMode=ut.pF.CLAMP_TO_EDGE;const gt=new ht.R;gt.pixelFormat=ut.Ab.RG_INTEGER,gt.internalFormat=ut.H0.RG8UI,gt.wrapMode=ut.pF.CLAMP_TO_EDGE,gt.samplingMode=ut.Cj.NEAREST;const _t=new ht.R;_t.internalFormat=ut.H0.RGBA4,_t.dataType=ut.ld.UNSIGNED_SHORT_4_4_4_4,_t.wrapMode=ut.pF.CLAMP_TO_EDGE;(new ht.R).wrapMode=ut.pF.CLAMP_TO_EDGE;const Tt=new ht.R;Tt.wrapMode=ut.pF.CLAMP_TO_EDGE,Tt.samplingMode=ut.Cj.LINEAR_MIPMAP_LINEAR,Tt.hasMipmap=!0,Tt.maxAnisotropy=8;const xt=new ht.R;xt.pixelFormat=ut.Ab.RED,xt.dataType=ut.ld.HALF_FLOAT,xt.internalFormat=ut.H0.R16F,xt.samplingMode=ut.Cj.NEAREST;const Et=new ht.R;Et.dataType=ut.ld.HALF_FLOAT,Et.internalFormat=ut.H0.RGBA16F,Et.wrapMode=ut.pF.CLAMP_TO_EDGE;const Mt=new ht.R;Mt.pixelFormat=ut.Ab.RED,Mt.dataType=ut.ld.FLOAT,Mt.internalFormat=ut.H0.R32F,Mt.samplingMode=ut.Cj.NEAREST,lt.R8UNORM,lt.R8UINT,lt.RG8UNORM,lt.RG8UINT,lt.RGBA4UNORM,lt.RGBA8UNORM,lt.RGBA8UNORM_MIPMAP,lt.R16FLOAT,lt.RGBA16FLOAT,lt.R32FLOAT,lt.COUNT;const At={[ut.SB.DEPTH_COMPONENT16]:ut.ld.UNSIGNED_SHORT,[ut.SB.DEPTH_COMPONENT24]:ut.ld.UNSIGNED_INT,[ut.SB.DEPTH_COMPONENT32F]:ut.ld.FLOAT,[ut.iE.DEPTH24_STENCIL8]:ut.ld.UNSIGNED_INT_24_8,[ut.iE.DEPTH32F_STENCIL8]:ut.ld.FLOAT_32_UNSIGNED_INT_24_8_REV};function wt(e){const t=new ht.R;return t.pixelFormat=(0,mt.CR)(e)?ut.j7.DEPTH_COMPONENT:ut.j7.DEPTH_STENCIL,t.dataType=At[e],t.samplingMode=ut.Cj.NEAREST,t.wrapMode=ut.pF.CLAMP_TO_EDGE,t.internalFormat=e,t.hasMipmap=!1,t.isImmutable=!0,t}ct.DEPTH24_STENCIL8,wt(ut.iE.DEPTH24_STENCIL8),ct.DEPTH16,wt(ut.SB.DEPTH_COMPONENT16);var bt=r(97220),Rt=r(98958),Ot=r(95774),St=r(90644);class yt extends Rt.w{constructor(e,t){super(e,t,new bt.$(Ot.S,()=>r.e(9384).then(r.bind(r,59384))))}initializePipeline(){return(0,St.Ey)({colorWrite:St.kn})}}var Ct=r(65786);class It extends Ct.Y{constructor(){super(...arguments),this.projScale=1}}class Nt extends It{constructor(){super(...arguments),this.intensity=1}}class Pt extends Ct.Y{}class Dt extends Pt{constructor(){super(...arguments),this.blurSize=(0,G.vt)()}}var Ft=r(15581);class Lt extends Rt.w{constructor(e,t){super(e,t,new bt.$(Ft.S,()=>r.e(191).then(r.bind(r,90191))))}initializePipeline(){return(0,St.Ey)({colorWrite:St.kn})}}var Ht=r(21231);const Bt=2;let Gt=class extends st{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=it.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new Nt,this._drawParameters=new Dt}initialize(){const 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 ht.R(32);t.wrapMode=ut.pF.CLAMP_TO_EDGE,t.pixelFormat=ut.Ab.RGB,t.wrapMode=ut.pF.REPEAT,t.hasMipmap=!0,this._passParameters.noiseTexture=new Ht.g(this.renderingContext,t,e),this.techniques.precompile(Lt),this.techniques.precompile(yt),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(ut.nI);if(!r||!i)return;const n=this.techniques.get(Lt),o=this.techniques.get(yt);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(at.C7.UPDATE);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,h=u.relativeElevation,p=(0,a.qE)((5e5-h)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=f*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*Ut/(0,Ft.g)(u)**6*v;const g=u.fullViewport[2],_=u.fullViewport[3],T=this.fboCache.acquire(g,_,"ssao input",lt.RG8UNORM);s.bindFramebuffer(T.fbo),s.setViewport(0,0,g,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const x=Math.round(g/Bt),E=Math.round(_/Bt),M=this.fboCache.acquire(x,E,"ssao blur",lt.R8UNORM);s.bindFramebuffer(M.fbo),this._drawParameters.colorTexture=T.getTexture(),(0,m.hZ)(this._drawParameters.blurSize,0,Bt/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,x,E),s.screen.draw(),T.release();const A=this.fboCache.acquire(x,E,it.SSAO,lt.R8UNORM);return s.bindFramebuffer(A.fbo),s.setViewport(0,0,g,_),s.setClearColor(1,1,1,0),s.clear(ut.NV.COLOR),this._drawParameters.colorTexture=M.getTexture(),(0,m.hZ)(this._drawParameters.blurSize,Bt/g,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,x,E),s.screen.draw(),s.setViewport4fv(u.fullViewport),M.release(),f<1&&this.requestRender(at.C7.UPDATE),A}};(0,o._)([(0,d.MZ)()],Gt.prototype,"consumes",void 0),(0,o._)([(0,d.MZ)()],Gt.prototype,"produces",void 0),(0,o._)([(0,d.MZ)({constructOnly:!0})],Gt.prototype,"isEnabled",void 0),Gt=(0,o._)([(0,h.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Gt);const Ut=.5;function zt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/Bt),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
567
|
+
}`);default:(0,o.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.COUNT=3]="COUNT"},53802:(e,t,r)=>{r.d(t,{n:()=>zt});var i=r(31821),n=r(12791),o=r(90237),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(10107),u=(r(44208),r(53966)),h=(r(87811),r(40608)),m=r(37585),p=r(69540);let f=class extends p.A{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._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o._)([(0,h.$)("esri.CameraLayout")],f);const v=f;var g=r(69052),_=r(25482),T=r(79901),x=r(36005),E=r(43937),M=r(56507),A=r(86738);let w=class extends(p.A.ClonableMixin(_.A)){constructor(...e){super(...e),this.position=new A.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new v}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const 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){const n=e.clone();n.x=(0,M.GB)(e.x||0),n.y=(0,M.GB)(e.y||0),n.z=e.hasZ?(0,M.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new A.A;return r.read(e,t),r.x=(0,M.GB)(r.x||0),r.y=(0,M.GB)(r.y||0),r.z=r.hasZ?(0,M.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._)([(0,d.MZ)({type:A.A,json:{write:{isRequired:!0}}})],w.prototype,"position",void 0),(0,o._)([(0,E.K)("position")],w.prototype,"writePosition",null),(0,o._)([(0,x.w)("position")],w.prototype,"readPosition",null),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,T.w)(e=>g.ie.normalize((0,M.GB)(e)))],w.prototype,"heading",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,T.w)(e=>(0,a.qE)((0,M.GB)(e),-180,180))],w.prototype,"tilt",void 0),(0,o._)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,T.w)(e=>(0,a.qE)((0,M.GB)(e,55),1,170))],w.prototype,"fov",void 0),(0,o._)([(0,d.MZ)({type:v,nonNullable:!0,json:{read:!1,write:!1}})],w.prototype,"layout",void 0),w=(0,o._)([(0,h.$)("esri.Camera")],w);var b,R,O,S,y=r(9093),C=r(38954),I=r(51850),N=r(16930),P=(r(48353),r(9762),r(65806)),D=r(27993),F=r(73941),L=(r(19419),r(69622)),H=r(90629),B=r(58083),G=r(48163),U=r(87317),z=r(91829),V=r(82919),W=r(71351),j=r(44280),k=r(24151);r(15142),(S=b||(b={}))[S.Default=0]="Default",S[S.Screenshot=1]="Screenshot",S[S.ObjectAndLayerID=2]="ObjectAndLayerID",function(e){e[e.TOP=0]="TOP",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM",e[e.LEFT=3]="LEFT"}(R||(R={}));let q=O=class extends L.A{constructor(e){super(e),this._ray=(0,W.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,G.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,y.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,y.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,y.vt)(),this._frustumDirty=!0,this._frustum=(0,V.vt)(),this._fullViewport=(0,z.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,I.vt)(),this._up=(0,I.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)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,C.d)(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,B.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,C.i)((0,I.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,C.i)((0,I.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,C.i)((0,I.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;const e=(0,U.d)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,U.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,U.d)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,U.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[R.LEFT],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[R.BOTTOM],this._viewport[1]!==e&&(this._viewport[1]=e,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._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._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[R.RIGHT]+this._padding[R.LEFT]}set fullWidth(e){this.width=e-(this._padding[R.RIGHT]+this._padding[R.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[R.TOP]+this._padding[R.BOTTOM]}set fullHeight(e){this.height=e-(this._padding[R.TOP]+this._padding[R.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[R.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[R.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,U.a)(this._padding,e)||(this._viewport[0]+=e[R.LEFT]-this._padding[R.LEFT],this._viewport[1]+=e[R.BOTTOM]-this._padding[R.BOTTOM],this._viewport[2]-=e[R.RIGHT]+e[R.LEFT]-(this._padding[R.RIGHT]+this._padding[R.LEFT]),this._viewport[3]-=e[R.TOP]+e[R.BOTTOM]-(this._padding[R.TOP]+this._padding[R.BOTTOM]),(0,U.c)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,B.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,B.B8)((0,y.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,y.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,C.j)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,B.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,B.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const 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,d=(0,B.$h)((0,y.vt)(),a*(1+2*this._padding[R.LEFT]/e),s*(1+2*this._padding[R.RIGHT]/e),l*(1+2*this._padding[R.BOTTOM]/t),c*(1+2*this._padding[R.TOP]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,B.aI)(u,d)?u:d}copyFrom(e){(0,C.c)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,U.c)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,U.c)(this._padding,e.padding),this.notifyChange("_padding"),(0,m.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;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,B.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,V.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,B.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,U.c)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new O).copyFrom(this)}equals(e){return(0,C.q)(this.eye,e.eye)&&(0,C.q)(this.center,e.center)&&(0,C.q)(this.up,e.up)&&(0,U.a)(this._viewport,e.viewport)&&(0,U.a)(this._padding,e.padding)&&(0,m.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}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,U.f)(e.screenPadding,this.screenPadding)>=t||(0,U.f)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,C.a)(Z,e.eye,e.center),(0,C.a)(X,this.eye,this.center);const r=(0,C.e)(Z,X),i=(0,C.y)(Z),n=(0,C.y)(X),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,C.x)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,j.gr)(this.viewForward,(0,C.d)(Z,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,H.gs)()){return e[0]=(this.padding[R.LEFT]+this.width/2)/this.pixelRatio,e[1]=(this.padding[R.TOP]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[R.LEFT]+this.width*t,e[1]=this.padding[R.BOTTOM]+this.height*r,e[2]=.5,e}setGLViewport(e){const 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!==$&&(0,C.c)($,e),$[3]=1,(0,U.t)($,$,this.projectionMatrix);const r=Math.abs($[3]);(0,C.g)($,$,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*$[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*$[1]),t[2]=.5*($[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;$[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],$[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],$[2]=(2*e[2]-1)*e[3],$[3]=e[3],null!=this.inverseProjectionMatrix&&((0,U.t)($,$,this.inverseProjectionMatrix),t[0]=$[0],t[1]=$[1],t[2]=$[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,J),this.renderToScreen(J,t),t}projectToRenderScreen(e,t){if($[0]=e[0],$[1]=e[1],$[2]=e[2],$[3]=1,(0,U.t)($,$,this.viewProjectionMatrix),0===$[3])return null;const r=$;(0,C.g)(r,r,1/Math.abs($[3]));const 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,J),t)}unprojectFromRenderScreen(e,t){if((0,B.lw)(Y,this.projectionMatrix,this.viewMatrix),!(0,B.B8)(Y,Y))return null;const r=this.fullViewport;return $[0]=2*(e[0]-r[0])/r[2]-1,$[1]=2*(e[1]-r[1])/r[3]-1,$[2]=2*e[2]-1,$[3]=1,(0,U.t)($,$,Y),0===$[3]?null:(t[0]=$[0]/$[3],t[1]=$[1]/$[3],t[2]=$[2]/$[3],t)}constrainWindowSize(e,t,r,i){const 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),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){e===k.RT.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}_computeUpGlobal(){(0,C.d)(Z,this.center,this.eye);const e=(0,C.l)(this.center);e<1?((0,C.i)(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,C.e)(Z,this.center))>.9999*(0,C.l)(Z)*e||((0,C.h)(this._up,Z,this.center),(0,C.h)(this._up,this._up,Z),(0,C.n)(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){(0,C.E)(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&((0,C.g)(Z,Z,Z[2]),(0,C.i)(this._up,-Z[0],-Z[1],1-Z[2]),(0,C.n)(this._up,this._up),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,C.q)(e,t)||((0,C.c)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):u.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,V.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,B.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o._)([(0,d.MZ)()],q.prototype,"_viewport",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_padding",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_fov",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_nearFar",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_viewDirty",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_viewMatrix",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_pixelRatio",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"pixelRatio",null),(0,o._)([(0,d.MZ)()],q.prototype,"row",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"column",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"_rows",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"rows",null),(0,o._)([(0,d.MZ)()],q.prototype,"_columns",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"columns",null),(0,o._)([(0,d.MZ)()],q.prototype,"eye",null),(0,o._)([(0,d.MZ)()],q.prototype,"center",null),(0,o._)([(0,d.MZ)()],q.prototype,"_center",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"up",null),(0,o._)([(0,d.MZ)()],q.prototype,"_up",void 0),(0,o._)([(0,d.MZ)()],q.prototype,"viewMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewForward",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewUp",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"viewRight",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"nearFar",null),(0,o._)([(0,d.MZ)()],q.prototype,"near",null),(0,o._)([(0,d.MZ)()],q.prototype,"far",null),(0,o._)([(0,d.MZ)()],q.prototype,"viewport",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"screenViewport",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"screenPadding",null),(0,o._)([(0,d.MZ)()],q.prototype,"x",null),(0,o._)([(0,d.MZ)()],q.prototype,"y",null),(0,o._)([(0,d.MZ)()],q.prototype,"width",null),(0,o._)([(0,d.MZ)()],q.prototype,"height",null),(0,o._)([(0,d.MZ)()],q.prototype,"fullWidth",null),(0,o._)([(0,d.MZ)()],q.prototype,"fullHeight",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"_aspect",null),(0,o._)([(0,d.MZ)()],q.prototype,"padding",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"projectionMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"inverseProjectionMatrix",null),(0,o._)([(0,d.MZ)()],q.prototype,"fov",null),(0,o._)([(0,d.MZ)()],q.prototype,"fovX",null),(0,o._)([(0,d.MZ)()],q.prototype,"fovY",null),(0,o._)([(0,d.MZ)()],q.prototype,"viewInverseTransposeMatrix",null),(0,o._)([(0,d.MZ)({readOnly:!0})],q.prototype,"_projectionMatrixInternal",null),(0,o._)([(0,d.MZ)()],q.prototype,"relativeElevation",void 0),q=O=(0,o._)([(0,h.$)("esri.views.3d.webgl.RenderCamera")],q);const $=(0,z.vt)(),Y=(0,y.vt)(),Z=(0,I.vt)(),X=(0,I.vt)(),J=(0,H.r_)();class K{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far))}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.zero=new K(0,0)}static{this.infinite=new K}}r(49718),r(62258),r(6867),r(29878),r(16396),(0,I.vt)(),(0,I.vt)(),(0,I.vt)(),new WeakMap;var Q,ee,te,re,ie=r(5443),ne=r(39829),oe=r(95108);function ae(e,t,r,i){const n=function(e,t){const r=t===te.LEFT||t===te.RIGHT?0:1,i=e[t],n=t===te.LEFT||t===te.BOTTOM?Q.MIN:Q.MAX,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return n===Q.MIN?ee.OUTSIDE:ee.INSIDE;if(t[r]>i&&a[r]>i)return n===Q.MIN?ee.INSIDE:ee.OUTSIDE;const 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?ee.OUTSIDE_IN:ee.INSIDE_OUT}}(r,i);if(e.length=0,t.length){n(le,t[0],t[0])===ee.INSIDE&&se(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(le,t[r],i)){case ee.INSIDE:se(e,i);break;case ee.INSIDE_OUT:se(e,(0,G.o8)(le));break;case ee.OUTSIDE_IN:se(e,(0,G.o8)(le)),se(e,i);case ee.OUTSIDE:}}}}function se(e,t){0!==e.length&&(0,m.aI)(e.at(-1),t)||e.push(t)}(re=Q||(Q={}))[re.MIN=1]="MIN",re[re.MAX=-1]="MAX",function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INSIDE=1]="INSIDE",e[e.OUTSIDE_IN=2]="OUTSIDE_IN",e[e.INSIDE_OUT=3]="INSIDE_OUT"}(ee||(ee={})),function(e){e[e.LEFT=0]="LEFT",e[e.BOTTOM=1]="BOTTOM",e[e.RIGHT=2]="RIGHT",e[e.TOP=3]="TOP"}(te||(te={}));const le=(0,G.vt)();class ce{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,V.vt)(),this._points=(0,V.Qy)(),this.lines=new Array(12),this._origin=(0,I.vt)(),this._direction=(0,I.vt)(),this._altitude=null;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,I.vt)(),endpoint:null}}update(e){(0,V.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,C.c)(this._origin,e.eye),(0,C.c)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines()}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,C.c)(this._points[t],e[t]);(0,V.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,V.m7)(this.frustum,e)}intersectsRay(e){return(0,V.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,V.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,V.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;he(this.lines[t],e[t],e[r]),he(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),he(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}static{this.planePointIndices=V.c8}static{this.nearFarLineIndices=[[V.J7.NEAR_BOTTOM_LEFT,V.J7.FAR_BOTTOM_LEFT],[V.J7.NEAR_BOTTOM_RIGHT,V.J7.FAR_BOTTOM_RIGHT],[V.J7.NEAR_TOP_RIGHT,V.J7.FAR_TOP_RIGHT],[V.J7.NEAR_TOP_LEFT,V.J7.FAR_TOP_LEFT]]}}var de,ue;function he(e,t,r){e.origin=t,e.endpoint=r,(0,C.E)(e.direction,t,r)}(ue=de||(de={}))[ue.NEAR_FAR_BOTTOM_LEFT=0]="NEAR_FAR_BOTTOM_LEFT",ue[ue.NEAR_FAR_BOTTOM_RIGHT=1]="NEAR_FAR_BOTTOM_RIGHT",ue[ue.NEAR_FAR_TOP_RIGHT=2]="NEAR_FAR_TOP_RIGHT",ue[ue.NEAR_FAR_TOP_LEFT=3]="NEAR_FAR_TOP_LEFT",ue[ue.NEAR_BOTTOM=4]="NEAR_BOTTOM",ue[ue.NEAR_RIGHT=5]="NEAR_RIGHT",ue[ue.NEAR_TOP=6]="NEAR_TOP",ue[ue.NEAR_LEFT=7]="NEAR_LEFT",ue[ue.FAR_BOTTOM=8]="FAR_BOTTOM",ue[ue.FAR_RIGHT=9]="FAR_RIGHT",ue[ue.FAR_TOP=10]="FAR_TOP",ue[ue.FAR_LEFT=11]="FAR_LEFT";var me=r(11964),pe=r(27921);const fe=(0,I.vt)(),ve=(0,I.vt)();function ge(){return{direction:(0,I.vt)(),up:(0,I.vt)()}}function _e(e,t,r,i,n){let o=(0,C.n)(fe,e),s=(0,C.e)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,C.e)(t,i)),s<.99?((0,C.c)(o,t),l&&(0,C.g)(o,o,-1)):o=null);let c=0;if(o){(0,C.g)(ve,i,(0,C.e)(i,o)),(0,C.d)(o,o,ve);const e=(0,C.e)(o,n)/((0,C.l)(o)*(0,C.l)(n));(0,C.h)(ve,o,n),c=((0,C.e)(ve,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,C.e)(i,e)/(0,C.l)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function Te(e,t,r,i){(0,C.d)(xe,r,t),(0,pe.T7)(i,(0,me.LV)(t,xe),e)||e===r||(0,C.c)(e,r)}const xe=(0,I.vt)(),Ee=(0,I.fA)(0,1,0),Me=(0,I.fA)(0,0,1),Ae=(0,y.vt)(),we=(0,I.vt)(),be=(0,I.vt)();function Re(e,t,r,i=ge()){const{direction:n,up:o}=i;return(0,B.N9)(Ae,-(0,a.kU)(t)),(0,B.eL)(Ae,Ae,(0,a.kU)(r)),(0,C.t)(n,Me,Ae),(0,C.g)(n,n,-1),(0,C.t)(o,Ee,Ae),i}function Oe(e,t,r,i,n){const o=t.lines[de.FAR_LEFT].direction,a=(n-r.getAltitude(i))/o[2];(0,C.b)(e,i,o,a)}const Se=(0,I.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return _e(t,r,i,Me,Ee)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=Re(0,r,i),o=(0,I.vt)();return(0,C.g)(o,n.direction,-t),(0,C.f)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:Re,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[V.FB.FAR];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,W.LV)(t.origin,t.direction),n,Se)||Oe(Se,r,i,t.endpoint,n),Te(Se,a,Se,l),s.push((0,G.fA)(Se[0],Se[1]))}return function(e,t,r){const i=e.map(e=>((0,C.i)(Se,e[0],e[1],0),t.fromRenderCoords(Se,Se,r),[Se[0],Se[1]]));return i.length<=2?new ne.A({spatialReference:r}):(i.push(i[0].slice()),(0,oe.$3)(i)||i.reverse(),new ne.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return ae(r,e,t,te.LEFT),ae(i,r,t,te.BOTTOM),ae(r,i,t,te.RIGHT),ae(i,r,t,te.TOP),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,P.g)(t,we,o),(0,P.g)(t,be,o),we[0]-=r/2,be[0]+=r/2,we[1]-=i/2,be[1]+=i/2,(0,D.F)(we,o,we,a),(0,D.F)(be,o,be,a),n?(n.xmin=we[0],n.ymin=we[1],n.xmax=be[0],n.ymax=be[1],n.spatialReference=a):n=new ie.A(we[0],we[1],be[0],be[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ye=r(34304),Ce=r(97937),Ie=r(28735);r(83047);const Ne=(0,I.fA)(parseFloat(Number(5802e-9).toFixed(6)),parseFloat(Number(13558e-9).toFixed(6)),parseFloat(Number(331e-7).toFixed(6))),Pe=(0,I.fA)(3*parseFloat(Number(65e-8).toFixed(6)),3*parseFloat(Number(1881e-9).toFixed(6)),3*parseFloat(Number(85e-9).toFixed(6)));(0,I.fA)(parseFloat(Number(Ne[0]+Pe[0]).toFixed(6)),parseFloat(Number(Ne[1]+Pe[1]).toFixed(6)),parseFloat(Number(Ne[2]+Pe[2]).toFixed(6)));(0,I.vt)(),(0,I.vt)(),(0,Ce.c)(),(0,W.vt)();const De=(0,I.vt)(),Fe=(0,I.vt)();var Le=r(32728);const He=(0,I.fA)(0,0,1),Be=(0,C.n)((0,I.vt)(),(0,I.fA)(1,1,1)),Ge=new g.hr(-180,180),Ue=(0,y.vt)(),ze=(0,I.vt)(),Ve=(0,I.vt)();function We(e,t,r,i=ge()){(0,C.h)(ze,e,He),0===(0,C.e)(ze,ze)&&(0,C.h)(ze,e,Be),(0,B.$0)(Ue,-(0,a.kU)(t),e),(0,B.e$)(Ue,Ue,-(0,a.kU)(r),ze);const{up:n,direction:o}=i;return(0,C.h)(n,ze,e),(0,C.n)(n,n),(0,C.t)(n,n,Ue),(0,C.n)(o,e),(0,C.u)(o,o),(0,C.t)(o,o,Ue),i}function je(e){const t=e[1];e[1]=-e[2],e[2]=t}function ke(e,t){const r=We(t,e.heading,e.tilt);return e.up=r.up,e}function qe(e,t){const r=[],i=[],n=(0,ye.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,me.Cr)(a,s,et),c=(0,pe.vE)(t,l.origin,l.vector,pe.v1.NONE,Ke);switch(c){case pe.Nj.INSIDE:r.push(a);break;case pe.Nj.OUTSIDE:i.push(a);break;case pe.Nj.INTERSECTS_INSIDE_OUT:case pe.Nj.INTERSECTS_OUTSIDE_IN:{const[e,o,s]=c===pe.Nj.INTERSECTS_INSIDE_OUT?[1,r,i]:[-1,i,r],l=(0,pe.Qj)(t),d=(0,C.b)((0,I.vt)(),Ke,l,e*n),u=(0,C.b)((0,I.vt)(),Ke,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const $e={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Ye=(0,I.fA)(1,0,0),Ze=(0,I.fA)(0,1,0),Xe=(0,I.vt)(),Je=(0,I.vt)(),Ke=(0,I.vt)(),Qe=(0,Ce.c)(),et=(0,me.vt)(),tt=(0,z.vt)();var rt,it,nt;Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=ze,o=Ve;return(0,C.n)(n,e),(0,C.h)(Ve,n,He),0===(0,C.e)(Ve,Ve)&&(0,C.h)(Ve,n,Be),(0,C.h)(o,Ve,n),_e(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,I.vt)(),up:null,tilt:i,heading:r},o=ze;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),m=Math.cos(c),p=(0,C.l)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const v=m*s,g=s*s*(h*h),_=u*u*g,T=f-v,x=T*T,E=_*(_+x-o[1]*o[1]);if(E<0)return(0,C.g)(n.eye,o,f/p),n.tilt=0,ke(n,e);const M=Math.sqrt(E),A=o[1]*T,w=_+x;let b;if(b=u>0?-M+A:M+A,Math.abs(w)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,C.g)(n.eye,o,f/p),n.tilt=0,je(n.eye),ke(n,e);n.eye[1]=b/w;const R=d*d*g,O=h*s,S=u*O*n.eye[1],y=n.eye[1]*n.eye[1],N=1-y,P=Math.sqrt(N),D=_*y+R-2*S*P*T+N*x;return Math.abs(D)<1e-8?((0,C.g)(n.eye,o,f/p),n.tilt=0,je(n.eye),ke(n,e)):(n.eye[0]=(N*(f*o[0]-v*o[0])-O*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(N*(f*o[2]-v*o[2])-O*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,C.g)(n.eye,n.eye,f),je(n.eye),ke(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,C.l)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:We,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,C.l)(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){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ce(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,C.j)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=$e,v=function(e){const{renderCoordsHelper:t,state:{camera:r}}=e,{center:i,eye:n}=r,o=Math.abs(t.getAltitude(i)),s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,De),(0,C.d)(Fe,r,t);const i=(0,C.l)(Fe);return 0===i?0:(0,a.XM)((0,C.e)(Fe,De)/i)}(t,i,n));return(0,Ce.b)(Qe,t.referenceEllipsoid.radius+o),(0,Ce.d)(Qe,s,r.distance,r.fovY)}(e),g=(0,a.qE)((u-h)/(m-h),0,1),_=Math.round((0,a.Cc)(p,f,g)),T=i.aboveGround,x=n.planes[V.FB.FAR],E=[],M=(0,pe.O_)(I.uY,Ye,(0,pe.vt)()),A=(0,pe.O_)(I.uY,Ze,(0,pe.vt)());(0,U.s)(tt,0,0,0,0);const w=e=>{};for(let e=0;e<4;e++){const t=e===de.NEAR_FAR_BOTTOM_RIGHT&&!T||e===de.NEAR_FAR_TOP_LEFT&&T?1-v:0,i=e===de.NEAR_FAR_BOTTOM_RIGHT&&T||e===de.NEAR_FAR_TOP_LEFT&&!T?v:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=e===de.NEAR_FAR_BOTTOM_RIGHT?1-(1-d)**2:e===de.NEAR_FAR_TOP_LEFT?d**2:d,h=0===n?0:(0,a.Cc)(t,i,u),m=(0,C.m)(Je,s.origin,l.origin,h),p=(0,Le.nu)(s.direction,l.direction,h,Xe);r.intersectManifoldClosestSilhouette((0,W.LV)(m,p),o,Ke),Te(Ke,c,Ke,x),E.push((0,I.o8)(Ke)),0!==E.length&&w((0,C.x)(E.at(-1),Ke));const f=((0,pe.Tj)(M,Ke)?1:0)|((0,pe.Tj)(A,Ke)?2:0);tt[f]=1}}E.length>2&&(0,C.x)(E[0],E.at(-1));const b=function(e,t,r){const i=2*(0,ye.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,Ke,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,Ke[1]]),n.push([null,Ke[1]]),o=!0):n.push([Ke[0],Ke[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,oe.$3)(n)||n.reverse(),n})}((0,U.b)(tt)>1?function(e,t){const r=[];for(const i of e)r.push(...qe(i,t));return r}(qe(E,M),A):[E],r,s);return new ne.A({rings:b,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,F.tO)(e.spatialReference).radius,h=t.longitude,m=function(e,t,r){const 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)}(d,r,u)/2;o=h-m,s=h+m;const p=(0,a.kU)(d),f=(1+Math.sin(p))/(1-Math.sin(p)),v=(f+1)*Math.tan(i/u/2),_=v*v;function T(e){const t=Math.PI/2;return(e=g.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*f+_))),c=l+i/u,l=T(l),c=T(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=Ge.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const x=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:N.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=x):n=new ie.A(o,l,s,c,x),e.spatialReference&&e.spatialReference.isWebMercator&&(0,Ie.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"})),(nt=rt||(rt={})).OPAQUE="opaque-color",nt.TRANSPARENT="transparent-color",nt.COMPOSITE="composite-color",nt.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_TERRAIN="opaque-terrain-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(it||(it={})),(0,I.vt)();var ot=r(49186),at=r(89192);let st=class extends L.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=rt.COMPOSITE,this.requireGeometryDepth=!1,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 ot.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(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===at.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),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}}};(0,o._)([(0,d.MZ)({constructOnly:!0})],st.prototype,"view",void 0),(0,o._)([(0,d.MZ)({constructOnly:!0})],st.prototype,"consumes",void 0),(0,o._)([(0,d.MZ)()],st.prototype,"produces",void 0),(0,o._)([(0,d.MZ)({readOnly:!0})],st.prototype,"techniques",null),st=(0,o._)([(0,h.$)("esri.views.3d.webgl.RenderNode")],st);var lt,ct,dt,ut=r(63907),ht=r(67171),mt=r(12541);(dt=lt||(lt={}))[dt.R8UNORM=0]="R8UNORM",dt[dt.R8UINT=1]="R8UINT",dt[dt.RG8UNORM=2]="RG8UNORM",dt[dt.RG8UINT=3]="RG8UINT",dt[dt.RGBA4UNORM=4]="RGBA4UNORM",dt[dt.RGBA8UNORM=5]="RGBA8UNORM",dt[dt.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",dt[dt.R16FLOAT=7]="R16FLOAT",dt[dt.RGBA16FLOAT=8]="RGBA16FLOAT",dt[dt.R32FLOAT=9]="R32FLOAT",dt[dt.COUNT=10]="COUNT",function(e){e[e.DEPTH16=10]="DEPTH16",e[e.DEPTH24_STENCIL8=11]="DEPTH24_STENCIL8"}(ct||(ct={})),lt.R8UNORM,lt.R8UINT,lt.R16FLOAT,lt.R32FLOAT,lt.RG8UNORM,lt.RG8UINT,lt.RGBA8UNORM,lt.RGBA4UNORM,lt.RGBA8UNORM_MIPMAP,lt.RGBA16FLOAT,ct.DEPTH16,ct.DEPTH24_STENCIL8;const pt=new ht.R;pt.pixelFormat=ut.Ab.RED,pt.internalFormat=ut.H0.R8,pt.wrapMode=ut.pF.CLAMP_TO_EDGE;const ft=new ht.R;ft.pixelFormat=ut.Ab.RED_INTEGER,ft.internalFormat=ut.H0.R8UI,ft.wrapMode=ut.pF.CLAMP_TO_EDGE,ft.samplingMode=ut.Cj.NEAREST;const vt=new ht.R;vt.pixelFormat=ut.Ab.RG,vt.internalFormat=ut.H0.RG8,vt.wrapMode=ut.pF.CLAMP_TO_EDGE;const gt=new ht.R;gt.pixelFormat=ut.Ab.RG_INTEGER,gt.internalFormat=ut.H0.RG8UI,gt.wrapMode=ut.pF.CLAMP_TO_EDGE,gt.samplingMode=ut.Cj.NEAREST;const _t=new ht.R;_t.internalFormat=ut.H0.RGBA4,_t.dataType=ut.ld.UNSIGNED_SHORT_4_4_4_4,_t.wrapMode=ut.pF.CLAMP_TO_EDGE;(new ht.R).wrapMode=ut.pF.CLAMP_TO_EDGE;const Tt=new ht.R;Tt.wrapMode=ut.pF.CLAMP_TO_EDGE,Tt.samplingMode=ut.Cj.LINEAR_MIPMAP_LINEAR,Tt.hasMipmap=!0,Tt.maxAnisotropy=8;const xt=new ht.R;xt.pixelFormat=ut.Ab.RED,xt.dataType=ut.ld.HALF_FLOAT,xt.internalFormat=ut.H0.R16F,xt.samplingMode=ut.Cj.NEAREST;const Et=new ht.R;Et.dataType=ut.ld.HALF_FLOAT,Et.internalFormat=ut.H0.RGBA16F,Et.wrapMode=ut.pF.CLAMP_TO_EDGE;const Mt=new ht.R;Mt.pixelFormat=ut.Ab.RED,Mt.dataType=ut.ld.FLOAT,Mt.internalFormat=ut.H0.R32F,Mt.samplingMode=ut.Cj.NEAREST,lt.R8UNORM,lt.R8UINT,lt.RG8UNORM,lt.RG8UINT,lt.RGBA4UNORM,lt.RGBA8UNORM,lt.RGBA8UNORM_MIPMAP,lt.R16FLOAT,lt.RGBA16FLOAT,lt.R32FLOAT,lt.COUNT;const At={[ut.SB.DEPTH_COMPONENT16]:ut.ld.UNSIGNED_SHORT,[ut.SB.DEPTH_COMPONENT24]:ut.ld.UNSIGNED_INT,[ut.SB.DEPTH_COMPONENT32F]:ut.ld.FLOAT,[ut.iE.DEPTH24_STENCIL8]:ut.ld.UNSIGNED_INT_24_8,[ut.iE.DEPTH32F_STENCIL8]:ut.ld.FLOAT_32_UNSIGNED_INT_24_8_REV};function wt(e){const t=new ht.R;return t.pixelFormat=(0,mt.CR)(e)?ut.j7.DEPTH_COMPONENT:ut.j7.DEPTH_STENCIL,t.dataType=At[e],t.samplingMode=ut.Cj.NEAREST,t.wrapMode=ut.pF.CLAMP_TO_EDGE,t.internalFormat=e,t.hasMipmap=!1,t.isImmutable=!0,t}ct.DEPTH24_STENCIL8,wt(ut.iE.DEPTH24_STENCIL8),ct.DEPTH16,wt(ut.SB.DEPTH_COMPONENT16);var bt=r(97220),Rt=r(98958),Ot=r(95774),St=r(90644);class yt extends Rt.w{constructor(e,t){super(e,t,new bt.$(Ot.S,()=>r.e(9384).then(r.bind(r,59384))))}initializePipeline(){return(0,St.Ey)({colorWrite:St.kn})}}var Ct=r(65786);class It extends Ct.Y{constructor(){super(...arguments),this.projScale=1}}class Nt extends It{constructor(){super(...arguments),this.intensity=1}}class Pt extends Ct.Y{}class Dt extends Pt{constructor(){super(...arguments),this.blurSize=(0,G.vt)()}}var Ft=r(15581);class Lt extends Rt.w{constructor(e,t){super(e,t,new bt.$(Ft.S,()=>r.e(191).then(r.bind(r,90191))))}initializePipeline(){return(0,St.Ey)({colorWrite:St.kn})}}var Ht=r(21231);const Bt=2;let Gt=class extends st{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=it.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new Nt,this._drawParameters=new Dt}initialize(){const 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 ht.R(32);t.wrapMode=ut.pF.CLAMP_TO_EDGE,t.pixelFormat=ut.Ab.RGB,t.wrapMode=ut.pF.REPEAT,t.hasMipmap=!0,this._passParameters.noiseTexture=new Ht.g(this.renderingContext,t,e),this.techniques.precompile(Lt),this.techniques.precompile(yt),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(ut.nI);if(!r||!i)return;const n=this.techniques.get(Lt),o=this.techniques.get(yt);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(at.C7.UPDATE);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,h=u.relativeElevation,p=(0,a.qE)((5e5-h)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=f*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*Ut/(0,Ft.g)(u)**6*v;const g=u.fullViewport[2],_=u.fullViewport[3],T=this.fboCache.acquire(g,_,"ssao input",lt.RG8UNORM);s.bindFramebuffer(T.fbo),s.setViewport(0,0,g,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const x=Math.round(g/Bt),E=Math.round(_/Bt),M=this.fboCache.acquire(x,E,"ssao blur",lt.R8UNORM);s.bindFramebuffer(M.fbo),this._drawParameters.colorTexture=T.getTexture(),(0,m.hZ)(this._drawParameters.blurSize,0,Bt/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,x,E),s.screen.draw(),T.release();const A=this.fboCache.acquire(x,E,it.SSAO,lt.R8UNORM);return s.bindFramebuffer(A.fbo),s.setViewport(0,0,g,_),s.setClearColor(1,1,1,0),s.clear(ut.NV.COLOR),this._drawParameters.colorTexture=M.getTexture(),(0,m.hZ)(this._drawParameters.blurSize,Bt/g,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,x,E),s.screen.draw(),s.setViewport4fv(u.fullViewport),M.release(),f<1&&this.requestRender(at.C7.UPDATE),A}};(0,o._)([(0,d.MZ)()],Gt.prototype,"consumes",void 0),(0,o._)([(0,d.MZ)()],Gt.prototype,"produces",void 0),(0,o._)([(0,d.MZ)({constructOnly:!0})],Gt.prototype,"isEnabled",void 0),Gt=(0,o._)([(0,h.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Gt);const Ut=.5;function zt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/Bt),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
568
568
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
569
569
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
570
570
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9186],{25943:(e,t,i)=>{i.d(t,{d:()=>x});var l,s=i(90237),o=i(78888),r=i(69622),n=i(71903),a=i(49186),c=i(36563),h=(i(44208),i(66344)),p=i(15142),u=i(74887),f=i(36708),d=i(11932),v=i(84952),m=i(10107),y=(i(53966),i(87811),i(40608)),w=i(72802),g=i(4718),_=i(69397),A=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,g.o8)(t));const l=this.location.width,s=this.location.height;let o=!0,r=!0;const n=function(e,t=!1){return e<=A.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,n[c]|=1<<t):o=!1,31===t&&++c}r?(this._availability="unavailable",this.byteSize=40):o?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,_.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,o=this._availability;return s<0||s>o.length?"unknown":o[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||o.A,{row:l,col:s,width:r,height:n}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:l,left:s,width:r,height:n},valid:!0,data:new Array(r*n).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==n))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:n}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function M(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let x=class extends r.A{static{l=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=o.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2*n.u.MEGABYTES),this.addHandles((0,f.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),f.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(M(e,t,i)):this._fetchTilemap(e,t,i,l).catch(e=>e).then(l=>{if(l instanceof b){const s=l.getAvailability(t,i);if("unavailable"===s)throw M(e,t,i);return s}if((0,u.zf)(l))throw l;return"unknown"})}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const o=this.layer.tileInfo;o.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,u.zf)(e))throw e;if(o.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,o,r){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const a=new AbortController;r.then(()=>a.abort(),()=>a.abort());let h=!1;const p=(0,c.hA)(()=>{h||(h=!0,a.abort())});if(this.addHandles(p,n),await(0,d.md)(10,a.signal).catch(()=>{}),h||(h=!0,this.removeHandles(n)),(0,u.G4)(a))return;const f=new w.U(e,t,i,s),v={...o,signal:a.signal},m=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&m.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,v);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new p.A({initialSize:l._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,o=this._tilemapFromCache(e,t,i,s);if(o)return Promise.resolve(o);const r=l?.signal;return l={...l,signal:null},new Promise((e,t)=>{(0,u.u7)(r,()=>t((0,u.NK)()));const i=O(s);let o=this._pendingTilemapRequests[i];if(!o){o=b.fromDefinition(s,l).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=o,o.then(e,e)}o.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=O(l);return this._tilemapCache.get(s)}get test(){}};(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"layer",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"minLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"maxLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"request",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"size",void 0),x=l=(0,s._)([(0,y.$)("esri.layers.support.TilemapCache")],x)},65509:(e,t,i)=>{i.d(t,{A:()=>o});var l=i(49186),s=i(74887);class o{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const l=this.tileInfo?.lodAt(e);return!l||e<this.minLOD||e>this.maxLOD?"unavailable":l.cols&&l.rows?i>=l.cols[0]&&i<=l.cols[1]&&t>=l.rows[0]&&t<=l.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,o){await(0,s.NO)(o);const r=this.getAvailability(e,t,i);if("unavailable"===r)throw new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}async fetchAvailabilityUpsample(e,t,i,l,o){await(0,s.NO)(o),l.level=e,l.row=t,l.col=i;const r=this.tileInfo;return r.updateTileInfo(l),this.fetchAvailability(e,t,i,o).catch(e=>{if((0,s.zf)(e))throw e;if(r.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,o);throw e})}}},71903:(e,t,i)=>{var l;i.d(t,{u:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},72802:(e,t,i)=>{i.d(t,{U:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},87045:(e,t,i)=>{i.d(t,{A:()=>A});var l,s=i(90237),o=i(66552),r=i(25482),n=i(83047),a=i(10107),c=i(56507),h=(i(44208),i(87811),i(36005)),p=i(40608),u=i(43937),f=i(86738),d=i(16930),v=i(19419),m=i(21325),y=i(28735),w=i(91806),g=i(72802);const _=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let A=class extends r.A{static{l=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:o=d.A.WebMercator,numLODs:r=24}=e;if(!(0,m.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new w.A({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new f.A(0,0,o),size:[s,s],spatialReference:o})}const a=(0,m.Vp)(o),c=e.origin?new f.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new f.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),h=1/(39.37*(0,n.GA)(o)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*h;p.push(new w.A({level:e,scale:t,resolution:l}))}else{let e=(0,m.EA)(o)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new w.A({level:0,scale:e,resolution:e*h}));for(let l=1;l<i;l++){const i=e/2**t,s=i*h;p.push(new w.A({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:c,size:[s,s],spatialReference:o})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let o,r;if("number"==typeof t)o=t,r=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))o=t.x,r=t.y,l=i;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,r=e.y,l=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new g.U(null,0,0,0,(0,v.vt)())),l.level=e,l.row=Math.floor((this.origin.y-r)/a+.001),l.col=Math.floor((o-this.origin.x)/n+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,o=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.vt)()),e.extent[0]=this.origin.x+e.col*o,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+o,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],o=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+s,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const l=e+t,{scale:s,resolution:o}=l>=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:s,resolution:o}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var b,O;(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],A.prototype,"compressionQuality",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],A.prototype,"dpi",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],A.prototype,"format",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],A.prototype,"isWrappable",null),(0,s._)([(0,a.MZ)({type:f.A,json:{write:!0}})],A.prototype,"origin",void 0),(0,s._)([(0,h.w)("origin")],A.prototype,"readOrigin",null),(0,s._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],A.prototype,"lods",null),(0,s._)([(0,a.MZ)({readOnly:!0})],A.prototype,"scales",void 0),(0,s._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],A.prototype,"size",void 0),(0,s._)([(0,h.w)("size",["rows","cols"])],A.prototype,"readSize",null),(0,s._)([(0,u.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],A.prototype,"writeSize",null),(0,s._)([(0,a.MZ)({type:d.A,json:{write:!0}})],A.prototype,"spatialReference",void 0),A=l=(0,s._)([(0,p.$)("esri.layers.support.TileInfo")],A),(O=(b=A||(A={})).ExtrapolateOptions||(b.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO"},89186:(e,t,i)=>{i.d(t,{f:()=>p});var l=i(90237),s=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),r=i(40608),n=i(16930),a=i(87045),c=i(65509),h=i(25943);const p=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const l=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:o,minScale:r,maxScale:n}=t;if(null==s&&null==o&&(0!==r||0!==n)){const e=e=>Math.round(1e4*e)/1e4;r=e(r||t.tileInfo.lods[0].scale),n=e(n||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=r?i.level:s,o=t>=n?i.level:o}}if(l)return new h.d({layer:this,minLOD:s,maxLOD:o});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new c.A(e,s,o)}return null}};return(0,l._)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,l._)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,l._)([(0,o.w)("service","minScale")],i.prototype,"readMinScale",null),(0,l._)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,l._)([(0,o.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,l._)([(0,s.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,l._)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,l._)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,l._)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,l._)([(0,o.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,l._)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISCachedService")],i),i}},91806:(e,t,i)=>{i.d(t,{A:()=>c});var l,s=i(90237),o=i(25482),r=i(10107),n=i(56507),a=(i(44208),i(87811),i(40608));let c=class extends o.A{static{l=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,r.MZ)({type:n.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=l=(0,s._)([(0,a.$)("esri.layers.support.LOD")],c)}}]);
|