@arcgis/core 4.34.0-next.16 → 4.34.0-next.18
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/analysis/Analysis.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/analysis/DimensionAnalysis.js +1 -1
- package/analysis/DimensionSimpleStyle.js +1 -1
- package/analysis/DirectLineMeasurementAnalysis.js +1 -1
- package/analysis/LengthDimension.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/SlicePlane.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
- package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
- package/assets/esri/core/workers/chunks/{58f403f956b7b3467344.js → 42da01bd3f401a017c0f.js} +1 -1
- package/assets/esri/core/workers/chunks/4325fdd96d9ea344132e.js +1 -0
- package/assets/esri/core/workers/chunks/{a6bcae413e62cd879b46.js → 5859e425c9bca96b6c80.js} +1 -1
- package/assets/esri/core/workers/chunks/5bfccd5dffda74740aa4.js +1 -0
- package/assets/esri/core/workers/chunks/68374cf42a069436830d.js +1 -0
- package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
- package/assets/esri/core/workers/chunks/85753105268aeff84e69.js +1 -0
- package/assets/esri/core/workers/chunks/{2990145d7ac3af0d68be.js → 8599df135928d73da4a3.js} +1 -1
- package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
- package/assets/esri/core/workers/chunks/872f151a3a2bc9052be0.js +1 -0
- package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
- package/assets/esri/core/workers/chunks/974c6b0e3a1f1dd523fa.js +1 -0
- package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
- package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
- package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
- package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
- package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
- package/assets/esri/core/workers/chunks/aeabe203da7bcdd580cf.js +1 -0
- package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
- package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
- package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
- package/assets/esri/core/workers/chunks/{243eb8a317333ec2715b.js → f3e179b48bca50c94538.js} +1 -1
- package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
- package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
- package/assets/esri/themes/base/widgets/_Legend.scss +2 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/chunks/sphere.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/trackingUtils.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/sql.js +1 -1
- package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +60 -43
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevation.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/jsonUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/support/drapedUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
- package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
- package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
- package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
- package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
- package/assets/esri/core/workers/chunks/54814a269d44855f0673.js +0 -1
- package/assets/esri/core/workers/chunks/632d1a1287dde980479e.js +0 -1
- package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
- package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
- package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
- package/assets/esri/core/workers/chunks/948c5454881e661c3bdc.js +0 -1
- package/assets/esri/core/workers/chunks/95507ff0a243e451b99e.js +0 -1
- package/assets/esri/core/workers/chunks/9959a91c8de6fef499c2.js +0 -1
- package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
- package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
- package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
- package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
- package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,9945],{4197:(e,t,r)=>{r.d(t,{jh:()=>n,l5:()=>s,xm:()=>o});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>w});var i=r(92602),n=r(49186),o=r(53966),s=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=r(78888),y=r(65864),h=r(2272),f=r(84952),d=r(92300);const m=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function _(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new n.A("internal:geometry",e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),u=(a-o)/l,p=(s-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,s=p*i+n,a=u*i+o;r.push([s,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+n,s=u*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function M(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function x(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,l.r8)(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 i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.r8)(o))e[n]=e[n].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function w(e,t,r){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,g,b,S,v,T,F,N,A=0;const O=[],I=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,u.Vp)(o),b=o.isWebMercator,T=b?102100:4326,S=l.j7[T].maxX,v=l.j7[T].minX,F=l.j7[T].plus180Line,N=l.j7[T].minus180Line),g)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(M(t.clone(),S,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>M(e,S,v))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);I.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,v)*(2*S);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(F)&&o!==S?(A=o>A?o:A,i=_(i,b),O.push(i),I.push("cut")):e.intersects(N)&&n!==v?(A=o*(2*S)>A?o*(2*S):A,i=_(i,b,360),O.push(i),I.push("cut")):I.push(i)}else I.push(t.clone());else I.push(t);else I.push(t);let Z=(0,l.kd)(A,S),L=-90;const R=Z,j=new a.A;for(;Z>0;){const e=360*Z-180;j.addPath([[e,L],[e,-1*L]]),L*=-1,Z--}if(O.length>0&&R>0){const t=x(O,await async function(e,t,r,i){const n=(0,h.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(n.path+"/cut",s),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,y.rS)(e);return t.spatialReference=o,t}))}}(n,O,j,r)),i=[],o=[];for(let r=0;r<I.length;r++){const n=I[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(b?(0,p.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,o=(0,y.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,d.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",s);return(0,d.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(b?(0,p.Gh)(s.shift()):s.shift())}return a}const J=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)J.push(t);else{const e=O.shift();J.push(!0===b?(0,p.Gh)(e):e)}}return J}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let p=e+(a-l)*s;const c=p-t;return c>o?p-=s:c<n&&(p+=s),p}},17311:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69622),o=r(4576),s=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),c=r(43668);let y=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){return(await this.getTitles(e,[t],r)).get(t)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,l=a&&s;t.forEach((t=>{const r=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:a}):"";i.set(t,r)}))}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(o.Ru);if(r.length!==t.length)return t;if(t.some((e=>!(0,p.Kl)(e,this.requiredFields)))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"_arcadeTask",null),(0,i._)([(0,l.MZ)()],y.prototype,"_featureUtils",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"featureUtilsPromise",null),(0,i._)([(0,l.MZ)({readOnly:!0})],y.prototype,"calculatedExpressions",null),(0,i._)([(0,l.MZ)()],y.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,l.MZ)()],y.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"fieldInfoMap",null),(0,i._)([(0,l.MZ)()],y.prototype,"fields",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],y.prototype,"requiredFields",null),y=(0,i._)([(0,u.$)("esri.layers.support.TitleCreator")],y)},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),f=r(65864),d=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-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:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;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===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],b.prototype,"features",void 0),(0,n._)([(0,p.w)("features")],b.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:d.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n._)([(0,p.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:h.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>n});var i=r(59247);function n(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;for(let e=n.length;e<r.length;e++)n.push((0,i.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},33032:(e,t,r)=>{r.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let r=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),c=r(29005);let y=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,s.MZ)({type:[c.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],y)},41366:(e,t,r)=>{r.d(t,{K:()=>y,Q:()=>u});var i=r(90237),n=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",c="field",y=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&p||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>p,yR:()=>y});var i=r(66552),n=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),y={base:o.A,key:"type",typeMap:{extent:n.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var i,n=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),p=r(36708),c=r(24326),y=r(10107),h=(r(44208),r(87811),r(40608)),f=r(12195),d=r(65864),m=r(50498),g=r(54339),b=r(33910);function _(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(s.A.ClonableMixin(l.A)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:_(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,p.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,d.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,n._)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,n._)([(0,y.MZ)({value:null,types:m.yR,json:{read:d.rS}})],M.prototype,"geometry",null),(0,n._)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,n._)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,n._)([(0,y.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,n._)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,n._)([(0,y.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,n._)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,n._)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=i=(0,n._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>p,$b:()=>c,Nd:()=>y,jm:()=>h,sK:()=>m});var i=r(40876),n=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,i,n,o,s,a,l,u,p,c,y,h,f,d){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=i,m[4]=n,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=p,m[11]=c,m[12]=y,m[13]=h,m[14]=f,m[15]=d,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=f(e.strength,t.strength,r),this.radius=f(e.radius,t.radius,r),this.threshold=f(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:d(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(f(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:d(this.radius)}}}class p{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r),this._updateMatrix()}clone(){return new p(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,i=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class c{constructor(e,t,r,i){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=i,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=f(e.offsetX,t.offsetX,r),this.offsetY=f(e.offsetY,t.offsetY,r),this.blurRadius=f(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(f(e.color[0],t.color[0],r)),this.color[1]=Math.round(f(e.color[1],t.color[1],r)),this.color[2]=Math.round(f(e.color[2],t.color[2],r)),this.color[3]=f(e.color[3],t.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:d(this.offsetX),yoffset:d(this.offsetY),blurRadius:d(this.blurRadius),color:e}}}class y{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=f(e.angle,t.angle,r),this._updateMatrix()}clone(){return new y(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),i=Math.cos(t*Math.PI/180),n=(0,a.hZ)(e,.213+.787*i-.213*r,.715-.715*i-.715*r,.072-.072*i+.928*r,0,.213-.213*i+.143*r,.715+.285*i+.14*r,.072-.072*i-.283*r,0,.213-.213*i-.787*r,.715-.715*i+.715*r,.072+.928*i+.072*r,0,0,0,0,1);return(0,a.mg)(n,n)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function f(e,t,r){return e+(t-e)*r}function d(e){return Math.round(1e3*(0,n.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new p(e.type,0);case"saturate":case"brightness":case"contrast":return new p(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new y(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,i.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},61760:(e,t,r)=>{r.d(t,{PU:()=>s,YW:()=>l,ex:()=>n,hv:()=>a,zp:()=>o}),r(34727);var i=r(90629);r(87317),r(91829);const n=2.4;function o(e){return(0,i.PN)(e*n)}function s(e){return(0,i.Lz)(e)/n}function a(e,t,r){const i=Math.sqrt(e**2+t**2)/r;return i>1?0:3/(Math.PI*r**2)*(1-i**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>y,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>p,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>d,iT:()=>c,is:()=>_,qv:()=>x,vI:()=>f,vY:()=>a,v_:()=>w,vt:()=>o,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function a(e,t=o()){return function(e,t,r,i=o()){return d(i,x),function(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[r,i,o,s,a,l]=e;return t[0]=r,t[1]=i,t[2]=o,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=i,t[14]=o,t[15]=s,t[16]=i,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function y(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,x):o(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),n=r(16930),o=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>n});var i=r(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,r){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),n=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),p=r(56400),c=r(96285);const y=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=d(t);if(t&&i){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?c.mQ.utcInstance:(0,o.tE)(y,t,(()=>c.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function d(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):a??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,p.ZS)(i.timeReference):a:null,y=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(o),c],[f(s),c]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=y.get(f(i??""))??a;t.set(i,e)}return t}},96953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(90237),n=r(52106),o=r(5503),s=r(49186),a=r(4718),l=r(92071),u=r(93637),p=r(67076),c=r(10107),y=(r(44208),r(53966),r(36005)),h=r(40608),f=r(43937),d=r(5443),m=r(98988),g=r(16930),b=r(19419),_=r(17136),M=r(21325),x=r(13600),w=r(94194),S=r(4146),v=r(33032),T=r(63074),F=r(16131),N=r(8303),A=r(25036),O=r(20437),I=r(94985),Z=r(31593),L=r(53930),R=r(68249);function j(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!J(e)))}function J({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return C.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function P(){return new d.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const z=new O.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),G=new O.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let k=class extends w.A{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)(P(),e).geometry:(0,b.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,b.Ie)();return this.graphics.forEach((r=>{const i=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=i&&(0,b.fT)(t,"point"===i.type?i:i.extent,t)})),(0,b.aI)(t,b.qv)?null:t}get sublayers(){return this.graphics}};(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"fullBounds",null),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"sublayers",null),(0,i._)([(0,c.MZ)()],k.prototype,"layer",void 0),(0,i._)([(0,c.MZ)()],k.prototype,"layerId",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],k.prototype,"visibilityMode",void 0),k=(0,i._)([(0,h.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],k);const C=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new I.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new Z.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new R.A).toJSON()}];let E=class extends((0,T.dM)((0,A.j)((0,F.q)((0,N.A)((0,l.P)(S.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=g.A.WGS84,this.sublayers=new o.A(C.map((e=>new k({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!j(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!j(t))return null;const i=t.layers.map((e=>{const t=new x.default;return t.read(e,r),t}));return new o.A({items:i})}readLegacyfeatureCollectionJSON(e,t){return j(t)?(0,a.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,b.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,b.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const i=(0,m.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=i&&(0,b.fT)(t,i,t)})),(0,b.aI)(t,b.qv)?(0,m.projectOrLoad)(P(),e).geometry:(0,b.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?g.A.fromJSON(t.layers[0].layerDefinition.spatialReference):g.A.WGS84}readSublayers(e,t,r){if(j(t))return null;const i=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,o=t.id??s++,a=J(e);if(null!=a){const e=new k({id:a.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:i})=>n.A.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:i})))});i.push(e)}}return new o.A(i)}writeSublayers(e,t,r,i){const{minScale:n,maxScale:o}=this;if(null==e)return;const a=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(a&&i?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const l=[];let p=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){p=e.geometry.spatialReference.toJSON();break e}for(const t of C){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(l,r,t,n,o,p,i)}(0,u.sM)("featureCollection.layers",l,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,a.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const i of r.graphics)if(null!=i.geometry){const r=i.geometry;e?(0,M.aI)(r.spatialReference,e)||((0,m.canProjectWithoutEngine)(r.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),i.geometry=(0,m.project)(r,e)):e=r.spatialReference,t.push(i)}const r=await(0,_.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,i,n,o,s){const l=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(l,e,r.geometryType,s);this._normalizeObjectIds(l,z),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,a.o8)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:i,maxScale:n,objectIdField:"OBJECTID",fields:[z.toJSON(),G.toJSON()],spatialReference:o},featureSet:{features:l,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,i){if(null==t)return;const{geometry:n,symbol:o,popupTemplate:s}=t;if(null==n)return;if(n.type!==r)return void i?.messages?.push(new p.A("map-notes-layer:invalid-geometry-type",`Geometry "${n.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==o)return void i?.messages?.push(new p.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const a={attributes:{...t.attributes},geometry:n.toJSON(),symbol:o.toJSON()};null!=s&&(a.popupInfo=s.toJSON()),e.push(a)}_normalizeObjectIds(e,t){const r=t.name;let i=(0,v.H)(r,e)+1;const n=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||n.has(e[r]))&&(e[r]=i++),n.add(e[r])}}};(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,i._)([(0,y.w)(["portal-item","web-map"],"capabilities",["layers"])],E.prototype,"readCapabilities",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"featureCollections",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"featureCollections",["layers"])],E.prototype,"readFeatureCollections",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],E.prototype,"featureCollectionJSON",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],E.prototype,"readLegacyfeatureCollectionJSON",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],E.prototype,"featureCollectionType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],E.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],E.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"minScale",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"minScale",["layers"])],E.prototype,"readMinScale",null),(0,i._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"maxScale",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"maxScale",["layers"])],E.prototype,"readMaxScale",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"multipointLayer",null),(0,i._)([(0,c.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],E.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"pointLayer",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"polygonLayer",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"polylineLayer",null),(0,i._)([(0,c.MZ)({type:g.A})],E.prototype,"spatialReference",void 0),(0,i._)([(0,y.w)(["web-map","portal-item"],"spatialReference",["layers"])],E.prototype,"readSpatialReference",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],E.prototype,"sublayers",void 0),(0,i._)([(0,y.w)("web-map","sublayers",["layers"])],E.prototype,"readSublayers",null),(0,i._)([(0,f.K)("web-map","sublayers")],E.prototype,"writeSublayers",null),(0,i._)([(0,c.MZ)({readOnly:!0})],E.prototype,"textLayer",null),(0,i._)([(0,c.MZ)()],E.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],E.prototype,"type",void 0),E=(0,i._)([(0,h.$)("esri.layers.MapNotesLayer")],E);const q=E}}]);
|