@arcgis/core 5.0.0-next.8 → 5.0.0-next.9

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.
Files changed (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
  3. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  4. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  5. package/assets/esri/core/workers/chunks/{b708792c84620b73c847.js → 21293b0c6405a10ec7b6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a876d6159ca120c1567e.js → 28d1f2cf6aae547615c3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
  8. package/assets/esri/core/workers/chunks/31b6406960261da21dd4.js +1 -0
  9. package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{59d3cac32ad6dad941dc.js → 35c9b24e4430bd6c2b6b.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  12. package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d88f2fe680b8d5603ef8.js → 5350d50b47b6a4e0e169.js} +1 -1
  14. package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
  15. package/assets/esri/core/workers/chunks/{aff8e40a641c6822af1d.js → 5db37547963857295273.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3afb83f5de033dda89ec.js → 604777417722d4effe06.js} +1 -1
  17. package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
  18. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  19. package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  20. package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
  21. package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
  22. package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
  23. package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
  24. package/assets/esri/core/workers/chunks/{2a8dff8521e1e6a10cf6.js → 89b748e064ca90b4f76a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{fef45bc59c71f88c60b5.js → 8d9d3797c6d62fdfff9d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  29. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  30. package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b0365cbc3d2a41969e3b.js → b7eb486354994dc70855.js} +1 -1
  32. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
  33. package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
  34. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  35. package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
  36. package/assets/esri/core/workers/chunks/{20975513be0a3a1da286.js → d1ca7c3a32ce00ed8b81.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  39. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  40. package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
  41. package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
  42. package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{05429f9d292a7a714309.js → ebcc94234d9d4be1941f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  45. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  46. package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
  47. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  48. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  49. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  50. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  51. package/assets/esri/themes/dark/main.css +1 -1
  52. package/assets/esri/themes/light/main.css +1 -1
  53. package/assets/esri/themes/light/view.css +1 -1
  54. package/config.js +1 -1
  55. package/form/FormTemplate.js +1 -1
  56. package/form/elements/Element.js +1 -1
  57. package/form/elements/FieldElement.js +1 -1
  58. package/form/elements/GroupElement.js +1 -1
  59. package/interfaces.d.ts +25 -23
  60. package/kernel.js +1 -1
  61. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  62. package/layers/knowledgeGraph/layerUtils.js +1 -1
  63. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  64. package/layers/support/RasterJobHandler.js +1 -1
  65. package/layers/support/RasterWorker.js +1 -1
  66. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  67. package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
  68. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  69. package/package.json +2 -2
  70. package/smartMapping/renderers/size.js +1 -1
  71. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  72. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  73. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  74. package/smartMapping/support/adapters/support/utils.js +1 -1
  75. package/support/revision.js +1 -1
  76. package/symbols/support/utils.js +1 -1
  77. package/views/3d/GroundView3D.js +1 -1
  78. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  80. package/views/support/PromiseQueue.js +1 -1
  81. package/views/support/Scheduler.js +1 -1
  82. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  83. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  84. package/widgets/Editor/EditorViewModel.js +1 -1
  85. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  86. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  87. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  88. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  89. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  90. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  91. package/widgets/Editor/UpdateWorkflow.js +1 -1
  92. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  93. package/widgets/Editor/support/SketchController.js +1 -1
  94. package/widgets/Editor/support/errors.js +5 -0
  95. package/widgets/Editor/workflowUtils.js +1 -1
  96. package/widgets/Editor.js +1 -1
  97. package/widgets/Legend/LegendViewModel.js +1 -1
  98. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  99. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  100. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  101. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  102. package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
  103. package/assets/esri/core/workers/chunks/1d15d1b20dc10fde6def.js +0 -1
  104. package/assets/esri/core/workers/chunks/28020063048e644f17a5.js +0 -1
  105. package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +0 -1
  106. package/assets/esri/core/workers/chunks/38cc18fd93c18815ded0.js +0 -1
  107. package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
  108. package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +0 -1
  109. package/assets/esri/core/workers/chunks/63a6f3e70d2b6ea57e40.js +0 -1
  110. package/assets/esri/core/workers/chunks/695cdef5057e5461078a.js +0 -1
  111. package/assets/esri/core/workers/chunks/6bb7dbc46787b8e34bd9.js +0 -1
  112. package/assets/esri/core/workers/chunks/6ee2f0f708494102a493.js +0 -1
  113. package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +0 -1
  114. package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +0 -1
  115. package/assets/esri/core/workers/chunks/a31635a6366347dcef0f.js +0 -1
  116. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  117. package/assets/esri/core/workers/chunks/afc13d5b842275db7dbc.js +0 -1
  118. package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +0 -1
  119. package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
  120. package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
  121. package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +0 -1
  122. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  123. package/assets/esri/core/workers/chunks/ebf23b46db56aaa88841.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561],{4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(31635),s=r(43773),o=r(49186),n=r(65529),l=r(4902),a=r(92474),p=r(53966),u=r(74887),d=r(84952),c=r(10107),y=(r(44208),r(87811),r(64108)),h=r(5443),g=r(16930),f=r(92602),m=r(79677);let v=0,b=class extends((0,n.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw p.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||p.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:h.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,y.$)("esri.layers.Layer")],b)},4902:(e,t,r)=>{r.d(t,{s:()=>n});var i=r(31635),s=r(64108);let o=0;const n=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return r=(0,i.Cg)([(0,s.$)("esri.core.Identifiable")],r),r};n(class{})},16215:(e,t,r)=>{r.d(t,{S:()=>s,Y:()=>i});const i=Symbol("BasemapInstance");function s(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>n});var i=r(37330);const s=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],n=new i.I({whiteList:s,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(o.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),s=r(69622),o=r(4576),n=r(60999),l=r(7762),a=r(16494),p=r(10107),u=(r(44208),r(53966),r(64108)),d=r(30524),c=r(43668);const y=/<br\s*\/*>/gi;let h=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,c.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,s=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,p=l&&n;t.forEach(t=>{const u=t.getObjectId()??t.attributes[e.objectIdField];let d=p?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r?.removeHTML&&(d=a.Nd.sanitize(d).replaceAll(y," ")),i.set(u,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const s=await e.queryFeatures(i);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"displayField",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"requiredFields",null),h=(0,i.Cg)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,s=r(31635),o=r(52106),n=r(66552),l=r(25482),a=r(4718),p=r(10107),u=(r(44208),r(53966),r(36005)),d=r(64108),c=r(43937),y=r(16930),h=r(65864),g=r(50498),f=r(20437);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}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 i(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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.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:[i,s],scale:[o,n]}=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 p=this._getHydrationFunction(e,e=>e*o+i,e=>s-e*n,l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=o.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(n)}return s}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o: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 i=(0,h.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,h.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,p.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s.Cg)([(0,u.w)("features")],v.prototype,"readFeatures",null),(0,s.Cg)([(0,p.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,s.Cg)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s.Cg)([(0,p.MZ)({types:g.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,u.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s.Cg)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],u)},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var i=r(31635),s=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(64108)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const s=new l.A;return s.read(i,r),[s]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const o=e.find(e=>!!e.field);o&&(0,s.sM)(r,[o.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(p)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),s=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(64108),p=r(43937),u=r(80451),d=r(29005);let c=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureType")],c)},37352:(e,t,r)=>{r.d(t,{A:()=>p});var i,s=r(31635),o=r(7762),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));let p=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"floorField",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,s.Cg)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p)},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,a.$)("esri.layers.support.Relationship")],d)},52106:(e,t,r)=>{r.d(t,{A:()=>C});var i,s=r(31635),o=r(37838),n=r(69540),l=r(51447),a=r(25482),p=r(53966),u=r(36708),d=r(24326),c=r(10107),y=(r(44208),r(87811),r(64108)),h=r(12195),g=r(65864),f=r(50498),m=r(55156),v=r(60950),b=r(54339),w=r(33910);function M(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let C=class extends((0,n.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:M(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,u.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,g.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],C.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,c.MZ)({value:null})],C.prototype,"attributes",null),(0,s.Cg)([(0,c.MZ)({value:null,types:f.yR,json:{read:g.rS}})],C.prototype,"geometry",null),(0,s.Cg)([(0,c.MZ)({type:Boolean})],C.prototype,"isAggregate",void 0),(0,s.Cg)([(0,c.MZ)({clonable:!1})],C.prototype,"layer",void 0),(0,s.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"origin",void 0),(0,s.Cg)([(0,c.MZ)({type:o.A,value:null})],C.prototype,"popupTemplate",null),(0,s.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,c.MZ)({value:null,types:w.Es})],C.prototype,"symbol",null),(0,s.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],C.prototype,"_version",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,value:!0})],C.prototype,"visible",null),C=i=(0,s.Cg)([(0,y.$)("esri.Graphic")],C)},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(31635),s=r(10107),o=(r(44208),r(53966),r(87811),r(64108));const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>s,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&i in t?e[i]:void 0;var t}},77548:(e,t,r)=>{r.d(t,{Gh:()=>f,tk:()=>c,BR:()=>d,wI:()=>u,G$:()=>h,$x:()=>y,Ov:()=>l,W_:()=>a,OP:()=>g,TU:()=>n,XX:()=>o,jy:()=>p});var i=r(70333),s=r(43773);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function n(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function p(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const n=`${e.slice(0,o)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,s.A)(n,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function y(e,t){return null}function h(e){return null}function g(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function f(e,t){if(!t||!g(e))return;const r=(e.url,null);r&&(e.url=r)}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var i,s=r(31635),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new o.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,s.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],u)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561],{4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(31635),o=r(43773),s=r(49186),n=r(65529),l=r(4902),a=r(92474),p=r(53966),u=r(74887),d=r(84952),c=r(10107),y=(r(44208),r(87811),r(64108)),h=r(5443),g=r(16930),f=r(92602),m=r(79677);let v=0,b=class extends((0,n.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||f.A.portalUrl;throw p.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||p.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:h.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,y.$)("esri.layers.Layer")],b)},4902:(e,t,r)=>{r.d(t,{s:()=>n});var i=r(31635),o=r(64108);let s=0;const n=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,o.$)("esri.core.Identifiable")],r),r};n(class{})},16215:(e,t,r)=>{r.d(t,{S:()=>o,Y:()=>i});const i=Symbol("BasemapInstance");function o(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>n});var i=r(37330);const o=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],n=new i.I({whiteList:o,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),o=r(69622),s=r(4576),n=r(60999),l=r(7762),a=r(16494),p=r(10107),u=(r(44208),r(53966),r(64108)),d=r(30524),c=r(43668);const y=/<br\s*\/*>/gi;let h=class extends o.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,c.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,o=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,p=l&&n;t.forEach(t=>{const u=t.getObjectId()??t.attributes[e.objectIdField];let d=p?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,o).global,layer:e,text:l}):"";r?.removeHTML&&(d=a.Nd.sanitize(d).replaceAll(y," ")),i.set(u,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const o=await e.queryFeatures(i);if(o?.features.length===t.length)return o.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],o={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{o[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...o};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"displayField",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,p.MZ)()],h.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],h.prototype,"requiredFields",null),h=(0,i.Cg)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,o=r(31635),s=r(52106),n=r(66552),l=r(25482),a=r(4718),p=r(10107),u=(r(44208),r(53966),r(36005)),d=r(64108),c=r(43937),y=r(16930),h=r(65864),g=r(50498),f=r(20437);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}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 i(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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.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:[i,o],scale:[s,n]}=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 p=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*n,l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=r.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(l[0]),o=r(l[1]),s.push([i,o])}return s.length>0?s: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 i=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,u.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:g.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,u.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),o=r(69540),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],u)},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var i=r(31635),o=r(93637),s=r(10107),n=(r(44208),r(53966),r(87811),r(64108)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const o=new l.A;return o.read(i,r),[o]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,o.sM)(r,[s.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(p)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),o=r(69540),s=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(64108),p=r(43937),u=r(80451),d=r(29005);let c=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureType")],c)},37352:(e,t,r)=>{r.d(t,{A:()=>p});var i,o=r(31635),s=r(7762),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));let p=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"floorField",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,o.Cg)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p)},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),o=r(69540),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,a.$)("esri.layers.support.Relationship")],d)},52106:(e,t,r)=>{r.d(t,{A:()=>C});var i,o=r(31635),s=r(37838),n=r(69540),l=r(51447),a=r(25482),p=r(53966),u=r(36708),d=r(24326),c=r(10107),y=(r(44208),r(87811),r(64108)),h=r(12195),g=r(65864),f=r(50498),m=r(55156),v=r(60950),b=r(54339),w=r(33910);function M(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let C=class extends((0,n.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:M(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,u.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,o.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,g.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],C.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,c.MZ)({value:null})],C.prototype,"attributes",null),(0,o.Cg)([(0,c.MZ)({value:null,types:f.yR,json:{read:g.rS}})],C.prototype,"geometry",null),(0,o.Cg)([(0,c.MZ)({type:Boolean})],C.prototype,"isAggregate",void 0),(0,o.Cg)([(0,c.MZ)({clonable:!1})],C.prototype,"layer",void 0),(0,o.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"origin",void 0),(0,o.Cg)([(0,c.MZ)({type:s.A,value:null})],C.prototype,"popupTemplate",null),(0,o.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,c.MZ)({value:null,types:w.Es})],C.prototype,"symbol",null),(0,o.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],C.prototype,"_version",void 0),(0,o.Cg)([(0,c.MZ)({type:Boolean,value:!0})],C.prototype,"visible",null),C=i=(0,o.Cg)([(0,y.$)("esri.Graphic")],C)},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(31635),o=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>o,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}},77548:(e,t,r)=>{r.d(t,{Gh:()=>m,tk:()=>y,BR:()=>c,wI:()=>d,G$:()=>g,$x:()=>h,Ov:()=>a,UC:()=>s,W_:()=>p,OP:()=>f,TU:()=>l,XX:()=>n,jy:()=>u});var i=r(70333),o=r(43773);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function p(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,o.A)(n,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function y(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function g(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!f(e))return;const r=(e.url,null);r&&(e.url=r)}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var i,o=r(31635),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(64108));const p=new s.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,o.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],u)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,9933],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(6673),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(1437)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(1197)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(9708),r.e(6647),r.e(893),r.e(8628),r.e(2593),r.e(9279),r.e(1874)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(3508),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(3508),r.e(9953),r.e(4802),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9247)]).then(r.bind(r,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(5890)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(893),r.e(6673),r.e(3356),r.e(6699),r.e(4971)]).then(r.bind(r,84123))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(6673),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(9718)]).then(r.bind(r,19718))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(2515),r.e(132)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(9240),r.e(2515),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(3463),r.e(8948),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(3463),r.e(8948),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(8999)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(3463),r.e(744)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(3444),r.e(9203)]).then(r.bind(r,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(5971),r.e(3549),r.e(3106)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2712)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9361),r.e(9644)]).then(r.bind(r,9352))).default,PointCloudLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6673),r.e(9240),r.e(7984),r.e(873)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(979)]).then(r.bind(r,64185))).default,SceneLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(6673),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(1713)]).then(r.bind(r,36969))).default,StreamLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(9708),r.e(6647),r.e(9645)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(4802),r.e(7048),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(3508),r.e(3910),r.e(5323),r.e(8303),r.e(957),r.e(3444),r.e(2274)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(3508),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(9240),r.e(3081)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(5369)]).then(r.bind(r,88854))).default,WFSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2848)]).then(r.bind(r,47314))).default}},8947:(e,a,r)=>{r.d(a,{L:()=>y});var t=r(60999),n=r(74887),i=r(67076);async function y(e,a,r){const y=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(y&&"unique-value"===y.type&&y.styleOrigin){const l=await(0,t.Ke)(y.populateFromStyle());if((0,n.Te)(r),!1===l.ok){const r=l.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},23154:(e,a,r)=>{r.d(a,{K:()=>d,Q:()=>y});var t=r(77548),n=r(24183);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function y(e,a){const{loadContext:r,...i}=a||{},y=r?await r.fetchServiceMetadata(e,i):await(0,n.V)(e,i),l=(0,t.G$)();L(y),o(y);const s={serviceJSON:y,preferredHost:l};if((y.currentVersion??0)<10.5)return s;const c=`${(0,t.$x)()??e}/layers`,u=r?await r.fetchServiceMetadata(c,i):await(0,n.V)(c,i);return L(u),o(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function l(e){const{type:a}=e;return!!a&&i.has(a)}function s(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(l),e.tables=e.tables?.filter(s)}function c(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function L(e){e.layers?.forEach(c),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(43773);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}},75356:(e,a,r)=>{r.d(a,{N:()=>M,populateOperationalLayers:()=>c});var t=r(7762),n=(r(44208),r(22429)),i=r(4513),y=r(80812);function l(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var s=r(45613),o=r(8947);async function c(e,a,r){if(!a)return;const t=a.map(e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new y.default({id:a.itemId,portal:r?.portal}),e.when(()=>{const t=t=>{const n=t.layerId;A(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)}))}(t,a,r.context):T(a)&&await async function(e,a,r){const t=i.S.FeatureLayer,n=await t(),y=a.featureCollection,l=y?.showLegend,s=y?.layers?.map((t,i)=>{const y=new n;y.read(t,r);const s={...r,ignoreDefaults:!0};return A(y,e,a,i,s),null!=l&&y.read({showLegend:l},s),y});e.layers.addMany(s??[])}(t,a,r.context)),await(0,o.L)(t,r.context),t}(await b(e,a),e,a)}(e,r)),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},L={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},S={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},p={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},h={...p,LinkChartLayer:"LinkChartLayer"},g={...m},I={...w};async function b(e,a){const r=a.context,t=G(r);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const c=t[o];let u=c?i.S[c]:i.S.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new y.default({id:e.itemId,portal:a});await r.load();const t=(await(0,s.n)(r,new n.v)).className||"UnknownLayer";u=i.S[t]}}else"ArcGISFeatureLayer"===o?function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e)?u=i.S.MapNotesLayer:function(e){return l(e,"route")}(e)?u=i.S.RouteLayer:T(e)&&(u=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.S.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(u=i.S.UnsupportedLayer);return u()}function T(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function G(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":a=f;break;case"basemap-ground-layers":a=S;break;case"ground":a=L;break;case"tables":a=d;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":a=I;break;case"tables":a=g;break;default:a=h}break;default:switch(e.layerContainerType){case"basemap-base-layers":a=w;break;case"tables":a=m;break;default:a=p}}return a}async function M(e,a,r){const n=new t.A,i=c(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function A(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},92009:(e,a,r)=>{r.d(a,{L:()=>c});var t=r(70333),n=r(43773),i=r(49186),y=r(74887),l=r(60694),s=r(20655),o=r(80812);async function c(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-url","Invalid scene service url");const c={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(c.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,y.QP)(e)}return null}(e);null!=i&&(r.portal=new s.A({url:i}));try{return await r.load({signal:e.signal})}catch(e){return(0,y.QP)(e),null}}(c),null==c.sceneLayerItem)return L(c.sceneServerUrl.replace("/SceneServer","/FeatureServer"),c);const d=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new o.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,y.QP)(e),null}}(c);if(!d?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");c.featureServiceItem=d;const f=await L(d.url,c);return f.portalItem=d,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function L(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,y=a.layerId;if(null==y)return{serverUrl:t};const s=u(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,c=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,L=e=>{const r={query:{f:"json",...c},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},d=L("anonymous").catch(()=>L("no-prompt")),[f,S]=await Promise.all([d,s]),p=S?.layers,m=f.data&&f.data.layers;if(!Array.isArray(m))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,m.length);e++)if(p[e].id===y)return{serverUrl:t,layerId:m[e].id}}else if(null!=y&&y<m.length)return{serverUrl:t,layerId:m[y].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,9801],{17136:(e,t,r)=>{r.d(t,{Y_:()=>v,O7:()=>N,el:()=>I});var n=r(92602),s=r(69052),o=r(49186),i=r(53966),c=r(39829),a=r(82799),u=r(16930),l=r(80754),h=r(21325),f=r(28735),d=r(43773),g=r(65864),y=r(2272),m=r(84952),p=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function S(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof c.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new o.A("internal:geometry",e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],o=e[n][1],i=e[n+1][0],c=e[n+1][1],a=Math.sqrt((i-s)*(i-s)+(c-o)*(c-o)),u=(c-o)/a,l=(i-s)/a,h=a/t;if(h>1){for(let e=1;e<=h-1;e++){const n=e*t,i=l*n+s,c=u*n+o;r.push([i,c])}const e=(a+Math.floor(h-1)*t)/2,n=l*e+s,i=u*e+o;r.push([n,i])}r.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new c.A({rings:n,spatialReference:e.spatialReference}):new a.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,f.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function k(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],o=t.geometries[n],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(s===r){if(_(e))for(const t of(0,l.r8)(o))e[s]=e[s].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[s]=e[s].addPath(t)}else r=s,e[s]=o}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,i,u,_,b,N,M,v,F=0;const x=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,i=(0,h.Vp)(o),u=o.isWebMercator,N=u?102100:4326,_=l.j7[N].maxX,b=l.j7[N].minX,M=l.j7[N].plus180Line,v=l.j7[N].minus180Line),i)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(A(t.clone(),_,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>A(e,_,b)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);R.push(e.rings?new c.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,b)*(2*_);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(M)&&o!==_?(F=o>F?o:F,n=S(n,u),x.push(n),R.push("cut")):e.intersects(v)&&s!==b?(F=o*(2*_)>F?o*(2*_):F,n=S(n,u,360),x.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let T=(0,l.kd)(F,_),C=-90;const P=T,q=new a.A;for(;T>0;){const e=360*T-180;q.addPath([[e,C],[e,-1*C]]),C*=-1,T--}if(x.length>0&&P>0){const t=k(x,await async function(e,t,r,n){const s=(0,y.Dl)(e),o=t[0].spatialReference,i={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},c=await(0,d.A)(s.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=c.data;return{cutIndexes:a,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=o,t})}}(s,x,q,r)),n=[],o=[];for(let r=0;r<R.length;r++){const s=R[r];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(n.push(s),o.push("simplify")):o.push(u?(0,f.Gh)(s):s)}}if(!n.length)return o;const i=await async function(e,t,r){const n="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,g.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,h.YX)(s),geometries:JSON.stringify((0,p.X)(t))}},{data:c}=await(0,d.A)(n.path+"/simplify",i);return(0,p.V)(c.geometries,o,s)}(s,n,r),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(u?(0,f.Gh)(i.shift()):i.shift())}return c}const L=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)L.push(t);else{const e=x.shift();L.push(!0===u?(0,f.Gh)(e):e)}}return L}function N(e,t,r){const n=(0,h.Vp)(r);if(null==n)return e;const[s,o]=n.valid,i=2*o;let c=0,a=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<s&&(c=-Math.ceil(Math.abs(t-s)/i)),e>o?a=Math.ceil(Math.abs(e-o)/i):e<s&&(a=-Math.ceil(Math.abs(e-s)/i));let u=e+(c-a)*i;const l=u-t;return l>o?u-=i:l<s&&(u+=i),u}function M(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new s.hr(r,n)}const v=M(u.A.WGS84);M(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(92722);function s(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:s,hasZ:o,hasM:a}=e,u=new n.A([],[],o,!1),l=u.coords,h=[],f=o?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let d=0;for(const e of t){const t=i(f,r,d,e,o,a);t&&h.push(t),d+=e*s}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,o&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<f[0]||l[0]>f[1]||l[1]<f[2]||l[1]>f[3]||o&&(l[2]<f[4]||l[2]>f[5]))&&(l.length=0)}if(!l.length){const n=e.lengths[0]?c(r,0,t[0],o,a):null;if(!n)return null;l[0]=n[0],l[1]=n[1],o&&(l[2]=n[2]??0)}return u}function i(e,t,r,n,o,i){const c=s(o,i);let a=r,u=r+c,l=0,h=0,f=0,d=0,g=0;for(let r=0,s=n-1;r<s;r++,a+=c,u+=c){const r=t[a],n=t[a+1],s=t[a+2],i=t[u],c=t[u+1],y=t[u+2];let m=r*c-i*n;d+=m,l+=(r+i)*m,h+=(n+c)*m,o&&(m=r*y-i*s,f+=(s+y)*m,g+=m),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),g>0&&(g*=-1),!d)return null;const y=[l,h,.5*d];return o&&(y[3]=f,y[4]=.5*g),y}function c(e,t,r,n,o){const i=s(n,o);let c=t,f=t+i,d=0,g=0,y=0,m=0;for(let t=0,s=r-1;t<s;t++,c+=i,f+=i){const t=e[c],r=e[c+1],s=e[c+2],o=e[f],i=e[f+1],p=e[f+2],w=n?u(t,r,s,o,i,p):a(t,r,o,i);if(w)if(d+=w,n){const e=h(t,r,s,o,i,p);g+=w*e[0],y+=w*e[1],m+=w*e[2]}else{const e=l(t,r,o,i);g+=w*e[0],y+=w*e[1]}}return d>0?n?[g/d,y/d,m/d]:[g/d,y/d]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,n){const s=r-e,o=n-t;return Math.sqrt(s*s+o*o)}function u(e,t,r,n,s,o){const i=n-e,c=s-t,a=o-r;return Math.sqrt(i*i+c*c+a*a)}function l(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function h(e,t,r,n,s,o){return[e+.5*(n-e),t+.5*(s-t),r+.5*(o-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>k});var n=r(31635),s=r(43773),o=r(49186),i=r(53966),c=r(74887),a=r(84952),u=(r(44208),r(87811),r(64108)),l=r(16930),h=r(65864),f=r(10107),d=r(62815),g=r(65529);let y=class extends g.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new o.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,n.Cg)([(0,f.MZ)({readOnly:!0})],y.prototype,"connectionError",null),y=(0,n.Cg)([(0,u.$)("esri.layers.support.StreamConnection")],y);let m=class extends y{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,d.N)(t,n,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,a.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){const s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new o.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new o.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,c.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new o.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const n=new WebSocket(e);n.onopen=()=>{if(n.onopen=null,this.destroyed)return n.onclose=null,void n.close();n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n)},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,c.Tw)(),n=t.onmessage,{filter:s,outFields:a,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch(e){}c&&"object"==typeof c||(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),c.spatialReference?.wkid!==u?.wkid&&(i.A.getLogger(this).error(new o.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==c.format&&(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),s&&c.filter!==s&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set filter, but server doesn't support it")),a&&c.outFields!==a&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:s,outFields:a,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,n.Cg)([(0,f.MZ)()],m.prototype,"connectionStatus",null),(0,n.Cg)([(0,f.MZ)()],m.prototype,"errorString",void 0),m=(0,n.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],m);var p=r(80893),w=r(61956);const _={maxQueryDepth:5,maxRecordCountFactor:3};let b=class extends m{constructor(e){super({..._,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,s.A)(e.path,{query:t,responseType:"json"}),n=(await r).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){const r=e[0],{urls:n,token:s}=r,o=this._inferWebSocketBaseUrl(n);return(0,a.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:s})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new o.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let s=!1;const a=(0,c.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),a.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,a.resolve())},r.send(n),setTimeout(()=>{s||(this.destroyed||this._websocket!==r||i.A.getLogger(this).error(new o.A("geoevent-connection","Server timed out when setting filter")),a.reject())},1e4),a.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new o.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:s,geometry:c}=n;for(const t in s)e.attributes[t]=s[t];return c&&(e.geometry=c),e.geometry||e.centroid||i.A.getLogger(this).error(new o.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;const s=await n;if(!s)return;for(const e of s.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:n}=await t.load(),s=n.query.supportsMaxRecordCountFactor,o=n.query.supportsPagination,i=n.query.supportsCentroid,c=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,u=s?a*c:a,h=new w.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),i&&(h.returnCentroid=!0),s&&(h.maxRecordCountFactor=c),o)return h.num=u,t.destroy(),this._queryPages(e,h);const f=await(0,p.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),f}async _queryPages(e,t,r=[],n=0){t.start=null!=t.num?n*t.num:null;const s=await(0,p.eW)(e,t,this._config.sourceSpatialReference);return s.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(s.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>s.features.push(e)),s)}_addRelatedFeatures(e){const t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};b=(0,n.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],b);let S=class extends y{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,d.N)(t,n,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function A(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function k(e,t,r,n,s,o,i,c,a){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:n,filter:A(s,o),maxReconnectionAttempts:i,maxReconnectionInterval:c,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new m(u):new b(u):new S(u)}(0,n.Cg)([(0,f.MZ)()],S.prototype,"connectionStatus",void 0),(0,n.Cg)([(0,f.MZ)()],S.prototype,"errorString",void 0),S=(0,n.Cg)([(0,u.$)("esri.layers.support.ClientSideConnection")],S)},43334:(e,t,r)=>{r.d(t,{N3:()=>c,Om:()=>i});var n=r(69397),s=r(27647),o=r(92722);class i{constructor(e=null,t={},r,n,s=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=s}static fromJSON(e){const t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new i(t,e.attributes,r,n)}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new i(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function c(e){return!!e.geometry?.coords?.length}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var n=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},69052:(e,t,r)=>{r.d(t,{hr:()=>s,ie:()=>a,uC:()=>c});var n=r(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,n,s=0,o=!1){return(n-=s)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),o&&n===r&&(n=t),n+s}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const c=new s(0,2*Math.PI),a=(new s(-Math.PI,Math.PI),new s(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>c,RS:()=>o,ez:()=>f,lM:()=>i,qK:()=>h});var n=r(34275);function s(e){return 32+e.length}const o=16;function i(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function c(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=f;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?c(e):h;case"string":return s(e);case"number":return o;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,o):0:0),0)}function l(e,t){return f+e.length*t}const h=32,f=16,d=145},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>a,kd:()=>c,r8:()=>u});var n=r(82799),s=r(16930),o=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>s});var n=r(65864);function s(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,r){const s=(0,n.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){const o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){const r=n*(t+i),c=this.coords[r],a=this.coords[r+1];e+=-.5*(c-s)*(a+o),s=c,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;const{stride:s}=this;for(const e of r){for(let r=1;r<e;r++){const e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const{stride:t,size:r}=this,n=r*t,o=this.coords.slice(0,n);return e?(e.set(o),new s(this.lengths,e)):new s(Array.from(this.lengths),Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,9801],{17136:(e,t,r)=>{r.d(t,{Y_:()=>v,O7:()=>N,el:()=>I});var n=r(92602),s=r(69052),o=r(49186),i=r(53966),c=r(39829),a=r(82799),u=r(16930),l=r(80754),h=r(21325),f=r(28735),d=r(43773),g=r(65864),y=r(2272),m=r(84952),p=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function S(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof c.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new o.A("internal:geometry",e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],o=e[n][1],i=e[n+1][0],c=e[n+1][1],a=Math.sqrt((i-s)*(i-s)+(c-o)*(c-o)),u=(c-o)/a,l=(i-s)/a,h=a/t;if(h>1){for(let e=1;e<=h-1;e++){const n=e*t,i=l*n+s,c=u*n+o;r.push([i,c])}const e=(a+Math.floor(h-1)*t)/2,n=l*e+s,i=u*e+o;r.push([n,i])}r.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new c.A({rings:n,spatialReference:e.spatialReference}):new a.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,f.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function k(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],o=t.geometries[n],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(s===r){if(_(e))for(const t of(0,l.r8)(o))e[s]=e[s].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[s]=e[s].addPath(t)}else r=s,e[s]=o}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,i,u,_,b,N,M,v,F=0;const x=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,i=(0,h.Vp)(o),u=o.isWebMercator,N=u?102100:4326,_=l.j7[N].maxX,b=l.j7[N].minX,M=l.j7[N].plus180Line,v=l.j7[N].minus180Line),i)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(A(t.clone(),_,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>A(e,_,b)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);R.push(e.rings?new c.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,b)*(2*_);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(M)&&o!==_?(F=o>F?o:F,n=S(n,u),x.push(n),R.push("cut")):e.intersects(v)&&s!==b?(F=o*(2*_)>F?o*(2*_):F,n=S(n,u,360),x.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let T=(0,l.kd)(F,_),C=-90;const P=T,q=new a.A;for(;T>0;){const e=360*T-180;q.addPath([[e,C],[e,-1*C]]),C*=-1,T--}if(x.length>0&&P>0){const t=k(x,await async function(e,t,r,n){const s=(0,y.Dl)(e),o=t[0].spatialReference,i={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},c=await(0,d.A)(s.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=c.data;return{cutIndexes:a,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=o,t})}}(s,x,q,r)),n=[],o=[];for(let r=0;r<R.length;r++){const s=R[r];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(n.push(s),o.push("simplify")):o.push(u?(0,f.Gh)(s):s)}}if(!n.length)return o;const i=await async function(e,t,r){const n="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,g.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,h.YX)(s),geometries:JSON.stringify((0,p.X)(t))}},{data:c}=await(0,d.A)(n.path+"/simplify",i);return(0,p.V)(c.geometries,o,s)}(s,n,r),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(u?(0,f.Gh)(i.shift()):i.shift())}return c}const L=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)L.push(t);else{const e=x.shift();L.push(!0===u?(0,f.Gh)(e):e)}}return L}function N(e,t,r){const n=(0,h.Vp)(r);if(null==n)return e;const[s,o]=n.valid,i=2*o;let c=0,a=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<s&&(c=-Math.ceil(Math.abs(t-s)/i)),e>o?a=Math.ceil(Math.abs(e-o)/i):e<s&&(a=-Math.ceil(Math.abs(e-s)/i));let u=e+(c-a)*i;const l=u-t;return l>o?u-=i:l<s&&(u+=i),u}function M(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new s.hr(r,n)}const v=M(u.A.WGS84);M(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(92722);function s(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:s,hasZ:o,hasM:a}=e,u=new n.A([],[],o,!1),l=u.coords,h=[],f=o?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let d=0;for(const e of t){const t=i(f,r,d,e,o,a);t&&h.push(t),d+=e*s}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,o&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<f[0]||l[0]>f[1]||l[1]<f[2]||l[1]>f[3]||o&&(l[2]<f[4]||l[2]>f[5]))&&(l.length=0)}if(!l.length){const n=e.lengths[0]?c(r,0,t[0],o,a):null;if(!n)return null;l[0]=n[0],l[1]=n[1],o&&(l[2]=n[2]??0)}return u}function i(e,t,r,n,o,i){const c=s(o,i);let a=r,u=r+c,l=0,h=0,f=0,d=0,g=0;for(let r=0,s=n-1;r<s;r++,a+=c,u+=c){const r=t[a],n=t[a+1],s=t[a+2],i=t[u],c=t[u+1],y=t[u+2];let m=r*c-i*n;d+=m,l+=(r+i)*m,h+=(n+c)*m,o&&(m=r*y-i*s,f+=(s+y)*m,g+=m),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),g>0&&(g*=-1),!d)return null;const y=[l,h,.5*d];return o&&(y[3]=f,y[4]=.5*g),y}function c(e,t,r,n,o){const i=s(n,o);let c=t,f=t+i,d=0,g=0,y=0,m=0;for(let t=0,s=r-1;t<s;t++,c+=i,f+=i){const t=e[c],r=e[c+1],s=e[c+2],o=e[f],i=e[f+1],p=e[f+2],w=n?u(t,r,s,o,i,p):a(t,r,o,i);if(w)if(d+=w,n){const e=h(t,r,s,o,i,p);g+=w*e[0],y+=w*e[1],m+=w*e[2]}else{const e=l(t,r,o,i);g+=w*e[0],y+=w*e[1]}}return d>0?n?[g/d,y/d,m/d]:[g/d,y/d]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,n){const s=r-e,o=n-t;return Math.sqrt(s*s+o*o)}function u(e,t,r,n,s,o){const i=n-e,c=s-t,a=o-r;return Math.sqrt(i*i+c*c+a*a)}function l(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function h(e,t,r,n,s,o){return[e+.5*(n-e),t+.5*(s-t),r+.5*(o-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>k});var n=r(31635),s=r(43773),o=r(49186),i=r(53966),c=r(74887),a=r(84952),u=(r(44208),r(87811),r(64108)),l=r(16930),h=r(65864),f=r(10107),d=r(62815),g=r(65529);let y=class extends g.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new o.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,n.Cg)([(0,f.MZ)({readOnly:!0})],y.prototype,"connectionError",null),y=(0,n.Cg)([(0,u.$)("esri.layers.support.StreamConnection")],y);let m=class extends y{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,d.N)(t,n,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,a.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){const s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new o.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new o.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,c.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new o.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const n=new WebSocket(e);n.onopen=()=>{if(n.onopen=null,this.destroyed)return n.onclose=null,void n.close();n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n)},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,c.Tw)(),n=t.onmessage,{filter:s,outFields:a,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch(e){}c&&"object"==typeof c||(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),c.spatialReference?.wkid!==u?.wkid&&(i.A.getLogger(this).error(new o.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==c.format&&(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),s&&c.filter!==s&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set filter, but server doesn't support it")),a&&c.outFields!==a&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:s,outFields:a,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,n.Cg)([(0,f.MZ)()],m.prototype,"connectionStatus",null),(0,n.Cg)([(0,f.MZ)()],m.prototype,"errorString",void 0),m=(0,n.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],m);var p=r(80893),w=r(61956);const _={maxQueryDepth:5,maxRecordCountFactor:3};let b=class extends m{constructor(e){super({..._,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,s.A)(e.path,{query:t,responseType:"json"}),n=(await r).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){const r=e[0],{urls:n,token:s}=r,o=this._inferWebSocketBaseUrl(n);return(0,a.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:s})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new o.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let s=!1;const a=(0,c.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),a.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,a.resolve())},r.send(n),setTimeout(()=>{s||(this.destroyed||this._websocket!==r||i.A.getLogger(this).error(new o.A("geoevent-connection","Server timed out when setting filter")),a.reject())},1e4),a.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new o.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:s,geometry:c}=n;for(const t in s)e.attributes[t]=s[t];return c&&(e.geometry=c),e.geometry||e.centroid||i.A.getLogger(this).error(new o.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;const s=await n;if(!s)return;for(const e of s.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:n}=await t.load(),s=n.query.supportsMaxRecordCountFactor,o=n.query.supportsPagination,i=n.query.supportsCentroid,c=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,u=s?a*c:a,h=new w.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),i&&(h.returnCentroid=!0),s&&(h.maxRecordCountFactor=c),o)return h.num=u,t.destroy(),this._queryPages(e,h);const f=await(0,p.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),f}async _queryPages(e,t,r=[],n=0){t.start=null!=t.num?n*t.num:null;const s=await(0,p.eW)(e,t,this._config.sourceSpatialReference);return s.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(s.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>s.features.push(e)),s)}_addRelatedFeatures(e){const t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};b=(0,n.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],b);let S=class extends y{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,d.N)(t,n,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function A(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function k(e,t,r,n,s,o,i,c,a){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:n,filter:A(s,o),maxReconnectionAttempts:i,maxReconnectionInterval:c,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new m(u):new b(u):new S(u)}(0,n.Cg)([(0,f.MZ)()],S.prototype,"connectionStatus",void 0),(0,n.Cg)([(0,f.MZ)()],S.prototype,"errorString",void 0),S=(0,n.Cg)([(0,u.$)("esri.layers.support.ClientSideConnection")],S)},43334:(e,t,r)=>{r.d(t,{N3:()=>c,Om:()=>i});var n=r(69397),s=r(27647),o=r(92722);class i{constructor(e=null,t={},r,n,s=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=s}static fromJSON(e){const t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new i(t,e.attributes,r,n)}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new i(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function c(e){return!!e.geometry?.coords?.length}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var n=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},69052:(e,t,r)=>{r.d(t,{hr:()=>s,ie:()=>a,uC:()=>c});var n=r(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,n,s=0,o=!1){return(n-=s)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),o&&n===r&&(n=t),n+s}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const c=new s(0,2*Math.PI),a=(new s(-Math.PI,Math.PI),new s(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>c,RS:()=>o,ez:()=>f,lM:()=>i,qK:()=>h});var n=r(34275);function s(e){return 32+e.length}const o=16;function i(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function c(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=f;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?c(e):h;case"string":return s(e);case"number":return o;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,o):0:0),0)}function l(e,t){return f+e.length*t}const h=32,f=16,d=145},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>a,kd:()=>c,r8:()=>u});var n=r(82799),s=r(16930),o=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>s});var n=r(65864);function s(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,r){const s=(0,n.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){const o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){const r=n*(t+i),c=this.coords[r],a=this.coords[r+1];e+=-.5*(c-s)*(a+o),s=c,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;const{stride:s}=this;for(const e of r){for(let r=1;r<e;r++){const e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const{stride:t,size:r}=this,n=r*t,o=this.coords.slice(0,n);return e?(e.set(o),new s(this.lengths,e)):new s(Array.from(this.lengths),Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3548,7548,7694],{4146:(e,t,r)=>{r.d(t,{A:()=>v});var i=r(31635),n=r(43773),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(10107),h=(r(44208),r(87811),r(64108)),f=r(5443),y=r(16930),m=r(92602),g=r(79677);let w=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+w++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],v)},6797:(e,t,r)=>{r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),f=c(e);if(f&&o.has(f)&&h.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=a(e)&&a(t);for(const i of h){const n=u(e,i),s=u(t,i);let o;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=y?y.diff[i]=o:y={type:"partial",diff:{[i]:o}})}}return y}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>a,W5:()=>o});var i=r(37330);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(31635),n=r(69622),s=r(4576),o=r(60999),a=r(7762),l=r(16494),u=r(10107),c=(r(44208),r(53966),r(64108)),d=r(30524),p=r(43668);const h=/<br\s*\/*>/gi;let f=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)(()=>(0,p.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,u=a&&o;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:a}):"";r?.removeHTML&&(d=l.Nd.sanitize(d).replaceAll(h," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"requiredFields",null),f=(0,i.Cg)([(0,c.$)("esri.layers.support.TitleCreator")],f)},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureTemplate")],c)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>f,XJ:()=>y,lc:()=>h,mX:()=>w,rU:()=>g,tH:()=>_});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return _(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let t=b.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(64108)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(64108),u=r(43937),c=r(80451),d=r(29005);let p=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],p)},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(7762),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));let u=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n.Cg)([(0,l.$)("esri.layers.support.LayerFloorInfo")],u)},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(64108);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,l.$)("esri.layers.support.Relationship")],d)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=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 i.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[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>f});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=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 y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(a,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 y(e,s,a,d,t,h,p,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,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:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):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 i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,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,a.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}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}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)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}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}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.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&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,a.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,f);return new l(f,c,h,y)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.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 a.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||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>m,tk:()=>p,BR:()=>d,wI:()=>c,G$:()=>f,$x:()=>h,Ov:()=>a,W_:()=>l,OP:()=>y,TU:()=>o,XX:()=>s,jy:()=>u});var i=r(70333),n=r(43773);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function c(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function f(e){return null}function y(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!y(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(64108),c=r(43937),d=r(98623);let p=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return f}static fromArray(e){return new i({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(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({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,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.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,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}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 h.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 i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const h=new p,f=new p({start:void 0,end:void 0})},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],c)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3548,7548,7694],{4146:(e,t,r)=>{r.d(t,{A:()=>v});var i=r(31635),n=r(43773),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(10107),h=(r(44208),r(87811),r(64108)),f=r(5443),y=r(16930),m=r(92602),g=r(79677);let w=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+w++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],v)},6797:(e,t,r)=>{r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),f=c(e);if(f&&o.has(f)&&h.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=a(e)&&a(t);for(const i of h){const n=u(e,i),s=u(t,i);let o;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=y?y.diff[i]=o:y={type:"partial",diff:{[i]:o}})}}return y}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>a,W5:()=>o});var i=r(37330);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(31635),n=r(69622),s=r(4576),o=r(60999),a=r(7762),l=r(16494),u=r(10107),c=(r(44208),r(53966),r(64108)),d=r(30524),p=r(43668);const h=/<br\s*\/*>/gi;let f=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)(()=>(0,p.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,u=a&&o;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:a}):"";r?.removeHTML&&(d=l.Nd.sanitize(d).replaceAll(h," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,d.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,d.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],f.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],f.prototype,"requiredFields",null),f=(0,i.Cg)([(0,c.$)("esri.layers.support.TitleCreator")],f)},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureTemplate")],c)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>f,XJ:()=>y,lc:()=>h,mX:()=>w,rU:()=>g,tH:()=>_});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return _(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let t=b.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(64108)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(64108),u=r(43937),c=r(80451),d=r(29005);let p=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],p)},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(7762),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));let u=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n.Cg)([(0,l.$)("esri.layers.support.LayerFloorInfo")],u)},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(64108);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,l.$)("esri.layers.support.Relationship")],d)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=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 i.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[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>f});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=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 y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(a,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 y(e,s,a,d,t,h,p,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,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:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):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 i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,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,a.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}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}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)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}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}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.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&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,a.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,f);return new l(f,c,h,y)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.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 a.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||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>h,BR:()=>p,wI:()=>d,G$:()=>y,$x:()=>f,Ov:()=>l,UC:()=>s,W_:()=>u,OP:()=>m,TU:()=>a,XX:()=>o,jy:()=>c});var i=r(70333),n=r(43773);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function u(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function p(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function f(e,t){return null}function y(e){return null}function m(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!m(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(64108),c=r(43937),d=r(98623);let p=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return f}static fromArray(e){return new i({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(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({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,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.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,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}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 h.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 i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const h=new p,f=new p({start:void 0,end:void 0})},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(64108));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],c)}}]);