@arcgis/core 4.23.0-next.20220124 → 4.23.0-next.20220126
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/Graphic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
- package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
- package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
- package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
- package/assets/esri/core/workers/chunks/{fe864d01e72aa24574b6.js → 23b15e7c2f96d260e16c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
- package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
- package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
- package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
- package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 434b16731c6a81f868ef.js} +1 -1
- package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
- package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
- package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
- package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
- package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
- package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
- package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
- package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
- package/assets/esri/core/workers/chunks/{c080114a69fa95b88d22.js → af5694b4d278cf1db2d9.js} +1 -1
- package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
- package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
- package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → ba5eb394f098968c22d2.js} +1 -1
- package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
- package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
- package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
- package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
- package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
- package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
- package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
- package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
- package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
- package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/chunks/ComponentShader.glsl.js +19 -19
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/WaterSurface.glsl.js +21 -21
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/interfaces.d.ts +36 -2
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
- package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(38581),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(90411),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(38581),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.Xn({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(38581),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(38581),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.Xn({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[511],{16453:(e,t,r)=>{r.d(t,{R:()=>v,w:()=>w});var i=r(43697),s=r(15923),o=r(70586),n=r(41103),l=r(22974),a=r(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,r=this._originStores[a.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let r=a.s3.SERVICE;r<a.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.s3.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(50549),c=r(1153),d=r(52011);const h=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,c.vw)(this)),r=t.store,i=new u;t.store=i,(0,n.M)(t,r,i)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.M9)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.M9)(t),s=(0,c.vw)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,d.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,c.vw)(e).store}let b=class extends(h(s.Z)){};b=(0,i._)([(0,d.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],b);var f=r(76169);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return g(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,f.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=g(this),r=(0,a.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.s3.USER)}updateOrigin(e,t){const r=g(this),i=(0,a.M9)(t),s=this.get(e);for(let t=i+1;t<a.kk;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,d.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e){return(0,c.vw)(e).store}const v=e=>{let t=class extends(m(h(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,d.j)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(v(s.Z)){};w=(0,i._)([(0,d.j)("esri.core.MultiOriginJSONSupport")],w)},29600:(e,t,r)=>{r.d(t,{Z:()=>w});var i=r(43697),s=r(68773),o=(r(66577),r(3172)),n=r(20102),l=r(32448),a=r(10699),u=r(83379),p=r(92604),c=r(95330),d=r(17452),h=r(5600),y=(r(67676),r(80442),r(75215),r(52011)),b=r(6570),f=r(82971);let m=0;const g=p.Z.getLogger("esri.layers.Layer");let v=class extends(l.Z.EventedMixin((0,a.I)(u.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,i=await r.e(3529).then(r.bind(r,63529));try{return await i.fromUrl(t)}catch(e){throw g.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",e),e}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},i=await r.e(4579).then(r.bind(r,44579));try{return await i.fromItem(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",o=r&&r.portal&&r.portal.url||s.Z.portalUrl;throw g.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}initialize(){this.when().catch((e=>{var t,r;(0,c.D_)(e)||p.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,d.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.Cb)({type:b.Z})],v.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,h.Cb)({type:String})],v.prototype,"id",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,h.Cb)()],v.prototype,"parent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,h.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,h.Cb)({type:f.Z})],v.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,h.Cb)({type:String,readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,h.Cb)()],v.prototype,"url",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,y.j)("esri.layers.Layer")],v);const w=v},17017:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(43697),s=r(5600),o=(r(67676),r(80442),r(75215),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>m});var i=r(43697),s=r(92604),o=r(95330),n=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),a=r(80539),u=(r(20102),r(26258),r(87538));const p=new a.Z,c=new WeakMap;function d(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let y=0,b=0;function f(){const e=Date.now();for(const r of p)if(r.refreshInterval){var t;e-(null!=(t=c.get(r))?t:0)+5>=6e4*r.refreshInterval&&(c.set(r,e),r.refresh(e))}}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=h(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==b){if(b=t,clearInterval(y),0===b)return void(y=0);y=setInterval(f,b)}}));const m=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){d(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},2319:(e,t,r)=>{r.d(t,{Z:()=>O});var i,s=r(43697),o=r(78223),n=r(35454),l=r(96674),a=r(22974),u=r(62357),p=r(5600),c=(r(75215),r(71715)),d=r(52011),h=r(30556),y=(r(67676),r(80442),r(8813));let b=i=class extends l.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,y.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,s._)([(0,p.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],b.prototype,"expression",void 0),(0,s._)([(0,c.r)("expression",["expression","value"])],b.prototype,"readExpression",null),(0,s._)([(0,h.c)("expression")],b.prototype,"writeExpression",null),(0,s._)([(0,p.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],b.prototype,"title",void 0),(0,s._)([(0,p.Cb)({json:{read:!1,write:!1}})],b.prototype,"value",void 0),b=i=(0,s._)([(0,d.j)("esri.layers.support.LabelExpressionInfo")],b);const f=b;var m=r(20256),g=r(4095),v=r(77987),w=r(78724),_=r(58333);v.Z.fromJSON(_.I4),g.Z.fromJSON(_.ET),m.Z.fromJSON(_.lF);const S=w.Z.fromJSON(_.qP);v.Z.fromJSON(_.eG),g.Z.fromJSON(_.wW),m.Z.fromJSON(_.lj);var x,C=r(21878);const E=new n.Xn({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function j(e){return!e||"service"!==e.origin&&!L(e.layer)}function L(e){return"map-image"===(null==e?void 0:e.type)}function P(e){var t,r;return!!L(e)&&!(null==(t=e.capabilities)||null==(r=t.exportMap)||!r.supportsArcadeExpressionForLabeling)}let I=x=class extends l.wq{constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=S,this.useCodedValues=void 0,this.where=null}static evaluateWhere(e,t){const r=function(e,t,r){switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){const e=r(t[i[0]],i[1],i[2]),s=i[3],o=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&j(i))e=new f({expression:this.getLabelExpressionArcade()});else if(!e)return;const s=e.toJSON(i);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.hV)(this)}getLabelExpressionArcade(){return(0,y.YI)(this)}getLabelExpressionSingleField(){return(0,y.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new x({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],I.prototype,"allowOverrun",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1}}}})],I.prototype,"deconflictionStrategy",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===(null==r?void 0:r.origin)&&P(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,s._)([(0,c.r)("labelExpression")],I.prototype,"readLabelExpression",null),(0,s._)([(0,h.c)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,s._)([(0,p.Cb)({type:f,json:{write:{overridePolicy:(e,t,r)=>function(e){return j(e)||P(e.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,s._)([(0,h.c)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,s._)([(0,p.Cb)({type:E.apiValues,json:{type:E.jsonValues,read:E.read,write:E.write}})],I.prototype,"labelPlacement",void 0),(0,s._)([(0,p.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,s._)([(0,p.Cb)({type:Number})],I.prototype,"maxScale",void 0),(0,s._)([(0,h.c)("maxScale")],I.prototype,"writeMaxScale",null),(0,s._)([(0,p.Cb)({type:Number})],I.prototype,"minScale",void 0),(0,s._)([(0,h.c)("minScale")],I.prototype,"writeMinScale",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"repeatLabel",void 0),(0,s._)([(0,p.Cb)({type:Number,cast:u.t_,json:{write:!0,origins:{"web-scene":{write:!1}}}})],I.prototype,"repeatLabelDistance",void 0),(0,s._)([(0,p.Cb)({types:o.yK,json:{origins:{"web-scene":{types:o.S6,write:C.c,default:null}},write:C.c,default:null}})],I.prototype,"symbol",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=x=(0,s._)([(0,d.j)("esri.layers.support.LabelClass")],I);const O=I},8813:(e,t,r)=>{r.d(t,{dI:()=>y,hV:()=>c,YI:()=>d,UO:()=>h,el:()=>v,z7:()=>p});var i=r(19153);const s="__begin__",o="__end__",n=new RegExp(s,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+s,"i"),u=new RegExp(o+"$","i");function p(e){return e.replace(new RegExp("\\{","g"),"[").replace(new RegExp("\\}","g"),"]")}function c(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replace(new RegExp("\\[","g"),"{").replace(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function d(e){const t=c(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function h(e){const t=c(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e.match(b);return t&&t[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function y(e){let t;return e?(t=(0,i.gx)(e,(e=>s+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replace(n,'" + ').replace(l,' + "')):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,g=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=f.exec(e)||m.exec(e);return t?t[1]||t[3]:(t=g.exec(e),t?t[2]:null)}},12501:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var i,s=r(43697),o=r(22303),n=r(3172),l=r(20102),a=r(22974),u=r(92604),p=r(13867),c=r(70586),d=r(95330),h=r(19153),y=r(5600),b=(r(75215),r(52011)),f=r(30556),m=r(35671),g=r(5499),v=r(12571),w=r(59266),_=r(17386);const S=u.Z.getLogger("esri.renderers.DictionaryRenderer"),x={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};let C=i=class extends((0,v.W)(g.Z)){constructor(e){super(e),this._ongoingRequests=new Map,this._symbolCache=new p.Z(100),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,r,i){null!=i&&i.origin||super.writeVisualVariables(e,t,r,i)}clone(){return new i({config:(0,a.d9)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:(0,a.d9)(this.fieldMap),url:(0,a.d9)(this.url),visualVariables:(0,a.d9)(this.visualVariables)})}async getSymbolAsync(e,t){let r;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{r=await this._dictionaryPromise}catch(e){if((0,d.D_)(e))return this._dictionaryPromise=null,null}const i={};if(this.fieldMap)for(const t of this._symbolFields){const r=this.fieldMap[t];if(r&&null!==e.attributes[r]&&void 0!==e.attributes[r]){const s=""+e.attributes[r];i[t]=s}else i[t]=""}const s=r(i,t);if(!s||"string"!=typeof s)return null;const n=(0,h.hP)(s).toString(),l=this._symbolCache.get(n);if(l)return l.catch((()=>{this._symbolCache.pop(n)})),l;const a=s.split(";"),u=[],p=[];for(const e of a)if(e&&0!==e.length)if(-1===e.indexOf("po:"))if(-1!==e.indexOf("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){u.push(t);break}}else this._itemNames.has(e)&&u.push(e);else{const t=e.substr(3).split("|");if(3===t.length){const e=t[0],r=t[1];let i=t[2];if("DashTemplate"===r)i=i.split(" ").map((e=>Number(e)));else if("Color"===r){const e=new o.Z(i).toRgba();i=[e[0],e[1],e[2],255*e[3]]}else i=Number(i);p.push({primitiveName:e,propertyName:r,value:i})}}const y=!(0,c.pC)(e.geometry)||!e.geometry.hasZ&&"point"===e.geometry.type,b=this._cimPartsToCIMSymbol(u,p,y,t);return this._symbolCache.put(n,b,1),b}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await(0,m.io)(e,t,this.scaleExpression);for(const r in this.fieldMap){const i=this.fieldMap[r];t.has(i)&&e.add(i)}}get arcadeRequired(){return!0}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void S.error("no valid URL!");const t=(0,c.pC)(e)?e.abortOptions:null,r=(0,n.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...t}),[{data:i}]=await Promise.all([r,(0,w.LC)()]);if(!i)throw this._dictionaryPromise=null,new l.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const s=i.expression,o=i.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+i.cimRefTemplateUrl,this._itemNames=new Set(i.itemsNames),this._symbolFields=o.symbol;const a={};if(this.config){const e=this.config;for(const t in e)a[t]=e[t]}if(o.configuration)for(const e of o.configuration)a.hasOwnProperty(e.name)||(a[e.name]=e.value);const u=[];if((0,c.pC)(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const r=this.fieldMap[t],i=e.fields.filter((e=>e.name===r));i.length>0&&u.push({...i[0],name:t})}return this._dictionaryPromise=(0,w.pp)(s,(0,c.pC)(e)?e.spatialReference:null,u,a).then((e=>{const t={scale:0};return(r,i)=>{const s=e.repurposeFeature({geometry:null,attributes:r});return t.scale=(0,c.pC)(i)?i.scale:void 0,e.evaluate({$feature:s,$view:t})}})).catch((e=>(S.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._symbolFields}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const r=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=(0,n.default)(r,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,i);try{return(await i).data}catch(t){return this._ongoingRequests.delete(e),Promise.reject(t)}}_combineSymbolParts(e,t,r){if(!e||0===e.length)return null;const i={...e[0]};if(e.length>1){i.symbolLayers=[];for(const t of e){const e=t;i.symbolLayers.unshift(...e.symbolLayers)}}return r&&(i.callout=x),{type:"CIMSymbolReference",symbol:i,primitiveOverrides:t}}async _cimPartsToCIMSymbol(e,t,r,i){const s=new Array(e.length);for(let t=0;t<e.length;t++)s[t]=this._getSymbolPart(e[t],i);const o=await Promise.all(s);return new _.Z({data:this._combineSymbolParts(o,t,r)})}};(0,s._)([(0,y.Cb)({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],C.prototype,"config",void 0),(0,s._)([(0,y.Cb)({type:Object,json:{write:!0}})],C.prototype,"fieldMap",void 0),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],C.prototype,"scaleExpression",void 0),(0,s._)([(0,f.c)("scaleExpression")],C.prototype,"writeData",null),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],C.prototype,"scaleExpressionTitle",void 0),(0,s._)([(0,y.Cb)({type:String,json:{write:!0}})],C.prototype,"url",void 0),(0,s._)([(0,f.c)("visualVariables")],C.prototype,"writeVisualVariables",null),C=i=(0,s._)([(0,b.j)("esri.renderers.DictionaryRenderer")],C);const E=C},95088:(e,t,r)=>{r.d(t,{Z:()=>P});var i,s=r(43697),o=r(22303),n=r(22974),l=r(44422),a=r(75215),u=r(36030),p=r(5600),c=r(52011),d=r(35671),h=r(5499),y=r(12571),b=r(96674),f=r(92604),m=(r(67676),r(80442),r(90578));const g=f.Z.getLogger("esri.renderers.support.AttributeColorInfo");let v=i=class extends b.wq{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(g.error(".field: field must be a string value"),null):(0,a.Zs)(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new i({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,s._)([(0,p.Cb)({type:o.Z,json:{type:[Number],write:!0}})],v.prototype,"color",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"field",void 0),(0,s._)([(0,m.p)("field")],v.prototype,"castField",null),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"label",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"valueExpression",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"valueExpressionTitle",void 0),v=i=(0,s._)([(0,c.j)("esri.renderers.support.AttributeColorInfo")],v);const w=v;var _;let S=_=class extends b.wq{constructor(){super(...arguments),this.unit=null}clone(){return new _({unit:this.unit})}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],S.prototype,"unit",void 0),S=_=(0,s._)([(0,c.j)("esri.renderers.support.DotDensityLegendOptions")],S);const x=S;var C,E=r(20256),j=r(4095);let L=C=class extends((0,y.W)(h.Z)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new o.Z([0,0,0,0]),this.blendDots=!0,this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new j.Z,this.dotValue=null,this.referenceDotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new E.Z({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes&&this.attributes.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new C({attributes:(0,n.d9)(this.attributes),backgroundColor:(0,n.d9)(this.backgroundColor),dotBlendingEnabled:(0,n.d9)(this.dotBlendingEnabled),dotShape:(0,n.d9)(this.dotShape),dotSize:(0,n.d9)(this.dotSize),dotValue:(0,n.d9)(this.dotValue),legendOptions:(0,n.d9)(this.legendOptions),outline:(0,n.d9)(this.outline),referenceScale:(0,n.d9)(this.referenceScale),visualVariables:(0,n.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){return`${this.attributes.map((e=>e.field||e.valueExpression||""))}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const r of this.attributes)r.valueExpression&&await(0,d.io)(e,t,r.valueExpression),r.field&&e.add(r.field)}};(0,s._)([(0,p.Cb)({type:[w],json:{write:!0}})],L.prototype,"attributes",void 0),(0,s._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],L.prototype,"backgroundColor",void 0),(0,s._)([(0,p.Cb)({type:Boolean}),(0,l.B)("dotBlendingEnabled")],L.prototype,"blendDots",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],L.prototype,"dotBlendingEnabled",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!1}})],L.prototype,"dotShape",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!1}})],L.prototype,"dotSize",void 0),(0,s._)([(0,p.Cb)({type:x,json:{write:!0}})],L.prototype,"legendOptions",void 0),(0,s._)([(0,p.Cb)({type:j.Z,json:{default:null,write:!0}})],L.prototype,"outline",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],L.prototype,"dotValue",void 0),(0,s._)([(0,p.Cb)({type:Number}),(0,l.B)("dotValue")],L.prototype,"referenceDotValue",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],L.prototype,"referenceScale",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],L.prototype,"seed",void 0),(0,s._)([(0,u.J)({dotDensity:"dot-density"})],L.prototype,"type",void 0),L=C=(0,s._)([(0,c.j)("esri.renderers.DotDensityRenderer")],L);const P=L},79056:(e,t,r)=>{r.d(t,{Z:()=>m});var i,s=r(43697),o=r(22303),n=r(22974),l=r(5600),a=(r(75215),r(36030)),u=r(52011),p=r(35671),c=r(5499),d=r(96674);r(67676),r(80442);let h=i=class extends d.wq{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new i({color:this.color,ratio:this.ratio})}};(0,s._)([(0,l.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"ratio",void 0),h=i=(0,s._)([(0,u.j)("esri.renderers.support.HeatmapColorStop")],h);const y=h;var b;let f=b=class extends c.Z{constructor(e){super(e),this.blurRadius=10,this.colorStops=[new y({ratio:0,color:new o.Z("rgba(255, 140, 0, 0)")}),new y({ratio:.75,color:new o.Z("rgba(255, 140, 0, 1)")}),new y({ratio:.9,color:new o.Z("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.maxPixelIntensity=100,this.minPixelIntensity=0,this.type="heatmap"}async collectRequiredFields(e,t){const r=this.field;r&&"string"==typeof r&&(0,p.AB)(e,t,r)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new b({blurRadius:this.blurRadius,colorStops:(0,n.d9)(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}};(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"blurRadius",void 0),(0,s._)([(0,l.Cb)({type:[y],json:{write:!0}})],f.prototype,"colorStops",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"field",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:null==r})}}})],f.prototype,"fieldOffset",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"maxPixelIntensity",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"minPixelIntensity",void 0),(0,s._)([(0,a.J)({heatmap:"heatmap"})],f.prototype,"type",void 0),f=b=(0,s._)([(0,u.j)("esri.renderers.HeatmapRenderer")],f);const m=f},84382:(e,t,r)=>{r.d(t,{Z:()=>h});var i,s=r(43697),o=r(22974),n=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(5499),p=r(12571),c=r(9833);let d=i=class extends((0,p.W)(u.Z)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map((r=>r.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:(0,o.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,s._)([(0,n.Cb)(c.G)],d.prototype,"symbol",void 0),(0,s._)([(0,l.J)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,s._)([(0,a.j)("esri.renderers.SimpleRenderer")],d);const h=d},91423:(e,t,r)=>{r.d(t,{a:()=>l});var i=r(20941),s=r(63213),o=r(32400);const n=(0,s.d)({types:o.A});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r&&r.messages&&r.messages.push(new i.Z("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):n(e,t,r):null}},32400:(e,t,r)=>{r.d(t,{A:()=>p,o:()=>c});var i=r(16050),s=r(12501),o=r(95088),n=r(79056),l=r(5499),a=r(84382),u=r(30687);const p={key:"type",base:l.Z,typeMap:{heatmap:n.Z,simple:a.Z,"unique-value":u.Z,"class-breaks":i.Z,"dot-density":o.Z,dictionary:s.default},errorContext:"renderer"},c={key:"type",base:l.Z,typeMap:{simple:a.Z,"unique-value":u.Z,"class-breaks":i.Z},errorContext:"renderer"}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),s=r(35671),o=r(84649),n=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(44951),r(422)),a=r(63061);const u=["oid","global-id"],p=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},p){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>-1===t.indexOf(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t,(null==i?void 0:i.ignoreFieldTypes)||v).map((t=>new l.Z({fieldName:t.name,isEditable:f(t,e),label:t.alias,format:m(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:null==i?void 0:i.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:a},p);if(!c.length)return null;const d=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r}({titleBase:u,fields:r,displayField:e}),b=[new n.Z,new o.Z];return new i.Z({title:d,content:b,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(b(e.name,t)||r&&e.name===r||u.indexOf(e.type)>-1||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:g(e)?-1:g(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function b(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:s,editorField:o}=t;return-1!==[r&&r.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase(),o&&o.toLowerCase()].indexOf(e.toLowerCase())}function f(e,t){return e.editable&&-1===p.indexOf(e.type)&&!b(e.name,t)}function m(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return null}}function g(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())||void 0}const v=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,n,r)=>{r.d(n,{a:()=>c,f:()=>o,i:()=>s,t:()=>a});var e=r(46851);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function i(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1],y=r[2],d=r[3],M=r[4],m=r[5],g=r[6],b=r[7],A=r[8];return t[0]=h*e+p*i+y*s,t[1]=h*o+p*c+y*f,t[2]=h*a+p*u+y*l,t[3]=d*e+M*i+m*s,t[4]=d*o+M*c+m*f,t[5]=d*a+M*u+m*l,t[6]=g*e+b*i+A*s,t[7]=g*o+b*c+A*f,t[8]=g*a+b*u+A*l,t}function c(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=n[9],h=n[10],p=n[11],y=n[12],d=n[13],M=n[14],m=n[15],g=r*c-e*i,b=r*u-o*i,A=r*s-a*i,T=e*u-o*c,P=e*s-a*c,_=o*s-a*u,E=f*d-l*y,F=f*M-h*y,v=f*m-p*y,B=l*M-h*d,x=l*m-p*d,w=h*m-p*M;let C=g*w-b*x+A*B+T*v-P*F+_*E;return C?(C=1/C,t[0]=(c*w-u*x+s*B)*C,t[1]=(u*v-i*w-s*F)*C,t[2]=(i*x-c*v+s*E)*C,t[3]=(o*x-e*w-a*B)*C,t[4]=(r*w-o*v+a*F)*C,t[5]=(e*v-r*x-a*E)*C,t[6]=(d*_-M*P+m*T)*C,t[7]=(M*A-y*_-m*b)*C,t[8]=(y*P-d*A+m*g)*C,t):null}function u(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}function s(t){const n=e.E,r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8];return Math.abs(1-(r*r+i*i+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(a*a+u*u+l*l))<=n}const f=i,l=u;Object.freeze({__proto__:null,fromMat4:o,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},set:function(t,n,r,e,o,a,i,c,u,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=u,t[8]=s,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:a,invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u;let y=r*l+e*h+o*p;return y?(y=1/y,t[0]=l*y,t[1]=(-f*e+o*s)*y,t[2]=(c*e-o*i)*y,t[3]=h*y,t[4]=(f*r-o*u)*y,t[5]=(-c*r+o*a)*y,t[6]=p*y,t[7]=(-s*r+e*u)*y,t[8]=(i*r-e*a)*y,t):null},adjoint:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8];return t[0]=i*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*i,t[3]=c*u-a*f,t[4]=r*f-o*u,t[5]=o*a-r*c,t[6]=a*s-i*u,t[7]=e*u-r*s,t[8]=r*i-e*a,t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],a=t[4],i=t[5],c=t[6],u=t[7],s=t[8];return n*(s*a-i*u)+r*(-s*o+i*c)+e*(u*o-a*c)},multiply:i,translate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1];return t[0]=e,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=u,t[6]=h*e+p*i+s,t[7]=h*o+p*c+f,t[8]=h*a+p*u+l,t},rotate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=Math.sin(r),p=Math.cos(r);return t[0]=p*e+h*i,t[1]=p*o+h*c,t[2]=p*a+h*u,t[3]=p*i-h*e,t[4]=p*c-h*o,t[5]=p*u-h*a,t[6]=s,t[7]=f,t[8]=l,t},scale:function(t,n,r){const e=r[0],o=r[1],a=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t},scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromQuat:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r+r,c=e+e,u=o+o,s=r*i,f=e*i,l=e*c,h=o*i,p=o*c,y=o*u,d=a*i,M=a*c,m=a*u;return t[0]=1-l-y,t[3]=f-m,t[6]=h+M,t[1]=f+m,t[4]=1-s-y,t[7]=p-d,t[2]=h-M,t[5]=p+d,t[8]=1-s-l,t},normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[4],i=n[5],c=n[6],u=n[8],s=n[9],f=n[10],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u,y=r*l+e*h+o*p;if(!y)return null;const d=1/y;return t[0]=l*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*i)*d,t[3]=h*d,t[4]=(f*r-o*u)*d,t[5]=(-c*r+o*a)*d,t[6]=p*d,t[7]=(-s*r+e*u)*d,t[8]=(i*r-e*a)*d,t},normalFromMat4:c,projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},subtract:u,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},equals:function(t,n){const r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8],h=n[0],p=n[1],y=n[2],d=n[3],M=n[4],m=n[5],g=n[6],b=n[7],A=n[8];return Math.abs(r-h)<=e.E*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-p)<=e.E*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-y)<=e.E*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(i-d)<=e.E*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(c-M)<=e.E*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-m)<=e.E*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-g)<=e.E*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(f-b)<=e.E*Math.max(1,Math.abs(f),Math.abs(b))&&Math.abs(l-A)<=e.E*Math.max(1,Math.abs(l),Math.abs(A))},isOrthoNormal:s,mul:f,sub:l})},46521:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n){return new Float64Array(t,n,9)}r.d(n,{a:()=>o,c:()=>e}),Object.freeze({__proto__:null,create:e,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},fromValues:function(t,n,r,e,o,a,i,c,u){return[t,n,r,e,o,a,i,c,u]},createView:o})},13598:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,n){return new Float64Array(t,n,16)}r.d(n,{I:()=>i,a:()=>a,b:()=>o,c:()=>e});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d){return[t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d]},createView:a,IDENTITY:i})},51305:(t,n,r)=>{r.d(n,{c:()=>p,g:()=>f,j:()=>x,k:()=>d,m:()=>l,s:()=>s});var e=r(46521),o=r(94961),a=r(65617),i=r(46851),c=r(17896),u=r(98766);function s(t,n,r){r*=.5;const e=Math.sin(r);return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=Math.cos(r),t}function f(t,n){const r=2*Math.acos(n[3]),e=Math.sin(r/2);return e>i.E?(t[0]=n[0]/e,t[1]=n[1]/e,t[2]=n[2]/e):(t[0]=1,t[1]=0,t[2]=0),r}function l(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=r[0],u=r[1],s=r[2],f=r[3];return t[0]=e*f+i*c+o*s-a*u,t[1]=o*f+i*u+a*c-e*s,t[2]=a*f+i*s+e*u-o*c,t[3]=i*f-e*c-o*u-a*s,t}function h(t,n,r,e){const o=n[0],a=n[1],c=n[2],u=n[3];let s,f,l,h,p,y=r[0],d=r[1],M=r[2],m=r[3];return f=o*y+a*d+c*M+u*m,f<0&&(f=-f,y=-y,d=-d,M=-M,m=-m),1-f>i.E?(s=Math.acos(f),l=Math.sin(s),h=Math.sin((1-e)*s)/l,p=Math.sin(e*s)/l):(h=1-e,p=e),t[0]=h*o+p*y,t[1]=h*a+p*d,t[2]=h*c+p*M,t[3]=h*u+p*m,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function y(t,n){const r=n[0]+n[4]+n[8];let e;if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{let r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;e=Math.sqrt(n[3*r+r]-n[3*o+o]-n[3*a+a]+1),t[r]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+r]+n[3*r+o])*e,t[a]=(n[3*a+r]+n[3*r+a])*e}return t}function d(t,n,r,e){const o=.5*Math.PI/180;n*=o,r*=o,e*=o;const a=Math.sin(n),i=Math.cos(n),c=Math.sin(r),u=Math.cos(r),s=Math.sin(e),f=Math.cos(e);return t[0]=a*u*f-i*c*s,t[1]=i*c*f+a*u*s,t[2]=i*u*s-a*c*f,t[3]=i*u*f+a*c*s,t}const M=u.c,m=u.s,g=u.a,b=l,A=u.b,T=u.d,P=u.l,_=u.e,E=_,F=u.f,v=F,B=u.n,x=u.g,w=u.h,C=(0,a.c)(),R=(0,a.f)(1,0,0),S=(0,a.f)(0,1,0),I=(0,o.a)(),O=(0,o.a)(),z=(0,e.c)();Object.freeze({__proto__:null,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:s,getAxisAngle:f,multiply:l,rotateX:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+i*c,t[1]=o*u+a*c,t[2]=a*u-o*c,t[3]=i*u-e*c,t},rotateY:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u-a*c,t[1]=o*u+i*c,t[2]=a*u+e*c,t[3]=i*u-o*c,t},rotateZ:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+o*c,t[1]=o*u-e*c,t[2]=a*u+i*c,t[3]=i*u-a*c,t},calculateW:function(t,n){const r=n[0],e=n[1],o=n[2];return t[0]=r,t[1]=e,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-e*e-o*o)),t},slerp:h,random:function(t){const n=(0,i.R)(),r=(0,i.R)(),e=(0,i.R)(),o=Math.sqrt(1-n),a=Math.sqrt(n);return t[0]=o*Math.sin(2*Math.PI*r),t[1]=o*Math.cos(2*Math.PI*r),t[2]=a*Math.sin(2*Math.PI*e),t[3]=a*Math.cos(2*Math.PI*e),t},invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r*r+e*e+o*o+a*a,c=i?1/i:0;return t[0]=-r*c,t[1]=-e*c,t[2]=-o*c,t[3]=a*c,t},conjugate:p,fromMat3:y,fromEuler:d,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},copy:M,set:m,add:g,mul:b,scale:A,dot:T,lerp:P,length:_,len:E,squaredLength:F,sqrLen:v,normalize:B,exactEquals:x,equals:w,rotationTo:function(t,n,r){const e=(0,c.d)(n,r);return e<-.999999?((0,c.c)(C,R,n),(0,c.u)(C)<1e-6&&(0,c.c)(C,S,n),(0,c.n)(C,C),s(t,C,Math.PI),t):e>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.c)(C,n,r),t[0]=C[0],t[1]=C[1],t[2]=C[2],t[3]=1+e,B(t,t))},sqlerp:function(t,n,r,e,o,a){return h(I,n,o,a),h(O,r,e,a),h(t,I,O,2*a*(1-a)),t},setAxes:function(t,n,r,e){const o=z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=e[0],o[4]=e[1],o[7]=e[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],B(t,y(t,o))}})},94961:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,n){return new Float64Array(t,n,4)}r.d(n,{I:()=>i,a:()=>e,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e){return[t,n,r,e]},createView:a,IDENTITY:i})},20773:(t,n,r)=>{r.d(n,{a:()=>a,b:()=>u,n:()=>c,s:()=>i,t:()=>o});var e=r(72220);function o(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[4],s=r[5],f=r[6],l=r[8],h=r[9],p=r[10],y=r[12],d=r[13],M=r[14],m=t.typedBuffer,g=t.typedBufferStride,b=n.typedBuffer,A=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*g,r=t*A,e=b[r],o=b[r+1],T=b[r+2];m[n]=a*e+u*o+l*T+y,m[n+1]=i*e+s*o+h*T+d,m[n+2]=c*e+f*o+p*T+M}}function a(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=r[8],y=t.typedBuffer,d=t.typedBufferStride,M=n.typedBuffer,m=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*d,r=t*m,e=M[r],o=M[r+1],g=M[r+2];y[n]=a*e+u*o+l*g,y[n+1]=i*e+s*o+h*g,y[n+2]=c*e+f*o+p*g}}function i(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=r*i[e],o[n+1]=r*i[e+1],o[n+2]=r*i[e+2]}}function c(t,n){const r=Math.min(t.count,n.count),e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*o,r=t*i,c=a[r],u=a[r+1],s=a[r+2],f=Math.sqrt(c*c+u*u+s*s);if(f>0){const t=1/f;e[n]=t*c,e[n+1]=t*u,e[n+2]=t*s}}}function u(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=i[e]>>r,o[n+1]=i[e+1]>>r,o[n+2]=i[e+2]>>r}}Object.freeze({__proto__:null,transformMat4:o,transformMat3:a,scale:i,normalize:c,shiftRight:u})},56067:(t,n,r)=>{function e(t,n,r){const e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride,c=r?r.count:n.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,s=(r&&r.srcIndex?r.srcIndex:0)*i;for(let t=0;t<c;++t)e[u]=a[s],e[u+1]=a[s+1],e[u+2]=a[s+2],u+=o,s+=i}function o(t,n,r,e,o){var a,i;const c=t.typedBuffer,u=t.typedBufferStride,s=null!=(a=null==o?void 0:o.count)?a:t.count;let f=(null!=(i=null==o?void 0:o.dstIndex)?i:0)*u;for(let t=0;t<s;++t)c[f]=n,c[f+1]=r,c[f+2]=e,f+=u}r.d(n,{c:()=>e,f:()=>o}),Object.freeze({__proto__:null,copy:e,fill:o})},2674:(t,n,r)=>{r.d(n,{Z:()=>T});var e,o=r(43697),a=r(96674),i=r(70586),c=r(5600),u=(r(67676),r(80442),r(75215),r(52011)),s=r(52138),f=r(13598),l=r(17896),h=r(65617),p=r(13473),y=r(90411),d=r(24678),M=r(3709),m=r(56481),g=r(20773),b=r(56067);let A=e=class extends a.wq{constructor(t){super(t),this.origin=(0,h.c)(),this.translation=(0,h.c)(),this.rotation=(0,M.Ue)(),this.scale=(0,h.f)(1,1,1),this.geographic=!0}get localMatrix(){const t=(0,f.c)();return(0,s.u)(t,this.scale),(0,s.e)(t,t,(0,M.WH)(this.rotation),(0,M.ZZ)(this.rotation)),(0,s.j)(t,t,this.translation),t}get localMatrixInverse(){return(0,s.a)((0,f.c)(),this.localMatrix)}applyLocal(t,n){return(0,l.m)(n,t,this.localMatrix)}applyLocalInverse(t,n){return(0,l.m)(n,t,this.localMatrixInverse)}project(t,n){const r=new Float64Array(t.length),e=m.fP.fromTypedArray(r),o=m.fP.fromTypedArray(t);if(this.geographic){const t=(0,d.rS)(n),a=(0,f.c)();return(0,y.Bm)(n,this.origin,a,t),(0,s.m)(a,a,this.localMatrix),(0,g.t)(e,o,a),(0,y.CM)(r,t,0,r,n,0,r.length/3),r}const{localMatrix:a,origin:i}=this;(0,s.v)(a,f.I)?(0,b.c)(e,o):(0,g.t)(e,o,a);for(let t=0;t<r.length;t+=3)r[t+0]+=i[0],r[t+1]+=i[1],r[t+2]+=i[2];return r}getOriginPoint(t){const[n,r,e]=this.origin;return new p.Z({x:n,y:r,z:e,spatialReference:t})}equals(t){return(0,i.pC)(t)&&this.geographic===t.geographic&&(0,l.k)(this.origin,t.origin)&&(0,s.w)(this.localMatrix,t.localMatrix)}clone(){const t={origin:(0,h.a)(this.origin),translation:(0,h.a)(this.translation),rotation:(0,M.Ue)(this.rotation),scale:(0,h.a)(this.scale),geographic:this.geographic};return new e(t)}};(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"origin",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"translation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"rotation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"scale",void 0),(0,o._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{write:!0}})],A.prototype,"geographic",void 0),(0,o._)([(0,c.Cb)()],A.prototype,"localMatrix",null),(0,o._)([(0,c.Cb)()],A.prototype,"localMatrixInverse",null),A=e=(0,o._)([(0,u.j)("esri.geometry.support.MeshTransform")],A);const T=A},3709:(t,n,r)=>{r.d(n,{WH:()=>l,ZZ:()=>f,qC:()=>s,Ue:()=>c,uT:()=>u});var e=r(22021),o=r(51305),a=r(94961),i=r(17896);function c(t=h){return[t[0],t[1],t[2],t[3]]}function u(t,n,r=c()){return(0,i.g)(r,t),r[3]=n,r}function s(t,n,r=c()){return(0,o.s)(p,t,l(t)),(0,o.s)(y,n,l(n)),(0,o.m)(p,y,p),function(t,n){return t[3]=n,t}(r,(0,e.BV)((0,o.g)(r,p)))}function f(t){return t}function l(t){return(0,e.Vl)(t[3])}const h=[0,0,1,0],p=(0,a.a)(),y=(0,a.a)();c()},72220:(t,n,r)=>{r.d(n,{c:()=>e});const e=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,n,r)=>{function e(t,n){var r;return t.isGeographic||t.isWebMercator&&(null==(r=null==n?void 0:n.geographic)||r)}r.d(n,{h:()=>e})},66459:(t,n,r)=>{r.d(n,{iv:()=>M,I5:()=>m,w1:()=>g,FF:()=>b,Yq:()=>A});var e=r(70586),o=r(67900),a=r(46521),i=r(52138),c=r(13598),u=r(21787),s=r(90411),f=r(24678),l=r(2674),h=r(56481),p=r(20773),y=r(13442),d=r(56493);function M(t,n,r){return(0,y.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference,o=F(n,r,w),a=new Float64Array(t.position.length),i=function(t,n,r,e){(0,p.t)(h.fP.fromTypedArray(e),h.fP.fromTypedArray(t),n);const o=new Float64Array(t.length);return(0,d.To)(e,o,r)}(t.position,o,e,a),c=(0,u.a)(R,o);return{position:i,normal:T(i,a,t.normal,c,e),tangent:P(i,a,t.tangent,c,e)}}(t,n,r):function(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=x(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=o[t+0]*u+a,e[t+1]=o[t+1]*u+i,e[t+2]=o[t+2]*s+c;return{position:e,normal:t.normal,tangent:t.tangent}}(t,n,r)}function m(t,n,r){const{position:o,normal:a,tangent:i}=t;if((0,e.Wi)(n))return{position:o,normal:a,tangent:i};const c=n.localMatrix;return M({position:(0,d.zZ)(o,new Float64Array(o.length),c),normal:(0,e.pC)(a)?(0,d.w9)(a,new Float32Array(a.length),c):null,tangent:(0,e.pC)(i)?(0,d.VS)(i,new Float32Array(i.length),c):null},n.getOriginPoint(r),{geographic:n.geographic})}function g(t,n,r){if(null!=r&&r.useTransform){var e;const{position:o,normal:a,tangent:i}=t;return{vertexAttributes:{position:o,normal:a,tangent:i},transform:new l.Z({origin:[n.x,n.y,null!=(e=n.z)?e:0],geographic:(0,y.h)(n.spatialReference,r)})}}return{vertexAttributes:M(t,n,r),transform:null}}function b(t,n,r){return(0,y.h)(n.spatialReference,r)?E(t,n,r):_(t,n,r)}function A(t,n,r,o){if((0,e.Wi)(n))return b(t,r,o);const a=m(t,n,r.spatialReference);return r.equals(n.getOriginPoint(r.spatialReference))?_(a,r,o):(0,y.h)(r.spatialReference,o)?E(a,r,o):_(a,r,o)}function T(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);return(0,p.a)(h.ct.fromTypedArray(i),h.ct.fromTypedArray(r),o),(0,d.Yk)(i,t,n,a,i),i}function P(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);(0,p.a)(h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT),h.ct.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),o);for(let t=3;t<i.length;t+=4)i[t]=r[t];return(0,d.M2)(i,t,n,a,i),i}function _(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=x(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=(o[t+0]-a)/u,e[t+1]=(o[t+1]-i)/u,e[t+2]=(o[t+2]-c)/s;return{position:e,normal:t.normal,tangent:t.tangent}}function E(t,n,r){const e=n.spatialReference;F(n,r,w);const o=(0,i.a)(C,w),a=new Float64Array(t.position.length),c=function(t,n,r,e){const o=(0,d.XO)(t,n,e),a=h.fP.fromTypedArray(o),i=new Float64Array(o.length),c=h.fP.fromTypedArray(i);return(0,p.t)(c,a,r),i}(t.position,e,o,a),s=(0,u.a)(R,o);return{position:c,normal:v(t.normal,t.position,a,e,s),tangent:B(t.tangent,t.position,a,e,s)}}function F(t,n,r){(0,s.Bm)(t.spatialReference,[t.x,t.y,t.z||0],r,(0,f.rS)(t.spatialReference));const{horizontal:e,vertical:o}=x(n?n.unit:null,t.spatialReference);return(0,i.h)(r,r,[e,e,o]),r}function v(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.Iz)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i);return(0,p.a)(c,c,a),i}function B(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.wi)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT);return(0,p.a)(c,c,a),i}function x(t,n){if((0,e.Wi)(t))return S;const r=n.isGeographic?1:(0,o.Z7)(n),a=n.isGeographic?1:(0,o._R)(n),i=(0,o.En)(1,t,"meters");return{horizontal:i*r,vertical:i*a}}const w=(0,c.c)(),C=(0,c.c)(),R=(0,a.c)(),S={horizontal:1,vertical:1}},56493:(t,n,r)=>{r.d(n,{To:()=>A,Yk:()=>g,Iz:()=>m,M2:()=>F,wi:()=>E,XO:()=>b,w9:()=>P,zZ:()=>T,VS:()=>_});var e=r(92604),o=r(70586),a=r(21787),i=r(46521),c=r(13598),u=r(17896),s=r(65617),f=r(90411),l=r(24678),h=r(8744),p=r(40488),y=r(56481),d=r(20773);const M=e.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function m(t,n,r,e,o){return B(e)?(v(w.TO_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert spatial reference to PCPF"),o)}function g(t,n,r,e,o){return B(e)?(v(w.FROM_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert to spatial reference from PCPF"),o)}function b(t,n,r){return(0,f.CM)(t,n,0,r,(0,l.rS)(n),0,t.length/3),r}function A(t,n,r){return(0,f.CM)(t,(0,l.rS)(r),0,n,r,0,t.length/3),n}function T(t,n,r){if((0,o.Wi)(t))return n;const e=y.fP.fromTypedArray(t),a=y.fP.fromTypedArray(n);return(0,d.t)(a,e,r),n}function P(t,n,r){if((0,o.Wi)(t))return n;(0,a.a)(O,r);const e=y.ct.fromTypedArray(t),i=y.ct.fromTypedArray(n);return(0,d.a)(i,e,O),(0,a.i)(O)||(0,d.n)(i,i),n}function _(t,n,r){if((0,o.Wi)(t))return n;(0,a.a)(O,r);const e=y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),i=y.ct.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT);if((0,d.a)(i,e,O),(0,a.i)(O)||(0,d.n)(i,i),t!==n)for(let r=3;r<t.length;r+=4)n[r]=t[r];return n}function E(t,n,r,e,o){if(!B(e))return M.error("Cannot convert spatial reference to PCPF"),o;v(w.TO_PCPF,y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function F(t,n,r,e,o){if(!B(e))return M.error("Cannot convert to spatial reference from PCPF"),o;v(w.FROM_PCPF,y.ct.fromTypedArray(t,16),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,16));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function v(t,n,r,e,o,i){if(!n)return;const c=r.count,s=(0,l.rS)(o);if(x(o))for(let r=0;r<c;r++)e.getVec(r,R),n.getVec(r,S),(0,f.Bm)(s,R,I,s),(0,a.f)(O,I),t===w.FROM_PCPF&&(0,a.t)(O,O),(0,u.t)(S,S,O),i.setVec(r,S);else for(let o=0;o<c;o++){e.getVec(o,R),n.getVec(o,S),(0,f.Bm)(s,R,I,s),(0,a.f)(O,I);const c=(0,p.mZ)(r.get(o,1));let l=Math.cos(c);t===w.TO_PCPF&&(l=1/l),O[0]*=l,O[1]*=l,O[2]*=l,O[3]*=l,O[4]*=l,O[5]*=l,t===w.FROM_PCPF&&(0,a.t)(O,O),(0,u.t)(S,S,O),(0,u.n)(S,S),i.setVec(o,S)}return i}function B(t){return x(t)||function(t){return t.isWebMercator}(t)}function x(t){return t.isWGS84||(0,h.yW)(t)||(0,h.BZ)(t)||(0,h.V2)(t)}var w,C;(C=w||(w={}))[C.TO_PCPF=0]="TO_PCPF",C[C.FROM_PCPF=1]="FROM_PCPF";const R=(0,s.c)(),S=(0,s.c)(),I=(0,c.c)(),O=(0,i.c)()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,n,r)=>{r.d(n,{a:()=>c,f:()=>o,i:()=>s,t:()=>a});var e=r(46851);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function i(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1],y=r[2],d=r[3],M=r[4],m=r[5],g=r[6],b=r[7],A=r[8];return t[0]=h*e+p*i+y*s,t[1]=h*o+p*c+y*f,t[2]=h*a+p*u+y*l,t[3]=d*e+M*i+m*s,t[4]=d*o+M*c+m*f,t[5]=d*a+M*u+m*l,t[6]=g*e+b*i+A*s,t[7]=g*o+b*c+A*f,t[8]=g*a+b*u+A*l,t}function c(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=n[9],h=n[10],p=n[11],y=n[12],d=n[13],M=n[14],m=n[15],g=r*c-e*i,b=r*u-o*i,A=r*s-a*i,T=e*u-o*c,P=e*s-a*c,_=o*s-a*u,E=f*d-l*y,F=f*M-h*y,v=f*m-p*y,B=l*M-h*d,x=l*m-p*d,w=h*m-p*M;let C=g*w-b*x+A*B+T*v-P*F+_*E;return C?(C=1/C,t[0]=(c*w-u*x+s*B)*C,t[1]=(u*v-i*w-s*F)*C,t[2]=(i*x-c*v+s*E)*C,t[3]=(o*x-e*w-a*B)*C,t[4]=(r*w-o*v+a*F)*C,t[5]=(e*v-r*x-a*E)*C,t[6]=(d*_-M*P+m*T)*C,t[7]=(M*A-y*_-m*b)*C,t[8]=(y*P-d*A+m*g)*C,t):null}function u(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}function s(t){const n=e.E,r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8];return Math.abs(1-(r*r+i*i+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(a*a+u*u+l*l))<=n}const f=i,l=u;Object.freeze({__proto__:null,fromMat4:o,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},set:function(t,n,r,e,o,a,i,c,u,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=u,t[8]=s,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:a,invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u;let y=r*l+e*h+o*p;return y?(y=1/y,t[0]=l*y,t[1]=(-f*e+o*s)*y,t[2]=(c*e-o*i)*y,t[3]=h*y,t[4]=(f*r-o*u)*y,t[5]=(-c*r+o*a)*y,t[6]=p*y,t[7]=(-s*r+e*u)*y,t[8]=(i*r-e*a)*y,t):null},adjoint:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8];return t[0]=i*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*i,t[3]=c*u-a*f,t[4]=r*f-o*u,t[5]=o*a-r*c,t[6]=a*s-i*u,t[7]=e*u-r*s,t[8]=r*i-e*a,t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],a=t[4],i=t[5],c=t[6],u=t[7],s=t[8];return n*(s*a-i*u)+r*(-s*o+i*c)+e*(u*o-a*c)},multiply:i,translate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1];return t[0]=e,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=u,t[6]=h*e+p*i+s,t[7]=h*o+p*c+f,t[8]=h*a+p*u+l,t},rotate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=Math.sin(r),p=Math.cos(r);return t[0]=p*e+h*i,t[1]=p*o+h*c,t[2]=p*a+h*u,t[3]=p*i-h*e,t[4]=p*c-h*o,t[5]=p*u-h*a,t[6]=s,t[7]=f,t[8]=l,t},scale:function(t,n,r){const e=r[0],o=r[1],a=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t},scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromQuat:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r+r,c=e+e,u=o+o,s=r*i,f=e*i,l=e*c,h=o*i,p=o*c,y=o*u,d=a*i,M=a*c,m=a*u;return t[0]=1-l-y,t[3]=f-m,t[6]=h+M,t[1]=f+m,t[4]=1-s-y,t[7]=p-d,t[2]=h-M,t[5]=p+d,t[8]=1-s-l,t},normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[4],i=n[5],c=n[6],u=n[8],s=n[9],f=n[10],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u,y=r*l+e*h+o*p;if(!y)return null;const d=1/y;return t[0]=l*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*i)*d,t[3]=h*d,t[4]=(f*r-o*u)*d,t[5]=(-c*r+o*a)*d,t[6]=p*d,t[7]=(-s*r+e*u)*d,t[8]=(i*r-e*a)*d,t},normalFromMat4:c,projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},subtract:u,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},equals:function(t,n){const r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8],h=n[0],p=n[1],y=n[2],d=n[3],M=n[4],m=n[5],g=n[6],b=n[7],A=n[8];return Math.abs(r-h)<=e.E*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-p)<=e.E*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-y)<=e.E*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(i-d)<=e.E*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(c-M)<=e.E*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-m)<=e.E*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-g)<=e.E*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(f-b)<=e.E*Math.max(1,Math.abs(f),Math.abs(b))&&Math.abs(l-A)<=e.E*Math.max(1,Math.abs(l),Math.abs(A))},isOrthoNormal:s,mul:f,sub:l})},46521:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n){return new Float64Array(t,n,9)}r.d(n,{a:()=>o,c:()=>e}),Object.freeze({__proto__:null,create:e,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},fromValues:function(t,n,r,e,o,a,i,c,u){return[t,n,r,e,o,a,i,c,u]},createView:o})},13598:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,n){return new Float64Array(t,n,16)}r.d(n,{I:()=>i,a:()=>a,b:()=>o,c:()=>e});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d){return[t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d]},createView:a,IDENTITY:i})},51305:(t,n,r)=>{r.d(n,{c:()=>p,g:()=>f,j:()=>x,k:()=>d,m:()=>l,s:()=>s});var e=r(46521),o=r(94961),a=r(65617),i=r(46851),c=r(17896),u=r(98766);function s(t,n,r){r*=.5;const e=Math.sin(r);return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=Math.cos(r),t}function f(t,n){const r=2*Math.acos(n[3]),e=Math.sin(r/2);return e>i.E?(t[0]=n[0]/e,t[1]=n[1]/e,t[2]=n[2]/e):(t[0]=1,t[1]=0,t[2]=0),r}function l(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=r[0],u=r[1],s=r[2],f=r[3];return t[0]=e*f+i*c+o*s-a*u,t[1]=o*f+i*u+a*c-e*s,t[2]=a*f+i*s+e*u-o*c,t[3]=i*f-e*c-o*u-a*s,t}function h(t,n,r,e){const o=n[0],a=n[1],c=n[2],u=n[3];let s,f,l,h,p,y=r[0],d=r[1],M=r[2],m=r[3];return f=o*y+a*d+c*M+u*m,f<0&&(f=-f,y=-y,d=-d,M=-M,m=-m),1-f>i.E?(s=Math.acos(f),l=Math.sin(s),h=Math.sin((1-e)*s)/l,p=Math.sin(e*s)/l):(h=1-e,p=e),t[0]=h*o+p*y,t[1]=h*a+p*d,t[2]=h*c+p*M,t[3]=h*u+p*m,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function y(t,n){const r=n[0]+n[4]+n[8];let e;if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{let r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;e=Math.sqrt(n[3*r+r]-n[3*o+o]-n[3*a+a]+1),t[r]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+r]+n[3*r+o])*e,t[a]=(n[3*a+r]+n[3*r+a])*e}return t}function d(t,n,r,e){const o=.5*Math.PI/180;n*=o,r*=o,e*=o;const a=Math.sin(n),i=Math.cos(n),c=Math.sin(r),u=Math.cos(r),s=Math.sin(e),f=Math.cos(e);return t[0]=a*u*f-i*c*s,t[1]=i*c*f+a*u*s,t[2]=i*u*s-a*c*f,t[3]=i*u*f+a*c*s,t}const M=u.c,m=u.s,g=u.a,b=l,A=u.b,T=u.d,P=u.l,_=u.e,E=_,F=u.f,v=F,B=u.n,x=u.g,w=u.h,C=(0,a.c)(),R=(0,a.f)(1,0,0),S=(0,a.f)(0,1,0),I=(0,o.a)(),O=(0,o.a)(),z=(0,e.c)();Object.freeze({__proto__:null,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:s,getAxisAngle:f,multiply:l,rotateX:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+i*c,t[1]=o*u+a*c,t[2]=a*u-o*c,t[3]=i*u-e*c,t},rotateY:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u-a*c,t[1]=o*u+i*c,t[2]=a*u+e*c,t[3]=i*u-o*c,t},rotateZ:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+o*c,t[1]=o*u-e*c,t[2]=a*u+i*c,t[3]=i*u-a*c,t},calculateW:function(t,n){const r=n[0],e=n[1],o=n[2];return t[0]=r,t[1]=e,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-e*e-o*o)),t},slerp:h,random:function(t){const n=(0,i.R)(),r=(0,i.R)(),e=(0,i.R)(),o=Math.sqrt(1-n),a=Math.sqrt(n);return t[0]=o*Math.sin(2*Math.PI*r),t[1]=o*Math.cos(2*Math.PI*r),t[2]=a*Math.sin(2*Math.PI*e),t[3]=a*Math.cos(2*Math.PI*e),t},invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r*r+e*e+o*o+a*a,c=i?1/i:0;return t[0]=-r*c,t[1]=-e*c,t[2]=-o*c,t[3]=a*c,t},conjugate:p,fromMat3:y,fromEuler:d,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},copy:M,set:m,add:g,mul:b,scale:A,dot:T,lerp:P,length:_,len:E,squaredLength:F,sqrLen:v,normalize:B,exactEquals:x,equals:w,rotationTo:function(t,n,r){const e=(0,c.d)(n,r);return e<-.999999?((0,c.c)(C,R,n),(0,c.u)(C)<1e-6&&(0,c.c)(C,S,n),(0,c.n)(C,C),s(t,C,Math.PI),t):e>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.c)(C,n,r),t[0]=C[0],t[1]=C[1],t[2]=C[2],t[3]=1+e,B(t,t))},sqlerp:function(t,n,r,e,o,a){return h(I,n,o,a),h(O,r,e,a),h(t,I,O,2*a*(1-a)),t},setAxes:function(t,n,r,e){const o=z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=e[0],o[4]=e[1],o[7]=e[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],B(t,y(t,o))}})},94961:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,n){return new Float64Array(t,n,4)}r.d(n,{I:()=>i,a:()=>e,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e){return[t,n,r,e]},createView:a,IDENTITY:i})},20773:(t,n,r)=>{r.d(n,{a:()=>a,b:()=>u,n:()=>c,s:()=>i,t:()=>o});var e=r(72220);function o(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[4],s=r[5],f=r[6],l=r[8],h=r[9],p=r[10],y=r[12],d=r[13],M=r[14],m=t.typedBuffer,g=t.typedBufferStride,b=n.typedBuffer,A=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*g,r=t*A,e=b[r],o=b[r+1],T=b[r+2];m[n]=a*e+u*o+l*T+y,m[n+1]=i*e+s*o+h*T+d,m[n+2]=c*e+f*o+p*T+M}}function a(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=r[8],y=t.typedBuffer,d=t.typedBufferStride,M=n.typedBuffer,m=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*d,r=t*m,e=M[r],o=M[r+1],g=M[r+2];y[n]=a*e+u*o+l*g,y[n+1]=i*e+s*o+h*g,y[n+2]=c*e+f*o+p*g}}function i(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=r*i[e],o[n+1]=r*i[e+1],o[n+2]=r*i[e+2]}}function c(t,n){const r=Math.min(t.count,n.count),e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*o,r=t*i,c=a[r],u=a[r+1],s=a[r+2],f=Math.sqrt(c*c+u*u+s*s);if(f>0){const t=1/f;e[n]=t*c,e[n+1]=t*u,e[n+2]=t*s}}}function u(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=i[e]>>r,o[n+1]=i[e+1]>>r,o[n+2]=i[e+2]>>r}}Object.freeze({__proto__:null,transformMat4:o,transformMat3:a,scale:i,normalize:c,shiftRight:u})},56067:(t,n,r)=>{function e(t,n,r){const e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride,c=r?r.count:n.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,s=(r&&r.srcIndex?r.srcIndex:0)*i;for(let t=0;t<c;++t)e[u]=a[s],e[u+1]=a[s+1],e[u+2]=a[s+2],u+=o,s+=i}function o(t,n,r,e,o){var a,i;const c=t.typedBuffer,u=t.typedBufferStride,s=null!=(a=null==o?void 0:o.count)?a:t.count;let f=(null!=(i=null==o?void 0:o.dstIndex)?i:0)*u;for(let t=0;t<s;++t)c[f]=n,c[f+1]=r,c[f+2]=e,f+=u}r.d(n,{c:()=>e,f:()=>o}),Object.freeze({__proto__:null,copy:e,fill:o})},2674:(t,n,r)=>{r.d(n,{Z:()=>T});var e,o=r(43697),a=r(96674),i=r(70586),c=r(5600),u=(r(67676),r(80442),r(75215),r(52011)),s=r(52138),f=r(13598),l=r(17896),h=r(65617),p=r(13473),y=r(44547),d=r(24678),M=r(3709),m=r(56481),g=r(20773),b=r(56067);let A=e=class extends a.wq{constructor(t){super(t),this.origin=(0,h.c)(),this.translation=(0,h.c)(),this.rotation=(0,M.Ue)(),this.scale=(0,h.f)(1,1,1),this.geographic=!0}get localMatrix(){const t=(0,f.c)();return(0,s.u)(t,this.scale),(0,s.e)(t,t,(0,M.WH)(this.rotation),(0,M.ZZ)(this.rotation)),(0,s.j)(t,t,this.translation),t}get localMatrixInverse(){return(0,s.a)((0,f.c)(),this.localMatrix)}applyLocal(t,n){return(0,l.m)(n,t,this.localMatrix)}applyLocalInverse(t,n){return(0,l.m)(n,t,this.localMatrixInverse)}project(t,n){const r=new Float64Array(t.length),e=m.fP.fromTypedArray(r),o=m.fP.fromTypedArray(t);if(this.geographic){const t=(0,d.rS)(n),a=(0,f.c)();return(0,y.Bm)(n,this.origin,a,t),(0,s.m)(a,a,this.localMatrix),(0,g.t)(e,o,a),(0,y.CM)(r,t,0,r,n,0,r.length/3),r}const{localMatrix:a,origin:i}=this;(0,s.v)(a,f.I)?(0,b.c)(e,o):(0,g.t)(e,o,a);for(let t=0;t<r.length;t+=3)r[t+0]+=i[0],r[t+1]+=i[1],r[t+2]+=i[2];return r}getOriginPoint(t){const[n,r,e]=this.origin;return new p.Z({x:n,y:r,z:e,spatialReference:t})}equals(t){return(0,i.pC)(t)&&this.geographic===t.geographic&&(0,l.k)(this.origin,t.origin)&&(0,s.w)(this.localMatrix,t.localMatrix)}clone(){const t={origin:(0,h.a)(this.origin),translation:(0,h.a)(this.translation),rotation:(0,M.Ue)(this.rotation),scale:(0,h.a)(this.scale),geographic:this.geographic};return new e(t)}};(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"origin",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"translation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"rotation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"scale",void 0),(0,o._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{write:!0}})],A.prototype,"geographic",void 0),(0,o._)([(0,c.Cb)()],A.prototype,"localMatrix",null),(0,o._)([(0,c.Cb)()],A.prototype,"localMatrixInverse",null),A=e=(0,o._)([(0,u.j)("esri.geometry.support.MeshTransform")],A);const T=A},3709:(t,n,r)=>{r.d(n,{WH:()=>l,ZZ:()=>f,qC:()=>s,Ue:()=>c,uT:()=>u});var e=r(22021),o=r(51305),a=r(94961),i=r(17896);function c(t=h){return[t[0],t[1],t[2],t[3]]}function u(t,n,r=c()){return(0,i.g)(r,t),r[3]=n,r}function s(t,n,r=c()){return(0,o.s)(p,t,l(t)),(0,o.s)(y,n,l(n)),(0,o.m)(p,y,p),function(t,n){return t[3]=n,t}(r,(0,e.BV)((0,o.g)(r,p)))}function f(t){return t}function l(t){return(0,e.Vl)(t[3])}const h=[0,0,1,0],p=(0,a.a)(),y=(0,a.a)();c()},72220:(t,n,r)=>{r.d(n,{c:()=>e});const e=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,n,r)=>{function e(t,n){var r;return t.isGeographic||t.isWebMercator&&(null==(r=null==n?void 0:n.geographic)||r)}r.d(n,{h:()=>e})},66459:(t,n,r)=>{r.d(n,{iv:()=>M,I5:()=>m,w1:()=>g,FF:()=>b,Yq:()=>A});var e=r(70586),o=r(67900),a=r(46521),i=r(52138),c=r(13598),u=r(21787),s=r(44547),f=r(24678),l=r(2674),h=r(56481),p=r(20773),y=r(13442),d=r(56493);function M(t,n,r){return(0,y.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference,o=F(n,r,w),a=new Float64Array(t.position.length),i=function(t,n,r,e){(0,p.t)(h.fP.fromTypedArray(e),h.fP.fromTypedArray(t),n);const o=new Float64Array(t.length);return(0,d.To)(e,o,r)}(t.position,o,e,a),c=(0,u.a)(R,o);return{position:i,normal:T(i,a,t.normal,c,e),tangent:P(i,a,t.tangent,c,e)}}(t,n,r):function(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=x(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=o[t+0]*u+a,e[t+1]=o[t+1]*u+i,e[t+2]=o[t+2]*s+c;return{position:e,normal:t.normal,tangent:t.tangent}}(t,n,r)}function m(t,n,r){const{position:o,normal:a,tangent:i}=t;if((0,e.Wi)(n))return{position:o,normal:a,tangent:i};const c=n.localMatrix;return M({position:(0,d.zZ)(o,new Float64Array(o.length),c),normal:(0,e.pC)(a)?(0,d.w9)(a,new Float32Array(a.length),c):null,tangent:(0,e.pC)(i)?(0,d.VS)(i,new Float32Array(i.length),c):null},n.getOriginPoint(r),{geographic:n.geographic})}function g(t,n,r){if(null!=r&&r.useTransform){var e;const{position:o,normal:a,tangent:i}=t;return{vertexAttributes:{position:o,normal:a,tangent:i},transform:new l.Z({origin:[n.x,n.y,null!=(e=n.z)?e:0],geographic:(0,y.h)(n.spatialReference,r)})}}return{vertexAttributes:M(t,n,r),transform:null}}function b(t,n,r){return(0,y.h)(n.spatialReference,r)?E(t,n,r):_(t,n,r)}function A(t,n,r,o){if((0,e.Wi)(n))return b(t,r,o);const a=m(t,n,r.spatialReference);return r.equals(n.getOriginPoint(r.spatialReference))?_(a,r,o):(0,y.h)(r.spatialReference,o)?E(a,r,o):_(a,r,o)}function T(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);return(0,p.a)(h.ct.fromTypedArray(i),h.ct.fromTypedArray(r),o),(0,d.Yk)(i,t,n,a,i),i}function P(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);(0,p.a)(h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT),h.ct.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),o);for(let t=3;t<i.length;t+=4)i[t]=r[t];return(0,d.M2)(i,t,n,a,i),i}function _(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=x(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=(o[t+0]-a)/u,e[t+1]=(o[t+1]-i)/u,e[t+2]=(o[t+2]-c)/s;return{position:e,normal:t.normal,tangent:t.tangent}}function E(t,n,r){const e=n.spatialReference;F(n,r,w);const o=(0,i.a)(C,w),a=new Float64Array(t.position.length),c=function(t,n,r,e){const o=(0,d.XO)(t,n,e),a=h.fP.fromTypedArray(o),i=new Float64Array(o.length),c=h.fP.fromTypedArray(i);return(0,p.t)(c,a,r),i}(t.position,e,o,a),s=(0,u.a)(R,o);return{position:c,normal:v(t.normal,t.position,a,e,s),tangent:B(t.tangent,t.position,a,e,s)}}function F(t,n,r){(0,s.Bm)(t.spatialReference,[t.x,t.y,t.z||0],r,(0,f.rS)(t.spatialReference));const{horizontal:e,vertical:o}=x(n?n.unit:null,t.spatialReference);return(0,i.h)(r,r,[e,e,o]),r}function v(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.Iz)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i);return(0,p.a)(c,c,a),i}function B(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.wi)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT);return(0,p.a)(c,c,a),i}function x(t,n){if((0,e.Wi)(t))return S;const r=n.isGeographic?1:(0,o.Z7)(n),a=n.isGeographic?1:(0,o._R)(n),i=(0,o.En)(1,t,"meters");return{horizontal:i*r,vertical:i*a}}const w=(0,c.c)(),C=(0,c.c)(),R=(0,a.c)(),S={horizontal:1,vertical:1}},56493:(t,n,r)=>{r.d(n,{To:()=>A,Yk:()=>g,Iz:()=>m,M2:()=>F,wi:()=>E,XO:()=>b,w9:()=>P,zZ:()=>T,VS:()=>_});var e=r(92604),o=r(70586),a=r(21787),i=r(46521),c=r(13598),u=r(17896),s=r(65617),f=r(44547),l=r(24678),h=r(8744),p=r(40488),y=r(56481),d=r(20773);const M=e.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function m(t,n,r,e,o){return B(e)?(v(w.TO_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert spatial reference to PCPF"),o)}function g(t,n,r,e,o){return B(e)?(v(w.FROM_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert to spatial reference from PCPF"),o)}function b(t,n,r){return(0,f.CM)(t,n,0,r,(0,l.rS)(n),0,t.length/3),r}function A(t,n,r){return(0,f.CM)(t,(0,l.rS)(r),0,n,r,0,t.length/3),n}function T(t,n,r){if((0,o.Wi)(t))return n;const e=y.fP.fromTypedArray(t),a=y.fP.fromTypedArray(n);return(0,d.t)(a,e,r),n}function P(t,n,r){if((0,o.Wi)(t))return n;(0,a.a)(O,r);const e=y.ct.fromTypedArray(t),i=y.ct.fromTypedArray(n);return(0,d.a)(i,e,O),(0,a.i)(O)||(0,d.n)(i,i),n}function _(t,n,r){if((0,o.Wi)(t))return n;(0,a.a)(O,r);const e=y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),i=y.ct.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT);if((0,d.a)(i,e,O),(0,a.i)(O)||(0,d.n)(i,i),t!==n)for(let r=3;r<t.length;r+=4)n[r]=t[r];return n}function E(t,n,r,e,o){if(!B(e))return M.error("Cannot convert spatial reference to PCPF"),o;v(w.TO_PCPF,y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function F(t,n,r,e,o){if(!B(e))return M.error("Cannot convert to spatial reference from PCPF"),o;v(w.FROM_PCPF,y.ct.fromTypedArray(t,16),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,16));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function v(t,n,r,e,o,i){if(!n)return;const c=r.count,s=(0,l.rS)(o);if(x(o))for(let r=0;r<c;r++)e.getVec(r,R),n.getVec(r,S),(0,f.Bm)(s,R,I,s),(0,a.f)(O,I),t===w.FROM_PCPF&&(0,a.t)(O,O),(0,u.t)(S,S,O),i.setVec(r,S);else for(let o=0;o<c;o++){e.getVec(o,R),n.getVec(o,S),(0,f.Bm)(s,R,I,s),(0,a.f)(O,I);const c=(0,p.mZ)(r.get(o,1));let l=Math.cos(c);t===w.TO_PCPF&&(l=1/l),O[0]*=l,O[1]*=l,O[2]*=l,O[3]*=l,O[4]*=l,O[5]*=l,t===w.FROM_PCPF&&(0,a.t)(O,O),(0,u.t)(S,S,O),(0,u.n)(S,S),i.setVec(o,S)}return i}function B(t){return x(t)||function(t){return t.isWebMercator}(t)}function x(t){return t.isWGS84||(0,h.yW)(t)||(0,h.BZ)(t)||(0,h.V2)(t)}var w,C;(C=w||(w={}))[C.TO_PCPF=0]="TO_PCPF",C[C.FROM_PCPF=1]="FROM_PCPF";const R=(0,s.c)(),S=(0,s.c)(),I=(0,c.c)(),O=(0,i.c)()}}]);
|