@arcgis/core 4.24.0-next.20220604 → 4.24.0-next.20220607
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/Analysis.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/471beeb6924599209567.js +1 -0
- package/assets/esri/core/workers/chunks/{8102bb78fe96e6197e4e.js → 5da1b3dacc6c8c080a1c.js} +1 -1
- package/assets/esri/core/workers/chunks/b780228a520e1a0b100b.js +1 -0
- package/assets/esri/themes/base/widgets/_Daylight.scss +31 -32
- package/assets/esri/themes/base/widgets/_FloorFilter.scss +1 -0
- package/assets/esri/themes/base/widgets/_SnappingControls.scss +14 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/core/unitUtils.js +1 -1
- package/interfaces.d.ts +19 -41
- package/layers/LineOfSightLayer.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/properties/defaultUnit.js +1 -1
- package/rest/networks/queryAssociations.js +5 -0
- package/rest/networks/support/Association.js +1 -1
- package/rest/networks/support/QueryAssociationsParameters.js +5 -0
- package/rest/networks/support/QueryAssociationsResult.js +5 -0
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/support/lengthMeasurementUtils.js +1 -1
- package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/SnappingControls/SnappingControlsViewModel.js +1 -1
- package/widgets/support/SnappingControls/SnappingListItem.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/0832c0f5e61b7b354a17.js +0 -1
- package/assets/esri/core/workers/chunks/6f41f039226a043a2d18.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6920],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),l=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}async _fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);await this._parent._getFeatures(r,-1,s,n),this._checkCancelled(n);const l=[];for(let t=0;t<s;t++){const n=this._parent._featureFromCache(e[t]);l.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===l[n]?this._idstates[e[n]]=i.dj.InFeatureSet:this._idstates[e[n]]=i.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,s){await this._ensureLoaded();const i=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s);let l;return this._checkCancelled(s),l=null!==t?new a.Z(i._candidates.slice(0).concat(i._known.slice(0)),[],i._ordered,this._clonePageDefinition(i.pagesDefinition)):new a.Z(i._candidates.slice(0),i._known.slice(0),i._ordered,this._clonePageDefinition(i.pagesDefinition)),l}async _stat(e,t,n,r,s,a,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,s){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(91136),s=n(90961),a=n(90658);class i extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}async _getFeature(){throw new Error("No Feature Found in EmptySet")}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new Error("Fetch and Refine should not be called in this featureset")}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(48039);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var a=n(90961),i=n(90658),l=n(95002),o=n(95330),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent.loaded?(this._initialiseFeatureSet(),this):(await this._parent.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,s){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==r.Z.applicationCache){const e=r.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==r.Z.applicationCache&&r.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==r.Z.applicationCache&&r.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return i.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new Error("Not Implemented")}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new Error("Feature Not Found")}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let s=r-e._candidates.length;if(0===e._candidates.length)return e;if(s>=t)return e;if(await this._refineIfParentKnown(e,t-s,n),this._checkCancelled(n),this._refineKnowns(e,t-s),s=r-e._candidates.length,s<t&&e._candidates.length>0){const r=t-s,a=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(a,a.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-s),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let l=!1;const o=this._candidateIdTransform(e._candidates[a]);o!==e._candidates[a]&&(l=!0);const u=this._isInFeatureSet(o);if(u===i.dj.InFeatureSet)!0===l?e._known.includes(o)||(e._known.push(o),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,s){if(null===this._parent)throw new Error("Parent Paging not implemented");return this._parent._expandPagedSet(e,t,n,r,s)}async _expandPagedSetFeatureSet(e,t,n,r,s){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const a=await this._getPage(e,r,s);return n+a<t?this._expandPagedSet(e,t,n+a,0,s):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let s=await this._stat(e,t,"",null,null,n,r);return!1===s.calculated&&(s=await this._manualStat(e,t,n,r)),s.result}async _manualStat(e,t,n,r){let s=null;switch(e.toLowerCase()){case"count":return s=await(0,l.QX)(this,r),{calculated:!0,result:s};case"distinct":return s=await(0,l.EB)(this,t,n),{calculated:!0,result:s};case"avg":case"mean":return s=await(0,l.J6)(this,t,r),{calculated:!0,result:s};case"stdev":return s=await(0,l.m)(this,t,r),{calculated:!0,result:s};case"variance":return s=await(0,l.CA)(this,t,r),{calculated:!0,result:s};case"sum":return s=await(0,l.Sm)(this,t,r),{calculated:!0,result:s};case"min":return s=await(0,l.VV)(this,t,r),{calculated:!0,result:s};case"max":return s=await(0,l.Fp)(this,t,r),{calculated:!0,result:s};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,s,a,i){const l=await this._parent._stat(e,t,n,r,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,r,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,s,a,i)}));e.next().then((l=>{try{if(null===l)s(n);else{const u=t(n,l,r,this);(0,o.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,s,a,i)}),a):this._reduceImpl(e,t,u,r+1,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,s,a){try{if(++a>1e3)return void setTimeout((()=>{a=0,this._forEachImpl(e,t,n,r,s,a)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,s,a):(0,o.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,s,a)}catch(e){s(e)}}),s):this._forEachImpl(e,t,n,r,s,a)}}catch(e){s(e)}}),s)}catch(e){s(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete s.geometry.spatialReference,n.push(s),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference.toJSON(),r}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,DT:()=>f,TE:()=>b,XF:()=>l,bB:()=>o,fz:()=>h,hq:()=>y,oX:()=>d,vR:()=>_,y5:()=>w,zR:()=>i});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function l(e,t,n){return c(e,t,n)}function o(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,l,o;switch(e.type){case"interval":return b(c(e.value,t,n,r,s),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary-expression":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+o+")) ");case"NOT IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+o+")) ");case"BETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current-time":return _("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=a.ou.fromJSDate(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function f(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(p(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function p(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.clauses[a].value,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.else,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}return m(s)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const s=[];for(const a of t.value)s.push(p(e,a,n,r));return s}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([p(e,t.left,n,r),p(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=p(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=p(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=p(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return S(e.parseTree,t)}function w(e){return"column-reference"===e.parseTree.type}function S(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return S(e.operand,t)||S(e.value,t);case"case-expression":for(const n of e.clauses)if(S(n,t))return!0;return!("simple"!==e.format||!S(e.operand,t))||!(null===e.else||!S(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(S(n,t))return!0;return!1;case"unary-expression":return S(e.expr,t);case"binary-expression":return S(e.left,t)||S(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return S(e.args,t)}return!1}function I(e){let t="";return t+=e.period.toUpperCase(),t}function b(e,t,n){let r="";return r="interval-period"===t.type?I(t):I(t.start)+" TO "+I(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>f,EB:()=>w,Fp:()=>d,J6:()=>_,QX:()=>m,Sm:()=>g,VV:()=>h,g3:()=>u,m:()=>p,tj:()=>c});var r=n(90658),s=n(36515);function a(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function i(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function l(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function u(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function c(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],s={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,r.hj)(t)||(0,r.HD)(t))void 0===s[t]&&(n.push(t),s[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,r.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return a(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(i(t));case"var":case"variance":return i(t);case"count":return t.length}return 0}async function h(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function d(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";!1===(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields,null));const i=await y(e,t,n,!0);if(0===i.length)return null;const l=a(i);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function f(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:l(r)}async function p(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.sqrt(l(r))}async function g(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:o(r)}async function m(e,t){return e.iterator(t).count()}async function y(e,t,n,r=!1){const s=e.iterator(n),a=[],i={ticker:0};let l=await s.next();for(;null!==l;){if(i.ticker++,n.aborted)throw new Error("Cancelled");i.ticker%100==0&&(i.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(l);null===e?!1===r&&(a[a.length]=e):a[a.length]=e,l=await s.next()}return a}async function w(e,t,n=1e3,r=null){const s=e.iterator(r),a=[],i={},l={ticker:0};let o=await s.next();for(;null!==o;){if(l.ticker++,r.aborted)throw new Error("Cancelled");l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(o);if(null!=e&&void 0===i[e]&&(a.push(e),i[e]=1),a.length>=n&&-1!==n)return a;o=await s.next()}return a}},64830:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(50758),s=n(92604),a=n(95330),i=n(64830),l=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const i=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,a.y8)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new l.default(e,t,(()=>this._ongoingJobsQueue.pop())),i(n),this._clients[s])),(()=>(i(r),null))):(this._clients[s]=new l.default(o,t,(()=>this._ongoingJobsQueue.pop())),this._clientPromises[s]=Promise.resolve(this._clients[s]),i(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.deferred.reject((0,a.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}invoke(e,t,n){let r=null;Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const s=(0,a.dD)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,deferred:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e.jobAdded()))}return s.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>L,Cz:()=>x,D$:()=>k,ED:()=>w,G0:()=>P,Gg:()=>b,LV:()=>I,Nm:()=>S,Sp:()=>E,TE:()=>f,U1:()=>R,W4:()=>m,Y4:()=>B,cv:()=>C,e5:()=>T,f3:()=>D,fS:()=>p,j2:()=>N,jU:()=>_,kK:()=>g,kQ:()=>G,og:()=>F,oq:()=>c,r3:()=>d,rd:()=>A,sz:()=>O,uh:()=>y,wf:()=>v,z7:()=>h}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function u(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return l(await u("clip",[a(e),e,t]))}async function h(e,t){return l(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function f(e,t,n){return u("distance",[a(e),e,t,n])}function p(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function w(e,t){return u("disjoint",[a(e),e,t])}function S(e,t){return u("overlaps",[a(e),e,t])}function I(e,t,n){return u("relate",[a(e),e,t,n])}function b(e){return u("isSimple",[a(e),e])}async function F(e){return l(await u("simplify",[a(e),e]))}async function T(e,t){return l(await u("difference",[a(e),e,t]))}async function E(e,t){return l(await u("symmetricDifference",[a(e),e,t]))}async function v(e,t){return l(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return l(await u("union",[a(n),n]))}async function C(e,t,n,r,s,i){return l(await u("offset",[a(e),e,t,n,r,s,i]))}async function D(e,t,n,r=!1){const s=[a(e),e,t,n,r];return l(await u("buffer",s))}async function A(e,t,n,r,s,i){const o=[a(e),e,t,n,r,s,i];return l(await u("geodesicBuffer",o))}async function R(e,t,n){if(null==e)throw new Error("Illegal Argument Exception");const r=e.spatialReference;n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const s=e.constructor.fromJSON(await u("rotate",[r,e,t,n]));return s.spatialReference=r,s}async function k(e,t,n,r){return l(await u("generalize",[a(e),e,t,n,r]))}async function x(e,t,n){return l(await u("densify",[a(e),e,t,n]))}async function N(e,t,n,r=0){return l(await u("geodesicDensify",[a(e),e,t,n,r]))}function L(e,t){return u("planarArea",[a(e),e,t])}function O(e,t){return u("planarLength",[a(e),e,t])}function B(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function G(e,t,n){return u("geodesicLength",[a(e),e,t,n])}},94443:(e,t,n)=>{n.d(t,{ME:()=>_,Su:()=>f,tz:()=>d});var r=n(20102),s=n(95330),a=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function o(e){return l[e]??!1}const u=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(h(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),h(e))}}}async function _(e){const t=(0,a.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of u)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return await g.add(n),n}function f(e){if(!i.test(e))return null;const[,t,n]=i.exec(e),r=t+(n?"-"+n.toUpperCase():"");return o(r)?r:o(t)?t:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,a.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},99514:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function a(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class i{constructor(e){if(this.fields=e,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;const t=[];for(const i of e){const e=i&&i.name;if(e){const o=l(e);this._fieldsMap.set(e,i),this._fieldsMap.set(o,i),t.push(o),"date"===(n=i).type||"esriFieldTypeDate"===n.type?(this.dateFields.push(i),this._dateFieldsSet.add(i)):(0,r.H7)(i)&&(this._numericFieldsSet.add(i),this.numericFields.push(i)),s(i)||a(i)||(i.editable=null==i.editable||!!i.editable,i.nullable=null==i.nullable||!!i.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||a(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(l(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name}}function l(e){return e.toLowerCase().trim()}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6920],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),l=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}async _fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);await this._parent._getFeatures(r,-1,s,n),this._checkCancelled(n);const l=[];for(let t=0;t<s;t++){const n=this._parent._featureFromCache(e[t]);l.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===l[n]?this._idstates[e[n]]=i.dj.InFeatureSet:this._idstates[e[n]]=i.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,s){await this._ensureLoaded();const i=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s);let l;return this._checkCancelled(s),l=null!==t?new a.Z(i._candidates.slice(0).concat(i._known.slice(0)),[],i._ordered,this._clonePageDefinition(i.pagesDefinition)):new a.Z(i._candidates.slice(0),i._known.slice(0),i._ordered,this._clonePageDefinition(i.pagesDefinition)),l}async _stat(e,t,n,r,s,a,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,s){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(91136),s=n(90961),a=n(90658);class i extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}async _getFeature(){throw new Error("No Feature Found in EmptySet")}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new Error("Fetch and Refine should not be called in this featureset")}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(48039);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var a=n(90961),i=n(90658),l=n(95002),o=n(95330),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent.loaded?(this._initialiseFeatureSet(),this):(await this._parent.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,s){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==r.Z.applicationCache){const e=r.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==r.Z.applicationCache&&r.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==r.Z.applicationCache&&r.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return i.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new Error("Not Implemented")}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new Error("Feature Not Found")}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let s=r-e._candidates.length;if(0===e._candidates.length)return e;if(s>=t)return e;if(await this._refineIfParentKnown(e,t-s,n),this._checkCancelled(n),this._refineKnowns(e,t-s),s=r-e._candidates.length,s<t&&e._candidates.length>0){const r=t-s,a=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(a,a.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-s),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let l=!1;const o=this._candidateIdTransform(e._candidates[a]);o!==e._candidates[a]&&(l=!0);const u=this._isInFeatureSet(o);if(u===i.dj.InFeatureSet)!0===l?e._known.includes(o)||(e._known.push(o),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,s){if(null===this._parent)throw new Error("Parent Paging not implemented");return this._parent._expandPagedSet(e,t,n,r,s)}async _expandPagedSetFeatureSet(e,t,n,r,s){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const a=await this._getPage(e,r,s);return n+a<t?this._expandPagedSet(e,t,n+a,0,s):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let s=await this._stat(e,t,"",null,null,n,r);return!1===s.calculated&&(s=await this._manualStat(e,t,n,r)),s.result}async _manualStat(e,t,n,r){let s=null;switch(e.toLowerCase()){case"count":return s=await(0,l.QX)(this,r),{calculated:!0,result:s};case"distinct":return s=await(0,l.EB)(this,t,n),{calculated:!0,result:s};case"avg":case"mean":return s=await(0,l.J6)(this,t,r),{calculated:!0,result:s};case"stdev":return s=await(0,l.m)(this,t,r),{calculated:!0,result:s};case"variance":return s=await(0,l.CA)(this,t,r),{calculated:!0,result:s};case"sum":return s=await(0,l.Sm)(this,t,r),{calculated:!0,result:s};case"min":return s=await(0,l.VV)(this,t,r),{calculated:!0,result:s};case"max":return s=await(0,l.Fp)(this,t,r),{calculated:!0,result:s};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,s,a,i){const l=await this._parent._stat(e,t,n,r,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,r,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,s,a,i)}));e.next().then((l=>{try{if(null===l)s(n);else{const u=t(n,l,r,this);(0,o.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,s,a,i)}),a):this._reduceImpl(e,t,u,r+1,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,s,a){try{if(++a>1e3)return void setTimeout((()=>{a=0,this._forEachImpl(e,t,n,r,s,a)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,s,a):(0,o.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,s,a)}catch(e){s(e)}}),s):this._forEachImpl(e,t,n,r,s,a)}}catch(e){s(e)}}),s)}catch(e){s(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete s.geometry.spatialReference,n.push(s),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference.toJSON(),r}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,DT:()=>f,TE:()=>b,XF:()=>l,bB:()=>o,fz:()=>h,hq:()=>y,oX:()=>d,vR:()=>_,y5:()=>w,zR:()=>i});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function l(e,t,n){return c(e,t,n)}function o(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,l,o;switch(e.type){case"interval":return b(c(e.value,t,n,r,s),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary-expression":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+o+")) ");case"NOT IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+o+")) ");case"BETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current-time":return _("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=e instanceof Date?a.ou.fromJSDate(e):a.ou.fromSQL(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function f(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(p(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function p(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.clauses[a].value,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.else,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}return m(s)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const s=[];for(const a of t.value)s.push(p(e,a,n,r));return s}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([p(e,t.left,n,r),p(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=p(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=p(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=p(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return S(e.parseTree,t)}function w(e){return"column-reference"===e.parseTree.type}function S(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return S(e.operand,t)||S(e.value,t);case"case-expression":for(const n of e.clauses)if(S(n,t))return!0;return!("simple"!==e.format||!S(e.operand,t))||!(null===e.else||!S(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(S(n,t))return!0;return!1;case"unary-expression":return S(e.expr,t);case"binary-expression":return S(e.left,t)||S(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return S(e.args,t)}return!1}function I(e){let t="";return t+=e.period.toUpperCase(),t}function b(e,t,n){let r="";return r="interval-period"===t.type?I(t):I(t.start)+" TO "+I(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>f,EB:()=>w,Fp:()=>d,J6:()=>_,QX:()=>m,Sm:()=>g,VV:()=>h,g3:()=>u,m:()=>p,tj:()=>c});var r=n(90658),s=n(36515);function a(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function i(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function l(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function u(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function c(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],s={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,r.hj)(t)||(0,r.HD)(t))void 0===s[t]&&(n.push(t),s[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,r.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return a(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(i(t));case"var":case"variance":return i(t);case"count":return t.length}return 0}async function h(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function d(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";!1===(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields,null));const i=await y(e,t,n,!0);if(0===i.length)return null;const l=a(i);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function f(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:l(r)}async function p(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.sqrt(l(r))}async function g(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:o(r)}async function m(e,t){return e.iterator(t).count()}async function y(e,t,n,r=!1){const s=e.iterator(n),a=[],i={ticker:0};let l=await s.next();for(;null!==l;){if(i.ticker++,n.aborted)throw new Error("Cancelled");i.ticker%100==0&&(i.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(l);null===e?!1===r&&(a[a.length]=e):a[a.length]=e,l=await s.next()}return a}async function w(e,t,n=1e3,r=null){const s=e.iterator(r),a=[],i={},l={ticker:0};let o=await s.next();for(;null!==o;){if(l.ticker++,r.aborted)throw new Error("Cancelled");l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(o);if(null!=e&&void 0===i[e]&&(a.push(e),i[e]=1),a.length>=n&&-1!==n)return a;o=await s.next()}return a}},64830:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(50758),s=n(92604),a=n(95330),i=n(64830),l=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const i=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,a.y8)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new l.default(e,t,(()=>this._ongoingJobsQueue.pop())),i(n),this._clients[s])),(()=>(i(r),null))):(this._clients[s]=new l.default(o,t,(()=>this._ongoingJobsQueue.pop())),this._clientPromises[s]=Promise.resolve(this._clients[s]),i(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.deferred.reject((0,a.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}invoke(e,t,n){let r=null;Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const s=(0,a.dD)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,deferred:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e.jobAdded()))}return s.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>L,Cz:()=>x,D$:()=>k,ED:()=>w,G0:()=>P,Gg:()=>b,LV:()=>I,Nm:()=>S,Sp:()=>E,TE:()=>f,U1:()=>R,W4:()=>m,Y4:()=>B,cv:()=>D,e5:()=>T,f3:()=>C,fS:()=>p,j2:()=>N,jU:()=>_,kK:()=>g,kQ:()=>G,og:()=>F,oq:()=>c,r3:()=>d,rd:()=>A,sz:()=>O,uh:()=>y,wf:()=>v,z7:()=>h}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function u(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return l(await u("clip",[a(e),e,t]))}async function h(e,t){return l(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function f(e,t,n){return u("distance",[a(e),e,t,n])}function p(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function w(e,t){return u("disjoint",[a(e),e,t])}function S(e,t){return u("overlaps",[a(e),e,t])}function I(e,t,n){return u("relate",[a(e),e,t,n])}function b(e){return u("isSimple",[a(e),e])}async function F(e){return l(await u("simplify",[a(e),e]))}async function T(e,t){return l(await u("difference",[a(e),e,t]))}async function E(e,t){return l(await u("symmetricDifference",[a(e),e,t]))}async function v(e,t){return l(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return l(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return l(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return l(await u("buffer",s))}async function A(e,t,n,r,s,i){const o=[a(e),e,t,n,r,s,i];return l(await u("geodesicBuffer",o))}async function R(e,t,n){if(null==e)throw new Error("Illegal Argument Exception");const r=e.spatialReference;n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const s=e.constructor.fromJSON(await u("rotate",[r,e,t,n]));return s.spatialReference=r,s}async function k(e,t,n,r){return l(await u("generalize",[a(e),e,t,n,r]))}async function x(e,t,n){return l(await u("densify",[a(e),e,t,n]))}async function N(e,t,n,r=0){return l(await u("geodesicDensify",[a(e),e,t,n,r]))}function L(e,t){return u("planarArea",[a(e),e,t])}function O(e,t){return u("planarLength",[a(e),e,t])}function B(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function G(e,t,n){return u("geodesicLength",[a(e),e,t,n])}},94443:(e,t,n)=>{n.d(t,{ME:()=>_,Su:()=>f,tz:()=>d});var r=n(20102),s=n(95330),a=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function o(e){return l[e]??!1}const u=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(h(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),h(e))}}}async function _(e){const t=(0,a.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of u)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return await g.add(n),n}function f(e){if(!i.test(e))return null;const[,t,n]=i.exec(e),r=t+(n?"-"+n.toUpperCase():"");return o(r)?r:o(t)?t:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,a.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},99514:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function a(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class i{constructor(e){if(this.fields=e,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;const t=[];for(const i of e){const e=i&&i.name;if(e){const o=l(e);this._fieldsMap.set(e,i),this._fieldsMap.set(o,i),t.push(o),"date"===(n=i).type||"esriFieldTypeDate"===n.type?(this.dateFields.push(i),this._dateFieldsSet.add(i)):(0,r.H7)(i)&&(this._numericFieldsSet.add(i),this.numericFields.push(i)),s(i)||a(i)||(i.editable=null==i.editable||!!i.editable,i.nullable=null==i.nullable||!!i.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||a(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(l(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name}}function l(e){return e.toLowerCase().trim()}}}]);
|