@arcgis/core 5.2.0-next.146 → 5.2.0-next.147

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3483],{6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(69622),o=r(7762),n=r(88620);const l=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function s(e){return e instanceof o.A?Object.keys(e.items):a(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function y(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=s(e),o=s(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let n=o.filter(e=>!i.includes(e)),d=i.filter(e=>!o.includes(e)),c=i.filter(r=>o.includes(r)&&p(e,r)!==p(t,r)).concat(n,d).sort(),g=u(e);if(g&&l.has(g)&&c.length)return{type:"complete",oldValue:e,newValue:t};let h,m=a(e)&&a(t);for(let i of c){let o,n=p(e,i),l=p(t,i);if((m||"function"!=typeof n&&"function"!=typeof l)&&n!==l&&(null!=n||null!=l)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,l);else if(n instanceof Date&&l instanceof Date){if(n.getTime()===l.getTime())continue;o={type:"complete",oldValue:n,newValue:l}}else o="object"==typeof n&&"object"==typeof l&&u(n)===u(l)?y(n,l):{type:"complete",oldValue:n,newValue:l};null!=o&&(null==h?h={type:"partial",diff:{[i]:o}}:h.diff[i]=o)}}return h}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:y(e,t)}},99680(e,t,r){r.r(t),r.d(t,{default:()=>se});var i=r(32198),o=r(37838),n=r(69540),l=r(7762),a=r(51447),s=r(49186),p=r(44208),u=r(53966),y=r(25728),d=r(93637),c=r(36708),g=r(84952),h=r(10107),m=r(64108),f=r(43937),w=r(5443),v=r(16930),b=r(41910),C=r(55156),x=r(60950),M=r(89808),S=r(99959);const P=Symbol("isParquetGraphicOrigin");var Z;class A extends S.A{get[(Z=P,x.ym)](){return this.layer}get[C.e](){return this.layer}get[M.Q](){return this.layer}get[b.e7](){return this.layer}constructor(e){super(),this[Z]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var E=r(4146),L=r(65529),T=r(92474),O=r(17676),j=r(83027),F=r(42760),I=r(22671);let z=class extends((0,L.Zt)(T.x_)){constructor(e){super(e),this.type="parquet"}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this._initialize(t)),this.addHandles([(0,c.wB)(()=>this.layer.data,async e=>{if(e)try{await this._proxy.updateFileProvider(await(0,F.Dt)(e))}catch{}}),(0,c.wB)(()=>this.layer.customParameters,e=>this._setCustomParameters(e))]),Promise.resolve(this)}async reload(e){let t=await this._createLoadParameters(e);return this._proxy.reload(t)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async getDiagnosticsSnapshot(){return await this.load(),this._proxy.getDiagnosticsSnapshot()}async getColumnIndex(e){return await this.load(),this._proxy.getColumnIndex(e)}async getOffsetIndex(e){return await this.load(),this._proxy.getOffsetIndex(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){let r=await this.queryFeaturesJSON(e,{signal:t?.signal});return I.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return u.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};let r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:w.A.fromJSON(r.extent)}}async _initialize(e){let t={onSourceChange:()=>this.emit("source-changed"),onRangeRead:e=>this.emit("range-read",e)};this._connection=await(0,j.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this,client:t}),(0,O.Te)(e),this._proxy=this._connection.createInvokeProxy();let r=await this._createLoadParameters(e),{layerDefinition:i,capabilities:o}=await this._proxy.load(r);(0,O.Te)(e),this.sourceJSON=i,this.capabilities=o}async _createLoadParameters(e){if(!this.layer.data)throw new s.A("parquet:missing-data","A data source must be specified",this.layer);let t=await(0,F.Dt)(this.layer.data,{signal:e});return(0,O.Te)(e),{provider:t,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,F.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters}}_setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{u.A.getLogger(this).warn("Failed to update customParameters")})}_queryStream(e,t){return this._proxy.queryStream(e,t)}_getStreamNextFeatures(e,t){return this._proxy.getStreamNextFeatures(e,t)}};(0,i.Cg)([(0,h.MZ)()],z.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({constructOnly:!0})],z.prototype,"layer",void 0),(0,i.Cg)([(0,h.MZ)()],z.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,h.MZ)()],z.prototype,"capabilities",void 0),z=(0,i.Cg)([(0,m.$)("esri.layers.graphics.sources.ParquetSource")],z);var _=r(63074),q=r(69208),R=r(10497),N=r(87718),D=r(56658),J=r(34287),B=r(32756),V=r(54310),G=r(25036),K=r(10873),k=r(29005),$=r(20437),Q=r(17036),U=r(30524),H=r(9075),W=r(34582),X=r(46499),Y=r(39383),ee=r(56370),te=r(15584),re=r(41214),ie=r(97552),oe=r(30291);r(98623);const ne=(0,Q.p)(),le="__OBJECTID",ae={types:{key:"type",base:null,typeMap:{wkb:W.A,location:H.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let se=class extends((0,D.J)((0,N.F)((0,_.dM)((0,B.fY)((0,R.z)((0,G.j)((0,V.J)((0,J.q)((0,y.M)((0,q.d)((0,n.OU)(E.A)))))))))))){constructor(e){super(e),this._emptyUrls=new l.A,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new A(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=le,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,p.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles((0,c.on)(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return"UTC"}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){let o=e.filter(e=>e.name!==le||"oid"!==e.type).map(e=>e.toJSON(i));(0,d.sM)(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,U.yp)(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{let t=this.data.urls?.at(0);e=t?(0,g.e7)(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s.A("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));let o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){(0,a.Lx)(u.A.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new ee.A({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return(0,oe.tn)(this,e)}createQuery(){let e=new ie.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){let t=new z({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=this,e.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if("portal-item"===this.data?.type){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return ie.A.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new l.A(e):e??new l.A}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();let t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,U.yp)(this.renderer,this.fieldsIndex),this.spatialReference??=v.A.WGS84}};(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,write:!1}})],se.prototype,"capabilities",null),(0,i.Cg)([(0,h.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],se.prototype,"charts",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],se.prototype,"copyright",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],se.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,h.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],se.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],se.prototype,"returnM",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],se.prototype,"returnZ",void 0),(0,i.Cg)([(0,h.MZ)()],se.prototype,"displayOptimization",void 0),(0,i.Cg)([(0,h.MZ)({type:[$.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],se.prototype,"fields",void 0),(0,i.Cg)([(0,f.K)("fields")],se.prototype,"writeFields",null),(0,i.Cg)([(0,h.MZ)(ne.fieldsIndex)],se.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,h.MZ)(ae)],se.prototype,"geometryEncoding",void 0),(0,i.Cg)([(0,h.MZ)({type:w.A,json:{name:"extent"}})],se.prototype,"fullExtent",void 0),(0,i.Cg)([(0,h.MZ)({type:F.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:F.ye.read},write:{writer:F.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:F.ye.read}}}}})],se.prototype,"geometryType",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],se.prototype,"hasM",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],se.prototype,"hasZ",void 0),(0,i.Cg)([(0,h.MZ)(K.kF)],se.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:[X.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Y.w},write:!0}})],se.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,h.MZ)(K.fV)],se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,h.MZ)()],se.prototype,"file",void 0),(0,i.Cg)([(0,h.MZ)({type:String,readOnly:!0})],se.prototype,"objectIdField",void 0),(0,i.Cg)([(0,h.MZ)({type:["ParquetLayer"]})],se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,h.MZ)(ne.outFields)],se.prototype,"outFields",void 0),(0,i.Cg)([(0,h.MZ)(K.M6)],se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({types:re.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],se.prototype,"renderer",null),(0,i.Cg)([(0,h.MZ)({type:z,readOnly:!0,cast:null,json:{read:!1}})],se.prototype,"source",void 0),(0,i.Cg)([(0,h.MZ)({type:v.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],se.prototype,"spatialReference",void 0),(0,i.Cg)([(0,h.MZ)({type:[k.A]})],se.prototype,"templates",void 0),(0,i.Cg)([(0,h.MZ)()],se.prototype,"title",null),(0,i.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0})],se.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({types:{key:"type",base:null,typeMap:{files:ee.A,"portal-item":te.A}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],se.prototype,"data",void 0),(0,i.Cg)([(0,f.K)("web-map","data")],se.prototype,"writeData",null),(0,i.Cg)([(0,h.MZ)({type:l.A.ofType(String),json:{read:!1,write:!1}})],se.prototype,"urls",null),se=(0,i.Cg)([(0,m.$)("esri.layers.ParquetLayer")],se)},32756(e,t,r){r.d(t,{Rr:()=>a});var i=r(32198),o=r(93637),n=r(91429),l=r(91880);function a(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new l.A;return o.read(i,r),[o]}const s={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(s)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,s])},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),n=r(66552),l=r(25482),a=r(91429);const s=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(l.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:s.read,write:s.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],p)},46499(e,t,r){r.d(t,{A:()=>S});var i,o,n=r(32198),l=(r(44208),r(66552)),a=r(25482),s=r(4718),p=r(90629),u=r(91429),y=r(90360),d=r(73913),c=r(32730),g=r(77548),h=r(59868),m=r(73838),f=r(33910),w=r(36005),v=r(43937);const b=new l.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function C(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function x(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function M(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let S=class extends a.o{static{i=c.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],n=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,c.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,c.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&x(i))e=new d.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,c.XJ)(this)}getLabelExpressionArcade(){return(0,c.BI)(this)}getLabelExpressionSingleField(){return(0,c.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,s.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,s.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:C}}}}})],S.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:C}}}}})],S.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&M(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],S.prototype,"labelExpression",void 0),(0,n.Cg)([(0,w.w)("labelExpression")],S.prototype,"readLabelExpression",null),(0,n.Cg)([(0,v.K)("labelExpression")],S.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:d.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return x(e)||M(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],S.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,v.K)("labelExpressionInfo")],S.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],S.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],S.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],S.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"maxScale",void 0),(0,n.Cg)([(0,v.K)("maxScale")],S.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"minScale",void 0),(0,n.Cg)([(0,v.K)("minScale")],S.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],S.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],S.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:f.em,json:{types:f.em,origins:{"portal-item":{types:f.em,read:{reader:(0,y.C)({types:f.em})},default:null},"web-scene":{types:f.Rv,read:{reader:(0,y.C)({types:f.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],S.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=o=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],S)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(25482),l=r(91429),a=r(32730),s=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,s.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.LabelExpressionInfo")],u)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),n=r(66552),l=r(25482),a=r(91429);const s=new n.J({asc:"ascending",desc:"descending"});let p=class extends l.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,a.MZ)({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],p)},15584(e,t,r){r.d(t,{A:()=>y});var i=r(32198),o=r(69540),n=r(25482),l=r(91429),a=r(64108),s=r(80812),p=r(36005),u=r(43937);let y=class extends((0,n.T)(o.Pw)){constructor(e){super(e),this.type="portal-item"}readPortalItem(e,t,r){if(t.itemId)return new s.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}};(0,i.Cg)([(0,l.MZ)({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],y.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:s.default,json:{write:{isRequired:!0}}})],y.prototype,"portalItem",void 0),(0,i.Cg)([(0,p.w)("portalItem",["itemId"])],y.prototype,"readPortalItem",null),(0,i.Cg)([(0,u.K)("portalItem",{itemId:{type:String}})],y.prototype,"writePortalItem",null),y=(0,i.Cg)([(0,a.$)("esri.layers.support.PortalItemData")],y)},39383(e,t,r){r.d(t,{w:()=>s,z:()=>y});var i=r(49186),o=r(53966),n=r(46499);const l=()=>o.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function s(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function y(e,t){let r=[];for(let o of e){let e=o.labelPlacement,n=u[t];if(!o.symbol)return l().warn("No ILabelClass symbol specified."),[];if(!n)return l().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(o);else{let i=n[0];e&&l().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let a=o.clone();a.labelPlacement=i,r.push(a)}}return r}},22671(e,t,r){r.d(t,{A:()=>w});var i,o=r(32198),n=r(52106),l=r(66552),a=r(25482),s=r(4718),p=r(91429),u=r(16930),y=r(60408),d=r(65864),c=r(50498),g=r(20437),h=r(36005),m=r(43937);const f=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,l=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)l?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,l]}=r,a=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*l,a,s);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],l=r.fromJSON(n),a=n.geometry?.spatialReference;null!=l.geometry&&!a&&(l.geometry.spatialReference=i);let s=n.aggregateGeometries,p=l.aggregateGeometries;if(s&&null!=p)for(let e in p){let t=p[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(l)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let l=0,a=e.length;l<a;l++){let a=e[l];if(l>0){let e=t(a[0]),l=r(a[1]);(e!==i||l!==o)&&(n.push([e-i,l-o]),i=e,o=l)}else i=t(a[0]),o=r(a[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,y.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],l=this._quantizePoints(n,t,r);l&&o.push(l)}return o.length>0?((0,y.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,l,a=(0,y.Bi)(e)?e.rings:e.paths;for(let e=0,i=a.length;e<i;e++){let i=a[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,l,a=e.points;for(let e=0,i=a.length;e<i;e++){let i=a[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[n.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[g.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:c.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),o=r(66552),n=r(53966),l=r(91429),a=r(93223);const s=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===u||e===p)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,l.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(s,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,s])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1484],{66344(t,e,i){i.d(e,{q:()=>u});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){return this._db.get(t.id+e)?.size??0}put(t,e,i,s,a){e=t.id+e;let u=this._db.get(e);if(u&&(this._size-=u.size,t.size-=u.size,this._db.delete(e),u.entry!==i&&this._notifyRemove(e,u.entry,u.size,0)),s>this._maxSize)return void this._notifyRemove(e,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,i,0,0);let o=1+Math.max(a,-4)- -3;this._db.set(e,new n(i,s,o)),this._size+=s,t.size+=s,this._checkSize()}updateSize(t,e){e=t.id+e;let i=this._db.get(e);if(!i)return;this._size-=i.size,t.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let t=this._notifyRemove(e,i.entry,r,1);if(!(null!=t&&t>0))return void this._db.delete(e);r=t}i.size=r,this._size+=r,t.size+=r,this._checkSize()}pop(t,e){e=t.id+e;let i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;let i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){let i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=[];this._db.forEach((t,r)=>{let s=t.lifetime;i[s]=(i[s]||0)+t.size,this._clients.forEach(i=>{let{id:s,name:n}=i;if(r.startsWith(s)){let i=e[n]||0;e[n]=i+t.size}})});let r={};this._clients.forEach(t=>{let i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){let s=e[i]||0;e[i]=s,r[i]=Math.round(100*t.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(e);s.sort((t,i)=>e[i]-e[t]),s.forEach(i=>t[i]=Math.round(e[i]/2**20)+"MB / "+r[i]);for(let e=i.length-1;e>=0;--e){let r=i[e];r&&(t["Priority "+(e+-3-1)]=Math.round(r/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){let e=t.id;this._db.forEach((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(let[e,i]of this._db)e.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,r){let s=this._clients.get(t.split(a)[0])?.removeFunc,n=s?.(e,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){let i=e??this;if(i.size<=t)return;let r=e?.id,s=!0;for(;s;){s=!1;for(let[n,u]of this._db)if(0===u.lifetime&&(!r||n.startsWith(r))){let r=e??this._clients.get(n.split(a)[0]);if(this._purgeItem(n,u,r),i.size<=.9*t)return;s||=this._db.has(n)}}for(let[s,n]of this._db)if(!r||s.startsWith(r)){let r=e??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);let r=this._notifyRemove(t,e.entry,e.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),e.lives=e.lifetime,e.size=r,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new s(0);class n{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const a=":";class u{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new s(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9093(t,e,i){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>s,vt:()=>r});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:r,fromValues:function(t,e,i,r,s,n,a,u,o,l,h,c,f,d,p,m){return[t,e,i,r,s,n,a,u,o,l,h,c,f,d,p,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,n])},35522(t,e,i){i.d(e,{$A:()=>P,Bw:()=>n,C:()=>a,Cc:()=>v,DI:()=>M,Io:()=>g,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>I,T9:()=>m,WQ:()=>o,Z0:()=>F,_S:()=>d,aI:()=>A,ei:()=>b,fw:()=>C,gL:()=>R,hG:()=>x,hZ:()=>u,hs:()=>_,jk:()=>p,lw:()=>h,m3:()=>w,oW:()=>E,t2:()=>O,tn:()=>f,ze:()=>z});var r=i(51850),s=i(34304);function n(t){let e=t[0],i=t[1],r=t[2];return Math.sqrt(e*e+i*i+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,i,r){return t[0]=e,t[1]=i,t[2]=r,t}function o(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function h(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function c(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function f(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function _(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function y(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t[2]=e[2]+i[2]*r,t}function g(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+r*r+s*s)}function x(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return i*i+r*r+s*s}function w(t){let e=t[0],i=t[1],r=t[2];return e*e+i*i+r*r}function z(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function M(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function I(t,e=t){let i=e[0],r=e[1],s=e[2],n=i*i+r*r+s*s;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function P(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],u=i[1],o=i[2];return t[0]=s*o-n*u,t[1]=n*a-r*o,t[2]=r*u-s*a,t}function v(t,e,i,r){let s=e[0],n=e[1],a=e[2];return t[0]=s+r*(i[0]-s),t[1]=n+r*(i[1]-n),t[2]=a+r*(i[2]-a),t}function F(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=i[0]*r+i[4]*s+i[8]*n+i[12],t[1]=i[1]*r+i[5]*s+i[9]*n+i[13],t[2]=i[2]*r+i[6]*s+i[10]*n+i[14],t}function b(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=r*i[0]+s*i[3]+n*i[6],t[1]=r*i[1]+s*i[4]+n*i[7],t[2]=r*i[2]+s*i[5]+n*i[8],t}function R(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,r,s,n){let a=e[0],u=e[1],o=e[2],l=r*o-s*u,h=s*a-i*o,c=i*u-r*a,f=r*c-s*h,d=s*l-i*c,p=i*h-r*l,m=2*n;return t[0]=a+l*m+2*f,t[1]=u+h*m+2*d,t[2]=o+c*m+2*p,t}const N=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function A(t,e){if(t===e)return!0;let i=t[0],r=t[1],n=t[2],a=e[0],u=e[1],o=e[2],l=(0,s.FD)();return Math.abs(i-a)<=l*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))}function E(t,e,i){let r=i[0]-e[0],s=i[1]-e[1],n=i[2]-e[2],a=r*r+s*s+n*n;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=s*a,t[2]=n*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=l,G=h,k=c,Q=g,D=x,Z=n,B=w;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:o,angle:function(t,e){I(N,t),I(q,e);let i=S(N,q);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,r,s,n){let a=1-n,u=a*a,o=n*n,l=u*a,h=3*n*u,c=3*o*a,f=o*n;return t[0]=e[0]*l+i[0]*h+r[0]*c+s[0]*f,t[1]=e[1]*l+i[1]*h+r[1]*c+s[1]*f,t[2]=e[2]*l+i[2]*h+r[2]*c+s[2]*f,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:a,cross:P,crossAndNormalize:function(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],u=i[1],o=i[2],l=s*o-n*u,h=n*a-r*o,c=r*u-s*a,f=Math.sqrt(l*l+h*h+c*c);return t[0]=l/f,t[1]=h/f,t[2]=c/f,t},direction:E,dist:Q,distance:g,div:k,divide:c,dot:S,equals:A,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,r,s,n){let a=n*n,u=a*(2*n-3)+1,o=a*(n-2)+n,l=a*(n-1),h=a*(3-2*n);return t[0]=e[0]*u+i[0]*o+r[0]*l+s[0]*h,t[1]=e[1]*u+i[1]*o+r[1]*l+s[1]*h,t[2]=e[2]*u+i[2]*o+r[2]*l+s[2]*h,t},inverse:M,len:Z,length:n,lerp:v,max:m,min:p,mul:G,multiply:h,negate:z,normalize:I,random:function(t,e=1){let i=s.Ov,r=2*i()*Math.PI,n=2*i()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=n*e,t},rotateX:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0],n[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),n[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateY:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),n[1]=s[1],n[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateZ:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),n[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),n[2]=s[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:_,scaleAndAdd:y,scaleTo:function(t,e){return _(t,t,e/Z(t))},set:u,sign:d,sqrDist:D,sqrLen:B,squaredDistance:x,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:l,transformMat3:b,transformMat4:F,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:R,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,Z,"jb",0,T,"lo",0,D,"uE",0,B])},69397(t,e,i){i.d(e,{Qf:()=>u,Qh:()=>n,lM:()=>s});var r=i(34275);function s(t){if(!t)return 0;let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=a(t[i],!1));return e}function n(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return o(t,8);let i=h;for(let r=0;r<e;r++)i+=a(t[r]);return i}(t);let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=a(t[i]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?n(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+c:Array.isArray(e)?o(e,16):0:0),0)}function o(t,e){return h+t.length*e}const l=32,h=16,c=145},36745(t,e,i){i.d(e,{z:()=>u});var r=i(4718),s=i(51118),n=i(60408),a=i(92722);class u{static fromOptimized(t,e,i=1){return(new o).initialize(t,e,i)}static fromJSON(t){let[e,i]=h(t),r=(0,n.Pv)(t),s=(0,n.W0)(t);return(new c).initialize(e,i,r,s,1)}static fromOptimizedCIM(t,e,i=1){return(new f).initialize(t,e,i)}static fromJSONCIM(t,e=1){let[i,r]=h(t),s=(0,n.Pv)(t),a=(0,n.W0)(t);return(new d).initialize(i,r,s,a,e)}static fromFeatureSetReader(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimized(e,i):null}static fromFeatureSetReaderCIM(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimizedCIM(e,i):null}static createEmptyOptimized(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSON(t,e=!1,i=!1){return(new c).initialize([],t,e,i,1)}static createEmptyOptimizedCIM(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSONCIM(t,e=!1,i=!1,r=1){return(new d).initialize([],t,e,i,r)}asJSON(){let t=(0,s.x)(this),{hasZ:e,hasM:i}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:i}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:i?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:i}:{paths:t,hasZ:e,hasM:i}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,i=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;let r=t,s=e;for(;this.nextPoint();)i+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return i+=(t-r)*(e+s),-.5*i}invertY(){this.yFactor*=-1}}class o extends u{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,i){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=i,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){let e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){let t=this._end,e=this._geometry.coords,i=this._pathOffset;return(new o).initialize(new a.A([this.pathSize],e.slice(i,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){let t=this._end,e=this._stride,i=this._geometry.coords,r=0;for(let s=this._pathOffset+e;s<t;s+=e){let t=i[s-e],n=i[s-e+1],a=i[s]-t,u=i[s+1]-n;r+=Math.sqrt(a*a+u*u)}return r}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(let e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){let e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){let t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){let t=this._geometry.coords,e=this._pathOffset,i=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[i+r])return!1;return!0}clone(){return(new o).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){let{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){let t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){let e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function h(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends u{initialize(t,e,i,r,s){return this._paths=t,this.geometryType=e,this.hasZ=i,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=s,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){let t=this._currentPath.length,e=this._currentPath,i=0;for(let r=1;r<t;r++){let t=e[r-1],s=e[r],n=t[0],a=t[1],u=s[0]-n,o=s[1]-a;i+=Math.sqrt(u*u+o*o)}return i}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){let e=(0,s.x)(t);for(let t of e)this.pushPath(t)}asOptimized(){let{hasZ:t,hasM:e}=this,i=new a.A([],[],t,e),{coords:r,lengths:s}=i;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),s.length=0;else for(let i of this._paths){for(let s of i)r.push(s[0]),r.push(s[1]*this.yFactor),t&&r.push(s[2]),e&&r.push(s[this._mIndex]);s.push(i.length)}return i}isClosed(){let t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}clone(){return(new c).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class f extends o{initialize(t,e,i){return super.initialize(t,e,i),this._controlPoints||=this._controlPoints=Array(this.totalSize).fill(void 0).map(t=>new Set),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){let t=(new f).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,i,r,s){return super.initialize(t,e,i,r,s)}clone(){return(new d).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},4197(t,e,i){i.d(e,{Vj:()=>h,cj:()=>l,jh:()=>n,l5:()=>u,yH:()=>o});var r=i(34275),s=i(9093);function n(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function u(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function o(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let i=n(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let r=0;r<e.length;++r)i[t.length+r]=e[r];return i}function l(t){return[...t]}function h(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},70328(t,e,i){i.d(e,{BI:()=>F,C:()=>a,DC:()=>f,Ej:()=>x,Ie:()=>P,Jt:()=>v,Lu:()=>z,Ne:()=>M,RF:()=>c,TF:()=>y,VL:()=>p,aI:()=>R,fA:()=>u,gE:()=>l,gX:()=>g,hZ:()=>S,iT:()=>d,is:()=>b,pg:()=>w,uJ:()=>_,vI:()=>I,vY:()=>o,vt:()=>n,w1:()=>h,yr:()=>m}),i(35522);var r=i(5443),s=(i(19419),i(4197));function n(t=N){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function u(t,e,i,r,s,a,u=n()){return u[0]=t,u[1]=e,u[2]=i,u[3]=r,u[4]=s,u[5]=a,u}function o(t,e=n()){return function(t,e,i,r=n()){return S(r,C),function(t,e,i=0,r=e.length/3){let s=t[0],n=t[1],a=t[2],u=t[3],o=t[4],l=t[5];for(let t=0;t<r;t++)s=Math.min(s,e[i+3*t]),n=Math.min(n,e[i+3*t+1]),a=Math.min(a,e[i+3*t+2]),u=Math.max(u,e[i+3*t]),o=Math.max(o,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=n,t[2]=a,t[3]=u,t[4]=o,t[5]=l}(r,t,e,i),r}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,r,n,a,u,o]=t;return e[0]=i,e[1]=r,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=n,e[9]=i,e[10]=u,e[11]=o,e[12]=a,e[13]=r,e[14]=n,e[15]=a,e[16]=r,e[17]=o,e[18]=a,e[19]=u,e[20]=n,e[21]=a,e[22]=u,e[23]=o,e}function h(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,r]){!function(t,e,i,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],r)}(t,e,i,r)}function p(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function _(t){return t[2]>=t[5]?0:t[5]-t[2]}function y(t){let e=p(t),i=_(t),r=m(t);return e*e+i*i+r*r}function g(t,e=[0,0,0]){return e[0]=t[0]+p(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+_(t)/2,e}function x(t,e=[0,0,0]){return e[0]=p(t),e[1]=m(t),e[2]=_(t),e}function w(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function z(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function M(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function I(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function P(t){return t?S(t,C):n(C)}function v(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function F(t,e,i,r,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=r,t[4]=s,t[5]=1/0,t}function b(t){return 6===t.length}function R(t,e,i){if(null==t||null==e)return t===e;if(!b(t)||!b(e))return!1;if(i){for(let r=0;r<t.length;r++)if(!i(t[r],e[r]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];n(),i.d(e,["qv",0,C,"v_",0,N])},78957(t,e,i){i.d(e,{d:()=>h,R:()=>z});class r{constructor(t=s){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;let{_data:e,_compare:i}=this;e.push(t);let r=e.length-1>>>0,s=e[r];for(;r>0;){let t=r-1>>1,n=e[t];if(!(i(n,s)<=0))break;e[t]=s,e[r]=n,r=t}}dequeue(){let{_data:t,_compare:e}=this,i=t[0],r=t.pop();if(0===t.length)return i;t[0]=r;let s,n,a=0,u=t.length,o=t[0],l=null;for(;;){let i=2*a+1,r=2*a+2;if(l=null,i<u&&(s=t[i],e(s,o)>0&&(l=i)),r<u&&(n=t[r],(null===l&&e(n,o)<=0||null!==l&&e(n,s)<=0)&&(l=r)),null===l)break;t[a]=t[l],t[l]=o,a=l}return i}}const s=(t,e)=>t<e?-1:+(t>e);var n=i(19419),a=i(537),u=i(12359),o=i(95108),l=i(12176);function h(t){if(0===t.totalSize)return null;let e=(0,a.z8)(t);if(!e)return null;let i=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19,r=0,s=0;t.reset();for(let e=0;t.nextPath();e++){let i=t.getCurrentRingArea();i>s&&(s=i,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();let o=(0,a.B$)(t);if(Math.abs(s)<=2*i*i)return[(o[0]+o[2])/2,(o[1]+o[3])/2];t.seekPathStart();let l=(0,u.w2)(t,(0,n.vt)());if(null===l)return null;if(t.totalPoints<4)return l;let h=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],p=[NaN,NaN,NaN,NaN],m=[NaN,NaN,NaN,NaN],_=!1,w=f(l,t,!0);0===w.distance&&(_=!0,h[0][0]=l[0],h[0][1]=l[1],w=f(l,t,!1)),p[0]=w.distance,m[0]=0;let z=[NaN,NaN],M=!1,I=.25,S=-1,P=NaN;do{if(P=NaN,h[1]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[1][0])&&!isNaN(h[1][1])&&(w=f(h[1],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[1],t))M=!0,p[1]=P,m[1]=g(h[1],l);else if(!isNaN(P)&&P>S&&(S=P,z[0]=h[1][0],z[1]=h[1][1]),I-=.01,I<.1){if(!(S>=0))break;M=!0,p[1]=S,h[1][0]=z[0],h[1][1]=z[1],m[1]=g(h[1],l)}}while(!M);M=!1,I=.5,S=-1;let v=.01,F=1;do{if(P=NaN,h[2]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[2][0])&&!isNaN(h[2][1])&&(w=f(h[2],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[2],t))M=!0,p[2]=P,m[2]=g(h[2],l);else if(!isNaN(P)&&P>S)S=P,z[0]=h[2][0],z[1]=h[2][1];else if(P>S&&(S=P,z[0]=h[2][0],z[1]=h[2][1]),I=.5+v*F,v+=.01,F*=-1,I<.3||I>.7){if(!(S>=0))break;M=!0,p[2]=S,h[2][0]=z[0],h[2][1]=z[1],m[2]=g(h[2],l)}}while(!M);M=!1,I=.75,S=-1;do{if(P=NaN,h[3]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[3][0])&&!isNaN(h[3][1])&&(w=f(h[3],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[3],t))M=!0,p[3]=P,m[3]=g(h[3],l);else if(P>S&&(S=P,z[0]=h[3][0],z[1]=h[3][1]),I+=.01,I>.9){if(!(S>=0))break;M=!0,p[3]=S,h[3][0]=z[0],h[3][1]=z[1],m[3]=g(h[3],l)}}while(!M);let b,R=[0,1,2,3],C=+!_;for(let t=C;t<4;t++)for(let t=C;t<3;t++){let e=m[t],i=m[t+1];x(e,i)>0&&(b=R[t],R[t]=R[t+1],R[t+1]=b,m[t]=i,m[t+1]=e)}let N=C,q=0,O=0;for(let t=C;t<4;t++){switch(t){case 0:O=2*p[R[t]];break;case 1:O=1.66666666*p[R[t]];break;case 2:O=1.33333333*p[R[t]];break;case 3:O=p[R[t]]}O>q&&(q=O,N=R[t])}return h[N]}function c(t,e){let i,r,s,n,a=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(i=e.x,r=e.y;e.nextPoint();i=s,r=n)s=e.x,n=e.y,r>t[1]!=n>t[1]&&((s-i)*(t[1]-r)-(n-r)*(t[0]-i)>0?a++:a--);return 0!==a}function f(t,e,i){if(i&&c(t,e))return{coord:t,distance:0};let r=1/0,s=0,n=0,a=[0,0],u=[0,0],l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=u){u=[e.x,e.y],(0,o.gR)(l,t,a,u);let i=g(t,l);i<r&&(r=i,s=l[0],n=l[1])}return{coord:[s,n],distance:Math.sqrt(r)}}function d(t,e,i,r){let s=[e,0],a=1/0,u=1/0,o=!1,h=!1,c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],_=[0,0],y=[[0,0],[0,0]],g=(0,n.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(y[0][0]=t.x,y[0][1]=t.y;t.nextPoint();y[0][0]=y[1][0],y[0][1]=y[1][1]){if(y[1][0]=t.x,y[1][1]=t.y,null===p(g,y)||(d[0]=c[0][0],d[1]=c[0][1],_[0]=c[1][0],_[1]=c[1][1],0===m(g,d,_))||!(0,l.Ql)(c[0],c[1],y[0],y[1],f))continue;let e=f[1];a>u?e<a&&(a=e,o=!0):e<u&&(u=e,h=!0)}return o&&h?s[1]=(a+u)/2:s[0]=s[1]=NaN,s}function p(t,e){if(e.length<2)return null;t||=(0,n.vt)();let[i,r]=e[0],[s,a]=e[1];return t[0]=Math.min(i,s),t[1]=Math.min(r,a),t[2]=Math.max(i,s),t[3]=Math.max(r,a),t}function m(t,e,i){let r=_(e,t),s=_(i,t),n=t[0],a=t[1],u=t[2],o=t[3];if(r&s)return 0;if(!(r|s))return 4;let l=!!r|(s?2:0);do{let l=i[0]-e[0],h=i[1]-e[1];if(l>h)3&r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(u-e[0])/l,e[0]=u),r=_(e,t)):3&s?(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(u-i[0])/l,i[0]=u),s=_(i,t)):r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(o-e[1])/h,e[1]=o),r=_(e,t)):(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(o-i[1])/h,i[1]=o),s=_(i,t));else if(12&r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(o-e[1])/h,e[1]=o),r=_(e,t)):12&s?(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(o-i[1])/h,i[1]=o),s=_(i,t)):r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(u-e[0])/l,e[0]=u),r=_(e,t)):(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(u-i[0])/l,i[0]=u),s=_(i,t)),r&s)return 0}while(r|s);return l}function _(t,e){return+(t[0]<e[0])|(t[0]>e[2])<<1|(t[1]<e[1])<<2|(t[1]>e[3])<<3}function y(t,e,i){return t+(e-t)*i}function g(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function x(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;let i=isNaN(t),r=isNaN(e);return i<r?-1:+(i>r)}class w{constructor(t,e,i,r){this.x=t,this.y=e,this.cellSize=i,this.distancefromCellCenter=(0,o.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function z(t){if(!t.nextPath()||!t.pathSize)return null;let e=(0,a.B$)(t),i=e[2]-e[0],s=e[3]-e[1];if(0===i||0===s)return[e[0]+i/2,e[1]+s/2];let n=Math.max(Math.min(i,s)/100,1),o=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(i,s),h=l/2,c=0,f=0;for(c=e[0];c<e[2];c+=l)for(f=e[1];f<e[3];f+=l)o.enqueue(new w(c+h,f+h,h,t));t.reset(),t.nextPath();let d=(0,u.IK)(t);if(null===d)return null;let p,m=new w(d[0],d[1],0,t);for(;o.size>0;)p=o.dequeue(),p.distancefromCellCenter>m.distancefromCellCenter&&(m=p),!(p.maxDistanceToPolygon-m.distancefromCellCenter<=n)&&(h=p.cellSize/2,o.enqueue(new w(p.x-h,p.y-h,h,t)),o.enqueue(new w(p.x+h,p.y-h,h,t)),o.enqueue(new w(p.x-h,p.y+h,h,t)),o.enqueue(new w(p.x+h,p.y+h,h,t)));return[m.x,m.y]}},62815(t,e,i){i.d(e,{N:()=>u,d:()=>o});var r=i(86211),s=i(73941),n=i(21325),a=i(52006);function u(t,e,i){let r=o(e,i);if(1!==r)switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){null!=t?.z&&(t.z*=e)}(t,r);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t){if(t.curvePaths)for(let i of t.curvePaths)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.paths)for(let i of t.paths)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t){if(t.curveRings)for(let i of t.curveRings)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.rings)for(let i of t.rings)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(let i of t.points)i.length>2&&(i[2]*=e)}(t,r);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,r);default:return}}function o(t,e){return null==t||null==e||(0,n.aI)(t,e)||(0,s.xP)(t)||(0,s.xP)(e)?1:(0,r.G9)(t)/(0,r.G9)(e)}},6557(t,e,i){i.r(e),i.d(e,{default:()=>j});var r=i(32198),s=i(21818),n=i(49186),a=i(71511),u=i(44208),o=i(53966),l=i(17676),h=i(563),c=i(39516),f=i(86211),d=i(16930),p=i(70328),m=i(19419),_=i(21325),y=i(53929),g=i(90708),x=i(29441),w=i(75752),z=i(99352),M=i(8384),I=i(58727),S=i(95031),P=i(24460),v=i(64714),F=i(17754),b=i(20437),R=i(95466),C=i(30524),N=i(50639),q=i(42760),O=i(76248),A=(i(98623),i(30661)),E=i(28923),T=i(44320),G=i(35258),k=i(16630);const Q=new A.Z,D="__OBJECTID",Z=8e3;class B{constructor(t,e){this._files=t,this._createFileStream=e,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(t){for(await this._fill(t);this._pending.size>0;){(0,l.Te)(t),await this._fill(t);let e=await W(this._pending);if(this._pending.delete(e.read),this._resolvedCount++,null!=e.chunk)return e.chunk}return null}async _fill(t){for(this._removeDone();this._pending.size<8;){let e=this._getOrCreateNextStream(t);if(null==e)return;this._pending.add(e.read(t))}}_getOrCreateNextStream(t){let e=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<e){let e=this._files[this._fileIndex++],i=new V(e.id,this._createFileStream(e,t));return this._streams.push(i),i}return this._getNextStream()}_getNextStream(){let t=this._streams.length;for(let e=0;e<t;e++){let i=(this._streamIndex+e)%t,r=this._streams[i];if(r.canRead)return this._streamIndex=(i+1)%t,r}return null}_removeDone(){let t=this._streamIndex;for(let e=this._streams.length-1;e>=0;e--)this._streams[e].done&&(this._streams.splice(e,1),e<t&&t--);this._streamIndex=this._streams.length>0?t%this._streams.length:0}}function W(t){return Promise.race(Array.from(t,async t=>({read:t,chunk:await t})))}class V{constructor(t,e){this._fileId=t,this._stream=e,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(t){this._readCount++;try{let e=await(await this._stream).next(t);return null==e?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:e}}finally{this._readCount--}}}class j{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new h.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new a.A}async load(t){let e=t.spatialReference?d.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=t.customParameters,this._loadParameters=t,await this._updateProvider((0,S.M)(t.provider,null,()=>this._customParameters));let i,r=await this._provider.getMetadata(),s=await(0,q.nc)(r,{fields:t.fields?.map(t=>b.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?(0,N.G)(t.geometryEncoding):null,geometryType:t.geometryType?(0,q.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e});if(this._hasZ=!!r?.hasZ,this._hasM=!!r?.hasM,!s.fields)throw new n.A("parquet:unsupported","Fields must be defined");if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(o.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=d.A.WGS84),i={geometry:s.geometryEncoding?{geometryType:(0,q.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(t.customParameters),this._displayOptimization=s.displayOptimization,await this._provider.updateGeometryInfo(i),this._capabilities=rt(await this._getFileStatistics(),this._hasZ,this._hasM);let a=await this._provider.getFiles();if(!a.length)return{layerDefinition:{},capabilities:rt(null,this._hasZ,this._hasM)};let u=await a[0].file;s.file=u;let{fields:l}=s;if(null==l)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new b.A({name:D,type:"oid",alias:D}));for(let t of l){let e=u.getColumnId(t.name);null!=e&&(this._indexMap[t.name]=e)}let h=R.A.fromLayerJSON({fields:l.map(t=>t.toJSON()),dateFieldsTimeReference:{timeZoneIANA:"UTC"}});this._fieldsIndex=h;let c=(0,q.sA)(s.geometryType??"point");return this._metadata=G.i.createFeature({fieldsIndex:h.toJSON(),geometryType:c,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:D},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:"UTC"}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:c,featureIdInfo:{type:"object-id",fieldName:D},hasM:this._hasM,hasZ:this._hasZ,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(s),{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(t=>t.toJSON()),drawingInfo:(0,v.F0)(c),extent:this._fullExtent??void 0,geometryType:c,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(let{handle:t}of this._streams.values())t.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(t){this.destroy(),await this.load(t)}set remoteClient(t){this._source=t.createInvokeProxy("")}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async updateFileProvider(t){this._loadParameters={...this._loadParameters,provider:t};let e=(0,S.M)(t,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(e)}async getDiagnosticsSnapshot(){let t=await this._provider.getFiles();return{files:await Promise.all(t.map(t=>t.getDiagnosticsSnapshot()))}}async getColumnIndex(t){return(await this._getFileInfoById(t.fileId)).getColumnIndex(t.rowGroupIndex,t.columnIndex)}async getOffsetIndex(t){return(await this._getFileInfoById(t.fileId)).getOffsetIndex(t.rowGroupIndex,t.columnIndex)}async queryFeatures(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(i)||(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,Z):Z,i.resultOffset=i.resultOffset??0),i.outStatistics?this._queryStatistics(i,e):(i.returnDistinctValues&&(i.returnGeometry=void 0),(await this._enqueueQuery(i,e)).createQueryResponse())}async queryFeatureCount(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)||i.returnDistinctValues||i.groupByFieldsForStatistics?.length||i.outStatistics?.length?(i.returnDistinctValues||(i.outFields=void 0),i.returnGeometry=void 0,(await this._enqueueQuery(i,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)?(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,8e3):8e3,i.resultOffset=i.resultOffset??0,i.returnGeometry=void 0,i.outFields=void 0,i.returnDistinctValues=void 0,(await this._enqueueQuery(i,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryAttributeBins(t,e={}){throw new n.A("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(i),this._fullExtent&&!H(i))return{count:await this._getFeatureCount(),extent:this._fullExtent};let r=(0,s.z)(this._metadata.spatialReference);i.returnGeometry=!0,i.outFields=void 0;let n=(0,p.hZ)((0,p.vt)(),p.qv),a=(0,p.vt)(),u=await this._enqueueQuery(i,e),o=0;for(let t of u.items)t.getBounds(a)&&((0,p.RF)(n,a),o+=1);return{count:o,extent:(0,w.Wc)(n,r,i.outSR?(0,s.z)(i.outSR):r.toJSON(),r,!1)}}async queryStream(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=await this._getCandidateFiles(t),r=new B(i,async(e,i)=>{let r=await e.file,s=await this._createParquetDisplayQuery(r,e.id,t);return r.executeQuery(s,Z,i)}),s=this._streamIdCounter++,n=(0,l.NY)(e.signal,t=>{let e=this._streams.get(s);null!=e&&(e.handle.remove(),this._streams.delete(s))});return this._streams.set(s,{stream:r,handle:n}),s}async getStreamNext(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=this._streams.get(t);if(!i)return{result:null};let r=await i.stream.next(e.signal);if(null==r)return i.handle.remove(),this._streams.delete(t),{result:null};let s=r.chunk.serialize().buffer,n={fileId:r.fileId,buffer:s};return s instanceof ArrayBuffer?{result:n,transferList:[s]}:{result:n}}async getStreamNextFeatures(t,e){let{result:i}=await this.getStreamNext(t,e);if(null==i)return null;let r=(await(0,O.N)()).ParquetChunk.deserialize(new Uint8Array(i.buffer)),s=new k.s(this._metadata,this._indexMap,r,i.fileId),n=[];for(;s.next();){let t=(0,g.zv)(s.readGeometryWorldSpace(),s.geometryType,s.hasZ,s.hasM),e=s.readAttributes();n.push({attributes:e,geometry:t})}return{features:n}}async createPatch(t,e,i,r,s){if(!s.signal)throw Error("InternalError: AbortSignal must be passed");return(await(await(await this._getFileInfoById(t)).file).createChunkPatch(e,i,r,s.signal)).serialize().buffer}async _updateProvider(t){let e=this._provider;this._handles.removeAll(),this._provider=t,this._handles.add([t.events.on("rangeRead",t=>{this._source.onRangeRead(t)}),t.events.on("sourceChanged",async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await(e?.destroy())}async _getCandidateFiles(t){let e=await this._provider.getFiles(),i=await this._getSpatialFilePruning(t);if(null==i)return e;let r=e.filter(t=>this._mayIncludeFileForSpatialPruning(t,i));return"xz"===i.type?function(t,e){return t.slice().sort((t,i)=>{let r=it(t,e),s=it(i,e);return r===s?0:r<s?-1:1})}(r,i):r}async _queryStatistics(t,e){let i=await(0,I.T2)({...t},null,this._queryEngineParams.spatialReference);if(i.returnGeometry=void 0,function(t,e){return!!t.outStatistics?.length&&!H(t)&&!t.groupByFieldsForStatistics?.length&&!t.orderByFields?.length&&!t.returnDistinctValues&&!t.returnAggIds&&t.outStatistics.every(t=>function(t,e){switch(t.statisticType){case"count":return"1"===t.onStatisticField||null!=e.get(t.onStatisticField);case"min":case"max":{let i=e.get(t.onStatisticField);return null!=i&&(0,C.WA)(i)}default:return!1}}(t,e))}(i,this._fieldsIndex)){let t=await this._getStatisticsFromFiles(i);if(t)return t}return(await this._enqueueQuery(i,e)).createQueryResponse()}async _getStatisticsFromFiles(t){let e=await this._provider.getFiles(),i={},r=[];for(let s of t.outStatistics??[]){let t=X(s,e);if(!t.available)return null;i[s.outStatisticFieldName]=t.value,r.push(Y(s,this._fieldsIndex))}return{fields:r,features:[{attributes:i}]}}async _getSpatialFilePruning(t){if("tile"!==t.type&&("arcade"!==t.type||null==t.extent))return null;let e=this._displayOptimization?.index;if(null==e)return null;let i=t.outSpatialReference.wkid;if(null==e.wkid||null==i)return null;let r=e.wkid,s=await(0,O.N)();switch(e.type){case"xz":return{type:"xz",fieldName:(0,y.FG)(e.code),intersects:(n,a)=>s.queryIntersectsXZStatistics(e.fullExtent,t.extent,i,r,e.maxLevel,n,a)};case"z":return{type:"xy",xFieldName:(0,y.FG)(e.xColumn),yFieldName:(0,y.FG)(e.yColumn),intersects:(e,n,a,u)=>s.queryIntersectsXYStatistics(t.extent,i,r,e,n,a,u)}}}_mayIncludeFileForSpatialPruning(t,e){switch(e.type){case"xz":{let i=et(t,e);return"null-only"!==i?.type&&("bounds"!==i?.type||e.intersects(i.minValue,i.maxValue))}case"xy":{let i=t.statistics.statistics.get(e.xFieldName),r=t.statistics.statistics.get(e.yFieldName);return"null-only"!==i?.type&&"null-only"!==r?.type&&("bounds"!==i?.type||"bounds"!==r?.type||e.intersects(i.minValue,i.maxValue,r.minValue,r.maxValue))}}}async _tryDeriveParquetFullExtent(t){if(!t.spatialReference)return null;if(null==this._fullExtent&&"location"===t.geometryEncoding?.type){let e=await this._provider.getFiles(),{xField:i,yField:s}=t.geometryEncoding,n=(0,p.hZ)((0,p.vt)(),p.qv),a=!1;for(let t of e){let e=await t.file;for(let t of e.rowGroups()){let e={stack:[],error:void 0,hasError:!1};try{let u=(0,r.mS)(e,t.columnDescriptorForAttribute(i),!1),o=(0,r.mS)(e,t.columnDescriptorForAttribute(s),!1),l=(0,P.Hk)(u),h=(0,P.Hk)(o);if("bounds"===l?.type&&"bounds"===h?.type){let t=[l.minValue,h.minValue,l.maxValue,h.maxValue];(0,p.DC)(n,t),a=!0}t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}}return a?{xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:t.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(t){let e=await this._provider.getFiles();for(let i of e)if(i.id===t)return i;throw Error(`InternalError: File ${t} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(t){return(await this._getFileInfoById(t)).file}async _createParquetQuery(t,e,i,r,s){let n=(await(0,O.N)()).Query.new();null!=i&&n.setPreFilterStart(i),null!=r&&n.setPreFilterCount(r),null!=s&&n.setPostFilterCount(s);let a=await this._getRequiredFields(t);n.setOutFields(a),(t.geometry||t.returnGeometry)&&n.setReturnGeometry(!0),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM);let u=this._tryGetGeneralizedGeometryResolution(t);null!=u&&n.setSourceResolution(u);let o=t.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=o.wkid;if(t.geometry&&((0,_.K8)(o)||(0,_.oT)(o))){let e=(0,m.C)((0,m.vt)(),m.qv);for(let i of(0,w.qo)(t.geometry))(0,m.DC)(e,i);n.setOutSpatialReference(l),n.setExtent({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]})}if(t.where){let{id:i,file:r}=e;await this._setWhereClause(n,await r,i,t.where)}return n}async _createParquetDisplayQuery(t,e,i){let r=(await(0,O.N)()).Query.new();if("tile"===i.type){r.setExtent(i.extent),r.setQuantizationTransform(i.transform);let t=this._sourceResolution(i.resolution,i.outSpatialReference);null!=t&&r.setSourceResolution(t)}else"arcade"===i.type&&null!=i.extent&&r.setExtent(i.extent);return r.setOutFields(i.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(i.outSpatialReference.wkid),r.setReturnGeometry(i.returnGeometry),r.setReturnZ(i.returnZ),r.setReturnM(i.returnM),i.where&&await this._setWhereClause(r,t,e,i.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(t=>t.statistics.rowCount).reduce((t,e)=>t+e,0)}async _getByteLength(){return(await this._provider.getFiles()).map(t=>t.statistics.byteSize).reduce((t,e)=>t+e,0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,i,r){let s=this._indexMap,a=this._fieldsIndex,u={getAttribute(t,r){let n=s[r];if(null==n){if("__OBJECTID"===a.get(r)?.name){let e=t.row+t.rowGroupStart;return(0,F.xb)(i,e)}return null}let u=a.get(r);return(0,y.LC)(e,t.rowGroup,t.row,n,u.type)}},o=await(0,c.GP)(r,this._fieldsIndex);if(!o.isStandardized)throw new n.A("sql-parse-error","expression is not standardized");let l=o.fieldNames.map(t=>a.get(t)).filter(t=>t&&null!=this._indexMap[t?.name]);t.setWhere(r),t.setWhereEvaluator((t,e,i)=>o.testFeatureCompiled({rowGroup:t,row:e,rowGroupStart:i},u,null)),t.setWhereFields(l.map(t=>t.name))}async*_streamFeatures(t,e,i,r,s){let n=await this._provider.getFiles(),a=0;for(let u of n){let n=a,o=a+u.statistics.rowCount;if(a+=u.statistics.rowCount,null!=e&&e>=o)continue;let l=null==e?null:Math.max(e-n,0),h=i;if(null!=i){let t=e??0,r=t+i;h=Math.max(Math.min(r,o)-Math.max(t,n),0)}if(0===h)continue;let c=await this._createParquetQuery(t,u,l,h,r),f=await(await u.file).executeQuery(c,Z),d=async()=>{let t=await f.next(s);if(!t)return null;let e=new k.s(this._metadata,this._indexMap,t,u.id);return tt([new E.j(e,null,0,!1)],this._queryEngineParams)},p=await d();for(;null!=p;)yield p,p=await d()}}async _queryFeaturesWithQueryEnginePagination(t,e){let i=[],r=this._streamFeatures(t,null,null,null,e),s=await r.next();for(;!s.done;){let n=await s.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of n)i.push(t);s=await r.next()}return i}async _queryFeaturesWithUpfrontPagination(t,e){let i,r,s,n=t.resultOffset??0,a=t.resultRecordCount??Z;!function(t){for(let e in t){let i=e;if(J(i)&&null!==t[i])return!0}return!1}(t)?(n&&=(i=n,0),r=t.resultRecordCount):function(t){for(let e in t){let i=e;if(U(i)&&null!==t[i])return!0}return!1}(t)||(s=n+a);let u=[],o=this._streamFeatures(t,i,r,s,e),l=await o.next();for(;!l.done&&a>0;){let i=await l.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of i)if(n>0)n--;else if(u.push(t),--a<=0)return u;l=await o.next()}return u}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){if(t.objectIds?.length){let i=new Map;for(let e of t.objectIds){let t=(0,F.wY)(e),r=(0,F.gE)(e),s=i.get(t);s||(s=[],i.set(t,s)),s.push(r)}let r=[];for(let[s,n]of i.entries()){let i=await this._executeFileIdQuery(t,s,n,e);for(let t of i)r.push(t)}return new M.G(r,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===t.where&&(t.where=null),t.resultOffset??=0,t.resultRecordCount??=await this._getFeatureCount(),t.resultRecordCount>2e7&&(!this._displayOptimization||!t.geometry))throw new n.A("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");let i=!!t.orderByFields?.length||!!t.outStatistics?.length||!!t.returnDistinctValues,r=i?await this._queryFeaturesWithQueryEnginePagination(t,e):await this._queryFeaturesWithUpfrontPagination(t,e);return i||(t.resultOffset=0),new M.G(r,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,i,r){let s=await this._getRequiredFields(t),n=(await(0,O.N)()).Query.new();n.setOutFields(s),n.setReturnGeometry(!!t.returnGeometry),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM),n.setIds(new Uint32Array(i));let a=await(await this._getFile(e)).executeQuery(n,Z,r),u=await a.next(r),o=0,l=[];for(;null!=u;){let t=new k.s(this._metadata,this._indexMap,u,e),i=new E.j(t,null,o++,!1);l.push(i),u=await a.next(r)}return tt(l,this._queryEngineParams).executeQueryForOpaqueFeatures(t,r)}async _getRequiredFields(t){let e=new Set;if(t.outStatistics)for(let i of(0,x.g9)(this._fieldsIndex,t.outStatistics,t.groupByFieldsForStatistics))e.add(i);else if(t.outFields)for(let i of t.outFields)e.add(i);return(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t])}_tryGetGeneralizedGeometryResolution(t){if(!this._displayOptimization)return null;let e=t.outSR??this._queryEngineParams.spatialReference;if(!(0,_.K8)(e)&&!(0,_.oT)(e))return null;let i=t.quantizationParameters?.tolerance??t.maxAllowableOffset;return i?this._sourceResolution(i,e):null}_sourceResolution(t,e){let i=this._queryEngineParams.spatialReference,r=(0,f.GA)(e)/(0,f.GA)(i)*t;return!Number.isFinite(r)||r<=0?null:r}}function L(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function J(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function U(t){switch(t){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function H(t){for(let e in t){let i=e;if(L(i)&&null!==t[i])return!0}return!1}function Y(t,e){let i="exceedslimit"===t.statisticType?null:e.get(t.onStatisticField),r="min"!==t.statisticType&&"max"!==t.statisticType||"esriFieldTypeDate"!==i?.type?"esriFieldTypeDouble":i.type;return{name:t.outStatisticFieldName,alias:t.outStatisticFieldName,type:r}}function X(t,e){switch(t.statisticType){case"count":return function(t,e){if("count"!==t.statisticType)return{available:!1,value:null};if("1"===t.onStatisticField)return{available:!0,value:e.reduce((t,e)=>t+e.statistics.rowCount,0)};let i=0;for(let r of e){let e=r.statistics.statistics.get(t.onStatisticField);if(null==e||null==e.nullCount)return{available:!1,value:null};i+=r.statistics.rowCount-e.nullCount}return{available:!0,value:i}}(t,e);case"min":return $(t,e,Math.min);case"max":return $(t,e,Math.max);default:return{available:!1,value:null}}}function $(t,e,i){if("min"!==t.statisticType&&"max"!==t.statisticType)return{available:!1,value:null};let r=null,s="min"===t.statisticType?"minValue":"maxValue";for(let n of e){let e=n.statistics.statistics.get(t.onStatisticField);if(null==e)return{available:!1,value:null};switch(e.type){case"null-only":continue;case"unknown":return{available:!1,value:null};case"bounds":{let t=K(e[s]);if(null==t)return{available:!1,value:null};r=null==r?t:i(r,t);break}}}return{available:!0,value:r}}function K(t){return"number"==typeof t&&Number.isFinite(t)?t:null}function tt(t,e){let i=new T.I;for(let e of t)i.insert(e);return new w.do({...e,featureStore:i})}function et(t,e){return t.statistics.statistics.get(e.fieldName)??null}function it(t,e){let i=et(t,e);return"bounds"===i?.type?i.maxValue-i.minValue:1/0}function rt(t,e,i){let r=t?.featureCount,s=!1;return null!=r&&r<(0,u.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:i,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...z.F,maxRecordCount:Z,supportsOrderBy:s,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1484],{66344(t,e,i){i.d(e,{q:()=>u});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){return this._db.get(t.id+e)?.size??0}put(t,e,i,s,a){e=t.id+e;let u=this._db.get(e);if(u&&(this._size-=u.size,t.size-=u.size,this._db.delete(e),u.entry!==i&&this._notifyRemove(e,u.entry,u.size,0)),s>this._maxSize)return void this._notifyRemove(e,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,i,0,0);let o=1+Math.max(a,-4)- -3;this._db.set(e,new n(i,s,o)),this._size+=s,t.size+=s,this._checkSize()}updateSize(t,e){e=t.id+e;let i=this._db.get(e);if(!i)return;this._size-=i.size,t.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let t=this._notifyRemove(e,i.entry,r,1);if(!(null!=t&&t>0))return void this._db.delete(e);r=t}i.size=r,this._size+=r,t.size+=r,this._checkSize()}pop(t,e){e=t.id+e;let i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;let i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){let i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=[];this._db.forEach((t,r)=>{let s=t.lifetime;i[s]=(i[s]||0)+t.size,this._clients.forEach(i=>{let{id:s,name:n}=i;if(r.startsWith(s)){let i=e[n]||0;e[n]=i+t.size}})});let r={};this._clients.forEach(t=>{let i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){let s=e[i]||0;e[i]=s,r[i]=Math.round(100*t.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(e);s.sort((t,i)=>e[i]-e[t]),s.forEach(i=>t[i]=Math.round(e[i]/2**20)+"MB / "+r[i]);for(let e=i.length-1;e>=0;--e){let r=i[e];r&&(t["Priority "+(e+-3-1)]=Math.round(r/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){let e=t.id;this._db.forEach((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(let[e,i]of this._db)e.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,r){let s=this._clients.get(t.split(a)[0])?.removeFunc,n=s?.(e,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){let i=e??this;if(i.size<=t)return;let r=e?.id,s=!0;for(;s;){s=!1;for(let[n,u]of this._db)if(0===u.lifetime&&(!r||n.startsWith(r))){let r=e??this._clients.get(n.split(a)[0]);if(this._purgeItem(n,u,r),i.size<=.9*t)return;s||=this._db.has(n)}}for(let[s,n]of this._db)if(!r||s.startsWith(r)){let r=e??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);let r=this._notifyRemove(t,e.entry,e.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),e.lives=e.lifetime,e.size=r,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new s(0);class n{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const a=":";class u{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new s(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9093(t,e,i){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>s,vt:()=>r});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:r,fromValues:function(t,e,i,r,s,n,a,u,o,l,h,c,f,d,p,m){return[t,e,i,r,s,n,a,u,o,l,h,c,f,d,p,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,n])},35522(t,e,i){i.d(e,{$A:()=>P,Bw:()=>n,C:()=>a,Cc:()=>v,DI:()=>M,Io:()=>g,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>I,T9:()=>m,WQ:()=>o,Z0:()=>F,_S:()=>d,aI:()=>A,ei:()=>b,fw:()=>C,gL:()=>R,hG:()=>x,hZ:()=>u,hs:()=>_,jk:()=>p,lw:()=>h,m3:()=>w,oW:()=>E,t2:()=>O,tn:()=>f,ze:()=>z});var r=i(51850),s=i(34304);function n(t){let e=t[0],i=t[1],r=t[2];return Math.sqrt(e*e+i*i+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,i,r){return t[0]=e,t[1]=i,t[2]=r,t}function o(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function h(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function c(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function f(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function _(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function y(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t[2]=e[2]+i[2]*r,t}function g(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+r*r+s*s)}function x(t,e){let i=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return i*i+r*r+s*s}function w(t){let e=t[0],i=t[1],r=t[2];return e*e+i*i+r*r}function z(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function M(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function I(t,e=t){let i=e[0],r=e[1],s=e[2],n=i*i+r*r+s*s;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function P(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],u=i[1],o=i[2];return t[0]=s*o-n*u,t[1]=n*a-r*o,t[2]=r*u-s*a,t}function v(t,e,i,r){let s=e[0],n=e[1],a=e[2];return t[0]=s+r*(i[0]-s),t[1]=n+r*(i[1]-n),t[2]=a+r*(i[2]-a),t}function F(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=i[0]*r+i[4]*s+i[8]*n+i[12],t[1]=i[1]*r+i[5]*s+i[9]*n+i[13],t[2]=i[2]*r+i[6]*s+i[10]*n+i[14],t}function b(t,e,i){let r=e[0],s=e[1],n=e[2];return t[0]=r*i[0]+s*i[3]+n*i[6],t[1]=r*i[1]+s*i[4]+n*i[7],t[2]=r*i[2]+s*i[5]+n*i[8],t}function R(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,r,s,n){let a=e[0],u=e[1],o=e[2],l=r*o-s*u,h=s*a-i*o,c=i*u-r*a,f=r*c-s*h,d=s*l-i*c,p=i*h-r*l,m=2*n;return t[0]=a+l*m+2*f,t[1]=u+h*m+2*d,t[2]=o+c*m+2*p,t}const N=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function A(t,e){if(t===e)return!0;let i=t[0],r=t[1],n=t[2],a=e[0],u=e[1],o=e[2],l=(0,s.FD)();return Math.abs(i-a)<=l*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))}function E(t,e,i){let r=i[0]-e[0],s=i[1]-e[1],n=i[2]-e[2],a=r*r+s*s+n*n;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=s*a,t[2]=n*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=l,G=h,k=c,Q=g,D=x,Z=n,B=w;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:o,angle:function(t,e){I(N,t),I(q,e);let i=S(N,q);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,r,s,n){let a=1-n,u=a*a,o=n*n,l=u*a,h=3*n*u,c=3*o*a,f=o*n;return t[0]=e[0]*l+i[0]*h+r[0]*c+s[0]*f,t[1]=e[1]*l+i[1]*h+r[1]*c+s[1]*f,t[2]=e[2]*l+i[2]*h+r[2]*c+s[2]*f,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:a,cross:P,crossAndNormalize:function(t,e,i){let r=e[0],s=e[1],n=e[2],a=i[0],u=i[1],o=i[2],l=s*o-n*u,h=n*a-r*o,c=r*u-s*a,f=Math.sqrt(l*l+h*h+c*c);return t[0]=l/f,t[1]=h/f,t[2]=c/f,t},direction:E,dist:Q,distance:g,div:k,divide:c,dot:S,equals:A,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,r,s,n){let a=n*n,u=a*(2*n-3)+1,o=a*(n-2)+n,l=a*(n-1),h=a*(3-2*n);return t[0]=e[0]*u+i[0]*o+r[0]*l+s[0]*h,t[1]=e[1]*u+i[1]*o+r[1]*l+s[1]*h,t[2]=e[2]*u+i[2]*o+r[2]*l+s[2]*h,t},inverse:M,len:Z,length:n,lerp:v,max:m,min:p,mul:G,multiply:h,negate:z,normalize:I,random:function(t,e=1){let i=s.Ov,r=2*i()*Math.PI,n=2*i()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=n*e,t},rotateX:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0],n[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),n[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateY:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),n[1]=s[1],n[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},rotateZ:function(t,e,i,r){let s=[],n=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],n[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),n[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),n[2]=s[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:_,scaleAndAdd:y,scaleTo:function(t,e){return _(t,t,e/Z(t))},set:u,sign:d,sqrDist:D,sqrLen:B,squaredDistance:x,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:l,transformMat3:b,transformMat4:F,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:R,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,Z,"jb",0,T,"lo",0,D,"uE",0,B])},69397(t,e,i){i.d(e,{Qf:()=>u,Qh:()=>n,lM:()=>s});var r=i(34275);function s(t){if(!t)return 0;let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=a(t[i],!1));return e}function n(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return o(t,8);let i=h;for(let r=0;r<e;r++)i+=a(t[r]);return i}(t);let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=a(t[i]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?n(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+c:Array.isArray(e)?o(e,16):0:0),0)}function o(t,e){return h+t.length*e}const l=32,h=16,c=145},36745(t,e,i){i.d(e,{z:()=>u});var r=i(4718),s=i(51118),n=i(60408),a=i(92722);class u{static fromOptimized(t,e,i=1){return(new o).initialize(t,e,i)}static fromJSON(t){let[e,i]=h(t),r=(0,n.Pv)(t),s=(0,n.W0)(t);return(new c).initialize(e,i,r,s,1)}static fromOptimizedCIM(t,e,i=1){return(new f).initialize(t,e,i)}static fromJSONCIM(t,e=1){let[i,r]=h(t),s=(0,n.Pv)(t),a=(0,n.W0)(t);return(new d).initialize(i,r,s,a,e)}static fromFeatureSetReader(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimized(e,i):null}static fromFeatureSetReaderCIM(t){let e=t.readGeometryForDisplay(),i=t.geometryType;return e&&i?this.fromOptimizedCIM(e,i):null}static createEmptyOptimized(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSON(t,e=!1,i=!1){return(new c).initialize([],t,e,i,1)}static createEmptyOptimizedCIM(t,e=!1,i=!1,r=1){return(new f).initialize(new a.A([],[],e,i),t,r)}static createEmptyJSONCIM(t,e=!1,i=!1,r=1){return(new d).initialize([],t,e,i,r)}asJSON(){let t=(0,s.x)(this),{hasZ:e,hasM:i}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:i}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:i?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:i}:{paths:t,hasZ:e,hasM:i}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,i=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;let r=t,s=e;for(;this.nextPoint();)i+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return i+=(t-r)*(e+s),-.5*i}invertY(){this.yFactor*=-1}}class o extends u{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,i){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=i,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){let e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){let t=this._end,e=this._geometry.coords,i=this._pathOffset;return(new o).initialize(new a.A([this.pathSize],e.slice(i,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){let t=this._end,e=this._stride,i=this._geometry.coords,r=0;for(let s=this._pathOffset+e;s<t;s+=e){let t=i[s-e],n=i[s-e+1],a=i[s]-t,u=i[s+1]-n;r+=Math.sqrt(a*a+u*u)}return r}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(let e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){let e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){let t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){let t=this._geometry.coords,e=this._pathOffset,i=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[i+r])return!1;return!0}clone(){return(new o).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){let{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){let t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){let e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function h(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends u{initialize(t,e,i,r,s){return this._paths=t,this.geometryType=e,this.hasZ=i,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=s,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){let t=this._currentPath.length,e=this._currentPath,i=0;for(let r=1;r<t;r++){let t=e[r-1],s=e[r],n=t[0],a=t[1],u=s[0]-n,o=s[1]-a;i+=Math.sqrt(u*u+o*o)}return i}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){let e=(0,s.x)(t);for(let t of e)this.pushPath(t)}asOptimized(){let{hasZ:t,hasM:e}=this,i=new a.A([],[],t,e),{coords:r,lengths:s}=i;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),s.length=0;else for(let i of this._paths){for(let s of i)r.push(s[0]),r.push(s[1]*this.yFactor),t&&r.push(s[2]),e&&r.push(s[this._mIndex]);s.push(i.length)}return i}isClosed(){let t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}clone(){return(new c).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class f extends o{initialize(t,e,i){return super.initialize(t,e,i),this._controlPoints||=this._controlPoints=Array(this.totalSize).fill(void 0).map(t=>new Set),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){let t=(new f).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,i,r,s){return super.initialize(t,e,i,r,s)}clone(){return(new d).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},4197(t,e,i){i.d(e,{Vj:()=>h,cj:()=>l,jh:()=>n,l5:()=>u,yH:()=>o});var r=i(34275),s=i(9093);function n(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function u(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function o(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let i=n(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let r=0;r<e.length;++r)i[t.length+r]=e[r];return i}function l(t){return[...t]}function h(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},70328(t,e,i){i.d(e,{BI:()=>F,C:()=>a,DC:()=>f,Ej:()=>x,Ie:()=>P,Jt:()=>v,Lu:()=>z,Ne:()=>M,RF:()=>c,TF:()=>y,VL:()=>p,aI:()=>R,fA:()=>u,gE:()=>l,gX:()=>g,hZ:()=>S,iT:()=>d,is:()=>b,pg:()=>w,uJ:()=>_,vI:()=>I,vY:()=>o,vt:()=>n,w1:()=>h,yr:()=>m}),i(35522);var r=i(5443),s=(i(19419),i(4197));function n(t=N){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function u(t,e,i,r,s,a,u=n()){return u[0]=t,u[1]=e,u[2]=i,u[3]=r,u[4]=s,u[5]=a,u}function o(t,e=n()){return function(t,e,i,r=n()){return S(r,C),function(t,e,i=0,r=e.length/3){let s=t[0],n=t[1],a=t[2],u=t[3],o=t[4],l=t[5];for(let t=0;t<r;t++)s=Math.min(s,e[i+3*t]),n=Math.min(n,e[i+3*t+1]),a=Math.min(a,e[i+3*t+2]),u=Math.max(u,e[i+3*t]),o=Math.max(o,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=n,t[2]=a,t[3]=u,t[4]=o,t[5]=l}(r,t,e,i),r}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,r,n,a,u,o]=t;return e[0]=i,e[1]=r,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=n,e[9]=i,e[10]=u,e[11]=o,e[12]=a,e[13]=r,e[14]=n,e[15]=a,e[16]=r,e[17]=o,e[18]=a,e[19]=u,e[20]=n,e[21]=a,e[22]=u,e[23]=o,e}function h(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,r]){!function(t,e,i,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],r)}(t,e,i,r)}function p(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function _(t){return t[2]>=t[5]?0:t[5]-t[2]}function y(t){let e=p(t),i=_(t),r=m(t);return e*e+i*i+r*r}function g(t,e=[0,0,0]){return e[0]=t[0]+p(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+_(t)/2,e}function x(t,e=[0,0,0]){return e[0]=p(t),e[1]=m(t),e[2]=_(t),e}function w(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function z(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function M(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function I(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function P(t){return t?S(t,C):n(C)}function v(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function F(t,e,i,r,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=r,t[4]=s,t[5]=1/0,t}function b(t){return 6===t.length}function R(t,e,i){if(null==t||null==e)return t===e;if(!b(t)||!b(e))return!1;if(i){for(let r=0;r<t.length;r++)if(!i(t[r],e[r]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];n(),i.d(e,["qv",0,C,"v_",0,N])},78957(t,e,i){i.d(e,{d:()=>h,R:()=>z});class r{constructor(t=s){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;let{_data:e,_compare:i}=this;e.push(t);let r=e.length-1>>>0,s=e[r];for(;r>0;){let t=r-1>>1,n=e[t];if(!(i(n,s)<=0))break;e[t]=s,e[r]=n,r=t}}dequeue(){let{_data:t,_compare:e}=this,i=t[0],r=t.pop();if(0===t.length)return i;t[0]=r;let s,n,a=0,u=t.length,o=t[0],l=null;for(;;){let i=2*a+1,r=2*a+2;if(l=null,i<u&&(s=t[i],e(s,o)>0&&(l=i)),r<u&&(n=t[r],(null===l&&e(n,o)<=0||null!==l&&e(n,s)<=0)&&(l=r)),null===l)break;t[a]=t[l],t[l]=o,a=l}return i}}const s=(t,e)=>t<e?-1:+(t>e);var n=i(19419),a=i(537),u=i(12359),o=i(95108),l=i(12176);function h(t){if(0===t.totalSize)return null;let e=(0,a.z8)(t);if(!e)return null;let i=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19,r=0,s=0;t.reset();for(let e=0;t.nextPath();e++){let i=t.getCurrentRingArea();i>s&&(s=i,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();let o=(0,a.B$)(t);if(Math.abs(s)<=2*i*i)return[(o[0]+o[2])/2,(o[1]+o[3])/2];t.seekPathStart();let l=(0,u.w2)(t,(0,n.vt)());if(null===l)return null;if(t.totalPoints<4)return l;let h=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],p=[NaN,NaN,NaN,NaN],m=[NaN,NaN,NaN,NaN],_=!1,w=f(l,t,!0);0===w.distance&&(_=!0,h[0][0]=l[0],h[0][1]=l[1],w=f(l,t,!1)),p[0]=w.distance,m[0]=0;let z=[NaN,NaN],M=!1,I=.25,S=-1,P=NaN;do{if(P=NaN,h[1]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[1][0])&&!isNaN(h[1][1])&&(w=f(h[1],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[1],t))M=!0,p[1]=P,m[1]=g(h[1],l);else if(!isNaN(P)&&P>S&&(S=P,z[0]=h[1][0],z[1]=h[1][1]),I-=.01,I<.1){if(!(S>=0))break;M=!0,p[1]=S,h[1][0]=z[0],h[1][1]=z[1],m[1]=g(h[1],l)}}while(!M);M=!1,I=.5,S=-1;let v=.01,F=1;do{if(P=NaN,h[2]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[2][0])&&!isNaN(h[2][1])&&(w=f(h[2],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[2],t))M=!0,p[2]=P,m[2]=g(h[2],l);else if(!isNaN(P)&&P>S)S=P,z[0]=h[2][0],z[1]=h[2][1];else if(P>S&&(S=P,z[0]=h[2][0],z[1]=h[2][1]),I=.5+v*F,v+=.01,F*=-1,I<.3||I>.7){if(!(S>=0))break;M=!0,p[2]=S,h[2][0]=z[0],h[2][1]=z[1],m[2]=g(h[2],l)}}while(!M);M=!1,I=.75,S=-1;do{if(P=NaN,h[3]=d(t,y(o[0],o[2],I),0,e),!isNaN(h[3][0])&&!isNaN(h[3][1])&&(w=f(h[3],t,!1),P=w.distance),!isNaN(P)&&P>i&&c(h[3],t))M=!0,p[3]=P,m[3]=g(h[3],l);else if(P>S&&(S=P,z[0]=h[3][0],z[1]=h[3][1]),I+=.01,I>.9){if(!(S>=0))break;M=!0,p[3]=S,h[3][0]=z[0],h[3][1]=z[1],m[3]=g(h[3],l)}}while(!M);let b,R=[0,1,2,3],C=+!_;for(let t=C;t<4;t++)for(let t=C;t<3;t++){let e=m[t],i=m[t+1];x(e,i)>0&&(b=R[t],R[t]=R[t+1],R[t+1]=b,m[t]=i,m[t+1]=e)}let N=C,q=0,O=0;for(let t=C;t<4;t++){switch(t){case 0:O=2*p[R[t]];break;case 1:O=1.66666666*p[R[t]];break;case 2:O=1.33333333*p[R[t]];break;case 3:O=p[R[t]]}O>q&&(q=O,N=R[t])}return h[N]}function c(t,e){let i,r,s,n,a=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(i=e.x,r=e.y;e.nextPoint();i=s,r=n)s=e.x,n=e.y,r>t[1]!=n>t[1]&&((s-i)*(t[1]-r)-(n-r)*(t[0]-i)>0?a++:a--);return 0!==a}function f(t,e,i){if(i&&c(t,e))return{coord:t,distance:0};let r=1/0,s=0,n=0,a=[0,0],u=[0,0],l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=u){u=[e.x,e.y],(0,o.gR)(l,t,a,u);let i=g(t,l);i<r&&(r=i,s=l[0],n=l[1])}return{coord:[s,n],distance:Math.sqrt(r)}}function d(t,e,i,r){let s=[e,0],a=1/0,u=1/0,o=!1,h=!1,c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],_=[0,0],y=[[0,0],[0,0]],g=(0,n.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(y[0][0]=t.x,y[0][1]=t.y;t.nextPoint();y[0][0]=y[1][0],y[0][1]=y[1][1]){if(y[1][0]=t.x,y[1][1]=t.y,null===p(g,y)||(d[0]=c[0][0],d[1]=c[0][1],_[0]=c[1][0],_[1]=c[1][1],0===m(g,d,_))||!(0,l.Ql)(c[0],c[1],y[0],y[1],f))continue;let e=f[1];a>u?e<a&&(a=e,o=!0):e<u&&(u=e,h=!0)}return o&&h?s[1]=(a+u)/2:s[0]=s[1]=NaN,s}function p(t,e){if(e.length<2)return null;t||=(0,n.vt)();let[i,r]=e[0],[s,a]=e[1];return t[0]=Math.min(i,s),t[1]=Math.min(r,a),t[2]=Math.max(i,s),t[3]=Math.max(r,a),t}function m(t,e,i){let r=_(e,t),s=_(i,t),n=t[0],a=t[1],u=t[2],o=t[3];if(r&s)return 0;if(!(r|s))return 4;let l=!!r|(s?2:0);do{let l=i[0]-e[0],h=i[1]-e[1];if(l>h)3&r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(u-e[0])/l,e[0]=u),r=_(e,t)):3&s?(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(u-i[0])/l,i[0]=u),s=_(i,t)):r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(o-e[1])/h,e[1]=o),r=_(e,t)):(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(o-i[1])/h,i[1]=o),s=_(i,t));else if(12&r?(4&r?(e[0]+=l*(a-e[1])/h,e[1]=a):(e[0]+=l*(o-e[1])/h,e[1]=o),r=_(e,t)):12&s?(4&s?(i[0]+=l*(a-i[1])/h,i[1]=a):(i[0]+=l*(o-i[1])/h,i[1]=o),s=_(i,t)):r?(1&r?(e[1]+=h*(n-e[0])/l,e[0]=n):(e[1]+=h*(u-e[0])/l,e[0]=u),r=_(e,t)):(1&s?(i[1]+=h*(n-i[0])/l,i[0]=n):(i[1]+=h*(u-i[0])/l,i[0]=u),s=_(i,t)),r&s)return 0}while(r|s);return l}function _(t,e){return+(t[0]<e[0])|(t[0]>e[2])<<1|(t[1]<e[1])<<2|(t[1]>e[3])<<3}function y(t,e,i){return t+(e-t)*i}function g(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function x(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;let i=isNaN(t),r=isNaN(e);return i<r?-1:+(i>r)}class w{constructor(t,e,i,r){this.x=t,this.y=e,this.cellSize=i,this.distancefromCellCenter=(0,o.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function z(t){if(!t.nextPath()||!t.pathSize)return null;let e=(0,a.B$)(t),i=e[2]-e[0],s=e[3]-e[1];if(0===i||0===s)return[e[0]+i/2,e[1]+s/2];let n=Math.max(Math.min(i,s)/100,1),o=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(i,s),h=l/2,c=0,f=0;for(c=e[0];c<e[2];c+=l)for(f=e[1];f<e[3];f+=l)o.enqueue(new w(c+h,f+h,h,t));t.reset(),t.nextPath();let d=(0,u.IK)(t);if(null===d)return null;let p,m=new w(d[0],d[1],0,t);for(;o.size>0;)p=o.dequeue(),p.distancefromCellCenter>m.distancefromCellCenter&&(m=p),!(p.maxDistanceToPolygon-m.distancefromCellCenter<=n)&&(h=p.cellSize/2,o.enqueue(new w(p.x-h,p.y-h,h,t)),o.enqueue(new w(p.x+h,p.y-h,h,t)),o.enqueue(new w(p.x-h,p.y+h,h,t)),o.enqueue(new w(p.x+h,p.y+h,h,t)));return[m.x,m.y]}},62815(t,e,i){i.d(e,{N:()=>u,d:()=>o});var r=i(86211),s=i(73941),n=i(21325),a=i(52006);function u(t,e,i){let r=o(e,i);if(1!==r)switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){null!=t?.z&&(t.z*=e)}(t,r);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t){if(t.curvePaths)for(let i of t.curvePaths)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.paths)for(let i of t.paths)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t){if(t.curveRings)for(let i of t.curveRings)for(let t of i){let i=(0,a.yP)(t);i.length>2&&(i[2]*=e)}if(t.rings)for(let i of t.rings)for(let t of i)t.length>2&&(t[2]*=e)}}(t,r);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(let i of t.points)i.length>2&&(i[2]*=e)}(t,r);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,r);default:return}}function o(t,e){return null==t||null==e||(0,n.aI)(t,e)||(0,s.xP)(t)||(0,s.xP)(e)?1:(0,r.G9)(t)/(0,r.G9)(e)}},6557(t,e,i){i.r(e),i.d(e,{default:()=>j});var r=i(32198),s=i(21818),n=i(49186),a=i(71511),u=i(44208),o=i(53966),l=i(17676),h=i(563),c=i(39516),f=i(86211),d=i(16930),p=i(70328),m=i(19419),_=i(21325),y=i(53929),g=i(90708),x=i(29441),w=i(75752),z=i(99352),M=i(8384),I=i(58727),S=i(95031),P=i(24460),v=i(64714),F=i(17754),b=i(20437),R=i(95466),C=i(30524),N=i(50639),q=i(42760),O=i(76248),A=(i(98623),i(30661)),E=i(28923),T=i(44320),G=i(35258),k=i(16630);const Q=new A.Z,D="__OBJECTID",Z=8e3;class B{constructor(t,e){this._files=t,this._createFileStream=e,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(t){for(await this._fill(t);this._pending.size>0;){(0,l.Te)(t),await this._fill(t);let e=await W(this._pending);if(this._pending.delete(e.read),this._resolvedCount++,null!=e.chunk)return e.chunk}return null}async _fill(t){for(this._removeDone();this._pending.size<8;){let e=this._getOrCreateNextStream(t);if(null==e)return;this._pending.add(e.read(t))}}_getOrCreateNextStream(t){let e=this._resolvedCount>=8?8:2;if(this._fileIndex<this._files.length&&this._streams.length<e){let e=this._files[this._fileIndex++],i=new V(e.id,this._createFileStream(e,t));return this._streams.push(i),i}return this._getNextStream()}_getNextStream(){let t=this._streams.length;for(let e=0;e<t;e++){let i=(this._streamIndex+e)%t,r=this._streams[i];if(r.canRead)return this._streamIndex=(i+1)%t,r}return null}_removeDone(){let t=this._streamIndex;for(let e=this._streams.length-1;e>=0;e--)this._streams[e].done&&(this._streams.splice(e,1),e<t&&t--);this._streamIndex=this._streams.length>0?t%this._streams.length:0}}function W(t){return Promise.race(Array.from(t,async t=>({read:t,chunk:await t})))}class V{constructor(t,e){this._fileId=t,this._stream=e,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(t){this._readCount++;try{let e=await(await this._stream).next(t);return null==e?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:e}}finally{this._readCount--}}}class j{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new h.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new a.A}async load(t){let e=t.spatialReference?d.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=t.customParameters,this._loadParameters=t,await this._updateProvider((0,S.M)(t.provider,null,()=>this._customParameters));let i,r=await this._provider.getMetadata(),s=await(0,q.nc)(r,{fields:t.fields?.map(t=>b.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?(0,N.G)(t.geometryEncoding):null,geometryType:t.geometryType?(0,q.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e});if(this._hasZ=!!r?.hasZ,this._hasM=!!r?.hasM,!s.fields)throw new n.A("parquet:unsupported","Fields must be defined");if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(o.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=d.A.WGS84),i={geometry:s.geometryEncoding?{geometryType:(0,q.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(t.customParameters),this._displayOptimization=s.displayOptimization,await this._provider.updateGeometryInfo(i),this._capabilities=rt(await this._getFileStatistics(),this._hasZ,this._hasM);let a=await this._provider.getFiles();if(!a.length)return{layerDefinition:{},capabilities:rt(null,this._hasZ,this._hasM)};let u=await a[0].file;s.file=u;let{fields:l}=s;if(null==l)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new b.A({name:D,type:"oid",alias:D}));for(let t of l){let e=u.getColumnId(t.name);null!=e&&(this._indexMap[t.name]=e)}let h=R.A.fromLayerJSON({fields:l.map(t=>t.toJSON()),dateFieldsTimeReference:{timeZoneIANA:"UTC"}});this._fieldsIndex=h;let c=(0,q.sA)(s.geometryType??"point");return this._metadata=G.i.createFeature({fieldsIndex:h.toJSON(),geometryType:c,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:D},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:"UTC"}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:c,featureIdInfo:{type:"object-id",fieldName:D},hasM:this._hasM,hasZ:this._hasZ,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(s),{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(t=>t.toJSON()),drawingInfo:(0,v.F0)(c),extent:this._fullExtent??void 0,geometryType:c,hasZ:this._hasZ,hasM:this._hasM,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(let{handle:t}of this._streams.values())t.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(t){this.destroy(),await this.load(t)}set remoteClient(t){this._source=t.createInvokeProxy("")}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async updateFileProvider(t){this._loadParameters={...this._loadParameters,provider:t};let e=(0,S.M)(t,this._provider.getGeometryInfo(),()=>this._customParameters);await this._updateProvider(e)}async getDiagnosticsSnapshot(){let t=await this._provider.getFiles();return{files:await Promise.all(t.map(t=>t.getDiagnosticsSnapshot()))}}async getColumnIndex(t){return(await this._getFileInfoById(t.fileId)).getColumnIndex(t.rowGroupIndex,t.columnIndex)}async getOffsetIndex(t){return(await this._getFileInfoById(t.fileId)).getOffsetIndex(t.rowGroupIndex,t.columnIndex)}async queryFeatures(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(i)||(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,Z):Z,i.resultOffset=i.resultOffset??0),i.outStatistics?this._queryStatistics(i,e):(i.returnDistinctValues&&(i.returnGeometry=void 0),(await this._enqueueQuery(i,e)).createQueryResponse())}async queryFeatureCount(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)||i.returnDistinctValues||i.groupByFieldsForStatistics?.length||i.outStatistics?.length?(i.returnDistinctValues||(i.outFields=void 0),i.returnGeometry=void 0,(await this._enqueueQuery(i,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(i),H(i)?(i.resultRecordCount=i.resultRecordCount?Math.min(i.resultRecordCount,8e3):8e3,i.resultOffset=i.resultOffset??0,i.returnGeometry=void 0,i.outFields=void 0,i.returnDistinctValues=void 0,(await this._enqueueQuery(i,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryAttributeBins(t,e={}){throw new n.A("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(t,e){let i=await(0,I.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(i),this._fullExtent&&!H(i))return{count:await this._getFeatureCount(),extent:this._fullExtent};let r=(0,s.z)(this._metadata.spatialReference);i.returnGeometry=!0,i.outFields=void 0;let n=(0,p.hZ)((0,p.vt)(),p.qv),a=(0,p.vt)(),u=await this._enqueueQuery(i,e),o=0;for(let t of u.items)t.getBounds(a)&&((0,p.RF)(n,a),o+=1);return{count:o,extent:(0,w.Wc)(n,r,i.outSR?(0,s.z)(i.outSR):r.toJSON(),r,!1)}}async queryStream(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=await this._getCandidateFiles(t),r=new B(i,async(e,i)=>{let r=await e.file,s=await this._createParquetDisplayQuery(r,e.id,t);return r.executeQuery(s,Z,i)}),s=this._streamIdCounter++,n=(0,l.NY)(e.signal,t=>{let e=this._streams.get(s);null!=e&&(e.handle.remove(),this._streams.delete(s))});return this._streams.set(s,{stream:r,handle:n}),s}async getStreamNext(t,e){if(!e.signal)throw Error("InternalError: AbortSignal must be passed");let i=this._streams.get(t);if(!i)return{result:null};let r=await i.stream.next(e.signal);if(null==r)return i.handle.remove(),this._streams.delete(t),{result:null};let s=r.chunk.serialize().buffer,n={fileId:r.fileId,buffer:s};return s instanceof ArrayBuffer?{result:n,transferList:[s]}:{result:n}}async getStreamNextFeatures(t,e){let{result:i}=await this.getStreamNext(t,e);if(null==i)return null;let r=(await(0,O.N)()).ParquetChunk.deserialize(new Uint8Array(i.buffer)),s=new k.s(this._metadata,this._indexMap,r,i.fileId),n=[];for(;s.next();){let t=(0,g.zv)(s.readGeometryWorldSpace(),s.geometryType,s.hasZ,s.hasM),e=s.readAttributes();n.push({attributes:e,geometry:t})}return{features:n}}async createPatch(t,e,i,r,s){if(!s.signal)throw Error("InternalError: AbortSignal must be passed");return(await(await(await this._getFileInfoById(t)).file).createChunkPatch(e,i,r,s.signal)).serialize().buffer}async _updateProvider(t){let e=this._provider;this._handles.removeAll(),this._provider=t,this._handles.add([t.events.on("rangeRead",t=>{this._source.onRangeRead(t)}),t.events.on("sourceChanged",async()=>{await this.reload(this._loadParameters),await this._source.onSourceChange()})]),await(e?.destroy())}async _getCandidateFiles(t){let e=await this._provider.getFiles(),i=await this._getSpatialFilePruning(t);if(null==i)return e;let r=e.filter(t=>this._mayIncludeFileForSpatialPruning(t,i));return"xz"===i.type?function(t,e){return t.slice().sort((t,i)=>{let r=it(t,e),s=it(i,e);return r===s?0:r<s?-1:1})}(r,i):r}async _queryStatistics(t,e){let i=await(0,I.T2)({...t},null,this._queryEngineParams.spatialReference);if(i.returnGeometry=void 0,function(t,e){return!!t.outStatistics?.length&&!H(t)&&!t.groupByFieldsForStatistics?.length&&!t.orderByFields?.length&&!t.returnDistinctValues&&!t.returnAggIds&&t.outStatistics.every(t=>function(t,e){switch(t.statisticType){case"count":return"1"===t.onStatisticField||null!=e.get(t.onStatisticField);case"min":case"max":{let i=e.get(t.onStatisticField);return null!=i&&(0,C.WA)(i)}default:return!1}}(t,e))}(i,this._fieldsIndex)){let t=await this._getStatisticsFromFiles(i);if(t)return t}return(await this._enqueueQuery(i,e)).createQueryResponse()}async _getStatisticsFromFiles(t){let e=await this._provider.getFiles(),i={},r=[];for(let s of t.outStatistics??[]){let t=X(s,e);if(!t.available)return null;i[s.outStatisticFieldName]=t.value,r.push(Y(s,this._fieldsIndex))}return{fields:r,features:[{attributes:i}]}}async _getSpatialFilePruning(t){if("tile"!==t.type&&("arcade"!==t.type||null==t.extent))return null;let e=this._displayOptimization?.index;if(null==e)return null;let i=t.outSpatialReference.wkid;if(null==e.wkid||null==i)return null;let r=e.wkid,s=await(0,O.N)();switch(e.type){case"xz":return{type:"xz",fieldName:(0,y.FG)(e.code),intersects:(n,a)=>s.queryIntersectsXZStatistics(e.fullExtent,t.extent,i,r,e.maxLevel,n,a)};case"z":return{type:"xy",xFieldName:(0,y.FG)(e.xColumn),yFieldName:(0,y.FG)(e.yColumn),intersects:(e,n,a,u)=>s.queryIntersectsXYStatistics(t.extent,i,r,e,n,a,u)}}}_mayIncludeFileForSpatialPruning(t,e){switch(e.type){case"xz":{let i=et(t,e);return"null-only"!==i?.type&&("bounds"!==i?.type||e.intersects(i.minValue,i.maxValue))}case"xy":{let i=t.statistics.statistics.get(e.xFieldName),r=t.statistics.statistics.get(e.yFieldName);return"null-only"!==i?.type&&"null-only"!==r?.type&&("bounds"!==i?.type||"bounds"!==r?.type||e.intersects(i.minValue,i.maxValue,r.minValue,r.maxValue))}}}async _tryDeriveParquetFullExtent(t){if(!t.spatialReference)return null;if(null==this._fullExtent&&"location"===t.geometryEncoding?.type){let e=await this._provider.getFiles(),{xField:i,yField:s}=t.geometryEncoding,n=(0,p.hZ)((0,p.vt)(),p.qv),a=!1;for(let t of e){let e=await t.file;for(let t of e.rowGroups()){let e={stack:[],error:void 0,hasError:!1};try{let u=(0,r.mS)(e,t.columnDescriptorForAttribute(i),!1),o=(0,r.mS)(e,t.columnDescriptorForAttribute(s),!1),l=(0,P.Hk)(u),h=(0,P.Hk)(o);if("bounds"===l?.type&&"bounds"===h?.type){let t=[l.minValue,h.minValue,l.maxValue,h.maxValue];(0,p.DC)(n,t),a=!0}t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}}return a?{xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:t.spatialReference?.toJSON()}:null}return null}async _getFileInfoById(t){let e=await this._provider.getFiles();for(let i of e)if(i.id===t)return i;throw Error(`InternalError: File ${t} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(t){return(await this._getFileInfoById(t)).file}async _createParquetQuery(t,e,i,r,s){let n=(await(0,O.N)()).Query.new();null!=i&&n.setPreFilterStart(i),null!=r&&n.setPreFilterCount(r),null!=s&&n.setPostFilterCount(s);let a=await this._getRequiredFields(t);n.setOutFields(a),(t.geometry||t.returnGeometry)&&n.setReturnGeometry(!0),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM);let u=this._tryGetGeneralizedGeometryResolution(t);null!=u&&n.setSourceResolution(u);let o=t.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=o.wkid;if(t.geometry&&((0,_.K8)(o)||(0,_.oT)(o))){let e=(0,m.C)((0,m.vt)(),m.qv);for(let i of(0,w.qo)(t.geometry))(0,m.DC)(e,i);n.setOutSpatialReference(l),n.setExtent({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]})}if(t.where){let{id:i,file:r}=e;await this._setWhereClause(n,await r,i,t.where)}return n}async _createParquetDisplayQuery(t,e,i){let r=(await(0,O.N)()).Query.new();if("tile"===i.type){r.setExtent(i.extent),r.setQuantizationTransform(i.transform);let t=this._sourceResolution(i.resolution,i.outSpatialReference);null!=t&&r.setSourceResolution(t)}else"arcade"===i.type&&null!=i.extent&&r.setExtent(i.extent);return r.setOutFields(i.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(i.outSpatialReference.wkid),r.setReturnGeometry(i.returnGeometry),r.setReturnZ(i.returnZ),r.setReturnM(i.returnM),i.where&&await this._setWhereClause(r,t,e,i.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(t=>t.statistics.rowCount).reduce((t,e)=>t+e,0)}async _getByteLength(){return(await this._provider.getFiles()).map(t=>t.statistics.byteSize).reduce((t,e)=>t+e,0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,i,r){let s=this._indexMap,a=this._fieldsIndex,u={getAttribute(t,r){let n=s[r];if(null==n){if("__OBJECTID"===a.get(r)?.name){let e=t.row+t.rowGroupStart;return(0,F.xb)(i,e)}return null}let u=a.get(r);return(0,y.LC)(e,t.rowGroup,t.row,n,u.type)}},o=await(0,c.GP)(r,this._fieldsIndex);if(!o.isStandardized)throw new n.A("sql-parse-error","expression is not standardized");let l=o.fieldNames.map(t=>a.get(t)).filter(t=>t&&null!=this._indexMap[t?.name]);t.setWhere(r),t.setWhereEvaluator((t,e,i)=>o.testFeatureCompiled({rowGroup:t,row:e,rowGroupStart:i},u,null)),t.setWhereFields(l.map(t=>t.name))}async*_streamFeatures(t,e,i,r,s){let n=await this._provider.getFiles(),a=0;for(let u of n){let n=a,o=a+u.statistics.rowCount;if(a+=u.statistics.rowCount,null!=e&&e>=o)continue;let l=null==e?null:Math.max(e-n,0),h=i;if(null!=i){let t=e??0,r=t+i;h=Math.max(Math.min(r,o)-Math.max(t,n),0)}if(0===h)continue;let c=await this._createParquetQuery(t,u,l,h,r),f=await(await u.file).executeQuery(c,Z),d=async()=>{let t=await f.next(s);if(!t)return null;let e=new k.s(this._metadata,this._indexMap,t,u.id);return tt([new E.j(e,null,0,!1)],this._queryEngineParams)},p=await d();for(;null!=p;)yield p,p=await d()}}async _queryFeaturesWithQueryEnginePagination(t,e){let i=[],r=this._streamFeatures(t,null,null,null,e),s=await r.next();for(;!s.done;){let n=await s.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of n)i.push(t);s=await r.next()}return i}async _queryFeaturesWithUpfrontPagination(t,e){let i,r,s,n=t.resultOffset??0,a=t.resultRecordCount??Z;!function(t){for(let e in t){let i=e;if(J(i)&&null!==t[i])return!0}return!1}(t)?(n&&=(i=n,0),r=t.resultRecordCount):function(t){for(let e in t){let i=e;if(U(i)&&null!==t[i])return!0}return!1}(t)||(s=n+a);let u=[],o=this._streamFeatures(t,i,r,s,e),l=await o.next();for(;!l.done&&a>0;){let i=await l.value.executeQueryForOpaqueFeatures({...t,where:void 0},e);for(let t of i)if(n>0)n--;else if(u.push(t),--a<=0)return u;l=await o.next()}return u}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){if(t.objectIds?.length){let i=new Map;for(let e of t.objectIds){let t=(0,F.wY)(e),r=(0,F.gE)(e),s=i.get(t);s||(s=[],i.set(t,s)),s.push(r)}let r=[];for(let[s,n]of i.entries()){let i=await this._executeFileIdQuery(t,s,n,e);for(let t of i)r.push(t)}return new M.G(r,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===t.where&&(t.where=null),t.resultOffset??=0,t.resultRecordCount??=await this._getFeatureCount(),t.resultRecordCount>2e7&&(!this._displayOptimization||!t.geometry))throw new n.A("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");let i=!!t.orderByFields?.length||!!t.outStatistics?.length||!!t.returnDistinctValues,r=i?await this._queryFeaturesWithQueryEnginePagination(t,e):await this._queryFeaturesWithUpfrontPagination(t,e);return i||(t.resultOffset=0),new M.G(r,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:Q,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,i,r){let s=await this._getRequiredFields(t),n=(await(0,O.N)()).Query.new();n.setOutFields(s),n.setReturnGeometry(!!t.returnGeometry),n.setReturnZ(!!t.returnZ),n.setReturnM(!!t.returnM),n.setIds(new Uint32Array(i));let a=await(await this._getFile(e)).executeQuery(n,Z,r),u=await a.next(r),o=0,l=[];for(;null!=u;){let t=new k.s(this._metadata,this._indexMap,u,e),i=new E.j(t,null,o++,!1);l.push(i),u=await a.next(r)}return tt(l,this._queryEngineParams).executeQueryForOpaqueFeatures(t,r)}async _getRequiredFields(t){let e=new Set;if(t.outStatistics)for(let i of(0,x.g9)(this._fieldsIndex,t.outStatistics,t.groupByFieldsForStatistics))e.add(i);else if(t.outFields)for(let i of t.outFields)e.add(i);return(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t])}_tryGetGeneralizedGeometryResolution(t){if(!this._displayOptimization)return null;let e=t.outSR??this._queryEngineParams.spatialReference;if(!(0,_.K8)(e)&&!(0,_.oT)(e))return null;let i=t.quantizationParameters?.tolerance??t.maxAllowableOffset;return i?this._sourceResolution(i,e):null}_sourceResolution(t,e){let i=this._queryEngineParams.spatialReference,r=(0,f.GA)(e)/(0,f.GA)(i)*t;return!Number.isFinite(r)||r<=0?null:r}}function L(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function J(t){switch(t){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function U(t){switch(t){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function H(t){for(let e in t){let i=e;if(L(i)&&null!==t[i])return!0}return!1}function Y(t,e){let i="exceedslimit"===t.statisticType?null:e.get(t.onStatisticField),r="min"!==t.statisticType&&"max"!==t.statisticType||"esriFieldTypeDate"!==i?.type?"esriFieldTypeDouble":i.type;return{name:t.outStatisticFieldName,alias:t.outStatisticFieldName,type:r}}function X(t,e){switch(t.statisticType){case"count":return function(t,e){if("count"!==t.statisticType)return{available:!1,value:null};if("1"===t.onStatisticField)return{available:!0,value:e.reduce((t,e)=>t+e.statistics.rowCount,0)};let i=0;for(let r of e){let e=r.statistics.statistics.get(t.onStatisticField);if(null==e||null==e.nullCount)return{available:!1,value:null};i+=r.statistics.rowCount-e.nullCount}return{available:!0,value:i}}(t,e);case"min":return $(t,e,Math.min);case"max":return $(t,e,Math.max);default:return{available:!1,value:null}}}function $(t,e,i){if("min"!==t.statisticType&&"max"!==t.statisticType)return{available:!1,value:null};let r=null,s="min"===t.statisticType?"minValue":"maxValue";for(let n of e){let e=n.statistics.statistics.get(t.onStatisticField);if(null==e)return{available:!1,value:null};switch(e.type){case"null-only":continue;case"unknown":return{available:!1,value:null};case"bounds":{let t=K(e[s]);if(null==t)return{available:!1,value:null};r=null==r?t:i(r,t);break}}}return{available:!0,value:r}}function K(t){return"number"==typeof t&&Number.isFinite(t)?t:null}function tt(t,e){let i=new T.I;for(let e of t)i.insert(e);return new w.do({...e,featureStore:i})}function et(t,e){return t.statistics.statistics.get(e.fieldName)??null}function it(t,e){let i=et(t,e);return"bounds"===i?.type?i.maxValue-i.minValue:1/0}function rt(t,e,i){let r=t?.featureCount,s=!1;return null!=r&&r<(0,u.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:i,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...z.F,maxRecordCount:Z,supportsOrderBy:s,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);