@arcgis/core 4.33.0-next.20250402 → 4.33.0-next.20250403
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0cec53e6f1464c69448d.js +1 -0
- package/assets/esri/core/workers/chunks/{322cb1b1871d03b69f0a.js → 5beb525b4adde1d98532.js} +33 -33
- package/assets/esri/core/workers/chunks/6b0a6469673417563616.js +1 -0
- package/assets/esri/core/workers/chunks/c977a47cabc419610277.js +1 -0
- package/assets/esri/core/workers/chunks/{7e00122014d0a55363a8.js → ccb289911e7445b17763.js} +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Vec2.js +1 -1
- package/interfaces.d.ts +23 -21
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainAttributes.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/ChangeSet.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/ITexture.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUpdater.js +5 -0
- package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/assets/esri/core/workers/chunks/a56da688088404259481.js +0 -1
- package/assets/esri/core/workers/chunks/e6469173c65531d6524a.js +0 -1
- package/assets/esri/core/workers/chunks/e9e517a2141e504eec64.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9899],{620:(_,E,R)=>{R.d(E,{O_:()=>t,vA:()=>T}),R(48163),R(87317),(0,R(91829).vt)();class A{constructor(_){this.message=_}toString(){return`AssertException: ${this.message}`}}function T(_,E="Assertion"){if(!_){const _=new Error(E).stack;throw new A(`${E} at ${_}`)}}function t(_,E,R,A){let T,t=(R[0]-_[0])/E[0],e=(A[0]-_[0])/E[0];t>e&&(T=t,t=e,e=T);let N=(R[1]-_[1])/E[1],S=(A[1]-_[1])/E[1];if(N>S&&(T=N,N=S,S=T),t>S||N>e)return!1;N>t&&(t=N),S<e&&(e=S);let I=(R[2]-_[2])/E[2],n=(A[2]-_[2])/E[2];return I>n&&(T=I,I=n,n=T),!(t>n||I>e||(n<e&&(e=n),e<0))}},1843:(_,E,R)=>{R.d(E,{BP:()=>S,l5:()=>I});var A=R(13030),T=R(90239),t=R(620);class e{constructor(_,E){this.layout=_,this.buffer="number"==typeof E?new ArrayBuffer(E*_.stride):E;for(const E of _.fields.keys()){const R=_.fields.get(E);this[E]=new R.constructor(this.buffer,R.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(_,E){const R=this[_];return R&&R.elementCount===E.ElementCount&&R.elementType===E.ElementType?R:null}slice(_,E){return new e(this.layout,this.buffer.slice(_*this.stride,E*this.stride))}copyFrom(_,E=0,R=0,A=_.count){const T=this.stride;if(T%4==0){const t=new Uint32Array(_.buffer,E*T,A*T/4);new Uint32Array(this.buffer,R*T,A*T/4).set(t)}else{const t=new Uint8Array(_.buffer,E*T,A*T);new Uint8Array(this.buffer,R*T,A*T).set(t)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class N{constructor(_){this._stride=0,this._fields=new Map,_&&(this._stride=_.stride,_.fields.forEach((_=>this._fields.set(_[0],{..._[1],constructor:O(_[1].constructor)}))))}freeze(){return this}vec2f16(_,E){return this._appendField(_,A.ZD,E),this}vec2f(_,E){return this._appendField(_,A.gH,E),this}vec2f64(_,E){return this._appendField(_,A.si,E),this}vec3f16(_,E){return this._appendField(_,A.EC,E),this}vec3f(_,E){return this._appendField(_,A.xs,E),this}vec3f64(_,E){return this._appendField(_,A.Xm,E),this}vec4f16(_,E){return this._appendField(_,A.jz,E),this}vec4f(_,E){return this._appendField(_,A.Eq,E),this}vec4f64(_,E){return this._appendField(_,A.Aj,E),this}mat3f(_,E){return this._appendField(_,A.jZ,E),this}mat3f64(_,E){return this._appendField(_,A.j0,E),this}mat4f(_,E){return this._appendField(_,A.Sx,E),this}mat4f64(_,E){return this._appendField(_,A.E$,E),this}vec4u8(_,E){return this._appendField(_,A.XP,E),this}f16(_,E){return this._appendField(_,A.XW,E),this}f32(_,E){return this._appendField(_,A.Y$,E),this}f64(_,E){return this._appendField(_,A.qB,E),this}u8(_,E){return this._appendField(_,A.SL,E),this}u16(_,E){return this._appendField(_,A.h,E),this}i8(_,E){return this._appendField(_,A.bf,E),this}vec2i8(_,E){return this._appendField(_,A.D6,E),this}vec2i16(_,E){return this._appendField(_,A.mJ,E),this}vec2u8(_,E){return this._appendField(_,A.LC,E),this}vec2u16(_,E){return this._appendField(_,A.Yi,E),this}vec4u16(_,E){return this._appendField(_,A.Uz,E),this}u32(_,E){return this._appendField(_,A.P,E),this}_appendField(_,E,R){if(this._fields.has(_))return void(0,t.vA)(!1,`${_} already added to vertex buffer layout`);const A=E.ElementCount*(0,T.GJ)(E.ElementType),e=this._stride;this._fields.set(_,{constructor:E,size:A,offset:e,optional:R}),this._alignFields()}_alignFields(){let _=0,E=1;this._fields.forEach((R=>{const A=(0,T.GJ)(R.constructor.ElementType);_=Math.floor((_+A-1)/A)*A,R.offset=_,_+=R.size,E=Math.max(E,A)})),_=Math.floor((_+E-1)/E)*E,this._stride=_}createBuffer(_){return new e(this,_)}createView(_){return new e(this,_)}clone(){const _=new N;return _._stride=this._stride,_._fields=new Map,this._fields.forEach(((E,R)=>_._fields.set(R,E))),_.BufferType=this.BufferType,_}get stride(){return this._stride}get fields(){return this._fields}}function S(){return new N}class I{constructor(_){this.fields=new Array,_.fields.forEach(((_,E)=>{const R={..._,constructor:r(_.constructor)};this.fields.push([E,R])})),this.stride=_.stride}}const n=[A.Y$,A.gH,A.xs,A.Eq,A.jZ,A.Sx,A.qB,A.si,A.Xm,A.Aj,A.j0,A.E$,A.SL,A.LC,A.eI,A.XP,A.h,A.Yi,A.nS,A.Uz,A.P,A.An,A.H$,A.ml,A.bf,A.D6,A.m8,A.TX,A.Qt,A.mJ,A.Vp,A.E7,A.My,A.UL,A.zD,A.Y4];function r(_){return`${_.ElementType}_${_.ElementCount}`}function O(_){return C.get(_)}const C=new Map;n.forEach((_=>C.set(r(_),_)))},11868:(_,E,R)=>{R.d(E,{oe:()=>T});var A=R(34275);function T(_,E=!1){return _<=A.y9?E?new Array(_).fill(0):new Array(_):new Float32Array(_)}},63907:(_,E,R)=>{var A,T,t,e,N,S,I,n,r,O,C,i,L,D,U,s,P,M,G,F,B,u,f,c;R.d(E,{Ab:()=>s,Ac:()=>n,Ap:()=>D,CQ:()=>l,Cj:()=>i,Fq:()=>a,H0:()=>P,H3:()=>U,Hr:()=>c,MT:()=>O,NV:()=>A,Tb:()=>N,WR:()=>t,Y7:()=>I,bh:()=>m,dn:()=>e,eA:()=>C,ld:()=>M,nI:()=>d,pF:()=>L,pe:()=>r,r6:()=>o,vt:()=>f,yI:()=>h,yQ:()=>G}),function(_){_[_.DEPTH=256]="DEPTH",_[_.STENCIL=1024]="STENCIL",_[_.COLOR=16384]="COLOR"}(A||(A={})),function(_){_[_.COLOR=6144]="COLOR",_[_.DEPTH=6145]="DEPTH",_[_.STENCIL=6146]="STENCIL",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(T||(T={})),function(_){_[_.POINTS=0]="POINTS",_[_.LINES=1]="LINES",_[_.LINE_LOOP=2]="LINE_LOOP",_[_.LINE_STRIP=3]="LINE_STRIP",_[_.TRIANGLES=4]="TRIANGLES",_[_.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",_[_.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(t||(t={})),function(_){_[_.ZERO=0]="ZERO",_[_.ONE=1]="ONE",_[_.SRC_COLOR=768]="SRC_COLOR",_[_.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",_[_.SRC_ALPHA=770]="SRC_ALPHA",_[_.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",_[_.DST_ALPHA=772]="DST_ALPHA",_[_.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",_[_.DST_COLOR=774]="DST_COLOR",_[_.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",_[_.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",_[_.CONSTANT_COLOR=32769]="CONSTANT_COLOR",_[_.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",_[_.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",_[_.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(e||(e={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(N||(N={})),function(_){_[_.ARRAY_BUFFER=34962]="ARRAY_BUFFER",_[_.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",_[_.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",_[_.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",_[_.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",_[_.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",_[_.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",_[_.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(S||(S={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(I||(I={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(n||(n={})),function(_){_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.INT=5124]="INT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.FLOAT=5126]="FLOAT",_[_.HALF_FLOAT=5131]="HALF_FLOAT"}(r||(r={})),function(_){_[_.NEVER=512]="NEVER",_[_.LESS=513]="LESS",_[_.EQUAL=514]="EQUAL",_[_.LEQUAL=515]="LEQUAL",_[_.GREATER=516]="GREATER",_[_.NOTEQUAL=517]="NOTEQUAL",_[_.GEQUAL=518]="GEQUAL",_[_.ALWAYS=519]="ALWAYS"}(O||(O={})),function(_){_[_.ZERO=0]="ZERO",_[_.KEEP=7680]="KEEP",_[_.REPLACE=7681]="REPLACE",_[_.INCR=7682]="INCR",_[_.DECR=7683]="DECR",_[_.INVERT=5386]="INVERT",_[_.INCR_WRAP=34055]="INCR_WRAP",_[_.DECR_WRAP=34056]="DECR_WRAP"}(C||(C={})),function(_){_[_.NEAREST=9728]="NEAREST",_[_.LINEAR=9729]="LINEAR",_[_.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",_[_.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",_[_.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",_[_.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(i||(i={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(L||(L={})),function(_){_[_.TEXTURE_2D=3553]="TEXTURE_2D",_[_.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",_[_.TEXTURE_3D=32879]="TEXTURE_3D",_[_.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",_[_.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",_[_.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",_[_.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",_[_.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(D||(D={})),function(_){_[_.MIN_LOD=33082]="MIN_LOD",_[_.MAX_LOD=33083]="MAX_LOD",_[_.BASE_LEVEL=33084]="BASE_LEVEL",_[_.MAX_LEVEL=33085]="MAX_LEVEL",_[_.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE"}(U||(U={})),function(_){_[_.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.ALPHA=6406]="ALPHA",_[_.RGB=6407]="RGB",_[_.RGBA=6408]="RGBA",_[_.LUMINANCE=6409]="LUMINANCE",_[_.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",_[_.RED=6403]="RED",_[_.RG=33319]="RG",_[_.RED_INTEGER=36244]="RED_INTEGER",_[_.RG_INTEGER=33320]="RG_INTEGER",_[_.RGB_INTEGER=36248]="RGB_INTEGER",_[_.RGBA_INTEGER=36249]="RGBA_INTEGER"}(s||(s={})),function(_){_[_.RGBA4=32854]="RGBA4",_[_.R16F=33325]="R16F",_[_.RG16F=33327]="RG16F",_[_.RGB32F=34837]="RGB32F",_[_.RGBA16F=34842]="RGBA16F",_[_.R32F=33326]="R32F",_[_.RG32F=33328]="RG32F",_[_.RGBA32F=34836]="RGBA32F",_[_.R11F_G11F_B10F=35898]="R11F_G11F_B10F",_[_.RGB8=32849]="RGB8",_[_.RGBA8=32856]="RGBA8",_[_.RGB5_A1=32855]="RGB5_A1",_[_.R8=33321]="R8",_[_.RG8=33323]="RG8",_[_.R8I=33329]="R8I",_[_.R8UI=33330]="R8UI",_[_.R16I=33331]="R16I",_[_.R16UI=33332]="R16UI",_[_.R32I=33333]="R32I",_[_.R32UI=33334]="R32UI",_[_.RG8I=33335]="RG8I",_[_.RG8UI=33336]="RG8UI",_[_.RG16I=33337]="RG16I",_[_.RG16UI=33338]="RG16UI",_[_.RG32I=33339]="RG32I",_[_.RG32UI=33340]="RG32UI",_[_.RGB16F=34843]="RGB16F",_[_.RGB9_E5=35901]="RGB9_E5",_[_.SRGB8=35905]="SRGB8",_[_.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",_[_.RGB565=36194]="RGB565",_[_.RGBA32UI=36208]="RGBA32UI",_[_.RGB32UI=36209]="RGB32UI",_[_.RGBA16UI=36214]="RGBA16UI",_[_.RGB16UI=36215]="RGB16UI",_[_.RGBA8UI=36220]="RGBA8UI",_[_.RGB8UI=36221]="RGB8UI",_[_.RGBA32I=36226]="RGBA32I",_[_.RGB32I=36227]="RGB32I",_[_.RGBA16I=36232]="RGBA16I",_[_.RGB16I=36233]="RGB16I",_[_.RGBA8I=36238]="RGBA8I",_[_.RGB8I=36239]="RGB8I",_[_.R8_SNORM=36756]="R8_SNORM",_[_.RG8_SNORM=36757]="RG8_SNORM",_[_.RGB8_SNORM=36758]="RGB8_SNORM",_[_.RGBA8_SNORM=36759]="RGBA8_SNORM",_[_.RGB10_A2=32857]="RGB10_A2",_[_.RGB10_A2UI=36975]="RGB10_A2UI"}(P||(P={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",_[_.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",_[_.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",_[_.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.INT=5124]="INT",_[_.HALF_FLOAT=5131]="HALF_FLOAT",_[_.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",_[_.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",_[_.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",_[_.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(M||(M={})),function(_){_[_.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",_[_.STENCIL_INDEX8=36168]="STENCIL_INDEX8",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",_[_.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(G||(G={})),function(_){_[_.STATIC_DRAW=35044]="STATIC_DRAW",_[_.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",_[_.STREAM_DRAW=35040]="STREAM_DRAW",_[_.STATIC_READ=35045]="STATIC_READ",_[_.DYNAMIC_READ=35049]="DYNAMIC_READ",_[_.STREAM_READ=35041]="STREAM_READ",_[_.STATIC_COPY=35046]="STATIC_COPY",_[_.DYNAMIC_COPY=35050]="DYNAMIC_COPY",_[_.STREAM_COPY=35042]="STREAM_COPY"}(F||(F={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(B||(B={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(u||(u={})),function(_){_[_.Texture=0]="Texture",_[_.BufferObject=1]="BufferObject",_[_.VertexArrayObject=2]="VertexArrayObject",_[_.Shader=3]="Shader",_[_.Program=4]="Program",_[_.FramebufferObject=5]="FramebufferObject",_[_.Renderbuffer=6]="Renderbuffer",_[_.TransformFeedback=7]="TransformFeedback",_[_.Sync=8]="Sync",_[_.UNCOUNTED=9]="UNCOUNTED",_[_.LinesOfCode=9]="LinesOfCode",_[_.Uniform=10]="Uniform",_[_.COUNT=11]="COUNT"}(f||(f={})),function(_){_[_.NONE=0]="NONE",_[_.BACK=1029]="BACK"}(c||(c={}));const o=36064,h=36065,a=36066,d=33306;var l,H,p,V,X,Y,y,m,w;!function(_){_[_.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",_[_.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",_[_.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",_[_.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",_[_.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",_[_.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",_[_.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",_[_.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",_[_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(l||(l={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.FLOAT_VEC2=35664]="FLOAT_VEC2",_[_.FLOAT_VEC3=35665]="FLOAT_VEC3",_[_.FLOAT_VEC4=35666]="FLOAT_VEC4",_[_.INT=5124]="INT",_[_.INT_VEC2=35667]="INT_VEC2",_[_.INT_VEC3=35668]="INT_VEC3",_[_.INT_VEC4=35669]="INT_VEC4",_[_.BOOL=35670]="BOOL",_[_.BOOL_VEC2=35671]="BOOL_VEC2",_[_.BOOL_VEC3=35672]="BOOL_VEC3",_[_.BOOL_VEC4=35673]="BOOL_VEC4",_[_.FLOAT_MAT2=35674]="FLOAT_MAT2",_[_.FLOAT_MAT3=35675]="FLOAT_MAT3",_[_.FLOAT_MAT4=35676]="FLOAT_MAT4",_[_.SAMPLER_2D=35678]="SAMPLER_2D",_[_.SAMPLER_CUBE=35680]="SAMPLER_CUBE",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",_[_.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",_[_.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",_[_.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",_[_.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",_[_.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",_[_.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",_[_.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",_[_.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",_[_.SAMPLER_3D=35679]="SAMPLER_3D",_[_.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",_[_.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",_[_.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",_[_.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",_[_.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",_[_.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",_[_.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",_[_.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",_[_.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",_[_.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",_[_.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",_[_.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(H||(H={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(p||(p={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(V||(V={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(X||(X={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(Y||(Y={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(y||(y={})),function(_){_[_.INVALID_ENUM=1280]="INVALID_ENUM",_[_.INVALID_VALUE=1281]="INVALID_VALUE",_[_.INVALID_OPERATION=1282]="INVALID_OPERATION",_[_.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",_[_.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",_[_.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL"}(m||(m={})),function(_){_[_.COMPLETION_STATUS_KHR=37297]="COMPLETION_STATUS_KHR"}(w||(w={}))},90239:(_,E,R)=>{function A(_){switch(_){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}R.d(E,{GJ:()=>A})},97146:(_,E,R)=>{R.d(E,{Dg:()=>t,my:()=>e,tM:()=>n,uW:()=>T});var A=R(34275);function T(_){return t(_,!0)}function t(_,E){if(Array.isArray(_)){if(_.length<A.y9)return _}else if(_.length<A.y9)return Array.from(_);let R=!0,T=!0;return _.some(((_,E)=>(R=R&&0===_,T=T&&_===E,!R&&!T))),R?function(_){if(1===_)return S;if(_<A.y9)return new Array(_).fill(0);if(_>O.length){const E=Math.max(2*O.length,_);O=new Uint8Array(E)}return new Uint8Array(O.buffer,0,_)}(_.length):T?n(_.length):(0,A.iu)(_)&&_.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?_:function(_,E){for(const R of _){if(R>=65536)return(0,A.iu)(_)?_:new Uint32Array(_);R>=256&&(E=!1)}return E?new Uint8Array(_):new Uint16Array(_)}(_,!E)}function e(_){return _<=A.y9?new Array(_):_<=65536?new Uint16Array(_):new Uint32Array(_)}let N=r(131072);const S=[0],I=(()=>{const _=new Uint16Array(65536);for(let E=0;E<_.length;++E)_[E]=E;return _})();function n(_){return 1===_?S:_<A.y9?Array.from(new Uint16Array(I.buffer,0,_)):_<I.length?new Uint16Array(I.buffer,0,_):(_>N.length&&(N=r(Math.max(2*N.length,_))),new Uint32Array(N.buffer,0,_))}function r(_){const E=new Uint32Array(_);for(let _=0;_<E.length;_++)E[_]=_;return E}let O=new Uint8Array(65536)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3030],{13030:(t,e,s)=>{s.d(e,{Y$:()=>p,XW:()=>d,qB:()=>x,Qt:()=>X,My:()=>Q,bf:()=>j,jZ:()=>M,j0:()=>A,Sx:()=>b,E$:()=>_,h:()=>N,P:()=>O,SL:()=>P,gH:()=>B,ZD:()=>a,si:()=>g,mJ:()=>Z,UL:()=>W,D6:()=>D,Yi:()=>F,An:()=>U,LC:()=>Y,xs:()=>T,EC:()=>E,Xm:()=>C,Vp:()=>$,zD:()=>J,m8:()=>z,nS:()=>v,H$:()=>q,eI:()=>R,Eq:()=>S,jz:()=>m,Aj:()=>L,E7:()=>H,Y4:()=>G,TX:()=>k,Uz:()=>I,ml:()=>V,XP:()=>w});var r=s(26615);class i{static{this.ElementCount=9}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=9;const n=this.TypedArrayConstructor;void 0===r&&(r=9*n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let n=t*this.typedBufferStride,u=s*e.typedBufferStride;for(let t=0;t<9;++t)r[n++]=i[u++]}get buffer(){return this.typedBuffer.buffer}}class n{static{this.ElementCount=16}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=16;const n=this.TypedArrayConstructor;void 0===r&&(r=16*n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){this.copyFromTypedBuffer(t,e.typedBuffer,s*e.typedBufferStride)}copyFromTypedBuffer(t,e,s){const r=this.typedBuffer;let i=t*this.typedBufferStride;for(let t=0;t<16;++t)r[i++]=e[s++]}get buffer(){return this.typedBuffer.buffer}}class u{static{this.ElementCount=1}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=1;const n=this.TypedArrayConstructor;void 0===r&&(r=n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.stride=r,this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var f=s(37585);class c{static{this.ElementCount=2}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=2;const n=this.TypedArrayConstructor;void 0===r&&(r=2*n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,f.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let n=t*this.typedBufferStride,u=s*e.typedBufferStride;r[n++]=i[u++],r[n]=i[u]}get buffer(){return this.typedBuffer.buffer}}var h=s(38954);class y{static{this.ElementCount=3}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=3;const n=this.TypedArrayConstructor;void 0===r&&(r=3*n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.i)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t]=r}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let n=t*this.typedBufferStride,u=s*e.typedBufferStride;r[n++]=i[u++],r[n++]=i[u++],r[n]=i[u]}get buffer(){return this.typedBuffer.buffer}}var l=s(87317);class o{static{this.ElementCount=4}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=4;const n=this.TypedArrayConstructor;void 0===r&&(r=4*n.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new n(e,u):new n(e,u,(i-s)/n.BYTES_PER_ELEMENT),this.typedBufferStride=r/n.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,l.s)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r,i){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t++]=r,this.typedBuffer[t]=i}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let n=t*this.typedBufferStride,u=s*e.typedBufferStride;r[n++]=i[u++],r[n++]=i[u++],r[n++]=i[u++],r[n]=i[u]}get buffer(){return this.typedBuffer.buffer}}class d extends u{constructor(t,e=0,s,i){super(r.l,t,e,s,i),this.elementType="f16"}static{this.ElementType="f16"}}class p extends u{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}static{this.ElementType="f32"}}class a extends c{constructor(t,e=0,s,i){super(r.l,t,e,s,i),this.elementType="f16"}slice(t,e){return this.sliceBuffer(a,t,e)}static{this.ElementType="f16"}}class B extends c{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(B,t,e)}static{this.ElementType="f32"}}class E extends y{constructor(t,e=0,s,i){super(r.l,t,e,s,i),this.elementType="f16"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f16"}}class T extends y{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(T,t,e)}static fromTypedArray(t,e){return new T(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class m extends o{constructor(t,e=0,s,i){super(r.l,t,e,s,i),this.elementType="f16"}slice(t,e){return this.sliceBuffer(m,t,e)}static{this.ElementType="f16"}}class S extends o{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f32"}}class M extends i{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f32"}}class A extends i{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f64"}}class b extends n{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f32"}}class _ extends n{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f64"}}class x extends u{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f64"}}class g extends c{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f64"}}class C extends y{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static fromTypedArray(t,e){return new C(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class L extends o{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="f64"}}class P extends u{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static{this.ElementType="u8"}}class Y extends c{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u8"}}class R extends y{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(R,t,e)}static fromTypedArray(t,e){return new R(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class w extends o{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="u8"}}class N extends u{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(N,t,e)}static{this.ElementType="u16"}}class F extends c{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u16"}}class v extends y{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="u16"}}class I extends o{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u16"}}class O extends u{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u32"}}class U extends c{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u32"}}class q extends y{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="u32"}}class V extends o{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u32"}}class j extends u{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="i8"}}class D extends c{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="i8"}}class z extends y{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="i8"}}class k extends o{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i8"}}class X extends u{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="i16"}}class Z extends c{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i16"}}class $ extends y{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i16"}}class H extends o{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class Q extends u{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class W extends c{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i32"}}class J extends y{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i32"}}class G extends o{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i32"}}},37585:(t,e,s)=>{s.d(e,{C:()=>i,Cc:()=>B,Io:()=>l,S8:()=>a,WQ:()=>u,e$:()=>T,hZ:()=>n,hs:()=>y,jb:()=>S,l0:()=>E});var r=s(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t}function n(t,e,s){return t[0]=e,t[1]=s,t}function u(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t}function f(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function c(t,e,s){return t[0]=e[0]*s[0],t[1]=e[1]*s[1],t}function h(t,e,s){return t[0]=e[0]/s[0],t[1]=e[1]/s[1],t}function y(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t}function l(t,e){const s=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(s*s+r*r)}function o(t,e){const s=e[0]-t[0],r=e[1]-t[1];return s*s+r*r}function d(t){const e=t[0],s=t[1];return Math.sqrt(e*e+s*s)}function p(t){const e=t[0],s=t[1];return e*e+s*s}function a(t,e){const s=e[0],r=e[1];let i=s*s+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function B(t,e,s,r){const i=e[0],n=e[1];return t[0]=i+r*(s[0]-i),t[1]=n+r*(s[1]-n),t}function E(t,e,s){const r=e[0],i=e[1];return t[0]=s[0]*r+s[2]*i+s[4],t[1]=s[1]*r+s[3]*i+s[5],t}function T(t,e,s,r){const i=e[0]-s[0],n=e[1]-s[1],u=Math.sin(r),f=Math.cos(r);return t[0]=i*f-n*u+s[0],t[1]=i*u+n*f+s[1],t}const m=d,S=f,M=c,A=h,b=l,_=o,x=p;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){const s=t[0],r=t[1],i=e[0],n=e[1];let u=s*s+r*r;u>0&&(u=1/Math.sqrt(u));let f=i*i+n*n;f>0&&(f=1/Math.sqrt(f));const c=(s*i+r*n)*u*f;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:i,cross:function(t,e,s){const r=e[0]*s[1]-e[1]*s[0];return t[0]=t[1]=0,t[2]=r,t},dist:b,distance:l,div:A,divide:h,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const s=t[0],i=t[1],n=e[0],u=e[1],f=(0,r.FD)();return Math.abs(s-n)<=f*Math.max(1,Math.abs(s),Math.abs(n))&&Math.abs(i-u)<=f*Math.max(1,Math.abs(i),Math.abs(u))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:m,length:d,lerp:B,max:function(t,e,s){return t[0]=Math.max(e[0],s[0]),t[1]=Math.max(e[1],s[1]),t},min:function(t,e,s){return t[0]=Math.min(e[0],s[0]),t[1]=Math.min(e[1],s[1]),t},mul:M,multiply:c,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:a,projectAndScale:function(t,e,s,r,i){let n=e[0]-s[0],u=e[1]-s[1];const f=(r[0]*n+r[1]*u)*(i-1);return n=r[0]*f,u=r[1]*f,t[0]=e[0]+n,t[1]=e[1]+u,t},random:function(t,e=1){const s=2*(0,r.Ov)()*Math.PI;return t[0]=Math.cos(s)*e,t[1]=Math.sin(s)*e,t},rotate:T,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:y,scaleAndAdd:function(t,e,s,r){return t[0]=e[0]+s[0]*r,t[1]=e[1]+s[1]*r,t},set:n,sqrDist:_,sqrLen:x,squaredDistance:o,squaredLength:p,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:S,subtract:f,transformMat2:function(t,e,s){const r=e[0],i=e[1];return t[0]=s[0]*r+s[2]*i,t[1]=s[1]*r+s[3]*i,t},transformMat2d:E,transformMat3:function(t,e,s){const r=e[0],i=e[1];return t[0]=s[0]*r+s[3]*i+s[6],t[1]=s[1]*r+s[4]*i+s[7],t},transformMat4:function(t,e,s){const r=e[0],i=e[1];return t[0]=s[0]*r+s[4]*i+s[12],t[1]=s[1]*r+s[5]*i+s[13],t}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -316,4 +316,4 @@ gl_Position = posProjCenter;
|
|
|
316
316
|
gl_PointSize = 1.0;`),a.main.add(s.H`fragColor = vec4(1);
|
|
317
317
|
if(discardByTerrainDepth()) {
|
|
318
318
|
fragColor.g = 0.5;
|
|
319
|
-
}`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var k=r(80893);class U{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new U(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,k.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.Os:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var ke=r(53466),Ue=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=ke.I.None,this.emissionSource=Ue.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,id:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,id:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),kt=r(72385),Ut=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(96672),r(87170);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,kt.fA)(-.5,0,-.5),$t=(0,kt.fA)(.5,0,-.5),Yt=(0,kt.fA)(0,0,.5),Wt=(0,kt.fA)(0,.5,0),Xt=(0,kt.vt)(),Zt=(0,kt.vt)(),Qt=(0,kt.vt)(),Jt=(0,kt.vt)(),Kt=(0,kt.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,kt.fA)(0,a,0),d=(0,kt.fA)(0,a+l,0),u=(0,kt.fA)(0,-1,0),h=(0,kt.fA)(0,1,0);n&&(a=l,d=(0,kt.fA)(0,0,0),c=(0,kt.fA)(0,a,0),u=(0,kt.fA)(0,1,0),h=(0,kt.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone"}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(48833);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function kr(e){return"point"===e.type}class Ur{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return kr(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return kr(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new Ur(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new Ur(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:Ur.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,(m=o,null==t.formatOf3DObjects||m.returnCountOnly||m.returnExtentOnly||m.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}});var m}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);
|
|
319
|
+
}`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var k=r(80893);class U{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new U(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,k.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.RC:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var ke=r(53466),Ue=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=ke.I.None,this.emissionSource=Ue.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,id:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,id:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),kt=r(72385),Ut=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(96672),r(87170);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,kt.fA)(-.5,0,-.5),$t=(0,kt.fA)(.5,0,-.5),Yt=(0,kt.fA)(0,0,.5),Wt=(0,kt.fA)(0,.5,0),Xt=(0,kt.vt)(),Zt=(0,kt.vt)(),Qt=(0,kt.vt)(),Jt=(0,kt.vt)(),Kt=(0,kt.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,kt.fA)(0,a,0),d=(0,kt.fA)(0,a+l,0),u=(0,kt.fA)(0,-1,0),h=(0,kt.fA)(0,1,0);n&&(a=l,d=(0,kt.fA)(0,0,0),c=(0,kt.fA)(0,a,0),u=(0,kt.fA)(0,1,0),h=(0,kt.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,kt.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,kt.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,Ut.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone"}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(48833);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function kr(e){return"point"===e.type}class Ur{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return kr(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return kr(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new Ur(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new Ur(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:Ur.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,(m=o,null==t.formatOf3DObjects||m.returnCountOnly||m.returnExtentOnly||m.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}});var m}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);
|
package/core/typedArrayUtil.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./has.js";function n(n){return n instanceof ArrayBuffer}function r(n){return"Int8Array"===n?.constructor?.name}function t(n){return"Uint8Array"===n?.constructor?.name}function o(n){return"Uint8ClampedArray"===n?.constructor?.name}function u(n){return"Int16Array"===n?.constructor?.name}function c(n){return"Uint16Array"===n?.constructor?.name}function e(n){return"Int32Array"===n?.constructor?.name}function a(n){return"Uint32Array"===n?.constructor?.name}function i(n){return"Float16Array"===n?.constructor?.name}function f(n){return"Float32Array"===n?.constructor?.name}function s(n){return"Float64Array"===n?.constructor?.name}function m(n){return"buffer"in n}const y=1024;function A(n){return s(n)||f(n)||e(n)||u(n)||r(n)}function l(n){return s(n)||f(n)}function U(n){return s(n)?179769e303:i(n)?65504:f(n)?3402823e32:a(n)?4294967295:c(n)?65535:t(n)||o(n)?255:e(n)?2147483647:u(n)?32767:r(n)?127:256}const p=-32768,F=-2147483648;export{n as isArrayBuffer,l as isFloat,i as isFloat16Array,f as isFloat32Array,s as isFloat64Array,u as isInt16Array,e as isInt32Array,r as isInt8Array,A as isSigned,m as isTypedArray,c as isUint16Array,a as isUint32Array,t as isUint8Array,o as isUint8ClampedArray,U as maximumValue,p as minInt16,F as minInt32,y as nativeArrayMaxSize};
|
|
5
|
+
import"./has.js";function n(n){return n instanceof ArrayBuffer}function r(n){return"Int8Array"===n?.constructor?.name}function t(n){return"Uint8Array"===n?.constructor?.name}function o(n){return"Uint8ClampedArray"===n?.constructor?.name}function u(n){return"Int16Array"===n?.constructor?.name}function c(n){return"Uint16Array"===n?.constructor?.name}function e(n){return"Int32Array"===n?.constructor?.name}function a(n){return"Uint32Array"===n?.constructor?.name}function i(n){return"Float16Array"===n?.constructor?.name}function f(n){return"Float32Array"===n?.constructor?.name}function s(n){return"Float64Array"===n?.constructor?.name}function m(n){return"buffer"in n}const y=1024;function A(n){return s(n)||f(n)||e(n)||u(n)||r(n)}function l(n){return s(n)||f(n)}function U(n){return s(n)?179769e303:i(n)?65504:f(n)?3402823e32:a(n)?4294967295:c(n)?65535:t(n)||o(n)?255:e(n)?2147483647:u(n)?32767:r(n)?127:256}const p=-32768,F=-2147483648,I=65535,b=2**32-1;export{n as isArrayBuffer,l as isFloat,i as isFloat16Array,f as isFloat32Array,s as isFloat64Array,u as isInt16Array,e as isInt32Array,r as isInt8Array,A as isSigned,m as isTypedArray,c as isUint16Array,a as isUint32Array,t as isUint8Array,o as isUint8ClampedArray,I as maxUint16,b as maxUint32,U as maximumValue,p as minInt16,F as minInt32,y as nativeArrayMaxSize};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import r from"../../core/Accessor.js";import{makeHandle as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{abortMaybe as i}from"../../core/maybe.js";import{onAbort as a,throwIfAborted as l,createAbortError as n,throwIfAbortError as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as u}from"../../core/reactiveUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{isSharedGroupTemplate as m,isSharedPresetTemplate as h,isSharedFeatureTemplate as y}from"../templateUtils.js";import{SharedTemplateMissingTemplatesError as w,SharedTemplateLayerResolverError as v,SharedTemplateUtilityNetworkResolverError as k,SharedTemplateRequestError as g,SharedTemplateLayerUnavailableError as S}from"./support/sharedTemplateErrors.js";import{isFeatureLayer as _,isSubtypeGroupLayer as b}from"../../layers/support/layerUtils.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import r from"../../core/Accessor.js";import{makeHandle as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{abortMaybe as i}from"../../core/maybe.js";import{onAbort as a,throwIfAborted as l,createAbortError as n,throwIfAbortError as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as u}from"../../core/reactiveUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{isSharedGroupTemplate as m,isSharedPresetTemplate as h,isSharedFeatureTemplate as y}from"../templateUtils.js";import{SharedTemplateMissingTemplatesError as w,SharedTemplateLayerResolverError as v,SharedTemplateUtilityNetworkResolverError as k,SharedTemplateRequestError as g,SharedTemplateLayerUnavailableError as S}from"./support/sharedTemplateErrors.js";import{isFeatureLayer as _,isSubtypeGroupLayer as b}from"../../layers/support/layerUtils.js";import{getServices as j}from"../../undoredo/support/Services.js";import{isWebMap as N}from"../../webmap/utils.js";const R=new Map;function T(e,t){return s(R,e,(()=>{const r=new C({layerResolver:t?.layerResolver??A(e),makeSharedTemplateFromJSON:t.makeSharedTemplateFromJSON,utilityNetworkResolver:t?.utilityNetworkResolver??F(e),view:e});return e.addHandles(o((()=>{R.delete(e),r.destroy()}))),r}))}let C=class extends r{constructor(e){super(e),this._abortController=null,this._cache=new Map,this._pending=new Map,this._utilityNetworkLookupHelperCache=new Map,this.layerResolver=null,this.makeSharedTemplateFromJSON=null,this.utilityNetworkResolver=null,this.view=null}initialize(){this.addHandles(u((()=>this.view.spatialReference),(()=>this._reset())))}destroy(){this._abortController=i(this._abortController)}async getTemplates({templateIds:e,featureService:t,signal:r}){const o=this._cache,s=this._pending,i=[],n=new Set,c=new Set,p=Symbol();for(const a of new Set(e)){const e=U(t,a);if(o.has(e))i.push(o.get(e));else if(s.has(e)){const t=s.get(e);t.subscribers.add(p),c.add(t)}else n.add(a),s.set(e,L())}if(i.length===e.length)return i;const u=()=>{for(const{subscribers:e}of c)e.delete(p)},d=a(r,u);try{const e=await this._loadTemplates({templateIds:Array.from(n),featureService:t,signal:r}),o=await Promise.all(Array.from(c).map((({resolver:e})=>e.promise)));i.push(...e),i.push(...o)}catch(f){u();for(const e of n){const r=U(t,e),o=s.get(r);o?.resolver.reject(f),s.delete(r)}throw f}finally{d?.remove()}return l(r),i}async _loadTemplates({templateIds:e,featureService:t,signal:r}){if(0===e.length)return[];const o=this._cache,s=this._pending,i=this._abortController=new AbortController,l=a(r,(()=>{for(const r of e){if(H(s.get(U(t,r))))return}i.abort()})),c=await I({featureService:t,templateIds:e,signal:i.signal,spatialReference:this.view.spatialReference});if(c.length<e.length)throw new w(e,c);const p=await Promise.all(c.map((e=>this._makeTemplate({json:e,featureService:t}))));for(const a of p){const e=U(t,a.templateId),i=s.get(e);!r?.aborted||H(i)?(o.set(e,a),i?.resolver.resolve(a)):i?.resolver.reject(n()),s.delete(e)}return l?.remove(),p}async _makeTemplate({json:e,featureService:t}){const{view:r}=this,o=this.makeSharedTemplateFromJSON(e);o.featureService=t,o.view=r;const{layerIds:s,subtypeCode:i}=o;try{o.layer=await this.layerResolver({featureService:t,layerIds:s,subtypeCode:i})}catch(a){throw new v(o.templateId,a)}if(m(o)&&o.definition?.createUtilityNetworkAssociations){let e=null;try{e=await this.utilityNetworkResolver(t)}catch(a){throw new k(o.templateId,a)}if(e){o.definition.utilityNetwork=await this._getOrCreateUtilityNetworkLookupHelper(e);const t=await e.loadAssociationsTable();o.definition.utilityNetworkAssociationsTable=t,j(r).additionalLayers.add(t)}}if(h(o)&&o.definition){o.definition.spatialReference=r.spatialReference;for(const e of o.definition.allParts)e.geometry&&(e.geometry.spatialReference=r.spatialReference)}if(y(o)&&o.definition?.defaultValues){const e=o.definition.defaultValues,t={},{fieldsIndex:r}=o.layer;for(const s in o.definition.defaultValues)t[r.get(s)?.name??s]=e[s];o.definition.defaultValues=t}return o}async _getOrCreateUtilityNetworkLookupHelper(e){const t=this._utilityNetworkLookupHelperCache.get(e);if(t)return t;const{UtilityNetworkLookupHelper:r}=await import("../../networks/support/UtilityNetworkLookupHelper.js"),s=await new r({utilityNetwork:e}).load();this._utilityNetworkLookupHelperCache.set(e,s);const i=o((()=>{s.destroy(),this._utilityNetworkLookupHelperCache.delete(e)}));return e.addHandles(i),this.addHandles(i),s}_reset(){this._abortController?.abort(),this._cache.clear(),this._pending.clear()}};async function I({templateIds:e,featureService:r,spatialReference:o,signal:s}){const i=`${r.url}/sharedTemplates/templates`,a=await t(i,{query:{f:"json",outSR:o,ids:e.join(",")},signal:s}).catch((t=>{throw c(t),new g(e,t)}));return a.data?.templates??[]}function H(e){return null!=e&&e.subscribers.size>0}function L(){return{resolver:p(),subscribers:new Set}}function U(e,t){return`${e.url}/${t}`}function O(e){return _(e)||b(e)}function A(e){return async({featureService:t,layerIds:r})=>{const o=new Set(r),{allLayers:s,allTables:i}=e.map,a=s.concat(i).find((e=>e.url===t.url&&O(e)&&o.has(e.layerId)));if(null==a)throw new S(r);return a}}function F(e){return async t=>{const{map:r}=e;if(!N(r)||!r.utilityNetworks)return null;for(const e of r.utilityNetworks)if(e.featureServiceUrl===t.url)return e.load();return null}}e([d()],C.prototype,"_abortController",void 0),e([d()],C.prototype,"_cache",void 0),e([d()],C.prototype,"_pending",void 0),e([d({constructOnly:!0})],C.prototype,"layerResolver",void 0),e([d({constructOnly:!0})],C.prototype,"makeSharedTemplateFromJSON",void 0),e([d({constructOnly:!0})],C.prototype,"utilityNetworkResolver",void 0),e([d({constructOnly:!0})],C.prototype,"view",void 0),C=e([f("esri.editing.sharedTemplates.SharedTemplateProvider")],C);export{C as SharedTemplateProvider,T as getSharedTemplateProvider};
|