@arcgis/core 4.27.0-next.20230516 → 4.27.0-next.20230518
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03dba2a2bbc363369a0f.js +1 -0
- package/assets/esri/core/workers/chunks/12714d64a0154688072e.js +1 -0
- package/assets/esri/core/workers/chunks/{a507135977d83aea4421.js → 1827a3da6b5b9272ffe1.js} +1 -1
- package/assets/esri/core/workers/chunks/1edc5c06874cb12c5478.js +1 -0
- package/assets/esri/core/workers/chunks/{395ef46b635f9e9a5643.js → 20e8e18e4bd2fd5da47c.js} +1 -1
- package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +1 -0
- package/assets/esri/core/workers/chunks/{15dda462b979e90b58fe.js → 3cebdd77a8401495097f.js} +1 -1
- package/assets/esri/core/workers/chunks/3eb75b6c3c4b3aea2325.js +1 -0
- package/assets/esri/core/workers/chunks/48cb634255e39711a720.js +1 -0
- package/assets/esri/core/workers/chunks/4d5f71d84c85f45c97ea.js +1 -0
- package/assets/esri/core/workers/chunks/55ca6ba8b40921025181.js +2 -0
- package/assets/esri/core/workers/chunks/{ef141014ed21a7fd1ff3.js.LICENSE.txt → 55ca6ba8b40921025181.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/6312783626bacf52df7a.js +1 -0
- package/assets/esri/core/workers/chunks/{a3822a97701890c12d63.js → 6b3b277a21de7c434717.js} +1 -1
- package/assets/esri/core/workers/chunks/6d80f81bf6ad97a7e69e.js +1 -0
- package/assets/esri/core/workers/chunks/887a630c5c980c5028e1.js +1 -0
- package/assets/esri/core/workers/chunks/{522660da4589739a70c3.js → c7fb48ea5d907883bcce.js} +1 -1
- package/assets/esri/core/workers/chunks/d0ff968e42116f592065.js +1 -0
- package/assets/esri/core/workers/chunks/{fdf64f23529a22c79fbd.js → d52c920acf08c95277c3.js} +19 -19
- package/assets/esri/core/workers/chunks/d64c271c173797d98286.js +1 -0
- package/assets/esri/core/workers/chunks/e1b2076d0040fcb7d864.js +1 -0
- package/assets/esri/core/workers/chunks/e3397036e060dac3b4d5.js +1 -0
- package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +1 -0
- package/assets/esri/core/workers/chunks/f3f6035a17f7dcd19675.js +1 -0
- package/assets/esri/core/workers/chunks/{bff317b08e91414f6edc.js → f720967ba8c5486a26a2.js} +1 -1
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +20 -11
- package/assets/esri/themes/base/widgets/_Editor.scss +0 -9
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +4 -2
- package/assets/esri/themes/base/widgets/_ItemList.scss +0 -49
- package/assets/esri/themes/base/widgets/_ValuePicker.scss +27 -10
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/HUDMaterial.glsl.js +22 -22
- package/chunks/HeatmapDensity.glsl.js +5 -5
- package/chunks/LineMarker.glsl.js +35 -35
- package/chunks/RibbonLine.glsl.js +47 -47
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/core/Queue.js +1 -1
- package/core/a11yUtils.js +5 -0
- package/interfaces.d.ts +769 -25
- package/intl/date.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/RasterBandInfo.d.ts +4 -0
- package/layers/support/RasterSensorInfo.d.ts +4 -0
- package/layers/support/infoFor3D.js +1 -1
- package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/FieldInfo.js +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/support/BaseImageMeasureParameters.d.ts +4 -0
- package/rest/support/BaseImageMeasureParameters.js +1 -1
- package/rest/support/ImageHistogramParameters.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphSource.js +1 -1
- package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/cimSymbolUtils.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +18 -18
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/webgl/ValidatedTextureDescriptor.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/InputField.js +5 -0
- package/widgets/FeatureForm/InputFieldGroup.js +5 -0
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
- package/widgets/ValuePicker/ValuePickerCollection.js +1 -1
- package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
- package/widgets/ValuePicker/ValuePickerLabel.js +1 -1
- package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
- package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/assets/esri/core/workers/chunks/009026614cae60e9505c.js +0 -1
- package/assets/esri/core/workers/chunks/415c326d268b1a8fd03f.js +0 -1
- package/assets/esri/core/workers/chunks/504e929b686570ee858d.js +0 -1
- package/assets/esri/core/workers/chunks/5c811527898eb1c04e67.js +0 -1
- package/assets/esri/core/workers/chunks/6164a9c654c38f9cb64e.js +0 -1
- package/assets/esri/core/workers/chunks/6dd99db0adce09ac9794.js +0 -1
- package/assets/esri/core/workers/chunks/7cec069db0598431829e.js +0 -1
- package/assets/esri/core/workers/chunks/8bb3b10a777ae19f57f9.js +0 -1
- package/assets/esri/core/workers/chunks/91971a76a4ae0474a878.js +0 -1
- package/assets/esri/core/workers/chunks/9ed9e2ad50816a4f937a.js +0 -1
- package/assets/esri/core/workers/chunks/b3013a5a39d038b2d748.js +0 -1
- package/assets/esri/core/workers/chunks/b81bb096ccfcea182cc1.js +0 -1
- package/assets/esri/core/workers/chunks/cf3dd5aad1d60ff1b0b6.js +0 -1
- package/assets/esri/core/workers/chunks/d05d9ddf244bb3dcbcaa.js +0 -1
- package/assets/esri/core/workers/chunks/d3a6504fbaf555707c58.js +0 -1
- package/assets/esri/core/workers/chunks/ef141014ed21a7fd1ff3.js +0 -2
- package/assets/esri/core/workers/chunks/f4933025edecdc1aae76.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8243],{64830:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(70586);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,n.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,n.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},24133:(e,t,r)=>{r.d(t,{Q:()=>a});var n=r(67676),i=r(70586),o=r(44553),s=r(88764);class a{constructor(e=9,t){this._compareMinX=u,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),v.prune(),C.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(_(e,r))for(b.clear();r;){for(let i=0,o=r.children.length;i<o;i++){const o=r.children[i],s=r.leaf?n(o):o;_(e,s)&&(r.leaf?t(o):g(e,s)?this._all(o,t):b.push(o))}r=b.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],o=t.leaf?r(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;b.push(i)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new k([]),this}remove(e){if(!e)return this;let t,r=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(C.clear(),x.clear();r||C.length>0;){if(r||(r=(0,i.j0)(C.pop()),o=C.data[C.length-1],s=x.pop()??0,a=!0),r.leaf&&(t=(0,n.cq)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),C.push(r),this._condense(C),this;a||r.leaf||!g(r,l)?o?(s++,r=o.children[s],a=!1):r=null:(C.push(r),x.push(s),s=0,o=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let r=e;for(v.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else v.pushArray(r.children);r=v.pop()??null}}_build(e,t,r,n){const i=r-t+1;let o=this._maxEntries;if(i<=o){const n=new k(e.slice(t,r+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(n-1)));const s=new M([]);s.height=n;const a=Math.ceil(i/o),p=a*Math.ceil(Math.sqrt(o));w(e,t,r,p,this._compareMinX);for(let i=t;i<=r;i+=p){const t=Math.min(i+p-1,r);w(e,i,t,a,this._compareMinY);for(let r=i;r<=t;r+=a){const i=Math.min(r+a-1,t);s.children.push(this._build(e,r,i,n-1))}}return l(s,this._toBBox),s}_chooseSubtree(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=h(s),l=f(e,s)-a;l<i?(i=l,n=a<n?a:n,r=s):l===i&&a<n&&(n=a,r=s)}t=r||t.children[0]}return t}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);C.clear();const o=this._chooseSubtree(i,this._data,t,C);for(o.children.push(e),d(o,i);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;this._adjustParentBBoxes(i,C,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const o=this._chooseSplitIndex(r,i,n);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=r.children.splice(o,r.children.length-o),a=r.leaf?new k(s):new M(s);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new M([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,o;n=i=1/0;for(let s=t;s<=r-t;s++){const t=p(e,0,s,this._toBBox),a=p(e,s,r,this._toBBox),l=m(t,a),d=h(t)+h(a);l<n?(n=l,o=s,i=d<i?d:i):l===n&&d<i&&(i=d,o=s)}return o}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:u,i=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,o=p(e,0,t,i),s=p(e,r-t,r,i);let a=y(o)+y(s);for(let n=t;n<r-t;n++){const t=e.children[n];d(o,e.leaf?i(t):t),a+=y(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];d(s,e.leaf?i(t):t),a+=y(s)}return a}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)d(t.data[n],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,n.cq)(o,r,o.length,i.indexHint),1)}else this.clear();else l(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){p(e,0,e.children.length,t,e)}function p(e,t,r,n,i){i||(i=new k([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<r;s++)o=e.children[s],d(i,e.leaf?n(o):o);return i}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,r,n,o){const a=[t,r];for(;a.length;){const t=(0,i.j0)(a.pop()),r=(0,i.j0)(a.pop());if(t-r<=n)continue;const l=r+Math.ceil((t-r)/n/2)*n;(0,s.q)(e,l,r,t,o),a.push(r,l,l,t)}}const b=new o.Z,v=new o.Z,C=new o.Z,x=new o.Z({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new n.SO}}class k extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class M extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},42033:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await r.e(1534).then(r.bind(r,41534));return n.create(e,t)}function i(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>n,_:()=>i})},80903:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(50758),i=r(92604),o=r(95330),s=r(64830),a=r(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((r,n)=>{let i=!0;const s=e=>{(0,o.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const l=e[i];(0,o.y8)(l)?this._clientPromises[i]=l.then((e=>(this._clients[i]=new a.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),s(r),this._clients[i])),(()=>(s(n),null))):(this._clients[i]=new a.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[i]=Promise.resolve(this._clients[i]),s(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];n[i]=o.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,o.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,r){let n;Array.isArray(r)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),n={transferList:r}):n=r;const s=(0,o.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((i=>{i&&(t[n]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,r)=>{r.d(t,{bA:()=>B});var n=r(20102),i=r(80442),o=r(95330),s=r(80903),a=r(728),l=r(40330),p=r(92604),d=r(70586),u=r(94362),c=r(99880),h=r(68773),y=(r(2587),r(81271));const f={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),t}var g=r(41213);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new _,this._workerPostMessage({type:u.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,u.QM)(e);if(t&&t.type===u.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let n=await a.default.loadWorker(e);n||(n=await import(e));const i=a.default.connect(n);this._workerPostMessage({type:u.MessageType.OPENED,jobId:r,data:i})}}}var b=r(70171),v=r(17202);const C=p.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:x}=u.MessageType;let E,I;const k="Failed to create Worker. Fallback to execute module in main thread";async function M(e){return new Promise((t=>{function r(i){const o=(0,u.QM)(i);o&&o.type===x&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),C.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}function T(){let e;if(null!=h.default.default){const t={...h.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.default));e.assetsPath=(0,y.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,y.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,i.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,c.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.default.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:v.r,fullVersion:l.bR,revision:v.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}let L=0;const{ABORT:S,INVOKE:R,OPEN:P,OPENED:N,RESPONSE:D}=u.MessageType;class G{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers")||((0,i.Z)("mozilla"),0))return M(new w);if(!E&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${T()}'`);E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+L++})}catch(t){C.warn(k,I),e=new w}else C.warn(k,I),e=new w;return M(e)}();return new G(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),p.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,u.jt)();return new Promise(((t,i)=>{const s={resolve:t,reject:i,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:S,jobId:n})}))};this._outJobs.set(n,s),this._post({type:P,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case D:this._onResponseMessage(t);break;case S:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:i}=e,s=i?new AbortController:null,a=this._inJobs,p=l.Nv[t];let d;try{if("function"!=typeof p)throw new TypeError(`${t} is not a function`);d=p.call(null,n,{signal:s?s.signal:null})}catch(e){return void this._post({type:D,jobId:r,error:(0,u.AB)(e)})}(0,o.y8)(d)?(a.set(r,{controller:s,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:D,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:D,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:D,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,d.hw)(o.abortHandle),r?o.reject(n.Z.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,u.oi)(this.worker,e,t,r)}}const j=Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size"));let O=(0,i.Z)("esri-mobile")?Math.min(j,3):(0,i.Z)("host-browser")?j:0;O||(O=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let Z=0;const A=[];async function F(e,t){const r=new s.Z;return await r.open(e,t),r}async function B(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const n=t.client||r;return F([a.default.connect(r)],{...t,client:n})}if(await async function(){if(z)return z;U=new AbortController;const e=[];for(let t=0;t<O;t++){const r=G.create(t).then((e=>(A[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,o.k_)(t.signal),"dedicated"===r){const r=Z++%O;return F([await A[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,O);if(r<O){const n=new Array(r);for(let i=0;i<r;++i){const r=Z++%O;n[i]=A[r].open(e,t)}return F(n,t)}}return F(A.map((r=>r.open(e,t))),t)}let U,z=null},84864:(e,t,r)=>{r.d(t,{bU:()=>d,fC:()=>h,tp:()=>c,v7:()=>u});const n=new Float64Array(2),i=new Float64Array(2),o="0123456789bcdefghjkmnpqrstuvwxyz";function s(e){return o[e]}function a(e){return(e[0]+e[1])/2}function l(e,t,r){return e[0]=t,e[1]=r,e}function p(e,t){const r=t>a(e);return function(e,t){const r=a(e),n=t,i=!t;e[0]=i*e[0]+n*r,e[1]=i*r+n*e[1]}(e,r),r}function d(e,t){let r=-90,n=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,p=30-(3*t+2*a),d=30-(2*t+3*a),u=3*l+2*(1-l),c=2*l+3*(1-l),h=3*l+7*(1-l)<<d,y=(7*l+3*(1-l)<<p&e.geohashX)>>p,f=(h&e.geohashY)>>d;for(let e=u-1;e>=0;e--){const t=(i+o)/2,r=y&1<<e?1:0;i=(1-r)*i+r*t,o=(1-r)*t+r*o}for(let e=c-1;e>=0;e--){const t=(r+n)/2,i=f&1<<e?1:0;r=(1-i)*r+i*t,n=(1-i)*t+i*n}}return[i,r,o,n]}function u(e,t,r,n){n%2&&(n+=1);let i=0,o=0,s=-90,a=90,l=-180,p=180;for(let e=0;e<n/2;e++){for(let t=0;t<5;t++){const n=(l+p)/2,o=r>n?1:0;i|=o<<29-(t+5*e),l=(1-o)*l+o*n,p=(1-o)*n+o*p}for(let r=0;r<5;r++){const n=(s+a)/2,i=t>n?1:0;o|=i<<29-(r+5*e),s=(1-i)*s+i*n,a=(1-i)*n+i*a}}e.geohashX=i,e.geohashY=o}function c(e,t,r,n,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,p=-180,d=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(p+d)/2,i=n>r?1:0;o|=i<<29-(t+5*e),p=(1-i)*p+i*r,d=(1-i)*r+i*d}for(let t=0;t<5;t++){const n=(a+l)/2,i=r>n?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*n,l=(1-i)*n+i*l}}e[2*t]=o,e[2*t+1]=s}function h(e,t,r){let o="";const a=l(n,-90,90),d=l(i,-180,180);for(let n=0;n<r;n++){let r=0;n%2?(r|=p(a,e)<<4,r|=p(d,t)<<3,r|=p(a,e)<<2,r|=p(d,t)<<1,r|=p(a,e)<<0):(r|=p(d,t)<<4,r|=p(a,e)<<3,r|=p(d,t)<<2,r|=p(a,e)<<1,r|=p(d,t)<<0),o+=s(r)}return o}},16306:(e,t,r)=>{r.d(t,{aX:()=>C});var n=r(68773),i=r(20102),o=r(92604),s=r(38913),a=r(58901),l=r(73913),p=r(8744),d=r(40488),u=(r(66577),r(3172)),c=r(33955),h=r(11282),y=r(81271);async function f(e,t,r){const n="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,c.Ji)(t[0]),s={...r,query:{...n.query,f:"json",sr:i.wkid??JSON.stringify(i),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,u.default)(n.path+"/simplify",s);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(a.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const r=(0,l.x3)(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 i=e[n][0],o=e[n][1],s=e[n+1][0],a=e[n+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),p=(a-o)/l,d=(s-i)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const n=e*t,s=d*n+i,a=p*n+o;r.push([s,a])}const e=(l+Math.floor(u-1)*t)/2,n=d*e+i,s=p*e+o;r.push([n,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:n,spatialReference:e.spatialReference}):new a.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function b(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const i=t.cutIndexes[n],o=t.geometries[n],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[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.XZ)(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(i===r){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(_(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function C(e,t,r){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let o,y,g,_,x,E,I,k,M=0;const T=[],L=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,p.C5)(o),g=o.isWebMercator,E=g?102100:4326,_=l.UZ[E].maxX,x=l.UZ[E].minX,I=l.UZ[E].plus180Line,k=l.UZ[E].minus180Line),y)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(b(t.clone(),_,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,_,x))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);L.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,x)*(2*_);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==_?(M=e.xmax>M?e.xmax:M,n=w(n,g),T.push(n),L.push("cut")):e.intersects(k)&&e.xmin!==x?(M=e.xmax*(2*_)>M?e.xmax*(2*_):M,n=w(n,g,360),T.push(n),L.push("cut")):L.push(n)}else L.push(t.clone());else L.push(t);else L.push(t);let S=(0,l.XZ)(M,_),R=-90;const P=S,N=new a.Z;for(;S>0;){const e=360*S-180;N.addPath([[e,R],[e,-1*R]]),R*=-1,S--}if(T.length>0&&P>0){const t=v(T,await async function(e,t,r,n){const i=(0,h.en)(e),o=t[0].spatialReference,s={...n,query:{...i.query,f:"json",sr:JSON.stringify(o),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,u.default)(i.path+"/cut",s),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,c.im)(e);return t.spatialReference=o,t}))}}(i,T,N,r)),n=[],o=[];for(let r=0;r<L.length;r++){const i=L[r];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(n.push(i),o.push("simplify")):o.push(g?(0,d.$)(i):i)}}if(!n.length)return o;const s=await f(i,n,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,d.$)(s.shift()):s.shift())}return a}const D=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)D.push(t);else{const e=T.shift();D.push(!0===g?(0,d.$)(e):e)}}return D}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>p});var n=r(58901),i=r(82971),o=r(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,o.oU)(e)?e.rings:e.paths}},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var n=r(94443),i=r(3172),o=r(20102);async function s(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new o.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",p=a[2],d=(0,n.Su)(i),u=`${l}${p}.json`,c=d?`${l}${p}_${d}.json`:u;let h;try{h=await s(e(c))}catch(t){if(c===u)throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{h=await s(e(u))}catch(e){throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}const l={};var p,d=r(99880);(0,n.tz)((p={pattern:"esri/",location:d.V},new a(p)))},940:(e,t,r)=>{r.d(t,{n:()=>p});var n=r(92604),i=r(78286),o=r(19153),s=r(90344),a=r(18848);const l=n.Z.getLogger("esri.intl.substitute");function p(e,t,r={}){const{format:n={}}=r;return(0,o.gx)(e,(e=>function(e,t,r){let n,o;const s=e.indexOf(":");if(-1===s?n=e.trim():(n=e.slice(0,s).trim(),o=e.slice(s+1).trim()),!n)return"";const a=(0,i.hS)(n,t);if(null==a)return"";const l=(o?r?.[o]:null)??r?.[n];return l?d(a,l):o?u(a,o):c(a)}(e,t,n)))}function d(e,t){switch(t.type){case"date":return(0,s.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),c(e)}}function u(e,t){switch(t.toLowerCase()){case"dateformat":return(0,s.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,s.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):c(e)}}function c(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,s.p6)(e):""}}},17643:(e,t,r)=>{r.r(t),r.d(t,{default:()=>tr});var n=r(43697),i=(r(66577),r(46791)),o=r(20102),s=r(92604),a=r(95330),l=r(5600),p=(r(75215),r(67676),r(80442)),d=r(52011),u=r(84864),c=r(87085),h=r(98732),y=r(5428),f=r(92036),m=r(42033),g=r(38913),_=r(44547),w=r(8744),b=r(70272);class v{constructor(){this._featureLookup=new Map}static getInstance(){return v.instance||(v.instance=new v),v.instance}static resetInstance(){v.instance&&(v.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const n=[];return e.forEach((e=>{if(!e||!e.id)return;e.properties||(e.properties=[]);let i,o=null;if(r&&(o=e.properties[r]?(0,h.GH)(e.properties[r]):null),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)){const r=this._featureLookup.get(e.id);i=new b.u_(o?JSON.parse(JSON.stringify(o)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,JSON.parse(JSON.stringify(Object.assign(e.properties,r?.attributes))),null,e.properties[t])}else i=new b.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),n.push(i)})),n}}var C=r(40330),x=r(3172);let E=class extends f.Z{constructor(e){super(e),this.resultRows=[]}};(0,n._)([(0,l.Cb)()],E.prototype,"resultRows",void 0),E=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],E);const I=E;let k=class extends f.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,n._)([(0,l.Cb)()],k.prototype,"resultRowsStream",void 0),k=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],k);const M=k;var T=r(96674),L=r(82971);let S=class extends T.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],S.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"unique",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"ascending",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],S.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],S.prototype,"fieldNames",void 0),S=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.FieldIndex")],S);const R=S;let P=class extends T.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"fieldType",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"nullable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"editable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"required",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"defaultVisibility",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"systemMaintained",void 0),(0,n._)([(0,l.Cb)()],P.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],P.prototype,"defaultValue",void 0),P=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphProperty")],P);const N=P;let D=class extends T.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:[N],json:{write:!0}})],D.prototype,"properties",void 0),(0,n._)([(0,l.Cb)({type:[R],json:{write:!0}})],D.prototype,"fieldIndexes",void 0),D=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObjectType")],D);const G=D;let j=class extends G{constructor(e){super(e)}};j=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.EntityType")],j);const O=j;let Z=class extends G{constructor(e){super(e),this.endPoints=[]}};(0,n._)([(0,l.Cb)()],Z.prototype,"endPoints",void 0),Z=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.RelationshipType")],Z);const A=Z;let F=class extends T.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,n._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],F.prototype,"timestamp",void 0),(0,n._)([(0,l.Cb)({type:L.Z,json:{write:!0}})],F.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],F.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],F.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],F.prototype,"globalIdField",void 0),(0,n._)([(0,l.Cb)()],F.prototype,"arcgisManaged",void 0),(0,n._)([(0,l.Cb)()],F.prototype,"identifierInfo",void 0),(0,n._)([(0,l.Cb)()],F.prototype,"searchIndexes",void 0),(0,n._)([(0,l.Cb)({type:[O],json:{write:!0}})],F.prototype,"entityTypes",void 0),(0,n._)([(0,l.Cb)({type:[A],json:{write:!0}})],F.prototype,"relationshipTypes",void 0),F=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.DataModel")],F);const B=F;let U=class extends T.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],U.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"supportsSearch",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],U.prototype,"supportedQueryFormats",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"allowGeometryUpdates",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"searchMaxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"serviceCapabilities",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"maxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"copyrightText",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"units",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"currentVersion",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"dateFieldsTimeReference",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"serviceItemId",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"supportsDocuments",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"dataEditingNotSupported",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"schemaEditingNotSupported",void 0),U=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ServiceDefinition")],U);const z=U;let q=class extends T.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"url",void 0),(0,n._)([(0,l.Cb)({type:B,json:{write:!0}})],q.prototype,"dataModel",void 0),(0,n._)([(0,l.Cb)({type:z,json:{write:!0}})],q.prototype,"serviceDefinition",void 0),q=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],q);const Y=q;var Q=r(99880);const $="esri/rest/knowledgeGraph/wasmInterface/";let J,H=null;async function X(){const e=H??J;if(e)return e;const t=(0,p.Z)("wasm-simd");return J=async function(e){if(e){const{default:e}=await r.e(5389).then(r.bind(r,35389)).then((e=>e.a));return e({locateFile:e=>(0,Q.V)($+e)})}const{default:t}=await r.e(9931).then(r.bind(r,39931)).then((e=>e.a));return t({locateFile:e=>(0,Q.V)($+e)})}(t),J}var W=r(65091),V=r(94139),K=r(58901),ee=r(9361);function te(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(ie(e,t))})),r}function re(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,i]of Object.entries(e))r.set_key_value(n,ie(i,t));return r}function ne(e,t){if(e instanceof W.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{n[o]=e,o++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof V.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof K.Z||e instanceof g.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];let o=[];e instanceof K.Z?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof g.Z&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[a]=e,a++}))})),i[s]=t,s++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ie(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof ee.Z)return ne(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(ie(e,t))})),r}return re(e,t)}let oe=class extends T.wq{constructor(e){super(e),this.properties=null}};(0,n._)([(0,l.Cb)({json:{write:!0}})],oe.prototype,"properties",void 0),oe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObject")],oe);const se=oe;let ae=class extends se{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ae.prototype,"typeName",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ae.prototype,"id",void 0),ae=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphNamedObject")],ae);const le=ae;let pe=class extends le{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:V.Z,json:{write:!0}})],pe.prototype,"layoutGeometry",void 0),pe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Entity")],pe);const de=pe;let ue=class extends le{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"originId",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"destinationId",void 0),(0,n._)([(0,l.Cb)({type:K.Z,json:{write:!0}})],ue.prototype,"layoutGeometry",void 0),ue=(0,n._)([(0,d.j)("esri.rest.Relationship.Relationship")],ue);const ce=ue;function he(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof de){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,ye(i,t));return e.id&&r.set_id(e.id),r}if(e instanceof ce){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,ye(i,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function ye(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof ee.Z?ne(e,t):""}let fe=class extends f.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,n._)([(0,l.Cb)()],fe.prototype,"name",void 0),(0,n._)([(0,l.Cb)()],fe.prototype,"supportedCategory",void 0),(0,n._)([(0,l.Cb)()],fe.prototype,"analyzers",void 0),(0,n._)([(0,l.Cb)()],fe.prototype,"searchProperties",void 0),fe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.SearchIndex")],fe);const me=fe;var ge,_e,we,be,ve,Ce,xe;function Ee(e){return e.deleteLater(),new O(ke(e))}function Ie(e){return e.deleteLater(),new R({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Se(e.fields)})}function ke(e){return{name:e.name,alias:e.alias,role:ge[e.role.value]?ge[e.role.value]:null,strict:e.strict,properties:Re(e.properties),fieldIndexes:Pe(e.field_indexes)}}function Me(e){return e.deleteLater(),new N({alias:e.alias,name:e.name,fieldType:_e[e.field_type.value]?_e[e.field_type.value]:null,geometryType:we[e.geometry_type.value]?we[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ce[e.role.value],defaultValue:e.default_value})}function Te(e){e.deleteLater();const t=ke(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return new A(Object.assign({endPoints:r},t))}function Le(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ee(e.get(r)));return t}function Se(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return t}function Re(e){const t=[];for(let r=0;r<e.size();r++)t.push(Me(e.get(r)));return t}function Pe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ie(e.get(r)));return t}function Ne(e){const t=[];for(let r=0;r<e.size();r++)t.push(Te(e.get(r)));return t}function De(e){const t=[];for(let r=0;r<e.size();r++){const r=new me,n=e.get(0);r.name=n.name,r.supportedCategory=ve[n.supported_category.value];const i=n.analyzers.size();for(let e=0;e<i;e++)r.analyzers.push({name:n.analyzers.get(e).name});for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),i=n.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return t}!function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(ge||(ge={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger"}(_e||(_e={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(we||(we={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(be||(be={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(ve||(ve={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ce||(Ce={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(xe||(xe={}));let Ge=class extends se{constructor(e){super(e)}};Ge=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ObjectValue")],Ge);const je=Ge;let Oe=class extends T.wq{constructor(e){super(e),this.path=null}};(0,n._)([(0,l.Cb)({type:[se],json:{write:!0}})],Oe.prototype,"path",void 0),Oe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Path")],Oe);const Ze=Oe;var Ae,Fe,Be;function Ue(e){const t={},r=ze(e,t),n=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===Ae.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==Ae.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return n.forEach((e=>{const n=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<r;t++)e[t]=i[a],a++;n.push(e)}t[s].push(n)})),t}function ze(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Ae||(Ae={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(Fe||(Fe={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Be||(Be={}));const qe=s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),Ye={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Ae.ESRI_GEOMETRY_POINT:return function(e){const t={};let r=2;ze(e,t);const n=e.coords;return t.x=n[0],t.y=n[1],e.has_z&&(t.z=n[r],r++),e.has_m&&(t.m=n[r]),new V.Z(t)}(e);case Ae.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},r=ze(e,t),n=e.lengths,i=e.coords,o=n[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<r;t++)e[t]=i[s],s++;t.points.push(e)}return new W.Z(t)}(e);case Ae.ESRI_GEOMETRY_POLYLINE:return r=e,new K.Z(Ue(r));case Ae.ESRI_GEOMETRY_POLYGON:return function(e){return new g.Z(Ue(e))}(e);case Ae.ESRI_GEOMETRY_ENVELOPE:case Ae.ESRI_GEOMETRY_MULTI_PATCH:return qe.warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Ae.ESRI_GEOMETRY_NULL:case Ae.ESRI_GEOMETRY_ANY:default:return qe.warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return qe.warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case Fe.OBJECT:return function(e,t){return new je(Je(e,t))}(e,t);case Fe.ENTITY:return $e(e,t);case Fe.RELATIONSHIP:return He(e,t);case Fe.PATH:return function(e,t){const r=e.entity_count(),n=e.relationship_count(),i=[];for(let o=0;o<r;o++)i.push($e(e.get_entity_at(o),t)),o<n&&i.push(He(e.get_relationship_at(o),t));return new Ze({path:i})}(e,t);case Fe.ARRAY:return function(e,t){const r=[],n=e.count();for(let i=0;i<n;i++){const n=e.get_value_at(i);r.push(Qe(n,t))}return r}(e,t);default:return qe.warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var r}};function Qe(e,t){return Ye.decodedWasmObjToQueryResponseObj(e,t)}function $e(e,t){const r=e.type_name,n=Je(e,t),i=e.get_id();return new de(Object.assign({typeName:r,id:i},n))}function Je(e,t){const r={},n=e.key_count();for(let i=0;i<n;i++)r[e.get_key_at(i)]=Qe(e.get_value_at(i),t);return{properties:r}}function He(e,t){const r=e.type_name,n=Je(e,t);return new ce(Object.assign({typeName:r,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}let Xe=class extends f.Z{constructor(e){super(e),this.hasError=null,this.editResults=[]}};(0,n._)([(0,l.Cb)()],Xe.prototype,"hasError",void 0),(0,n._)([(0,l.Cb)()],Xe.prototype,"error",void 0),(0,n._)([(0,l.Cb)()],Xe.prototype,"editResults",void 0),Xe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],Xe);const We=Xe,Ve={fetchKnowledgeGraph:async e=>{const t=new Y({url:e}),r=[];return r.push(et(t)),r.push(async function(e){return Ve.refreshServiceDefinition(e)}(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await lt(e)},refreshServiceDefinition:async e=>{const t=(await(0,x.default)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new z(t),e.serviceDefinition},executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await rt(e);const i=await ot(n,r);i.data.body=await async function(e,t){const r=await X(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))it(t,i,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await et(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r);try{n.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=n.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await tt(i.data.url,i.data);if(e.dataModel)return new M({resultRowsStream:await at(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await rt(e);const i=await ot(n,r);return i.data.body=await async function(e,t){if(t.dataModel||await et(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await X(),n=!!e.options?.cascadeDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(he(e,r)),nt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(he(e,r)),nt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(he(e,r)),nt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(he(e,r)),nt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return nt(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await X()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=new We;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const r=e.get_edit_results_count();for(let n=0;n<r;n++){const r=e.get_edit_results_at(n),i=e.get_edit_results_type_name_at(n),o=[],s=[],a=[],l=r.get_add_results_count(),p=r.get_update_results_count(),d=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=r.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=r.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(r)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await tt(i.data.url,i.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,i=await(0,x.default)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await X()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new I({resultRows:st(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,x.default)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await X()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new I({resultRows:st(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await rt(e);const i=await ot(n,r);i.data.body=await async function(e){const t=await X(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(te(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return n.get_byte_buffer()}(t);const s=await tt(i.data.url,i.data);if(e.dataModel)return new M({resultRowsStream:await at(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function Ke(e,t,r){return Ve.executeQueryStreaming(e,t,r)}async function et(e){return Ve.refreshDataModel(e)}async function tt(e,t){return Ve._fetchWrapper(e,t)}async function rt(e){const t=C.id?.findCredential(e.url);t||(e.dataModel?await lt(e):await et(e))}function nt(e,t,r){if(0!==e.error_code)throw new o.Z(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function it(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof ee.Z?r.set_param_key_value(e,ne(t,n)):t instanceof Array?r.set_param_key_value(e,te(t,n)):r.set_param_key_value(e,re(t,n))}async function ot(e,t){return(0,x.default)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function st(e,t,r){e.push_buffer(new Uint8Array(t));const n=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let n=0;n<i;n++){const i=e.get_value(n);t[n]=Qe(i,r)}n.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return n}async function at(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await X()).GraphQueryDecoder);return n.deleteLater(),new ReadableStream({async start(e){try{return function i(){return r?.read().then((({done:s,value:a})=>{if(s){let t;if(n.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:n.error.error_code,errorMessage:n.error.error_message})),r.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=st(n,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){r?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function lt(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,x.default)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),i=r.data;if(n?.includes("application/x-protobuf")){const e=(await X()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new B({timestamp:e.timestamp,spatialReference:new L.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:xe[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:be[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:De(e.search_indexes),entityTypes:Le(e.entity_types),relationshipTypes:Ne(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}let pt=class extends f.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,l.Cb)()],pt.prototype,"openCypherQuery",void 0),pt=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQuery")],pt);const dt=pt;let ut=class extends dt{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,n._)([(0,l.Cb)()],ut.prototype,"bindParameters",void 0),(0,n._)([(0,l.Cb)()],ut.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,l.Cb)()],ut.prototype,"outputQuantizationParameters",void 0),ut=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],ut);const ct=ut;var ht=r(14165);const yt="ESRI__ID",ft="ESRI__ORIGIN_ID",mt="ESRI__DESTINATION_ID",gt="ESRI__LAYOUT_GEOMETRY",_t=12,wt=s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager");let bt=class extends f.Z{constructor(e){super(e),this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this._processingCacheUpdatesLookup=new Map,this._memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return wt.warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const i=new Map;r.members?.forEach((e=>{this._memberIdTypeLookup.set(e.id,n);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(n,i)}))}addToLayerInclusionSet(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);if(r.useAllData)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add members to an exclusion list for a sublayer where the sublayer is set to always retrieve its entire data set");r.members||(r.members=new Map),r.members.set(t,{id:t}),this._memberIdTypeLookup.set(t,e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),this._memberIdTypeLookup.set(t,e)}}))}getById(e){return v.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new ht.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=n.outFields,o=n.geometry;let s="",a="";o&&o.extent&&(s=(0,u.fC)(o.extent.ymin,o.extent.xmin,_t),a=(0,u.fC)(o.extent.ymax,o.extent.xmax,_t)),i&&1===i.length&&i[0]===yt&&"1=1"===n.where||await Promise.all(r??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],p=[];return l.forEach((r=>{if(r.geometry=e.linkChartDiagramLookup.get(r.attributes[t.objectIdField]),r.attributes[gt]=r.geometry,s&&a){const n=e.linkChartGeohashLookup.get(r.attributes[t.objectIdField]);n?n>=s&&n<=a&&p.push(r):p.push(r)}else p.push(r)})),p}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e){const t=[],r=[],n=new Map;return e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);if(!this.entityTypeNames.has(t))return;n.has(t)?n.get(t)?.push(e):n.set(t,[e])}})),n.forEach(((e,n)=>{const i=`MATCH (n:${n})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`,o=new Promise((r=>{(async()=>{const r=(await Ke(this.knowledgeGraph,new ct({openCypherQuery:i,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)break;for(let e=0;e<n.length;e++){const r=n[e];t.push({id:r[0],typeName:r[1]}),t.push({id:r[2],typeName:r[3]})}}}catch(e){if("AbortError"!==e.name)throw e;wt.info("Request aborted as expected")}})().then((()=>{r()}))}));r.push(o)})),await Promise.all(r),t}async refreshCacheContent(e,t,r,n=!0){const i=v.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);a.has(t)?a.get(t)?.push(e):a.set(t,[e])}})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,p]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let d,u="",c=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))u=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,u=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}))}d=new ct(p?{openCypherQuery:u,bindParameters:{ids:p}}:{openCypherQuery:u});const h=(await Ke(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await h.read();if(t)break;const o=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const s={properties:{}};for(s.id=t[n],n++,i++,c&&(s.originId=t[n],n++,i++,s.destinationId=t[n],n++,i++);n<t.length;n++)s.properties[a[n-i]]=t[n];o.push(s)}const s=i.writeToStore(o,yt,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[yt],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[yt])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[yt],{id:t.attributes[yt]}),this._memberIdTypeLookup.set(t.attributes[yt],e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set;e.forEach((e=>{this._memberIdTypeLookup.get(e)&&t.add(this._memberIdTypeLookup.get(e)),this._memberIdTypeLookup.delete(e),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((t=>{t.members?.has(e)&&t.members.delete(e)}))})),t.forEach((t=>{this.sublayerCaches.get(t)?.forEach(((r,n)=>{e.includes(n)&&this.sublayerCaches.get(t)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=v.getInstance(),i=new Set,o=[];let s,a="",l=[],p=t.parentCompositeLayer.sublayerIdsCache.has(t.objectType.name)?Array.from(t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name).values()).sort():null;const d="relationship"===t.graphType;if(!this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)if(null!=e.objectIds&&p&&p.length>0){const t=e.objectIds;e.objectIds=p.filter((e=>t.includes(e)))}else if(null!=e.objectIds)p=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=p}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):r.forEach((e=>{e!==yt&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;if(r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,_.iQ)(r.extent.spatialReference,w.Zn),n=(0,_.iV)(r.extent,w.Zn)):n=r.extent,null!=e.where&&"1=1"!==e.where){const r=await(0,m.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}))}a=d?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{a+=`, n.${e}`,o.push(e)})),s=new ct({openCypherQuery:a,bindParameters:{param_filter_geom:new g.Z({rings:[[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,m.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}));const o=["column-reference","string","number","binary-expression"],s=["=","<","<=","<>",">",">=","AND","OR","LIKE"];let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.includes(e.left.type)&&o.includes(e.right.type)&&s.includes(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=l(n.parseTree),a&&(r="")}let n="";n=d?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let a=!1;p&&(a=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=a?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",d&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{n+=`, n.${e}`,o.push(e)})),s=new ct(p?{openCypherQuery:n,bindParameters:{ids:p}}:{openCypherQuery:n})}const u=(await Ke(t.parentCompositeLayer.dataManager.knowledgeGraph,s,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await u.read();if(e)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,s=0;const a={properties:{}};for(a.id=t[n],n++,s++,d&&(a.originId=t[n],n++,s++,a.destinationId=t[n],n++,s++);n<t.length;n++)a.properties[o[n-s]]=t[n];i.push(a)}l=l.concat(n.writeToStore(i,yt,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return l}};(0,n._)([(0,l.Cb)()],bt.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],bt.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,l.Cb)()],bt.prototype,"entityTypeNames",void 0),(0,n._)([(0,l.Cb)()],bt.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,l.Cb)()],bt.prototype,"geographicLookup",void 0),(0,n._)([(0,l.Cb)()],bt.prototype,"sublayerCaches",void 0),bt=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],bt);var vt=r(51773),Ct=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),xt=r(32400),Et=(r(78346),r(57191)),It=r(66202),kt=r(25278);const Mt=(0,r(53518).v)(),Tt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,l.Cb)(Mt.fields)],t.prototype,"fields",void 0),(0,n._)([(0,l.Cb)(Mt.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,d.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSubLayerBase")],t),t};var Lt=r(71612),St=r(6404),Rt=r(34760),Pt=r(72965),Nt=r(1231),Dt=r(35671),Gt=r(74889),jt=r(32163),Ot=r(728),Zt=r(6570),At=r(86973);let Ft=class extends((0,St.M)(Tt((0,Lt.h)((0,Pt.M)((0,Rt.Q)(c.Z)))))){constructor(e){if(super(e),this.capabilities=(0,kt.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=yt,this.objectType=null,this.parentCompositeLayer=null,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Ot.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=ht.Z.fromJSON(e);return this.queryFeaturesJSON(r,t)}}},(()=>null)),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=gt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?At.M.fromJSON(t.geometryType):null;const r=t?.name,n=r?e.objectType.properties?.[r]:null;n?(this.hasM=n.hasM??!1,this.hasZ=n.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(Nt.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(Nt.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Ct.i)((0,kt.bU)(At.M.toJSON("polyline")).renderer):this.renderer=(0,Ct.i)((0,kt.bU)(At.M.toJSON("point")).renderer):this.renderer=(0,Ct.i)((0,kt.bU)(At.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Dt.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,jt.eZ)(this,e)}createQuery(){return new ht.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),i=Gt.Z.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(r),o=await i.executeQueryForExtent(n.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new Zt.Z(o.extent):new Zt.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const r=ht.Z.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new Et.Z({geometryType:At.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new It.q({fields:this.fields.map((e=>e.toJSON())),geometryType:At.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new ht.Z({where:"1=1",outFields:[yt]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=ht.Z.from(e),n=r.geometry;let i;if(n&&!n.spatialReference?.isWGS84&&(await(0,_.iQ)(n.spatialReference,w.Zn),r.geometry=(0,_.iV)(n instanceof g.Z||n instanceof K.Z?n:n.extent,w.Zn)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:i}}};(0,n._)([(0,l.Cb)()],Ft.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],Ft.prototype,"defaultPopupTemplate",null),(0,n._)([(0,l.Cb)()],Ft.prototype,"definitionExpression",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"displayField",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"elevationInfo",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"geometryFieldName",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"graphType",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"labelsVisible",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"labelingInfo",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"objectType",void 0),(0,n._)([(0,l.Cb)()],Ft.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,l.Cb)({type:vt.Z,json:{name:"popupInfo",write:!0}})],Ft.prototype,"popupTemplate",void 0),(0,n._)([(0,l.Cb)({types:xt.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],Ft.prototype,"renderer",null),(0,n._)([(0,l.Cb)()],Ft.prototype,"source",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],Ft.prototype,"type",void 0),Ft=(0,n._)([(0,d.j)("esri.layers.knowledgeGraph.KnowledgeGraphSubLayer")],Ft);const Bt=Ft;let Ut,zt=null;var qt,Yt,Qt,$t,Jt,Ht,Xt,Wt,Vt;function Kt(e,t,r,n,i,o){const s=r.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,u=15+s*(d+2*l)+a*(2*p),c=zt._malloc(u);try{const d=c+16-c%16,u=d+s*l,h=u+s*l,y=h+a*p,f=y+a*p,m=()=>[zt.HEAPF64.subarray(d>>3,(d>>3)+s),zt.HEAPF64.subarray(u>>3,(u>>3)+s),zt.HEAPU32.subarray(h>>2,(h>>2)+a),zt.HEAPU32.subarray(y>>2,(y>>2)+a),zt.HEAPU8.subarray(f,f+s)],[g,_,w,b,v]=m();g.set(r),_.set(n),w.set(i),b.set(o),v.set(t);const C=e(s,f,d,u,a,h,y),[x,E,I,k,M]=m();return r.set(x),n.set(E),i.set(I),o.set(k),t.set(M),C}finally{zt._free(c)}}!function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"}(qt||(qt={})),function(e){e.getMinIdealEdgeLength=function(){return zt.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return Kt(((e,t,r,n,i,l,p)=>zt.applyForceDirectedLayout(e,t,r,n,i,l,p,o,s,a)),e,t,r,n,i)}}(Yt||(Yt={})),function(e){e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return Kt(((e,t,r,n,i,l,p)=>zt.applyCommunityLayout(e,t,r,n,i,l,p,o,s,a)),e,t,r,n,i)}}(Qt||(Qt={})),function(e){e.apply=function(e,t,r,n,i){return Kt(zt.applySimpleLayout,e,t,r,n,i)}}($t||($t={})),function(e){e.apply=function(e,t,r,n,i){return Kt(zt.applyHierarchicalLayout,e,t,r,n,i)}}(Jt||(Jt={})),function(e){e.apply=function(e,t,r,n,i){return Kt(zt.applyRadialTreeLayout,e,t,r,n,i)}}(Ht||(Ht={})),function(e){e.apply=function(e,t,r,n,i){return Kt(zt.applySmartTreeLayout,e,t,r,n,i)}}(Xt||(Xt={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(Wt||(Wt={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(Vt||(Vt={}));let er=class extends((0,Lt.h)((0,Pt.M)(c.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.layers=new i.Z,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new Zt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let r=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof A||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof O||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new bt({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=r,this.memberRelationshipTypes=n,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return Ve.fetchKnowledgeGraph(e)})(this.url).then((r=>{if(this._initializeLayerProperties({knowledgeGraph:r,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,h.GH)(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(t.coords[1],t.coords[0],_t)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],r=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e){await this._handleNewRecords(e)}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e);await this._handleNewRecords(t)}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new Bt({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new Bt({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const r=((e,t,r)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(r.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],_t)):this.linkChartGeohashLookup.set(e.id,"");else{const t=(0,h.GH)(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.x,e.linkChartLocation.y,_t)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const n=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{n.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const a=new Map,l=new Map,p=new Map,d=new Map,c=new Uint8Array(n.length),y=new Float64Array(n.length),f=new Float64Array(n.length),m=new Uint32Array(i.length),g=new Uint32Array(i.length),_=[],w=t?.geographicStrategy??"FORCE_DIRECTED",b=t?.xScaleFactor??1,v=t?.yScaleFactor??1,C=new Zt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let x,E="FORCE_DIRECTED",I=0,k=0;switch(E="GEOGRAPHIC"===e?w:e,E){case"FORCE_DIRECTED":x=Yt.apply;break;case"COMMUNITY":x=Qt.apply;break;case"HIERARCHICAL":x=Jt.apply;break;case"RADIAL_TREE":x=Ht.apply;break;case"SMART_TREE":x=Xt.apply;break;default:x=$t.apply}n.forEach((({typeName:r,feature:n})=>{if(t?.lockedNodeLocations?.has(n.attributes[yt])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)?c[I]=qt.IsGeographic:c[I]=qt.None;const i=t.lockedNodeLocations.get(n.attributes[yt]);y[I]=i.x,f[I]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)){c[I]=qt.IsGeographic;let e=null;const t=n.attributes[this.dataManager.geographicLookup.get(r).name],i=this.dataManager.geographicLookup.get(r)?.geometryType;switch(i){case"esriGeometryPoint":y[I]=t?.x,f[I]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,e?.x&&e?.y?(y[I]=e?.x,f[I]=e?.y):c[I]=qt.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,e?.x&&e?.y?(y[I]=e?.x,f[I]=e?.y):c[I]=qt.IsMovable;break;default:c[I]=qt.IsMovable}y[I]||(y[I]=0),f[I]||(f[I]=0)}else c[I]=qt.IsMovable,y[I]=0,f[I]=0;d.set(n.attributes[yt],I),_[I]={feature:n,typeName:r},I++}));let M=!1;if(i.forEach((e=>{const t=d.get(e.feature.attributes[ft]),r=d.get(e.feature.attributes[mt]);void 0!==t&&void 0!==r?(m[k]=t,g[k]=r,k++):(M=!0,this.linkChartDiagramLookup.set(e.feature.attributes[ft],null),this.linkChartGeohashLookup.set(e.feature.attributes[ft],null))})),M&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(Ut||(Ut=r.e(6124).then(r.bind(r,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,Q.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){zt=e}(e)})),Ut)),!x(c,y,f,m,g))throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<_.length;e++){if(c[e]===qt.IsMovable&&(y[e]=y[e]*b,f[e]=f[e]*v),f[e]>84.9999&&(f[e]=84.9999),f[e]<-84.9999&&(f[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),_[e].feature.attributes[gt]=new V.Z(y[e],f[e]),a.has(_[e].typeName)){const t=a.get(_[e].typeName);t?.set(_[e].feature.attributes[yt],_[e].feature)}else{const t=new Map;t.set(_[e].feature.attributes[yt],_[e].feature),a.set(_[e].typeName,t)}p.set(_[e].feature.attributes[yt],_[e].feature);const t=(0,h.GH)(_[e].feature.attributes[gt]);this.linkChartDiagramLookup.set(_[e].feature.attributes[yt],_[e].feature.attributes[gt]?t:null),this.linkChartGeohashLookup.set(_[e].feature.attributes[yt],(0,u.fC)(_[e].feature.attributes[gt].y,_[e].feature.attributes[gt].x,_t)),_[e].feature.attributes[gt].x<C.xmin&&(C.xmin=_[e].feature.attributes[gt].x),_[e].feature.attributes[gt].x>C.xmax&&(C.xmax=_[e].feature.attributes[gt].x),_[e].feature.attributes[gt].y<C.ymin&&(C.ymin=_[e].feature.attributes[gt].y),_[e].feature.attributes[gt].y>C.ymax&&(C.ymax=_[e].feature.attributes[gt].y)}return this.linkChartExtent.xmin=C.xmin,this.linkChartExtent.xmax=C.xmax,this.linkChartExtent.ymin=C.ymin,this.linkChartExtent.ymax=C.ymax,i.forEach((e=>{const t=_[d.get(e.feature.attributes[ft])]?.feature.attributes[gt],r=_[d.get(e.feature.attributes[mt])]?.feature.attributes[gt];if(!t||!r)return;const n=new K.Z({paths:[[t.x,t.y],[r.x,r.y]]});if(e.feature.attributes[gt]=n,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[yt],e.feature)}else{const t=new Map;t.set(e.feature.attributes[yt],e.feature),l.set(e.typeName,t)}p.set(e.feature.attributes[yt],e.feature);const i=(0,h.GH)(e.feature.attributes[gt]);this.linkChartDiagramLookup.set(e.feature.attributes[yt],e.feature.attributes[gt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[yt],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:b,yScaleFactor:v},{nodes:a,links:l,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const r=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r),this.layers.forEach((e=>{e.emit("refresh",{dataChanged:!0})}))}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const r=Array.from(this.dataManager.sublayerCaches.get(t).keys());Array.from(e.members.keys()).filter((e=>!r.includes(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async _handleNewRecords(e){const t=[];this.dataManager.addToLayerInclusionSet(e);for(const r of e)this.sublayerIdsCache.has(r.typeName)||(this.sublayerIdsCache.set(r.typeName,new Set),t.push(r.typeName)),this.sublayerIdsCache.get(r.typeName).add(r.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),r="endPoints"in t?"relationship":"entity",n=new Bt({objectType:t,parentCompositeLayer:this,graphType:r,title:e});"entity"===r?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),n.geometryType?this.layers.push(n):this.tables.push(n),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){if(this.defaultLinkChartConfig)if(this.defaultLinkChartConfig.doNotRecalculateLayout)this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let r;const n=e.id;if(!t)return;r="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const i=(0,h.GH)(r);this.linkChartDiagramLookup.set(n,i),this.linkChartGeohashLookup.set(n,(0,u.fC)(r.x,r.y,_t)),this.linkChartExtent.xmin>r.x&&(this.linkChartExtent.xmin=r.x),this.linkChartExtent.xmax<r.x&&(this.linkChartExtent.xmax=r.x),this.linkChartExtent.ymin>r.y&&(this.linkChartExtent.ymin=r.y),this.linkChartExtent.ymax<r.y&&(this.linkChartExtent.ymax=r.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[ft]),r=this.linkChartDiagramLookup.get(e.attributes[mt]);if(t&&r){const n=(0,h.GH)(new K.Z({paths:[[t.coords[0],t.coords[1]],[r.coords[0],r.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[yt],n)}else this.linkChartDiagramLookup.set(e.attributes[yt],null);this.linkChartGeohashLookup.set(e.attributes[yt],"")}))}));else{const e=new Map;this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const r=t.linkChartLocation;let n;const i=t.id;r&&(n="x"in r?{x:r.x,y:r.y}:{x:r.coords[0],y:r.coords[1]},e.set(i,new V.Z({x:n.x,y:n.y})))}))})),await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:e})}else await this.calculateLinkChartLayout()}};(0,n._)([(0,l.Cb)()],er.prototype,"dataPreloadedInLocalCache",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"defaultLinkChartConfig",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"dataManager",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"layers",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"linkChartDiagramLookup",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"linkChartExtent",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"linkChartGeohashLookup",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"memberEntityTypes",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"memberRelationshipTypes",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"sublayerIdsCache",void 0),(0,n._)([(0,l.Cb)()],er.prototype,"tables",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],er.prototype,"type",void 0),er=(0,n._)([(0,d.j)("esri.layers.LinkChartLayer")],er);const tr=er},37549:(e,t,r)=>{r.d(t,{H:()=>a});var n=r(80442),i=r(24133),o=r(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,n.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,n)=>{e[t++]=n})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(20102),i=r(32448),o=r(92604),s=r(60437),a=r(24470),l=r(98732),p=r(37549),d=r(29730),u=r(70272),c=r(5428);const h={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new u.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,d.Y)(new c.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var y=r(11490);const f=(0,s.Ue)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new p.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=h}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,n,i]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:(0,y.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,s.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let i;if(this._markedIds.add(t),r?(e.displayId=r.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.$)(null!=i?i:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>u,MS:()=>c,bU:()=>a});var n=r(80442),i=r(22974),o=r(61159),s=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,n.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function u(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var n=r(43697),i=r(92604),o=r(95330),s=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(46791),p=(r(20102),r(26258),r(87538));const d=new l.Z,u=new WeakMap;function c(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let y=0,f=0;function m(){const e=Date.now();for(const t of d)t.refreshInterval&&e-(u.get(t)??0)+5>=6e4*t.refreshInterval&&(u.set(t,e),t.refresh(e))}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of d)t=h(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?u.get(r)||u.set(r,e):u.delete(r);if(t!==f){if(f=t,clearInterval(y),0===f)return void(y=0);y=setInterval(m,f)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){c(e)&&d.push(e)}(this)}),(()=>{}))}destroy(){var e;c(e=this)&&d.includes(e)&&d.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,s.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,s.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},54306:(e,t,r)=>{r.d(t,{Z:()=>k});var n,i=r(43697),o=r(9790),s=r(35454),a=r(96674),l=r(22974),p=r(62357),d=r(5600),u=(r(75215),r(71715)),c=r(52011),h=r(30556),y=(r(67676),r(80442),r(8813));let f=n=class extends a.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,y.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,i._)([(0,d.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,i._)([(0,u.r)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,i._)([(0,h.c)("expression")],f.prototype,"writeExpression",null),(0,i._)([(0,d.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,i._)([(0,c.j)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var g,_=r(84230),w=r(28412),b=r(21878);const v=new s.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function C(e,t,r){return{enabled:!(0,_.A2)(r?.layer)}}function x(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function E(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=g=class extends a.wq{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],o=r(t[n[4]],n[5],n[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=w.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&x(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.hV)(this)}getLabelExpressionArcade(){return(0,y.YI)(this)}getLabelExpressionSingleField(){return(0,y.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:C}}}}})],I.prototype,"allowOverrun",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:C}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&E(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,i._)([(0,u.r)("labelExpression")],I.prototype,"readLabelExpression",null),(0,i._)([(0,h.c)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,i._)([(0,d.Cb)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return x(e)||E(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,i._)([(0,h.c)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,i._)([(0,d.Cb)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],I.prototype,"labelPlacement",void 0),(0,i._)([(0,d.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,i._)([(0,d.Cb)({type:Number})],I.prototype,"maxScale",void 0),(0,i._)([(0,h.c)("maxScale")],I.prototype,"writeMaxScale",null),(0,i._)([(0,d.Cb)({type:Number})],I.prototype,"minScale",void 0),(0,i._)([(0,h.c)("minScale")],I.prototype,"writeMinScale",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],I.prototype,"repeatLabel",void 0),(0,i._)([(0,d.Cb)({type:Number,cast:p.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],I.prototype,"repeatLabelDistance",void 0),(0,i._)([(0,d.Cb)({types:o.yK,json:{origins:{"web-scene":{types:o.S6,write:b.vX,default:null}},write:b.vX,default:null}})],I.prototype,"symbol",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=g=(0,i._)([(0,c.j)("esri.layers.support.LabelClass")],I);const k=I},53518:(e,t,r)=>{r.d(t,{v:()=>a});var n=r(92604),i=r(1231),o=r(99514),s=r(35671);function a(){return{fields:{type:[i.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new o.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,s.Q0)(this.fieldsIndex,e)}}}}},8813:(e,t,r)=>{r.d(t,{UO:()=>m,YI:()=>f,dI:()=>g,el:()=>C,hV:()=>y,z7:()=>h});var n=r(19153);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),d='"',u=d+" + ",c=" + "+d;function h(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=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t&&t[1].trim()||null}(t.expression);case"arcade":return C(t.expression)}return null}function g(e){let t;return e?(t=(0,n.gx)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):d+t,t=p.test(t)?t.replace(p,""):t+d,t=t.replaceAll(s,u).replaceAll(a,c)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function C(e){if(!e)return null;let t=w.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var n,i=r(43697),o=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),d=r(5600),u=(r(75215),r(71715)),c=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry&&i.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=i.aggregateGeometries,p=o.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],n=l[e],i=n?.spatialReference;null==t||i||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,f.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.Z.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,p.d9)({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 n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(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:[n,i],scale:[o,s]}=r,a=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s));for(const{geometry:e}of t)null!=e&&a&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}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 n=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,n=s.length;e<n;e++){const n=s[e];e>0?(i+=n[0],o+=n[1]):(i=n[0],o=n[1]),n[0]=t(i),n[1]=r(o)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const n=e.points;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(i+=s[0],o+=s[1]):(i=s[0],o=s[1]),s[0]=t(i),s[1]=r(o)}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[s.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,u.r)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:o.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,u.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=n=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},11282:(e,t,r)=>{r.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),r(68773),r(40330);var n=r(22974),i=r(81271);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,n.d9)(e)}function a(e,t,r){const n={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){n[i]=[];for(let e=0;e<o.length;e++)n[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r&&r[i]);n[i]=t?e:JSON.stringify(e)}else n[i]=t?o:JSON.stringify(o);else n[i]=o}return n}r(71058)},32163:(e,t,r)=>{r.d(t,{eZ:()=>p});var n=r(51773),i=r(35671),o=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);function p({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},h){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(u),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,i.Hp)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;const m=function(e){const t=(0,i.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),g=[new s.Z,new o.Z];return new n.Z({title:m,content:g,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,i.Fv)(e,t);function u(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,i.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},28412:(e,t,r)=>{r.d(t,{CJ:()=>p,Rz:()=>u,xA:()=>l,z3:()=>d}),r(80442);var n=r(20256),i=r(4095),o=r(77987),s=r(78724),a=r(58333);const l=o.Z.fromJSON(a.I4),p=i.Z.fromJSON(a.ET),d=n.Z.fromJSON(a.lF),u=s.Z.fromJSON(a.qP);o.Z.fromJSON(a.eG),i.Z.fromJSON(a.wW),n.Z.fromJSON(a.lj)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9238],{64830:(e,t,r)=>{r.d(t,{Z:()=>s});var i=r(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,i.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,i.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(50758),s=r(92604),o=r(95330),n=r(64830),a=r(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((r,i)=>{let s=!0;const n=e=>{(0,o.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,o.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new a.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),n(r),this._clients[s])),(()=>(n(i),null))):(this._clients[s]=new a.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[s]=Promise.resolve(this._clients[s]),n(r))}}))}broadcast(e,t,r){const i=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const o=this._clientPromises[s];i[s]=o.then((i=>i?.invoke(e,t,r)))}return i}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,o.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,r){let i;Array.isArray(r)?(s.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),i={transferList:r}):i=r;const n=(0,o.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:i,resolver:n});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return n.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,i.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let i=0;i<this._clientPromises.length;++i)this._clientPromises[i].then((s=>{s&&(t[i]=s.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,r)=>{r.d(t,{bA:()=>J});var i=r(20102),s=r(80442),o=r(95330),n=r(80903),a=r(728),l=r(40330),u=r(92604),d=r(70586),c=r(94362),p=r(99880),h=r(68773),y=(r(2587),r(81271));const f={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),t}var g=r(41213);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:c.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,c.QM)(e);if(t&&t.type===c.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let i=await a.default.loadWorker(e);i||(i=await import(e));const s=a.default.connect(i);this._workerPostMessage({type:c.MessageType.OPENED,jobId:r,data:s})}}}var _=r(70171),v=r(17202);const S=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:C}=c.MessageType;let E,I;const F="Failed to create Worker. Fallback to execute module in main thread";async function j(e){return new Promise((t=>{function r(s){const o=(0,c.QM)(s);o&&o.type===C&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),S.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}function R(){let e;if(null!=h.default.default){const t={...h.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.default));e.assetsPath=(0,y.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,y.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,_.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,s.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,p.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.default.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,_.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={buildDate:v.r,fullVersion:l.bR,revision:v.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}let k=0;const{ABORT:T,INVOKE:P,OPEN:O,OPENED:M,RESPONSE:x}=c.MessageType;class Z{static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return j(new w);if(!E&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${R()}'`);E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+k++})}catch(t){S.warn(F,I),e=new w}else S.warn(F,I),e=new w;return j(e)}();return new Z(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,c.jt)();return new Promise(((t,s)=>{const n={resolve:t,reject:s,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:T,jobId:i})}))};this._outJobs.set(i,n),this._post({type:O,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case M:this._onOpenedMessage(t);break;case x:this._onResponseMessage(t);break;case T:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,n=s?new AbortController:null,a=this._inJobs,u=l.Nv[t];let d;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);d=u.call(null,i,{signal:n?n.signal:null})}catch(e){return void this._post({type:x,jobId:r,error:(0,c.AB)(e)})}(0,o.y8)(d)?(a.set(r,{controller:n,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:x,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:x,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:x,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,d.hw)(o.abortHandle),r?o.reject(i.Z.fromJSON(JSON.parse(r))):o.resolve(s))}_post(e,t,r){return(0,c.oi)(this.worker,e,t,r)}}const L=Math.min(navigator.hardwareConcurrency-1,(0,s.Z)("workers-pool-size"));let D=(0,s.Z)("esri-mobile")?Math.min(L,3):(0,s.Z)("host-browser")?L:0;D||(D=(0,s.Z)("safari")&&(0,s.Z)("mac")?7:2);let N=0;const A=[];async function q(e,t){const r=new n.Z;return await r.open(e,t),r}async function J(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const i=t.client||r;return q([a.default.connect(r)],{...t,client:i})}if(await async function(){if(U)return U;G=new AbortController;const e=[];for(let t=0;t<D;t++){const r=Z.create(t).then((e=>(A[t]=e,e)));e.push(r)}return U=Promise.all(e),U}(),(0,o.k_)(t.signal),"dedicated"===r){const r=N++%D;return q([await A[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,D);if(r<D){const i=new Array(r);for(let s=0;s<r;++s){const r=N++%D;i[s]=A[r].open(e,t)}return q(i,t)}}return q(A.map((r=>r.open(e,t))),t)}let G,U=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),s=r(3172),o=r(20102);async function n(e){if(null!=a.fetchBundleAsset)return a.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}const a={};var l,u=r(99880);(0,i.tz)((l={pattern:"esri/",location:u.V},new class{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new o.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",u=a[2],d=(0,i.Su)(s),c=`${l}${u}.json`,p=d?`${l}${u}_${d}.json`:c;let h;try{h=await n(e(p))}catch(t){if(p===c)throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{h=await n(e(c))}catch(e){throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}(l)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var i=r(92604),s=r(78286),o=r(19153),n=r(90344),a=r(18848);const l=i.Z.getLogger("esri.intl.substitute");function u(e,t,r={}){const{format:i={}}=r;return(0,o.gx)(e,(e=>function(e,t,r){let i,o;const n=e.indexOf(":");if(-1===n?i=e.trim():(i=e.slice(0,n).trim(),o=e.slice(n+1).trim()),!i)return"";const a=(0,s.hS)(i,t);if(null==a)return"";const l=(o?r?.[o]:null)??r?.[i];return l?d(a,l):o?c(a,o):p(a)}(e,t,i)))}function d(e,t){switch(t.type){case"date":return(0,n.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),p(e)}}function c(e,t){switch(t.toLowerCase()){case"dateformat":return(0,n.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,n.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):p(e)}}function p(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,n.p6)(e):""}}},19238:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ue});var i=r(43697),s=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382)),n=r(81571),a=r(91423),l=r(32400),u=r(3172),d=r(9790),c=r(2368),p=r(46791),h=r(20102),y=r(61247),f=r(22974),m=r(92604),g=r(70586),b=r(16453),w=r(78286),_=r(95330),v=r(42033),S=r(81271),C=r(5600),E=r(90578),I=r(71715),F=r(52011),j=r(30556),R=r(63213),k=r(55343),T=r(82971),P=r(87085),O=(r(66577),r(38171)),M=r(3920),x=r(80442),Z=r(83379),L=r(609),D=r(78346),N=r(75215),A=(r(67676),r(52421)),q=r(59431),J=r(28694),G=r(74889),U=r(6570),B=r(38913),$=r(86973);let W=0;const V="esri.layers.graphics.sources.MemorySource",H=m.Z.getLogger(V);let Q=class extends(Z.Z.LoadableMixin((0,L.v)((0,M.p)(p.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,J.p)(e,this.layer.spatialReference,r);const i=G.Z.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new h.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,J.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:U.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new h.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,q.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new h.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(W++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?B.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,D.bA)("MemorySourceWorker",{strategy:(0,x.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{H.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const u={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:$.P.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},d=await this._connection.invoke("load",u,{signal:e});for(const e of d.warnings)H.warn(e.message,{layer:this.layer,warning:e});d.featureErrors.length&&H.warn(`Encountered ${d.featureErrors.length} validation errors while loading features`,d.featureErrors);const c=d.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(c.geometryType=$.P.toJSON(l.inferredGeometryType)),this.sourceJSON=c,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(d.assignedObjectIds)}};(0,i._)([(0,A.c)({Type:O.Z,ensureType:(0,N.se)(O.Z)})],Q.prototype,"itemType",void 0),(0,i._)([(0,C.Cb)()],Q.prototype,"type",void 0),(0,i._)([(0,C.Cb)({constructOnly:!0})],Q.prototype,"layer",void 0),(0,i._)([(0,C.Cb)({readOnly:!0})],Q.prototype,"_workerGeometryType",null),(0,i._)([(0,C.Cb)()],Q.prototype,"sourceJSON",void 0),Q=(0,i._)([(0,F.j)(V)],Q);var z=r(54295),K=r(17287),Y=r(71612),X=r(17017),ee=r(66361),te=r(69637),re=r(53713),ie=r(6404),se=r(38009),oe=r(68825),ne=r(16859),ae=r(92036);let le=class extends ae.Z{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i._)([(0,C.Cb)()],le.prototype,"updating",void 0),(0,i._)([(0,C.Cb)()],le.prototype,"status",void 0),le=(0,i._)([(0,F.j)("esri.layers.support.PublishingInfo")],le);const ue=le,de="esri.layers.mixins.PublishableLayer",ce=Symbol(de),pe=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ue;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),i.remove()),e.status=o,e.updating=!1,i.removed||(t=setTimeout(r,s,s+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>i.remove())),r(250),this.own(i)}};return t=ce,(0,i._)([(0,C.Cb)({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=(0,i._)([(0,F.j)(de)],r),r};var he=r(34760),ye=r(72965),fe=r(28294),me=r(66677),ge=r(21506),be=r(50957),we=r(70082),_e=r(16451),ve=r(53518),Se=r(35671),Ce=r(54306),Ee=r(30707),Ie=r(72064),Fe=r(76259),je=r(60199),Re=r(10158),ke=r(40555),Te=r(14165),Pe=r(28141),Oe=r(32163),Me=r(65242);const xe="FeatureLayer",Ze="esri.layers.FeatureLayer",Le=m.Z.getLogger(Ze);function De(e,t){return new h.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ne(e){return e&&e instanceof p.Z}const Ae=(0,ve.v)();function qe(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Je=class extends((0,re.B)((0,ie.M)((0,te.b)(pe((0,ee.o1)((0,Y.h)((0,oe.c)((0,fe.n)((0,ye.M)((0,he.Q)((0,K.Y)((0,se.q)((0,ne.I)((0,b.R)((0,X.N)((0,z.V)((0,c.J)(P.Z)))))))))))))))))){constructor(...e){super(...e),this._handles=new y.Z,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.Z.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,g.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(_.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new h.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,be.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,(0,Ie.h)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,be.sX)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,w.RB)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,be.rk)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,be.kZ)(t.layerDefinition||t)}get parsedUrl(){const e=(0,S.mN)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,S.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,S.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Se.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,a.a)(i,t,r)??void 0;return e||Le.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}if(t.defaultSymbol)return t.types&&t.types.length?new n.Z({defaultSymbol:Ge(t.defaultSymbol,t,r),field:t.typeIdField,uniqueValueInfos:t.types.map((e=>({id:e.id,symbol:Ge(e.symbol,e,r)})))}):new o.Z({symbol:Ge(t.defaultSymbol,t,r)})}set source(e){const t=this._get("source");t!==e&&(Ne(t)&&this._resetMemorySource(t),Ne(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof p.Z?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=G.Z.fromJSON(t.featureSet);return new Q({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>we.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,me.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,me.Qc)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,me.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=_e.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){return(0,be.JD)(this,e,t,xe)}async updateAttachment(e,t,r){return(0,be.Y5)(this,e,t,r,xe)}async applyEdits(e,t){return(0,be.Jj)(this,e,t)}async uploadAssets(e,t){return(0,be.uj)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Oe.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,_.Hl)(Promise.all([r.e(4599),r.e(6502)]).then(r.bind(r,6502)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,be.rP)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,v._)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return(0,be.FV)(this,e,t,xe)}async fetchRecomputedExtents(e){return(0,be.Ci)(this,e,xe)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,be.SU)(this,e,t,xe)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Te.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){return(0,be.tD)(this,e,t,xe)}async queryFeatureCount(e,t){return(0,be.VG)(this,e,t,xe)}async queryExtent(e,t){return(0,be.KE)(this,e,t,xe)}async queryRelatedFeatures(e,t){return(0,be.kp)(this,e,t,xe)}async queryRelatedFeaturesCount(e,t){return(0,be.C9)(this,e,t,xe)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(xe,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Pe.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new h.Z(xe,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Pe.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(xe,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Pe.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(xe,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Pe.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(De(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(De(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(De(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(De(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new h.Z(xe,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,je.D)(this,e))}async save(e){const{save:t}=await r.e(2664).then(r.bind(r,32664));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(2664).then(r.bind(r,32664));return i(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,w.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,u.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,Se.YN)(this.renderer,this.fieldsIndex),(0,Se.UF)(this.timeInfo,this.fieldsIndex),(0,ke.y)(this,{origin:"service"})}async hasDataChanged(){return(0,be.gG)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new h.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new h.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};(0,i._)([(0,I.r)("service","capabilities")],Je.prototype,"readCapabilities",null),(0,i._)([(0,C.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Je.prototype,"charts",void 0),(0,i._)([(0,C.Cb)({readOnly:!0})],Je.prototype,"createQueryVersion",null),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.copyrightText"}}})],Je.prototype,"copyright",void 0),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.displayField"}}})],Je.prototype,"displayField",void 0),(0,i._)([(0,C.Cb)({types:d.LB,readOnly:!0})],Je.prototype,"defaultSymbol",void 0),(0,i._)([(0,C.Cb)({type:Re.n})],Je.prototype,"dynamicDataSource",void 0),(0,i._)([(0,C.Cb)({type:Boolean})],Je.prototype,"editingEnabled",null),(0,i._)([(0,I.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Je.prototype,"readEditingEnabled",null),(0,i._)([(0,I.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Je.prototype,"readEditingEnabledFromWebMap",null),(0,i._)([(0,j.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Je.prototype,"writeEditingEnabled",null),(0,i._)([(0,j.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Je.prototype,"writeEditingEnabledToWebMap",null),(0,i._)([(0,C.Cb)({readOnly:!0})],Je.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,C.Cb)({...Ae.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:qe}}}}})],Je.prototype,"fields",void 0),(0,i._)([(0,C.Cb)(Ae.fieldsIndex)],Je.prototype,"fieldsIndex",void 0),(0,i._)([(0,C.Cb)({type:k.Z,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Je.prototype,"formTemplate",void 0),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.extent"}}})],Je.prototype,"fullExtent",void 0),(0,i._)([(0,C.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:qe,writer(e,t,r){const i=e?be.Fr.toJSON(e):null;i&&(0,w.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:be.Fr.read}}})],Je.prototype,"geometryType",void 0),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.hasM"}}})],Je.prototype,"hasM",void 0),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.hasZ"}}})],Je.prototype,"hasZ",void 0),(0,i._)([(0,C.Cb)(ge.id)],Je.prototype,"id",void 0),(0,i._)([(0,C.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Je.prototype,"infoFor3D",void 0),(0,i._)([(0,C.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Je.prototype,"isTable",void 0),(0,i._)([(0,I.r)("service","isTable",["type","geometryType"]),(0,I.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Je.prototype,"readIsTable",null),(0,i._)([(0,j.c)("web-map","isTable")],Je.prototype,"writeIsTable",null),(0,i._)([(0,C.Cb)(ge.iR)],Je.prototype,"labelsVisible",void 0),(0,i._)([(0,C.Cb)({type:[Ce.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:Ee.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:Ee.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Je.prototype,"labelingInfo",void 0),(0,i._)([(0,C.Cb)((()=>{const e=(0,f.d9)(ge.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,w.RB)(r,(0,Me.a)(e),t)}}},e})())],Je.prototype,"opacity",void 0),(0,i._)([(0,C.Cb)(ge.rn)],Je.prototype,"legendEnabled",void 0),(0,i._)([(0,C.Cb)({type:["show","hide"],json:(()=>{const e=(0,f.d9)(ge.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Je.prototype,"listMode",void 0),(0,i._)([(0,I.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Je.prototype,"readGlobalIdField",null),(0,i._)([(0,C.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:qe}}}}})],Je.prototype,"objectIdField",void 0),(0,i._)([(0,I.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Je.prototype,"readObjectIdField",null),(0,i._)([(0,C.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Je.prototype,"operationalLayerType",void 0),(0,i._)([(0,C.Cb)(Ae.outFields)],Je.prototype,"outFields",void 0),(0,i._)([(0,C.Cb)({readOnly:!0})],Je.prototype,"parsedUrl",null),(0,i._)([(0,C.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Je.prototype,"path",void 0),(0,i._)([(0,C.Cb)(ge.C_)],Je.prototype,"popupEnabled",void 0),(0,i._)([(0,C.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Je.prototype,"popupTemplate",void 0),(0,i._)([(0,C.Cb)({readOnly:!0})],Je.prototype,"defaultPopupTemplate",null),(0,i._)([(0,C.Cb)({types:l.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:l.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Je.prototype,"renderer",null),(0,i._)([(0,I.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,I.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Je.prototype,"readRenderer",null),(0,i._)([(0,C.Cb)((()=>{const e=(0,f.d9)(ge.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Je.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,C.Cb)({clonable:!1})],Je.prototype,"source",null),(0,i._)([(0,E.p)("source")],Je.prototype,"castSource",null),(0,i._)([(0,I.r)("portal-item","source",["featureSet"]),(0,I.r)("web-map","source",["featureSet"])],Je.prototype,"readSource",null),(0,i._)([(0,C.Cb)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Je.prototype,"spatialReference",void 0),(0,i._)([(0,C.Cb)({type:Number})],Je.prototype,"subtypeCode",void 0),(0,i._)([(0,C.Cb)({type:[we.Z]})],Je.prototype,"templates",void 0),(0,i._)([(0,I.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Je.prototype,"readTemplates",null),(0,i._)([(0,C.Cb)({type:Fe.Z})],Je.prototype,"timeInfo",void 0),(0,i._)([(0,C.Cb)()],Je.prototype,"title",void 0),(0,i._)([(0,I.r)("service","title",["name"]),(0,I.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Je.prototype,"readTitle",null),(0,i._)([(0,I.r)("web-map","title",["layerDefinition.name","title"])],Je.prototype,"readTitleFromWebMap",null),(0,i._)([(0,C.Cb)({type:String})],Je.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,C.Cb)({json:{read:!1}})],Je.prototype,"type",void 0),(0,i._)([(0,C.Cb)({type:String})],Je.prototype,"typeIdField",void 0),(0,i._)([(0,I.r)("service","typeIdField"),(0,I.r)("typeIdField",["layerDefinition.typeIdField"])],Je.prototype,"readTypeIdField",null),(0,i._)([(0,C.Cb)({type:[_e.Z]})],Je.prototype,"types",void 0),(0,i._)([(0,I.r)("service","types",["types"]),(0,I.r)("types",["layerDefinition.types"])],Je.prototype,"readTypes",null),(0,i._)([(0,C.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Je.prototype,"visible",void 0),(0,i._)([(0,I.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Je.prototype,"readVisible",null),Je=(0,i._)([(0,F.j)(Ze)],Je);const Ge=(0,R.d)({types:d.QT}),Ue=Je},69637:(e,t,r)=>{r.d(t,{b:()=>j});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(67760),c=r(66577),p=r(92835),h=r(35454),y=r(22974),f=r(14165);const m=new h.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new f.Z({geometry:(0,y.d9)(r),objectIds:(0,y.d9)(o),spatialRelationship:i,timeExtent:(0,y.d9)(s),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new i({geometry:(0,y.d9)(t),objectIds:(0,y.d9)(o),spatialRelationship:r,timeExtent:(0,y.d9)(s),where:e,units:n,distance:a})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],b.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:c.qM,json:{write:!0}})],b.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],b.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:p.Z,json:{write:!0}})],b.prototype,"timeExtent",void 0),b=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],b);const w=b;var _;const v={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let E=_=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],E.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":v,"portal-item":v}}})],E.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],E.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],E.prototype,"excludedLabelsVisible",void 0),E=_=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],E);const I=E,F={write:{allowNull:!0}},j=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":F,"portal-item":F}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let c=i=class extends u.wq{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._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],c.prototype,"order",void 0),c=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],c);const p=c;function h(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new p;return s.read(i,r),[s]}function y(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[p],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(67900),s=r(8744);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function n(e,t,r){if(!e&&!t||!r)return;const s=(0,i._R)(r);a(e,r,s),a(t,r,s)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(null==e||!e.spatialReference||(0,s.fS)(e.spatialReference,t))return;const n=(0,i._R)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}},28141:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(92835),a=r(35454),l=r(96674),u=r(22974),d=r(5600),c=r(75215),p=r(52011),h=r(30556),y=r(33955);r(67676),r(80442);let f=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=i=(0,s._)([(0,p.j)("esri.rest.support.TopFilter")],f);const m=f;var g,b=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],v.prototype,"cacheHint",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],v.prototype,"distance",void 0),(0,s._)([(0,d.Cb)({types:o.qM,json:{read:y.im,write:!0}})],v.prototype,"geometry",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"geometryPrecision",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],v.prototype,"num",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"objectIds",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"orderByFields",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"outFields",void 0),(0,s._)([(0,d.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],v.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"resultType",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"returnGeometry",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnZ",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],v.prototype,"start",void 0),(0,s._)([(0,h.c)("start"),(0,h.c)("num")],v.prototype,"writeStart",null),(0,s._)([(0,d.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],v.prototype,"spatialRelationship",void 0),(0,s._)([(0,d.Cb)({type:n.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),(0,s._)([(0,d.Cb)({type:m,json:{write:!0}})],v.prototype,"topFilter",void 0),(0,s._)([(0,d.Cb)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],v.prototype,"units",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),v=g=(0,s._)([(0,p.j)("esri.rest.support.TopFeaturesQuery")],v),v.from=(0,c.se)(v);const S=v}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4305,5732],{84552:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),i=r(2368),o=r(96674),n=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),d=r(78981);let p=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.rJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,l.J)(d.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,s._)([(0,u.j)("esri.TimeInterval")],p);const c=p},5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},64830:(e,t,r)=>{r.d(t,{Z:()=>i});var s=r(70586);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,s.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,s.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,r)=>{r.d(t,{Z:()=>l});var s=r(50758),i=r(92604),o=r(95330),n=r(64830),a=r(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((r,s)=>{let i=!0;const n=e=>{(0,o.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const l=e[i];(0,o.y8)(l)?this._clientPromises[i]=l.then((e=>(this._clients[i]=new a.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),n(r),this._clients[i])),(()=>(n(s),null))):(this._clients[i]=new a.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[i]=Promise.resolve(this._clients[i]),n(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];s[i]=o.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,o.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,r){let s;Array.isArray(r)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),s={transferList:r}):s=r;const n=(0,o.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:n});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return n.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,r)=>{r.d(t,{bA:()=>D});var s=r(20102),i=r(80442),o=r(95330),n=r(80903),a=r(728),l=r(40330),u=r(92604),d=r(70586),p=r(94362),c=r(99880),h=r(68773),f=(r(2587),r(81271));const y={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=y.baseUrl),t}var g=r(41213);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new w,this._workerPostMessage({type:p.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,p.QM)(e);if(t&&t.type===p.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await a.default.loadWorker(e);s||(s=await import(e));const i=a.default.connect(s);this._workerPostMessage({type:p.MessageType.OPENED,jobId:r,data:i})}}}var v=r(70171),_=r(17202);const E=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:C}=p.MessageType;let k,I;const S="Failed to create Worker. Fallback to execute module in main thread";async function x(e){return new Promise((t=>{function r(i){const o=(0,p.QM)(i);o&&o.type===C&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),E.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}function j(){let e;if(null!=h.default.default){const t={...h.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.default));e.assetsPath=(0,f.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,f.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,i.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,f.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,f.hF)(e.workers.workerPath):e.workers.workerPath=(0,f.hF)((0,c.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.default.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,v.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:_.r,fullVersion:l.bR,revision:_.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}let O=0;const{ABORT:F,INVOKE:P,OPEN:R,OPENED:N,RESPONSE:T}=p.MessageType;class Z{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers")||((0,i.Z)("mozilla"),0))return x(new b);if(!k&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${j()}'`);k=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(k)try{e=new Worker(k,{name:"esri-worker-"+O++})}catch(t){E.warn(S,I),e=new b}else E.warn(S,I),e=new b;return x(e)}();return new Z(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,p.jt)();return new Promise(((t,i)=>{const n={resolve:t,reject:i,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(s),this._post({type:F,jobId:s})}))};this._outJobs.set(s,n),this._post({type:R,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,p.QM)(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case T:this._onResponseMessage(t);break;case F:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,n=i?new AbortController:null,a=this._inJobs,u=l.Nv[t];let d;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);d=u.call(null,s,{signal:n?n.signal:null})}catch(e){return void this._post({type:T,jobId:r,error:(0,p.AB)(e)})}(0,o.y8)(d)?(a.set(r,{controller:n,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:T,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:T,jobId:r,error:(0,p.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:T,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.hw)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,d.hw)(o.abortHandle),r?o.reject(s.Z.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,p.oi)(this.worker,e,t,r)}}const A=Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size"));let J=(0,i.Z)("esri-mobile")?Math.min(A,3):(0,i.Z)("host-browser")?A:0;J||(J=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let M=0;const U=[];async function L(e,t){const r=new n.Z;return await r.open(e,t),r}async function D(e,t={}){if("string"!=typeof e)throw new s.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const s=t.client||r;return L([a.default.connect(r)],{...t,client:s})}if(await async function(){if(B)return B;q=new AbortController;const e=[];for(let t=0;t<J;t++){const r=Z.create(t).then((e=>(U[t]=e,e)));e.push(r)}return B=Promise.all(e),B}(),(0,o.k_)(t.signal),"dedicated"===r){const r=M++%J;return L([await U[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,J);if(r<J){const s=new Array(r);for(let i=0;i<r;++i){const r=M++%J;s[i]=U[r].open(e,t)}return L(s,t)}}return L(U.map((r=>r.open(e,t))),t)}let q,B=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var s=r(94443),i=r(3172),o=r(20102);async function n(e){if(null!=a.fetchBundleAsset)return a.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}const a={};var l,u=r(99880);(0,s.tz)((l={pattern:"esri/",location:u.V},new class{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new o.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",u=a[2],d=(0,s.Su)(i),p=`${l}${u}.json`,c=d?`${l}${u}_${d}.json`:p;let h;try{h=await n(e(c))}catch(t){if(c===p)throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{h=await n(e(p))}catch(e){throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}(l)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var s=r(92604),i=r(78286),o=r(19153),n=r(90344),a=r(18848);const l=s.Z.getLogger("esri.intl.substitute");function u(e,t,r={}){const{format:s={}}=r;return(0,o.gx)(e,(e=>function(e,t,r){let s,o;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),o=e.slice(n+1).trim()),!s)return"";const a=(0,i.hS)(s,t);if(null==a)return"";const l=(o?r?.[o]:null)??r?.[s];return l?d(a,l):o?p(a,o):c(a)}(e,t,s)))}function d(e,t){switch(t.type){case"date":return(0,n.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),c(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,n.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,n.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):c(e)}}function c(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,n.p6)(e):""}}},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var s=r(43697),i=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),n=r(16453),a=r(95330),l=r(81271),u=r(5600),d=(r(75215),r(67676),r(80442)),p=r(52011),c=r(86973),h=r(87085),f=r(20102),y=r(83379),m=r(92604),g=r(78346),w=r(25278),b=r(74889),v=r(6570),_=r(38913);const E="esri.layers.graphics.sources.GeoJSONSource",C=m.Z.getLogger(E);let k=class extends y.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,a.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>b.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:v.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new f.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new f.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,g.bA)("GeoJSONSourceWorker",{strategy:(0,d.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,hasZ:s,geometryType:i,objectIdField:o,url:n,timeInfo:a,customParameters:l}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),p={url:n,customParameters:l,fields:t&&t.map((e=>e.toJSON())),geometryType:c.M.toJSON(i),hasZ:s,objectIdField:o,timeInfo:a?a.toJSON():null,spatialReference:u?null:r&&r.toJSON()},h=await this._connection.invoke("load",p,{signal:e});for(const e of h.warnings)C.warn(e.message,{layer:this.layer,warning:e});h.featureErrors.length&&C.warn(`Encountered ${h.featureErrors.length} validation errors while loading features`,h.featureErrors),this.sourceJSON=h.layerDefinition,this.capabilities=(0,w.MS)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,u.Cb)()],k.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)()],k.prototype,"type",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],k.prototype,"layer",void 0),(0,s._)([(0,u.Cb)()],k.prototype,"sourceJSON",void 0),k=(0,s._)([(0,p.j)(E)],k);var I=r(71612),S=r(17017),x=r(69637),j=r(6404),O=r(38009),F=r(68825),P=r(16859),R=r(34760),N=r(72965),T=r(28294),Z=r(21506),A=r(70082),J=r(16451),M=r(1231),U=r(53518),L=r(35671),D=r(54306),q=r(30707),B=r(14165),$=r(32163),H=r(82971);const Q=(0,U.v)();let W=class extends((0,F.c)((0,S.N)((0,j.M)((0,x.b)((0,I.h)((0,T.n)((0,N.M)((0,R.Q)((0,O.q)((0,P.I)((0,n.R)(h.Z)))))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new k({layer:this}),this.spatialReference=H.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(a.r9).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,L.YN)(this.renderer,this.fieldsIndex),(0,L.UF)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,l.mN)(this.url):null}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720));await this.load();const i=await s(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,$.eZ)(this,e)}createQuery(){const e=new B.Z,t=this.get("capabilities.data");e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){let r,s=!1;const i=t&&t.feature,o=i&&i.attributes,n=this.typeIdField&&o&&o[this.typeIdField];return null!=n&&this.types&&(s=this.types.some((t=>t.id==n&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),s||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(B.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(B.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(B.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(B.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],W.prototype,"capabilities",null),(0,s._)([(0,u.Cb)({type:String})],W.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],W.prototype,"createQueryVersion",null),(0,s._)([(0,u.Cb)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],W.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({type:String})],W.prototype,"displayField",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],W.prototype,"editingEnabled",void 0),(0,s._)([(0,u.Cb)(Z.PV)],W.prototype,"elevationInfo",void 0),(0,s._)([(0,u.Cb)({type:[M.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],W.prototype,"fields",void 0),(0,s._)([(0,u.Cb)(Q.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)({type:v.Z,json:{name:"extent"}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.M.read}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],W.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)(Z.id)],W.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,readOnly:!0})],W.prototype,"isTable",null),(0,s._)([(0,u.Cb)(Z.iR)],W.prototype,"labelsVisible",void 0),(0,s._)([(0,u.Cb)({type:[D.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q.r},write:!0}})],W.prototype,"labelingInfo",void 0),(0,s._)([(0,u.Cb)(Z.rn)],W.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],W.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],W.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)(Z.Oh)],W.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["GeoJSON"]})],W.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],W.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)(Z.C_)],W.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:i.Z,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({types:o.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:o.o}}}})],W.prototype,"renderer",null),(0,s._)([(0,u.Cb)(Z.YI)],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],W.prototype,"source",void 0),(0,s._)([(0,u.Cb)({type:H.Z})],W.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:[A.Z]})],W.prototype,"templates",void 0),(0,s._)([(0,u.Cb)()],W.prototype,"title",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],W.prototype,"type",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0})],W.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({type:[J.Z]})],W.prototype,"types",void 0),(0,s._)([(0,u.Cb)(Z.HQ)],W.prototype,"url",null),W=(0,s._)([(0,p.j)("esri.layers.GeoJSONLayer")],W);const V=W},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>a});var s=r(80442),i=r(22974),o=r(61159),n=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.I4:"esriGeometryPolyline"===e?n.ET:n.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},69637:(e,t,r)=>{r.d(t,{b:()=>x});var s,i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(67760),p=r(66577),c=r(92835),h=r(35454),f=r(22974),y=r(14165);const m=new h.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=s=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:o,units:n,distance:a}=this;return new y.Z({geometry:(0,f.d9)(r),objectIds:(0,f.d9)(o),spatialRelationship:s,timeExtent:(0,f.d9)(i),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:o,units:n,distance:a}=this;return new s({geometry:(0,f.d9)(t),objectIds:(0,f.d9)(o),spatialRelationship:r,timeExtent:(0,f.d9)(i),where:e,units:n,distance:a})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,i._)([(0,o.Cb)({types:p.qM,json:{write:!0}})],w.prototype,"geometry",void 0),(0,i._)([(0,o.Cb)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,i._)([(0,o.Cb)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,i._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,i._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=s=(0,i._)([(0,n.j)("esri.layers.support.FeatureFilter")],w);const b=w;var v;const _={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},E={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let k=v=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,o.Cb)({type:b,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.RB)(r,i,t):(0,u.RB)(r,null,t)}}}})],k.prototype,"filter",void 0),(0,i._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],k.prototype,"includedEffect",void 0),(0,i._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":E,"portal-item":E}}})],k.prototype,"excludedEffect",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],k.prototype,"excludedLabelsVisible",void 0),k=v=(0,i._)([(0,n.j)("esri.layers.support.FeatureEffect")],k);const I=k,S={write:{allowNull:!0}},x=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,o.Cb)({type:I,json:{origins:{"web-map":S,"portal-item":S}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>y});var s,i=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let p=s=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,a.j)("esri.layers.support.OrderByInfo")],p);const c=p;function h(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new c;return i.read(s,r),[i]}function f(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,o.RB)(r,[i.toJSON()],t)}const y=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var s=r(43697),i=r(92835),o=r(84552),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(35671),d=r(76259),p=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.v.fromJSON(r.timeOffsetUnits);return s&&i?new o.Z({value:s,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,n.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,n.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,s._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,n.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,n.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),i=r(2368),o=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({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 d=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:u.read,write:u.write}})],d.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"thumbnail",void 0),d=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],d);const p=d},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var s=r(43697),i=r(92835),o=r(84552),n=r(2368),a=r(96674),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),p=r(30556),c=r(80216);function h(e,t){return o.Z.fromJSON({value:e,unit:t})}let f=class extends((0,n.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.Z({start:r,end:s})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,s._)([(0,l.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,s._)([(0,l.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,s._)([(0,p.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,s._)([(0,l.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,s._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,s._)([(0,p.c)("interval")],f.prototype,"writeInterval",null),(0,s._)([(0,l.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,s._)([(0,l.Cb)({type:c.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,s._)([(0,d.j)("esri.layers.support.TimeInfo")],f);const y=f},53518:(e,t,r)=>{r.d(t,{v:()=>a});var s=r(92604),i=r(1231),o=r(99514),n=r(35671);function a(){return{fields:{type:[i.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new o.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,n.Q0)(this.fieldsIndex,e)}}}}},78981:(e,t,r)=>{r.d(t,{v:()=>s});const s=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
|