@arcgis/core 5.1.0-next.20 → 5.1.0-next.21
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/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +45 -15
- package/applications/Components/QuantityFormatter.d.ts +11 -11
- package/applications/Components/SelectionOperation.d.ts +11 -11
- package/applications/Components/SketchTooltipControls.d.ts +9 -9
- package/applications/Components/actionUtils.d.ts +2 -1
- package/applications/Components/analysisUtils.d.ts +27 -26
- package/applications/Components/applySetUtils.d.ts +40 -40
- package/applications/Components/arcadeEditorUtils.d.ts +3 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +12 -12
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -2
- package/applications/Components/clipboard.d.ts +14 -14
- package/applications/Components/drawUtils.d.ts +3 -3
- package/applications/Components/editUtils.d.ts +14 -14
- package/applications/Components/featureUtils.d.ts +10 -10
- package/applications/Components/fieldFormatUtils.d.ts +2 -2
- package/applications/Components/fontUtils.d.ts +2 -2
- package/applications/Components/formatUtils.d.ts +2 -2
- package/applications/Components/getDefaultUnits.d.ts +2 -2
- package/applications/Components/gfxUtils.d.ts +5 -1
- package/applications/Components/imageryUtils.d.ts +35 -35
- package/applications/Components/layerOriginUtils.d.ts +5 -5
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -2
- package/applications/Components/previewSymbol2D.d.ts +2 -2
- package/applications/Components/rasterFunctionEditorUtils.d.ts +40 -40
- package/applications/Components/reactiveUtils.d.ts +14 -13
- package/applications/Components/sanitizerUtils.d.ts +2 -2
- package/applications/Components/stringUtils.d.ts +5 -5
- package/applications/Components/styleUtils.d.ts +2 -2
- package/applications/Components/svgUtils.d.ts +4 -4
- package/applications/Components/symbolUtils.d.ts +47 -11
- package/applications/Components/templateUtils.d.ts +73 -17
- package/applications/Components/templateUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +3 -3
- package/applications/Components/unitUtils.d.ts +1 -1
- package/applications/Components/viewUtils.d.ts +2 -2
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -2
- package/applications/Excalibur/imageryLayerUtils.d.ts +3 -3
- package/applications/Excalibur/videoViewUtils.d.ts +8 -8
- package/applications/Excalibur/widgetUtils.d.ts +2 -2
- package/applications/ExperienceBuilder/sketchUtils.d.ts +7 -7
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +20 -8
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +21 -21
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +35 -35
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +9 -9
- package/applications/KnowledgeStudio/reshape.d.ts +40 -40
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +11 -11
- package/applications/MapViewer/layerUtils.d.ts +2 -2
- package/applications/MapViewer/mediaUtils.d.ts +13 -13
- package/applications/MapViewer/templateUtils.d.ts +20 -20
- package/applications/PortalApp/layerUtils.d.ts +2 -2
- package/applications/SceneViewer/colorUtils.d.ts +2 -2
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +4 -3
- package/applications/SceneViewer/layerUtils.d.ts +3 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +34 -34
- package/applications/SceneViewer/symbolUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +3 -2
- package/applications/Urban/imagePatternUtils.d.ts +4 -4
- package/applications/Urban/meshUtils.d.ts +2 -2
- package/applications/WebEditor/sketchUtils.d.ts +8 -8
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{df321c37b61099f6e4c2.js → 11058e660139c427c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/1dcd057695f8db79eca2.js +1 -0
- package/assets/esri/core/workers/chunks/568d32ceee1409809e5a.js +1 -0
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +1 -0
- package/assets/esri/core/workers/chunks/7b59ddad3c73f5f44b4d.js +1 -0
- package/assets/esri/core/workers/chunks/a4919dd9963f853a0077.js +1 -0
- package/assets/esri/core/workers/chunks/a7dbd38bc216713044fc.js +1 -0
- package/assets/esri/core/workers/chunks/{b8b2f160518e3a225d99.js → b364ec104dd59faa41b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bb3beedae1b73beb1fc.js → b96dce64bdd7487e862a.js} +1 -1
- package/assets/esri/core/workers/chunks/{23c856265dd24ce54fdb.js → bfeab15d7ac9a2559fe5.js} +1 -1
- package/assets/esri/core/workers/chunks/c3e4f8664988e50bda55.js +1 -0
- package/assets/esri/core/workers/chunks/cf100c80b75ba74b479c.js +1 -0
- package/chunks/Clouds.glsl.js +1 -1
- package/config.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/support/Sublayer.d.ts +3 -0
- package/package.json +1 -1
- package/renderers/support/DictionaryControlString.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/cim/types.d.ts +220 -117
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexBufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/View.d.ts +13 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/draw/support/types.d.ts +8 -1
- package/views/interactive/support/utils.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/widgets/Attribution/AttributionViewModel.d.ts +3 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -22
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +10 -15
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +0 -15
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -1
- package/widgets/FeatureTable.d.ts +1 -19
- package/widgets/FeatureTable.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +4 -22
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch.d.ts +10 -17
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +0 -1
- package/assets/esri/core/workers/chunks/5a8b3e5977c233d5c9d0.js +0 -1
- package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +0 -1
- package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +0 -1
- package/assets/esri/core/workers/chunks/bf2bfc0d78be8c185d58.js +0 -1
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +0 -1
- package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +0 -1
- package/assets/esri/core/workers/chunks/e081d6f21a2c01ccaf61.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{20309(e,t,i){i.r(t),i.d(t,{default:()=>de});var r,s=i(5482),l=i(11254),o=i(4576),n=i(7762),a=i(49186),c=i(4718),u=i(25728),p=i(74887),d=i(36708),m=i(84952),h=i(91429),y=i(5443),f=i(4146),g=i(47314),w=i(63074),v=i(16131),M=i(8303),x=i(54310),C=i(25036),I=i(33446),S=i(87045),T=i(65509),L=i(83703),A=i(25482);let b=r=class extends A.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new r;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,s.Cg)([(0,h.MZ)({type:y.A,json:{read:{source:"fullExtent"}}})],b.prototype,"fullExtent",void 0),(0,s.Cg)([(0,h.MZ)({type:String,json:{read:{source:"id"}}})],b.prototype,"id",void 0),(0,s.Cg)([(0,h.MZ)({type:S.A,json:{read:{source:"tileInfo"}}})],b.prototype,"tileInfo",void 0),b=r=(0,s.Cg)([(0,h.$K)("esri.layers.support.TileMatrixSet")],b);const P=b;var E;let O=E=class extends A.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new E;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,h.MZ)({json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],O.prototype,"title",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"abstract"}}})],O.prototype,"description",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"legendUrl"}}})],O.prototype,"legendUrl",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"isDefault"}}})],O.prototype,"isDefault",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"keywords"}}})],O.prototype,"keywords",void 0),O=E=(0,s.Cg)([(0,h.$K)("esri.layers.support.WMTSStyle")],O);const R=O;var F,Z=i(36005);let V=F=class extends A.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?y.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>y.A.fromJSON(e)):t.tileMatrixSets?.map(e=>y.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats?.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,h.MZ)()],V.prototype,"description",void 0),(0,s.Cg)([(0,h.MZ)({type:y.A})],V.prototype,"fullExtent",void 0),(0,s.Cg)([(0,Z.w)("fullExtent",["fullExtent"])],V.prototype,"readFullExtent",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"fullExtents",void 0),(0,s.Cg)([(0,Z.w)("fullExtents",["fullExtents","tileMatrixSets"])],V.prototype,"readFullExtents",null),(0,s.Cg)([(0,h.MZ)()],V.prototype,"id",void 0),(0,s.Cg)([(0,h.MZ)()],V.prototype,"imageFormat",null),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"formats"}}})],V.prototype,"imageFormats",void 0),(0,s.Cg)([(0,h.MZ)()],V.prototype,"layer",void 0),(0,s.Cg)([(0,h.MZ)()],V.prototype,"parent",void 0),(0,s.Cg)([(0,h.MZ)()],V.prototype,"styleId",null),(0,s.Cg)([(0,h.MZ)({type:n.A.ofType(R),json:{read:{source:"styles"}}})],V.prototype,"styles",void 0),(0,s.Cg)([(0,h.MZ)({json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,s.Cg)([(0,h.MZ)()],V.prototype,"tileMatrixSetId",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"tileMatrixSet",null),(0,s.Cg)([(0,h.MZ)({type:n.A.ofType(P),json:{read:{source:"tileMatrixSets"}}})],V.prototype,"tileMatrixSets",void 0),V=F=(0,s.Cg)([(0,h.$K)("esri.layers.support.WMTSSublayer")],V);var U=i(73941),j=i(86738),_=i(22530),N=i(38458),k=i(13043),D=i(91806);const W=90.71428571428571;function K(e){const t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function B(e){if(!H("Contents",e.documentElement))throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function $(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let i=0;i<t.childNodes.length;i++){const r=t.childNodes[i];if($(r)&&r.nodeName===e)return r}return null}function J(e,t){const i=[];for(let r=0;r<t.childNodes.length;r++){const s=t.childNodes[r];$(s)&&s.nodeName===e&&i.push(s)}return i}function q(e,t){const i=[];for(let r=0;r<t.childNodes.length;r++){const s=t.childNodes[r];$(s)&&s.nodeName===e&&i.push(s)}return i.map(e=>e.textContent).filter(o.Ru)}function G(e,t){return e.split(">").forEach(e=>{t&&(t=H(e,t))}),t&&t.textContent}function z(e,t,i,r){let s;return Array.prototype.slice.call(r.childNodes).some(r=>{if(r.nodeName.includes(e)){const e=H(t,r),l=e?.textContent;if(l===i||i.split(":")&&i.split(":")[1]===l)return s=r,!0}return!1}),s}function Q(e,t,i,r,s){const l=G("Abstract",t),o=q("Format",t);return{id:e,fullExtent:Y(t),fullExtents:ee(t),description:l,formats:o,styles:te(t,r),title:G("Title",t),tileMatrixSets:ie(s,t,i)}}function X(e,t){const i=[],r=e.layerMap?.get(t);if(!r)return null;const s=J("ResourceURL",r),l=J("Dimension",r);let o,n,a,c;return l.length&&(o=G("Identifier",l[0]),n=q("Default",l[0])||q("Value",l[0])),l.length>1&&(a=G("Identifier",l[1]),c=q("Default",l[1])||q("Value",l[1])),e.dimensionMap.set(t,{dimensions:n,dimensions2:c}),s.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(o&&n.length)if(t.includes("{"+o+"}"))t=t.replace("{"+o+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+o.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+o.length+2))}if(a&&c.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}i.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),i}function Y(e){const t=H("WGS84BoundingBox",e),i=t?G("LowerCorner",t).split(" "):["-180","-90"],r=t?G("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(i[0]),ymin:parseFloat(i[1]),xmax:parseFloat(r[0]),ymax:parseFloat(r[1]),spatialReference:{wkid:4326}}}function ee(e){const t=[];return(0,k.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const i=e.getAttribute("crs").toLowerCase(),r=re(i),s=i.includes("epsg")&&(0,N.m)(r.wkid);let l,o,n,a;(0,k.p)(e,{LowerCorner:e=>{[l,o]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([l,o]=[o,l])},UpperCorner:e=>{[n,a]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([n,a]=[a,n])}}),t.push({xmin:l,ymin:o,xmax:n,ymax:a,spatialReference:r})}}),t}function te(e,t){return J("Style",e).map(e=>{const i=H("LegendURL",e),r=H("Keywords",e),s=r?q("Keyword",r):[];let l=i?.getAttribute("xlink:href");return t&&(l=l?.replace(/^http:/i,"https:")),{abstract:G("Abstract",e),id:G("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:G("Title",e)}})}function ie(e,t,i){return J("TileMatrixSetLink",t).map(t=>function(e,t,i){const r=H("TileMatrixSet",t).textContent,s=q("TileMatrix",t),l=i.find(e=>{const t=H("Identifier",e),i=t?.textContent;return!!(i===r||r.split(":")&&r.split(":")[1]===i)}),o=H("TileMatrixSetLimits",t),n=o&&J("TileMatrixLimits",o),a=new Map;if(n?.length)for(const e of n){const t=H("TileMatrix",e).textContent,i=+H("MinTileRow",e).textContent,r=+H("MaxTileRow",e).textContent,s=+H("MinTileCol",e).textContent,l=+H("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:i,maxRow:r})}const c=G("SupportedCRS",l).toLowerCase(),u=function(e,t){return se(H("TileMatrix",e),t)}(l,c),p=u.spatialReference,d=H("TileMatrix",l),m=[parseInt(G("TileWidth",d),10),parseInt(G("TileHeight",d),10)],h=[];s.length?s.forEach((e,t)=>{const i=z("TileMatrix","Identifier",e,l);h.push(le(i,c,t,r,a))}):J("TileMatrix",l).forEach((e,t)=>{h.push(le(e,c,t,r,a))});const f=function(e,t,i,r,s){const l=H("BoundingBox",t);let o,n,a,c,u,p;if(l&&(o=G("LowerCorner",l).split(" "),n=G("UpperCorner",l).split(" ")),o&&o.length>1&&n&&n.length>1)a=parseFloat(o[0]),u=parseFloat(o[1]),c=parseFloat(n[0]),p=parseFloat(n[1]);else{const e=H("TileMatrix",t),l=parseInt(G("MatrixWidth",e),10),o=parseInt(G("MatrixHeight",e),10);a=i.x,p=i.y,c=a+l*r[0]*s.resolution,u=p-o*r[1]*s.resolution}return function(e,t,i){return"1.0.0"===e&&(0,N.m)(t.wkid)&&!(i.spatialReference.isGeographic&&i.x<-90&&i.y>=-90)}(e,i.spatialReference,i)?new y.A(u,a,p,c,i.spatialReference):new y.A(a,u,c,p,i.spatialReference)}(e,l,u,m,h[0]).toJSON(),g=new S.A({dpi:96,spatialReference:p,size:m,origin:u,lods:h}).toJSON();return{id:r,fullExtent:f,tileInfo:g}}(e,t,i))}function re(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const i=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=i&&(t=i),{wkid:t}}function se(e,t){const i=re(t),[r,s]=G("TopLeftCorner",e).split(" ").map(e=>parseFloat(e)),l=t.includes("epsg")&&(0,N.m)(i.wkid);return new j.A(l?{x:s,y:r,spatialReference:i}:{x:r,y:s,spatialReference:i})}function le(e,t,i,r,s){const l=re(t),o=G("Identifier",e);let n=parseFloat(G("ScaleDenominator",e));const a=oe(l.wkid,n,r);n*=96/W;const c=+G("MatrixWidth",e),u=+G("MatrixHeight",e),{maxCol:p=c-1,maxRow:d=u-1,minCol:m=0,minRow:h=0}=s.get(o)??{},{x:y,y:f}=se(e,t);return new D.A({cols:[m,p],level:i,levelValue:o,origin:[y,f],scale:n,resolution:a,rows:[h,d]})}function oe(e,t,i){let r;return r=_.A.hasOwnProperty(""+e)?_.A.values[_.A[e]]:"default028mm"===i?6370997*Math.PI/180:(0,U.y7)(e).metersPerDegree,7*t/25e3/r}var ne,ae=i(43937);const ce={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},ue=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let pe=ne=class extends((0,w.dM)((0,x.J)((0,C.j)((0,v.q)((0,M.A)((0,u.M)(f.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,d.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},d.OH),(0,d.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},d.OH),(0,d.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},d.OH),(0,d.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this},d.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(p.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,p.QP)(e),new a.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,i){this.activeLayer||(this.activeLayer=new V);let r=t.layers.find(e=>e.id===this.activeLayer.id);return r||(r=t.layers[0]),this.activeLayer.read(r,i),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:i,wmtsInfo:r}=t,s=i?this._getLowerCasedUrlParams(i):null,l=r?.layerIdentifier;let o=null;const n=r?.tileMatrixSet;n&&(Array.isArray(n)?n.length&&(o=n[0]):o=n);const a=s?.format,c=s?.style;return new V({id:l,imageFormat:a,styleId:c,tileMatrixSetId:o})}writeActiveLayer(e,t,i,r){const{activeLayer:s,loaded:l}=this,{id:o,tileMatrixSet:n,tileMatrixSetId:a,imageFormat:c,styleId:u}=s;t.templateUrl=l?this.getUrlTemplate(o,a,c,u):void 0,t.tileInfo=l?n?.tileInfo?.toJSON(r)??null:void 0,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:o,tileMatrixSet:a}}readCustomParameters(e,t){const i=t.wmtsInfo;return i?this._mergeParams(i.customParameters,i.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,i){return function(e,t){return e.map(e=>{const i=new V;return i.read(e,t),i})}(t.layers,i)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(o.Ru)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new T.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),i=this._getTileMatrixSetById(e.tileMatrixSetId),r=i?.tileInfo,s=e.fullExtent,l=new L.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new g.default({fullExtent:s,urlTemplate:t,tileInfo:r,wmtsInfo:l})}async fetchTile(e,t,i,r={}){const{signal:s}=r,o=this.getTileUrl(e,t,i),{data:n}=await(0,l.A)(o,{responseType:"image",signal:s});return n}async fetchImageBitmapTile(e,t,i,r={}){const{signal:s}=r;if(this.fetchTile!==ne.prototype.fetchTile){const l=await this.fetchTile(e,t,i,r);return(0,I.C)(l,e,t,i,s)}const o=this.getTileUrl(e,t,i),{data:n}=await(0,l.A)(o,{responseType:"blob",signal:s});return(0,I.C)(n,e,t,i,s)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,i){const r=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=r?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let o=this.resourceInfo?"":function(e,t,i,r,s,l,o,n){const a=function(e,t,i){const r=X(e,t),s=r?.filter(e=>e.format===i);return(s?.length?s:r)??[]}(e,t,r);if(!(a?.length>0))return"";const{dimensionMap:c}=e,u=c.get(t).dimensions?.[0],p=c.get(t).dimensions2?.[0];return a[o%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,i??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+o).replaceAll(/\{TileCol\}/gi,""+n).replaceAll(/\{dimensionValue\}/gi,u).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,i);return o||(o=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${i}`)),o=this._appendCustomLayerParameters(o),o}getUrlTemplate(e,t,i,r){if(!this.resourceInfo){const i=function(e,t,i,r){const{dimensionMap:s}=e,l=X(e,t);let o="";if(l&&l.length>0){const e=s.get(t).dimensions?.[0],n=s.get(t).dimensions2?.[0];o=l[0].template,o.endsWith(".xxx")&&(o=o.slice(0,-4)),o=o.replaceAll(/\{Style\}/gi,r),o=o.replaceAll(/\{TileMatrixSet\}/gi,i),o=o.replaceAll(/\{TileMatrix\}/gi,"{level}"),o=o.replaceAll(/\{TileRow\}/gi,"{row}"),o=o.replaceAll(/\{TileCol\}/gi,"{col}"),o=o.replaceAll(/\{dimensionValue\}/gi,e),o=o.replaceAll(/\{dimensionValue2\}/gi,n)}return o}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,r);if(i)return i}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+r+"&FORMAT="+i+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";const l=i.toLowerCase();return ce[l]&&(s=ce[l]),this.url+e+"/"+r+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"!==this.resourceInfo.serviceMode||this.url.includes("?")||(this.url+="?"),function(e){for(const t of e.layers)for(const e of t.tileMatrixSets??[]){const{tileInfo:t}=e;if(t&&96!==t.dpi){for(const i of t.lods??[])i.scale=96*i.scale/t.dpi,i.resolution=oe(t.spatialReference?.wkid,i.scale*W/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{const{data:i}=await this._getCapabilities(this.serviceMode,e);t=K(i),B(t)}catch{const i="KVP"===this.serviceMode?"RESTful":"KVP";try{const{data:r}=await this._getCapabilities(i,e);t=K(r),B(t),this.serviceMode=i}catch(e){throw new a.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}const{serviceMode:i,url:r}=this,s=function(e,t){const i=e.documentElement,r=new Map,s=new Map,l=H("Contents",i);if(!l)throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");const o=H("OperationsMetadata",i),n=o?.querySelector("[name='GetTile']"),c=n?.getElementsByTagName("Get"),u=c&&Array.prototype.slice.call(c),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let m,h,y=t.serviceMode,f=t?.url;if(u?.length&&u.some(e=>{const t=H("Constraint",e);return!t||z("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||z("AllowedValues","Value","RESTful",t)||z("AllowedValues","Value","REST",t)?h=e.attributes[0].nodeValue:t&&!z("AllowedValues","Value","KVP",t)||(m=e.attributes[0].nodeValue),!1)}),!f)if(h)f=h,y="RESTful";else if(m)f=m,y="KVP";else{const e=H("ServiceMetadataURL",i);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.slice(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=G("ServiceIdentification>ServiceTypeVersion",i),v=G("ServiceIdentification>AccessConstraints",i),M=v&&/^none$/i.test(v)?null:v,x=J("Layer",l),C=J("TileMatrixSet",l),I=x.map(e=>{const t=G("Identifier",e);return r.set(t,e),Q(t,e,C,d,w)});return{copyright:M,dimensionMap:s,layerMap:r,layers:I,serviceMode:y,tileUrl:f}}(t,{serviceMode:i,url:r});this.read(s,{origin:"service"})}async _getCapabilities(e,t){const i=this._getCapabilitiesUrl(e);return await(0,l.A)(i,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id);return t?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,c.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const i=(0,m.An)(e),r={...i.query,...t},s=(0,m.x0)(r);return""===s?i.path:`${i.path}?${s}`}_getCapabilitiesUrl(e){this.url=(0,m.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{const e=`/${this.version}/WMTSCapabilities.xml`,i=new RegExp(e,"i");t=t.replace(i,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,m.An)(e).query;if(!t)return null;const i={};return Object.keys(t).forEach(e=>{i[e.toLowerCase()]=t[e]}),i}_mergeParams(e,t){const i=this._getLowerCasedUrlParams(t);if(i){const t=Object.keys(i);t.length&&(e=e?(0,c.o8)(e):{},t.forEach(t=>{e.hasOwnProperty(t)||ue.has(t)||(e[t]=i[t])}))}return e}};(0,s.Cg)([(0,h.MZ)()],pe.prototype,"dimensionMap",void 0),(0,s.Cg)([(0,h.MZ)()],pe.prototype,"layerMap",void 0),(0,s.Cg)([(0,h.MZ)({type:V,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],pe.prototype,"activeLayer",void 0),(0,s.Cg)([(0,Z.w)("service","activeLayer",["layers"])],pe.prototype,"readActiveLayerFromService",null),(0,s.Cg)([(0,Z.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],pe.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s.Cg)([(0,ae.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:S.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],pe.prototype,"writeActiveLayer",null),(0,s.Cg)([(0,h.MZ)({type:String,value:"",json:{write:!0}})],pe.prototype,"copyright",void 0),(0,s.Cg)([(0,h.MZ)({type:["show","hide"]})],pe.prototype,"listMode",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],pe.prototype,"blendMode",void 0),(0,s.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],pe.prototype,"customParameters",void 0),(0,s.Cg)([(0,Z.w)(["portal-item","web-document"],"customParameters")],pe.prototype,"readCustomParameters",null),(0,s.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],pe.prototype,"customLayerParameters",void 0),(0,s.Cg)([(0,h.MZ)({type:y.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],pe.prototype,"fullExtent",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],pe.prototype,"fullExtents",null),(0,s.Cg)([(0,h.MZ)({type:["WebTiledLayer"]})],pe.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,h.MZ)()],pe.prototype,"resourceInfo",void 0),(0,s.Cg)([(0,h.MZ)()],pe.prototype,"serviceMode",void 0),(0,s.Cg)([(0,Z.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],pe.prototype,"readServiceMode",null),(0,s.Cg)([(0,h.MZ)({type:n.A.ofType(V)})],pe.prototype,"sublayers",void 0),(0,s.Cg)([(0,Z.w)("service","sublayers",["layers"])],pe.prototype,"readSublayersFromService",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],pe.prototype,"supportedSpatialReferences",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],pe.prototype,"tilemapCache",null),(0,s.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],pe.prototype,"title",null),(0,s.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],pe.prototype,"type",void 0),(0,s.Cg)([(0,h.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],pe.prototype,"url",null),(0,s.Cg)([(0,h.MZ)()],pe.prototype,"version",void 0),pe=ne=(0,s.Cg)([(0,h.$K)("esri.layers.WMTSLayer")],pe);const de=pe},38458(e,t,i){i.d(t,{m:()=>s});const r=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&r.some(([t,i])=>e>=t&&e<=i)}},13043(e,t,i){function r(e,t){if(e&&t)for(const i of e.children)if(i.localName in t){const e=t[i.localName];if("function"==typeof e){const t=e(i);t&&r(i,t)}else r(i,e)}}function*s(e,t){for(const i of e.children)if(i.localName in t){const e=t[i.localName];"function"==typeof e?yield e(i):yield*s(i,e)}}i.d(t,{i:()=>s,p:()=>r})},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(74887);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;const o=this.tileInfo;return o.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(o.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1214],{41214(e,t,i){i.d(t,{Hg:()=>pe,XJ:()=>ye});var s=i(53966),r=i(86162),o=i(5482),n=i(11254),l=i(4718),a=i(91429),u=i(30524),p=i(92438),y=i(63988),h=i(66344),c=i(60408),d=i(68197);class g{static parse(e,t,i){const s=[],r=[],o=e.split(";");for(let e=0;e<o.length;e++){const n=o[e];if(n){if(n.includes("po:")){const e=n.slice(3).split("|");if(3===e.length){const[t,i,s]=e,o=f(t,i,s);o&&r.push(o)}continue}if(n.includes("|")){for(const e of n.split("|"))if(t.has(e)){s.push(e);break}}else if(t.has(n))s.push(n);else if(0===e){s.length=0,s.push(b(i));break}}}return new g(s,r)}constructor(e,t){this.partNames=e,this.overrides=t}}function m(e,t){if("DashTemplate"===e)return t.split(" ").map(e=>Number(e));if("Color"===e){const e=new d.A(t).toRgba();return[e[0],e[1],e[2],255*e[3]]}return Number(t)}function f(e,t,i){return{type:"CIMPrimitiveOverride",primitiveName:e,propertyName:t,value:m(t,i),defaultValue:null}}function b(e){switch(e){case"esriGeometryPolyline":return"Invalid_L";case"esriGeometryPolygon":return"Invalid_A";default:return"Invalid_P"}}var v=i(73681),w=i(55674),C=i(40863),x=i(93397);const S={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,width:.5,color:[0,0,0,255]}]}};class M{constructor(e,t,i,s){this.url=e,this.fieldMap=i,this.dictionaryInfo=s,this._symbolPartCache=new h.q(100),this._evaluator=(async()=>v.n.from(await s,t,i))()}async getSymbolAsync(e,t,i=!0){const s=await this._evaluator,r=t?.fields??(0,w.lL)(e.attributes),o=s.createDictionaryFieldsIndex(r),n=s.evaluate(e,t?.scale??0,o,t?.spatialReference);if(null==n)return null;const l=(0,c.$B)(e.geometry),a=g.parse(n,s.itemNames,l),u="esriGeometryPoint"===l&&!e.geometry?.hasZ;return await this._cimPartsToCIMSymbol(e,a.partNames,a.overrides,u,t,i,o)}async getSymbolForControlString(e,t,i){const s=await this._evaluator,r=g.parse(e,s.itemNames,t),o="esriGeometryPoint"===t&&!i,n=_(await Promise.all(r.partNames.map(e=>this._getSymbolPart(e))),r.overrides,o);return new C.A({data:n})}async _cimPartsToCIMSymbol(e,t,s,r,o,n,a){const u=t.map(e=>this._getSymbolPart(e,o));let p=await Promise.all(u);if(n&&this.fieldMap&&p.length>0){const{OverrideHelper:t}=await i.e(3937).then(i.bind(i,73937));p=(0,l.o8)(p);for(const i of p)t.applyDictionaryTextOverrides(i,e,this.fieldMap,a,(0,x.bs)(i))}const y=_(p,s,r);return new C.A({data:y})}async _fetchSymbolPart(e,t){const i=await this.dictionaryInfo,s=(this.url+"/"+i.cimRefTemplateUrl).replaceAll(/\{itemName\}/gi,e),{data:r}=await(0,n.A)(s,{responseType:"json",query:{f:"json"},...t});return r}async _getSymbolPart(e,t){let i=this._symbolPartCache.get(e);return i||(i=this._fetchSymbolPart(e,t),this._symbolPartCache.put(e,i)),i}}function _(e,t,i){if(!e||0===e.length)return null;const s={...e[0]};if(e.length>1){s.effects=null,s.symbolLayers=[];for(const t of e){const e=t;if(null!=e.effects)for(const t of e.symbolLayers)null==t.effects?t.effects=e.effects:t.effects.unshift(...e.effects);s.symbolLayers.unshift(...e.symbolLayers)}}return i&&(s.callout=S),{type:"CIMSymbolReference",symbol:s,primitiveOverrides:t}}var A,I=i(43937);let Z=A=class extends((0,y.h)(p.A)){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this._styleName=null,this._styleVersion=null,this._styleSymbolFields=null,this._styleTextFields=null,this._styleConfigProperties=null,this._styleUISchema=null,this.type="dictionary"}get _loader(){const e=this.getDictionaryInfo();return e.then(e=>{this._styleName=e.dictionary_name,this._styleVersion=e.dictionary_version,this._styleConfigProperties=e.authoringInfo.configuration,this._styleSymbolFields=e.authoringInfo.symbol,this._styleTextFields=e.authoringInfo.text,this._styleUISchema=e.dictionary_ui_schema?JSON.parse(e.dictionary_ui_schema):null}),new M(this.url,this.config,this.fieldMap??{},e)}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}get styleName(){return this._styleName}get styleVersion(){return this._styleVersion}get styleSymbolFields(){return this._styleSymbolFields}get styleTextFields(){return this._styleTextFields}get styleConfigProperties(){return this._styleConfigProperties}get styleUISchema(){return this._styleUISchema}writeVisualVariables(e,t,i,s){s?.origin||super.writeVisualVariables(e,t,i,s)}clone(){return new A({config:(0,l.o8)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:(0,l.o8)(this.fieldMap),url:(0,l.o8)(this.url),visualVariables:(0,l.o8)(this.visualVariables)})}async getSymbolAsync(e,t,i=!0){return this._loader.getSymbolAsync(e,t,i)}async getSymbolForControlString(e,t,i){return this._loader.getSymbolForControlString(e,t,i)}getDictionaryInfo(){return this._dictionaryInfoPromise||(this._dictionaryInfoPromise=this._fetchDictionaryInfo()),this._dictionaryInfoPromise}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await(0,u.Dx)(e,t,null,this.scaleExpression);for(const i in this.fieldMap){const s=this.fieldMap[i];t.has(s)&&e.add(s)}}get arcadeRequired(){return!0}getSymbol(){return null}get symbols(){return[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}async _fetchDictionaryInfo(){const{data:e}=await(0,n.A)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"}});return e}};(0,o.Cg)([(0,a.MZ)({type:M})],Z.prototype,"_loader",null),(0,o.Cg)([(0,a.MZ)({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],Z.prototype,"config",void 0),(0,o.Cg)([(0,a.MZ)({type:Object,json:{write:!0}})],Z.prototype,"fieldMap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],Z.prototype,"scaleExpression",void 0),(0,o.Cg)([(0,I.K)("scaleExpression")],Z.prototype,"writeData",null),(0,o.Cg)([(0,a.MZ)({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],Z.prototype,"scaleExpressionTitle",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],Z.prototype,"url",void 0),(0,o.Cg)([(0,a.MZ)({type:String})],Z.prototype,"styleName",null),(0,o.Cg)([(0,a.MZ)({type:String})],Z.prototype,"styleVersion",null),(0,o.Cg)([(0,a.MZ)({type:[String]})],Z.prototype,"styleSymbolFields",null),(0,o.Cg)([(0,a.MZ)({type:[String]})],Z.prototype,"styleTextFields",null),(0,o.Cg)([(0,a.MZ)({type:[Object]})],Z.prototype,"styleConfigProperties",null),(0,o.Cg)([(0,a.MZ)({type:Object})],Z.prototype,"styleUISchema",null),(0,o.Cg)([(0,I.K)("visualVariables")],Z.prototype,"writeVisualVariables",null),Z=A=(0,o.Cg)([(0,a.$K)("esri.renderers.DictionaryRenderer")],Z);var j,D=i(25482),E=i(56507);let P=j=class extends D.o{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(s.A.getLogger(this).error(".field: field must be a string value"),null):(0,E.GX)(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new j({color:this.color?.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,o.Cg)([(0,a.MZ)({type:d.A,json:{type:[Number],write:!0}})],P.prototype,"color",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"field",void 0),(0,o.Cg)([(0,a.wg)("field")],P.prototype,"castField",null),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"valueExpression",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"valueExpressionTitle",void 0),P=j=(0,o.Cg)([(0,a.$K)("esri.renderers.support.AttributeColorInfo")],P);const V=P;var N;let T=N=class extends D.o{constructor(e){super(e),this.unit=null}clone(){return new N({unit:this.unit})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],T.prototype,"unit",void 0),T=N=(0,o.Cg)([(0,a.$K)("esri.renderers.support.DotDensityLegendOptions")],T);const O=T;var R,F=i(94985),k=i(31593),$=i(93223);let q=R=class extends((0,y.h)(p.A)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new d.A([0,0,0,0]),this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new k.A,this.dotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new F.A({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}get symbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return JSON.stringify(this.outline)}get visualVariables(){return super.visualVariables}set visualVariables(e){super.visualVariables=e}clone(){return new R({attributes:(0,l.o8)(this.attributes),backgroundColor:(0,l.o8)(this.backgroundColor),dotBlendingEnabled:(0,l.o8)(this.dotBlendingEnabled),dotShape:(0,l.o8)(this.dotShape),dotSize:(0,l.o8)(this.dotSize),dotValue:(0,l.o8)(this.dotValue),legendOptions:(0,l.o8)(this.legendOptions),outline:(0,l.o8)(this.outline),referenceScale:(0,l.o8)(this.referenceScale),seed:(0,l.o8)(this.seed),visualVariables:(0,l.o8)(this.visualVariables),authoringInfo:(0,l.o8)(this.authoringInfo)})}getControllerHash(){const e=this.attributes?.map(e=>e.field||e.valueExpression||"");return`${e}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes??[])i.valueExpression&&await(0,u.Dx)(e,t,null,i.valueExpression),i.field&&e.add(i.field)}};(0,o.Cg)([(0,a.MZ)({type:[V],json:{write:!0}})],q.prototype,"attributes",void 0),(0,o.Cg)([(0,a.MZ)({type:d.A,json:{write:!0}})],q.prototype,"backgroundColor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],q.prototype,"dotBlendingEnabled",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!1}})],q.prototype,"dotShape",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],q.prototype,"dotSize",void 0),(0,o.Cg)([(0,a.MZ)({type:O,json:{write:!0}})],q.prototype,"legendOptions",void 0),(0,o.Cg)([(0,a.MZ)({type:k.A,json:{default:null,write:!0}})],q.prototype,"outline",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],q.prototype,"dotValue",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],q.prototype,"referenceScale",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],q.prototype,"seed",void 0),(0,o.Cg)([(0,$.e)({dotDensity:"dot-density"})],q.prototype,"type",void 0),q=R=(0,o.Cg)([(0,a.$K)("esri.renderers.DotDensityRenderer")],q);var L,H=i(90629),z=i(30943);let K=L=class extends D.o{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new L({color:this.color&&this.color.clone(),ratio:this.ratio})}};(0,o.Cg)([(0,a.MZ)({type:d.A,json:{type:[E.jz],default:null,write:{isRequired:!0}}})],K.prototype,"color",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],K.prototype,"ratio",void 0),K=L=(0,o.Cg)([(0,a.$K)("esri.renderers.support.HeatmapColorStop")],K);var U=i(69540);let B=class extends((0,U.OU)(D.o)){constructor(e){super(e),this.minLabel=null,this.maxLabel=null,this.title=null}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],B.prototype,"minLabel",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],B.prototype,"maxLabel",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],B.prototype,"title",void 0),B=(0,o.Cg)([(0,a.$K)("esri.renderers.support.HeatmapLegendOptions")],B);const J=B;var G,X=i(61760),Q=i(53930);function W(e){if(null!=e){const{maxDensity:t,minDensity:i,radius:s}=e;if(null!=t||null!=i||null!=s){const{blurRadius:t,maxPixelIntensity:i,minPixelIntensity:s,...r}=e;return r}}return e}let Y=G=class extends p.A{constructor(e){super(e),this.authoringInfo=null,this.colorStops=[new K({ratio:0,color:new d.A("rgba(255, 140, 0, 0)")}),new K({ratio:.75,color:new d.A("rgba(255, 140, 0, 1)")}),new K({ratio:.9,color:new d.A("rgba(255, 0, 0, 1)")})],this.field=null,this.legendOptions=null,this.maxDensity=.04,this.minDensity=0,this.referenceScale=0,this.type="heatmap",this.valueExpression=null,this.valueExpressionTitle=null}normalizeCtorArgs(e){return W(e)}get blurRadius(){return(0,X.PU)(this.radius)}set blurRadius(e){const t=this.maxPixelIntensity,i=this.minPixelIntensity;this._set("radius",(0,X.zp)(e)),this._set("maxDensity",t*this._pixelIntensityToDensity),this._set("minDensity",i*this._pixelIntensityToDensity)}get maxPixelIntensity(){return this.maxDensity/this._pixelIntensityToDensity}set maxPixelIntensity(e){this._set("maxDensity",e*this._pixelIntensityToDensity)}get minPixelIntensity(){return this.minDensity/this._pixelIntensityToDensity}set minPixelIntensity(e){this._set("minDensity",e*this._pixelIntensityToDensity)}get radius(){return this._get("radius")??18}set radius(e){this._set("radius",e)}get _pixelIntensityToDensity(){return 24/(X.ex**2*this.blurRadius**4)}read(e,t){e=W(e),super.read(e,t)}getSymbol(){return new Q.A}async getSymbolAsync(){return this.getSymbol()}get symbols(){return[this.getSymbol()]}async collectRequiredFields(e,t){const i=this.field,s=this.valueExpression;i&&"string"==typeof i&&(0,u.rq)(e,t,i),s&&"string"==typeof s&&await(0,u.Dx)(e,t,null,s)}getAttributeHash(){return""}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new G({authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),colorStops:(0,l.o8)(this.colorStops),field:this.field,legendOptions:(0,l.o8)(this.legendOptions),maxDensity:this.maxDensity,minDensity:this.minDensity,radius:this.radius,referenceScale:this.referenceScale,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,o.Cg)([(0,a.MZ)({type:z.A,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Y.prototype,"authoringInfo",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Y.prototype,"blurRadius",null),(0,o.Cg)([(0,a.MZ)({type:[K],json:{write:{isRequired:!0}}})],Y.prototype,"colorStops",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],Y.prototype,"field",void 0),(0,o.Cg)([(0,a.MZ)({type:J,json:{write:!0}})],Y.prototype,"legendOptions",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Y.prototype,"maxDensity",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Y.prototype,"maxPixelIntensity",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Y.prototype,"minDensity",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Y.prototype,"minPixelIntensity",null),(0,o.Cg)([(0,a.MZ)({type:Number,cast:H.cr,json:{write:!0}})],Y.prototype,"radius",null),(0,o.Cg)([(0,a.MZ)({type:Number,range:{min:0},json:{default:0,write:!0}})],Y.prototype,"referenceScale",void 0),(0,o.Cg)([(0,$.e)({heatmap:"heatmap"})],Y.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],Y.prototype,"valueExpression",void 0),(0,o.Cg)([(0,a.MZ)({type:String})],Y.prototype,"valueExpressionTitle",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Y.prototype,"_pixelIntensityToDensity",null),Y=G=(0,o.Cg)([(0,a.$K)("esri.renderers.HeatmapRenderer")],Y);var ee=i(4576),te=i(49849);let ie=class extends((0,U.OU)(D.o)){constructor(e){super(e),this.color=new d.A([0,0,0,0]),this.label=null,this.threshold=0}};(0,o.Cg)([(0,a.MZ)({type:d.A,json:{write:!0}})],ie.prototype,"color",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],ie.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],ie.prototype,"threshold",void 0),ie=(0,o.Cg)([(0,a.$K)("esri.renderers.support.OthersCategory")],ie);var se=i(20061),re=i(62724),oe=i(48940);const ne={base:i(2795).A,key:"type",typeMap:{size:oe.A,opacity:re.A}};let le=class extends((0,y.h)((0,U.OU)(p.A))){constructor(e){super(e),this.attributes=null,this.backgroundFillSymbol=null,this.defaultColor=new d.A([0,0,0,0]),this.defaultLabel=null,this.holePercentage=0,this.othersCategory=new ie,this.legendOptions=null,this.outline=null,this.type="pie-chart",this.visualVariables=null}get size(){return this._get("size")??12}set size(e){this._set("size",e)}getSymbol(){return new Q.A({size:this.size?this.size/2+(this.outline?.width||0):0})}async getSymbolAsync(){return this.getSymbol()}get symbols(){return[this.getSymbol(),this.backgroundFillSymbol].filter(ee.Ru)}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes)i.valueExpression&&await(0,u.Dx)(e,t,null,i.valueExpression),i.field&&e.add(i.field)}};(0,o.Cg)([(0,a.MZ)({type:[V],json:{write:!0}})],le.prototype,"attributes",void 0),(0,o.Cg)([(0,a.MZ)(te.As)],le.prototype,"backgroundFillSymbol",void 0),(0,o.Cg)([(0,a.MZ)({type:d.A,json:{write:!0}})],le.prototype,"defaultColor",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],le.prototype,"defaultLabel",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],le.prototype,"holePercentage",void 0),(0,o.Cg)([(0,a.MZ)({type:ie,json:{write:!0}})],le.prototype,"othersCategory",void 0),(0,o.Cg)([(0,a.MZ)({type:se.A,json:{write:!0}})],le.prototype,"legendOptions",void 0),(0,o.Cg)([(0,a.MZ)({type:k.A,json:{default:null,write:!0}})],le.prototype,"outline",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,cast:H.cr,json:{write:!0}})],le.prototype,"size",null),(0,o.Cg)([(0,$.e)({pieChart:"pie-chart"})],le.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({types:[ne]})],le.prototype,"visualVariables",void 0),le=(0,o.Cg)([(0,a.$K)("esri.renderers.PieChartRenderer")],le);var ae=i(96576),ue=i(93618);const pe={key:"type",base:p.A,typeMap:{heatmap:Y,simple:ae.A,"unique-value":ue.A,"class-breaks":r.A,"dot-density":q,dictionary:Z,"pie-chart":le},errorContext:"renderer"},ye={key:"type",base:p.A,typeMap:{simple:ae.A,"unique-value":ue.A,"class-breaks":r.A,heatmap:Y},errorContext:"renderer",validate:function(e){switch(e.type){case"simple":return function(e){if(e.symbol)return e;s.A.getLogger("esri.renderers.support.types").error("Removed invalid 'simple' renderer without a symbol from web scene.")}(e);case"unique-value":return function(e){const t=e.uniqueValueInfos,i=t?.filter(({symbol:e,label:t},i)=>(e||s.A.getLogger("esri.renderers.support.types").error(`Removed invalid unique value info ([${i}] ${t}) without a symbol from web scene.`),!!e));return i?.length!==t?.length&&(e.uniqueValueInfos=i),e}(e);case"class-breaks":return function(e){const t=e.classBreakInfos,i=t?.filter(({symbol:e,label:t},i)=>(e||s.A.getLogger("esri.renderers.support.types").error(`Removed invalid class break info ([${i}] ${t}) without a symbol from web scene.`),!!e));return i?.length!==t?.length&&(e.classBreakInfos=i),e}(e);case"heatmap":return e}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7557,9938],{69052(e,t,n){n.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var r=n(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return i(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+a(this.range,e-t,n)}minimalMonotonic(e,t,n){return i(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function i(e,t,n,r,s=0,i=!1){return(r-=s)<t?r+=a(e,t-r):r>n&&(r-=a(e,r-n)),i&&r===n&&(r=t),r+s}function a(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},56512(e,t,n){function r(e){let t,n,r=[],s=!1;return function(...i){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(i,r)||(n=e.apply(this,i),t=this,r=i,s=!0),n}}n.d(t,{B:()=>r})},17136(e,t,n){n.d(t,{Y_:()=>R,O7:()=>k,el:()=>M});var r=n(92602),s=n(69052),i=n(49186),a=n(53966),o=n(39829),l=n(82799),u=n(16930),d=n(80754),c=n(21325),h=n(28735),p=n(11254),f=n(60408),m=n(65864),g=n(2272),y=n(84952),b=n(92300);const w=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function F(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new i.A("internal:geometry",e)}const n=(0,d.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],i=e[r][1],a=e[r+1][0],o=e[r+1][1],l=Math.sqrt((a-s)*(a-s)+(o-i)*(o-i)),u=(o-i)/l,d=(a-s)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const r=e*t,a=d*r+s,o=u*r+i;n.push([a,o])}const e=(l+Math.floor(c-1)*t)/2,r=d*e+s,a=u*e+i;n.push([r,a])}n.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return n&&(e=(0,d.kS)(e,n)),e}function v(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,d.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,d.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,d.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,d.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function E(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],i=t.geometries[r],a=(0,d.r8)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,d.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(r,0))}return!0}})}if(s===n){if(S(e))for(const t of(0,d.r8)(i))e[s]=e[s].addRing(t);else if(A(e))for(const t of(0,d.r8)(i))e[s]=e[s].addPath(t)}else n=s,e[s]=i}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let i,a,u,S,A,k,I,R,x=0;const $=[],P=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,a=(0,c.Vp)(i),u=i.isWebMercator,k=u?102100:4326,S=d.j7[k].maxX,A=d.j7[k].minX,I=d.j7[k].plus180Line,R=d.j7[k].minus180Line),a)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(v(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>v(e,S,A)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,d.kd)(e.xmin,A)*(2*S);let r=0===n?t.clone():(0,d.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:i}=e;s=Number(s.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(I)&&i!==S?(x=i>x?i:x,r=F(r,u),$.push(r),P.push("cut")):e.intersects(R)&&s!==A?(x=i*(2*S)>x?i*(2*S):x,r=F(r,u,360),$.push(r),P.push("cut")):P.push(r)}else P.push(t.clone());else P.push(t);else P.push(t);let _=(0,d.kd)(x,S),L=-90;const C=_,O=new l.A;for(;_>0;){const e=360*_-180;O.addPath([[e,L],[e,-1*L]]),L*=-1,_--}if($.length>0&&C>0){const t=E($,await async function(e,t,n,r){const s=(0,g.Dl)(e),i=t[0].spatialReference,a={...r,responseType:"json",query:{...s.query,f:"json",sr:(0,c.YX)(i),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,p.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=i,t})}}(s,$,O,n)),r=[],i=[];for(let n=0;n<P.length;n++){const s=P[n];if("cut"!==s)i.push(s);else{const s=t.shift(),a=e[n];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(r.push(s),i.push("simplify")):i.push(u?(0,h.Gh)(s):s)}}if(!r.length)return i;const a=await async function(e,t,n){const r="string"==typeof e?(0,y.An)(e):e,s=t[0].spatialReference,i=(0,f.$B)(t[0]),a={...n,query:{...r.query,f:"json",sr:(0,c.YX)(s),geometries:JSON.stringify((0,b.X)(t))}},{data:o}=await(0,p.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,s)}(s,r,n),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(u?(0,h.Gh)(a.shift()):a.shift())}return o}const j=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)j.push(t);else{const e=$.shift();j.push(!0===u?(0,h.Gh)(e):e)}}return j}function k(e,t,n){const r=(0,c.Vp)(n);if(null==r)return e;const[s,i]=r.valid,a=2*i;let o=0,l=0;t>i?o=Math.ceil(Math.abs(t-i)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>i?l=Math.ceil(Math.abs(e-i)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const d=u-t;return d>i?u-=a:d<s&&(u+=a),u}function I(e){const t=(0,c.Vp)(e);if(null==t)return null;const[n,r]=t.valid;return new s.hr(n,r)}const R=I(u.A.WGS84);I(u.A.WebMercator)},80754(e,t,n){n.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var r=n(82799),s=n(16930),i=n(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},69938(e,t,n){n.d(t,{applyEdits:()=>B,uploadAssets:()=>H});var r=n(52106),s=n(7762),i=n(49186),a=n(4718),o=n(53966),l=n(91869),u=n(74887),d=n(84952),c=n(13069),h=n(17136),p=n(21325),f=n(56512),m=n(65864),g=n(4305),y=n(50954),b=n(52006),w=n(49663),S=n(46068),A=n(15507);const F=1e-6,v=[0,0];class E{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:r,minSegmentsPerCurve:s}){const i=n*n,a=t*t,o=1/r,l=this.interpolate(0),u=this.interpolate(1);(0,A.kb)(this.curveStart,l)>F&&e.push(l),this.initialize(l,u);const d=1/s;for(let e=s-1;e>0;e--){const t=e*d;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,A.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,A.kb)(this.curveEnd,u)>F&&e.push([...this.curveEnd]),e}}class M extends E{constructor(e,t){const[n,r,s]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[r,s],this._arcControlPoints=[r,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:r,tEnd:s}=this,[i,a]=this._arcControlPoints,o=(e-r)/(s-r),l=(0,A.RS)([],t,i,o),u=(0,A.RS)(v,i,a,o),d=(0,A.RS)([],a,n,o),c=(0,A.RS)([],l,u,o),h=(0,A.RS)([],u,d,o),p=(0,A.RS)([],c,h,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([h,d]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=c,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[r,s]=this._curveControlPoints;return(0,g.B4)(t,r,s,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,r]=this._arcControlPoints;return Math.max((0,A.yE)(n,e,t),(0,A.yE)(r,e,t))}}class k extends E{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,S.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,S.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,A.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function I(e,t,n,{cx:r,cy:s,radius:i,thetaStart:a,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:d,maxSegmentsPerCurve:c,minSegmentsPerCurve:h}){if(l)return e.push([...n]),e;const p=2*i,f=[r+i*Math.cos(a),s+i*Math.sin(a)],m=[r+i*Math.cos(o),s+i*Math.sin(o)];(0,A.kb)(t,f)>F&&e.push(f);const g=Math.abs(o-a),y=d>0&&d<p?2*Math.asin(d/p):g,b=u>0&&u<=i?2*Math.acos(1-u/i):g,w=Math.min(y,b),S=Math.min(c,Math.max(h,Math.ceil(Math.abs(g/w)))),v=1/S;for(let t=1;t<S;t++){const n=t*v,l=a*(1-n)+o*n;e.push([r+i*Math.cos(l),s+i*Math.sin(l)])}return e.push(m),(0,A.kb)(n,m)>F&&e.push([...n]),e}function R(e,t,n,r){return new M(t,n).densify(e,r)}function x(e,t,n,r){const s=(0,y.pM)(t,n),[i]=n.c;return I(e,t,i,s,r)}function $(e,t,n,r){const s=(0,w.i)(t,n),[i]=n.a;return I(e,t,i,s,r)}function P(e,t,n,r){const[s,i,a,o,l,u,d]=n.a;return 0===u||0===d?(e.push([...s]),e):new k(t,n).densify(e,r)}const _=(0,f.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function L(e,t,r){const s=new Set(t);return await async function(e,t,r){let s=null;for(const a of e)if(a&&(0,b.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,b.V8)(a,t)){const e=a.spatialReference;if(!e)throw new i.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=C(e);if(r.has(t))a.spatialReference=r.get(t);else{s||(s=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)));const o=s.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new i.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=a.spatialReference.clone();u.read({xyTolerance:l}),a.spatialReference=u,r.set(t,u)}}}(e,s,r),e.map(e=>{if(!e||!(0,b.Ed)(e))return e;const n=e.spatialReference.xyTolerance;if(null==n)return e;const r=_(n);return(0,m.rS)(function(e,t,n){if(!(0,b.Ed)(e))return e;const r=new Set(t),s=function(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}(n),i=(0,b.FD)(e),a=[];let o=!1;for(const e of i){const t=[];for(let n=0;n<e.length-1;n++){const i=n+1,a=[...(0,b.yP)(e[n])];0===n&&t.push(a);const l=e[i];(0,b.Xq)(l)?t.push([...l]):(0,b.n1)(l)&&!r.has("cubic-bezier")?R(t,a,l,s):(0,b.aO)(l)&&!r.has("circular-arc")?x(t,a,l,s):(0,b.DA)(l)&&!r.has("elliptic-arc")?$(t,a,l,s):(0,b.wY)(l)&&!r.has("elliptic-arc")?P(t,a,l,s):(t.push((0,b.tk)(l)),o=!0)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:a}:{rings:a}}}(e,t,r))})}function C(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}var O=n(47685),j=n(30524),T=n(20557),D=n(77548);function U(e){return null!=e?.applyEdits}const V=new WeakMap;async function B(e,t,n,r={}){let d;const h="gdbVersion"in e?e.gdbVersion:null,p=r.gdbVersion??h;if((0,O.Mk)(e)&&e.url)d=(0,O.Zk)(e.url,e.layerId,p,"original-and-current-features"===r.returnServiceEditsOption);else{d=(0,u.Tw)(),d.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)});const t={result:d.promise};e.emit("apply-edits",t)}try{const{results:u,edits:h}=await async function(e,t,n,r){if(await e.load(),!U(t))throw new i.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,D.tk)(e))throw new i.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:a,options:u}=await async function(e,t,n){const r=(0,D.BR)(e),a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,n,r,s,a){if(!(e&&(r||s)||n?.usingTelecomOperations))throw new i.A(`${a}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&n?.globalIdUsed&&!n.usingFeatureServiceEndpoint)throw new i.A(`${a}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new i.A(`${a}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&s)throw new i.A(`${a}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,r,n,!!a,!!u,`${e.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new i.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new i.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const h={...n};if(null!=h.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(h.rollbackOnFailureEnabled=!0),h.rollbackOnFailureEnabled||"original-and-current-features"!==h.returnServiceEditsOption||(!1===h.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),h.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&h.returnServiceEditsInSourceSR)throw new i.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(h.returnServiceEditsInSourceSR&&"original-and-current-features"!==h.returnServiceEditsOption)throw new i.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,n){const r=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(r.addFeatures?.length&&!t.operations.supportsAdd)throw new i.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!t.operations.supportsUpdate)throw new i.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!t.operations.supportsDelete)throw new i.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(Z),r.updateFeatures=r.updateFeatures.map(Z),r.addAssetFeatures=[],r}(t,r,`${e.type}-layer`),f=n?.globalIdUsed||d,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new i.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,c.yS)())}(e,t))}p.addFeatures.forEach(t=>function(e,t,n,r){z(e,t,n,r),N(e,t)}(t,e,f,m)),p.updateFeatures.forEach(t=>function(e,t,n,r){z(e,t,n,r),N(e,t);const s=(0,D.BR)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new i.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),p.deleteFeatures.forEach(t=>function(e,t,n,r){z(e,t,n,r)}(t,e,f,m)),p.addAttachments.forEach(t=>W(t,e)),p.updateAttachments.forEach(t=>W(t,e)),d&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,T.JQ)(n))throw new i.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:r}=e;for(const t of e.addFeatures??[])q(t)&&r.push(t);for(const t of e.updateFeatures??[])q(t)&&r.push(t)}(p,e);const g=(0,l.tE)(V,e,()=>new Map);return{edits:await G(p,r.data.supportedCurveTypes??[],g),options:h}}(e,n,r);return a.addFeatures?.length||a.updateFeatures?.length||a.deleteFeatures?.length||a.addAttachments?.length||a.updateAttachments?.length||a.deleteAttachments?.length?{edits:a,results:await t.applyEdits(a,u)}:{edits:a,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,r),p=e=>e.filter(e=>!e.error).map(a.o8),f={edits:h,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return u.editedFeatureResults?.length&&(f.editedFeatures=u.editedFeatureResults),d.resolve(f),u}catch(e){throw d.reject(e),e}}function z(e,t,n,r){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new i.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in e)for(const n of r){const r=e.attributes[n.name];if(void 0!==r&&!(0,j.OG)(n,r))throw new i.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new i.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new i.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function N(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:r,vertexSpace:s}=n,a=t.spatialReference,o="local"===s.type,l=(0,p.EA)(a),u=(0,p.aI)(a,r),d=u||(0,p.oT)(a)&&((0,p.oT)(r)||(0,p.K8)(r));if(!(o&&l&&d||!o&&!l&&u))throw new i.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${s.type} vertex space and a spatial reference wkid:${r.wkid} to a layer with a spatial reference wkid:${a.wkid} is not supported.`)}}function W(e,t){const{feature:n,attachment:r}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new i.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new i.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,d.r$)(r.data);if(e&&!e.isBase64)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function G(e,t,n){const r=e.addFeatures??[],s=e.updateFeatures??[],i=r.concat(s).map(e=>e.geometry),a=await L(i,t,n),o=await(0,h.el)(a),l=r.length,u=s.length;return o.slice(0,l).forEach((e,t)=>r[t].geometry=e),o.slice(l,l+u).forEach((e,t)=>s[t].geometry=e),e}function Z(e){const t=new r.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function q(e){return"mesh"===e?.geometry?.type}function H(e,t,n,r){if(!U(t))throw new i.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new i.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,r)}},47685(e,t,n){n.d(t,{Mk:()=>f,Zk:()=>h,w6:()=>y});var r=n(5482),s=n(65529),i=n(4718),a=n(74887),o=n(91429),l=n(20816);const u=new s.bk;function d(e){return u.on("apply-edits",new WeakRef(e))}function c(e){return u.on("update-moment",new WeakRef(e))}function h(e,t,n=null,r=!1){const s=(0,a.Tw)();return r=null==t||r,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:n,mayReceiveServiceEdits:r,result:s.promise}),s}const p=Symbol();function f(e){return null!=e&&"object"==typeof e&&p in e}function m(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function g(e,t,n){const r=new URL(e).host,s=l.Z3.get(r),i=e=>!e||e===s;return i(t)&&i(n)||t===n}const y=e=>{var t;const n=e;let s=class extends n{static{t=p}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:n,gdbVersion:r,mayReceiveServiceEdits:s,result:a}=e,o=t===this.url,l=null!=n&&null!=this.layerId&&n===this.layerId,u=m(this),d=m(this)&&g(t,r,this.gdbVersion);if(!o||u&&!d||!l&&!s)return;const c=a.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,i.o8)(e)),e;const n=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(n){const{adds:t,updates:r,deletes:s}=n.editedFeatures,a={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,i.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,i.o8)(e.historicMoment)};return this.emit("edits",a),a}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,i.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,i.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:n,moment:r}=e,s=t===this.url,i=m(this),a=m(this)&&g(t,n,this.gdbVersion),o=m(this)&&!g(t,this.gdbVersion,null);s&&i&&a&&o&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then(()=>{this.addHandles(d(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(c(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,l.w5)(e,t)}};return(0,r.Cg)([(0,o.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,r.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],s),s}},20557(e,t,n){n.d(t,{Fm:()=>l,Hz:()=>p,JQ:()=>h,JZ:()=>S,ND:()=>m,R_:()=>a,U9:()=>c,fu:()=>s,nr:()=>f,oF:()=>i,rq:()=>u,z$:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=y(t.name,e?.supportedFormats??[])}function i(e,t){if(!e)return!1;const n=u(t,e.supportedFormats??[]);return null!=n&&e.editFormats.includes(n)}function a(e,t){return b(function(e,t){const n=e.toLowerCase();return g(t).find(e=>w(e)===n)}(e,t))}function o(e,t){return b(y(e,t))}function l(e,t){return w(function(e,t){return g(t).find(t=>b(t)===e)}(e,t))}function u(e,t){return o(e.name,t)??a(e.type,t)}function d(e,t,n){return a(e,n)??o(t,n)}function c({supportedFormats:e}){return d("model/gltf-binary","glb",e)}function h(e){const t=c(e);return null!=t&&e.editFormats.includes(t)}function p(e){if(!e)return null;const t=c(e),n=function({supportedFormats:e}){return d("model/gltf+json","gltf",e)}(e);let r=null;for(const s of e.queryFormats){if(s===t)return s;s===n&&(r=s)}return r}function f({supportedFormats:e}){return d("application/esri3do-SR_world","wld",e)}function m({supportedFormats:e}){return d("application/esri3do-SR_prj","prj",e)}function g(e){return[...r,...e]}function y(e,t){const n=e.toLowerCase();return g(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>n.endsWith(e)))}function b(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function S(e){return e.tables?.find(e=>"assetMaps"===e.role)}},92300(e,t,n){n.d(t,{V:()=>a,X:()=>i});var r=n(60408),s=n(65864);function i(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,n){const r=(0,s.xD)(t);return e.map(e=>{const t=r.fromJSON(e);return t.spatialReference=n,t})}},20816(e,t,n){n.d(t,{TA:()=>s,We:()=>o,Z3:()=>i,ZJ:()=>l,w5:()=>u});var r=n(11254);const s=(0,n(13069).vD)(),i=new Map,a=new Map;async function o(e,t,n){if(!e||!n)return!1;if(!t)return!0;const s=new URL(e).host;let a=i.get(s);if(!a){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");a=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return a===t}async function l(e,t,r=!1){if(!e||!t)return!0;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=a.get(i)?.entries();if(o)for(const[e,a]of o)if(a.name===t){const t=!a.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([n.e(2186).then(n.bind(n,32186)),n.e(2558).then(n.bind(n,32558))]),o=await t(i,e,new r({sessionId:s,moment:a.moment}));return o.success&&a.stack?.clearForwardEdits(),o.success}return t}return!0}function u(e,t){if(!e)return!1;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=a.get(n)?.entries();if(r)for(const[e,n]of r)if(n.name===t)return"edit"===n.lockType;return!1}new Map}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7557],{69052(e,t,n){n.d(t,{hr:()=>r,ie:()=>l,uC:()=>o});var a=n(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,a.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,a=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(a)?n:a}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,a,r=0,s=!1){return(a-=r)<t?a+=i(e,t-a):a>n&&(a-=i(e,a-n)),s&&a===n&&(a=t),a+r}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},17136(e,t,n){n.d(t,{Y_:()=>I,O7:()=>R,el:()=>k});var a=n(92602),r=n(69052),s=n(49186),i=n(53966),o=n(39829),l=n(82799),u=n(16930),c=n(80754),d=n(21325),p=n(28735),h=n(11254),f=n(60408),m=n(65864),g=n(2272),y=n(84952),w=n(92300);const b=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function v(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(e),new s.A("internal:geometry",e)}const n=(0,c.r8)(e),a=[];for(const e of n){const n=[];a.push(n),n.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const r=e[a][0],s=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-r)*(i-r)+(o-s)*(o-s)),u=(o-s)/l,c=(i-r)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const a=e*t,i=c*a+r,o=u*a+s;n.push([i,o])}const e=(l+Math.floor(d-1)*t)/2,a=c*e+r,i=u*e+s;n.push([a,i])}n.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:a,spatialReference:e.spatialReference}):new l.A({paths:a,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,c.kS)(e,n)),e}function E(e,t,n){if(Array.isArray(e)){const a=e[0];if(a>t){const n=(0,c.kd)(a,t);e[0]=a+n*(-2*t)}else if(a<n){const t=(0,c.kd)(a,n);e[0]=a+t*(-2*n)}}else{const a=e.x;if(a>t){const n=(0,c.kd)(a,t);e=e.clone().offset(n*(-2*t),0)}else if(a<n){const t=(0,c.kd)(a,n);e=e.clone().offset(t*(-2*n),0)}}return e}function F(e,t){let n=-1;for(let a=0;a<t.cutIndexes.length;a++){const r=t.cutIndexes[a],s=t.geometries[a],i=(0,c.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const a=t[e][0];n=a>n?a:n}n=Number(n.toFixed(9));const a=-360*(0,c.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(a,0))}return!0}})}if(r===n){if(S(e))for(const t of(0,c.r8)(s))e[r]=e[r].addRing(t);else if(A(e))for(const t of(0,c.r8)(s))e[r]=e[r].addPath(t)}else n=r,e[r]=s}return e}async function k(e,t,n){if(!Array.isArray(e))return k([e],t);t&&"string"!=typeof t&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??a.A.geometryServiceUrl;let s,i,u,S,A,R,M,I,x=0;const $=[],P=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,i=(0,d.Vp)(s),u=s.isWebMercator,R=u?102100:4326,S=c.j7[R].maxX,A=c.j7[R].minX,M=c.j7[R].plus180Line,I=c.j7[R].minus180Line),i)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(E(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>E(e,S,A)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,c.kd)(e.xmin,A)*(2*S);let a=0===n?t.clone():(0,c.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:s}=e;r=Number(r.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(M)&&s!==S?(x=s>x?s:x,a=v(a,u),$.push(a),P.push("cut")):e.intersects(I)&&r!==A?(x=s*(2*S)>x?s*(2*S):x,a=v(a,u,360),$.push(a),P.push("cut")):P.push(a)}else P.push(t.clone());else P.push(t);else P.push(t);let O=(0,c.kd)(x,S),C=-90;const _=O,L=new l.A;for(;O>0;){const e=360*O-180;L.addPath([[e,C],[e,-1*C]]),C*=-1,O--}if($.length>0&&_>0){const t=F($,await async function(e,t,n,a){const r=(0,g.Dl)(e),s=t[0].spatialReference,i={...a,responseType:"json",query:{...r.query,f:"json",sr:(0,d.YX)(s),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,h.A)(r.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=s,t})}}(r,$,L,n)),a=[],s=[];for(let n=0;n<P.length;n++){const r=P[n];if("cut"!==r)s.push(r);else{const r=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&r.rings.length>=i.rings.length?(a.push(r),s.push("simplify")):s.push(u?(0,p.Gh)(r):r)}}if(!a.length)return s;const i=await async function(e,t,n){const a="string"==typeof e?(0,y.An)(e):e,r=t[0].spatialReference,s=(0,f.$B)(t[0]),i={...n,query:{...a.query,f:"json",sr:(0,d.YX)(r),geometries:JSON.stringify((0,w.X)(t))}},{data:o}=await(0,h.A)(a.path+"/simplify",i);return(0,w.V)(o.geometries,s,r)}(r,a,n),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(i.shift()):i.shift())}return o}const T=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)T.push(t);else{const e=$.shift();T.push(!0===u?(0,p.Gh)(e):e)}}return T}function R(e,t,n){const a=(0,d.Vp)(n);if(null==a)return e;const[r,s]=a.valid,i=2*s;let o=0,l=0;t>s?o=Math.ceil(Math.abs(t-s)/i):t<r&&(o=-Math.ceil(Math.abs(t-r)/i)),e>s?l=Math.ceil(Math.abs(e-s)/i):e<r&&(l=-Math.ceil(Math.abs(e-r)/i));let u=e+(o-l)*i;const c=u-t;return c>s?u-=i:c<r&&(u+=i),u}function M(e){const t=(0,d.Vp)(e);if(null==t)return null;const[n,a]=t.valid;return new r.hr(n,a)}const I=M(u.A.WGS84);M(u.A.WebMercator)},80754(e,t,n){n.d(t,{j7:()=>i,kS:()=>l,kd:()=>o,r8:()=>u});var a=n(82799),r=n(16930),s=n(60408);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new a.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new a.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},69938(e,t,n){n.d(t,{applyEdits:()=>U,uploadAssets:()=>J});var a=n(52106),r=n(7762),s=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(74887),c=n(84952),d=n(13069),p=n(17136),h=n(21325),f=n(56512),m=n(65864),g=n(4305),y=n(50954),w=n(52006),b=n(49663),S=n(46068),A=n(15507);const v=1e-6,E=[0,0];class F{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:a,minSegmentsPerCurve:r}){const s=n*n,i=t*t,o=1/a,l=this.interpolate(0),u=this.interpolate(1);(0,A.kb)(this.curveStart,l)>v&&e.push(l),this.initialize(l,u);const c=1/r;for(let e=r-1;e>0;e--){const t=e*c;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===s||!isFinite(s)||(0,A.kb)(this.arcStart,this.arcEnd)<s)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,A.kb)(this.curveEnd,u)>v&&e.push([...this.curveEnd]),e}}class k extends F{constructor(e,t){const[n,a,r]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[a,r],this._arcControlPoints=[a,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:a,tEnd:r}=this,[s,i]=this._arcControlPoints,o=(e-a)/(r-a),l=(0,A.RS)([],t,s,o),u=(0,A.RS)(E,s,i,o),c=(0,A.RS)([],i,n,o),d=(0,A.RS)([],l,u,o),p=(0,A.RS)([],u,c,o),h=(0,A.RS)([],d,p,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([p,c]),this.tEndStack.push(e),this.arcEndStack.push(h),this._arcControlPoints[0]=l,this._arcControlPoints[1]=d,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[a,r]=this._curveControlPoints;return(0,g.B4)(t,a,r,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,a]=this._arcControlPoints;return Math.max((0,A.yE)(n,e,t),(0,A.yE)(a,e,t))}}class R extends F{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,S.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,S.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,A.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function M(e,t,n,{cx:a,cy:r,radius:s,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:c,maxSegmentsPerCurve:d,minSegmentsPerCurve:p}){if(l)return e.push([...n]),e;const h=2*s,f=[a+s*Math.cos(i),r+s*Math.sin(i)],m=[a+s*Math.cos(o),r+s*Math.sin(o)];(0,A.kb)(t,f)>v&&e.push(f);const g=Math.abs(o-i),y=c>0&&c<h?2*Math.asin(c/h):g,w=u>0&&u<=s?2*Math.acos(1-u/s):g,b=Math.min(y,w),S=Math.min(d,Math.max(p,Math.ceil(Math.abs(g/b)))),E=1/S;for(let t=1;t<S;t++){const n=t*E,l=i*(1-n)+o*n;e.push([a+s*Math.cos(l),r+s*Math.sin(l)])}return e.push(m),(0,A.kb)(n,m)>v&&e.push([...n]),e}function I(e,t,n,a){return new k(t,n).densify(e,a)}function x(e,t,n,a){const r=(0,y.pM)(t,n),[s]=n.c;return M(e,t,s,r,a)}function $(e,t,n,a){const r=(0,b.i)(t,n),[s]=n.a;return M(e,t,s,r,a)}function P(e,t,n,a){const[r,s,i,o,l,u,c]=n.a;return 0===u||0===c?(e.push([...r]),e):new R(t,n).densify(e,a)}const O=(0,f.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function C(e,t,a){const r=new Set(t);return await async function(e,t,a){let r=null;for(const i of e)if(i&&(0,w.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,w.V8)(i,t)){const e=i.spatialReference;if(!e)throw new s.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=_(e);if(a.has(t))i.spatialReference=a.get(t);else{r||(r=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)));const o=r.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new s.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=i.spatialReference.clone();u.read({xyTolerance:l}),i.spatialReference=u,a.set(t,u)}}}(e,r,a),e.map(e=>{if(!e||!(0,w.Ed)(e))return e;const n=e.spatialReference.xyTolerance;if(null==n)return e;const a=O(n);return(0,m.rS)(function(e,t,n){if(!(0,w.Ed)(e))return e;const a=new Set(t),r=function(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}(n),s=(0,w.FD)(e),i=[];let o=!1;for(const e of s){const t=[];for(let n=0;n<e.length-1;n++){const s=n+1,i=[...(0,w.yP)(e[n])];0===n&&t.push(i);const l=e[s];(0,w.Xq)(l)?t.push([...l]):(0,w.n1)(l)&&!a.has("cubic-bezier")?I(t,i,l,r):(0,w.aO)(l)&&!a.has("circular-arc")?x(t,i,l,r):(0,w.DA)(l)&&!a.has("elliptic-arc")?$(t,i,l,r):(0,w.wY)(l)&&!a.has("elliptic-arc")?P(t,i,l,r):(t.push((0,w.tk)(l)),o=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:i}:{rings:i}}}(e,t,a))})}function _(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}var L=n(47685),T=n(30524),D=n(20557),B=n(77548);function z(e){return null!=e?.applyEdits}const G=new WeakMap;async function U(e,t,n,a={}){let c;const p="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??p;if((0,L.Mk)(e)&&e.url)c=(0,L.Zk)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{c=(0,u.Tw)(),c.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)});const t={result:c.promise};e.emit("apply-edits",t)}try{const{results:u,edits:p}=await async function(e,t,n,a){if(await e.load(),!z(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,B.tk)(e))throw new s.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,n){const a=(0,B.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),c=null!=e.infoFor3D;if(function(e,t,n,a,r,i){if(!(e&&(a||r)||n?.usingTelecomOperations))throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&n?.globalIdUsed&&!n.usingFeatureServiceEndpoint)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&r)throw new s.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&r)throw new s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,n,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&n?.gdbVersion)throw new s.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...n};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const h=function(e,t,n){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&r.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new s.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(X),a.updateFeatures=a.updateFeatures.map(X),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),f=n?.globalIdUsed||c,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new s.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");h.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,d.yS)())}(e,t))}h.addFeatures.forEach(t=>function(e,t,n,a){N(e,t,n,a),j(e,t)}(t,e,f,m)),h.updateFeatures.forEach(t=>function(e,t,n,a){N(e,t,n,a),j(e,t);const r=(0,B.BR)(t);if("geometry"in e&&null!=e.geometry&&!r?.editing.supportsGeometryUpdate)throw new s.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),h.deleteFeatures.forEach(t=>function(e,t,n,a){N(e,t,n,a)}(t,e,f,m)),h.addAttachments.forEach(t=>V(t,e)),h.updateAttachments.forEach(t=>V(t,e)),c&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,D.JQ)(n))throw new s.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])q(t)&&a.push(t);for(const t of e.updateFeatures??[])q(t)&&a.push(t)}(h,e);const g=(0,l.tE)(G,e,()=>new Map);return{edits:await W(h,a.data.supportedCurveTypes??[],g),options:p}}(e,n,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,a),h=e=>e.filter(e=>!e.error).map(i.o8),f={edits:p,addedFeatures:h(u.addFeatureResults),updatedFeatures:h(u.updateFeatureResults),deletedFeatures:h(u.deleteFeatureResults),addedAttachments:h(u.addAttachmentResults),updatedAttachments:h(u.updateAttachmentResults),deletedAttachments:h(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(f.editedFeatures=u.editedFeatureResults),c.resolve(f),u}catch(e){throw c.reject(e),e}}function N(e,t,n,a){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const n of a){const a=e.attributes[n.name];if(void 0!==a&&!(0,T.OG)(n,a))throw new s.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function j(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:a,vertexSpace:r}=n,i=t.spatialReference,o="local"===r.type,l=(0,h.EA)(i),u=(0,h.aI)(i,a),c=u||(0,h.oT)(i)&&((0,h.oT)(a)||(0,h.K8)(a));if(!(o&&l&&c||!o&&!l&&u))throw new s.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${r.type} vertex space and a spatial reference wkid:${a.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function V(e,t){const{feature:n,attachment:a}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new s.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,c.r$)(a.data);if(e&&!e.isBase64)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function W(e,t,n){const a=e.addFeatures??[],r=e.updateFeatures??[],s=a.concat(r).map(e=>e.geometry),i=await C(s,t,n),o=await(0,p.el)(i),l=a.length,u=r.length;return o.slice(0,l).forEach((e,t)=>a[t].geometry=e),o.slice(l,l+u).forEach((e,t)=>r[t].geometry=e),e}function X(e){const t=new a.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function q(e){return"mesh"===e?.geometry?.type}function J(e,t,n,a){if(!z(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,a)}},92300(e,t,n){n.d(t,{V:()=>i,X:()=>s});var a=n(60408),r=n(65864);function s(e){return{geometryType:(0,a.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,n){const a=(0,r.xD)(t);return e.map(e=>{const t=a.fromJSON(e);return t.spatialReference=n,t})}}}]);
|