@arcgis/core 4.30.0-next.20240321 → 4.30.0-next.20240322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/parser.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/arcade/validation/languageKeywords.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4e4ad7ac43a72a2f88a1.js → 0005267c754235ae6784.js} +1 -1
- package/assets/esri/core/workers/chunks/07fd6804c7eaa8d2ac3f.js +1 -0
- package/assets/esri/core/workers/chunks/{ff4151d794ec73064fac.js → 10b4fbdc0f8be85737f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{8fc69ac4cce6d4dd5513.js → 18a9b472007d4f2b7bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{f484d2a3deb3c60d7038.js → 1ad1cdde4db5ab793623.js} +1 -1
- package/assets/esri/core/workers/chunks/36dfc55dc536b1831918.js +1 -0
- package/assets/esri/core/workers/chunks/{cee492b97e841a6d4678.js → 5b41ec1bd24314f6f153.js} +1 -1
- package/assets/esri/core/workers/chunks/{d518a0adc3d88700235c.js → 65680926c761bf53fd14.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c78ccff1c7f8ae90b06.js → 671892e733d8976e48bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{4be6d5660ec1c8ac7606.js → 70188e0aa47da1aa1a7f.js} +1 -1
- package/assets/esri/core/workers/chunks/7c212395100080cf122e.js +1 -0
- package/assets/esri/core/workers/chunks/8c07e1000522c3251ac0.js +1 -0
- package/assets/esri/core/workers/chunks/9d240e70a24520b2a810.js +1 -0
- package/assets/esri/core/workers/chunks/{ee1345b212cde1ff4755.js → a7ac2c5e701f44a67aa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a747af5273646ab848c.js → c38c6cae22627fbf6f3b.js} +1 -1
- package/assets/esri/core/workers/chunks/c4d2ff515fc70b07cb5f.js +1 -0
- package/assets/esri/core/workers/chunks/{96fd6fd8cbb3a2ee088e.js → caa03837b9c173ea493f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd5a078b7919f749ba3e.js → d90ee005599c44bfb6ad.js} +1 -1
- package/assets/esri/core/workers/chunks/dc3a6ab23a13ec5deed7.js +1 -0
- package/assets/esri/core/workers/chunks/{eb3e82ed1653ecf348da.js → e1a2f7282d889e251809.js} +1 -1
- package/assets/esri/core/workers/chunks/{52274afa07468bc555aa.js → ec52127b5ada8410acf3.js} +13 -13
- package/assets/esri/core/workers/chunks/f8693321bbd8a93666c7.js +1 -0
- package/assets/esri/core/workers/chunks/{fe7dfb8546d0fc40843c.js → fec0d24e8841ba1994f0.js} +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/index.js +5 -0
- package/chunks/languageUtils.js +1 -1
- package/core/number.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/undoredo/support/DataEditingContext.js +5 -0
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +5 -0
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/arcade/lib/arcade-parser.js +0 -5
- package/arcade/lib/assert.js +0 -5
- package/arcade/lib/character.js +0 -5
- package/arcade/lib/comment-handler.js +0 -5
- package/arcade/lib/error-handler.js +0 -5
- package/arcade/lib/parser.js +0 -5
- package/arcade/lib/scanner.js +0 -5
- package/arcade/lib/tokenizer.js +0 -5
- package/arcade/lib/types.js +0 -5
- package/assets/esri/core/workers/chunks/12b95408753cea053a40.js +0 -1
- package/assets/esri/core/workers/chunks/16397420fb6067b47b25.js +0 -1
- package/assets/esri/core/workers/chunks/1fdbeb110fae52b96bb3.js +0 -1
- package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +0 -1
- package/assets/esri/core/workers/chunks/7b07f3bc68a54974cd03.js +0 -1
- package/assets/esri/core/workers/chunks/ad95daa3f4ad7030bf24.js +0 -1
- package/assets/esri/core/workers/chunks/c2573c1cb7c714435acc.js +0 -1
- package/assets/esri/core/workers/chunks/df38774f63984be0a478.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[951],{70668:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),d=r(73133);let p=class extends((0,i.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,l.e)(d.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,s._)([(0,u.$)("esri.TimeInterval")],p);const c=p},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},39516:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return s.create(e,t)}function i(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>s,m:()=>i})},3330:(e,t,r)=>{r.d(t,{GB:()=>i,Qo:()=>o,Y4:()=>n});var s=r(96285);class i{}function n(e){return e instanceof s.bo?e===i.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?i.instance:e}i.instance=new s.oh("Etc/UTC")},10382:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(36563),i=r(74887),n=r(9775),o=r(72457),a=r(52268),l=r(61322);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.Te)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.$X)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,r)=>{r.d(t,{h:()=>n,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>D});var s=r(49186),i=r(44208),n=r(74887),o=r(10382),a=r(72457),l=r(61322),u=r(53966),d=r(97768),p=r(78888),c=r(84952);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,c.sC)(e.url)?.after?s:"array-buffer";const i=await(0,p.A)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var m=r(8341),f=r(2741),y=r(92602),g=(r(47566),r(70333));const w={};var v=r(26390);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new _,this._workerPostMessage({type:m.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.VI)(e);if(t&&t.type===m.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:m.Go.OPENED,jobId:r,data:i})}}}var x=r(73444),S=r(18357);const F=()=>u.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=m.Go;let I,A;const E="Failed to create Worker. Fallback to execute module in main thread";async function T(e){return new Promise((t=>{function r(i){const n=(0,m.VI)(i);n&&n.type===M&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),F().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let O=0;const{ABORT:R,INVOKE:k,OPEN:P,OPENED:N,RESPONSE:j}=m.Go;class Z{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return T(new b);if(!I&&!A)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=y.A.default){const t={...y.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.A));e.assetsPath=(0,c.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,x.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.s2)(e.workers.workerPath):e.workers.workerPath=(0,c.s2)((0,f.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,x.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:S.$,fullVersion:g.ol,revision:S.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);I=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){A=e||{}}let e;if(I)try{e=new Worker(I,{name:"esri-worker-"+O++})}catch(t){F().warn(E,A),e=new b}else F().warn(E,A),e=new b;return T(e)}();return new Z(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,m.Jc)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:R,jobId:s})}))};this._outJobs.set(s,o),this._post({type:P,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.VI)(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case R:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:r,error:(0,m.mF)(e)})}(0,n.$X)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:j,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.zf)(e)||this._post({type:j,jobId:r,error:(0,m.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.xt)(n.abortHandle),r?n.reject(s.A.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,m.u1)(this.worker,e,t,r)}}const C=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")):0;let J=(0,i.A)("esri-mobile")?Math.min(C,3):C;J||(J=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let L=0;const U=[];async function q(e,t){const r=new o.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function D(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.Te)(t.signal);const s=t.client||r;return q([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(z)return z;$=new AbortController;const e=[];for(let t=0;t<J;t++){const r=Z.create(t).then((e=>(U[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,n.Te)(t.signal),"dedicated"===r){const r=L++%J;return q([await U[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,J);if(r<J){const s=new Array(r);for(let i=0;i<r;++i){const r=L++%J;s[i]=U[r].open(e,t)}return q(s,t)}}return q(U.map((r=>r.open(e,t))),t)}let $,z=null},70328:(e,t,r)=>{r.d(t,{BI:()=>y,Ej:()=>d,Hq:()=>u,Ie:()=>m,Jt:()=>f,Ne:()=>p,RF:()=>a,aI:()=>w,fA:()=>n,hZ:()=>h,iT:()=>l,is:()=>g,qv:()=>v,vI:()=>c,v_:()=>_,vt:()=>i,w1:()=>o});var s=r(5443);function i(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=s,a[4]=n,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,s=t.length/3){let i=e[0],n=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)i=Math.min(i,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=n,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?h(e,v):i(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];i()},16350:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var s=r(90237),i=(r(59456),r(13874)),n=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),o=r(92071),a=r(93637),l=r(84952),u=r(10107),d=r(56507),p=(r(87811),r(44208)),c=r(40608),h=r(43937),m=r(50498),f=r(4146),y=r(49186),g=r(92474),w=r(53966),v=r(74887),_=r(29953),b=r(64714),x=r(34322),S=r(22671),F=r(56400),M=r(5443);let I=class extends g.A{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,b.f)(!1,!1),this.type="wfs",this.refresh=(0,v.sg)((async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return S.A.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:M.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:s,namespaceUri:i,fields:n,geometryType:o,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:d}=this.layer,p="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new y.A("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,x.Fu)(t,{customParameters:r,...e}));const c=["fields","geometryType","name","namespaceUri","swapXY"].some((e=>null==this.layer[e])),h=c?await(0,x.O8)(this.wfsCapabilities,s,i,{spatialReference:p,customParameters:r,signal:e?.signal}):{...(0,x.YW)(n??[]),geometryType:o,name:s,namespaceUri:i,spatialReference:p,swapXY:d},f=(0,x.mG)(this.wfsCapabilities.readFeatureTypes(),h.name,h.namespaceUri),g=m.g.toJSON(h.geometryType),{operations:w}=this.wfsCapabilities,v=w.GetFeature.url,_=w.GetFeature.outputFormat;return{customParameters:r,featureType:f,fields:h.fields?.map((e=>e.toJSON()))??[],geometryField:h.geometryField,geometryType:g,getFeatureUrl:v,getFeatureOutputFormat:_,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:h.objectIdField,spatialReference:h.spatialReference?.toJSON(),swapXY:!!h.swapXY}}async _startWorker(e){const[t,r]=await(0,v.Lx)([this._createLoadOptions(e),(0,_.ho)("WFSSourceWorker",{...e,strategy:(0,p.A)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),s=t.error||r.error||null,i=r.value||null;if(s)throw i&&i.close(),s;const n=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const o=await this._workerHandler.load(n,e);for(const e of o.warnings)w.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:F.n$},extent:o.extent,fields:n.fields,geometryType:n.geometryType,objectIdField:n.objectIdField,geometryField:n.geometryField,drawingInfo:(0,b.F0)(n.geometryType),name:n.featureType.title,wfsInfo:{name:n.featureType.name,featureUrl:n.getFeatureUrl,maxFeatures:n.maxRecordCount,swapXY:n.swapXY,supportedSpatialReferences:n.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:n.featureType.namespaceUri}}}};(0,s._)([(0,u.MZ)()],I.prototype,"capabilities",void 0),(0,s._)([(0,u.MZ)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"sourceJSON",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"type",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"wfsCapabilities",void 0),I=(0,s._)([(0,c.$)("esri.layers.graphics.sources.WFSSource")],I);var A,E=r(63074),T=r(69208),O=r(87718),R=r(81149),k=r(16131),P=r(32756),N=r(8303),j=r(54310),Z=r(25036),C=r(82935),J=r(55785),L=r(20437),U=r(17036),q=r(30524),D=r(81457),$=r(39383),z=r(61956),H=r(30291),B=r(16930);const G=(0,U.p)();let W=A=class extends((0,P.f)((0,T.d)((0,R.J)((0,O.F)((0,E.d)((0,C.e)((0,j.J)((0,Z.j)((0,k.q)((0,N.A)((0,o.P)(f.A)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:d,wfsCapabilities:p}=e;return new A({customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:d,wfsCapabilities:p})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new I({layer:this}),this.spatialReference=B.A.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,q.yp)(this.renderer,this.fieldsIndex),(0,q.sv)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const s=e.filter((e=>e.name!==x.i5));this.geometryField&&s.unshift(new L.A({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.sM)(r,s.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){const e=new z.A({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(z.A.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(z.A.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(z.A.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(z.A.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,u.MZ)({readOnly:!0})],W.prototype,"capabilities",null),(0,s._)([(0,u.MZ)({type:String})],W.prototype,"copyright",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],W.prototype,"createQueryVersion",null),(0,s._)([(0,u.MZ)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],W.prototype,"customParameters",void 0),(0,s._)([(0,u.MZ)((0,F.P6)("dateFieldsTimeReference"))],W.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],W.prototype,"definitionExpression",void 0),(0,s._)([(0,u.MZ)({type:String})],W.prototype,"displayField",void 0),(0,s._)([(0,u.MZ)(J.Yj)],W.prototype,"elevationInfo",void 0),(0,s._)([(0,u.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"featureUrl",void 0),(0,s._)([(0,u.MZ)({type:[L.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],W.prototype,"fields",void 0),(0,s._)([(0,h.K)("fields")],W.prototype,"writeFields",null),(0,s._)([(0,u.MZ)(G.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.MZ)({type:M.A,json:{name:"extent"}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,u.MZ)()],W.prototype,"geometryField",void 0),(0,s._)([(0,u.MZ)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.g.read},write:{target:"layerDefinition.geometryType",writer:m.g.write,ignoreOrigin:!0},origins:{service:{read:m.g.read}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,u.MZ)({type:String})],W.prototype,"id",void 0),(0,s._)([(0,u.MZ)(J.kF)],W.prototype,"labelsVisible",void 0),(0,s._)([(0,u.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$.w},write:!0}})],W.prototype,"labelingInfo",void 0),(0,s._)([(0,u.MZ)(J.fV)],W.prototype,"legendEnabled",void 0),(0,s._)([(0,u.MZ)({type:["show","hide"]})],W.prototype,"listMode",void 0),(0,s._)([(0,u.MZ)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,u.MZ)({type:["WFS"]})],W.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.MZ)({type:d.jz,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"maxRecordCount",void 0),(0,s._)([(0,u.MZ)({type:d.jz})],W.prototype,"maxPageCount",void 0),(0,s._)([(0,u.MZ)({type:d.jz})],W.prototype,"maxTotalRecordCount",void 0),(0,s._)([(0,u.MZ)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],W.prototype,"mode",void 0),(0,s._)([(0,u.MZ)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"name",void 0),(0,s._)([(0,u.MZ)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"namespaceUri",void 0),(0,s._)([(0,u.MZ)(J.Ih)],W.prototype,"opacity",void 0),(0,s._)([(0,u.MZ)(G.outFields)],W.prototype,"outFields",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],W.prototype,"parsedUrl",null),(0,s._)([(0,u.MZ)(J.M6)],W.prototype,"popupEnabled",void 0),(0,s._)([(0,u.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,u.MZ)({types:n.H,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],W.prototype,"renderer",null),(0,s._)([(0,u.MZ)(J.PY)],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],W.prototype,"source",void 0),(0,s._)([(0,u.MZ)({type:B.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],W.prototype,"spatialReference",void 0),(0,s._)([(0,u.MZ)({readOnly:!0,type:[d.jz],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"spatialReferences",void 0),(0,s._)([(0,u.MZ)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"swapXY",void 0),(0,s._)([(0,u.MZ)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],W.prototype,"title",void 0),(0,s._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],W.prototype,"type",void 0),(0,s._)([(0,u.MZ)(J.OZ)],W.prototype,"url",void 0),(0,s._)([(0,u.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"version",void 0),(0,s._)([(0,u.MZ)()],W.prototype,"wfsCapabilities",null),W=A=(0,s._)([(0,c.$)("esri.layers.WFSLayer")],W);const V=W},43334:(e,t,r)=>{r.d(t,{N3:()=>i,Om:()=>s});class s{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},92722:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,i,n]=e,o=i-t,a=n-r;return new s([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e,this.hasIndeterminateRingOrder)):new s(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},99352:(e,t,r)=>{r.d(t,{F:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>d,e2:()=>p,f:()=>c});var s=r(44208),i=r(4718),n=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},87718:(e,t,r)=>{r.d(t,{F:()=>A});var s,i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(49186),l=r(25482),u=r(93637),d=r(76369),p=r(59456),c=r(60945),h=r(66552),m=r(4718),f=r(61956);const y=new h.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=s=class extends l.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new f.A({geometry:(0,m.o8)(r),objectIds:(0,m.o8)(n),spatialRelationship:s,timeExtent:(0,m.o8)(i),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new s({geometry:(0,m.o8)(t),objectIds:(0,m.o8)(n),spatialRelationship:r,timeExtent:(0,m.o8)(i),where:e,units:o,distance:a})}};(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,i._)([(0,n.MZ)({types:p.yR,json:{write:!0}})],w.prototype,"geometry",void 0),(0,i._)([(0,n.MZ)({type:y.apiValues,json:{name:"spatialRel",read:{reader:y.read},write:{allowNull:!1,writer:y.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,i._)([(0,n.MZ)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,i._)([(0,n.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,i._)([(0,n.MZ)({type:c.A,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=s=(0,i._)([(0,o.$)("esri.layers.support.FeatureFilter")],w);const v=w;var _;const b={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},x={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},S={name:"showExcludedLabels",default:!0};let F=_=class extends l.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.sM)(r,i,t):(0,u.sM)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,i._)([(0,n.MZ)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],F.prototype,"includedEffect",void 0),(0,i._)([(0,n.MZ)({json:{write:!0,origins:{"web-map":x,"portal-item":x}}})],F.prototype,"excludedEffect",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,i._)([(0,o.$)("esri.layers.support.FeatureEffect")],F);const M=F,I={write:{allowNull:!0}},A=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.MZ)({type:M,json:{origins:{"web-map":I,"portal-item":I}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>d});var s=r(90237),i=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new a.A;return i.read(s,r),[i]}function u(e,t,r,s){const n=e.find((e=>!!e.field));n&&(0,i.sM)(r,[n.toJSON()],t)}const d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.MZ)({type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:u}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{e:()=>c});var s=r(90237),i=r(60945),n=r(70668),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(30524),d=r(96184),p=r(73133);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return s&&i?new n.A({value:s,unit:i}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.MZ)({type:i.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.MZ)({type:n.A})],t.prototype,"timeOffset",void 0),(0,s._)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.MZ)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},95466:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(49186),i=r(25482),n=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),d=r(96285);const p=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],y(e))}static fromLayerJSON(e){return new c(e.fields??[],y(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const i=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").error(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?d.mQ.utcInstance:(0,o.tE)(p,t,(()=>d.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,u.ZS)(i.dateFieldsTimeReference):a??u.n$:null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,u.ZS)(s.timeReference):a:null,p=new Map([[h(i?.creationDateField??""),l],[h(i?.editDateField??""),l],[h(n),d],[h(o),d]]);for(const{name:s,type:i}of e.fields)if(f.has(i))t.set(s,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,u.L5);else{const e=p.get(h(s??""))??a;t.set(s,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let d=s=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"order",void 0),d=s=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],d);const p=d},96184:(e,t,r)=>{r.d(t,{A:()=>f});var s=r(90237),i=r(60945),n=r(70668),o=r(69540),a=r(25482),l=r(10107),u=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),p=r(43937),c=r(56400);function h(e,t){return n.A.fromJSON({value:e,unit:t})}let m=class extends((0,o.O)(a.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.A({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,s._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,s._)([(0,l.MZ)({type:i.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,s._)([(0,p.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,s._)([(0,l.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,s._)([(0,u.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,s._)([(0,p.K)("interval")],m.prototype,"writeInterval",null),(0,s._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,s._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),m=(0,s._)([(0,d.$)("esri.layers.support.TimeInfo")],m);const f=m},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>y,D3:()=>m,XJ:()=>f,lc:()=>h,mX:()=>w,rU:()=>g,tH:()=>S});var s=r(799);const i="__begin__",n="__end__",o=new RegExp(i,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(n+"$","i"),d='"',p=d+" + ",c=" + "+d;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function w(e){let t;return e?(t=(0,s.HC)(e,(e=>i+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(o,p).replaceAll(a,c)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},73133:(e,t,r)=>{r.d(t,{j:()=>s});const s=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},22671:(e,t,r)=>{r.d(t,{A:()=>v});var s,i=r(90237),n=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),d=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937),m=r(16930),f=r(65864),y=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=s=class extends l.oY{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){const r=m.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.A.fromJSON(i),a=i.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=i.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=m.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}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=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(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),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,d.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,d.MZ)({types:n.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,d.MZ)({type:m.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,d.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,i._)([(0,c.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},59868:(e,t,r)=>{r.d(t,{A7:()=>u,Cx:()=>d,Hk:()=>p,UK:()=>l}),r(44208);var s=r(94985),i=r(31593),n=r(53930),o=r(68249),a=r(93470);const l=n.A.fromJSON(a.Cb),u=i.A.fromJSON(a.yM),d=s.A.fromJSON(a.WR),p=o.A.fromJSON(a.JZ);n.A.fromJSON(a.nC),i.A.fromJSON(a.HW),s.A.fromJSON(a.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>i,HW:()=>u,JZ:()=>a,WR:()=>o,b6:()=>d,nC:()=>l,yM:()=>n});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7202],{9775:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(62788),r=n(95488);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,i.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},89317:(e,t,n)=>{n.d(t,{K:()=>i});const i=["operational-layers","basemap","ground"]},75503:(e,t,n)=>{n.d(t,{w:()=>o});var i=n(4576),r=n(3694),s=n(11006);class o{constructor(e=9,t){this._compareMinX=p,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),_.prune(),x.prune(),v.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(_.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):g(e,o)?a(s,t):_.push(s))}n=_.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(_.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||g(e,s))return!0;_.push(r)}}t=_.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new L([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,s=0,o=!1;const a=this._toBBox(e);for(v.clear(),M.clear();n||v.length>0;){if(n||(n=v.pop(),r=v.data[v.length-1],s=M.pop()??0,o=!0),n.leaf&&(t=(0,i.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),v.push(n),this._condense(v),this;o||n.leaf||!g(n,a)?r?(s++,n=r.children[s],o=!1):n=null:(v.push(n),M.push(s),s=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new L(e.slice(t,n+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/s),h=a*Math.ceil(Math.sqrt(s));b(e,t,n,h,this._compareMinX);for(let r=t;r<=n;r+=h){const t=Math.min(r+h-1,n);b(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return l(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);v.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=c(o),l=m(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,v);for(s.children.push(e),u(s,r);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,v,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(s,n.children.length-s),a=n.leaf?new L(o):new T(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,n,this._toBBox),l=f(t,a),u=c(t)+c(a);l<i?(i=l,s=o,r=u<r?u:r):l===i&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:p,r=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=h(e,0,t,r),o=h(e,n-t,n,r);let a=y(s)+y(o);for(let i=t;i<n-t;i++){const t=e.children[i];u(s,e.leaf?r(t):t),a+=y(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?r(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,i,r){r||(r=new L([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],u(r,e.leaf?i(s):s);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function p(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const _=new r.A,x=new r.A,v=new r.A,M=new r.A({deallocator:void 0});class k{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends k{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class L extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},39516:(e,t,n)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return i.create(e,t)}function r(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>i,m:()=>r})},10382:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(36563),r=n(74887),s=n(9775),o=n(72457),a=n(52268),l=n(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((n,i)=>{let s=!0;const o=e=>{(0,r.Te)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const a=e[s];(0,r.$X)(a)?this._clientPromises[s]=a.then((e=>(this._clients[s]=new l.default(e,t,this._ongoingJobsQueue),o(n),this._clients[s])),(()=>(o(i),null))):(this._clients[s]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const i=new Array(this._clientPromises.length);for(let r=0;r<this._clientPromises.length;++r){const s=this._clientPromises[r];i[r]=s.then((i=>i?.invoke(e,t,n)))}return i}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,r.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,n){return this.apply(e,[t],n)}apply(e,t,n){const i=(0,r.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,i.vE)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let i=0;i<this._clientPromises.length;++i)this._clientPromises[i].then((r=>{r&&(t[i]=r.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,n)=>{n.d(t,{h:()=>s,k:()=>r});const i=new FinalizationRegistry((e=>{e.close()}));function r(e,t){i.register(e,t,t)}function s(e){i.unregister(e)}},29953:(e,t,n)=>{n.d(t,{ho:()=>q});var i=n(49186),r=n(44208),s=n(74887),o=n(10382),a=n(72457),l=n(61322),h=n(53966),u=n(97768),p=n(78888),d=n(84952);const c={async request(e,t){const n=e.options,i=n.responseType;n.signal=t?.signal,n.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,d.sC)(e.url)?.after?i:"array-buffer";const r=await(0,p.A)(e.url,n),s={data:r.data,httpStatus:r.httpStatus,ssl:r.ssl};switch(r.requestOptions?.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=(new TextEncoder).encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=(new TextEncoder).encode(s.data).buffer}return{result:s,transferList:[s.data]}}};var y=n(8341),m=n(2741),f=n(92602),g=(n(47566),n(70333));const w={};var b=n(26390);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class x{constructor(){this._dispatcher=new _,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:n}=t;let i=await l.default.loadWorker(e);i||(i=await import(e));const r=l.default.connect(i);this._workerPostMessage({type:y.Go.OPENED,jobId:n,data:r})}}}var v=n(73444),M=n(18357);const k=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let L,T;const I="Failed to create Worker. Fallback to execute module in main thread";async function A(e){return new Promise((t=>{function n(r){const s=(0,y.VI)(r);s&&s.type===E&&(e.removeEventListener("message",n),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",i),k().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new x).addEventListener("message",n),e.addEventListener("error",i)}e.addEventListener("message",n),e.addEventListener("error",i)}))}let C=0;const{ABORT:S,INVOKE:N,OPEN:D,OPENED:R,RESPONSE:j}=y.Go;class P{static async create(e){const t=await async function(){if(!(0,r.A)("esri-workers"))return A(new x);if(!L&&!T)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,d.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,r.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,r.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,r.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,r.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,r.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,r.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,r.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,r.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,r.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,r.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,r.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,r.A)("esri-atomics"),"esri-shared-array-buffer":(0,r.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,r.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,r.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,r.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.s2)(e.workers.workerPath):e.workers.workerPath=(0,d.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,n=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={buildDate:M.$,fullVersion:g.ol,revision:M.u};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:i})}()}'`);L=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){T=e||{}}let e;if(L)try{e=new Worker(L,{name:"esri-worker-"+C++})}catch(t){k().warn(I,T),e=new x}else k().warn(I,T),e=new x;return A(e)}();return new P(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,i=(0,y.Jc)();return new Promise(((t,r)=>{const o={resolve:t,reject:r,abortHandle:(0,s.NY)(n,(()=>{this._outJobs.delete(i),this._post({type:S,jobId:i})}))};this._outJobs.set(i,o),this._post({type:D,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case S:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,i=t.get(n);i&&(i.controller&&i.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:i,abortable:r}=e,o=r?new AbortController:null,a=this._inJobs,l=c[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,i,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:n,error:(0,y.mF)(e)})}(0,s.$X)(h)?(a.set(n,{controller:o,promise:h}),h.then((e=>{a.has(n)&&(a.delete(n),this._post({type:j,jobId:n},e))}),(e=>{a.has(n)&&(a.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.zf)(e)||this._post({type:j,jobId:n,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:n},h)}_onOpenedMessage(e){const{jobId:t,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.xt)(i.abortHandle),i.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.xt)(s.abortHandle),n?s.reject(i.A.fromJSON(JSON.parse(n))):s.resolve(r))}_post(e,t,n){return(0,y.u1)(this.worker,e,t,n)}}const O=(0,r.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,r.A)("workers-pool-size")):0;let B=(0,r.A)("esri-mobile")?Math.min(O,3):O;B||(B=(0,r.A)("safari")&&(0,r.A)("mac")?7:2);let G=0;const F=[];async function Z(e,t){const n=new o.A,{registryTarget:i,...r}=t;return await n.open(e,r),i&&(0,a.k)(i,n),n}async function q(e,t={}){if("string"!=typeof e)throw new i.A("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,r.A)("host-webworker")&&!(0,r.A)("esri-workers")&&(n="local"),"local"===n){let n=await l.default.loadWorker(e);n||(n=await import(e)),(0,s.Te)(t.signal);const i=t.client||n;return Z([l.default.connect(n,t.schedule)],{...t,client:i})}if(await async function(){if($)return $;J=new AbortController;const e=[];for(let t=0;t<B;t++){const n=P.create(t).then((e=>(F[t]=e,e)));e.push(n)}return $=Promise.all(e),$}(),(0,s.Te)(t.signal),"dedicated"===n){const n=G++%B;return Z([await F[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,B);if(n<B){const i=new Array(n);for(let r=0;r<n;++r){const n=G++%B;i[r]=F[n].open(e,t)}return Z(i,t)}}return Z(F.map((n=>n.open(e,t))),t)}let J,$=null},96628:(e,t,n)=>{n.d(t,{Hq:()=>x,Qj:()=>M,V2:()=>m,m_:()=>f}),n(44208);var i=n(34727),r=n(5443),s=n(39829),o=n(16930),a=n(79258),l=n(90708),h=n(92722),u=n(31464);const p=new Float64Array(2),d=new Float64Array(2),c="0123456789bcdefghjkmnpqrstuvwxyz",y=64;function m(e,t,n,i){const a=[e.xmin,e.ymin,e.xmax,e.ymax],p=s.A.fromExtent(r.A.fromBounds(a,i)),d=(0,u.Cv)(p,i,o.A.WGS84,{densificationStep:t*y});if(!d)return null;const c=(0,l.Ye)(new h.A,d,!1,!1),m=c.coords.filter(((e,t)=>!(t%2))),g=c.coords.filter(((e,t)=>t%2)),w=Math.min(...m),b=Math.min(...g),_=Math.max(...m),x=Math.max(...g),v=f(w,b,n,o.A.WGS84),M=f(_,x,n,o.A.WGS84);return v&&M?{bounds:a,geohashBounds:{xLL:v[0],yLL:v[1],xTR:M[0],yTR:M[1]},level:n}:null}function f(e,t,n,r){if(r.isWebMercator){const r=(0,i.KJ)(e/a.$O.radius),s=r-360*Math.floor((r+180)/360),o=[0,0];return v(o,0,(0,i.KJ)(Math.PI/2-2*Math.atan(Math.exp(-t/a.$O.radius))),s,n),o}const s=(0,u.Cv)({x:e,y:t},r,o.A.WGS84);if(!s)return null;const l=[0,0];return v(l,0,s.y,s.x,n),l}function g(e){return c[e]}function w(e){return(e[0]+e[1])/2}function b(e,t,n){return e[0]=t,e[1]=n,e}function _(e,t){const n=t>w(e);return function(e,t){const n=w(e),i=t,r=!t;e[0]=r*e[0]+i*n,e[1]=r*n+i*e[1]}(e,n),n}function x(e,t){let n=-90,i=90,r=-180,s=180;for(let o=0;o<t;o++){const t=Math.ceil((o+1)/2),a=Math.floor((o+1)/2),l=1-o%2,h=30-(3*t+2*a),u=30-(2*t+3*a),p=3*l+2*(1-l),d=2*l+3*(1-l),c=3*l+7*(1-l)<<u,y=(7*l+3*(1-l)<<h&e.geohashX)>>h,m=(c&e.geohashY)>>u;for(let e=p-1;e>=0;e--){const t=(r+s)/2,n=y&1<<e?1:0;r=(1-n)*r+n*t,s=(1-n)*t+n*s}for(let e=d-1;e>=0;e--){const t=(n+i)/2,r=m&1<<e?1:0;n=(1-r)*n+r*t,i=(1-r)*t+r*i}}return[r,n,s,i]}function v(e,t,n,i,r){r%2&&(r+=1);let s=0,o=0,a=-90,l=90,h=-180,u=180;for(let e=0;e<r/2;e++){for(let t=0;t<5;t++){const n=(h+u)/2,r=i>n?1:0;s|=r<<29-(t+5*e),h=(1-r)*h+r*n,u=(1-r)*n+r*u}for(let t=0;t<5;t++){const i=(a+l)/2,r=n>i?1:0;o|=r<<29-(t+5*e),a=(1-r)*a+r*i,l=(1-r)*i+r*l}}e[2*t]=s,e[2*t+1]=o}function M(e,t,n){let i="";const r=b(p,-90,90),s=b(d,-180,180);for(let o=0;o<n;o++){let n=0;o%2?(n|=_(r,e)<<4,n|=_(s,t)<<3,n|=_(r,e)<<2,n|=_(s,t)<<1,n|=0|_(r,e)):(n|=_(s,t)<<4,n|=_(r,e)<<3,n|=_(s,t)<<2,n|=_(r,e)<<1,n|=0|_(s,t)),i+=g(n)}return i}},17136:(e,t,n)=>{n.d(t,{el:()=>v});var i=n(92602),r=n(49186),s=n(53966),o=n(39829),a=n(82799),l=n(80754),h=n(21325),u=n(28735),p=(n(59456),n(78888)),d=n(65864),c=n(2272),y=n(84952),m=n(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new r.A(e)}const n=(0,l.r8)(e),i=[];for(const e of n){const n=[];i.push(n),n.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],s=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-r)*(o-r)+(a-s)*(a-s)),h=(a-s)/l,u=(o-r)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const i=e*t,o=u*i+r,a=h*i+s;n.push([o,a])}const e=(l+Math.floor(p-1)*t)/2,i=u*e+r,o=h*e+s;n.push([i,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function _(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,l.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,l.kd)(i,t);e=e.clone().offset(n*(-2*t),0)}else if(i<n){const t=(0,l.kd)(i,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],s=t.geometries[i],o=(0,l.r8)(s);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const i=t[e][0];n=i>n?i:n}n=Number(n.toFixed(9));const i=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(i,0))}return!0}}))}if(r===n){if(g(e))for(const t of(0,l.r8)(s))e[r]=e[r].addRing(t);else if(w(e))for(const t of(0,l.r8)(s))e[r]=e[r].addPath(t)}else n=r,e[r]=s}return e}async function v(e,t,n){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,g,w,M,k,E,L,T,I=0;const A=[],C=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,h.Vp)(s),w=s.isWebMercator,E=w?102100:4326,M=l.j7[E].maxX,k=l.j7[E].minX,L=l.j7[E].plus180Line,T=l.j7[E].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(_(t.clone(),M,k));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,M,k))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,k)*(2*M);let i=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:s}=e;r=Number(r.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(L)&&s!==M?(I=s>I?s:I,i=b(i,w),A.push(i),C.push("cut")):e.intersects(T)&&r!==k?(I=s*(2*M)>I?s*(2*M):I,i=b(i,w,360),A.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let S=(0,l.kd)(I,M),N=-90;const D=S,R=new a.A;for(;S>0;){const e=360*S-180;R.addPath([[e,N],[e,-1*N]]),N*=-1,S--}if(A.length>0&&D>0){const t=x(A,await async function(e,t,n,i){const r=(0,c.Dl)(e),s=t[0].spatialReference,o={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,h.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,p.A)(r.path+"/cut",o),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(r,A,R,n)),i=[],s=[];for(let n=0;n<C.length;n++){const r=C[n];if("cut"!==r)s.push(r);else{const r=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(i.push(r),s.push("simplify")):s.push(w?(0,u.Gh)(r):r)}}if(!i.length)return s;const o=await async function(e,t,n){const i="string"==typeof e?(0,y.An)(e):e,r=t[0].spatialReference,s=(0,d.$B)(t[0]),o={...n,query:{...i.query,f:"json",sr:(0,h.YX)(r),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,p.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,s,r)}(r,i,n),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(w?(0,u.Gh)(o.shift()):o.shift())}return a}const j=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)j.push(t);else{const e=A.shift();j.push(!0===w?(0,u.Gh)(e):e)}}return j}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>h});var i=n(82799),r=n(16930),s=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=h(e);for(const e of n)for(const n of e)n[0]+=t;return e}function h(e){return(0,s.Bi)(e)?e.rings:e.paths}},22780:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Se});var i=n(90237),r=(n(59456),n(5503)),s=n(49186),o=n(53966),a=n(74887),l=n(10107),h=(n(44208),n(87811),n(40608)),u=n(96628),p=n(4146),d=n(90708),c=n(92722),y=n(69622),m=n(91869),f=n(39516),g=n(39829),w=n(57251),b=n(21325),_=n(43334),x=n(65864);class v{constructor(){this._featureLookup=new Map}static getInstance(){return v.instance||(v.instance=new v),v.instance}static resetInstance(){v.instance&&(v.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const i=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let r,s=null;if(n&&e.properties[n]&&(s=(0,d.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const i=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(i.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,x.rS)(e.properties[n])),r=new _.Om(s?JSON.parse(JSON.stringify(s)):i?.geometry?JSON.parse(JSON.stringify(i.geometry)):null,o,null,e.properties[t])}else r=new _.Om(s?JSON.parse(JSON.stringify(s)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,r),i.push(r)})),i}}n(78888);var M,k,E,L,T,I,A,C,S,N=n(43709),D=n(42538);function R(e){if(!e.spatialReference.isWGS84)throw new s.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}n(16930),(k=M||(M={})).ELEMENTUID="ELEMENTUID",k.TYPENAME="TYPENAME",M.ELEMENTUID,M.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(E||(E={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(L||(L={})),n(45724),n(35448),(S=T||(T={}))[S.featureResult=0]="featureResult",S[S.countResult=1]="countResult",S[S.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(I||(I={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(A||(A={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(C||(C={}));var j=n(61956),P=n(5443);const O="ESRI__ID",B="ESRI__ORIGIN_ID",G="ESRI__DESTINATION_ID",F="ESRI__LAYOUT_GEOMETRY",Z="ESRI__AGGREGATION_COUNT",q=12;let J=class extends y.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach((e=>{(0,m.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(i);const t=this.getById(e.id);t&&r.set(e.id,t)})),this.sublayerCaches.set(i,r)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,m.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,m.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return v.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new j.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields,s=i.geometry;let o="",a="";s&&s.extent&&(o=(0,u.Qj)(s.extent.ymin,s.extent.xmin,q),a=(0,u.Qj)(s.extent.ymax,s.extent.xmax,q)),r&&1===r.length&&r[0]===O&&"1=1"===i.where||await Promise.all(n??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],h=[];return l.forEach((n=>{if(this.relationshipTypeNames.has(t.objectType.name)?n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]):n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[F]=n.geometry,o&&a){const i=e.linkChartGeohashLookup.get(n.attributes[t.objectIdField]);i?i>=o&&i<=a&&h.push(n):h.push(n)}else h.push(n)})),h}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t){const n=[];let i="";const r=[],s=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;s.has(t)?s.get(t)?.push(e):s.set(t,[e])}})),t&&0!==t?.length){for(const e of t)i=i+e+"|";i=i.slice(0,-1)}return s.forEach(((e,s)=>{let a;a=t&&0!==t?.length?`MATCH (n:${s})-[r:${i}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${s})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,N.executeQueryStreaming)(this.knowledgeGraph,new D.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;for(let e=0;e<i.length;e++){const t=i[e];n.push({id:t[0],typeName:t[1]}),n.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));r.push(l)})),this.refreshCacheContent(),await Promise.all(r),n}async refreshCacheContent(e,t,n,i=!0){const r=v.getInstance(),o=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))a.has(t)?a.get(t)?.push(e):a.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,h]of a){const a=new Promise((o=>{(async()=>{const o=new Set,a=[];let u,p="",d=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))p=`MATCH (n:${e}) ${h?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{p+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);d=!0,p=`MATCH ()-[n:${e}]->() ${h?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{p+=`, n.${e}`,a.push(e)}))}u=new D.A(h?{openCypherQuery:p,bindParameters:{ids:h}}:{openCypherQuery:p});const c=(await(0,N.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await c.read();if(t)break;const s=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,r=0;const o={properties:{}};for(o.id=t[i],i++,r++,d&&(o.originId=t[i],i++,r++,o.destinationId=t[i],i++,r++,(0,m.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,m.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,m.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));i<t.length;i++)o.properties[a[i-r]]=t[i];s.push(o)}const o=r.writeToStore(s,O,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);o.forEach((t=>{l?.set(t.attributes[O],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[O])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[O],{id:t.attributes[O]}),(0,m.tE)(this.memberIdTypeLookup,t.attributes[O],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(o)}removeFromLayer(e){const t=new Set,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)}))}))}async retrieveDataFromService(e,t,n){const i=v.getInstance(),r=new Set,o=[];let a,l="",h=[];const u="relationship"===t.graphType,p=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,d=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let c=!p&&d?Array.from(d).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(c=e.objectIds);else if(null!=e.objectIds&&c&&c.length>0){const t=e.objectIds;e.objectIds=c.filter((e=>t.includes(e)))}else if(null!=e.objectIds)c=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=c}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{r.add(e.name)})):n.forEach((e=>{e!==O&&e!==t.geometryFieldName&&r.add(e)}))}if(null!=e.geometry){const n=e.geometry;let i;const h=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,p=h?.spatialReference,d=h?.serviceCapabilities?.geometryCapabilities;let c=d?.geometryMaxBoundingRectangleSizeX,y=d?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,w.initializeProjection)(n.extent.spatialReference,b.KK),i=(0,w.project)(n.extent,b.KK)):i=n.extent,c&&y&&p){if(4326!==p.wkid){const e=new P.A({spatialReference:p,xmax:c,ymax:y}),t=(0,w.project)(e,b.KK);c=t.xmax,y=t.ymax}if(i.xmax-i.xmin>c)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${c}° latitude, limit exceeded`);if(i.ymax-i.ymin>y)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,f.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&r.add(e.name)}))}l=u?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach((e=>{l+=`, n.${e}`,o.push(e)})),a=new D.A({openCypherQuery:l,bindParameters:{param_filter_geom:new g.A({rings:R(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,f.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{i.fieldNames.includes(e.name)&&r.add(e.name)}));const s=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&s.has(e.left.type)&&s.has(e.right.type)&&o.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(i.parseTree),a&&(n="")}let i="";i=u?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;c&&(s=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=s?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",u&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach((e=>{i+=`, n.${e}`,o.push(e)})),a=new D.A(c?{openCypherQuery:i,bindParameters:{ids:c}}:{openCypherQuery:i})}const y=(await(0,N.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await y.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const a={properties:{}};for(a.id=t[i],i++,s++,u&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++);i<t.length;i++)a.properties[o[i-s]]=t[i];r.push(a)}h=h.concat(i.writeToStore(r,O,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return h}};(0,i._)([(0,l.MZ)()],J.prototype,"knowledgeGraph",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"inclusionModeDefinition",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"entityTypeNames",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"relationshipTypeNames",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"geographicLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"sublayerCaches",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"nodeConnectionsLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"relationshipConnectionsLookup",void 0),(0,i._)([(0,l.MZ)()],J.prototype,"memberIdTypeLookup",void 0),J=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],J);var $=n(13874),U=(n(86162),n(94409),n(65345),n(42980),n(39290),n(92438),n(96576),n(93618),n(65494)),Y=n(15036),z=(n(29953),n(83221)),Q=n(36791),V=n(64714);const H=(0,n(17036).p)(),X=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i._)([(0,l.MZ)(H.fields)],t.prototype,"fields",void 0),(0,i._)([(0,l.MZ)(H.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var W=n(63074),K=n(81149),ee=n(54310),te=n(25036),ne=n(55785),ie=n(20437),re=n(30524),se=n(22671),oe=n(30291),ae=n(61322),le=n(82799),he=n(50498);let ue=class extends((0,K.J)(X((0,W.d)((0,te.j)((0,ee.J)(p.A)))))){constructor(e){if(super(e),this.capabilities=(0,V.f)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=O,this.objectType=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new ae.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=j.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=F;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?he.g.fromJSON(t.geometryType):null;const n=t?.name,i=n?e.objectType.properties?.[n]:null;i?(this.hasM=i.hasM??!1,this.hasZ=i.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(ie.A.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(ie.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this.fields.push(ie.A.fromJSON({name:Z,type:"esriFieldTypeInteger",alias:Z,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON("polyline")).renderer):this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON("point")).renderer):this.renderer=(0,U.r)((0,V.F0)(he.g.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,re.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,oe.tn)(this,e)}createQuery(){return new j.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=se.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return r.features.forEach((e=>{e.sourceLayer=this})),r}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),s=await r.executeQueryForExtent(i.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new P.A(s.extent):new P.A,{count:s.count,extent:o}}async queryObjectIds(e,t){const n=j.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return i.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new z.A({geometryType:he.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new Q.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:he.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new j.A({where:"1=1",outFields:[O]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=j.A.from(e),i=n.geometry;let r;if(i&&!i.spatialReference?.isWGS84&&(await(0,w.initializeProjection)(i.spatialReference,b.KK),n.geometry=(0,w.project)(i instanceof g.A||i instanceof le.A?i:i.extent,b.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:r}}};(0,i._)([(0,l.MZ)()],ue.prototype,"capabilities",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],ue.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.MZ)()],ue.prototype,"definitionExpression",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"elevationInfo",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"geometryType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"geometryFieldName",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"graphType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"hasM",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"hasZ",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"objectType",void 0),(0,i._)([(0,l.MZ)()],ue.prototype,"parentCompositeLayer",void 0),(0,i._)([(0,l.MZ)(ne.M6)],ue.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:$.A,json:{name:"popupInfo",write:!0}})],ue.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:Y.H,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],ue.prototype,"renderer",null),(0,i._)([(0,l.MZ)()],ue.prototype,"source",void 0),(0,i._)([(0,l.MZ)({json:{read:!1}})],ue.prototype,"type",void 0),ue=(0,i._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ue);const pe=ue;var de=n(2741);let ce,ye=null;var me,fe,ge,we,be,_e,xe,ve,Me,ke,Ee;function Le(e,t,n,i,r,s){const o=n.length,a=r.length,l=Float64Array.BYTES_PER_ELEMENT,h=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,p=15+o*(u+2*l)+a*(2*h),d=ye._malloc(p);try{const u=d+16-d%16,p=u+o*l,c=p+o*l,y=c+a*h,m=y+a*h,f=()=>[ye.HEAPF64.subarray(u>>3,(u>>3)+o),ye.HEAPF64.subarray(p>>3,(p>>3)+o),ye.HEAPU32.subarray(c>>2,(c>>2)+a),ye.HEAPU32.subarray(y>>2,(y>>2)+a),ye.HEAPU8.subarray(m,m+o)],[g,w,b,_,x]=f();g.set(n),w.set(i),b.set(r),_.set(s),x.set(t);let v=e(o,m,u,p,a,c,y),M=null;if(v){const e=ye.getLayoutLinksTypes(),t=ye.getLayoutLinksVerticesEndIndices(),n=ye.getLayoutLinksVertices(),i=ye.countLayoutLinksVertices();!a||e&&t?i&&!n?v=!1:M={types:new Uint8Array(ye.HEAPU8.subarray(e,e+a)),vertexEndIndex:new Uint32Array(ye.HEAPU32.subarray(t>>2,(t>>2)+a)),vertices:new Float64Array(ye.HEAPF64.subarray(n>>3,(n>>3)+2*i))}:v=!1}const[k,E,L,T,I]=f();return n.set(k),i.set(E),r.set(L),s.set(T),t.set(I),{success:v,links:M}}finally{ye._free(d),ye.cleanupLayout()}}(ge=me||(me={}))[ge.None=0]="None",ge[ge.IsMovable=1]="IsMovable",ge[ge.IsGeographic=2]="IsGeographic",ge[ge.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(fe||(fe={})),function(e){e.getMinIdealEdgeLength=function(){return ye.getMinIdealEdgeLength()},e.apply=function(e,t,n,i,r,s=2,o=1,a=-1){return Le(((e,t,n,i,r,l,h)=>ye.applyForceDirectedLayout(e,t,n,i,r,l,h,s,o,a)),e,t,n,i,r)}}(we||(we={})),function(e){e.apply=function(e,t,n,i,r,s=2,o=1,a=-1){return Le(((e,t,n,i,r,l,h)=>ye.applyCommunityLayout(e,t,n,i,r,l,h,s,o,a)),e,t,n,i,r)}}(be||(be={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applySimpleLayout,e,t,n,i,r)}}(_e||(_e={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applyHierarchicalLayout,e,t,n,i,r)}}(xe||(xe={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applyRadialTreeLayout,e,t,n,i,r)}}(ve||(ve={})),function(e){e.apply=function(e,t,n,i,r){return Le(ye.applySmartTreeLayout,e,t,n,i,r)}}(Me||(Me={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(ke||(ke={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(Ee||(Ee={}));var Te=n(66063),Ie=n(72294),Ae=n(86738);let Ce=class extends((0,W.d)((0,te.j)(p.A))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new r.A,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new P.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new r.A,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new s.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let n=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(n=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,s)=>{if(!this._graphTypeLookup.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this._graphTypeLookup.get(s)instanceof Ie.A||"strictOrigin"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),i.push(this._graphTypeLookup.get(s))):this._graphTypeLookup.get(s)instanceof Te.A||"properties"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),n.push(this._graphTypeLookup.get(s))):(o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(n=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new J({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=n,this.memberRelationshipTypes=i,this.dataManager=r}load(e){return this.addResolvingPromise(new Promise((t=>{(0,N.fetchKnowledgeGraph)(this.url).then((n=>{if(this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof c.A?e.linkChartLocation:e.linkChartLocation?(0,d.Ux)(e.linkChartLocation):null,t&&2===t.coords.length&&0===t.lengths.length?(this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(t.coords[1],t.coords[0],q)),this.entityLinkChartDiagramLookup.set(e.id,t)):(this.linkChartGeohashLookup.set(e.id,""),this.relationshipLinkChartDiagramLookup.set(e.id,t))})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.Te)(e);const t=[],n=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let n=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(n=await async function(e,t){const n=[],i=new Map,r=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&i.set(e.name,[]);for(const t of e)i.has(t.typeName)&&i.get(t.typeName)?.push(t.id);for(const[e,s]of i){if(s.length<1)continue;const i=new D.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:s}});r.push((0,N.executeQueryStreaming)(t,i).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:i}=await t.read();if(e)break;for(const e of i)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(r),n}(e,this.dataManager.knowledgeGraph));const i=e.concat(n).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:n=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);if(t){const e=new Set,t=[];for(const t of i)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const n of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(n);for(const n of e)if(this.dataManager.memberIdTypeLookup.has(n))for(const e of this.dataManager.memberIdTypeLookup.get(n))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:n,typeName:e});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const e of i)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);n&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{});const r=[];return this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r),this._refreshNamedTypes(),i}async expand(e,t){const n=await this.dataManager.getConnectedRecordIds(e,t),i=n.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(n),{records:i}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new pe({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new pe({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const n=((e,t,n)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(n.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof c.A)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],q)):this.linkChartGeohashLookup.set(e.id,"");else{const n=(0,d.Ux)(e.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation?n:null):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation?n:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.Qj)(e.linkChartLocation.x,e.linkChartLocation.y,q)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const i=[],r=[],a=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{i.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const l=new Map,h=new Map,p=new Map,c=new Map,y=new Uint8Array(i.length),m=new Float64Array(i.length),f=new Float64Array(i.length),g=new Uint32Array(r.length),w=new Uint32Array(r.length),b=[],_=new P.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let x,v="FORCE_DIRECTED",M=0,k=0;switch(v="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,v){case"FORCE_DIRECTED":x=we.apply;break;case"COMMUNITY":x=be.apply;break;case"HIERARCHICAL":x=xe.apply;break;case"RADIAL_TREE":x=ve.apply;break;case"SMART_TREE":x=Me.apply;break;default:x=_e.apply}i.forEach((({typeName:n,feature:i})=>{if(t?.lockedNodeLocations?.has(i.attributes[O])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)?y[M]=me.IsGeographic:y[M]=me.None;const r=t.lockedNodeLocations.get(i.attributes[O]);m[M]=r.x,f[M]=r.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)){y[M]=me.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(n).name],r=this.dataManager.geographicLookup.get(n)?.geometryType;switch(r){case"esriGeometryPoint":m[M]=t?.x,f[M]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(m[M]=e.x,f[M]=e.y):y[M]=me.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(m[M]=e.x,f[M]=e.y):y[M]=me.IsMovable;break;default:y[M]=me.IsMovable}(null==m[M]||null==f[M]||Number.isNaN(m[M])||Number.isNaN(f[M]))&&(y[M]=me.IsMovable,m[M]=0,f[M]=0)}else y[M]=me.IsMovable,m[M]=0,f[M]=0;c.set(i.attributes[O],M),b[M]={feature:i,typeName:n},M++}));let E=!1;const L=new Map;r.forEach((e=>{const t=e.feature.attributes[B],n=e.feature.attributes[G],i=c.get(t),r=c.get(n);if(void 0!==i&&void 0!==r){const s=t+"-"+n,o=L.get(s),l=o?.has(e.typeName);l||(g[k]=i,w[k]=r,void 0===o?L.set(s,new Map([[e.typeName,k]])):o.set(e.typeName,k),k++),a.push(e)}else E=!0,this.relationshipLinkChartDiagramLookup.set(t,null),this.linkChartGeohashLookup.set(t,null)})),E&&o.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(ce||(ce=n.e(3666).then(n.bind(n,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,de.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){ye=e}(e)})),ce));const{success:T,links:I}=x(y,m,f,g.subarray(0,k),w.subarray(0,k));if(!T)throw new s.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<b.length;e++){if(f[e]>84.9999?f[e]=84.9999:f[e]<-84.9999&&(f[e]=-84.9999),m[e]>179.9999?m[e]=179.9999:m[e]<-179.9999&&(m[e]=-179.9999),b[e].feature.attributes[F]=new Ae.A(m[e],f[e]),l.has(b[e].typeName)){const t=l.get(b[e].typeName);t?.set(b[e].feature.attributes[O],b[e].feature)}else{const t=new Map;t.set(b[e].feature.attributes[O],b[e].feature),l.set(b[e].typeName,t)}p.set(b[e].feature.attributes[O],b[e].feature);const t=(0,d.Ux)(b[e].feature.attributes[F]);this.entityLinkChartDiagramLookup.set(b[e].feature.attributes[O],b[e].feature.attributes[F]?t:null),this.linkChartGeohashLookup.set(b[e].feature.attributes[O],(0,u.Qj)(b[e].feature.attributes[F].y,b[e].feature.attributes[F].x,q)),b[e].feature.attributes[F].x<_.xmin&&(_.xmin=b[e].feature.attributes[F].x),b[e].feature.attributes[F].x>_.xmax&&(_.xmax=b[e].feature.attributes[F].x),b[e].feature.attributes[F].y<_.ymin&&(_.ymin=b[e].feature.attributes[F].y),b[e].feature.attributes[F].y>_.ymax&&(_.ymax=b[e].feature.attributes[F].y)}if(this.linkChartExtent.xmin=_.xmin,this.linkChartExtent.xmax=_.xmax,this.linkChartExtent.ymin=_.ymin,this.linkChartExtent.ymax=_.ymax,!I)throw new s.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const A=new Map,C=new Map,S=new Map,N=new Set;for(let e=0;e<a.length;e++){const t=[],n=a[e],i=n.feature.attributes[B],r=n.feature.attributes[G],s=i+"-"+r,l=L.get(s).get(n.typeName),u=0===l?0:I?.vertexEndIndex[l-1];if(!N.has(l)){if(N.add(l),I.types[l]===fe.Recursive){const e=[I.vertices[2*u],I.vertices[2*u+1]],n=[I.vertices[2*(u+1)],I.vertices[2*(u+1)+1]],i=[.5*(e[0]+n[0]),.5*(e[1]+n[1])],r=[i[0]-e[0],i[1]-e[1]],s=[i[0]+r[1],i[1]-r[0]],o=[i[0]-r[1],i[1]+r[0]];t.push(e),t.push(s),t.push(n),t.push(o),t.push(e)}else{if(I.types[l]!==fe.Regular){o.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=u;e<I.vertexEndIndex[l];e++)t.push([I.vertices[2*e],I.vertices[2*e+1]])}const e=b[c.get(i)]?.feature.attributes[F],n=b[c.get(r)]?.feature.attributes[F];t[0][0]===e.x&&t[0][1]===e.y||(t[0]=[e.x,e.y]),t[t.length-1][0]===n.x&&t[t.length-1][1]===n.y||(t[t.length-1]=[n.x,n.y]);for(let e=1;e<t.length-1;e++)t[e][1]>85.5?t[e][1]=85.5:t[e][1]<-85.5&&(t[e][1]=-85.5),t[e][0]>179.9999?t[e][0]=179.9999:t[e][0]<-179.9999&&(t[e][0]=-179.9999);A.has(s)?A.get(s).push(t):A.set(s,[t])}const y=A.get(s);C.has(s)||(C.set(s,new Map),S.set(s,new Map));const m=C.get(s),f=S.get(s);m.has(n.typeName)||(m.set(n.typeName,y.shift()),f.set(n.typeName,0));const g=m.get(n.typeName);f.set(n.typeName,f.get(n.typeName)+1);const w=new le.A({paths:g});if(n.feature.attributes[F]=w,h.has(n.typeName)){const e=h.get(n.typeName);e?.set(n.feature.attributes[O],n.feature)}else{const e=new Map;e.set(n.feature.attributes[O],n.feature),h.set(n.typeName,e)}p.set(n.feature.attributes[O],n.feature);const _=(0,d.Ux)(n.feature.attributes[F]);this.relationshipLinkChartDiagramLookup.set(n.feature.attributes[O],n.feature.attributes[F]?_:null),this.linkChartGeohashLookup.set(n.feature.attributes[O],"")}for(const e of a)e.feature.attributes[Z]=S.get(e.feature.attributes[B]+"-"+e.feature.attributes[G])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e},{nodes:l,links:h,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const n=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const n=t.linkChartLocation;let i;const r=t.id;n&&(i="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(r,new Ae.A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const n=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!n.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),t.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),n="endPoints"in t?"relationship":"entity",i=new pe({objectType:t,parentCompositeLayer:this,graphType:n,title:e});"entity"===n?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),i.geometryType?this.layers.push(i):this.tables.push(i),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const n=e.linkChartLocation;let i;const r=e.id;if(!n)return;i="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]};const s=(0,d.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(r,s):this.entityLinkChartDiagramLookup.set(r,s),this.linkChartGeohashLookup.set(r,(0,u.Qj)(i.x,i.y,q)),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[B]),n=this.relationshipLinkChartDiagramLookup.get(e.attributes[G]);if(t&&n){const i=(0,d.Ux)(new le.A({paths:[[t.coords[0],t.coords[1]],[n.coords[0],n.coords[1]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[O],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[O],null);this.linkChartGeohashLookup.set(e.attributes[O],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};(0,i._)([(0,l.MZ)()],Ce.prototype,"dataPreloadedInLocalCache",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"defaultLinkChartConfig",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"dataManager",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"knowledgeGraph",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"layers",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"entityLinkChartDiagramLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"linkChartExtent",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"linkChartGeohashLookup",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"memberEntityTypes",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"memberRelationshipTypes",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"sublayerIdsCache",void 0),(0,i._)([(0,l.MZ)()],Ce.prototype,"tables",void 0),(0,i._)([(0,l.MZ)({json:{read:!1}})],Ce.prototype,"type",void 0),Ce=(0,i._)([(0,h.$)("esri.layers.LinkChartLayer")],Ce);const Se=Ce},6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),h=n(90708),u=n(6518),p=n(51441),d=n(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new s.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,p.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(this._markedIds.add(t),n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,h.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,h.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>u,e2:()=>p,f:()=>d});var i=n(44208),r=n(4718),s=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function u(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},20437:(e,t,n)=>{n.d(t,{A:()=>f});var i,r=n(90237),s=n(66552),o=n(25482),a=n(10107),l=n(56507),h=(n(87811),n(44208),n(93223)),u=n(36005),p=n(40608),d=n(72088),c=n(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,r._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"description",void 0),(0,r._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,r._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,r._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,r._)([(0,h.e)(c.m)],m.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,r._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,r._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,r._)([(0,p.$)("esri.layers.support.Field")],m);const f=m},81457:(e,t,n)=>{n.d(t,{A:()=>L});var i,r=n(90237),s=n(61147),o=n(66552),a=n(25482),l=n(4718),h=n(90629),u=n(10107),p=(n(44208),n(53966),n(36005)),d=n(40608),c=n(43937),y=(n(87811),n(32730));let m=i=class extends a.oY{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.mX)(t.value):e}writeExpression(e,t,n){null!=this.value&&(e=(0,y.mX)(this.value)),null!=e&&(t[n]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,r._)([(0,u.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],m.prototype,"expression",void 0),(0,r._)([(0,p.w)("expression",["expression","value"])],m.prototype,"readExpression",null),(0,r._)([(0,c.K)("expression")],m.prototype,"writeExpression",null),(0,r._)([(0,u.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],m.prototype,"title",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1}})],m.prototype,"value",void 0),m=i=(0,r._)([(0,d.$)("esri.layers.support.LabelExpressionInfo")],m);const f=m;var g,w=n(83531),b=n(59868),_=n(54031);const x=new o.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 v(e,t,n){return{enabled:!(0,w.TU)(n?.layer)}}function M(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function k(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let E=g=class extends a.oY{static evaluateWhere(e,t){const n=(e,t,n)=>{switch(t){case"=":return e==n;case"<>":return e!=n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return n(t[i[0]],i[1],i[2]);if(7===i.length){const e=n(t[i[0]],i[1],i[2]),r=i[3],s=n(t[i[4]],i[5],i[6]);switch(r){case"AND":return e&&s;case"OR":return e||s}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=b.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const n=t.labelExpressionInfo;if(!n||!n.value&&!n.expression)return e}writeLabelExpression(e,t,n){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[n]=e)}writeLabelExpressionInfo(e,t,n,i){if(null==e&&null!=this.labelExpression&&M(i))e=new f({expression:this.getLabelExpressionArcade()});else if(!e)return;const r=e.toJSON(i);r.expression&&(t[n]=r)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],E.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:v}}}}})],E.prototype,"allowOverrun",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:v}}}}})],E.prototype,"deconflictionStrategy",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,n){return this.labelExpressionInfo&&"service"===n?.origin&&k(n.layer)?{enabled:!1}:{allowNull:!0}}}}})],E.prototype,"labelExpression",void 0),(0,r._)([(0,p.w)("labelExpression")],E.prototype,"readLabelExpression",null),(0,r._)([(0,c.K)("labelExpression")],E.prototype,"writeLabelExpression",null),(0,r._)([(0,u.MZ)({type:f,json:{write:{overridePolicy:(e,t,n)=>function(e){return M(e)||k(e?.layer)}(n)?{allowNull:!0}:{enabled:!1}}}})],E.prototype,"labelExpressionInfo",void 0),(0,r._)([(0,c.K)("labelExpressionInfo")],E.prototype,"writeLabelExpressionInfo",null),(0,r._)([(0,u.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],E.prototype,"labelPlacement",void 0),(0,r._)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],E.prototype,"labelPosition",void 0),(0,r._)([(0,u.MZ)({type:Number})],E.prototype,"maxScale",void 0),(0,r._)([(0,c.K)("maxScale")],E.prototype,"writeMaxScale",null),(0,r._)([(0,u.MZ)({type:Number})],E.prototype,"minScale",void 0),(0,r._)([(0,c.K)("minScale")],E.prototype,"writeMinScale",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],E.prototype,"repeatLabel",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:h.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:v}}}}})],E.prototype,"repeatLabelDistance",void 0),(0,r._)([(0,u.MZ)({types:s.em,json:{origins:{"web-scene":{types:s.Rv,write:_.oO,default:null}},write:_.oO,default:null}})],E.prototype,"symbol",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"useCodedValues",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],E.prototype,"where",void 0),E=g=(0,r._)([(0,d.$)("esri.layers.support.LabelClass")],E);const L=E},55785:(e,t,n)=>{n.d(t,{ui:()=>x,Yj:()=>f,id:()=>M,kF:()=>c,fV:()=>m,C1:()=>L,hG:()=>E,hn:()=>k,ke:()=>b,Ih:()=>_,M6:()=>d,Qo:()=>g,Fm:()=>v,PY:()=>p,OZ:()=>y});var i=n(60945),r=n(89317),s=n(5443),o=n(16930),a=n(97159),l=(n(4576),n(4718),n(88930)),h=n(88625),u=n(78553);const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:r.K}}},d={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,n){t[n]=!e}}}},c={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:r.K}}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:r.K}}},f={value:null,type:h.A,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:r.K}}};function g(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const w={write:{enabled:!0,layerContainerTypes:r.K},read:!0},b={type:Number,json:{origins:{"web-document":w,"portal-item":{write:!0}}}},_={...b,json:{...b.json,origins:{"web-document":{...w,write:{enabled:!0,layerContainerTypes:r.K,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,n)=>n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition?.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,u.D)(t.layerDefinition.drawingInfo.transparency):void 0:(0,u.D)(t.drawingInfo.transparency)}}},x={type:i.A,readOnly:!0,get(){const e=null!=this.layer?.timeInfo?this.layer:null!=this.i3slayer?.timeInfo?this.i3slayer:null;if(null==e)return null;const{datesInUnknownTimezone:t,timeOffset:n,useViewTime:r}=e,s=this.view?.timeExtent;let o=e.timeExtent;t&&(o=function(e){if(!e)return e;const{start:t,end:n}=e;return new i.A({start:null!=t?(0,l.S1)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.S1)(n,n.getTimezoneOffset(),"minutes"):n})}(o));let a=r?s&&o?s.intersection(o):s||o:o;if(!a||a.isEmpty||a.isAllTime)return a;n&&(a=a.offset(-n.value,n.unit)),t&&(a=function(e){if(!e)return e;const{start:t,end:n}=e;return new i.A({start:null!=t?(0,l.S1)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.S1)(n,-n.getTimezoneOffset(),"minutes"):n})}(a));const h=this._get("timeExtent");return a.equals(h)?h:a}},v={type:s.A,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const n=s.A.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=o.A.fromJSON(t.spatialReference)),n}}}},read:!1}},M={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:r.K}}},name:"layerDefinition.minScale",write:!0}},E={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:r.K}}},name:"layerDefinition.maxScale",write:!0}},L={json:{write:{ignoreOrigin:!0,layerContainerTypes:r.K},origins:{"web-map":{read:!1,write:!1}}}}},72088:(e,t,n)=>{n.d(t,{rS:()=>k,gK:()=>M}),n(44208);var i,r=n(90237),s=n(4718),o=n(10107),a=(n(53966),n(93223)),l=n(40608),h=n(25482);n(87811);let u=i=class extends h.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,r._)([(0,l.$)("esri.layers.support.CodedValue")],u);const p=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends h.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.e)(p)],d.prototype,"type",void 0),d=(0,r._)([(0,l.$)("esri.layers.support.Domain")],d);const c=d;var y;let m=y=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,r._)([(0,o.MZ)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,r._)([(0,a.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,r._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;n(49186);let w=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,r._)([(0,a.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,r._)([(0,l.$)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let x=_=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,r._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=_=(0,r._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const v=x,M={key:"type",base:c,typeMap:{range:x,"coded-value":f,inherited:b}};function k(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>f,D3:()=>y,XJ:()=>m,lc:()=>c,mX:()=>w,rU:()=>g,tH:()=>M});var i=n(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+r,"i"),h=new RegExp(s+"$","i"),u='"',p=u+" + ",d=" + "+u;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,(e=>r+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):u+t,t=h.test(t)?t.replace(h,""):t+u,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=_.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},31756:(e,t,n)=>{n.d(t,{j:()=>s});var i=n(83047),r=n(79258);const s={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},92300:(e,t,n)=>{n.d(t,{V:()=>s,X:()=>r});var i=n(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,n){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}},25927:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.Entity")],l);const h=l},54238:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.oY{constructor(e){super(e),this.properties=null}};(0,i._)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(90237),r=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i._)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let h=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null}};(0,i._)([(0,r.MZ)()],h.prototype,"bindParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"bindGeometryQuantizationParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"outputQuantizationParameters",void 0),(0,i._)([(0,r.MZ)()],h.prototype,"outputSpatialReference",void 0),h=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],h);const u=h},40662:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(90237),r=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i._)([(0,r.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends r.oY{constructor(e){super(e),this.path=null}};(0,i._)([(0,s.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const h=l},23150:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(90237),r=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,i._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.Relationship")],l);const h=l},54546:(e,t,n)=>{n.d(t,{A:()=>d});var i,r=n(90237),s=n(25482),o=n(4718),a=n(10107),l=n(56507),h=n(40608),u=n(43937);let p=i=class extends s.oY{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,r._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,r._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,r._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,r._)([(0,u.K)("start"),(0,u.K)("num")],p.prototype,"writeStart",null),(0,r._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=i=(0,r._)([(0,h.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},22671:(e,t,n)=>{n.d(t,{A:()=>b});var i,r=n(90237),s=n(59456),o=n(52106),a=n(66552),l=n(25482),h=n(4718),u=n(10107),p=(n(44208),n(53966),n(36005)),d=n(40608),c=n(43937),y=n(16930),m=n(65864),f=n(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.oY{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){const n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const r=e[t],s=o.A.fromJSON(r),a=r.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=r.aggregateGeometries,h=s.aggregateGeometries;if(l&&null!=h)for(const e in h){const t=h[e],i=l[e],r=i?.spatialReference;null==t||r||(t.spatialReference=n)}i.push(s)}return i}writeGeometryType(e,t,n,i){if(e)return void g.write(e,t,n,i);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,i)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,i=(0,m.rS)(e);return i&&!n&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)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,h.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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const i=t.features[n];if(i.geometry){const t=e?.[n];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,n],translate:[i,r]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[i,r],scale:[s,o]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const h=this._getHydrationFunction(e,(e=>e*s+i),(e=>r-e*o),a,l);for(const{geometry:e}of t)null!=e&&h&&h(e);return this.transform=null,this}_quantizePoints(e,t,n){let i,r;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=n(a[1]);e===i&&o===r||(s.push([e-i,o-r]),i=e,r=o)}else i=t(a[0]),r=n(a[1]),s.push([i,r])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,n);o&&r.push(o)}return r.length>0?((0,m.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,n);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,i,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,r=i.length;e<r;e++){const r=i[e];e>0?(o+=r[0],a+=r[1]):(o=r[0],a=r[1]),r[0]=t(o),r[1]=n(a)}}if(i&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2]),n[3]=r(n[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=n(a)}if(i&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=r(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,r._)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,r._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,r._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,r._)([(0,c.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,r._)([(0,u.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,r._)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,r._)([(0,u.MZ)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,r._)([(0,c.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,r._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>s,lF:()=>a}),n(92602),n(70333);var i=n(4718),r=n(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,i.o8)(e)}function a(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}n(926)},30291:(e,t,n)=>{n.d(t,{tn:()=>h});var i=n(13874),r=n(30524),s=n(28122),o=(n(84424),n(80737),n(96808),n(66159)),a=(n(67336),n(92094),n(23721),n(41227)),l=n(68780);function h({displayField:e,editFieldsInfo:t,fields:n,objectIdField:l,title:h},c){if(!n)return null;const m=function(e,t){const n=t?.visibleFieldNames;return function(e,t){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.A({fieldName:t.name,isEditable:(0,r.R$)(t,e),label:t.alias,format:d(t),visible:u(t,{...e,visibleFieldNames:n})})))}({editFieldsInfo:t,fields:n,objectIdField:l},c);if(!m.length)return null;const f=function(e){const t=(0,r.mB)(e),{titleBase:n}=e;return t?`${n}: {${t.trim()}}`:n??""}({titleBase:h,fields:n,displayField:e}),g=[new o.A,new s.A];return new i.A({title:f,content:g,fieldInfos:m})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,r.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:c(e)?-1:c(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,r.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):null;default:return null}}function c(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},88625:(e,t,n)=>{n.d(t,{A:()=>_});var i,r=n(90237),s=n(66552),o=n(25482),a=n(97768),l=n(10107),h=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),p=n(43937),d=n(30524);let c=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r._)([(0,u.$)("esri.symbols.support.FeatureExpressionInfo")],c);const y=c;var m,f=n(16271);const g=(0,s.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new s.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=m=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,n,i){t[n]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r._)([(0,l.MZ)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,p.K)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],b.prototype,"mode",null),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,r._)([(0,l.MZ)({type:f.KQ,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=m=(0,r._)([(0,u.$)("esri.symbols.support.ElevationInfo")],b);const _=b},59868:(e,t,n)=>{n.d(t,{A7:()=>h,Cx:()=>u,Hk:()=>p,UK:()=>l}),n(44208);var i=n(94985),r=n(31593),s=n(53930),o=n(68249),a=n(93470);const l=s.A.fromJSON(a.Cb),h=r.A.fromJSON(a.yM),u=i.A.fromJSON(a.WR),p=o.A.fromJSON(a.JZ);s.A.fromJSON(a.nC),r.A.fromJSON(a.HW),i.A.fromJSON(a.b6)},93470:(e,t,n)=>{n.d(t,{Cb:()=>r,HW:()=>h,JZ:()=>a,WR:()=>o,b6:()=>u,nC:()=>l,yM:()=>s});const i=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},16271:(e,t,n)=>{n.d(t,{Ao:()=>r,KQ:()=>s});var i=n(31756);function r(e){return 1/(i.j[e]||1)}const s=function(){const e=Object.keys(i.j);return e.sort(),e}()},78553:(e,t,n)=>{n.d(t,{D:()=>s,p:()=>r});var i=n(56507);function r(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|