@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240709
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/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
- package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
- package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
- package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
- package/assets/esri/core/workers/chunks/3375de864347a847393d.js +1042 -0
- package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
- package/assets/esri/core/workers/chunks/{812e18c65aa6e398c338.js → 5b6c89dc41067d81c952.js} +1 -1
- package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
- package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
- package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
- package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
- package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
- package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
- package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
- package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
- package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
- package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
- package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
- package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
- package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/AtmosphereCompositing.glsl.js +6 -9
- package/chunks/BlendLayers.glsl.js +1 -7
- package/chunks/BlendWeights.glsl.js +45 -51
- package/chunks/Blur.glsl.js +1 -3
- package/chunks/ChapmanAtmosphere.glsl.js +3 -8
- package/chunks/CheckerBoard.glsl.js +3 -9
- package/chunks/Clouds.glsl.js +21 -10
- package/chunks/CloudsComposition.glsl.js +3 -7
- package/chunks/ColorMaterial.glsl.js +3 -9
- package/chunks/ComponentShader.glsl.js +35 -50
- package/chunks/Compositing.glsl.js +5 -7
- package/chunks/DefaultMaterial.glsl.js +68 -73
- package/chunks/EdgeDetect.glsl.js +5 -10
- package/chunks/EdgeShader.glsl.js +37 -60
- package/chunks/Fog.glsl.js +4 -9
- package/chunks/HUDCompositing.glsl.js +1 -3
- package/chunks/HUDMaterial.glsl.js +8 -14
- package/chunks/Heatmap.glsl.js +4 -7
- package/chunks/HeatmapDensity.glsl.js +5 -11
- package/chunks/HighlightApply.glsl.js +133 -152
- package/chunks/HighlightDownsample.glsl.js +29 -32
- package/chunks/ImageMaterial.glsl.js +11 -21
- package/chunks/LaserlinePath.glsl.js +4 -9
- package/chunks/LineCallout.glsl.js +91 -108
- package/chunks/LineMarker.glsl.js +2 -8
- package/chunks/Magnifier.glsl.js +4 -9
- package/chunks/MeasurementArrow.glsl.js +9 -15
- package/chunks/NativeLine.glsl.js +8 -12
- package/chunks/NoiseTextureAtlas.glsl.js +89 -86
- package/chunks/OITCompositing.glsl.js +2 -3
- package/chunks/OverlayCompositing.glsl.js +2 -4
- package/chunks/Path.glsl.js +31 -55
- package/chunks/Pattern.glsl.js +16 -20
- package/chunks/PointRenderer.glsl.js +39 -48
- package/chunks/Precipitation.glsl.js +15 -27
- package/chunks/RasterColorizer.glsl.js +25 -33
- package/chunks/RealisticTree.glsl.js +53 -65
- package/chunks/SSAO.glsl.js +7 -10
- package/chunks/SSAOBlur.glsl.js +10 -14
- package/chunks/ShadedColorMaterial.glsl.js +12 -15
- package/chunks/ShadowCastAccumulate.glsl.js +2 -4
- package/chunks/ShadowCastVisualize.glsl.js +12 -19
- package/chunks/ShadowHighlight.glsl.js +46 -50
- package/chunks/SimpleAtmosphere.glsl.js +4 -13
- package/chunks/SlicePlaneMaterial.glsl.js +3 -7
- package/chunks/Stars.glsl.js +3 -7
- package/chunks/Terrain.glsl.js +20 -61
- package/chunks/TextureOnly.glsl.js +2 -4
- package/chunks/Viewshed.glsl.js +20 -38
- package/chunks/WaterSurface.glsl.js +34 -60
- package/core/workers/registry.js +1 -1
- package/interfaces.d.ts +34 -4
- package/layers/WCSLayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
- package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
- package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/projectExtentUtils.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/heatmapTextureUtils.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
- package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
- package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
- package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
- package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
- package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
- package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
- package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
- package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8096],{8096:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>K});var n,i=s(74887);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class r{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=r.HEADER_SIZE,this._length+=r.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=_(s.byteLength,4),t&&(this._length+=r.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,r.MAGIC,!0),this._outView.setUint32(4,r.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=_(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,0,i),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}}function _(e,t){return t*Math.ceil(e/t)}r.HEADER_SIZE=12,r.CHUNK_HEADER_SIZE=8,r.MAGIC=1179937895,r.VERSION=2;var E,a,o,T,A,R,c,N,u=s(53966),f=s(91869),h=s(34727),l=s(67026),O=s(82534),S=s(38954),C=s(51850),I=s(80882),L=s(72258);(N=E||(E={}))[N.External=0]="External",N[N.DataURI=1]="DataURI",N[N.GLB=2]="GLB",function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var d=s(63907);class M{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case d.pe.BYTE:return new Int8Array(e,t);case d.pe.FLOAT:return new Float32Array(e,t);case d.pe.SHORT:return new Int16Array(e,t);case d.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case d.pe.UNSIGNED_INT:return new Uint32Array(e,t);case d.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case d.pe.UNSIGNED_BYTE:case d.pe.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case d.pe.BYTE:case d.pe.UNSIGNED_BYTE:return 1;case d.pe.SHORT:case d.pe.UNSIGNED_SHORT:return 2;case d.pe.UNSIGNED_INT:case d.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class D{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new M(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function p(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,S.s)(U,n[t],n[t+1],n[t+2]),a=(0,S.s)(B,n[r],n[r+1],n[r+2]),o=(0,S.s)(m,n[_],n[_+1],n[_+2]),T=(0,S.f)(a,a,E),A=(0,S.f)(o,o,E),R=(0,S.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,S.s)(G,i[e],i[e+1],i[e+2]),(0,S.n)(G,G),i[e]=G[0],i[e+1]=G[1],i[e+2]=G[2]}const U=(0,C.vt)(),B=(0,C.vt)(),m=(0,C.vt)(),G=(0,C.vt)();s(44208);var P=s(49186),g=s(84952);async function F(e,t){const s=w(e);if(null==s)throw new P.A("imageToArrayBuffer","Unsupported image type");const n=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,g.DB)(t)){const e=(0,g.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),r=await new Promise((e=>s.toBlob(e,n)));if((0,i.Te)(t),!r)throw new P.A("imageToArrayBuffer","Failed to encode image");const _=await r.arrayBuffer();return(0,i.Te)(t),{data:_,type:n}}function w(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var b=s(51530);const H=()=>u.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class x{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===E.GLB||t.output.image===a.GLB;s&&(t.binChunkBuffer=new D(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,S.e)(s,C.uY)||(t.translation=(0,C.o8)(s));const n=e.rotation;(0,l.t2)(n,O.zK)||(t.rotation=(0,O.o8)(n));const i=e.scale;(0,S.e)(i,C.Un)||(t.scale=(0,C.o8)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===E.GLB;let n;n=s?t.binChunkBuffer:new D(this.gltf);const i=this.options.origin,r=e.vertexSpace.clone();r.origin=[i.x,i.y,i.z??0];const _=(0,L.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},r,{targetUnit:"meters"});if(!_)return[];(function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&p(s,t)})(e,_),function({position:e,normal:t,tangent:s}){y(e,3),y(t,3),y(s,4)}(_);const{position:a,normal:A,tangent:R}=_,{uv:c,color:N}=e.vertexAttributes,u=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER);let f,h,l,O;A&&(f=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER)),c&&(h=n.addBufferView(d.pe.FLOAT,T.VEC2,o.ARRAY_BUFFER)),R&&(l=n.addBufferView(d.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),N&&(O=n.addBufferView(d.pe.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),u.startAccessor("POSITION"),f&&f.startAccessor("NORMAL"),h&&h.startAccessor("TEXCOORD_0"),l&&l.startAccessor("TANGENT"),O&&O.startAccessor("COLOR_0");const S=_.position.length/3;for(let e=0;e<S;++e)u.push(a[3*e]),u.push(a[3*e+1]),u.push(a[3*e+2]),f&&null!=A&&(f.push(A[3*e]),f.push(A[3*e+1]),f.push(A[3*e+2])),h&&null!=c&&(h.push(c[2*e]),h.push(c[2*e+1])),l&&null!=R&&(l.push(R[4*e]),l.push(R[4*e+1]),l.push(R[4*e+2]),l.push(R[4*e+3])),O&&null!=N&&(O.push(N[4*e]),O.push(N[4*e+1]),O.push(N[4*e+2]),O.push(N[4*e+3]));const C=u.endAccessor(),I=this._addAccessor(u.index,C);let M,U,B,m,G;if(f){const e=f.endAccessor();M=this._addAccessor(f.index,e)}if(h){const e=h.endAccessor();U=this._addAccessor(h.index,e)}if(l){const e=l.endAccessor();B=this._addAccessor(l.index,e)}if(O){const e=O.endAccessor();m=this._addAccessor(O.index,e)}const P=[];return e.components&&e.components.length>0&&e.components[0].faces?(G=n.addBufferView(d.pe.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(G,e.components,P,I,M,U,B,m)):this._addMeshVertexNonIndexed(e.components,P,I,M,U,B,m),u.finalize(),f&&f.finalize(),h&&h.finalize(),l&&l.finalize(),G&&G.finalize(),O&&O.finalize(),s||n.finalize(),P}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof I.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,H().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,h.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,f.tE)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.output.image){case a.GLB:{const e=n.binChunkBuffer.addBufferView(d.pe.UNSIGNED_BYTE,T.SCALAR);if((0,b.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=F(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));n.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case a.DataURI:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=w(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(F(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=d.pF.REPEAT,s=d.pF.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=d.pF.CLAMP_TO_EDGE,s=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT,s=d.pF.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=d.pF.CLAMP_TO_EDGE;break;case"mirror":s=d.pF.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}function y(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}var V=s(4576);class Y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,V.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class v{constructor(e){this.mesh=e,this.name="",this.translation=(0,C.vt)(),this.rotation=(0,O.vt)(),this.scale=(0,C.o8)(C.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}const z="model.gltf",X="model.glb";async function k(e,t){const s=new x(e,t).gltf,n=s.extras.promises;let _=1,o=1,T=null;await Promise.allSettled(n),(0,i.Te)(t.signal);const A=t.jsonSpacing??4,R=new Map,c=JSON.stringify(s,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${o}.png`;return o++,R.set(e,s),e}}switch(t.output?.buffer){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(T)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(T=s);case E.External:default:{const e=`data${_}.bin`;return _++,R.set(e,s),e}}}return s}}),A);return t.output?.buffer===E.GLB||t.output?.image===a.GLB?R.set(X,new r(c,T).buffer):R.set(z,c),R}class W{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}async function K(e,t){const s=new Y,n=new W;return s.addScene(n),n.addNode(new v(e)),await async function(e,t){const s=(await k(e,{output:{buffer:E.GLB,image:a.GLB},jsonSpacing:0,...t})).get(X);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}},51530:(e,t,s)=>{s.d(t,{KB:()=>E,Xi:()=>r,pn:()=>a,x3:()=>_});var n=s(44208),i=s(89192);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.JS.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},89192:(e,t,s)=>{var n,i,r,_,E,a,o,T,A;s.d(t,{Am:()=>_,C7:()=>r,ID:()=>T,JS:()=>A,Mg:()=>a,dd:()=>E,it:()=>i,s2:()=>n,sf:()=>o}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(r||(r={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(_||(_={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(E||(E={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(a||(a={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(o||(o={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(T||(T={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(A||(A={}))},63907:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,N,u,f,h,l,O,S,C,I,L,d,M;s.d(t,{Ab:()=>f,Ac:()=>o,Ap:()=>u,CQ:()=>p,Cj:()=>c,Co:()=>C,H0:()=>h,Hr:()=>M,MT:()=>A,NZ:()=>E,Nm:()=>d,R:()=>I,Tb:()=>_,WR:()=>i,Y7:()=>a,_U:()=>S,dn:()=>r,eA:()=>R,hn:()=>n,ld:()=>l,nI:()=>D,pF:()=>N,pe:()=>T,vt:()=>L,yQ:()=>O}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=5131]="HALF_FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(u||(u={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(S||(S={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(C||(C={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(L||(L={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(d||(d={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,U,B,m,G,P,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(m||(m={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(G||(G={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(P||(P={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8096],{8096:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>K});var n,i=s(74887);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class r{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=r.HEADER_SIZE,this._length+=r.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=_(s.byteLength,4),t&&(this._length+=r.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,r.MAGIC,!0),this._outView.setUint32(4,r.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=_(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,0,i),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}}function _(e,t){return t*Math.ceil(e/t)}r.HEADER_SIZE=12,r.CHUNK_HEADER_SIZE=8,r.MAGIC=1179937895,r.VERSION=2;var E,a,o,T,A,R,c,N,u=s(53966),f=s(91869),h=s(34727),l=s(67026),O=s(82534),S=s(38954),C=s(51850),I=s(80882),L=s(72258);(N=E||(E={}))[N.External=0]="External",N[N.DataURI=1]="DataURI",N[N.GLB=2]="GLB",function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var d=s(63907);class M{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case d.pe.BYTE:return new Int8Array(e,t);case d.pe.FLOAT:return new Float32Array(e,t);case d.pe.SHORT:return new Int16Array(e,t);case d.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case d.pe.UNSIGNED_INT:return new Uint32Array(e,t);case d.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case d.pe.UNSIGNED_BYTE:case d.pe.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case d.pe.BYTE:case d.pe.UNSIGNED_BYTE:return 1;case d.pe.SHORT:case d.pe.UNSIGNED_SHORT:return 2;case d.pe.UNSIGNED_INT:case d.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class D{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new M(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function p(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,S.s)(U,n[t],n[t+1],n[t+2]),a=(0,S.s)(m,n[r],n[r+1],n[r+2]),o=(0,S.s)(G,n[_],n[_+1],n[_+2]),T=(0,S.f)(a,a,E),A=(0,S.f)(o,o,E),R=(0,S.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,S.s)(B,i[e],i[e+1],i[e+2]),(0,S.n)(B,B),i[e]=B[0],i[e+1]=B[1],i[e+2]=B[2]}const U=(0,C.vt)(),m=(0,C.vt)(),G=(0,C.vt)(),B=(0,C.vt)();s(44208);var P=s(49186),g=s(84952);async function F(e,t){const s=w(e);if(null==s)throw new P.A("imageToArrayBuffer","Unsupported image type");const n=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,g.DB)(t)){const e=(0,g.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),r=await new Promise((e=>s.toBlob(e,n)));if((0,i.Te)(t),!r)throw new P.A("imageToArrayBuffer","Failed to encode image");const _=await r.arrayBuffer();return(0,i.Te)(t),{data:_,type:n}}function w(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var b=s(51530);const H=()=>u.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class x{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===E.GLB||t.output.image===a.GLB;s&&(t.binChunkBuffer=new D(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,S.e)(s,C.uY)||(t.translation=(0,C.o8)(s));const n=e.rotation;(0,l.t2)(n,O.zK)||(t.rotation=(0,O.o8)(n));const i=e.scale;(0,S.e)(i,C.Un)||(t.scale=(0,C.o8)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===E.GLB;let n;n=s?t.binChunkBuffer:new D(this.gltf);const i=this.options.origin,r=e.vertexSpace.clone();r.origin=[i.x,i.y,i.z??0];const _=(0,L.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},r,{targetUnit:"meters"});if(!_)return[];(function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&p(s,t)})(e,_),function({position:e,normal:t,tangent:s}){y(e,3),y(t,3),y(s,4)}(_);const{position:a,normal:A,tangent:R}=_,{uv:c,color:N}=e.vertexAttributes,u=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER);let f,h,l,O;A&&(f=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER)),c&&(h=n.addBufferView(d.pe.FLOAT,T.VEC2,o.ARRAY_BUFFER)),R&&(l=n.addBufferView(d.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),N&&(O=n.addBufferView(d.pe.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),u.startAccessor("POSITION"),f&&f.startAccessor("NORMAL"),h&&h.startAccessor("TEXCOORD_0"),l&&l.startAccessor("TANGENT"),O&&O.startAccessor("COLOR_0");const S=_.position.length/3;for(let e=0;e<S;++e)u.push(a[3*e]),u.push(a[3*e+1]),u.push(a[3*e+2]),f&&null!=A&&(f.push(A[3*e]),f.push(A[3*e+1]),f.push(A[3*e+2])),h&&null!=c&&(h.push(c[2*e]),h.push(c[2*e+1])),l&&null!=R&&(l.push(R[4*e]),l.push(R[4*e+1]),l.push(R[4*e+2]),l.push(R[4*e+3])),O&&null!=N&&(O.push(N[4*e]),O.push(N[4*e+1]),O.push(N[4*e+2]),O.push(N[4*e+3]));const C=u.endAccessor(),I=this._addAccessor(u.index,C);let M,U,m,G,B;if(f){const e=f.endAccessor();M=this._addAccessor(f.index,e)}if(h){const e=h.endAccessor();U=this._addAccessor(h.index,e)}if(l){const e=l.endAccessor();m=this._addAccessor(l.index,e)}if(O){const e=O.endAccessor();G=this._addAccessor(O.index,e)}const P=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=n.addBufferView(d.pe.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,P,I,M,U,m,G)):this._addMeshVertexNonIndexed(e.components,P,I,M,U,m,G),u.finalize(),f&&f.finalize(),h&&h.finalize(),l&&l.finalize(),B&&B.finalize(),O&&O.finalize(),s||n.finalize(),P}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof I.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,H().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,h.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,f.tE)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.output.image){case a.GLB:{const e=n.binChunkBuffer.addBufferView(d.pe.UNSIGNED_BYTE,T.SCALAR);if((0,b.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=F(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));n.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case a.DataURI:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=w(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(F(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=d.pF.REPEAT,s=d.pF.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=d.pF.CLAMP_TO_EDGE,s=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT,s=d.pF.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=d.pF.CLAMP_TO_EDGE;break;case"mirror":s=d.pF.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}function y(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}var V=s(4576);class Y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,V.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class v{constructor(e){this.mesh=e,this.name="",this.translation=(0,C.vt)(),this.rotation=(0,O.vt)(),this.scale=(0,C.o8)(C.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}const z="model.gltf",X="model.glb";async function k(e,t){const s=new x(e,t).gltf,n=s.extras.promises;let _=1,o=1,T=null;await Promise.allSettled(n),(0,i.Te)(t.signal);const A=t.jsonSpacing??4,R=new Map,c=JSON.stringify(s,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${o}.png`;return o++,R.set(e,s),e}}switch(t.output?.buffer){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(T)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(T=s);case E.External:default:{const e=`data${_}.bin`;return _++,R.set(e,s),e}}}return s}}),A);return t.output?.buffer===E.GLB||t.output?.image===a.GLB?R.set(X,new r(c,T).buffer):R.set(z,c),R}class W{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}async function K(e,t){const s=new Y,n=new W;return s.addScene(n),n.addNode(new v(e)),await async function(e,t){const s=(await k(e,{output:{buffer:E.GLB,image:a.GLB},jsonSpacing:0,...t})).get(X);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}},51530:(e,t,s)=>{s.d(t,{KB:()=>E,Xi:()=>r,pn:()=>a,x3:()=>_});var n=s(44208),i=s(89192);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.JS.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},89192:(e,t,s)=>{var n,i,r,_,E,a,o,T,A;s.d(t,{Am:()=>_,C7:()=>r,ID:()=>T,JS:()=>A,Mg:()=>a,dd:()=>E,it:()=>i,s2:()=>n,sf:()=>o}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(r||(r={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(_||(_={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(E||(E={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(a||(a={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(o||(o={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(T||(T={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(A||(A={}))},63907:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,N,u,f,h,l,O,S,C,I,L,d,M;s.d(t,{Ab:()=>f,Ac:()=>o,Ap:()=>u,CQ:()=>p,Cj:()=>c,Co:()=>C,H0:()=>h,Hr:()=>M,MT:()=>A,NV:()=>n,NZ:()=>E,Nm:()=>d,R:()=>I,Tb:()=>_,WR:()=>i,Y7:()=>a,_U:()=>S,dn:()=>r,eA:()=>R,ld:()=>l,nI:()=>D,pF:()=>N,pe:()=>T,vt:()=>L,yQ:()=>O}),function(e){e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e[e.COLOR=16384]="COLOR"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=5131]="HALF_FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(u||(u={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(S||(S={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(C||(C={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(L||(L={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(d||(d={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,U,m,G,B,P,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(m||(m={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(B||(B={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(P||(P={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2177],{69540:(e,t,n)=>{n.d(t,{O:()=>c,P:()=>u});var r=n(90237),a=n(69622),i=(n(44208),n(4718)),o=(n(53966),n(97768)),s=n(35666),l=n(88620),d=n(40608);const c=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},a=new Map;for(const e in t){const o=t[e],l=n?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||l!==s.Gr.USER&&l!==s.Gr.DEFAULTS&&l!==s.Gr.WEB_MAP&&l!==s.Gr.WEB_SCENE)continue;const c=this[e];let u=null;u="function"==typeof d?d(c):"reference"===d?c:(0,i.TU)(c),null!=c&&null==u||(l===s.Gr.DEFAULTS?a.set(e,u):r[e]=u)}const d=new(0,Object.getPrototypeOf(this).constructor)(r);if(a.size){const e=(0,l.oY)(d)?.store;if(e)for(const[t,n]of a)e.set(t,n,s.Gr.DEFAULTS)}return d}};return t=(0,r._)([(0,d.$)("esri.core.Clonable")],t),t};let u=class extends(c(a.A)){};u=(0,r._)([(0,d.$)("esri.core.Clonable")],u)},95488:(e,t,n)=>{n.d(t,{I:()=>a});var r=n(11406);class a extends r.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},60999:(e,t,n)=>{n.d(t,{DZ:()=>p,Ke:()=>m,Tj:()=>c,UT:()=>g,jJ:()=>d});var r=n(90237),a=n(69622),i=n(97768),o=n(74887),s=n(10107),l=n(40608);function d(e,t,n){return(0,o.Lx)(e.map(((e,r)=>t.apply(n,[e,r]))))}async function c(e,t,n){return(await(0,o.Lx)(e.map(((e,r)=>t.apply(n,[e,r]))))).map((e=>e.value))}function u(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function m(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return h(e)}}async function p(e){try{return u(await e)}catch(e){return(0,o.QP)(e),h(e)}}function g(e,t){return new y(e,t)}let y=class extends a.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=u(e),this._cleanup()}),(e=>{this._result=h(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,s.MZ)()],y.prototype,"value",null),(0,r._)([(0,s.MZ)()],y.prototype,"error",null),(0,r._)([(0,s.MZ)()],y.prototype,"finished",null),(0,r._)([(0,s.MZ)()],y.prototype,"promise",void 0),(0,r._)([(0,s.MZ)()],y.prototype,"_result",void 0),y=(0,r._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y)},88930:(e,t,n)=>{n.d(t,{S1:()=>s,lL:()=>d,mi:()=>l,t:()=>c,vf:()=>o});var r=n(97770),a=n(56400),i=n(96285);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,n,o=a.qU){const s=new i.oh((0,r.wj)(o)),l=i.c9.fromJSDate(e,{zone:s}),d="decades"===n||"centuries"===n?"year":u(n);return"decades"===n&&(t*=10),"centuries"===n&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,n="milliseconds"){const r=e.getTime(),a=c(t,n,"milliseconds");return new Date(r+a)}function d(e,t,n=a.qU){const o=new i.oh((0,r.wj)(n)),s=i.c9.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:n}=e,r=n-n%("decades"===t?10:100);return e.set({year:r}).toJSDate()}const l=u(t);return s.startOf(l).toJSDate()}function c(e,t,n){return 0===e?0:e*o[t]/o[n]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},59456:(e,t,n)=>{n.d(t,{yR:()=>c});var r=n(56507),a=n(5443),i=n(91075),o=n(48526),s=n(86738),l=n(39829),d=n(82799);n(16930),n(50498),n(65864);const c={base:i.A,key:"type",typeMap:{extent:a.A,multipoint:o.A,point:s.A,polyline:d.A,polygon:l.A}};(0,r.aq)(c)},65806:(e,t,n)=>{n.d(t,{g:()=>o});var r=n(51850),a=n(57251),i=n(9762);function o(e,t,n,r){if((0,a.canProjectWithoutEngine)(e.spatialReference,n)){s[0]=e.x,s[1]=e.y;const a=e.z;return s[2]=a??r??0,(0,i.projectBuffer)(s,e.spatialReference,0,t,n,0,1)}const o=(0,a.tryProjectWithZConversion)(e,n);return!!o&&(t[0]=o?.x,t[1]=o?.y,t[2]=o?.z??r??0,!0)}const s=(0,r.vt)()},27993:(e,t,n)=>{n.d(t,{F:()=>i}),n(57251);var r=n(16930),a=n(65806);function i(e,t,n,r,i){return!(null==t||null==r||e.length<2)&&(o.x=e[0],o.y=e[1],o.z=e[2],o.spatialReference=t,(0,a.g)(o,n,r,i))}const o=function(e,t,n,r){return{x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:r,type:"point"}}(0,0,0,r.A.WGS84)},65864:(e,t,n)=>{n.d(t,{$B:()=>g,Bi:()=>m,Rg:()=>h,U9:()=>c,ZC:()=>d,fT:()=>u,rS:()=>p,xD:()=>T});var r=n(5443),a=n(91075),i=n(48526),o=n(86738),s=n(39829),l=n(82799);function d(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function u(e){return void 0!==e.x&&void 0!==e.y}function h(e){return void 0!==e.paths}function m(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof a.A?e:u(e)?o.A.fromJSON(e):h(e)?l.A.fromJSON(e):m(e)?s.A.fromJSON(e):c(e)?i.A.fromJSON(e):d(e)?r.A.fromJSON(e):null}function g(e){return e?u(e)?"esriGeometryPoint":h(e)?"esriGeometryPolyline":m(e)?"esriGeometryPolygon":d(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const y={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:i.A};function T(e){return e&&y[e]||null}},62577:(e,t,n)=>{function r(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function a(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:n,translate:r}=e,a=n[0]??1,i=n[1]??1;return{originPosition:"lowerLeft",scale:[a,"lowerLeft"===t?i:-i,n[2]??1,n[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function i({scale:e,translate:t},n){return n*e[0]+t[0]}function o({scale:e,translate:t},n){return n*e[1]+t[1]}function s({scale:e,translate:t},n){return(n??0)*e[2]+t[2]}function l({scale:e,translate:t},n){return n?n*e[3]+t[3]:0}function d(e,t){return e&&t?m:e&&!t?u:!e&&t?h:c}n.d(t,{$X:()=>f,Gy:()=>g,P5:()=>S,Q1:()=>a,SW:()=>y,Tr:()=>T,VV:()=>r}),n(65864);const c=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),s=o(e,r[1]);n[0]=[a,s];const{scale:l,originPosition:d}=e,c=l[0],u="lowerLeft"===d?l[1]:-l[1];for(let e=1;e<t.length;e++){const[r,i]=t[e];a+=c*r,s+=u*i,n[e]=[a,s]}return n},u=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),l=o(e,r[1]);n[0]=[a,l,s(e,r[2])];const{scale:d,originPosition:c}=e,u=d[0],h="lowerLeft"===c?d[1]:-d[1];for(let r=1;r<t.length;r++){const[i,o,d]=t[r];a+=u*i,l+=h*o,n[r]=[a,l,s(e,d)]}return n},h=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),s=o(e,r[1]);n[0]=[a,s,l(e,r[2])];const{scale:d,originPosition:c}=e,u=d[0],h="lowerLeft"===c?d[1]:-d[1];for(let r=1;r<t.length;r++){const[i,o,d]=t[r];a+=u*i,s+=h*o,n[r]=[a,s,l(e,d)]}return n},m=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),d=o(e,r[1]);n[0]=[a,d,s(e,r[2]),l(e,r[3])];const{scale:c,originPosition:u}=e,h=c[0],m="lowerLeft"===u?c[1]:-c[1];for(let r=1;r<t.length;r++){const[i,o,c,u]=t[r];a+=h*i,d+=m*o,n[r]=[a,d,s(e,c),l(e,u)]}return n};function p(e,t,n){const r=new Array(n.length);for(let a=0;a<n.length;a++)r[a]=t(e,n[a]);return r}function g(e,t,n){const r=a(e);return t.x=function({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}(r,n.x),t.y=function({scale:e,translate:t},n){return Math.round((n-t[1])/e[1])}(r,n.y),null!=n.z&&(t.z=function({scale:e,translate:t},n){return Math.round(((n??0)-t[2])/e[2])}(r,n.z)),null!=n.m&&(t.m=function({scale:e,translate:t},n){return n?Math.round((n-t[3])/e[3]):0}(r,n.m)),t}function y(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.points=d(r,i)(o,n.points),t.hasZ=r,t.hasM=i}return t}function T(e,t,n,r=null!=n?.z,d=null!=n?.m){if(null==n)return t;const c=a(e);return t.x=i(c,n.x),t.y=o(c,n.y),r&&(t.z=s(c,n.z)),d&&(t.m=l(c,n.m)),t}function f(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.rings=p(o,d(r,i),n.rings),t.hasZ=r,t.hasM=i}return t}function S(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.paths=p(o,d(r,i),n.paths),t.hasZ=r,t.hasM=i}return t}},50498:(e,t,n)=>{n.d(t,{Y:()=>i,g:()=>a});var r=n(66552);const a=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},97770:(e,t,n)=>{n.d(t,{J2:()=>A,Yq:()=>w,_v:()=>y,wj:()=>M});var r=n(66552),a=n(73444),i=n(56400);n(96285),i.n$;const o={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},u={...c,second:"numeric"},h={hourCycle:"h23"},m={...c,...h},p={...u,...h},g={"short-date":o,"short-date-short-time":{...o,...c},"short-date-short-time-24":{...o,...m},"short-date-long-time":{...o,...u},"short-date-long-time-24":{...o,...p},"short-date-le":o,"short-date-le-short-time":{...o,...c},"short-date-le-short-time-24":{...o,...m},"short-date-le-long-time":{...o,...u},"short-date-le-long-time-24":{...o,...p},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...c},"long-month-day-year-short-time-24":{...s,...m},"long-month-day-year-long-time":{...s,...u},"long-month-day-year-long-time-24":{...s,...p},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...c},"day-short-month-year-short-time-24":{...l,...m},"day-short-month-year-long-time":{...l,...u},"day-short-month-year-long-time-24":{...l,...p},"long-date":d,"long-date-short-time":{...d,...c},"long-date-short-time-24":{...d,...m},"long-date-long-time":{...d,...u},"long-date-long-time-24":{...d,...p},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":u},y=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),T={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const S=g["short-date-short-time"];function A(e){return g[e]}function w(e,t=S){return function(e){let t=f.get(e);if(!t){const n=(0,a.JK)(),r=T[n]||n,o=M(e.timeZone??i.qU),s={...e,timeZone:o};t=new Intl.DateTimeFormat(r,s),f.set(e,t)}return t}(t).format(e)}function M(e){switch(e){case i.qU:return i.N5;case i.L5:return i.n$;default:return e}}(0,a.Ml)((()=>{f=new WeakMap}))},73444:(e,t,n)=>{n.d(t,{JK:()=>s,Ml:()=>h,Z0:()=>l,oQ:()=>c});var r=n(36563);let a;const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return i??globalThis.navigator?.language??"en"}function s(){return void 0===a&&(a=o()),a}function l(e=s()){const t=/^([a-zA-Z]{2,3})(?:[_-][a-zA-Z0-9]+)*$/.exec(e);return t?.[1].toLowerCase()}const d=[];function c(e){return d.push(e),(0,r.hA)((()=>d.splice(d.indexOf(e),1)))}const u=[];function h(e){return u.push(e),(0,r.hA)((()=>u.splice(u.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=o();a!==e&&([...u].forEach((t=>t(e))),a=e,[...d].forEach((t=>t(e))))}))},43334:(e,t,n)=>{n.d(t,{N3:()=>i,Om:()=>a});var r=n(92722);class a{constructor(e=null,t={},n,r){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const n=e.geometry?r.A.fromJSON(e.geometry):null,i=e.centroid?r.A.fromJSON(e.centroid):null,o=e.attributes[t];return new a(n,e.attributes,i,o)}weakClone(){const e=new a(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new a(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(e=[],t=[],n=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=n}static fromJSON(e){return new r(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,n,a,i]=e,o=a-t,s=i-n;return new r([5],[t,n,o,0,0,s,-o,0,0,-s])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;for(const e of n){for(let n=1;n<e;n++)t[2*(r+n)]+=t[2*(r+n)-2],t[2*(r+n)+1]+=t[2*(r+n)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),n=this.coords.slice(0,t);return e?(e.set(n),new r(this.lengths,e,this.hasIndeterminateRingOrder)):new r(Array.from(this.lengths),Array.from(n),this.hasIndeterminateRingOrder)}}},20437:(e,t,n)=>{n.d(t,{A:()=>y});var r,a=n(90237),i=n(66552),o=n(25482),s=n(10107),l=n(56507),d=(n(87811),n(44208),n(93223)),c=n(36005),u=n(40608),h=n(72088),m=n(98453);const p=new i.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let g=r=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?p.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),(0,a._)([(0,s.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),(0,a._)([(0,s.MZ)()],g.prototype,"description",void 0),(0,a._)([(0,c.w)("description")],g.prototype,"readDescription",null),(0,a._)([(0,s.MZ)({types:h.gK,json:{read:{reader:h.rS},write:!0}})],g.prototype,"domain",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),(0,a._)([(0,s.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],g.prototype,"length",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"name",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),(0,a._)([(0,d.e)(m.m)],g.prototype,"type",void 0),(0,a._)([(0,s.MZ)()],g.prototype,"valueType",void 0),(0,a._)([(0,c.w)("valueType",["description"])],g.prototype,"readValueType",null),(0,a._)([(0,s.MZ)({type:Boolean,json:{read:!1}})],g.prototype,"visible",void 0),g=r=(0,a._)([(0,u.$)("esri.layers.support.Field")],g);const y=g},72088:(e,t,n)=>{n.d(t,{rS:()=>v,gK:()=>b}),n(44208);var r,a=n(90237),i=n(4718),o=n(10107),s=(n(53966),n(93223)),l=n(40608),d=n(25482);n(87811);let c=r=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,a._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,a._)([(0,l.$)("esri.layers.support.CodedValue")],c);const u=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,a._)([(0,s.e)(u)],h.prototype,"type",void 0),h=(0,a._)([(0,l.$)("esri.layers.support.Domain")],h);const m=h;var p;let g=p=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new p({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,a._)([(0,o.MZ)({type:[c],json:{write:!0}})],g.prototype,"codedValues",void 0),(0,a._)([(0,s.e)({codedValue:"coded-value"})],g.prototype,"type",void 0),g=p=(0,a._)([(0,l.$)("esri.layers.support.CodedValueDomain")],g);const y=g;var T;n(49186);let f=T=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new T}};(0,a._)([(0,s.e)({inherited:"inherited"})],f.prototype,"type",void 0),f=T=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],f);const S=f;var A;let w=A=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new A({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,o.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,n){t[n]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,a._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,a._)([(0,s.e)({range:"range"})],w.prototype,"type",void 0),w=A=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const M=w,b={key:"type",base:m,typeMap:{range:w,"coded-value":y,inherited:S}};function v(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return S.fromJSON(e)}return null}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},58501:(e,t,n)=>{n.d(t,{q:()=>a});var r=n(62815);function a(e,t,n){if(!n?.features||!n.hasZ)return;const a=(0,r.N)(n.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of n.features)a(e.geometry)}},79677:(e,t,n)=>{n.d(t,{A:()=>m});var r,a=n(90237),i=n(25482),o=n(88930),s=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),d=n(40608),c=n(43937),u=n(56400);let h=r=class extends i.oY{static get allTime(){return p}static get empty(){return g}static fromArray(e){return new r({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(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,a=e.end?.getTime()??e.end;return t===r&&n===a}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,e,t));let a=this.end;if(a){const n=(0,o.lL)(a,e,t);a=a.getTime()===n.getTime()?n:(0,o.S1)(n,1,e,t)}return new r({start:n,end:a})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,a=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let o,s;return a>=t&&a<=n?o=a:t>=a&&t<=i&&(o=t),n>=a&&n<=i?s=n:i>=t&&i<=n&&(s=i),null==o||null==s||isNaN(o)||isNaN(s)?r.empty:new r({start:o===-1/0?null:new Date(o),end:s===1/0?null:new Date(s)})}offset(e,t,n=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const a=new r,{start:i,end:s}=this;return null!=i&&(a.start=(0,o.S1)(i,e,t,n)),null!=s&&(a.end=(0,o.S1)(s,e,t,n)),a}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,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,a._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,a._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,a._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,a._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=r=(0,a._)([(0,d.$)("esri.time.TimeExtent")],h);const m=h,p=new h,g=new h({start:void 0,end:void 0})},56400:(e,t,n)=>{n.d(t,{ZS:()=>c,qU:()=>i,N5:()=>l,P6:()=>d,L5:()=>o,n$:()=>s});const r=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var a=n(96285);const i="system",o="unknown",s="UTC",l=Intl.DateTimeFormat().resolvedOptions().timeZone;function d(e,t=!1){return{json:{read:{source:e,reader:(t,n)=>n[e]?c(n[e]):null},write:!!t&&{allowNull:!0,writer(t,n){n[e]=t?function(e){return{timeZoneIANA:e}}(t):null}}}}}function c(e,t=i){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,t=i){if(!e||!r.has(e.timeZone))return t;const n=r.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?n:function(e){const t=a.c9.local().setZone(e),n=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===n?"Etc/UTC":`Etc/GMT${a.mQ.instance(-n).formatOffset(0,"narrow")}`}(n)}(e,t):t}},76929:(e,t,n)=>{n.r(t),n.d(t,{default:()=>C});var r=n(90237),a=(n(59456),n(69622)),i=n(60999),o=n(74887),s=(n(53966),n(44208),n(87811),n(49186)),l=n(40608),d=n(61956),c=n(19419),u=n(80893),h=n(51624),m=n(62577),p=n(53655);class g{constructor(e){const t=new h.A(new Uint8Array(e),new DataView(e));this._index=function(e){for(;e.next();){if(2===e.tag())return y(e.getMessage());e.skip()}f()}(t),this._reader=t}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}fieldIndex(e){return this._index.fields.find((t=>t.name===e))?.index??-1}readAttribute(e,t){const{featureCount:n,_index:r}=this;if(e<0||e>=n)return;const a=r.fields.length;if(e<0||t>=a)return;const i=r.attributeIndices[e*a+t],o=this._reader;return o.move(i),function(e){const t=e.getLength(),n=e.pos()+t;for(;e.pos()<n&&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}(o)}readAllCoordinates(e,t=0){const n=this._reader,{transform:r}=this._index,{scale:a,translate:i}=r,[o,s,l]=a,[d,c,u]=i;for(const r of this._index.featureIndices){n.move(r);const a=n.getLength(),i=n.pos()+a;for(;n.pos()<i&&n.next();)switch(n.tag()){case 2:{const r=n.getLength(),a=n.pos()+r;for(;n.pos()<a&&n.next();)3===n.tag()?(n.getUInt32(),e[t++]=d+o*n.getSInt64(),e[t++]=c+s*n.getSInt64(),e[t++]=u+l*n.getSInt64()):n.skip();break}default:n.skip()}}return t}}function y(e){for(;e.next();){if(1===e.tag())return T(e.getMessage());e.skip()}f()}function T(e){let t,n=!1,r=!1,a=0;const i=new Array,o=new Array,s=new Array;for(;e.next();)switch(e.tag()){case 7:0!==e.getEnum()&&f();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,m.Q1)(e.processMessage(p.ae));break;case 13:{const t=e.processMessage(p.cn);t.index=a++,i.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),n=e.pos()+t;for(;e.pos()<n&&e.next();)1===e.tag()?(s.push(e.pos()),e.skip()):e.skip();break}case 10:r=e.getBool()??!1;break;default:e.skip()}return null!=t&&r||f(),{transform:t,exceededTransferLimit:n,fields:i,featureIndices:o,attributeIndices:s}}function f(){const e=new s.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}class S{constructor(e,t){this.descriptor=e,this.pages=t}}class A{constructor(e,t,n,r,a){this.spatialReference=e,this.url=n,this.objectIdField=r,this.capabilities=a;const{supportsMaxRecordCountFactor:i,maxRecordCount:o}=this.capabilities.query,s=o??8e3,l=(i?4:null)??1,d=s*l;this._pageSize=Math.min(8e3,d);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=l,c.num=s,c.outFields=[r],this._baseQuery=c}async fetch(e,t){const{spatialReference:n}=this,r=(0,c.w1)(e.extent,n),a=this._baseQuery.clone();a.geometry=r;const i=new Array;let s=0,l=!1,d=1;for(;!l;){const e=[];for(let n=0;n<d;++n)e.push(this._fetchPage(a,s++,t));const n=await Promise.all(e);(0,o.Te)(t);for(const e of n){const t=0!==e.featureCount;l||=!e.exceededTransferLimit||!t,t&&i.push(e)}d=Math.min(d+1,4)}return new S(e,i)}async _fetchPage(e,t,n){const r=e.clone();r.start=t*this._pageSize;const a=(await(0,u.kS)(this.url,r,{signal:n})).data;return(0,o.Te)(n),new g(a)}}var w=n(51850),M=n(9762),b=n(27993);class v{constructor(e,t,n){this.objectIdField=e,this.spatialReference=t,this.renderSpatialReference=n}process(e){const{pages:t}=e;if(0===t.length)return null;const n=t.reduce(((e,{featureCount:t})=>e+t),0);if(0===n)return null;const r=this.objectIdField,a=this.spatialReference,i=this.renderSpatialReference,o=new Float64Array(3*n),s=new Uint32Array(n);let l=0;for(const e of t){l=e.readAllCoordinates(o,l);const t=e.fieldIndex(r);if(t<0)throw new Error("Failed to find object id field");for(let r=0;r<n;++r)s[r]=e.readAttribute(r,t)}const d=new Float64Array(o.length);if(!(0,M.projectBuffer)(o,a,0,d,i,0,n))throw new Error("Failed to project coordinates");const u=e.descriptor.extent,h=(0,c.gX)(u),m=(0,w.vt)();(0,b.F)([h[0],h[1],0],a,m,i);const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=e;const g=new Uint32Array(n);for(let e=0;e<n;++e)g[e]=0;return{coordinates:d,indicesCoordinates:p,indicesShared:g,objectIds:s,tileId:e.descriptor.id,localOrigin:m}}}var _=n(16930);let E=class extends a.A{constructor(){super(...arguments),this.remoteClient=null,this._pendingTiles=new Map,this._loadedTiles=new Map,this._processor=null,this._fetcher=null}destroy(){for(const e of this._pendingTiles.values())e.abort();this._pendingTiles.clear(),this._loadedTiles.clear()}setup({spatialReference:e,renderSpatialReference:t,baseQuery:n,url:r,objectIdField:a,capabilities:i}){const o=_.A.fromJSON(e);this._fetcher=new A(o,d.A.fromJSON(n),r,a,i),this._processor=new v(a,o,_.A.fromJSON(t))}async onTileTreeChange(e){const{added:t,removed:n}=e;for(const e of n){this._loadedTiles.delete(e);const t=this._pendingTiles.get(e);t?.abort(),this._pendingTiles.delete(e)}for(const e of t){const t=this._pendingTiles.get(e.id);t?.abort(),this._pendingTiles.set(e.id,(0,i.UT)((t=>this._addTile(e,t))))}if(n.length>0){const e={tileIds:n};await this.remoteClient.invoke("onRemoveTiles",e)}}async _addTile(e,t){const n=await this._fetcher.fetch(e,t);(0,o.Te)(t);const r=this._processor.process(n);if(null==r)return void this._pendingTiles.delete(e.id);const{coordinates:a,objectIds:i,indicesCoordinates:s,indicesShared:l}=r;await this.remoteClient.invoke("onAddTile",r,{signal:t,transferList:[a.buffer,i.buffer,s.buffer,l.buffer]}),this._pendingTiles.delete(e.id),this._loadedTiles.set(e.id,n)}};E=(0,r._)([(0,l.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],E);const C=E}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const d="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),d=P(e.layers,o.layers,t),c=P(e.tables,o.tables,t);e.layers=d.itemResources,e.tables=c.itemResources;const y=[...d.added,...c.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),d=t(26121);async function c(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,d.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=t.portalItem,d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(d),await(o?.(u,d)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(d),await(o?.(u,d)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);c(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return c(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function d(e){e.type||="Table"}function c(e){e.layers?.forEach(u),e.tables?.forEach(d)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(4850),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(893),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(2469)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(6493),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(4850),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const d="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),d=P(e.layers,o.layers,t),c=P(e.tables,o.tables,t);e.layers=d.itemResources,e.tables=c.itemResources;const y=[...d.added,...c.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),d=t(26121);async function c(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,d.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=t.portalItem,d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(d),await(o?.(u,d)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(d),await(o?.(u,d)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);c(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return c(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function d(e){e.type||="Table"}function c(e){e.layers?.forEach(u),e.tables?.forEach(d)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(7016),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(620),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(6493),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(7016),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(4850),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(893),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(2469)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(6493),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(4850),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(7016),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(620),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6493),t.e(1363),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(6493),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(7016),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9949],{6774:(_,t,i)=>{var s,E,T;i.d(t,{O3:()=>A,Ox:()=>h,bR:()=>R,dC:()=>s}),(T=s||(s={}))[T.Unknown=0]="Unknown",T[T.Point=1]="Point",T[T.LineString=2]="LineString",T[T.Polygon=3]="Polygon";class R{constructor(_,t){this.x=_,this.y=t}clone(){return new R(this.x,this.y)}equals(_,t){return _===this.x&&t===this.y}isEqual(_){return _.x===this.x&&_.y===this.y}setCoords(_,t){return this.x=_,this.y=t,this}normalize(){const _=this.x,t=this.y,i=Math.sqrt(_*_+t*t);return this.x/=i,this.y/=i,this}rightPerpendicular(){const _=this.x;return this.x=this.y,this.y=-_,this}leftPerpendicular(){const _=this.x;return this.x=-this.y,this.y=_,this}move(_,t){return this.x+=_,this.y+=t,this}assign(_){return this.x=_.x,this.y=_.y,this}assignAdd(_,t){return this.x=_.x+t.x,this.y=_.y+t.y,this}assignSub(_,t){return this.x=_.x-t.x,this.y=_.y-t.y,this}rotate(_,t){const i=this.x,s=this.y;return this.x=i*_-s*t,this.y=i*t+s*_,this}scale(_){return this.x*=_,this.y*=_,this}length(){const _=this.x,t=this.y;return Math.sqrt(_*_+t*t)}sub(_){return this.x-=_.x,this.y-=_.y,this}add(_){return this.x+=_.x,this.y+=_.y,this}static distance(_,t){const i=t.x-_.x,s=t.y-_.y;return Math.sqrt(i*i+s*s)}static add(_,t){return new R(_.x+t.x,_.y+t.y)}static sub(_,t){return new R(_.x-t.x,_.y-t.y)}}class n{constructor(_,t,i){this.ratio=_,this.x=t,this.y=i}}class A{constructor(_,t,i,s=8,E=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=E,this._tileSize=512*s,this._dz=_,this._yPos=t,this._xPos=i}setPixelMargin(_){_!==this._pixelMargin&&(this._pixelMargin=_,this.setExtent(this._extent))}setExtent(_){this._extent=_,this._finalRatio=this._tileSize/_*(1<<this._dz);let t=this._pixelRatio*this._pixelMargin;t/=this._finalRatio;const i=_>>this._dz;t>i&&(t=i),this._margin=t,this._xmin=i*this._xPos-t,this._ymin=i*this._yPos-t,this._xmax=this._xmin+i+2*t,this._ymax=this._ymin+i+2*t}reset(_){this._type=_,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(_,t){this._pushLine(),this._prevIsIn=this._isIn(_,t),this._moveTo(_,t,this._prevIsIn),this._prevPt=new R(_,t),this._firstPt=new R(_,t),this._dist=0}lineTo(_,t){const i=this._isIn(_,t),s=new R(_,t),E=R.distance(this._prevPt,s);let T,A,h,e,N,S,C,I;if(i)this._prevIsIn?this._lineTo(_,t,!0):(T=this._prevPt,A=s,h=this._intersect(A,T),this._start=this._dist+E*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(A.x,A.y,!0));else if(this._prevIsIn)A=this._prevPt,T=s,h=this._intersect(A,T),this._lineTo(h.x,h.y,!0),this._lineTo(T.x,T.y,!1);else{const _=this._prevPt,t=s;if(_.x<=this._xmin&&t.x<=this._xmin||_.x>=this._xmax&&t.x>=this._xmax||_.y<=this._ymin&&t.y<=this._ymin||_.y>=this._ymax&&t.y>=this._ymax)this._lineTo(t.x,t.y,!1);else{const i=[];if((_.x<this._xmin&&t.x>this._xmin||_.x>this._xmin&&t.x<this._xmin)&&(e=(this._xmin-_.x)/(t.x-_.x),I=_.y+e*(t.y-_.y),I<=this._ymin?S=!1:I>=this._ymax?S=!0:i.push(new n(e,this._xmin,I))),(_.x<this._xmax&&t.x>this._xmax||_.x>this._xmax&&t.x<this._xmax)&&(e=(this._xmax-_.x)/(t.x-_.x),I=_.y+e*(t.y-_.y),I<=this._ymin?S=!1:I>=this._ymax?S=!0:i.push(new n(e,this._xmax,I))),(_.y<this._ymin&&t.y>this._ymin||_.y>this._ymin&&t.y<this._ymin)&&(e=(this._ymin-_.y)/(t.y-_.y),C=_.x+e*(t.x-_.x),C<=this._xmin?N=!1:C>=this._xmax?N=!0:i.push(new n(e,C,this._ymin))),(_.y<this._ymax&&t.y>this._ymax||_.y>this._ymax&&t.y<this._ymax)&&(e=(this._ymax-_.y)/(t.y-_.y),C=_.x+e*(t.x-_.x),C<=this._xmin?N=!1:C>=this._xmax?N=!0:i.push(new n(e,C,this._ymax))),0===i.length)N?S?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):S?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+E*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+E*i[0].ratio;for(let _=0;_<i.length;_++)this._lineTo(i[_].x,i[_].y,!0)}this._lineTo(t.x,t.y,!1)}}this._dist+=E,this._prevIsIn=i,this._prevPt=s}close(){if(this._line.length>2){const _=this._firstPt,t=this._prevPt;_.x===t.x&&_.y===t.y||this.lineTo(_.x,_.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(_=!0){return this._pushLine(),0===this._lines.length?null:(this._type===s.Polygon&&_&&e.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==s.LineString)throw new Error("Only valid for lines");this._pushLine();const _=this._lines,t=_.length;if(0===t)return null;const i=[];for(let s=0;s<t;s++)i.push({line:_[s],start:this._starts[s]||0});return i}_isIn(_,t){return _>=this._xmin&&_<=this._xmax&&t>=this._ymin&&t<=this._ymax}_intersect(_,t){let i,s,E;if(t.x>=this._xmin&&t.x<=this._xmax)s=t.y<=this._ymin?this._ymin:this._ymax,E=(s-_.y)/(t.y-_.y),i=_.x+E*(t.x-_.x);else if(t.y>=this._ymin&&t.y<=this._ymax)i=t.x<=this._xmin?this._xmin:this._xmax,E=(i-_.x)/(t.x-_.x),s=_.y+E*(t.y-_.y);else{s=t.y<=this._ymin?this._ymin:this._ymax,i=t.x<=this._xmin?this._xmin:this._xmax;const T=(i-_.x)/(t.x-_.x),R=(s-_.y)/(t.y-_.y);T<R?(E=T,s=_.y+T*(t.y-_.y)):(E=R,i=_.x+R*(t.x-_.x))}return this._r=E,new R(i,s)}_pushLine(){this._line&&(this._type===s.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(_,t,i){this._type!==s.Polygon?i&&(_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.push(new R(_,t))):(i||(_<this._xmin&&(_=this._xmin),_>this._xmax&&(_=this._xmax),t<this._ymin&&(t=this._ymin),t>this._ymax&&(t=this._ymax)),_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.push(new R(_,t)),this._isH=!1,this._isV=!1)}_lineTo(_,t,i){let E,T;if(this._type!==s.Polygon)if(i){if(_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(E=this._line[this._line.length-1],E.equals(_,t)))return;this._line.push(new R(_,t))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(_<this._xmin&&(_=this._xmin),_>this._xmax&&(_=this._xmax),t<this._ymin&&(t=this._ymin),t>this._ymax&&(t=this._ymax)),_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){E=this._line[this._line.length-1];const i=E.x===_,s=E.y===t;if(i&&s)return;this._isH&&i||this._isV&&s?(E.x=_,E.y=t,T=this._line[this._line.length-2],T.x===_&&T.y===t?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(T=this._line[this._line.length-2],this._isH=T.x===_,this._isV=T.y===t)):(this._isH=T.x===_,this._isV=T.y===t)):(this._line.push(new R(_,t)),this._isH=i,this._isV=s)}else this._line.push(new R(_,t))}}class h{setExtent(_){this._ratio=4096===_?1:4096/_}get validateTessellation(){return this._ratio<1}reset(_){this._lines=[],this._line=null}moveTo(_,t){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new R(_*i,t*i))}lineTo(_,t){const i=this._ratio;this._line.push(new R(_*i,t*i))}close(){const _=this._line;_&&!_[0].isEqual(_[_.length-1])&&_.push(_[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}!function(_){_[_.sideLeft=0]="sideLeft",_[_.sideRight=1]="sideRight",_[_.sideTop=2]="sideTop",_[_.sideBottom=3]="sideBottom"}(E||(E={}));class e{static simplify(_,t,i){if(!i)return;const s=-t,T=_+t,R=-t,n=_+t,A=[],h=[],N=i.length;for(let _=0;_<N;++_){const t=i[_];if(!t||t.length<2)continue;let e,N=t[0];const S=t.length;for(let i=1;i<S;++i)e=t[i],N.x===e.x&&(N.x<=s&&(N.y>e.y?(A.push(_),A.push(i),A.push(E.sideLeft),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideLeft),h.push(-1))),N.x>=T&&(N.y<e.y?(A.push(_),A.push(i),A.push(E.sideRight),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideRight),h.push(-1)))),N.y===e.y&&(N.y<=R&&(N.x<e.x?(A.push(_),A.push(i),A.push(E.sideTop),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideTop),h.push(-1))),N.y>=n&&(N.x>e.x?(A.push(_),A.push(i),A.push(E.sideBottom),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideBottom),h.push(-1)))),N=e}if(0===A.length||0===h.length)return;e.fillParent(i,h,A),e.fillParent(i,A,h);const S=[];e.calcDeltas(S,h,A),e.calcDeltas(S,A,h),e.addDeltas(S,i)}static fillParent(_,t,i){const s=i.length,T=t.length;for(let R=0;R<T;R+=4){const T=t[R],n=t[R+1],A=t[R+2],h=_[T][n-1],e=_[T][n];let S=8092,C=-1;for(let t=0;t<s;t+=4){if(i[t+2]!==A)continue;const s=i[t],T=i[t+1],R=_[s][T-1],n=_[s][T];switch(A){case E.sideLeft:case E.sideRight:if(N(h.y,R.y,n.y)&&N(e.y,R.y,n.y)){const _=Math.abs(n.y-R.y);_<S&&(S=_,C=t)}break;case E.sideTop:case E.sideBottom:if(N(h.x,R.x,n.x)&&N(e.x,R.x,n.x)){const _=Math.abs(n.x-R.x);_<S&&(S=_,C=t)}}}t[R+3]=C}}static calcDeltas(_,t,i){const s=t.length;for(let E=0;E<s;E+=4){const s=[],T=e.calcDelta(E,t,i,s);_.push(t[E]),_.push(t[E+1]),_.push(t[E+2]),_.push(T)}}static calcDelta(_,t,i,s){const E=t[_+3];if(-1===E)return 0;const T=s.length;return T>1&&s[T-2]===E?0:(s.push(E),e.calcDelta(E,i,t,s)+1)}static addDeltas(_,t){const i=_.length;let s=0;for(let t=0;t<i;t+=4){const i=_[t+3];i>s&&(s=i)}for(let T=0;T<i;T+=4){const i=t[_[T]],R=_[T+1],n=s-_[T+3];switch(_[T+2]){case E.sideLeft:i[R-1].x-=n,i[R].x-=n,1===R&&(i[i.length-1].x-=n),R===i.length-1&&(i[0].x-=n);break;case E.sideRight:i[R-1].x+=n,i[R].x+=n,1===R&&(i[i.length-1].x+=n),R===i.length-1&&(i[0].x+=n);break;case E.sideTop:i[R-1].y-=n,i[R].y-=n,1===R&&(i[i.length-1].y-=n),R===i.length-1&&(i[0].y-=n);break;case E.sideBottom:i[R-1].y+=n,i[R].y+=n,1===R&&(i[i.length-1].y+=n),R===i.length-1&&(i[0].y+=n)}}}}const N=(_,t,i)=>_>=t&&_<=i||_>=i&&_<=t},13195:(_,t,i)=>{i.d(t,{GW:()=>r,IU:()=>L,Jo:()=>R,MG:()=>T,Wh:()=>S,cP:()=>P,os:()=>e,p6:()=>O,pJ:()=>n,ru:()=>D,s3:()=>M,wV:()=>I,yM:()=>a,z0:()=>C});var s=i(95108),E=i(6774);const T=Number.POSITIVE_INFINITY,R=Math.PI,n=2*R,A=128/R,h=256/360,e=R/180,N=1/Math.LN2;function S(_,t){return(_%=t)>=0?_:_+t}function C(_){return S(_*A,256)}function I(_){return S(_*h,256)}function O(_){return Math.log(_)*N}function r(_,t,i){return _*(1-i)+t*i}const l=8,o=14,x=16;function L(_){return l+Math.max((_-o)*x,0)}function M(_,t,i){let s,E,T,R=0;for(const n of i){s=n.length;for(let i=1;i<s;++i)E=n[i-1],T=n[i],E.y>t!=T.y>t&&((T.x-E.x)*(t-E.y)-(T.y-E.y)*(_-E.x)>0?R++:R--)}return 0!==R}function D(_,t,i,E){let T,R,n,A;const h=E*E;for(const E of i){const i=E.length;if(!(i<2)){T=E[0].x,R=E[0].y;for(let e=1;e<i;++e){if(n=E[e].x,A=E[e].y,(0,s.Ng)(_,t,T,R,n,A)<h)return!0;T=n,R=A}}}return!1}function P(_,t){if(0===t||Number.isNaN(t))return _;const i=[],s=new E.bR(0,0),T=new E.bR(0,0),R=new E.bR(0,0);for(let n=0;n<_.length;n++){const A=_[n],h=[];for(let _=0;_<A.length;_++){const i=A[_-1],n=A[_],e=A[_+1];0===_?s.setCoords(0,0):s.assignSub(n,i).normalize().rightPerpendicular(),_===A.length-1?T.setCoords(0,0):T.assignSub(e,n).normalize().rightPerpendicular(),R.assignAdd(s,T).normalize();const N=R.x*T.x+R.y*T.y;0!==N&&R.scale(1/N),h.push(E.bR.add(n,R.scale(t)))}i.push(h)}return i}function a(_,t,i,s){const T=new E.bR(_[0],_[1]);if(T.scale(s),"viewport"===t){const _=-i*(Math.PI/180),t=Math.cos(_),s=Math.sin(_);T.rotate(t,s)}return T}},76213:(_,t,i)=>{i.d(t,{CQ:()=>s,DY:()=>E,GR:()=>I,Gh:()=>A,TB:()=>C,_M:()=>h,cp:()=>O,dV:()=>R,eG:()=>T,fq:()=>S,hM:()=>N,ie:()=>e});const s=512,E=29,T=24;var R,n;(n=R||(R={}))[n.FilterFlags=0]="FilterFlags",n[n.Animation=1]="Animation",n[n.GPGPU=2]="GPGPU",n[n.VV=3]="VV",n[n.DD0=4]="DD0",n[n.DD1=5]="DD1",n[n.DD2=6]="DD2",n[n.LocalTimeOrigin=7]="LocalTimeOrigin";const A=1.05,h=3,e=3,N=2,S=10,C=256,I=32,O=512},63907:(_,t,i)=>{var s,E,T,R,n,A,h,e,N,S,C,I,O,r,l,o,x,L,M,D,P,a,G;i.d(t,{Ab:()=>r,Ac:()=>h,Ap:()=>O,CQ:()=>U,Cj:()=>C,Co:()=>M,H0:()=>l,Hr:()=>G,MT:()=>N,NZ:()=>n,Nm:()=>a,R:()=>D,Tb:()=>R,WR:()=>E,Y7:()=>A,_U:()=>L,dn:()=>T,eA:()=>S,hn:()=>s,ld:()=>o,nI:()=>y,pF:()=>I,pe:()=>e,vt:()=>P,yQ:()=>x}),function(_){_[_.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",_[_.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",_[_.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(s||(s={})),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"}(E||(E={})),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"}(T||(T={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(R||(R={})),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"}(n||(n={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(A||(A={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(h||(h={})),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"}(e||(e={})),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"}(N||(N={})),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"}(S||(S={})),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"}(C||(C={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(I||(I={})),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"}(O||(O={})),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"}(r||(r={})),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"}(l||(l={})),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"}(o||(o={})),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"}(x||(x={})),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"}(L||(L={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(M||(M={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(D||(D={})),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"}(P||(P={})),function(_){_[_.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",_[_.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",_[_.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",_[_.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",_[_.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",_[_.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",_[_.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",_[_.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",_[_.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",_[_.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",_[_.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",_[_.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",_[_.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",_[_.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",_[_.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",_[_.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(a||(a={})),function(_){_[_.NONE=0]="NONE",_[_.BACK=1029]="BACK"}(G||(G={}));const y=33306;var U,u,B,c,F,m,f;!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"}(U||(U={})),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"}(u||(u={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(c||(c={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(F||(F={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(m||(m={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(f||(f={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9949],{6774:(_,t,i)=>{var s,E,T;i.d(t,{O3:()=>A,Ox:()=>h,bR:()=>R,dC:()=>s}),(T=s||(s={}))[T.Unknown=0]="Unknown",T[T.Point=1]="Point",T[T.LineString=2]="LineString",T[T.Polygon=3]="Polygon";class R{constructor(_,t){this.x=_,this.y=t}clone(){return new R(this.x,this.y)}equals(_,t){return _===this.x&&t===this.y}isEqual(_){return _.x===this.x&&_.y===this.y}setCoords(_,t){return this.x=_,this.y=t,this}normalize(){const _=this.x,t=this.y,i=Math.sqrt(_*_+t*t);return this.x/=i,this.y/=i,this}rightPerpendicular(){const _=this.x;return this.x=this.y,this.y=-_,this}leftPerpendicular(){const _=this.x;return this.x=-this.y,this.y=_,this}move(_,t){return this.x+=_,this.y+=t,this}assign(_){return this.x=_.x,this.y=_.y,this}assignAdd(_,t){return this.x=_.x+t.x,this.y=_.y+t.y,this}assignSub(_,t){return this.x=_.x-t.x,this.y=_.y-t.y,this}rotate(_,t){const i=this.x,s=this.y;return this.x=i*_-s*t,this.y=i*t+s*_,this}scale(_){return this.x*=_,this.y*=_,this}length(){const _=this.x,t=this.y;return Math.sqrt(_*_+t*t)}sub(_){return this.x-=_.x,this.y-=_.y,this}add(_){return this.x+=_.x,this.y+=_.y,this}static distance(_,t){const i=t.x-_.x,s=t.y-_.y;return Math.sqrt(i*i+s*s)}static add(_,t){return new R(_.x+t.x,_.y+t.y)}static sub(_,t){return new R(_.x-t.x,_.y-t.y)}}class n{constructor(_,t,i){this.ratio=_,this.x=t,this.y=i}}class A{constructor(_,t,i,s=8,E=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=E,this._tileSize=512*s,this._dz=_,this._yPos=t,this._xPos=i}setPixelMargin(_){_!==this._pixelMargin&&(this._pixelMargin=_,this.setExtent(this._extent))}setExtent(_){this._extent=_,this._finalRatio=this._tileSize/_*(1<<this._dz);let t=this._pixelRatio*this._pixelMargin;t/=this._finalRatio;const i=_>>this._dz;t>i&&(t=i),this._margin=t,this._xmin=i*this._xPos-t,this._ymin=i*this._yPos-t,this._xmax=this._xmin+i+2*t,this._ymax=this._ymin+i+2*t}reset(_){this._type=_,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(_,t){this._pushLine(),this._prevIsIn=this._isIn(_,t),this._moveTo(_,t,this._prevIsIn),this._prevPt=new R(_,t),this._firstPt=new R(_,t),this._dist=0}lineTo(_,t){const i=this._isIn(_,t),s=new R(_,t),E=R.distance(this._prevPt,s);let T,A,h,e,N,S,C,I;if(i)this._prevIsIn?this._lineTo(_,t,!0):(T=this._prevPt,A=s,h=this._intersect(A,T),this._start=this._dist+E*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(A.x,A.y,!0));else if(this._prevIsIn)A=this._prevPt,T=s,h=this._intersect(A,T),this._lineTo(h.x,h.y,!0),this._lineTo(T.x,T.y,!1);else{const _=this._prevPt,t=s;if(_.x<=this._xmin&&t.x<=this._xmin||_.x>=this._xmax&&t.x>=this._xmax||_.y<=this._ymin&&t.y<=this._ymin||_.y>=this._ymax&&t.y>=this._ymax)this._lineTo(t.x,t.y,!1);else{const i=[];if((_.x<this._xmin&&t.x>this._xmin||_.x>this._xmin&&t.x<this._xmin)&&(e=(this._xmin-_.x)/(t.x-_.x),I=_.y+e*(t.y-_.y),I<=this._ymin?S=!1:I>=this._ymax?S=!0:i.push(new n(e,this._xmin,I))),(_.x<this._xmax&&t.x>this._xmax||_.x>this._xmax&&t.x<this._xmax)&&(e=(this._xmax-_.x)/(t.x-_.x),I=_.y+e*(t.y-_.y),I<=this._ymin?S=!1:I>=this._ymax?S=!0:i.push(new n(e,this._xmax,I))),(_.y<this._ymin&&t.y>this._ymin||_.y>this._ymin&&t.y<this._ymin)&&(e=(this._ymin-_.y)/(t.y-_.y),C=_.x+e*(t.x-_.x),C<=this._xmin?N=!1:C>=this._xmax?N=!0:i.push(new n(e,C,this._ymin))),(_.y<this._ymax&&t.y>this._ymax||_.y>this._ymax&&t.y<this._ymax)&&(e=(this._ymax-_.y)/(t.y-_.y),C=_.x+e*(t.x-_.x),C<=this._xmin?N=!1:C>=this._xmax?N=!0:i.push(new n(e,C,this._ymax))),0===i.length)N?S?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):S?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+E*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+E*i[0].ratio;for(let _=0;_<i.length;_++)this._lineTo(i[_].x,i[_].y,!0)}this._lineTo(t.x,t.y,!1)}}this._dist+=E,this._prevIsIn=i,this._prevPt=s}close(){if(this._line.length>2){const _=this._firstPt,t=this._prevPt;_.x===t.x&&_.y===t.y||this.lineTo(_.x,_.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(_=!0){return this._pushLine(),0===this._lines.length?null:(this._type===s.Polygon&&_&&e.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==s.LineString)throw new Error("Only valid for lines");this._pushLine();const _=this._lines,t=_.length;if(0===t)return null;const i=[];for(let s=0;s<t;s++)i.push({line:_[s],start:this._starts[s]||0});return i}_isIn(_,t){return _>=this._xmin&&_<=this._xmax&&t>=this._ymin&&t<=this._ymax}_intersect(_,t){let i,s,E;if(t.x>=this._xmin&&t.x<=this._xmax)s=t.y<=this._ymin?this._ymin:this._ymax,E=(s-_.y)/(t.y-_.y),i=_.x+E*(t.x-_.x);else if(t.y>=this._ymin&&t.y<=this._ymax)i=t.x<=this._xmin?this._xmin:this._xmax,E=(i-_.x)/(t.x-_.x),s=_.y+E*(t.y-_.y);else{s=t.y<=this._ymin?this._ymin:this._ymax,i=t.x<=this._xmin?this._xmin:this._xmax;const T=(i-_.x)/(t.x-_.x),R=(s-_.y)/(t.y-_.y);T<R?(E=T,s=_.y+T*(t.y-_.y)):(E=R,i=_.x+R*(t.x-_.x))}return this._r=E,new R(i,s)}_pushLine(){this._line&&(this._type===s.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(_,t,i){this._type!==s.Polygon?i&&(_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.push(new R(_,t))):(i||(_<this._xmin&&(_=this._xmin),_>this._xmax&&(_=this._xmax),t<this._ymin&&(t=this._ymin),t>this._ymax&&(t=this._ymax)),_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.push(new R(_,t)),this._isH=!1,this._isV=!1)}_lineTo(_,t,i){let E,T;if(this._type!==s.Polygon)if(i){if(_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(E=this._line[this._line.length-1],E.equals(_,t)))return;this._line.push(new R(_,t))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(_<this._xmin&&(_=this._xmin),_>this._xmax&&(_=this._xmax),t<this._ymin&&(t=this._ymin),t>this._ymax&&(t=this._ymax)),_=Math.round((_-(this._xmin+this._margin))*this._finalRatio),t=Math.round((t-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){E=this._line[this._line.length-1];const i=E.x===_,s=E.y===t;if(i&&s)return;this._isH&&i||this._isV&&s?(E.x=_,E.y=t,T=this._line[this._line.length-2],T.x===_&&T.y===t?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(T=this._line[this._line.length-2],this._isH=T.x===_,this._isV=T.y===t)):(this._isH=T.x===_,this._isV=T.y===t)):(this._line.push(new R(_,t)),this._isH=i,this._isV=s)}else this._line.push(new R(_,t))}}class h{setExtent(_){this._ratio=4096===_?1:4096/_}get validateTessellation(){return this._ratio<1}reset(_){this._lines=[],this._line=null}moveTo(_,t){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new R(_*i,t*i))}lineTo(_,t){const i=this._ratio;this._line.push(new R(_*i,t*i))}close(){const _=this._line;_&&!_[0].isEqual(_[_.length-1])&&_.push(_[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}!function(_){_[_.sideLeft=0]="sideLeft",_[_.sideRight=1]="sideRight",_[_.sideTop=2]="sideTop",_[_.sideBottom=3]="sideBottom"}(E||(E={}));class e{static simplify(_,t,i){if(!i)return;const s=-t,T=_+t,R=-t,n=_+t,A=[],h=[],N=i.length;for(let _=0;_<N;++_){const t=i[_];if(!t||t.length<2)continue;let e,N=t[0];const S=t.length;for(let i=1;i<S;++i)e=t[i],N.x===e.x&&(N.x<=s&&(N.y>e.y?(A.push(_),A.push(i),A.push(E.sideLeft),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideLeft),h.push(-1))),N.x>=T&&(N.y<e.y?(A.push(_),A.push(i),A.push(E.sideRight),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideRight),h.push(-1)))),N.y===e.y&&(N.y<=R&&(N.x<e.x?(A.push(_),A.push(i),A.push(E.sideTop),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideTop),h.push(-1))),N.y>=n&&(N.x>e.x?(A.push(_),A.push(i),A.push(E.sideBottom),A.push(-1)):(h.push(_),h.push(i),h.push(E.sideBottom),h.push(-1)))),N=e}if(0===A.length||0===h.length)return;e.fillParent(i,h,A),e.fillParent(i,A,h);const S=[];e.calcDeltas(S,h,A),e.calcDeltas(S,A,h),e.addDeltas(S,i)}static fillParent(_,t,i){const s=i.length,T=t.length;for(let R=0;R<T;R+=4){const T=t[R],n=t[R+1],A=t[R+2],h=_[T][n-1],e=_[T][n];let S=8092,C=-1;for(let t=0;t<s;t+=4){if(i[t+2]!==A)continue;const s=i[t],T=i[t+1],R=_[s][T-1],n=_[s][T];switch(A){case E.sideLeft:case E.sideRight:if(N(h.y,R.y,n.y)&&N(e.y,R.y,n.y)){const _=Math.abs(n.y-R.y);_<S&&(S=_,C=t)}break;case E.sideTop:case E.sideBottom:if(N(h.x,R.x,n.x)&&N(e.x,R.x,n.x)){const _=Math.abs(n.x-R.x);_<S&&(S=_,C=t)}}}t[R+3]=C}}static calcDeltas(_,t,i){const s=t.length;for(let E=0;E<s;E+=4){const s=[],T=e.calcDelta(E,t,i,s);_.push(t[E]),_.push(t[E+1]),_.push(t[E+2]),_.push(T)}}static calcDelta(_,t,i,s){const E=t[_+3];if(-1===E)return 0;const T=s.length;return T>1&&s[T-2]===E?0:(s.push(E),e.calcDelta(E,i,t,s)+1)}static addDeltas(_,t){const i=_.length;let s=0;for(let t=0;t<i;t+=4){const i=_[t+3];i>s&&(s=i)}for(let T=0;T<i;T+=4){const i=t[_[T]],R=_[T+1],n=s-_[T+3];switch(_[T+2]){case E.sideLeft:i[R-1].x-=n,i[R].x-=n,1===R&&(i[i.length-1].x-=n),R===i.length-1&&(i[0].x-=n);break;case E.sideRight:i[R-1].x+=n,i[R].x+=n,1===R&&(i[i.length-1].x+=n),R===i.length-1&&(i[0].x+=n);break;case E.sideTop:i[R-1].y-=n,i[R].y-=n,1===R&&(i[i.length-1].y-=n),R===i.length-1&&(i[0].y-=n);break;case E.sideBottom:i[R-1].y+=n,i[R].y+=n,1===R&&(i[i.length-1].y+=n),R===i.length-1&&(i[0].y+=n)}}}}const N=(_,t,i)=>_>=t&&_<=i||_>=i&&_<=t},13195:(_,t,i)=>{i.d(t,{GW:()=>r,IU:()=>L,Jo:()=>R,MG:()=>T,Wh:()=>S,cP:()=>P,os:()=>e,p6:()=>O,pJ:()=>n,ru:()=>D,s3:()=>M,wV:()=>I,yM:()=>a,z0:()=>C});var s=i(95108),E=i(6774);const T=Number.POSITIVE_INFINITY,R=Math.PI,n=2*R,A=128/R,h=256/360,e=R/180,N=1/Math.LN2;function S(_,t){return(_%=t)>=0?_:_+t}function C(_){return S(_*A,256)}function I(_){return S(_*h,256)}function O(_){return Math.log(_)*N}function r(_,t,i){return _*(1-i)+t*i}const l=8,o=14,x=16;function L(_){return l+Math.max((_-o)*x,0)}function M(_,t,i){let s,E,T,R=0;for(const n of i){s=n.length;for(let i=1;i<s;++i)E=n[i-1],T=n[i],E.y>t!=T.y>t&&((T.x-E.x)*(t-E.y)-(T.y-E.y)*(_-E.x)>0?R++:R--)}return 0!==R}function D(_,t,i,E){let T,R,n,A;const h=E*E;for(const E of i){const i=E.length;if(!(i<2)){T=E[0].x,R=E[0].y;for(let e=1;e<i;++e){if(n=E[e].x,A=E[e].y,(0,s.Ng)(_,t,T,R,n,A)<h)return!0;T=n,R=A}}}return!1}function P(_,t){if(0===t||Number.isNaN(t))return _;const i=[],s=new E.bR(0,0),T=new E.bR(0,0),R=new E.bR(0,0);for(let n=0;n<_.length;n++){const A=_[n],h=[];for(let _=0;_<A.length;_++){const i=A[_-1],n=A[_],e=A[_+1];0===_?s.setCoords(0,0):s.assignSub(n,i).normalize().rightPerpendicular(),_===A.length-1?T.setCoords(0,0):T.assignSub(e,n).normalize().rightPerpendicular(),R.assignAdd(s,T).normalize();const N=R.x*T.x+R.y*T.y;0!==N&&R.scale(1/N),h.push(E.bR.add(n,R.scale(t)))}i.push(h)}return i}function a(_,t,i,s){const T=new E.bR(_[0],_[1]);if(T.scale(s),"viewport"===t){const _=-i*(Math.PI/180),t=Math.cos(_),s=Math.sin(_);T.rotate(t,s)}return T}},76213:(_,t,i)=>{i.d(t,{CQ:()=>s,DY:()=>E,GR:()=>I,Gh:()=>A,TB:()=>C,_M:()=>h,cp:()=>O,dV:()=>R,eG:()=>T,fq:()=>S,hM:()=>N,ie:()=>e});const s=512,E=29,T=24;var R,n;(n=R||(R={}))[n.FilterFlags=0]="FilterFlags",n[n.Animation=1]="Animation",n[n.GPGPU=2]="GPGPU",n[n.VV=3]="VV",n[n.DD0=4]="DD0",n[n.DD1=5]="DD1",n[n.DD2=6]="DD2",n[n.LocalTimeOrigin=7]="LocalTimeOrigin";const A=1.05,h=3,e=3,N=2,S=10,C=256,I=32,O=512},63907:(_,t,i)=>{var s,E,T,R,n,A,h,e,N,S,C,I,O,r,l,o,x,L,M,D,P,a,G;i.d(t,{Ab:()=>r,Ac:()=>h,Ap:()=>O,CQ:()=>U,Cj:()=>C,Co:()=>M,H0:()=>l,Hr:()=>G,MT:()=>N,NV:()=>s,NZ:()=>n,Nm:()=>a,R:()=>D,Tb:()=>R,WR:()=>E,Y7:()=>A,_U:()=>L,dn:()=>T,eA:()=>S,ld:()=>o,nI:()=>y,pF:()=>I,pe:()=>e,vt:()=>P,yQ:()=>x}),function(_){_[_.DEPTH=256]="DEPTH",_[_.STENCIL=1024]="STENCIL",_[_.COLOR=16384]="COLOR"}(s||(s={})),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"}(E||(E={})),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"}(T||(T={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(R||(R={})),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"}(n||(n={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(A||(A={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(h||(h={})),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"}(e||(e={})),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"}(N||(N={})),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"}(S||(S={})),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"}(C||(C={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(I||(I={})),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"}(O||(O={})),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"}(r||(r={})),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"}(l||(l={})),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"}(o||(o={})),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"}(x||(x={})),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"}(L||(L={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(M||(M={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(D||(D={})),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"}(P||(P={})),function(_){_[_.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",_[_.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",_[_.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",_[_.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",_[_.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",_[_.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",_[_.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",_[_.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",_[_.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",_[_.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",_[_.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",_[_.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",_[_.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",_[_.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",_[_.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",_[_.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(a||(a={})),function(_){_[_.NONE=0]="NONE",_[_.BACK=1029]="BACK"}(G||(G={}));const y=33306;var U,u,B,c,F,m,f;!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"}(U||(U={})),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"}(u||(u={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(c||(c={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(F||(F={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(m||(m={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(f||(f={}))}}]);
|