@arcgis/core 4.33.0-next.20250427 → 4.33.0-next.20250429
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{92836e3a2c5226296fec.js → 12c9dd3932218238033b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d230c55cde66ee905b3.js → 1a0d4b7de2f98ff9cc01.js} +1 -1
- package/assets/esri/core/workers/chunks/2433b22749a088735262.js +1 -0
- package/assets/esri/core/workers/chunks/278280121528fa1059de.js +1 -0
- package/assets/esri/core/workers/chunks/28317c8d7fa2eeeaf997.js +1 -0
- package/assets/esri/core/workers/chunks/37619d28b0441199c320.js +1 -0
- package/assets/esri/core/workers/chunks/{360c8cff7c3b25d2b2d2.js → 5a821b7bf58eebb9062c.js} +1 -1
- package/assets/esri/core/workers/chunks/6b9110ec7da0fef1be31.js +1 -0
- package/assets/esri/core/workers/chunks/8c8d812a7f2d29c29676.js +1 -0
- package/assets/esri/core/workers/chunks/8fc5b1c17e841362dd15.js +1 -0
- package/assets/esri/core/workers/chunks/{5ac3096139e3eafd0e1d.js → 97eedd6b90c6a9c67947.js} +1 -1
- package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +1 -0
- package/assets/esri/core/workers/chunks/{9661ee8569ee208e6237.js → ada9694498549f56dff1.js} +1 -1
- package/assets/esri/core/workers/chunks/b1473d15c75fc560ea4a.js +1 -0
- package/assets/esri/core/workers/chunks/{76575d2c1c56e37c1315.js → b1e420cb425a3625170e.js} +5 -5
- package/assets/esri/core/workers/chunks/{87dcfbbcf290e0fa5c0f.js → c3033f148213c960b906.js} +102 -163
- package/assets/esri/core/workers/chunks/{b8b8425e8b1246cdc86d.js → c6b0dda0540c9db12d0e.js} +1 -1
- package/assets/esri/core/workers/chunks/def182fff5a0244b1c2c.js +1 -0
- package/assets/esri/core/workers/chunks/f1222bf7232c4a168312.js +1 -0
- package/assets/esri/themes/base/widgets/_Legend.scss +2 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +43 -39
- package/chunks/ShadowCastAccumulate.glsl.js +5 -5
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/core/Collection.js +1 -1
- package/core/CollectionFlattener.js +1 -1
- package/core/MemCache.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +67 -37
- package/layers/LinkChartLayer.js +1 -1
- package/package.json +3 -3
- package/request.js +1 -1
- package/rest/networks/circuits/alterCircuit.js +5 -0
- package/rest/networks/circuits/createCircuit.js +5 -0
- package/rest/networks/circuits/deleteCircuits.js +5 -0
- package/rest/networks/circuits/queryCircuits.js +5 -0
- package/rest/networks/circuits/support/CircuitVerifyResult.js +5 -0
- package/rest/networks/circuits/support/CreateAlterCircuitParameters.js +5 -0
- package/rest/networks/circuits/support/DeleteCircuitsParameters.js +5 -0
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +5 -0
- package/rest/networks/circuits/support/QueryCircuitsResult.js +5 -0
- package/rest/networks/circuits/support/VerifyCircuitsParameters.js +5 -0
- package/rest/networks/circuits/support/VerifyCircuitsResult.js +5 -0
- package/rest/networks/circuits/verifyCircuits.js +5 -0
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +9 -8
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +30 -125
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.js +38 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js +35 -0
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/FeatureForm/EditableInput.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/TableList/ListItemPanel.js +1 -1
- package/assets/esri/core/workers/chunks/27482132abb939a1cdb7.js +0 -1
- package/assets/esri/core/workers/chunks/335b539893569e3d7b82.js +0 -1
- package/assets/esri/core/workers/chunks/53eaad20c4f55dae21e0.js +0 -1
- package/assets/esri/core/workers/chunks/7c4746f60332620f75c5.js +0 -1
- package/assets/esri/core/workers/chunks/8221f2e540abe1e0f048.js +0 -1
- package/assets/esri/core/workers/chunks/ae156b99e60a2bf940e4.js +0 -1
- package/assets/esri/core/workers/chunks/c054198c6438cb57f188.js +0 -1
- package/assets/esri/core/workers/chunks/c6b08fdc0421258efcf5.js +0 -1
- package/assets/esri/core/workers/chunks/d44e99b4bb1cec6a922b.js +0 -1
- package/assets/esri/core/workers/chunks/e64bc4533405af8554ae.js +0 -1
- package/assets/esri/core/workers/chunks/fd36b7aaf0d8e0c84471.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5026],{8303:(e,t,r)=>{r.d(t,{A:()=>S});var s=r(90237),i=r(92602),n=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),c=r(97768),d=r(74887),p=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),v=r(20655),_=r(80812),b=r(41318),w=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!n.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let o,l;if(i)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?b.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,h.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),n=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),p=r(43937),h=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,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,y.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.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,a.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 l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=s);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(o)}return i}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(l[0]),i=r(l[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,y.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,y.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,y.Bi)(e)?e.rings:e.paths;let o,l;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],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}}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,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}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,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,c.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,p.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,c.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,p.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},38961:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(5503),n=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,s._)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,l.$)("esri.core.CollectionFlattener")],u);const c=u},46140:(e,t,r)=>{r.d(t,{R:()=>i});var s=r(49186);let i=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new s.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[i,n]=t.split("."),o=/^\s*\d+\s*$/;if(!i?.match||!o.test(i))throw new s.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new s.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(i,10),a=parseInt(n,10);return new e(l,a,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var s=r(66131),i=r(49186),n=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,s){const{arcade:n,Dictionary:o}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=n.scriptUsesGeometryEngine(l);a&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,a);const c={vars:s.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},d=n.compileScript(l,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new f(e,n,l,d,t,h,p,o)}constructor(e,t,r,s,i,n,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=s,this._spatialReference=i,this._viewDict=n,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?s.lY.epochToArcadeDate(i,r):s.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=n?null!=r?s.lY.epochToArcadeDate(n,r):s.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const s=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=s.fields,this._boundSchema.fieldsIndex=s,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?s.lY.unknownEpochToArcadeDate(t):s.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},65494:(e,t,r)=>{r.d(t,{L:()=>a,r:()=>o});var s=r(67076),i=r(90360),n=r(41214);function o(e,t){return a(e,null,t)}const l=(0,i.C)({types:n.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new s.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):l(e,t,r):null}},73681:(e,t,r)=>{r.d(t,{n:()=>a});var s=r(49186),i=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new s.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,y);return new a(y,c,h,f)}constructor(e,t,r,s){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=s}get itemNames(){return this._itemNames}evaluate(e,t,r,s){try{return this._reader.bind(e,r,s),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},79465:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var s=r(90237),i=r(5503),n=r(38961),o=r(92071),l=r(74887),a=r(36708),u=r(84952),c=r(10107),d=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),h=r(43937),y=r(5443),f=r(16930),m=r(4146),g=r(63074),v=r(16131),_=r(8303),b=r(54310),w=r(25036),S=r(10873),x=r(65529),F=r(25482),M=r(92474),P=r(799),T=r(56507),A=r(92602),I=r(70333),R=(r(13874),r(78888)),E=r(4718),Z=r(70328),O=r(537);r(65494),r(22671);const k={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function G(e){const t=e.folders||[],r=t.slice(),s=new Map,i=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:i,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,E.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?j(i,l,e.featureSet.features):"esriGeometryPolyline"===r?j(n,l,e.featureSet.features):"esriGeometryPolygon"===r&&j(o,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const i=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);i&&r.push(i)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,E.o8)(s.get("esriGeometryPoint")),e.polylines=(0,E.o8)(s.get("esriGeometryPolyline")),e.polygons=(0,E.o8)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[k[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=$([e])}}));const u=$(r);return{folders:t,sublayers:r,extent:u}}function L(e,t,r,s){const i=I.id?.findCredential(e);e=(0,u.a6)(e,{token:i?.token});const n=A.A.kmlServiceUrl;return(0,R.A)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function C(e,t,r=null,s=[]){const i=[],n={},o=t.sublayers,l=new Set(t.folders.map((e=>e.id)));return o.forEach((t=>{const o=new e;if(r?o.read(t,r):o.read(t),s.length&&l.has(o.id)&&(o.visible=s.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else i.unshift(o)})),i}function j(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function $(e){const t=(0,Z.vt)(Z.qv),r=(0,Z.vt)(Z.qv);for(const s of e){if(s.polygons?.featureSet?.features)for(const e of s.polygons.featureSet.features)(0,O.LJ)(t,e.geometry),(0,Z.RF)(r,t);if(s.polylines?.featureSet?.features)for(const e of s.polylines.featureSet.features)(0,O.LJ)(t,e.geometry),(0,Z.RF)(r,t);if(s.points?.featureSet?.features)for(const e of s.points.featureSet.features)(0,O.LJ)(t,e.geometry),(0,Z.RF)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,O.LJ)(t,e.extent),(0,Z.RF)(r,t)}return(0,Z.aI)(r,Z.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var D;let U=D=class extends(x.A.EventedMixin(F.A.JSONSupportMixin(M.A))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.OH),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.OH),(0,a.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.OH),(0,a.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.OH)])}initialize(){(0,a.C_)((()=>this.networkLink)).then((()=>(0,a.C_)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=$(e.sublayers);this.fullExtent=y.A.fromJSON(t),this.sourceJSON=e;const r=(0,T.dp)(i.A.ofType(D),C(D,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return L(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>G(e.data)))}};(0,s._)([(0,c.MZ)()],U.prototype,"description",void 0),(0,s._)([(0,c.MZ)({type:y.A})],U.prototype,"fullExtent",void 0),(0,s._)([(0,c.MZ)()],U.prototype,"id",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,value:null})],U.prototype,"networkLink",void 0),(0,s._)([(0,c.MZ)({json:{write:{allowNull:!0}}})],U.prototype,"parent",void 0),(0,s._)([(0,c.MZ)({type:i.A.ofType(U),json:{write:{allowNull:!0}}})],U.prototype,"sublayers",void 0),(0,s._)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,P._e)(e)}}})],U.prototype,"title",void 0),(0,s._)([(0,c.MZ)({value:!0})],U.prototype,"visible",null),(0,s._)([(0,d.w)("visible",["visibility"])],U.prototype,"readVisible",null),(0,s._)([(0,c.MZ)()],U.prototype,"sourceJSON",void 0),(0,s._)([(0,c.MZ)()],U.prototype,"layer",void 0),U=D=(0,s._)([(0,p.$)("esri.layers.support.KMLSublayer")],U);const N=U,q=["kml","xml"];let J=class extends((0,g.dM)((0,b.J)((0,w.j)((0,v.q)((0,_.A)((0,o.P)(m.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.OH),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return C(N,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,q)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=G((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:L(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,c.MZ)({readOnly:!0})],J.prototype,"allSublayers",void 0),(0,s._)([(0,c.MZ)({type:f.A})],J.prototype,"outSpatialReference",void 0),(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],J.prototype,"path",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],J.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({type:["KML"]})],J.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({})],J.prototype,"resourceInfo",void 0),(0,s._)([(0,c.MZ)({type:i.A.ofType(N),json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),(0,s._)([(0,d.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],J.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,d.w)("service","sublayers",["sublayers"])],J.prototype,"readSublayers",null),(0,s._)([(0,h.K)("sublayers")],J.prototype,"writeSublayers",null),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],J.prototype,"type",void 0),(0,s._)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],J.prototype,"title",null),(0,s._)([(0,c.MZ)(S.OZ)],J.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],J.prototype,"visibleSublayers",null),(0,s._)([(0,c.MZ)({type:y.A})],J.prototype,"extent",void 0),(0,s._)([(0,c.MZ)()],J.prototype,"fullExtent",null),J=(0,s._)([(0,p.$)("esri.layers.KMLLayer")],J);const H=J},96576:(e,t,r)=>{r.d(t,{A:()=>h});var s,i=r(90237),n=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(92438),c=r(63988),d=r(49849);let p=s=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map((r=>r.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){return this.symbols.reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new s({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,i._)([(0,o.MZ)(d.Wp)],p.prototype,"symbol",void 0),(0,i._)([(0,l.e)({simple:"simple"})],p.prototype,"type",void 0),p=s=(0,i._)([(0,a.$)("esri.renderers.SimpleRenderer")],p);const h=p}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var i,n,o=a(90237),s=a(67996),r=a(5503),l=a(49186),h=a(53966),d=a(91869),c=a(92071),u=a(74887),p=a(36708),y=a(10107),g=(a(44208),a(87811),a(40608)),m=a(35666),f=a(5443),M=a(86738),L=a(82799),b=a(4146),w=a(90708),k=a(15375);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absolute-value";var C=a(80340),T=a(70643),N=a(85342),x=a(69860),v=a(30504),D=a(63074),E=a(16131),_=a(25036),I=a(10873),A=a(8460),S=a(88613);let R=class extends((0,E.q)((0,D.dM)((0,_.j)((0,c.P)(b.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(T.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(T.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new l.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");this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new l.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new C.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,S.fetchKnowledgeGraph)(this.url).then((async i=>{i.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),i.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const n=this.linkChart?.linkChartProperties;if(n?.originIdOf("entitiesUrl")===m.Gr.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await s.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:n?.entitiesUrl,relationshipsUrl:n?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:n?.layoutSettings??void 0,layoutMode:(0,v.k5)(n.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,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){const e=x.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,d.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,u.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):h.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,v.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings}),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,u.Te)(t?.signal)}catch(e){throw(0,u.zf)(e)&&a.length>0&&await this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,d.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,s=new Map,r=new Map,c=new Map,p=new Uint8Array(a.length),y=new Float64Array(a.length),g=new Float64Array(a.length),m=new Float64Array(a.length),b=new Float64Array(a.length),C=new Uint32Array(i.length),T=new Uint32Array(i.length),N=new Float64Array(i.length),x=new Float64Array(i.length),v=[];let D=!1;const E=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let _,I="organic-standard",S=0,R=0;const z=A.i6.apply;switch(I="geographic-organic-standard"===e?"organic-standard":e,I){case"organic-standard":_=A.pM.apply;break;case"organic-community":_=A.Tu.apply;break;case"hierarchical-bottom-to-top":_=A.$C.apply;break;case"radial-root-centric":_=A.vJ.apply;break;case"tree-left-to-right":_=A.Xq.apply;break;default:_=A.Wg.apply}let G=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[k.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?p[S]=A.tx.IsGeographic:p[S]=A.tx.None;const n=t.lockedNodeLocations.get(i.attributes[k.dr]);y[S]=n.x,g[S]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){p[S]=A.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[S]=t?.x,g[S]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;default:p[S]=A.tx.IsMovable}(null==y[S]||null==g[S]||Number.isNaN(y[S])||Number.isNaN(g[S]))&&(p[S]=A.tx.IsMovable,y[S]=0,g[S]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!G&&t?.lockedNodeLocations?.has(i.attributes[k.dr])&&(G=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;m[S]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;b[S]=r?new Date(r).getTime():NaN,y[S]=0,g[S]=0,p[S]=A.tx.IsMovable}else p[S]=A.tx.IsMovable,y[S]=0,g[S]=0;c.set(i.attributes[k.dr],S),v[S]={feature:i,typeName:a},S++})),G&&h.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1;const F=new Map;i.forEach((a=>{const i=a.feature.attributes[k.Cz],o=a.feature.attributes[k.KQ],s=c.get(i),r=c.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,u=l?.endField,p=u?a.feature.attributes[u]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const l=F.get(t),h=l?.has(a.typeName);h||(C[R]=s,T[R]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(N[R]=d?new Date(d).getTime():NaN,x[R]=p?new Date(p).getTime():NaN),void 0===l?F.set(t,new Map([[a.typeName,R]])):l.set(a.typeName,R),R++),n.push(a)}else P=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),P&&h.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");const O=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),U=this._convertValidatedOrganicSettingsToCalculationSettings(O);await(0,A.Hh)();let Z=A.JT.Error,B=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:Z,links:B,graphics:a}=z((()=>t?.signal?.aborted??!1),p,y,g,m,b,C.subarray(0,R),T.subarray(0,R),N.subarray(0,R),x.subarray(0,R),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),Z===A.JT.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:Z,links:B}=_((()=>t?.signal?.aborted??!1),p,y,g,C.subarray(0,R),T.subarray(0,R),U.computationBudgetTime,U.idealEdgeLengthMultiplier,U.repulsionRadiusMultiplier));if((0,u.Te)(t?.signal),Z===A.JT.Error)throw new l.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(Z===A.JT.Canceled)throw(0,u.NK)();for(let e=0;e<v.length;e++){if(g[e]>84.9999?g[e]=84.9999:g[e]<-84.9999&&(g[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),v[e].feature.attributes[k.T1]=new M.A(y[e],g[e]),o.has(v[e].typeName)){const t=o.get(v[e].typeName);t?.set(v[e].feature.attributes[k.dr],v[e].feature)}else{const t=new Map;t.set(v[e].feature.attributes[k.dr],v[e].feature),o.set(v[e].typeName,t)}r.set(v[e].feature.attributes[k.dr],v[e].feature);const t=(0,w.Ux)(v[e].feature.attributes[k.T1]);this.entityLinkChartDiagramLookup.set(v[e].feature.attributes[k.dr],v[e].feature.attributes[k.T1]?t:null);const a=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,v[e].typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(a.members,v[e].feature.attributes[k.dr],(()=>({id:v[e].feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=v[e].feature.attributes[k.T1];const{x:i,y:n}=v[e].feature.attributes[k.T1];if(D)E.xmin=Math.min(E.xmin,i),E.xmax=Math.max(E.xmax,i),E.ymin=Math.min(E.ymin,n),E.ymax=Math.max(E.ymax,n);else{const e=1e-7;E.xmin=i-e,E.xmax=i+e,E.ymin=n-e,E.ymax=n+e,D=!0}}if(this.linkChartExtent.xmin=E.xmin,this.linkChartExtent.xmax=E.xmax,this.linkChartExtent.ymin=E.ymin,this.linkChartExtent.ymax=E.ymax,!B)throw new l.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const j=new Map,Q=new Map,J=new Map,K=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],l=o.feature.attributes[k.Cz],u=o.feature.attributes[k.KQ];let p=l+"-"+u;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;p+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=F.get(p).get(o.typeName),g=0===y?0:B?.vertexEndIndex[y-1];if(!K.has(y)){if(K.add(y),B.types[y]===A.J.Recursive){const e=[B.vertices[2*g],B.vertices[2*g+1]],t=[B.vertices[2*(g+1)],B.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(B.types[y]!==A.J.Regular){h.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<B.vertexEndIndex[y];e++)i.push([B.vertices[2*e],B.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=v[c.get(l)]?.feature.attributes[k.T1],t=v[c.get(u)]?.feature.attributes[k.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);j.has(p)?j.get(p).push(i):j.set(p,[i])}const m=j.get(p);Q.has(p)||(Q.set(p,new Map),J.set(p,new Map));const f=Q.get(p),M=J.get(p);f.has(o.typeName)||(f.set(o.typeName,m.shift()),M.set(o.typeName,0));const b=f.get(o.typeName);M.set(o.typeName,M.get(o.typeName)+1);const C=new L.A({paths:[b]});if(o.feature.attributes[k.T1]=C,s.has(o.typeName)){const e=s.get(o.typeName);e?.set(o.feature.attributes[k.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[k.dr],o.feature),s.set(o.typeName,e)}r.set(o.feature.attributes[k.dr],o.feature);const T=(0,w.Ux)(o.feature.attributes[k.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[k.dr],o.feature.attributes[k.T1]?T:null);const N=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(N.members,o.feature.attributes[k.dr],(()=>({id:o.feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=T}for(const e of n)e.feature.attributes[k.M1]=J.get(e.feature.attributes[k.Cz]+"-"+e.feature.attributes[k.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:o,links:s,idMap:r}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new M.A({x:i.x,y:i.y})))}));return 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 connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[],i=[];for(const t of e)this._graphTypeLookup.has(t.typeName)&&(this.dataManager.sublayerCaches.has(t.typeName)||(this.dataManager.sublayerCaches.set(t.typeName,new Map),a.push(t.typeName)),(0,d.tE)(this.sublayerIdsCache,t.typeName,(()=>new Set)).add(t.id),i.push(t));this.dataManager.addToLayer(i);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a)}}await(0,N.qN)(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const n={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&n.lockedNodeLocations.set(e,new M.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,n)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=m.Gr.PORTAL_ITEM&&e<m.Gr.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),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[k.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[k.KQ]);if(t&&a){const i=(0,w.Ux)(new L.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{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})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n=e=>a(e)&&e>=0,o={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return o;const{computationBudgetTime:s,autoRepulsionRadius:r,repulsionRadiusMultiplier:l,absoluteIdealEdgeLength:d,multiplicativeIdealEdgeLength:c,idealEdgeLengthType:u}=t;return(e=>a(e)&&e>=1)(s)?o.computationBudgetTime=s:s&&h.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),o.autoRepulsionRadius=r,!r&&(e=>a(e)&&e>=1)(l)?o.repulsionRadiusMultiplier=l:r||(o.autoRepulsionRadius=!0,h.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(i).includes(e))(u)?o.idealEdgeLengthType=u:void 0!==u&&h.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===u&&n(d)?o.absoluteIdealEdgeLength=d:"absolute-value"===u&&void 0!==d?h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===u&&n(c)?o.multiplicativeIdealEdgeLength=c:"multiplier"===u&&void 0!==c&&h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),o}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===i.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),a=new Set((e.entityTypes??[]).map((e=>e.name))),i=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName))));this.setAtOrigin("layers",e,(0,m.OL)(this.originIdOf("layers")))}else this.layers=new r.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(h.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,o._)([(0,y.MZ)(I.OZ)],R.prototype,"url",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"membershipModified",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataManager",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,o._)([(0,y.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,o._)([(0,y.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,o._)([(0,y.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"linkChartExtent",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,o._)([(0,y.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,o._)([(0,g.$)("esri.layers.LinkChartLayer")],R);const z=R}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8111],{6518:(t,e,i)=>{i.d(e,{F:()=>h});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class h{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,s.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((i,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},36708:(t,e,i)=>{i.d(e,{C_:()=>u,OH:()=>f,Vh:()=>g,on:()=>c,pc:()=>x,wB:()=>a,z7:()=>l});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),h=i(14012);function a(t,e,i={}){return d(t,e,i,_)}function l(t,e,i={}){return d(t,e,i,m)}function d(t,e,i={},s){let n=null;const o=i.once?(t,i)=>{s(t)&&((0,r.xt)(n),e(t,i))}:(t,i)=>{s(t)&&e(t,i)};if(n=(0,h.Cn)(t,o,i.sync,i.equals),i.initial){const e=t();o(e,e)}return n}function c(t,e,i,o={}){let h=null,l=null,d=null;function c(){h&&l&&(l.remove(),o.onListenerRemove?.(h),h=null,l=null)}function u(t){o.once&&o.once&&(0,r.xt)(d),i(t)}const _=a(t,((t,i)=>{c(),(0,s.wb)(t)&&(h=t,l=(0,s.on)(t,e,u),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return d=(0,n.hA)((()=>{_.remove(),c()})),d}function u(t,e){return function(t,e,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=t();if(e?.(s))return Promise.resolve(s);let h=null;function a(){h=(0,r.xt)(h)}return new Promise(((s,r)=>{h=(0,n.vE)([(0,o.u7)(i,(()=>{a(),r((0,o.NK)())})),d(t,(t=>{a(),s(t)}),{sync:!1,once:!0},e??_)])}))}(t,m,e)}function _(t){return!0}function m(t){return!!t}i(80559);const f={sync:!0},g={initial:!0},x={sync:!0,initial:!0}},37730:(t,e,i)=>{i.d(e,{T:()=>n});var s=i(43334);const n={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new s.Om(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)}},58376:(t,e,i)=>{i.d(e,{J:()=>m});var s=i(4718),n=i(74887),r=i(65864),o=i(17136),h=i(21325),a=i(31464),l=i(68298),d=i(8384),c=i(58727),u=i(62798),_=i(62660);async function m(t,e,i){const m=(0,n.Mq)(i),{point:f,distance:g,returnEdge:x,vertexMode:y}=e;if(!x&&"none"===y)return{candidates:[]};let p=(0,s.o8)(e.query);p=await t.schedule((()=>(0,c.T2)(p,t.definitionExpression,t.spatialReference)),m),p=await t.reschedule((()=>(0,u.B4)(p,{availableFields:t.availableFields,fieldsIndex:t.fieldsIndex,geometryType:t.geometryType,spatialReference:t.spatialReference})),m);const b=!(0,h.aI)(f.spatialReference,t.spatialReference);b&&await(0,a.Nk)(f.spatialReference,t.spatialReference);const B="number"==typeof g?g:g.x,M="number"==typeof g?g:g.y,z={xmin:f.x-B,xmax:f.x+B,ymin:f.y-M,ymax:f.y+M,spatialReference:f.spatialReference},v=b?(0,a.Cv)(z,t.spatialReference):z;if(!v)return{candidates:[]};const I=(await(0,o.el)((0,r.rS)(f),null,{signal:m}))[0],S=(await(0,o.el)((0,r.rS)(v),null,{signal:m}))[0];if(null==I||null==S)return{candidates:[]};const w=new d.G(await t.reschedule((()=>t.searchFeatures((0,l.ux)(S.toJSON()))),m),p,t);await t.reschedule((()=>t.executeObjectIdsQuery(w)),m),await t.reschedule((()=>t.executeTimeQuery(w)),m),await t.reschedule((()=>t.executeAttributesQuery(w)),m),await t.reschedule((()=>async function(t,e,i){const{query:s}=e,{spatialRel:n}=s;if(!e?.items?.length||!s.geometry||!n)return;const r=await(0,_.xt)(n,s.geometry,t.geometryType,t.hasZ,t.hasM),o=await t.runSpatialFilter(e.items,(t=>r(t.geometry)),i);e.items=o}(t,w,m)),m);const Y=I.toJSON(),R=b?(0,a.Cv)(Y,t.spatialReference):Y,X=b?Math.max(v.xmax-v.xmin,v.ymax-v.ymin)/2:g;return w.createSnappingResponse({...e,point:R,distance:X},p.returnZ,f.spatialReference)}},66344:(t,e,i)=>{var s,n;i.d(e,{q:()=>a}),(n=s||(s={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class r{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const i=this._db.get(t.id+e);return i?.size??0}put(t,e,i,n,r){e=t.id+e;const h=this._db.get(e);if(h&&(this._size-=h.size,t.size-=h.size,this._db.delete(e),h.entry!==i&&this._notifyRemove(e,h.entry,h.size,s.ALL)),n>this._maxSize)return void this._notifyRemove(e,i,n,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,i,0,s.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(e,new o(i,n,a)),this._size+=n,t.size+=n,this._checkSize()}updateSize(t,e,i,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===i){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,i,n,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSize()}}pop(t,e){e=t.id+e;const i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;const i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){const i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=new Array;this._db.forEach(((t,s)=>{const n=t.lifetime;i[n]=(i[n]||0)+t.size,this._users.forEach((i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=e[r]||0;e[r]=i+t.size}}))}));const s={};this._users.forEach((t=>{const i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[i]||0;e[i]=n,s[i]=Math.round(100*t.hitRate)+"%"}else s[i]="0%"}));const n=Object.keys(e);n.sort(((t,i)=>e[i]-e[t])),n.forEach((i=>t[i]=Math.round(e[i]/2**20)+"MB / "+s[i]));for(let e=i.length-1;e>=0;--e){const s=i[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,s){const n=this._users.get(t.split(h)[0])?.removeFunc,r=n?.(e,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach(((t,e)=>this._checkSizeLimits(t,e))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const i=e??this;if(i.size<=t)return;const s=e?.id;let n=!0;for(;n;){n=!1;for(const[r,o]of this._db)if(0===o.lifetime&&(!s||r.startsWith(s))){const s=e??this._users.get(r.split(h)[0]);if(this._purgeItem(r,o,s),i.size<=.9*t)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=e??this._users.get(n.split(h)[0]);if(this._purgeItem(n,r,s),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);const n=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class o{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const h=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69540:(t,e,i)=>{i.d(e,{A:()=>u});var s=i(90237),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),h=i(35666),a=i(88620),l=i(40608);const d=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,s={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),l=o.clonable;if(o.readOnly||!1===l||a!==h.Gr.USER&&a!==h.Gr.DEFAULTS&&a!==h.Gr.WEB_MAP&&a!==h.Gr.WEB_SCENE)continue;const d=this[t];let c=null;c="function"==typeof l?l(d):"reference"===l?d:(0,r.TU)(d),null!=d&&null==c||(a===h.Gr.DEFAULTS?n.set(t,c):s[t]=c)}const l=new(0,Object.getPrototypeOf(this).constructor)(s);if(n.size){const t=(0,a.oY)(l)?.store;if(t)for(const[e,i]of n)t.set(e,i,h.Gr.DEFAULTS)}return l}};return e=(0,s._)([(0,l.$)("esri.core.Clonable")],e),e};let c=class extends(d(n.A)){};c=(0,s._)([(0,l.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=d;const u=c},75503:(t,e,i)=>{i.d(e,{E:()=>I,w:()=>h});var s=i(4576),n=i(21818),r=(i(44208),i(3694)),o=i(11006);class h{constructor(t=9,e){this._compareMinX=u,this._compareMinY=_,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),B.prune(),M.prune(),z.prune(),v.prune()}all(t){a(this._data,t)}search(t,e){let i=this._data;const s=this._toBBox;if(p(t,i))for(B.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;p(t,o)&&(i.leaf?e(r):y(t,o)?a(r,e):B.push(r))}i=B.pop()}}collides(t){let e=this._data;const i=this._toBBox;if(!p(t,e))return!1;for(B.clear();e;){for(let s=0,n=e.children.length;s<n;s++){const n=e.children[s],r=e.leaf?i(n):n;if(p(t,r)){if(e.leaf||y(t,r))return!0;B.push(n)}}e=B.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new w([]),this}remove(t){if(!t)return this;let e,i=this._data,r=null,o=0,h=!1;const a=this._toBBox(t);for(z.clear(),v.clear();i||z.length>0;){if(i||(i=z.pop(),r=z.data[z.length-1],o=v.pop()??0,h=!0),i.leaf&&(e=(0,s.qh)(i.children,(0,n.zI)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),z.push(i),this._condense(z),this;h||i.leaf||!y(i,a)?r?(o++,i=r.children[o],h=!1):i=null:(z.push(i),v.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,s){const n=i-e+1;let r=this._maxEntries;if(n<=r){const s=new w(t.slice(e,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new Y([]);o.height=s;const h=Math.ceil(n/r),a=h*Math.ceil(Math.sqrt(r));b(t,e,i,a,this._compareMinX);for(let n=e;n<=i;n+=a){const e=Math.min(n+a-1,i);b(t,n,e,h,this._compareMinY);for(let i=n;i<=e;i+=h){const n=Math.min(i+h-1,e);o.children.push(this._build(t,i,n,s-1))}}return l(o,this._toBBox),o}_insert(t,e,i){const s=this._toBBox,n=i?t:s(t);z.clear();const r=function(t,e,i,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],h=m(o),a=g(t,o)-h;a<n?(n=a,s=h<s?h:s,i=o):a===n&&h<s&&(s=h,i=o)}e=i||e.children[0]}return e}(n,this._data,e,z);for(r.children.push(t),c(r,n);e>=0&&z.data[e].children.length>this._maxEntries;)this._split(z,e),e--;!function(t,e,i){for(let s=i;s>=0;s--)c(e.data[s],t)}(n,z,e)}_split(t,e){const i=t.data[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),h=i.leaf?new w(o):new Y(o);h.height=i.height,l(i,this._toBBox),l(h,this._toBBox),e?t.data[e-1].children.push(h):this._splitRoot(i,h)}_splitRoot(t,e){this._data=new Y([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let s,n,r;s=n=1/0;for(let o=e;o<=i-e;o++){const e=d(t,0,o,this._toBBox),h=d(t,o,i,this._toBBox),a=x(e,h),l=m(e)+m(h);a<s?(s=a,r=o,n=l<n?l:n):a===s&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(t,e,i){const s=t.leaf?this._compareMinX:u,n=t.leaf?this._compareMinY:_;this._allDistMargin(t,e,i,s)<this._allDistMargin(t,e,i,n)&&t.children.sort(s)}_allDistMargin(t,e,i,s){t.children.sort(s);const n=this._toBBox,r=d(t,0,e,n),o=d(t,i-e,i,n);let h=f(r)+f(o);for(let s=e;s<i-e;s++){const e=t.children[s];c(r,t.leaf?n(e):e),h+=f(r)}for(let s=i-e-1;s>=e;s--){const e=t.children[s];c(o,t.leaf?n(e):e),h+=f(o)}return h}_condense(t){for(let e=t.length-1;e>=0;e--){const i=t.data[e];if(0===i.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let i=t;for(M.clear();i;){if(!0===i.leaf)for(const t of i.children)e((0,n.zI)(t));else M.pushArray(i.children);i=M.pop()??null}}function l(t,e){d(t,0,t.children.length,e,t)}function d(t,e,i,s,n){n||(n=new w([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<i;o++)r=t.children[o],c(n,t.leaf?s(r):r);return n}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function _(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function x(t,e){const i=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function b(t,e,i,s,n){const r=[e,i];for(;r.length;){const e=r.pop(),i=r.pop();if(e-i<=s)continue;const h=i+Math.ceil((e-i)/s/2)*s;(0,o.q)(t,h,i,e,n),r.push(i,h,h,e)}}const B=new r.A,M=new r.A,z=new r.A,v=new r.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class w extends S{constructor(t){super(),this.children=t,this.leaf=!0}}class Y extends S{constructor(t){super(),this.children=t,this.leaf=!1}}},83221:(t,e,i)=>{i.d(e,{A:()=>m});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),h=i(70328),a=i(19419),l=i(90708),d=i(6518),c=i(51441),u=i(37730);const _=(0,h.vt)();class m{constructor(t){this.geometryInfo=t,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.A,this.featureAdapter=u.T}get usedMemory(){return this._usedMemory}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 t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,i,s,n]=this.fullBounds;return{xmin:e,ymin:i,xmax:s,ymax:n,spatialReference:(0,c.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}upsertMany(t){const e=t.map((t=>this._upsert(t)));return this._emitChanged(),e.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const i of t){const t=this._boundsStore.get(i.objectId);t&&e((0,h.Jt)(_,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t}));const i=this._featuresById.get(e);let s;if(i?(t.displayId=i.displayId,s=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);s=(0,l.jQ)(null!=s?s:(0,a.vt)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(e,s),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0}_upsert(t){const e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;const i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=t;for(const t in r)i.attributes[t]=r[t];return s&&(i.geometry=s,this._boundsStore.set(e,(0,l.jQ)((0,a.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{8303:(e,t,r)=>{r.d(t,{A:()=>_});var n=r(90237),i=r(92602),s=r(70333),l=r(78888),a=r(60999),o=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),m=r(10107),y=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),x=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,c.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,x.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,c.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,n._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),i=r(69540),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,n._)([(0,u.$)("esri.time.TimeInterval")],d);const c=d},33446:(e,t,r)=>{r.d(t,{C:()=>l,m:()=>s});var n=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(l),a}},38458:(e,t,r)=>{r.d(t,{m:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},38961:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(5503),s=r(36708),l=r(10107),a=r(40608),o=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh()),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n._)([(0,a.$)("esri.core.CollectionFlattener")],u);const p=u},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ee});var n=r(90237),i=r(92602),s=r(52106),l=r(13874),a=r(78888),o=r(5503),u=r(38961),p=r(49186),d=r(66552),c=r(4718),m=r(92071),y=r(74887),h=r(36708),f=r(84952),g=r(10107),v=r(56507),w=r(36005),b=r(40608),x=r(43937),_=r(49422),I=r(5443),M=r(16930),E=r(83960),S=r(21325),A=r(4146),T=r(63074),F=r(16131),N=r(8303),O=r(54310),P=r(25036),U=r(82935),Z=r(38458),R=r(60694),L=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,g.MZ)()],$.prototype,"layer",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,n._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,n._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,q=r(33446),B=r(4902),D=r(79901);let k=0,V=H=class extends(B.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.OH),(0,h.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.OH)])}get id(){return this._get("id")??k++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,v.dp)(o.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({type:I.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,n._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,n._)([(0,w.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,n._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,n._)([(0,D.w)("sublayers")],V.prototype,"castSublayers",null),(0,n._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,n._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,n._)([(0,b.$)("esri.layers.support.WMSSublayer")],V);const W=V;var G=r(4576),X=r(96285);const J={84:4326,83:4269,27:4267};function K(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=ee("Capability",r),i=ee("Service",r),s=n&&ee("Request",n);if(!n||!i||!s)return null;const l=ee("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=re("Title",i,"")||re("Name",i,""),u=re("AccessConstraints",i,""),d=/^none$/i.test(u)?"":u,c=re("Abstract",i,""),m=parseInt(re("MaxWidth",i,"5000"),10),y=parseInt(re("MaxHeight",i,"5000"),10),h=se(s,"GetMap"),f=ie(s,"GetMap"),g=ae(l,a,t);if(!g)return null;let v,w=0;const b=Array.prototype.slice.call(n.childNodes),x=g.sublayers??[],_=e=>{null!=e&&x.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===w?v=e:1===w?(g.name&&(g.name="",_(ae(v,a,t))),_(ae(e,a,t))):_(ae(e,a,t)),w++)}));const I=g.sublayers??[],M=g.fullExtents??[];0===I.length&&I.push(g),g.extent??=I[0].extent;const E=g.spatialReferences.length>0?g.spatialReferences:Q(g),S=ie(s,"GetFeatureInfo"),A=S?se(s,"GetFeatureInfo"):null,T=z(I),F=g.minScale||0,N=g.maxScale||0,O=g.dimensions??[],P=T.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),U=O.concat(P).filter(ue);let Z=null;if(U.length){const e=U.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(G.Ru);Z={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:d,description:c,dimensions:O,extent:g.extent,fullExtents:M,featureInfoFormats:A,featureInfoUrl:S,mapUrl:f,maxWidth:m,maxHeight:y,maxScale:N,minScale:F,layers:T,spatialReferences:E,supportedImageFormatTypes:h,timeInfo:Z,title:o,version:a}}function Q(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=Q(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(oe(n)&&n.nodeName===e)return n}return null}function te(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];oe(i)&&i.nodeName===e&&r.push(i)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ne(e,t,r){const n=parseFloat(e.getAttribute("minx")??"0"),i=parseFloat(e.getAttribute("miny")??"0"),s=parseFloat(e.getAttribute("maxx")??"0"),l=parseFloat(e.getAttribute("maxy")??"0");return{xmin:r?isNaN(i)?-Number.MAX_VALUE:i:isNaN(n)?-Number.MAX_VALUE:n,ymin:r?isNaN(n)?-Number.MAX_VALUE:n:isNaN(i)?-Number.MAX_VALUE:i,xmax:r?isNaN(l)?Number.MAX_VALUE:l:isNaN(s)?Number.MAX_VALUE:s,ymax:r?isNaN(s)?Number.MAX_VALUE:s:isNaN(l)?Number.MAX_VALUE:l,spatialReference:{wkid:t}}}function ie(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const n=ee("OnlineResource",r);return n?Y("xlink:href",n,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],n=(0,f.An)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(G.Ru);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function le(e,t,r){const n=ee(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function ae(e,t,r){if(!e)return null;const n=e.getAttribute("queryable")?.toLowerCase(),i="1"===n||"true"===n,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:i,spatialReferences:[],sublayers:null},l=ee("LatLonBoundingBox",e),a=ee("EX_GeographicBoundingBox",e),o=l?ne(l,4326):a?{xmin:parseFloat(re("westBoundLongitude",a,"0")),ymin:parseFloat(re("southBoundLatitude",a,"0")),xmax:parseFloat(re("eastBoundLongitude",a,"0")),ymax:parseFloat(re("northBoundLatitude",a,"0")),spatialReference:{wkid:4326}}:{xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};s.minScale=le(e,"MaxScaleDenominator",0),s.maxScale=le(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u),n=r?.indexOf(":");if(n&&n>-1){let i=parseInt(r.slice(n+1),10);0===i||isNaN(i)||(i=J[i]??i);const l="1.3.0"===t?ne(e,i,(0,Z.m)(i)):ne(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,n]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(n,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const n=ae(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=o,s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==Y("default",e,"0"),a="0"!==Y("nearestValue",e,"0"),o="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:de(n),unitSymbol:i,default:de(s),multipleValues:l,nearestValue:a}})),s}function oe(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(G.Ru):r.map((e=>parseFloat(e)))}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(G.Ru):r}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:me(t[0]),max:me(t[1]),resolution:t.length>=3&&"0"!==t[2]?ye(t[2]):void 0}})).filter(G.Ru):r.map((e=>me(e)))}function me(e){return X.c9.fromISO(e,{zone:X.mQ.utcInstance}).toJSDate()}function ye(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const ve=new Set([102100,3857,102113,900913]),we=new Set([3395,54004]),be=new d.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function xe(e){return"text/html"===e}function _e(e){return"text/plain"===e}let Ie=class extends((0,T.dM)((0,U.e)((0,O.J)((0,P.j)((0,F.q)((0,N.A)((0,m.P)(A.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(xe)??this.featureInfoFormats.find(_e)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(xe(e)||_e(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Me(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Me(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,f.a6)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,E.X_)({extent:e,width:t})*i,l=new $({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ve.has(r)?t.find((e=>ve.has(e)))||t.find((e=>we.has(e)))||102100:r)}(d,this.spatialReferences),m="1.3.0"===this.version&&(0,Z.m)(c)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,y=l.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:m,[h]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal};return(0,a.A)(i??"",o).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=ge(n?.timeExtent),o={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal},{data:u}=await(0,a.A)(i,o);return(0,q.m)(u,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,E.X_)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,S.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=encodeURI((0,f.yM)(e)),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.A({title:this.title,content:t}),n=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=K(n)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=i.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Me(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new W;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.A),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"allSublayers",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customParameters",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],Ie.prototype,"customLayerParameters",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:!0}})],Ie.prototype,"copyright",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],Ie.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Ie.prototype,"fullExtent",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"fullExtent",["extent"])],Ie.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,x.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Ie.prototype,"writeFullExtent",null),(0,n._)([(0,g.MZ)({type:[I.A]})],Ie.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoFormat",null),(0,n._)([(0,g.MZ)({type:[String],readOnly:!0})],Ie.prototype,"featureInfoFormats",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"featureInfoUrl",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:be.jsonValues,read:{reader:be.read,source:"format"},write:{writer:be.write,target:"format"}}}}})],Ie.prototype,"imageFormat",void 0),(0,n._)([(0,w.w)("imageFormat",["supportedImageFormatTypes"])],Ie.prototype,"readImageFormat",null),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Ie.prototype,"imageMaxHeight",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Ie.prototype,"imageMaxWidth",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"imageTransparency",void 0),(0,n._)([(0,g.MZ)(L.fV)],Ie.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)({type:["show","hide","hide-children"]})],Ie.prototype,"listMode",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"mapUrl",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ie.prototype,"isReference",void 0),(0,n._)([(0,g.MZ)({type:["WMS"]})],Ie.prototype,"operationalLayerType",void 0),(0,n._)([(0,g.MZ)()],Ie.prototype,"resourceInfo",void 0),(0,n._)([(0,g.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Ie.prototype,"spatialReference",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Ie.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,g.MZ)({type:[v.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Ie.prototype,"spatialReferences",void 0),(0,n._)([(0,x.K)(["web-document","portal-item"],"spatialReferences")],Ie.prototype,"writeSpatialReferences",null),(0,n._)([(0,g.MZ)({type:o.A.ofType(W),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Ie.prototype,"sublayers",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Ie.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,w.w)("service","sublayers",["layers"])],Ie.prototype,"readSublayers",null),(0,n._)([(0,x.K)("sublayers",{layers:{type:[W]},visibleLayers:{type:[String]}})],Ie.prototype,"writeSublayers",null),(0,n._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Ie.prototype,"type",void 0),(0,n._)([(0,g.MZ)(L.OZ)],Ie.prototype,"url",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Ie.prototype,"version",void 0),Ie=(0,n._)([(0,b.$)("esri.layers.WMSLayer")],Ie);const Ee=Ie},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(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})},79677:(e,t,r)=>{r.d(t,{A:()=>m});var n,i=r(90237),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),d=r(98623);let c=class extends s.A{static{n=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,e,t));let i=this.end;if(i){const r=(0,l.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;return i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==l||null==a||isNaN(l)||isNaN(a)?n.empty:new n({start:l===-1/0?null:new Date(l),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:a}=this;return null!=s&&(i.start=(0,l.S1)(s,e,t,r)),null!=a&&(i.end=(0,l.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.$)("esri.time.TimeExtent")],c);const m=c,y=new c,h=new c({start:void 0,end:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>y});var n=r(90237),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),a=r(89317),o=r(30524),u=r(96184),p=r(73133),d=r(79677),c=r(10184);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=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 n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new c.A({value:n,unit:i}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,i.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,r)=>{r.d(t,{X_:()=>l,oW:()=>o,zx:()=>a});var n=r(34727),i=r(83047);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*l*i.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function o(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),i=r(69540),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),p=r(79677),d=r(10184),c=r(56400);function m(e,t){return d.A.fromJSON({value:e,unit:t})}let y=class extends(i.A.ClonableMixin(s.A)){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,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,n._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,n._)([(0,l.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,n._)([(0,l.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,n._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,n._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,n._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,n._)([(0,o.$)("esri.layers.support.TimeInfo")],y);const h=y}}]);
|