@arcgis/core 4.34.0-next.56 → 4.34.0-next.57
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/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +4 -0
- package/analysis/VolumeMeasurement/{CutFillOptions.js → VolumeMeasurementCutFillOptions.js} +1 -1
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02902303e5585a16ebea.js +1 -0
- package/assets/esri/core/workers/chunks/02a31483e09652a1a1a2.js +1 -0
- package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +1 -0
- package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +1 -0
- package/assets/esri/core/workers/chunks/04e652df94790f5ca08a.js +1 -0
- package/assets/esri/core/workers/chunks/{9f178cf73c63caaea190.js → 06d2251d6f6b3e44800a.js} +1 -1
- package/assets/esri/core/workers/chunks/07d5e0633cc2f765037f.js +1 -0
- package/assets/esri/core/workers/chunks/{8fa50cac57b6e1ecec76.js → 08393d9cc2ed846dd5b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{18ceea59e469a0f2721b.js → 094c741fa8139c3f40cf.js} +1 -1
- package/assets/esri/core/workers/chunks/0d946a226b846b3c0849.js +1 -0
- package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +1 -0
- package/assets/esri/core/workers/chunks/{6530449cd1975deb61f1.js → 184d3c88ac2fc1d7e2c3.js} +1 -1
- package/assets/esri/core/workers/chunks/1cbd59918c60a1a21494.js +1 -0
- package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +1 -0
- package/assets/esri/core/workers/chunks/{19391d60c76a1dc7c262.js → 2f7e192ee2066f863e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b11476b2004b4db576e.js → 3445ffd752262673fb13.js} +1 -1
- package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +1 -0
- package/assets/esri/core/workers/chunks/{adf11d31f95481f89a55.js → 3b51b61a7b8a1ef87c9b.js} +1 -1
- package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +1 -0
- package/assets/esri/core/workers/chunks/{65e1f5b20a585e04655a.js → 44dc7ec52c4abb700783.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91217d977a6baaee74a.js → 4558f2e3e77831758fdc.js} +1 -1
- package/assets/esri/core/workers/chunks/4753793daf0b7ff8b5ff.js +1 -0
- package/assets/esri/core/workers/chunks/{853b9f29b4d62fa621b9.js → 4d2473e680324dc17cfa.js} +1 -1
- package/assets/esri/core/workers/chunks/52917b753c5ceab0c1f7.js +353 -0
- package/assets/esri/core/workers/chunks/{6940bb6524938894a246.js → 53873f26a2c24cd75e4a.js} +1 -1
- package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +1 -0
- package/assets/esri/core/workers/chunks/{6dc0009889f2b7cc8cff.js → 5691d504ffe5592bc40f.js} +1 -1
- package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +1 -0
- package/assets/esri/core/workers/chunks/5f079be7f322768aef21.js +1 -0
- package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +1 -0
- package/assets/esri/core/workers/chunks/{ad93a2621f75270f06cb.js → 69fbe363bb130fdd8146.js} +1 -1
- package/assets/esri/core/workers/chunks/{722931d1a60be461e521.js → 70cf81ec5a901782d2db.js} +1 -1
- package/assets/esri/core/workers/chunks/{24ac204d8a045aa821be.js → 7388e8c905d93dea1c05.js} +1 -1
- package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +1 -0
- package/assets/esri/core/workers/chunks/76ff7ccfe583927918f3.js +969 -0
- package/assets/esri/core/workers/chunks/{ae73ac81bd10614c2b53.js → 7714228825fb44d506df.js} +1 -1
- package/assets/esri/core/workers/chunks/{6130bc641aa7c1bcaaa8.js → 7c23be93d394f1bee941.js} +1 -1
- package/assets/esri/core/workers/chunks/7c86af4f60cea383ed96.js +1 -0
- package/assets/esri/core/workers/chunks/7eda1c400658b6a99be8.js +1 -0
- package/assets/esri/core/workers/chunks/{97ae2fdb6cb98249f5fa.js → 7f80bbbd0897082c1af3.js} +1 -1
- package/assets/esri/core/workers/chunks/80a69897fa3ce1eaa6e7.js +1 -0
- package/assets/esri/core/workers/chunks/80bd5988180f4618fd61.js +1 -0
- package/assets/esri/core/workers/chunks/{b47688e3263099540873.js → 81e518dd62bd95611d00.js} +1 -1
- package/assets/esri/core/workers/chunks/{10b46438885916d18425.js → 8257352421f453a669e9.js} +1 -1
- package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +1 -0
- package/assets/esri/core/workers/chunks/88a5e7415f8858c454f7.js +1 -0
- package/assets/esri/core/workers/chunks/893e5eb5c028c4704317.js +1 -0
- package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +1 -0
- package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +1 -0
- package/assets/esri/core/workers/chunks/{c7d4c296011c5393bcaa.js → 9275313e0f1f521b2658.js} +1 -1
- package/assets/esri/core/workers/chunks/{e666ca4d14b6490485d6.js → 92b60d4fb09711919601.js} +1 -1
- package/assets/esri/core/workers/chunks/977582cb3c8f17a2cb4c.js +1 -0
- package/assets/esri/core/workers/chunks/{5c556468e2a598ab793a.js → 9940e59033a8a1eff2a9.js} +1 -1
- package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +1 -0
- package/assets/esri/core/workers/chunks/{9928e432b884c75c3436.js → 9d920f3488d59e7f276c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0124b0dd62b331afe58.js → 9fef330b241f958b55df.js} +1 -1
- package/assets/esri/core/workers/chunks/{a778a72456fefdf40115.js → a249e56a0be8cef33ba8.js} +1 -1
- package/assets/esri/core/workers/chunks/a3ee76b7e46d3fba7cf7.js +1 -0
- package/assets/esri/core/workers/chunks/a7530dcb08b43e37bbb2.js +1 -0
- package/assets/esri/core/workers/chunks/{2cda605c302176905e84.js → a96ac5c68d84122e7751.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6bf4f3f6868dc9028e3.js → aab349d4624b78ef429f.js} +1 -1
- package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +1 -0
- package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +1 -0
- package/assets/esri/core/workers/chunks/{d42fd0effc560eefb14b.js → b6a201e86f9caef45ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/bb67d491f62a5cce96cd.js +1 -0
- package/assets/esri/core/workers/chunks/{862fe2f96d4b777ff5b8.js → bbdbb618a18542f7a4a2.js} +1 -1
- package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +1 -0
- package/assets/esri/core/workers/chunks/{6fe738748ce837811ff4.js → bd4125d163f372a7e978.js} +1 -1
- package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +1 -0
- package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +1 -0
- package/assets/esri/core/workers/chunks/{22334a464f798b5279b2.js → c80c032c5b7a11db177a.js} +1 -1
- package/assets/esri/core/workers/chunks/{3490d47cac7c8dec70cd.js → c9c109d43a1e5160955d.js} +2 -2
- package/assets/esri/core/workers/chunks/{4d5abcf57a6ded4750ba.js → cac060a187f3a27a19ba.js} +1 -1
- package/assets/esri/core/workers/chunks/cc748d4f4adb9c584aa4.js +1 -0
- package/assets/esri/core/workers/chunks/cf699b9bb530b87be14c.js +1 -0
- package/assets/esri/core/workers/chunks/d578c3880eaf2dd62324.js +1 -0
- package/assets/esri/core/workers/chunks/{5d331f7628514a572f82.js → d6ab4d55f1023ee6ec6a.js} +1 -1
- package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +1 -0
- package/assets/esri/core/workers/chunks/{4874aabdb5c60ca66216.js → db2b8d8cf7131554cf7e.js} +1 -1
- package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +1 -0
- package/assets/esri/core/workers/chunks/{cb57cdff976d2d4b0b41.js → e1b25b1ce3bd4f0f2cda.js} +1 -1
- package/assets/esri/core/workers/chunks/ef85cd0e82d59db8a26f.js +33 -0
- package/assets/esri/core/workers/chunks/{faf4002f9547a0cc4e33.js → fae6030a81cb91a91b69.js} +1 -1
- package/assets/esri/core/workers/chunks/fd1fdb97a294a1b7041d.js +1 -0
- package/assets/esri/core/workers/chunks/{ff42b24b48019a03d841.js → fe55833c80cf59df9c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff8a4bf1bceb362d67ab.js → ff7962063d132c1ec814.js} +1 -1
- package/config.js +1 -1
- package/geometry/Multipoint.js +1 -1
- package/geometry/support/boundsUtils.js +1 -1
- package/geometry/support/contains.js +1 -1
- package/geometry/support/curves/circleUtils.js +1 -1
- package/geometry/support/curves/circularArcUtils.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/rotate.js +5 -0
- package/geometry/support/extentUtils.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +5 -0
- package/graphic/ImageryTileGraphicOrigin.js +5 -0
- package/graphic/WCSGraphicOrigin.js +5 -0
- package/graphic/isImageryGraphicOrigin.js +5 -0
- package/graphic/isImageryTileGraphicOrigin.js +5 -0
- package/graphic/isWCSGraphicOrigin.js +5 -0
- package/interfaces.d.ts +12 -15
- package/kernel.js +1 -1
- package/layers/CatalogLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroundLayer.js +5 -0
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementComputation.js → VolumeMeasurementCutFillComputation.js} +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementController.js → VolumeMeasurementCutFillController.js} +1 -1
- package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementVisualization.js → VolumeMeasurementCutFillVisualization.js} +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawUtils.js +1 -1
- package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
- package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/analysis/VolumeMeasurement/CutFillOptions.d.ts +0 -4
- package/assets/esri/core/workers/chunks/01e8b9dc77a57d1c2a52.js +0 -1
- package/assets/esri/core/workers/chunks/027cfcde29fe87aa2ffe.js +0 -1
- package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +0 -1
- package/assets/esri/core/workers/chunks/0a4586e596413ef7a4b5.js +0 -1
- package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +0 -1
- package/assets/esri/core/workers/chunks/1166ed298cf5ca7ad444.js +0 -1
- package/assets/esri/core/workers/chunks/13797036850dcc3671c3.js +0 -1
- package/assets/esri/core/workers/chunks/1a2278b9fe9666342728.js +0 -1
- package/assets/esri/core/workers/chunks/1e01aaebdeffdfc0c6bd.js +0 -1
- package/assets/esri/core/workers/chunks/222f981e876f60ae282f.js +0 -1
- package/assets/esri/core/workers/chunks/277941bec15525dbd3a0.js +0 -1
- package/assets/esri/core/workers/chunks/2cb14d040e67a261b31c.js +0 -1
- package/assets/esri/core/workers/chunks/31c088966ccfff2ea1db.js +0 -1
- package/assets/esri/core/workers/chunks/3245d20ea4bb779f87ef.js +0 -1
- package/assets/esri/core/workers/chunks/46a470bea2a3601182dc.js +0 -1
- package/assets/esri/core/workers/chunks/4b58da6cb91f7bf6af8b.js +0 -1
- package/assets/esri/core/workers/chunks/5900dde7a201a7d47469.js +0 -1
- package/assets/esri/core/workers/chunks/5b2ff220aebe464dac23.js +0 -1
- package/assets/esri/core/workers/chunks/5f518931a660b3c4f519.js +0 -1
- package/assets/esri/core/workers/chunks/66f3659ba18f92cd623e.js +0 -1
- package/assets/esri/core/workers/chunks/67355372ac5fd8a15d18.js +0 -1
- package/assets/esri/core/workers/chunks/6801b92bce7a918fda6f.js +0 -1
- package/assets/esri/core/workers/chunks/7b560ac0be93c6aa9940.js +0 -1
- package/assets/esri/core/workers/chunks/7bdfc7c7ce1d94c00745.js +0 -353
- package/assets/esri/core/workers/chunks/83737d86584bf1b32368.js +0 -1
- package/assets/esri/core/workers/chunks/854bfda25bb406814929.js +0 -1
- package/assets/esri/core/workers/chunks/855f25ce748aaef44b1a.js +0 -1
- package/assets/esri/core/workers/chunks/87f68c2b9361bd3f8cac.js +0 -1
- package/assets/esri/core/workers/chunks/9307108821d82c131654.js +0 -1
- package/assets/esri/core/workers/chunks/97a38d700f2cb8807d51.js +0 -1
- package/assets/esri/core/workers/chunks/9e9be7f6ea32957f1088.js +0 -33
- package/assets/esri/core/workers/chunks/af4412e79275c5a87539.js +0 -1
- package/assets/esri/core/workers/chunks/cbec768cd98caff212f2.js +0 -1
- package/assets/esri/core/workers/chunks/d3a7747f23e91d1f1b5e.js +0 -1
- package/assets/esri/core/workers/chunks/d3ae88fcde2d7fb3e2e2.js +0 -1
- package/assets/esri/core/workers/chunks/d81c4afad4abe2d1d0b9.js +0 -1
- package/assets/esri/core/workers/chunks/d87fdc64a5cc6be4bd69.js +0 -1
- package/assets/esri/core/workers/chunks/db5d3feeb61ccb5ede98.js +0 -1
- package/assets/esri/core/workers/chunks/dfb12f42b8d319ffa5fc.js +0 -1
- package/assets/esri/core/workers/chunks/ead1acf95c3385630da8.js +0 -1001
- package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +0 -1
- package/assets/esri/core/workers/chunks/f4d7cbd33ef8710d7316.js +0 -1
- package/assets/esri/core/workers/chunks/f74b0cdc1c2b56bac5f0.js +0 -1
- package/assets/esri/core/workers/chunks/f807e7fc90e0e7ce6b67.js +0 -1
- package/assets/esri/core/workers/chunks/ff4e15a872de94d2b438.js +0 -1
- /package/assets/esri/core/workers/chunks/{3490d47cac7c8dec70cd.js.LICENSE.txt → c9c109d43a1e5160955d.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649,7136],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var s=i(34275),n=i(9093);function r(e){return e<=s.y9?new Array(e).fill(0):new Float64Array(e)}function a(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],h.prototype,"numBins",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],h),h.from=(0,a.dp)(h)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new n(e.getPointX(t),e.getPointY(t),i),r=e.hasZ(t),a=e.hasM(t);return r&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new r(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),n=e.hasM(t),r=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);r.zmin=i.vmin,r.zmax=i.vmax}if(n){const i=e.getMExtent(t);r.mmin=i.vmin,r.mmax=i.vmax}return r}};class n{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class r{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,n){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=n,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>M});var s=i(4718),n=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),d=i(87445),h=i(1873),p=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,l.Wq)(t),n=this.fieldsIndex.get(s),r=n?null:(0,l.j4)(s,i),a=n?n.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}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,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,n=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,c.zD)(r)||(0,c.Ah)(r),o=(0,c.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,h.gJ)(r)}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,d.rb)(r):null)),s&&Number.isFinite(r)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,h.zS)(r,s,i,n)}return r})}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,p.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},d=r.createExecContext(t,l,n);return r.executeFunction(o,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}var m=i(31464),y=i(58727);function g(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var F=i(5834),_=i(59977),v=i(57231),w=i(11440),S=i(60909),I=i(98623),T=i(96285);const R="bin";class M{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,o=new Set;for(const n of s){const{statisticType:s}=n,l="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,m.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,n=A(this.hasZ,this.hasM),{point:r,mode:a}=e,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,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(a,t,this.spatialReference,i),p=new C(null,0),f=new C(null,0),m={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?z:i.lengths;if(p.coords=a,f.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e;for(let i=0;i<a;i++,e+=n){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=f;g.coordsIndex=i===a-1?d:e+n;const F=m;if(!b(m,r,y,g))continue;const _=(r.x-F.x)/o,v=(r.y-F.y)/l,w=_*_+v*v;w<=1&&u.candidates.push(x(s.getObjectId(t),h(F),Math.sqrt(w),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e,m=f;m.coordsIndex=d;for(let i=0;i<a;i++,e+=n){const n=p;if(n.coordsIndex=e,c&&i===a-1&&n.x===m.x&&n.y===m.y)continue;const d=(r.x-n.x)/o,f=(r.y-n.y)/l,y=d*d+f*f;y<=1&&u.candidates.push(g(s.getObjectId(t),h(n),Math.sqrt(y)))}}}else if(d&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*n,!c&&s>1&&i.push(e-n)}for(const e of i){const i=p;i.coordsIndex=e;const n=(r.x-i.x)/o,a=(r.y-i.y)/l,c=n*n+a*a;c<=1&&u.candidates.push(g(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,s){const n=null==s||(0,o.aI)(i,s)?e=>e:e=>(0,m.Cv)(e,i,s),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>n({x:e,y:t,z:i}):({x:e,y:t})=>n({x:e,y:t,z:0}):({x:e,y:t})=>n({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:d}=e,p=this.fieldsIndex.get(t),f=(0,c.vE)(p)||(0,c.zD)(p)||(0,c.Ah)(p),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,h.Vb)({normalizationType:n,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:p?.type},x=(0,c.yM)(p)?(0,h.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:d}):(0,h.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!n,supportsNullCount:y,percentileParams:g,outStatisticTypes:d});return(0,h.oZ)(x,d,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,h.b3)(o);return(0,h.lv)(l,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items),m=(0,h.Rw)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,h.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,h.$y)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,h.FM)(r?.type,a);e.sort((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:d,resultRecordCount:h,resultOffset:p,returnZ:f,returnM:m}=e,y=null!=h&&t.length>(p||0)+h,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:n&&f,objectIdFieldName:r,spatialReference:(0,u.ag)(c||o),transform:d&&(0,a.VV)(d)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:d,resultOffset:h,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=n&&m,x=s&&y;let F=[],_=0;const v=[...t];if(this._sortFeatures(v,r,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of v){const n=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,n,d,e,g,x),metadata:this.featureAdapter.getMetadata?.(s)};t&&n&&!r.geometry&&(r.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),F[_++]=r}else if(!l&&c)for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,g,x),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of v){const t=i.getAttributes(e);t&&(F[_++]={attributes:t})}const w=h||0;if(null!=p){const e=w+p;F=F.slice(w,Math.min(F.length,e))}return F}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=A(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],n=new Map,r=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:h,orderByFields:p,resultRecordCount:m}=e,y=d?.length,g=!!y,x=g?d[0]:null,F=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,f=e,m="exceedslimit"!==p?e.onStatisticField:void 0,_="percentile_disc"===p||"percentile_cont"===p,v="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,w=g&&1===y&&(m===x||F)&&"count"===p;if(g){if(!a.has(m)){const e=[];for(const i of d){const s=this._getAttributeValues(l,i,t,n);e.push(s)}a.set(m,this._calculateUniqueValues(e,t,!v&&l.returnDistinctValues))}const e=a.get(m);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:r,items:a,itemPositions:c}=e[s],p=r.join(",");if(!h||l.validateItems(a,h)){const e=o.get(p)||{attributes:{}};if(v){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,m,t,n),i=c.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;d.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i]),o.set(p,e)}}}else if(v){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,m,t,n);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,c.yM)(this.fieldsIndex.get(m))&&!this._isAnyDateField(m)?null:this.fieldsIndex.get(m)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,p,(e,t)=>e.attributes[t]),m&&(_.length=Math.min(m,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:p,hasM:f}=this,m=t.map(e=>(0,u.pL)(h,p,f,c.getGeometry(e))),y=s(d,m,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,r.v)(y):(0,r.HA)(a(d,m));g.aggregateGeometries={...e,spatialReference:d},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,r.HA)(a(d,m)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,c.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,h.z9)({values:t,returnDistinct:s}):(0,h.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,h.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const n=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,n));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},n=t.length;for(let r=0;r<n;r++){const n=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[n],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(n),s[o].itemPositions.push(r))}return s}async _getDataValues(e,t,i=!0){const n=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?n.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):n.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,n=t.min??0,r=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=n&&o<=r){const e=(0,h.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:n}=t,r=[],a=[{name:s??i,alias:s??i,type:n??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:n}=d[t],o=await this._createBinsResponse(e,n);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(_.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:n,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,h.sU)(c,{field:s,normalizationField:n,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=n.unit,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,c.OH)(this.fieldsIndex.get(s)),p=v.g.toJSON(u),f=d.filter(Boolean).sort((e,t)=>e-t),m=null!=r?(0,y.dO)(r,h):f[0],g=null!=a?(0,y.dO)(a,h):f[f.length-1],x={zone:t.outTimeReference?.ianaTimeZone??I.n$},F=T.c9.fromMillis(m,x),_=T.c9.fromMillis(g,x),w=[];if("last"===o){let e=_;for(;e>F;){const t=e.minus({[p]:n.value});if(t<F){w.unshift([l?t.toMillis():F.toMillis(),e.toMillis()]);break}w.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?F:F.startOf(p);for(;e<=_;){const t=e.plus({[p]:n.value});if(t>_){w.push([e.toMillis(),l?t.toMillis():_.toMillis()]);break}w.push([e.toMillis(),t.toMillis()]),e=t}}const S=this._calculateHistogramBins(d,{intervals:w,min:m,max:g},i);return this._createFeaturesFromHistogramBins(S,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,n=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,c.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,y.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(s)),u=(0,h.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,y.dO)(r,l),maxValue:(0,y.dO)(a,l)},!0),d=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,n=s||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,h=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:p}=i,f={attributes:{}};let m;if(f.attributes[n]=d&&h&&null!=e?T.c9.fromMillis(e,{zone:h}).toISO():e,f.attributes[r]=d&&h&&null!=s?T.c9.fromMillis(s,{zone:h}).toISO():s,l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},p),f.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[R]=++c),m=await this._createStatisticsQueryResponse(t,p,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function b(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=n*n+r*r;if(0===l)return!1;const u=a*n+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+n*c,e.y=i.y+r*c,!0}function A(e,t){return e?t?4:3:t?3:2}class C{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const z=[1]},9093:(e,t,i)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>s,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:n,create:s,fromValues:function(e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m){return[e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m]}},Symbol.toStringTag,{value:"Module"}))},11006:(e,t,i)=>{function s(e,t,i,s,r){n(e,t,i||0,s||e.length-1,r||a)}function n(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(s,Math.floor(t+(o-l)*c/o+d)),a)}var h=e[t],p=i,f=s;for(r(e,i,t),a(e[s],h)>0&&r(e,i,s);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function r(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>S,el:()=>w});var s=i(92602),n=i(49186),r=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),d=i(78888),h=i(65864),p=i(2272),f=i(84952),m=i(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-n)*(a-n)+(o-r)*(o-r)),u=(o-r)/l,c=(a-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+n,o=u*s+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+n,a=u*e+r;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function _(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function v(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],a=(0,l.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(n===i){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let r,g,x,S,I,T,R,M,b=0;const A=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,u.Vp)(r),x=r.isWebMercator,T=x?102100:4326,S=l.j7[T].maxX,I=l.j7[T].minX,R=l.j7[T].plus180Line,M=l.j7[T].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(_(t.clone(),S,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>_(e,S,I)),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,I)*(2*S);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(R)&&r!==S?(b=r>b?r:b,s=F(s,x),A.push(s),C.push("cut")):e.intersects(M)&&n!==I?(b=r*(2*S)>b?r*(2*S):b,s=F(s,x,360),A.push(s),C.push("cut")):C.push(s)}else C.push(t.clone());else C.push(t);else C.push(t);let z=(0,l.kd)(b,S),B=-90;const N=z,G=new o.A;for(;z>0;){const e=360*z-180;G.addPath([[e,B],[e,-1*B]]),B*=-1,z--}if(A.length>0&&N>0){const t=v(A,await async function(e,t,i,s){const n=(0,p.Dl)(e),r=t[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,h.rS)(e);return t.spatialReference=r,t})}}(n,A,G,i)),s=[],r=[];for(let i=0;i<C.length;i++){const n=C[i];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),r.push("simplify")):r.push(x?(0,c.Gh)(n):n)}}if(!s.length)return r;const a=await async function(e,t,i){const s="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,m.V)(o.geometries,r,n)}(n,s,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(x?(0,c.Gh)(a.shift()):a.shift())}return o}const E=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)E.push(t);else{const e=A.shift();E.push(!0===x?(0,c.Gh)(e):e)}}return E}function S(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[n,r]=s.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<n&&(o=-Math.ceil(Math.abs(t-n)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<n&&(l=-Math.ceil(Math.abs(e-n)/a));let c=e+(o-l)*a;const d=c-t;return d>r?c-=a:d<n&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),n=i(44123),r=i(98453);const a=new n.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function h(e,t,i={}){const n=m(t,e);if(!n){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new s.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new s.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function p(e,t,i,s){if(!i)return!0;const n="where clause";return x(e,t,h(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:s}),!0}function f(e,t,i,n,r){if(!i)return!0;const a="having clause",l=h(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,r=e.get(s)?.name;return n.some(t=>{const{onStatisticField:s,statisticType:n}=t,a=e.get(s)?.name;return a===r&&n.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,n={}){const r=new Map;if(function(e,t,i,s,n){const r=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(const n of r)if(t.get(n))F(e,t,i,s,n);else try{const r=h(t,y(n),{validateStandardized:!0});for(const n of r)F(e,t,i,s,n)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(r,e,t,n.allowedFieldTypes??d,i),r.size){const e=n.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:n.query})}}function F(e,t,i,s,n){const a=t.get(n);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>r.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>x});var s=i(4576),n=i(74887),r=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:d(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:d(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function d(e,t){const i=[];for(const s of e)i.push(h(s,t));return i}function h(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=c.bind(null,l.je),m=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?f(e):m(e);return t.spatialReference=i,t}return(0,r.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,n.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:n,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?n(t.map(f)):n(t.map(m)):n((0,r.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function x(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(31635),n=i(69540),r=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const d=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let h=class extends((0,n.O)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],h.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],h.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"value",void 0),(0,s.Cg)([(0,l.e)(d)],h.prototype,"valueType",void 0),h=(0,s.Cg)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],h);const p=h;h.from=(0,c.dp)(h);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),m=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends((0,n.O)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s.Cg)([(0,l.e)(f,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s.Cg)([(0,l.e)(m)],y.prototype,"transformation",void 0),y=(0,s.Cg)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>h,Q:()=>u});var s=i(31635),n=i(66552),r=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&c||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>r});var s=i(66344),n=i(88368);class r{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),n=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>d,pL:()=>c});var s=i(90708),n=i(92722);const r=new n.A,a=new n.A,o=new n.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,n=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&n,l=e.hasM&&r;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,n,r);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,n,u,c,d=t,h=i){const p=t&&d,f=i&&h,m=null!=n?"coords"in n?n:n.geometry:null;if(null==m)return null;if(u){let n=(0,s.kz)(a,m,t,i,e,u,d,h);return c&&(n=(0,s.Nl)(o,n,p,f,e,c)),l[e]?.(n,p,f)??null}if(c){const n=(0,s.Nl)(o,m,t,i,e,c,d,h);return l[e]?.(n,p,f)??null}return(0,s.Q4)(r,m,t,i,d,h),l[e]?.(r,p,f)??null}function d(e){return e&&h in e?JSON.parse(JSON.stringify(e,p)):e}const h="_geVersion",p=(e,t)=>e===h?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>n})},56390:(e,t,i)=>{i.d(t,{do:()=>L,Wc:()=>$});var s=i(4576),n=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),d=i(98988),h=i(70328),p=i(19419),f=i(537),m=i(65864),y=i(17136),g=i(21325),x=i(90708),F=i(29441),_=i(51441),v=i(31464);class w{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let S=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=S++}}var T=i(99352),R=i(8384),M=i(58727),b=i(62660),A=i(43668);const C="unsupported-query";async function z(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:n}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(C,"Unsupported query options",{query:e});return B(t,n,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:n,having:a}=i,o=n?.length,l=s?.length;if(a){if(!o||!l)throw new r.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,F.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,F.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,F.MG)(e,t,n,{expressionName:"groupByFieldsForStatistics",query:i});for(const n of s){const{onStatisticField:s,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,F.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:N,query:i});else{const{statisticParameters:e}=n;if(!e)throw new r.A(C,"statisticParameters should be set for percentile type",{definition:n,query:i})}}}var u}(t,n,e),Promise.all([(0,b.c0)(e,i,s),(0,v.Nk)(s,e.outSR)]).then(()=>e)}function B(e,t,i){const{returnDistinctValues:s,outStatistics:n}=i,a=n?n.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",n=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!a.includes(e));(0,F.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,F.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new r.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,F.SN)(e,t,i.where,i)}const N=new Set([...F.vl,...F.VW]);async function G(e,t,i,s){let n=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,A.l)();n=e.extractFieldNames(i.valueExpression)}if(i.field&&n.push(i.field),i.field2&&n.push(i.field2),i.field3&&n.push(i.field3),i.normalizationField&&n.push(i.normalizationField),!n.length&&!i.valueExpression)throw new r.A(C,"field or valueExpression is required",{params:i});(0,F.MG)(e,t,n,{expressionName:"statistics",query:s})}var E=i(86420),q=i(95466),O=(i(53966),i(36708),i(44794),i(78659)),D=i(31635),P=i(65008),Z=i(10107),V=(i(87811),i(40608));let Q=class extends P.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Q=(0,D.Cg)([(0,V.$)("esri.views.support.debugFlags")],Q),new Q,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["Graphics3D filter visibility",4],["Graphics3D scale visibility",4],["Graphics3D frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,O.l5)(6.5),(0,O.l5)(1),(0,O.l5)(30),(0,O.l5)(1e3/30),(0,O.l5)(100);const j=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};j.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(j))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(j);for(;;){const e=s.next(j),n=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e);return s.return(null),t}throw s.throw(e),e}if(n.done)return n.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:T.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new w,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:q.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,E.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==M.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const n=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:n}}catch(e){if(e===M.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===M.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,M.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(C,"Unsupported query options",{query:e});return z(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==M.v8)throw i;t=new R.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:n,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:n,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:n,vertexMode:r}=e;if(!n&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,M.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await z(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,g.aI)(i.spatialReference,this.spatialReference);l&&(await(0,v.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=l?(0,v.Cv)(d,this.spatialReference):d;if(!h)return{candidates:[]};const p=(await(0,y.el)((0,m.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,y.el)((0,m.rS)(h),null,{signal:t}))[0];if(yield,null==p||null==f)return{candidates:[]};const x=await this._searchFeatures(H(f.toJSON()));yield;const F=new R.G(x,o,this);this._executeObjectIdsQuery(F),yield,this._executeTimeQuery(F),yield,this._executeAttributesQuery(F),yield,yield*this._executeGeometryQueryForSnapping(F),yield;const _=p.toJSON(),w=l?(0,v.Cv)(_,this.spatialReference):_,S=l?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:s;return F.createSnappingResponse({...e,point:w,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,h.hZ)((0,h.vt)(),h.qv);return await this.featureStore.forEachBounds(e,e=>(0,h.RF)(s,e)),$(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new R.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,n=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==n||(0,g.aI)(n,r.spatialReference)?r:(0,v.Cv)(r,n);if(!a)return null;const o=i||s,l=(0,g.fn)(t)&&!(0,g.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(H(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,b.xt)("esriSpatialRelDisjoint",a,this.geometryType,this.hasZ,this.hasM);yield;const n=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,n);yield;const o=new R.G(r,e,this);return await l(o)}if(!c.length)return new R.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new R.G(c,e,this));const d=await(0,b.xt)("esriSpatialRelContains",a,this.geometryType,this.hasZ,this.hasM);yield;const h=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new R.G(h,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:n,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new R.G(l,e,this);const u=(0,g.fn)(n)&&!(0,g.aI)(this.spatialReference,n),c=r||a,d=async e=>(u&&c&&await this._project(e,n),o&&this._cache.put(o,e.items),e),h=this.featureStore.featureSpatialReference,p=!i||null==h||(0,g.aI)(h,i.spatialReference)?i:(0,v.Cv)(i,h);if(!p)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(H(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const n=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const r=e=>!i.has(f.getObjectId(e))||n(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,r);yield;const o=new R.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new R.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(p,e))return await d(new R.G(m,e,this));const x=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const F=yield*this._runSpatialFilter(m,e=>x(f.getGeometry(e)));return yield,await d(new R.G(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,E.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,F.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,b.xt)(i,t.geometry,this.geometryType,this.hasZ,this.hasM);yield;const n=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>s(n.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const n of e)t(n)&&s.push(n),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),o=r.get(e);(!o||s>a(o,n))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:n,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||n;return(0,g.fn)(r)&&!(0,g.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,g.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,d.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,v.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e))),this.spatialReference,t,s);return e.items=(0,n.zI)(r.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,x.Ux)(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:n,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(C,"Unsupported query options",{query:e});return B(i,a,e),Promise.all([G(i,a,t,e),(0,b.c0)(e,s,n),(0,v.Nk)(n,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==M.v8)throw t;return new R.G([],e,this)}}get test(){}}function H(e){if((0,b.tC)(e)){if((0,m.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,p.fA)(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,f.Rg)((0,p.vt)(),e)]}function $(e,t,i,s,n){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(s)};n&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,v.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>F,iJ:()=>m,v8:()=>p});var s=i(49186),n=i(66552),r=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),d=i(31464);const h=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),f="frequency";async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:f}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[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),g(e,t,i)}async function g(e,t,n){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let f=await async function(e){const{distance:t,units:n}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=n?h.fromJSON(n):(0,r.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,d.Nk)(o,c.KK).then(()=>(0,d.Cv)(a,c.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(p,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;f=(0,o.HA)(f),f.spatialReference=t}if(f){await(0,d.Nk)(f.spatialReference,n),f=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(f,n);const t=(await(0,u.el)((0,l.rS)(f)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(f,n)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,d.Cv)(r,r.spatialReference,n,s);if(!a)throw p;a.spatialReference=n,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function F(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>g});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),d=i(25482),h=i(57231);let p=class extends((0,c.O)(d.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,o.e)(h.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function m(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function y(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let g=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>y(t,"end")},write:{writer:m}}})],g.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,s.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>y(t,"start")},write:{writer:m}}})],g.prototype,"start",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,s.Cg)([(0,o.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],g),g.from=(0,a.dp)(g)},60909:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],h.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],h),h.from=(0,a.dp)(h)},62660:(e,t,i)=>{i.d(t,{tC:()=>v,c0:()=>_,xt:()=>F});var s=i(49186),n=i(94078),r=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=l(n,r),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,o[n],o[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=d(u,a,r,c,e,s,n),c+=e*r;return u}function d(e,t,i,s,n,r,a){let o=e,l=s;for(let e=s,u=s+n*i;e<u;e+=i){l=e+i,l===u&&(l=s);const n=t[e],c=t[e+1],d=t[l],h=t[l+1];(c<a&&h>=a||h<a&&c>=a)&&n+(a-c)/(h-c)*(d-n)<r&&(o=!o)}return o}var h=i(90708),p=i(92722),f=i(51441),m=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},x={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function F(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,h.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,h.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,f.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,f.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?r.xB:(0,r.xK)(l);return n=>e(t,(0,f.pL)(i,s,o,n))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const d=await function(e){const t=x[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>d.execute(t,(0,f.pL)(i,s,o,e))}async function _(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(n))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(r))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m.Nk)(e.geometry?.spatialReference,e.outSR)}}}function v(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(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}},70328:(e,t,i)=>{i.d(t,{BI:()=>F,DC:()=>d,Ej:()=>p,Ie:()=>g,Jt:()=>x,Ne:()=>f,RF:()=>c,aI:()=>v,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>h,is:()=>_,qv:()=>w,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var s=i(5443),n=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=n,o[5]=a,o}function o(e,t=r()){return function(e,t,i,s=r()){return y(s,w),function(e,t,i=0,s=t.length/3){let n=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)n=Math.min(n,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,s,r,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=r,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=r,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,w):r(w)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function F(e,t,i,s,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),n=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>n});var s=i(21818);async function n(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:n,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(n&&r)await t.forEach(e=>{const t=i.getAttribute((0,s.zI)(e),n),l=i.getAttribute((0,s.zI)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=n||r;await t.forEach(t=>{const n=i.getAttribute((0,s.zI)(t),e);null==n||isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=n)&&(null==o||o>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(o,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(o,s||n,r,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>n});var s=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function r(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),n=i(53966),r=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),d=i(96285);const h=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(s,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?d.mQ.utcInstance:(0,r.tE)(h,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:n}=e,r=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):o??u.n$:null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,h=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(r),d],[f(a),d]]);for(const{name:s,type:n}of e.fields)if(y.has(n))t.set(s,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=h.get(f(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649,7136],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var s=i(34275),n=i(9093);function r(e){return e<=s.y9?new Array(e).fill(0):new Float64Array(e)}function a(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],h.prototype,"numBins",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],h),h.from=(0,a.dp)(h)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new n(e.getPointX(t),e.getPointY(t),i),r=e.hasZ(t),a=e.hasM(t);return r&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new r(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),n=e.hasM(t),r=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);r.zmin=i.vmin,r.zmax=i.vmax}if(n){const i=e.getMExtent(t);r.mmin=i.vmin,r.mmax=i.vmax}return r}};class n{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class r{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,n){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=n,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>M});var s=i(4718),n=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),d=i(87445),h=i(1873),p=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,l.Wq)(t),n=this.fieldsIndex.get(s),r=n?null:(0,l.j4)(s,i),a=n?n.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}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,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,n=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,c.zD)(r)||(0,c.Ah)(r),o=(0,c.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,h.gJ)(r)}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,d.rb)(r):null)),s&&Number.isFinite(r)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,h.zS)(r,s,i,n)}return r})}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,p.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},d=r.createExecContext(t,l,n);return r.executeFunction(o,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}var m=i(31464),y=i(58727);function g(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var F=i(5834),_=i(59977),v=i(57231),w=i(11440),S=i(60909),I=i(98623),T=i(96285);const R="bin";class M{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,o=new Set;for(const n of s){const{statisticType:s}=n,l="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,m.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,n=A(this.hasZ,this.hasM),{point:r,mode:a}=e,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,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(a,t,this.spatialReference,i),p=new C(null,0),f=new C(null,0),m={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?z:i.lengths;if(p.coords=a,f.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e;for(let i=0;i<a;i++,e+=n){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=f;g.coordsIndex=i===a-1?d:e+n;const F=m;if(!b(m,r,y,g))continue;const _=(r.x-F.x)/o,v=(r.y-F.y)/l,w=_*_+v*v;w<=1&&u.candidates.push(x(s.getObjectId(t),h(F),Math.sqrt(w),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e,m=f;m.coordsIndex=d;for(let i=0;i<a;i++,e+=n){const n=p;if(n.coordsIndex=e,c&&i===a-1&&n.x===m.x&&n.y===m.y)continue;const d=(r.x-n.x)/o,f=(r.y-n.y)/l,y=d*d+f*f;y<=1&&u.candidates.push(g(s.getObjectId(t),h(n),Math.sqrt(y)))}}}else if(d&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*n,!c&&s>1&&i.push(e-n)}for(const e of i){const i=p;i.coordsIndex=e;const n=(r.x-i.x)/o,a=(r.y-i.y)/l,c=n*n+a*a;c<=1&&u.candidates.push(g(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,s){const n=null==s||(0,o.aI)(i,s)?e=>e:e=>(0,m.Cv)(e,i,s),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>n({x:e,y:t,z:i}):({x:e,y:t})=>n({x:e,y:t,z:0}):({x:e,y:t})=>n({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:d}=e,p=this.fieldsIndex.get(t),f=(0,c.vE)(p)||(0,c.zD)(p)||(0,c.Ah)(p),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,h.Vb)({normalizationType:n,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:p?.type},x=(0,c.yM)(p)?(0,h.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:d}):(0,h.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!n,supportsNullCount:y,percentileParams:g,outStatisticTypes:d});return(0,h.oZ)(x,d,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,h.b3)(o);return(0,h.lv)(l,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items),m=(0,h.Rw)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,h.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,h.$y)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,h.FM)(r?.type,a);e.sort((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:d,resultRecordCount:h,resultOffset:p,returnZ:f,returnM:m}=e,y=null!=h&&t.length>(p||0)+h,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:n&&f,objectIdFieldName:r,spatialReference:(0,u.ag)(c||o),transform:d&&(0,a.VV)(d)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:d,resultOffset:h,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=n&&m,x=s&&y;let F=[],_=0;const v=[...t];if(this._sortFeatures(v,r,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of v){const n=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,n,d,e,g,x),metadata:this.featureAdapter.getMetadata?.(s)};t&&n&&!r.geometry&&(r.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),F[_++]=r}else if(!l&&c)for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,g,x),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of v){const t=i.getAttributes(e);t&&(F[_++]={attributes:t})}const w=h||0;if(null!=p){const e=w+p;F=F.slice(w,Math.min(F.length,e))}return F}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=A(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],n=new Map,r=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:h,orderByFields:p,resultRecordCount:m}=e,y=d?.length,g=!!y,x=g?d[0]:null,F=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,f=e,m="exceedslimit"!==p?e.onStatisticField:void 0,_="percentile_disc"===p||"percentile_cont"===p,v="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,w=g&&1===y&&(m===x||F)&&"count"===p;if(g){if(!a.has(m)){const e=[];for(const i of d){const s=this._getAttributeValues(l,i,t,n);e.push(s)}a.set(m,this._calculateUniqueValues(e,t,!v&&l.returnDistinctValues))}const e=a.get(m);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:r,items:a,itemPositions:c}=e[s],p=r.join(",");if(!h||l.validateItems(a,h)){const e=o.get(p)||{attributes:{}};if(v){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,m,t,n),i=c.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;d.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i]),o.set(p,e)}}}else if(v){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,m,t,n);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,c.yM)(this.fieldsIndex.get(m))&&!this._isAnyDateField(m)?null:this.fieldsIndex.get(m)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,p,(e,t)=>e.attributes[t]),m&&(_.length=Math.min(m,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:p,hasM:f}=this,m=t.map(e=>(0,u.pL)(h,p,f,c.getGeometry(e))),y=s(d,m,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,r.v)(y):(0,r.HA)(a(d,m));g.aggregateGeometries={...e,spatialReference:d},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,r.HA)(a(d,m)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,c.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,h.z9)({values:t,returnDistinct:s}):(0,h.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,h.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const n=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,n));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},n=t.length;for(let r=0;r<n;r++){const n=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[n],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(n),s[o].itemPositions.push(r))}return s}async _getDataValues(e,t,i=!0){const n=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?n.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):n.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,n=t.min??0,r=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=n&&o<=r){const e=(0,h.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:n}=t,r=[],a=[{name:s??i,alias:s??i,type:n??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:n}=d[t],o=await this._createBinsResponse(e,n);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(_.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:n,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,h.sU)(c,{field:s,normalizationField:n,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=n.unit,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,c.OH)(this.fieldsIndex.get(s)),p=v.g.toJSON(u),f=d.filter(Boolean).sort((e,t)=>e-t),m=null!=r?(0,y.dO)(r,h):f[0],g=null!=a?(0,y.dO)(a,h):f[f.length-1],x={zone:t.outTimeReference?.ianaTimeZone??I.n$},F=T.c9.fromMillis(m,x),_=T.c9.fromMillis(g,x),w=[];if("last"===o){let e=_;for(;e>F;){const t=e.minus({[p]:n.value});if(t<F){w.unshift([l?t.toMillis():F.toMillis(),e.toMillis()]);break}w.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?F:F.startOf(p);for(;e<=_;){const t=e.plus({[p]:n.value});if(t>_){w.push([e.toMillis(),l?t.toMillis():_.toMillis()]);break}w.push([e.toMillis(),t.toMillis()]),e=t}}const S=this._calculateHistogramBins(d,{intervals:w,min:m,max:g},i);return this._createFeaturesFromHistogramBins(S,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,n=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,c.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,y.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(s)),u=(0,h.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,y.dO)(r,l),maxValue:(0,y.dO)(a,l)},!0),d=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,n=s||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,h=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:p}=i,f={attributes:{}};let m;if(f.attributes[n]=d&&h&&null!=e?T.c9.fromMillis(e,{zone:h}).toISO():e,f.attributes[r]=d&&h&&null!=s?T.c9.fromMillis(s,{zone:h}).toISO():s,l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},p),f.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[R]=++c),m=await this._createStatisticsQueryResponse(t,p,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function b(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=n*n+r*r;if(0===l)return!1;const u=a*n+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+n*c,e.y=i.y+r*c,!0}function A(e,t){return e?t?4:3:t?3:2}class C{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const z=[1]},9093:(e,t,i)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>s,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:n,create:s,fromValues:function(e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m){return[e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m]}},Symbol.toStringTag,{value:"Module"}))},11006:(e,t,i)=>{function s(e,t,i,s,r){n(e,t,i||0,s||e.length-1,r||a)}function n(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(s,Math.floor(t+(o-l)*c/o+d)),a)}var h=e[t],p=i,f=s;for(r(e,i,t),a(e[s],h)>0&&r(e,i,s);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function r(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>S,el:()=>w});var s=i(92602),n=i(49186),r=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),d=i(78888),h=i(65864),p=i(2272),f=i(84952),m=i(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-n)*(a-n)+(o-r)*(o-r)),u=(o-r)/l,c=(a-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+n,o=u*s+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+n,a=u*e+r;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function _(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function v(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],a=(0,l.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(n===i){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let r,g,x,S,I,T,R,M,b=0;const A=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,u.Vp)(r),x=r.isWebMercator,T=x?102100:4326,S=l.j7[T].maxX,I=l.j7[T].minX,R=l.j7[T].plus180Line,M=l.j7[T].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(_(t.clone(),S,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>_(e,S,I)),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,I)*(2*S);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(R)&&r!==S?(b=r>b?r:b,s=F(s,x),A.push(s),C.push("cut")):e.intersects(M)&&n!==I?(b=r*(2*S)>b?r*(2*S):b,s=F(s,x,360),A.push(s),C.push("cut")):C.push(s)}else C.push(t.clone());else C.push(t);else C.push(t);let z=(0,l.kd)(b,S),B=-90;const N=z,G=new o.A;for(;z>0;){const e=360*z-180;G.addPath([[e,B],[e,-1*B]]),B*=-1,z--}if(A.length>0&&N>0){const t=v(A,await async function(e,t,i,s){const n=(0,p.Dl)(e),r=t[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,h.rS)(e);return t.spatialReference=r,t})}}(n,A,G,i)),s=[],r=[];for(let i=0;i<C.length;i++){const n=C[i];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),r.push("simplify")):r.push(x?(0,c.Gh)(n):n)}}if(!s.length)return r;const a=await async function(e,t,i){const s="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,m.V)(o.geometries,r,n)}(n,s,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(x?(0,c.Gh)(a.shift()):a.shift())}return o}const E=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)E.push(t);else{const e=A.shift();E.push(!0===x?(0,c.Gh)(e):e)}}return E}function S(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[n,r]=s.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<n&&(o=-Math.ceil(Math.abs(t-n)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<n&&(l=-Math.ceil(Math.abs(e-n)/a));let c=e+(o-l)*a;const d=c-t;return d>r?c-=a:d<n&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),n=i(44123),r=i(98453);const a=new n.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function h(e,t,i={}){const n=m(t,e);if(!n){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new s.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new s.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function p(e,t,i,s){if(!i)return!0;const n="where clause";return x(e,t,h(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:s}),!0}function f(e,t,i,n,r){if(!i)return!0;const a="having clause",l=h(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,r=e.get(s)?.name;return n.some(t=>{const{onStatisticField:s,statisticType:n}=t,a=e.get(s)?.name;return a===r&&n.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,n={}){const r=new Map;if(function(e,t,i,s,n){const r=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(const n of r)if(t.get(n))F(e,t,i,s,n);else try{const r=h(t,y(n),{validateStandardized:!0});for(const n of r)F(e,t,i,s,n)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(r,e,t,n.allowedFieldTypes??d,i),r.size){const e=n.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:n.query})}}function F(e,t,i,s,n){const a=t.get(n);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>r.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>x});var s=i(4576),n=i(74887),r=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:d(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:d(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function d(e,t){const i=[];for(const s of e)i.push(h(s,t));return i}function h(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=c.bind(null,l.je),m=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?f(e):m(e);return t.spatialReference=i,t}return(0,r.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,n.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:n,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?n(t.map(f)):n(t.map(m)):n((0,r.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function x(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(31635),n=i(69540),r=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const d=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let h=class extends((0,n.O)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],h.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],h.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"value",void 0),(0,s.Cg)([(0,l.e)(d)],h.prototype,"valueType",void 0),h=(0,s.Cg)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],h);const p=h;h.from=(0,c.dp)(h);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),m=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends((0,n.O)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s.Cg)([(0,l.e)(f,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s.Cg)([(0,l.e)(m)],y.prototype,"transformation",void 0),y=(0,s.Cg)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>h,Q:()=>u});var s=i(31635),n=i(66552),r=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&c||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>r});var s=i(66344),n=i(88368);class r{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),n=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>d,pL:()=>c});var s=i(90708),n=i(92722);const r=new n.A,a=new n.A,o=new n.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,n=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&n,l=e.hasM&&r;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,n,r);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,n,u,c,d=t,h=i){const p=t&&d,f=i&&h,m=null!=n?"coords"in n?n:n.geometry:null;if(null==m)return null;if(u){let n=(0,s.kz)(a,m,t,i,e,u,d,h);return c&&(n=(0,s.Nl)(o,n,p,f,e,c)),l[e]?.(n,p,f)??null}if(c){const n=(0,s.Nl)(o,m,t,i,e,c,d,h);return l[e]?.(n,p,f)??null}return(0,s.Q4)(r,m,t,i,d,h),l[e]?.(r,p,f)??null}function d(e){return e&&h in e?JSON.parse(JSON.stringify(e,p)):e}const h="_geVersion",p=(e,t)=>e===h?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>n})},56390:(e,t,i)=>{i.d(t,{do:()=>L,Wc:()=>$});var s=i(4576),n=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),d=i(98988),h=i(70328),p=i(19419),f=i(16079),m=i(65864),y=i(17136),g=i(21325),x=i(90708),F=i(29441),_=i(51441),v=i(31464);class w{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let S=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=S++}}var T=i(99352),R=i(8384),M=i(58727),b=i(62660),A=i(43668);const C="unsupported-query";async function z(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:n}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(C,"Unsupported query options",{query:e});return B(t,n,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:n,having:a}=i,o=n?.length,l=s?.length;if(a){if(!o||!l)throw new r.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,F.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,F.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,F.MG)(e,t,n,{expressionName:"groupByFieldsForStatistics",query:i});for(const n of s){const{onStatisticField:s,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,F.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:N,query:i});else{const{statisticParameters:e}=n;if(!e)throw new r.A(C,"statisticParameters should be set for percentile type",{definition:n,query:i})}}}var u}(t,n,e),Promise.all([(0,b.c0)(e,i,s),(0,v.Nk)(s,e.outSR)]).then(()=>e)}function B(e,t,i){const{returnDistinctValues:s,outStatistics:n}=i,a=n?n.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",n=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!a.includes(e));(0,F.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,F.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new r.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,F.SN)(e,t,i.where,i)}const N=new Set([...F.vl,...F.VW]);async function G(e,t,i,s){let n=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,A.l)();n=e.extractFieldNames(i.valueExpression)}if(i.field&&n.push(i.field),i.field2&&n.push(i.field2),i.field3&&n.push(i.field3),i.normalizationField&&n.push(i.normalizationField),!n.length&&!i.valueExpression)throw new r.A(C,"field or valueExpression is required",{params:i});(0,F.MG)(e,t,n,{expressionName:"statistics",query:s})}var E=i(86420),q=i(95466),O=(i(53966),i(36708),i(44794),i(78659)),D=i(31635),P=i(65008),Z=i(10107),V=(i(87811),i(40608));let Q=class extends P.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Q=(0,D.Cg)([(0,V.$)("esri.views.support.debugFlags")],Q),new Q,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["Graphics3D filter visibility",4],["Graphics3D scale visibility",4],["Graphics3D frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,O.l5)(6.5),(0,O.l5)(1),(0,O.l5)(30),(0,O.l5)(1e3/30),(0,O.l5)(100);const j=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};j.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(j))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(j);for(;;){const e=s.next(j),n=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e);return s.return(null),t}throw s.throw(e),e}if(n.done)return n.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:T.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new w,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:q.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,E.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==M.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const n=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:n}}catch(e){if(e===M.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===M.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,M.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(C,"Unsupported query options",{query:e});return z(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==M.v8)throw i;t=new R.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:n,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:n,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:n,vertexMode:r}=e;if(!n&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,M.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await z(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,g.aI)(i.spatialReference,this.spatialReference);l&&(await(0,v.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=l?(0,v.Cv)(d,this.spatialReference):d;if(!h)return{candidates:[]};const p=(await(0,y.el)((0,m.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,y.el)((0,m.rS)(h),null,{signal:t}))[0];if(yield,null==p||null==f)return{candidates:[]};const x=await this._searchFeatures(H(f.toJSON()));yield;const F=new R.G(x,o,this);this._executeObjectIdsQuery(F),yield,this._executeTimeQuery(F),yield,this._executeAttributesQuery(F),yield,yield*this._executeGeometryQueryForSnapping(F),yield;const _=p.toJSON(),w=l?(0,v.Cv)(_,this.spatialReference):_,S=l?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:s;return F.createSnappingResponse({...e,point:w,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,h.hZ)((0,h.vt)(),h.qv);return await this.featureStore.forEachBounds(e,e=>(0,h.RF)(s,e)),$(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new R.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,n=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==n||(0,g.aI)(n,r.spatialReference)?r:(0,v.Cv)(r,n);if(!a)return null;const o=i||s,l=(0,g.fn)(t)&&!(0,g.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(H(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,b.xt)("esriSpatialRelDisjoint",a,this.geometryType,this.hasZ,this.hasM);yield;const n=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,n);yield;const o=new R.G(r,e,this);return await l(o)}if(!c.length)return new R.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new R.G(c,e,this));const d=await(0,b.xt)("esriSpatialRelContains",a,this.geometryType,this.hasZ,this.hasM);yield;const h=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new R.G(h,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:n,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new R.G(l,e,this);const u=(0,g.fn)(n)&&!(0,g.aI)(this.spatialReference,n),c=r||a,d=async e=>(u&&c&&await this._project(e,n),o&&this._cache.put(o,e.items),e),h=this.featureStore.featureSpatialReference,p=!i||null==h||(0,g.aI)(h,i.spatialReference)?i:(0,v.Cv)(i,h);if(!p)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(H(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const n=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const r=e=>!i.has(f.getObjectId(e))||n(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,r);yield;const o=new R.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new R.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(p,e))return await d(new R.G(m,e,this));const x=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const F=yield*this._runSpatialFilter(m,e=>x(f.getGeometry(e)));return yield,await d(new R.G(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,E.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,F.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,b.xt)(i,t.geometry,this.geometryType,this.hasZ,this.hasM);yield;const n=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>s(n.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const n of e)t(n)&&s.push(n),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),o=r.get(e);(!o||s>a(o,n))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:n,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||n;return(0,g.fn)(r)&&!(0,g.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,g.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,d.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,v.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e))),this.spatialReference,t,s);return e.items=(0,n.zI)(r.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,x.Ux)(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:n,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(C,"Unsupported query options",{query:e});return B(i,a,e),Promise.all([G(i,a,t,e),(0,b.c0)(e,s,n),(0,v.Nk)(n,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==M.v8)throw t;return new R.G([],e,this)}}get test(){}}function H(e){if((0,b.tC)(e)){if((0,m.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,p.fA)(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,f.Rg)((0,p.vt)(),e)]}function $(e,t,i,s,n){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(s)};n&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,v.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>F,iJ:()=>m,v8:()=>p});var s=i(49186),n=i(66552),r=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),d=i(31464);const h=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),f="frequency";async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:f}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[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),g(e,t,i)}async function g(e,t,n){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let f=await async function(e){const{distance:t,units:n}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=n?h.fromJSON(n):(0,r.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,d.Nk)(o,c.KK).then(()=>(0,d.Cv)(a,c.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(p,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;f=(0,o.HA)(f),f.spatialReference=t}if(f){await(0,d.Nk)(f.spatialReference,n),f=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(f,n);const t=(await(0,u.el)((0,l.rS)(f)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(f,n)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,d.Cv)(r,r.spatialReference,n,s);if(!a)throw p;a.spatialReference=n,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function F(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>g});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),d=i(25482),h=i(57231);let p=class extends((0,c.O)(d.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,o.e)(h.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function m(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function y(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let g=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>y(t,"end")},write:{writer:m}}})],g.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,s.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>y(t,"start")},write:{writer:m}}})],g.prototype,"start",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,s.Cg)([(0,o.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],g),g.from=(0,a.dp)(g)},60909:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],h.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],h),h.from=(0,a.dp)(h)},62660:(e,t,i)=>{i.d(t,{tC:()=>v,c0:()=>_,xt:()=>F});var s=i(49186),n=i(94078),r=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=l(n,r),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,o[n],o[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=d(u,a,r,c,e,s,n),c+=e*r;return u}function d(e,t,i,s,n,r,a){let o=e,l=s;for(let e=s,u=s+n*i;e<u;e+=i){l=e+i,l===u&&(l=s);const n=t[e],c=t[e+1],d=t[l],h=t[l+1];(c<a&&h>=a||h<a&&c>=a)&&n+(a-c)/(h-c)*(d-n)<r&&(o=!o)}return o}var h=i(90708),p=i(92722),f=i(51441),m=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},x={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function F(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,h.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,h.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,f.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,f.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?r.xB:(0,r.xK)(l);return n=>e(t,(0,f.pL)(i,s,o,n))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const d=await function(e){const t=x[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>d.execute(t,(0,f.pL)(i,s,o,e))}async function _(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(n))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(r))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m.Nk)(e.geometry?.spatialReference,e.outSR)}}}function v(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(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}},70328:(e,t,i)=>{i.d(t,{BI:()=>F,DC:()=>d,Ej:()=>p,Ie:()=>g,Jt:()=>x,Ne:()=>f,RF:()=>c,aI:()=>v,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>h,is:()=>_,qv:()=>w,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var s=i(5443),n=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=n,o[5]=a,o}function o(e,t=r()){return function(e,t,i,s=r()){return y(s,w),function(e,t,i=0,s=t.length/3){let n=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)n=Math.min(n,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,s,r,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=r,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=r,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,w):r(w)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function F(e,t,i,s,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),n=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>n});var s=i(21818);async function n(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:n,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(n&&r)await t.forEach(e=>{const t=i.getAttribute((0,s.zI)(e),n),l=i.getAttribute((0,s.zI)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=n||r;await t.forEach(t=>{const n=i.getAttribute((0,s.zI)(t),e);null==n||isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=n)&&(null==o||o>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(o,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(o,s||n,r,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>n});var s=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function r(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),n=i(53966),r=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),d=i(96285);const h=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(s,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?d.mQ.utcInstance:(0,r.tE)(h,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:n}=e,r=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):o??u.n$:null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,h=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(r),d],[f(a),d]]);for(const{name:s,type:n}of e.fields)if(y.has(n))t.set(s,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=h.get(f(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,r,t)=>{t.d(r,{computeObjectLayerResourceSize:()=>c}),t(78888);var i=t(49186),n=t(66344),o=t(51850),s=t(70328),l=t(8887);let u=new n.q(50);async function c(e,r=null){if(!e.isPrimitive){const r=e.resource?.href;if(!r)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const n=u.get(r);if(null!=n)return n;const{fetch:l}=await Promise.all([t.e(8487),t.e(7005),t.e(3474),t.e(2883),t.e(4304)]).then(t.bind(t,64304)),c=await l(r,{disableTextures:!0,spherical:!0}),a=(0,s.Ej)(c.referenceBoundingBox,(0,o.vt)());return u.put(r,a),a}if(!e.resource?.primitive)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const n=(0,s.vt)((0,l.Fq)(e.resource.primitive));if(null!=r)for(let e=0;e<n.length;e++)n[e]*=r;return(0,s.Ej)(n,(0,o.vt)())}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7984],{19356:(e,t,o)=>{o.d(t,{i:()=>r});const r=new(o(66552).J)({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"})},20061:(e,t,o)=>{o.d(t,{A:()=>g});var r,i=o(31635),s=o(69540),n=o(66552),l=o(25482),u=o(10107),a=o(56507),p=(o(44208),o(87811),o(93223)),d=o(40608);const c=(0,n.O)()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let h=r=class extends((0,s.O)(l.o)){static from(e){return(0,a.PZ)(r,e)}constructor(e){super(e),this.title=null,this.order=null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],h.prototype,"title",void 0),(0,i.Cg)([(0,p.e)(c)],h.prototype,"order",void 0),h=r=(0,i.Cg)([(0,d.$)("esri.renderers.support.RendererLegendOptions")],h);const g=h},48425:(e,t,o)=>{o.d(t,{A:()=>b});var r,i=o(31635),s=o(4718),n=o(10107),l=(o(44208),o(53966),o(93223)),u=o(40608),a=o(51857),p=o(20061),d=o(68197),c=o(25482),h=o(56507);let g=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new r({description:this.description,label:this.label,values:(0,s.o8)(this.values),color:(0,s.o8)(this.color)})}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],g.prototype,"description",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],g.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:[String],json:{write:{isRequired:!0}}})],g.prototype,"values",void 0),(0,i.Cg)([(0,n.MZ)({type:d.A,json:{type:[h.jz],write:{isRequired:!0}}})],g.prototype,"color",void 0),g=r=(0,i.Cg)([(0,u.$)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],g);const y=g;var C,f=o(19356);let b=C=class extends a.A{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new C({...this.cloneProperties(),field:(0,s.o8)(this.field),fieldTransformType:(0,s.o8)(this.fieldTransformType),colorUniqueValueInfos:(0,s.o8)(this.colorUniqueValueInfos),legendOptions:(0,s.o8)(this.legendOptions)})}};(0,i.Cg)([(0,l.e)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],b.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,i.Cg)([(0,n.MZ)({type:f.i.apiValues,json:{type:f.i.jsonValues,read:f.i.read,write:f.i.write}})],b.prototype,"fieldTransformType",void 0),(0,i.Cg)([(0,n.MZ)({type:[y],json:{write:{isRequired:!0}}})],b.prototype,"colorUniqueValueInfos",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),b=C=(0,i.Cg)([(0,u.$)("esri.renderers.PointCloudUniqueValueRenderer")],b)},51857:(e,t,o)=>{o.d(t,{A:()=>j});var r,i=o(31635),s=o(66552),n=o(25482),l=o(4718),u=o(10107),a=(o(44208),o(53966),o(40608));o(87811);let p=r=class extends n.o{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new r({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"field",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],p.prototype,"minValue",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],p.prototype,"maxValue",void 0),p=r=(0,i.Cg)([(0,a.$)("esri.renderers.support.pointCloud.ColorModulation")],p);const d=p,c=new s.J({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let h=class extends n.o{};(0,i.Cg)([(0,u.MZ)({type:c.apiValues,readOnly:!0,nonNullable:!0,json:{type:c.jsonValues,read:!1,write:{writer:c.write,isRequired:!0}}})],h.prototype,"type",void 0),h=(0,i.Cg)([(0,a.$)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],h);const g=h;var y,C=o(93223);let f=y=class extends g{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new y({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,i.Cg)([(0,C.e)({pointCloudFixedSizeAlgorithm:"fixed-size"})],f.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],f.prototype,"size",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"useRealWorldSymbolSizes",void 0),f=y=(0,i.Cg)([(0,a.$)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],f);const b=f;var m;let v=m=class extends g{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new m({scaleFactor:this.scaleFactor})}};(0,i.Cg)([(0,C.e)({pointCloudSplatAlgorithm:"splat"})],v.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,value:1,nonNullable:!0,json:{write:{isRequired:!0}}})],v.prototype,"scaleFactor",void 0),v=m=(0,i.Cg)([(0,a.$)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],v);const w={key:"type",base:g,typeMap:{"fixed-size":b,splat:v}},M=(0,s.O)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let j=class extends n.o{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,l.o8)(this.pointSizeAlgorithm),colorModulation:(0,l.o8)(this.colorModulation),pointsPerInch:(0,l.o8)(this.pointsPerInch)}}};(0,i.Cg)([(0,u.MZ)({type:M.apiValues,readOnly:!0,nonNullable:!0,json:{type:M.jsonValues,read:!1,write:{writer:M.write,isRequired:!0}}})],j.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({types:w,json:{write:!0}})],j.prototype,"pointSizeAlgorithm",void 0),(0,i.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],j.prototype,"colorModulation",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0},nonNullable:!0,type:Number})],j.prototype,"pointsPerInch",void 0),j=(0,i.Cg)([(0,a.$)("esri.renderers.PointCloudRenderer")],j)},63531:(e,t,o)=>{o.d(t,{A:()=>b});var r,i=o(31635),s=o(4718),n=o(10107),l=(o(44208),o(53966),o(93223)),u=o(40608),a=o(51857),p=o(20061),d=o(68197),c=o(25482),h=o(56507);let g=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new r({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,s.o8)(this.color)})}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],g.prototype,"description",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],g.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue",isRequired:!0}}})],g.prototype,"minValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue",isRequired:!0}}})],g.prototype,"maxValue",void 0),(0,i.Cg)([(0,n.MZ)({type:d.A,json:{type:[h.jz],write:{isRequired:!0}}})],g.prototype,"color",void 0),g=r=(0,i.Cg)([(0,u.$)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],g);const y=g;var C,f=o(19356);let b=C=class extends a.A{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new C({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,s.o8)(this.colorClassBreakInfos),legendOptions:(0,s.o8)(this.legendOptions)})}};(0,i.Cg)([(0,l.e)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],b.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),(0,i.Cg)([(0,n.MZ)({type:f.i.apiValues,json:{type:f.i.jsonValues,read:f.i.read,write:f.i.write}})],b.prototype,"fieldTransformType",void 0),(0,i.Cg)([(0,n.MZ)({type:[y],json:{write:{isRequired:!0}}})],b.prototype,"colorClassBreakInfos",void 0),b=C=(0,i.Cg)([(0,u.$)("esri.renderers.PointCloudClassBreaksRenderer")],b)},68197:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(40876),i=o(34727),s=o(56507);function n(e){return(0,i.qE)((0,s.Vr)(e),0,255)}function l(e,t){const o=e.toString(16).padStart(2,"0");return t?o.slice(0,1):o}class u{static blendColors(e,t,o,r=new u){return r.r=Math.round(e.r+(t.r-e.r)*o),r.g=Math.round(e.g+(t.g-e.g)*o),r.b=Math.round(e.b+(t.b-e.b)*o),r.a=e.a+(t.a-e.a)*o,r._sanitize()}static fromRgb(e,t){const o=(0,r.lT)(e);return o?u.fromArray(o,t):null}static fromHex(e,t=new u){const o=(0,r.oW)(e);return o?u.fromArray(o,t):null}static fromArray(e,t=new u){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const o=(0,r.Eq)(e);return o?u.fromArray(o,t):null}static fromJSON(e){return null!=e?new u([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?u.fromString(e,this):Array.isArray(e)?u.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof u||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,o=e?.digits??6,r=3===o||4===o,i=4===o||8===o,s=`#${l(this.r,r)}${l(this.g,r)}${l(this.b,r)}${i?l(Math.round(255*this.a),r):""}`;return t?s.toUpperCase():s}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=n(this.r),o=n(this.g),r=n(this.b);return 0===e||1!==this.a?[t,o,r,n(255*this.a)]:[t,o,r]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,r.c1)(this.r),this.g=(0,r.c1)(this.g),this.b=(0,r.c1)(this.b),this.a=(0,r.G1)(this.a),this}_set(e,t,o,r){this.r=e,this.g=t,this.b=o,this.a=r}}u.prototype.declaredClass="esri.Color"},69540:(e,t,o)=>{o.d(t,{O:()=>a,P:()=>p});var r=o(31635),i=o(65008),s=(o(44208),o(4718)),n=(o(53966),o(97768)),l=o(88620),u=o(40608);const a=e=>{const t=e;let o=class extends t{clone(e){const t=(0,l.oY)(this);(0,n.Lw)(t,"unable to clone instance of non-accessor class");const o=t.metadata,r=t.store,i={},u=new Map;for(const t in o){const n=o[t],l=r?.originOf(t),a=n.clonable;if(n.readOnly||!1===a||7!==l&&0!==l&&5!==l&&4!==l)continue;const p=this[t];let d=null;if("function"==typeof a)d=a(p,e);else if("reference"===a)d=p;else if(d=(0,s.TU)(p,e),null!=p&&null==d)continue;0===l?u.set(t,d):i[t]=d}const a=new(0,Object.getPrototypeOf(this).constructor)(i);if(u.size){const e=(0,l.oY)(a)?.store;if(e)for(const[t,o]of u)e.set(t,o,0)}return a}};return o=(0,r.Cg)([(0,u.$)("esri.core.Clonable")],o),o},p=a(i.A)},69846:(e,t,o)=>{o.d(t,{A:()=>h});var r,i=o(31635),s=o(4718),n=o(10107),l=(o(44208),o(53966),o(93223)),u=o(40608),a=o(51857),p=o(20061),d=o(19356),c=o(72500);let h=r=class extends a.A{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new r({...this.cloneProperties(),field:(0,s.o8)(this.field),fieldTransformType:(0,s.o8)(this.fieldTransformType),stops:(0,s.o8)(this.stops),legendOptions:(0,s.o8)(this.legendOptions)})}};(0,i.Cg)([(0,l.e)({pointCloudStretchRenderer:"point-cloud-stretch"})],h.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:{isRequired:!0}},type:String})],h.prototype,"field",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A,json:{write:!0}})],h.prototype,"legendOptions",void 0),(0,i.Cg)([(0,n.MZ)({type:d.i.apiValues,json:{type:d.i.jsonValues,read:d.i.read,write:d.i.write}})],h.prototype,"fieldTransformType",void 0),(0,i.Cg)([(0,n.MZ)({type:[c.A],json:{write:{isRequired:!0}}})],h.prototype,"stops",void 0),h=r=(0,i.Cg)([(0,u.$)("esri.renderers.PointCloudStretchRenderer")],h)},72500:(e,t,o)=>{o.d(t,{A:()=>c});var r,i=o(31635),s=o(68197),n=o(25482),l=o(10107),u=o(56507),a=(o(44208),o(87811),o(40608)),p=o(43937);let d=r=class extends n.o{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,o){t[o]=e??0}clone(){return new r({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,i.Cg)([(0,l.MZ)({type:s.A,json:{type:[u.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"value",void 0),(0,i.Cg)([(0,p.K)("value")],d.prototype,"writeValue",null),d=r=(0,i.Cg)([(0,a.$)("esri.renderers.visualVariables.support.ColorStop")],d);const c=d}}]);
|