@arcgis/core 4.27.0-rc.1 → 4.27.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +2 -2
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{92e7f224a80195e606d6.js → 1f69fb9687de9ebfcf90.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{0a02ac5628d1739372c6.js → 2b55295590b4a0503749.js} +1 -1
  5. package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
  6. package/assets/esri/core/workers/chunks/{f339db2b599fa9585283.js → 5e6471dd2a08e66b47d0.js} +79 -81
  7. package/assets/esri/core/workers/chunks/{474d9b334812533bab36.js → 6cd248d065f6d1616294.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d8bd3f498b3fa8153404.js → 6f510f28526c73ab453c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
  10. package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +1 -0
  13. package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
  14. package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
  15. package/assets/esri/core/workers/chunks/{c6efe2e04ea6a55bb6e3.js → f6e68befe2812b90b40d.js} +1 -1
  16. package/assets/esri/themes/base/widgets/_Feature.scss +4 -0
  17. package/assets/esri/themes/base/widgets/_FeatureContent.scss +9 -2
  18. package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -0
  19. package/assets/esri/themes/dark/main.css +1 -1
  20. package/assets/esri/themes/light/main.css +1 -1
  21. package/assets/esri/themes/light/view.css +1 -1
  22. package/chunks/DefaultMaterial.glsl.js +3 -2
  23. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  24. package/core/timeUtils.js +1 -1
  25. package/geometry/Mesh.js +1 -1
  26. package/geometry/support/meshVertexSpaceUtils.js +5 -0
  27. package/interfaces.d.ts +179 -31
  28. package/kernel.js +1 -1
  29. package/layers/VideoLayer.js +1 -1
  30. package/layers/graphics/controllers/StreamController.js +1 -1
  31. package/layers/graphics/data/QueryEngine.js +1 -1
  32. package/layers/graphics/data/attributeSupport.js +1 -1
  33. package/layers/graphics/editingSupport.js +1 -1
  34. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  35. package/layers/video/VideoController.js +1 -1
  36. package/layers/video/videoUtils.js +5 -0
  37. package/package.json +1 -1
  38. package/rest/support/meshFeatureSet.js +1 -1
  39. package/smartMapping/symbology/flow.js +1 -1
  40. package/statistics/utils.js +1 -1
  41. package/support/revision.js +1 -1
  42. package/symbols/cim/CIMSymbolHelper.js +1 -1
  43. package/views/2d/layers/StreamLayerView2D.js +1 -1
  44. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  45. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  46. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  47. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  48. package/views/3d/layers/I3SMeshView3D.js +1 -1
  49. package/views/3d/layers/II3SMeshView3D.js +1 -1
  50. package/views/3d/layers/SceneLayerView3D.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  52. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  53. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  54. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  55. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  56. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  57. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  58. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  59. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +3 -9
  60. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +12 -9
  61. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +10 -10
  62. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  63. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
  64. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -8
  65. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  66. package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
  67. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  68. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  69. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  70. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  71. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  72. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  73. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  74. package/views/draw/DrawGraphicTool.js +1 -1
  75. package/views/layers/GroupLayerView.js +1 -1
  76. package/widgets/Daylight/DaylightViewModel.js +1 -1
  77. package/widgets/Editor/EditorViewModel.js +1 -1
  78. package/widgets/Editor/UpdateWorkflow.js +1 -1
  79. package/widgets/Editor/Workflow.js +1 -1
  80. package/widgets/Editor/workflowUtils.js +1 -1
  81. package/widgets/Editor.js +1 -1
  82. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  83. package/widgets/Feature/FeatureRelationship.js +1 -1
  84. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  85. package/widgets/FeatureTable/FieldColumn.js +1 -1
  86. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  87. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  88. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  89. package/widgets/UtilityNetworkTrace.js +1 -1
  90. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  91. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  92. package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
  93. package/widgets/ValuePicker.js +1 -1
  94. package/assets/esri/core/workers/chunks/07651ef8348f702d59ac.js +0 -1
  95. package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
  96. package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
  97. package/assets/esri/core/workers/chunks/90da1ed112b82712d0ef.js +0 -1
  98. package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8518],{68668:(e,t,r)=>{r.d(t,{G:()=>o,w:()=>l});var i=r(66643),s=r(46791),n=r(83379);async function o(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.Z.isCollection(t)?t.forEach((e=>o(e))):n.Z.isLoadable(t)&&r.push(t))};t(o);let l=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)})),l)throw l.error;return e}},30359:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_e});var i=r(43697),s=r(46791),n=r(20102),o=r(3920),l=r(68668),a=r(16453),u=r(95330),p=r(17445),d=r(42033),y=r(81271),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),b=r(52011),f=r(31263),g=r(87085),m=r(54295),v=r(17287),w=r(71612),C=r(17017),S=r(66361),_=r(53713),F=r(38009),I=r(16859),O=r(34760),j=r(72965),E=r(28294),T=r(66677),L=r(21506),Z=r(50957),x=r(53518),A=r(35671),P=r(96674),G=r(30556),R=r(72729);let q=class extends P.wq{constructor(){super(...arguments),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const r of Object.keys(e))t[r]=(0,R.im)(e[r]);return t}writeDomains(e,t){if(!e)return;const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],q.prototype,"code",void 0),(0,i._)([(0,c.Cb)({type:Object,json:{write:!0}})],q.prototype,"defaultValues",void 0),(0,i._)([(0,c.Cb)({json:{write:!0}})],q.prototype,"domains",void 0),(0,i._)([(0,h.r)("domains")],q.prototype,"readDomains",null),(0,i._)([(0,G.c)("domains")],q.prototype,"writeDomains",null),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],q.prototype,"name",void 0),q=(0,i._)([(0,b.j)("esri.layers.support.Subtype")],q);const D=q;var k=r(51773),V=r(16050),M=(r(12501),r(28756),r(92271),r(72529),r(5499)),N=r(84382),$=r(81571),U=(r(91423),r(10699)),Q=r(22974),z=r(83379),H=r(92604),J=r(78286),B=r(63213),Y=r(55343),K=r(70082),W=r(54306),X=r(30707),ee=r(14165),te=r(32163),re=r(28412);const ie=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],se={key:"type",base:M.Z,errorContext:"renderer",typeMap:{simple:N.Z,"unique-value":$.Z,"class-breaks":V.Z}},ne=(0,x.v)(),oe=(0,B.d)({types:se});let le=0;function ae(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ue(e){switch(e){case"point":case"multipoint":return re.xA.clone();case"polyline":return re.CJ.clone();case"polygon":case"multipatch":return re.z3.clone();default:return null}}function pe(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function de(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},s=pe(e,t);if(null!=s){const{defaultValues:e}=s;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new K.Z({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}const ye="esri.layers.support.SubtypeSublayer";let ce=class extends((0,o.p)((0,a.R)((0,U.IG)(z.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${le++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:s}=this;let n;if(i){n=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const l=s?.fields?.find((e=>e.name===t));if(!l)return;const a={name:t};let u=!1;r!==l.alias&&(a.alias=r,u=!0),i!==l.editable&&(a.editable=i,u=!0),n.push(a),u&&e++})),0===e&&n.length===i.length&&(n=null)}else n=(0,Q.d9)(e);n?.length&&(0,J.RB)(r,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:s,subtypeField:n}=e,o=s?.find((e=>e.code===r)),l=o?.defaultValues,a=o?.domains,u=[];for(const e of i){const i=e.clone(),{name:s}=i,o=t?.find((e=>e.name===s));if(i.visible=!t||!!o,o){const{alias:e,editable:t}=o;e&&(i.alias=e),!1===t&&(i.editable=!1)}const p=l?.[s]??null;i.defaultValue=s===n?r:p;const d=a?.[s]??null;i.domain=s===n?null:d?"inherited"===d.type?i.domain:d.clone():null,u.push(i)}return u}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||H.Z.getLogger(ye).error(be("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,A.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new N.Z({symbol:ue(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,s=oe(i,t,r);let n;const{subtypeCode:o}=this;if(null!=o&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(s,t.subtypeField)){const e=s.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(o)));e&&(n=new N.Z({symbol:e.symbol}))}else"simple"!==s?.type||s.visualVariables?.length||(n=s);return n}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const s=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return s?void 0:oe(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[de(this.subtypeCode,t)]}readTitleFromService(e,t){const r=pe(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw be("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw be("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw be("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw be("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:s}=this;if(r){const{displayField:e,editFieldsInfo:n,objectIdField:o}=r;t={displayField:e,editFieldsInfo:n,fields:i,objectIdField:o,title:s}}return(0,te.eZ)(t,e)}createQuery(){if(!this.parent)throw be("createQuery");const e=(0,Z.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return ie.some((e=>this.originIdOf(e)===f.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw be("queryAttachments");const i=e.clone();return i.where=he(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw be("queryFeatures");const i=ee.Z.from(e)??r.createQuery();return null!=e&&(i.where=he(i.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(i,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"effectiveCapabilities",null),(0,i._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],ce.prototype,"charts",void 0),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],ce.prototype,"editingEnabled",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],ce.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"elevationInfo",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],ce.prototype,"fieldOverrides",void 0),(0,i._)([(0,G.c)("fieldOverrides")],ce.prototype,"writeFieldOverrides",null),(0,i._)([(0,c.Cb)({...ne.fields,readOnly:!0,json:{read:!1}})],ce.prototype,"fields",null),(0,i._)([(0,c.Cb)(ne.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)({type:Y.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"formTemplate",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"id",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"geometryType",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"type",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.iR)))],ce.prototype,"labelsVisible",void 0),(0,i._)([(0,c.Cb)({type:[W.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:X.r},write:{ignoreOrigin:!0}}})],ce.prototype,"labelingInfo",void 0),(0,i._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],ce.prototype,"layerType",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.rn)))],ce.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,Q.d9)(L.rO);return e.json.origins.service.read=!1,ae(e)})())],ce.prototype,"minScale",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,Q.d9)(L.u1);return e.json.origins.service.read=!1,ae(e)})())],ce.prototype,"maxScale",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"effectiveScaleRange",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"objectIdField",null),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)()],ce.prototype,"parent",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.C_)))],ce.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:k.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.Cb)({types:se,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],ce.prototype,"renderer",null),(0,i._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],ce.prototype,"readRendererFromService",null),(0,i._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],ce.prototype,"readRenderer",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"subtypeCode",void 0),(0,i._)([(0,c.Cb)({type:[K.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],ce.prototype,"templates",void 0),(0,i._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],ce.prototype,"readTemplatesFromService",null),(0,i._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["subtypes"])],ce.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"url",null),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"userHasUpdateItemPrivileges",null),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],ce.prototype,"visible",void 0),ce=(0,i._)([(0,b.j)(ye)],ce);const he=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),s=`${t}=${r}`,n=e??"";return i.test(n)?n.replace(i,s):(0,d._)(s,n)},be=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),fe=ce;var ge=r(76259),me=r(60199);const ve="SubtypeGroupLayer";function we(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const Ce=(0,x.v)();let Se=class extends((0,_.B)((0,S.o1)((0,w.h)((0,E.n)((0,j.M)((0,O.Q)((0,v.Y)((0,F.q)((0,I.I)((0,a.R)((0,C.N)((0,m.V)((0,o.p)(g.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.subtypes=null,this.sublayers=new(s.Z.ofType(fe)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this.addHandles((0,p.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,Z.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,Z.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,T.a7)(this.url,t):t}async addAttachment(e,t){return(0,Z.JD)(this,e,t,ve)}async updateAttachment(e,t,r){return(0,Z.Y5)(this,e,t,r,ve)}async applyEdits(e,t){return(0,Z.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.Hl)(Promise.all([r.e(4599),r.e(9771)]).then(r.bind(r,6502)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,Z.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,Z.FV)(this,e,t,ve)}async fetchRecomputedExtents(e){return(0,Z.Ci)(this,e,ve)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,l.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,Z.SU)(this,e,t,ve)}async queryFeatures(e,t){const r=await this.load(),i=ee.Z.from(e)??r.createQuery(),s=i.outFields??[];s.includes(this.subtypeField)||(s.push(this.subtypeField),i.outFields=s);const n=await r.source.queryFeatures(i,t);if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return n}async queryObjectIds(e,t){return(0,Z.tD)(this,e,t,ve)}async queryFeatureCount(e,t){return(0,Z.VG)(this,e,t,ve)}async queryExtent(e,t){return(0,Z.KE)(this,e,t,ve)}async queryRelatedFeatures(e,t){return(0,Z.kp)(this,e,t,ve)}async queryRelatedFeaturesCount(e,t){return(0,Z.C9)(this,e,t,ve)}write(e,t){const{origin:r,layerContainerType:i,messages:s}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(we(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(we(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(s?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,me.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,A.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,Z.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"createQueryVersion",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"editingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({...Ce.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Se.prototype,"fields",void 0),(0,i._)([(0,c.Cb)(Ce.fieldsIndex)],Se.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)(L.id)],Se.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:["show","hide","hide-children"]})],Se.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"]})],Se.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)(Ce.outFields)],Se.prototype,"outFields",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],Se.prototype,"source",null),(0,i._)([(0,c.Cb)({type:[D],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"subtypes",void 0),(0,i._)([(0,c.Cb)({type:s.Z.ofType(fe),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const i=e.map((({code:e})=>{const i=new fe({subtypeCode:e});return i.read(t,r),i}));return new(s.Z.ofType(fe))(i)}}}},name:"layers",write:{overridePolicy(e,t,r){const i=this.originOf("sublayers"),s=f.s3.PORTAL_ITEM;let n=!0;if((0,f.M9)(i)===s&&(0,f.M9)(r.origin)>s){const t=e.some((e=>e.hasUserOverrides()));n=this._sublayersCollectionChanged||t}return{enabled:n,ignoreOrigin:!0}}}}})],Se.prototype,"sublayers",void 0),(0,i._)([(0,c.Cb)({type:ge.Z})],Se.prototype,"timeInfo",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Se.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["name"])],Se.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,i._)([(0,b.j)("esri.layers.SubtypeGroupLayer")],Se);const _e=Se},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>a,lF:()=>o,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8518],{68668:(e,t,r)=>{r.d(t,{G:()=>o,w:()=>l});var i=r(66643),s=r(46791),n=r(83379);async function o(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.Z.isCollection(t)?t.forEach((e=>o(e))):n.Z.isLoadable(t)&&r.push(t))};t(o);let l=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)})),l)throw l.error;return e}},30359:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_e});var i=r(43697),s=r(46791),n=r(20102),o=r(3920),l=r(68668),a=r(16453),u=r(95330),p=r(17445),d=r(42033),y=r(81271),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),b=r(52011),f=r(31263),g=r(87085),m=r(54295),v=r(17287),w=r(71612),C=r(17017),S=r(66361),_=r(53713),F=r(38009),I=r(16859),O=r(34760),j=r(72965),E=r(28294),T=r(66677),L=r(21506),Z=r(50957),x=r(53518),A=r(35671),P=r(96674),G=r(30556),R=r(72729);let q=class extends P.wq{constructor(){super(...arguments),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const r of Object.keys(e))t[r]=(0,R.im)(e[r]);return t}writeDomains(e,t){if(!e)return;const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],q.prototype,"code",void 0),(0,i._)([(0,c.Cb)({type:Object,json:{write:!0}})],q.prototype,"defaultValues",void 0),(0,i._)([(0,c.Cb)({json:{write:!0}})],q.prototype,"domains",void 0),(0,i._)([(0,h.r)("domains")],q.prototype,"readDomains",null),(0,i._)([(0,G.c)("domains")],q.prototype,"writeDomains",null),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],q.prototype,"name",void 0),q=(0,i._)([(0,b.j)("esri.layers.support.Subtype")],q);const D=q;var k=r(51773),V=r(16050),M=(r(12501),r(28756),r(92271),r(72529),r(5499)),N=r(84382),$=r(81571),U=(r(91423),r(10699)),Q=r(22974),z=r(83379),H=r(92604),J=r(78286),B=r(63213),Y=r(55343),K=r(70082),W=r(54306),X=r(30707),ee=r(14165),te=r(32163),re=r(28412);const ie=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],se={key:"type",base:M.Z,errorContext:"renderer",typeMap:{simple:N.Z,"unique-value":$.Z,"class-breaks":V.Z}},ne=(0,x.v)(),oe=(0,B.d)({types:se});let le=0;function ae(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ue(e){switch(e){case"point":case"multipoint":return re.xA.clone();case"polyline":return re.CJ.clone();case"polygon":case"multipatch":return re.z3.clone();default:return null}}function pe(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function de(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},s=pe(e,t);if(null!=s){const{defaultValues:e}=s;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new K.Z({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}const ye="esri.layers.support.SubtypeSublayer";let ce=class extends((0,o.p)((0,a.R)((0,U.IG)(z.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${le++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:s}=this;let n;if(i){n=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const l=s?.fields?.find((e=>e.name===t));if(!l)return;const a={name:t};let u=!1;r!==l.alias&&(a.alias=r,u=!0),i!==l.editable&&(a.editable=i,u=!0),n.push(a),u&&e++})),0===e&&n.length===i.length&&(n=null)}else n=(0,Q.d9)(e);n?.length&&(0,J.RB)(r,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:s,subtypeField:n}=e,o=s?.find((e=>e.code===r)),l=o?.defaultValues,a=o?.domains,u=[];for(const e of i){const i=e.clone(),{name:s}=i,o=t?.find((e=>e.name===s));if(i.visible=!t||!!o,o){const{alias:e,editable:t}=o;e&&(i.alias=e),!1===t&&(i.editable=!1)}const p=l?.[s]??null;i.defaultValue=s===n?r:p;const d=a?.[s]??null;i.domain=s===n?null:d?"inherited"===d.type?i.domain:d.clone():null,u.push(i)}return u}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||H.Z.getLogger(ye).error(be("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,A.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new N.Z({symbol:ue(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,s=oe(i,t,r);let n;const{subtypeCode:o}=this;if(null!=o&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(s,t.subtypeField)){const e=s.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(o)));e&&(n=new N.Z({symbol:e.symbol}))}else"simple"!==s?.type||s.visualVariables?.length||(n=s);return n}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const s=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return s?void 0:oe(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[de(this.subtypeCode,t)]}readTitleFromService(e,t){const r=pe(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw be("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw be("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw be("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw be("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:s}=this;if(r){const{displayField:e,editFieldsInfo:n,objectIdField:o}=r;t={displayField:e,editFieldsInfo:n,fields:i,objectIdField:o,title:s}}return(0,te.eZ)(t,e)}createQuery(){if(!this.parent)throw be("createQuery");const e=(0,Z.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return ie.some((e=>this.originIdOf(e)===f.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw be("queryAttachments");const i=e.clone();return i.where=he(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw be("queryFeatures");const i=ee.Z.from(e)??r.createQuery();return null!=e&&(i.where=he(i.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(i,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"effectiveCapabilities",null),(0,i._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],ce.prototype,"charts",void 0),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],ce.prototype,"editingEnabled",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],ce.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"elevationInfo",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],ce.prototype,"fieldOverrides",void 0),(0,i._)([(0,G.c)("fieldOverrides")],ce.prototype,"writeFieldOverrides",null),(0,i._)([(0,c.Cb)({...ne.fields,readOnly:!0,json:{read:!1}})],ce.prototype,"fields",null),(0,i._)([(0,c.Cb)(ne.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)({type:Y.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"formTemplate",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"id",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"geometryType",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"type",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.iR)))],ce.prototype,"labelsVisible",void 0),(0,i._)([(0,c.Cb)({type:[W.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:X.r},write:{ignoreOrigin:!0}}})],ce.prototype,"labelingInfo",void 0),(0,i._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],ce.prototype,"layerType",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.rn)))],ce.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,Q.d9)(L.rO);return e.json.origins.service.read=!1,ae(e)})())],ce.prototype,"minScale",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,Q.d9)(L.u1);return e.json.origins.service.read=!1,ae(e)})())],ce.prototype,"maxScale",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"effectiveScaleRange",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"objectIdField",null),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)()],ce.prototype,"parent",void 0),(0,i._)([(0,c.Cb)(ae((0,Q.d9)(L.C_)))],ce.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:k.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.Cb)({types:se,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],ce.prototype,"renderer",null),(0,i._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],ce.prototype,"readRendererFromService",null),(0,i._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],ce.prototype,"readRenderer",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"subtypeCode",void 0),(0,i._)([(0,c.Cb)({type:[K.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],ce.prototype,"templates",void 0),(0,i._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],ce.prototype,"readTemplatesFromService",null),(0,i._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["subtypes"])],ce.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"url",null),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"userHasUpdateItemPrivileges",null),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],ce.prototype,"visible",void 0),ce=(0,i._)([(0,b.j)(ye)],ce);const he=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),s=`${t}=${r}`,n=e??"";return i.test(n)?n.replace(i,s):(0,d._)(s,n)},be=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),fe=ce;var ge=r(76259),me=r(60199);const ve="SubtypeGroupLayer";function we(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const Ce=(0,x.v)();let Se=class extends((0,_.B)((0,S.o1)((0,w.h)((0,E.n)((0,j.M)((0,O.Q)((0,v.Y)((0,F.q)((0,I.I)((0,a.R)((0,C.N)((0,m.V)((0,o.p)(g.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.subtypes=null,this.sublayers=new(s.Z.ofType(fe)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this.addHandles((0,p.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,Z.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,Z.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,T.a7)(this.url,t):t}async addAttachment(e,t){return(0,Z.JD)(this,e,t,ve)}async updateAttachment(e,t,r){return(0,Z.Y5)(this,e,t,r,ve)}async applyEdits(e,t){return(0,Z.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.Hl)(Promise.all([r.e(4599),r.e(3919),r.e(8949)]).then(r.bind(r,73919)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,Z.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,Z.FV)(this,e,t,ve)}async fetchRecomputedExtents(e){return(0,Z.Ci)(this,e,ve)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,l.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,Z.SU)(this,e,t,ve)}async queryFeatures(e,t){const r=await this.load(),i=ee.Z.from(e)??r.createQuery(),s=i.outFields??[];s.includes(this.subtypeField)||(s.push(this.subtypeField),i.outFields=s);const n=await r.source.queryFeatures(i,t);if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return n}async queryObjectIds(e,t){return(0,Z.tD)(this,e,t,ve)}async queryFeatureCount(e,t){return(0,Z.VG)(this,e,t,ve)}async queryExtent(e,t){return(0,Z.KE)(this,e,t,ve)}async queryRelatedFeatures(e,t){return(0,Z.kp)(this,e,t,ve)}async queryRelatedFeaturesCount(e,t){return(0,Z.C9)(this,e,t,ve)}write(e,t){const{origin:r,layerContainerType:i,messages:s}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(we(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(we(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(s?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,me.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,A.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,Z.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"createQueryVersion",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"editingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({...Ce.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Se.prototype,"fields",void 0),(0,i._)([(0,c.Cb)(Ce.fieldsIndex)],Se.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)(L.id)],Se.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:["show","hide","hide-children"]})],Se.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"]})],Se.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)(Ce.outFields)],Se.prototype,"outFields",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],Se.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],Se.prototype,"source",null),(0,i._)([(0,c.Cb)({type:[D],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Se.prototype,"subtypes",void 0),(0,i._)([(0,c.Cb)({type:s.Z.ofType(fe),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const i=e.map((({code:e})=>{const i=new fe({subtypeCode:e});return i.read(t,r),i}));return new(s.Z.ofType(fe))(i)}}}},name:"layers",write:{overridePolicy(e,t,r){const i=this.originOf("sublayers"),s=f.s3.PORTAL_ITEM;let n=!0;if((0,f.M9)(i)===s&&(0,f.M9)(r.origin)>s){const t=e.some((e=>e.hasUserOverrides()));n=this._sublayersCollectionChanged||t}return{enabled:n,ignoreOrigin:!0}}}}})],Se.prototype,"sublayers",void 0),(0,i._)([(0,c.Cb)({type:ge.Z})],Se.prototype,"timeInfo",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Se.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["name"])],Se.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,i._)([(0,b.j)("esri.layers.SubtypeGroupLayer")],Se);const _e=Se},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>a,lF:()=>o,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var a=r(68773),n=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(81271);async function y(e,t,r){const a="string"==typeof e?(0,h.mN)(e):e,n=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...a.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.default)(a.path+"/simplify",i);var l;return function(e,t,r){const a=(0,c.q9)(t);return e.map((e=>{const t=a.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,n)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new n.Z(e)}const r=(0,l.x3)(e),a=[];for(const e of r){const r=[];a.push(r),r.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const n=e[a][0],s=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-n)*(i-n)+(o-s)*(o-s)),u=(o-s)/l,d=(i-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const a=e*t,i=d*a+n,o=u*a+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,a=d*e+n,i=u*e+s;r.push([a,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:a,spatialReference:e.spatialReference}):new o.Z({paths:a,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const a=e[0];if(a>t){const r=(0,l.XZ)(a,t);e[0]=a+r*(-2*t)}else if(a<r){const t=(0,l.XZ)(a,r);e[0]=a+t*(-2*r)}}else{const a=e.x;if(a>t){const r=(0,l.XZ)(a,t);e=e.clone().offset(r*(-2*t),0)}else if(a<r){const t=(0,l.XZ)(a,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let a=0;a<t.cutIndexes.length;a++){const n=t.cutIndexes[a],s=t.geometries[a],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const a=t[e][0];r=a>r?a:r}r=Number(r.toFixed(9));const a=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(a,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.x3)(s))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,l.x3)(s))e[n]=e[n].addPath(t)}else r=n,e[n]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??a.default.geometryServiceUrl;let s,h,g,w,S,v,I,R,$=0;const E=[],O=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,v=g?102100:4326,w=l.UZ[v].maxX,S=l.UZ[v].minX,I=l.UZ[v].plus180Line,R=l.UZ[v].minus180Line),h)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(F(t.clone(),w,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,w,S))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);O.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,S)*(2*w);let a=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==w?($=e.xmax>$?e.xmax:$,a=b(a,g),E.push(a),O.push("cut")):e.intersects(R)&&e.xmin!==S?($=e.xmax*(2*w)>$?e.xmax*(2*w):$,a=b(a,g,360),E.push(a),O.push("cut")):O.push(a)}else O.push(t.clone());else O.push(t);else O.push(t);let x=(0,l.XZ)($,w),L=-90;const U=x,k=new o.Z;for(;x>0;){const e=360*x-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,x--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,a){const n=(0,f.en)(e),s=t[0].spatialReference,i={...a,query:{...n.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.default)(n.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(n,E,k,r)),a=[],s=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)s.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(a.push(n),s.push("simplify")):s.push(g?(0,d.$)(n):n)}}if(!a.length)return s;const i=await y(n,a,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(i.shift()):i.shift())}return o}const X=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>u});var a=r(58901),n=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new a.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new a.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>w,applyEdits:()=>b,aw:()=>m,uploadAssets:()=>I});var a=r(38171),n=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(81271),d=r(16306),p=r(66361),c=r(2981),f=r(84230);function h(e){return e&&null!=e.applyEdits}function y(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function m(e){return e.every(y)}function g(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function w(e){return e.every(g)}async function b(e,t,r,a={}){let u;if((0,p.lQ)(e)&&e.url)u=(0,p.jF)(e.url,e.layerId,"original-and-current-features"===a.returnServiceEditsOption);else{u=(0,l.hh)(),u.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:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:d}=await async function(e,t,r,a){if(await e.load(),!h(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(!t||!a&&!i)throw new s.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const u=(0,f.S1)(e);if(!u.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!u.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!u.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!u.editing.supportsGlobalId&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const d={...r};if(null!=d.rollbackOnFailureEnabled||u.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),d.rollbackOnFailureEnabled||"original-and-current-features"!==d.returnServiceEditsOption||(!1===d.rollbackOnFailureEnabled&&o.Z.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 overwrritten and set to true."),d.rollbackOnFailureEnabled=!0),!u.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&"original-and-current-features"!==d.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&n.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&n.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&n.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!u.operations.supportsAdd)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!u.operations.supportsUpdate)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!u.operations.supportsDelete)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(S),p.updateFeatures=p.updateFeatures.map(S),p.addAssetFeatures=[];const h=r?.globalIdUsed||l;return p.addFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),p.updateFeatures.forEach((t=>function(e,t,r){F(e,t,r);const a=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h))),p.deleteFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),p.addAttachments.forEach((t=>Z(t,e))),p.updateAttachments.forEach((t=>Z(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,c.S0)("model/gltf-binary",r.supportedFormats)??(0,c.Ow)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:n}=e;for(const t of e.addFeatures??[])v(t)&&n.push(t);for(const t of e.updateFeatures??[])v(t)&&n.push(t)}(p,e),{edits:await A(p),options:d}}(e,r,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,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:d,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1};return l.editedFeatureResults?.length&&(y.editedFeatures=l.editedFeatureResults),u.resolve(y),l}catch(e){throw u.reject(e),e}}function F(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${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.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function Z(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new s.Z(`${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.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,u.sJ)(a.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function A(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),n=await(0,d.aX)(a),s=t.length,i=r.length;return n.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),n.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function S(e){const t=new a.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function v(e){return"mesh"===e?.geometry?.type}function I(e,t,r,a){if(!h(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>s,S0:()=>n,d1:()=>i});const a=[["binary","application/octet-stream","bin",""]];function n(e,t){return l(function(e,t){return o(t).find((t=>u(t)===e))}(e,t))}function s(e,t){return l(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return u(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function o(e){return[...a,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var a=r(22974),n=r(81271);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,n.mN)(e):(0,a.d9)(e)}function o(e,t,r){const a={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){a[n]=[];for(let e=0;e<s.length;e++)a[n][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[n]);a[n]=t?e:JSON.stringify(e)}else a[n]=t?s:JSON.stringify(s);else a[n]=s}return a}r(71058)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,i)=>{i.d(r,{computeObjectLayerResourceSize:()=>u}),i(3172);var t=i(20102),o=i(13867),n=i(65617),s=i(60437),c=i(45119);let l=new o.z(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource.href;if(!r)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=l.get(r);if(void 0!==o)return o;const{fetch:c}=await Promise.all([i.e(6481),i.e(5590),i.e(7681),i.e(8598),i.e(723)]).then(i.bind(i,70723)),u=await c(r,{disableTextures:!0}),a=(0,s.dp)(u.referenceBoundingBox,(0,n.c)());return l.put(r,a),a}if(!e.resource?.primitive)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.Ue)((0,c.Uz)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.dp)(o,(0,n.c)())}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,i)=>{i.d(r,{computeObjectLayerResourceSize:()=>u}),i(3172);var t=i(20102),o=i(13867),n=i(65617),s=i(60437),c=i(45119);let l=new o.z(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource.href;if(!r)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=l.get(r);if(void 0!==o)return o;const{fetch:c}=await Promise.all([i.e(6481),i.e(5590),i.e(7681),i.e(8598),i.e(706)]).then(i.bind(i,40706)),u=await c(r,{disableTextures:!0}),a=(0,s.dp)(u.referenceBoundingBox,(0,n.c)());return l.put(r,a),a}if(!e.resource?.primitive)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.Ue)((0,c.Uz)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.dp)(o,(0,n.c)())}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3847],{66577:(e,n,t)=>{t.d(n,{qM:()=>c});var i=t(75215),l=t(6570),r=t(9361),a=t(65091),o=t(94139),s=t(38913),u=t(58901);t(82971),t(86973),t(33955);const c={base:r.Z,key:"type",typeMap:{extent:l.Z,multipoint:a.Z,point:o.Z,polyline:u.Z,polygon:s.Z}};(0,i.N7)(c)},33955:(e,n,t)=>{t.d(n,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>p,l9:()=>d,oU:()=>m,q9:()=>g,wp:()=>f});var i=t(6570),l=t(9361),r=t(65091),a=t(94139),o=t(38913),s=t(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function f(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function m(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof l.Z?e:f(e)?a.Z.fromJSON(e):d(e)?s.Z.fromJSON(e):m(e)?o.Z.fromJSON(e):c(e)?r.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function y(e){return e?f(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":m(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const h={esriGeometryPoint:a.Z,esriGeometryPolyline:s.Z,esriGeometryPolygon:o.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:r.Z};function g(e){return e&&h[e]||null}},82397:(e,n,t)=>{t.d(n,{G6:()=>y,Ie:()=>p,J9:()=>d,RF:()=>f,U1:()=>m,vY:()=>a}),t(33955);const i=(e,n,t)=>[n,t],l=(e,n,t)=>[n,t,e[2]],r=(e,n,t)=>[n,t,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:n},t){return t*e[0]+n[0]}function s({scale:e,translate:n},t){return n[1]-t*e[1]}function u(e,n,t){const i=new Array(t.length);if(!t.length)return i;const[l,r]=e.scale;let a=o(e,t[0][0]),u=s(e,t[0][1]);i[0]=n(t[0],a,u);for(let e=1;e<t.length;e++){const o=t[e];a+=o[0]*l,u-=o[1]*r,i[e]=n(o,a,u)}return i}function c(e,n,t){const i=new Array(t.length);for(let l=0;l<t.length;l++)i[l]=u(e,n,t[l]);return i}function f(e,n,t,i,l){return n.x=function({scale:e,translate:n},t){return Math.round((t-n[0])/e[0])}(e,t.x),n.y=function({scale:e,translate:n},t){return Math.round((n[1]-t)/e[1])}(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m)),n}function d(e,n,t,a,o){return null!=t&&(n.points=function(e,n,t,a){return u(e,t?a?r:l:a?l:i,n)}(e,t.points,a,o)),n}function m(e,n,t,i,l){return null==t||(n.x=o(e,t.x),n.y=s(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m))),n}function p(e,n,t,a,o){return null!=t&&(n.rings=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.rings,a,o)),n}function y(e,n,t,a,o){return null!=t&&(n.paths=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.paths,a,o)),n}},86973:(e,n,t)=>{t.d(n,{M:()=>l,P:()=>r});var i=t(35454);const l=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},35671:(e,n,t)=>{t.d(n,{io:()=>F,AB:()=>b,gd:()=>g,Q0:()=>h,YN:()=>d,UF:()=>p,O5:()=>V,CH:()=>x,os:()=>C,Hp:()=>D,Fv:()=>M,H7:()=>U,Ec:()=>ee,qN:()=>q,q6:()=>u,Pz:()=>B,Lk:()=>v,Qc:()=>j,vP:()=>K}),t(20102);var i,l,r=t(78286);(l=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",l.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var a=t(59266);const o=/^([0-9_])/,s=/[^a-z0-9_\u0080-\uffff]+/gi;function u(e){return null==e?null:e.trim().replaceAll(s,"_").replace(o,"F$1")||null}const c=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function d(e,n){if(null!=e&&null!=n)for(const t of Array.isArray(e)?e:[e])if(m(c,t,n),"visualVariables"in t&&t.visualVariables)for(const e of t.visualVariables)m(f,e,n)}function m(e,n,t){if(e)for(const i of e){const e=(0,r.hS)(i,n),l=e&&"function"!=typeof e&&t.get(e);l&&(0,r.RB)(i,l.name,n)}}function p(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const t=n.get(e.startField),i=n.get(e.endField);e.startField=t?.name??null,e.endField=i?.name??null}else{const t=n.get(e.startTimeField),i=n.get(e.endTimeField);e.startTimeField=t?.name??null,e.endTimeField=i?.name??null}}const y=new Set;function h(e,n){return e&&n?(y.clear(),g(y,e,n),Array.from(y).sort()):[]}function g(e,n,t){if(t)if(n?.fields?.length)if(t.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const i of t)b(e,n,i);else{if(t.includes("*"))return e.clear(),void e.add("*");for(const n of t)null!=n&&e.add(n)}}function b(e,n,t){if("string"==typeof t)if(n){const i=n.get(t);i&&e.add(i.name)}else e.add(t)}function v(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}async function F(e,n,t){if(!t)return;const{arcadeUtils:i}=await(0,a.LC)(),l=i.extractFieldNames(t,n?.fields?.map((e=>e.name)));for(const t of l)b(e,n,t)}function V({displayField:e,fields:n}){return e||(n&&n.length?T(n,"name-or-title")||T(n,"unique-identifier")||T(n,"type-or-category")||function(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}(n):null)}function T(e,n){for(const t of e)if(t&&t.valueType&&t.valueType===n)return t.name;return null}function x(e){return e?h(e.fieldsIndex,N(e)):[]}const I=["oid","global-id","guid"],_=["oid","global-id"],w=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function N(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:t,creatorField:i,editDateField:l,editorField:r}=n;return[t,i,l,r].filter(Boolean)}function S(e){return N(e).map((e=>e.toLowerCase()))}function D(e,n){return e.editable&&!I.includes(e.type)&&!S(n).includes(e.name?.toLowerCase()??"")}function M(e,n){const t=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&t===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&t===n.globalIdField.toLowerCase()||function(e){const n=new Set;S(e).forEach((e=>n.add(e))),function(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?h(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}(e).forEach((e=>n.add(e.toLowerCase())));const t=e&&"infoFor3D"in e?e.infoFor3D:void 0;return t&&(Object.values(t.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(t.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}(n).includes(t)||_.includes(e.type)||w.some((e=>e.test(t))))}function C(e){const n=e.defaultValue;return void 0!==n&&O(e,n)?n:e.nullable?null:void 0}function z(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function $(e){return null===e||z(e)}const E="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function k(e){return null===e||E(e)}function A(e){return null!=e&&"string"==typeof e}function G(e){return null===e||A(e)}function L(){return!0}function O(e,n){let t;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":t=e.nullable?k:E;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":t=e.nullable?$:z;break;case"string":case"esriFieldTypeString":t=e.nullable?G:A;break;default:t=L}return 1===arguments.length?t:t(n)}const P=new Set(["integer","small-integer","single","double","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function U(e){return null!=e&&P.has(e.type)}function q(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var Z,R;function B(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function j(e,n){return null==e||e.nullable&&null===n?null:U(e)&&!function(e,n){const t="string"==typeof e?J(e):e;if(!t)return!1;const i=t.min,l=t.max;return t.isInteger?E(n)&&n>=i&&n<=l:n>=i&&n<=l}(e.type,Number(n))?Z.OUT_OF_RANGE:O(e,n)?e.domain?function(e,n){switch(e.type){case"range":{const t="range"in e?e.range[0]:e.minValue,l="range"in e?e.range[1]:e.maxValue;if(null!=t&&+n<t||null!=l&&+n>l)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==n)))return i.INVALID_CODED_VALUE}return null}(e.domain,n):null:R.INVALID_TYPE}function J(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Y;case"esriFieldTypeInteger":case"integer":return X;case"esriFieldTypeBigInteger":case"big-integer":return Q;case"esriFieldTypeSingle":case"single":return H;case"esriFieldTypeDouble":case"double":return W}}new Set(["date","date-only","time-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Z||(Z={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(R||(R={}));const Y={min:-32768,max:32767,isInteger:!0},X={min:-2147483648,max:2147483647,isInteger:!0},Q={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},H={min:-34e37,max:12e37,isInteger:!1},W={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function K(e,n,t){switch(e){case i.INVALID_CODED_VALUE:return`Value ${t} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${t} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case R.INVALID_TYPE:return`Value ${t} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Z.OUT_OF_RANGE:{const{min:e,max:i}=J(n.type);return`Value ${t} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${i}`}}}function ee(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}},10278:(e,n,t)=>{t.d(n,{Z:()=>d});var i=t(43697),l=t(35454),r=t(96674),a=t(5600),o=(t(75215),t(67676),t(80442),t(36030)),s=t(52011);const u=new l.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new l.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends r.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,o.J)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,i._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,i._)([(0,s.j)("esri.rest.support.ClassBreaksDefinition")],f);const d=f},622:(e,n,t)=>{t.d(n,{k:()=>r});const i=t(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function l(e,n){return Number(e.toFixed(n))}function r(e){const{normalizationTotal:n}=e;return{classBreaks:a(e),normalizationTotal:n}}function a(e){const n=e.definition,{classificationMethod:t,normalizationType:i,definedInterval:r}=n,a=n.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,n)=>e-n));const f=c[0],d=c[c.length-1];if("equal-interval"===t)if(c.length>=a){const e=(d-f)/a;let n=f;for(let t=1;t<a;t++){const r=l(f+t*e,6);u.push({minValue:n,maxValue:r,label:o(n,r,i)}),n=r}u.push({minValue:n,maxValue:d,label:o(n,d,i)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:o(e,e,i)})}));else if("natural-breaks"===t){const n=function(e){const n=[],t=[];let i=Number.MIN_VALUE,l=1,r=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(l++,t[r]=l):null!==o&&(n.push(o),i=o,l=1,t.push(l),r++)}return{uniqueValues:n,valueFrequency:t}}(c),t=e.valueFrequency||n.valueFrequency,r=s(n.uniqueValues,t,a);let m=f;for(let e=1;e<a;e++)if(n.uniqueValues.length>e){const t=l(n.uniqueValues[r[e]],6);u.push({minValue:m,maxValue:t,label:o(m,t,i)}),m=t}u.push({minValue:m,maxValue:d,label:o(m,d,i)})}else if("quantile"===t)if(c.length>=a&&f!==d){let e=f,n=Math.ceil(c.length/a),t=0;for(let l=1;l<a;l++){let r=n+t-1;r>c.length&&(r=c.length-1),r<0&&(r=0),u.push({minValue:e,maxValue:c[r],label:o(e,c[r],i)}),e=c[r],t+=n,n=Math.ceil((c.length-t)/(a-l))}u.push({minValue:e,maxValue:d,label:o(e,d,i)})}else{let e=-1;for(let n=0;n<c.length;n++){const t=c[n];t!==e&&(e=t,u.push({minValue:e,maxValue:t,label:o(e,t,i)}),e=t)}}else if("standard-deviation"===t){const e=function(e){let n=0;for(let t=0;t<e.length;t++)n+=e[t];return n/=e.length,n}(c),n=function(e,n){let t=0;for(let i=0;i<e.length;i++){const l=e[i];t+=(l-n)*(l-n)}return t/=e.length,Math.sqrt(t)}(c,e);if(0===n)u.push({minValue:c[0],maxValue:c[0],label:o(c[0],c[0],i)});else{const t=function(e,n,t,i,l){let r=Math.max(i-e,n-i)/l/t;return r=r>=1?1:r>=.5?.5:.25,r}(f,d,a,e,n)*n;let r=0,s=f;for(let n=a;n>=1;n--){const a=l(e-(n-.5)*t,6);u.push({minValue:s,maxValue:a,label:o(s,a,i)}),s=a,r++}let c=l(e+.5*t,6);u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++;for(let n=1;n<=a;n++)c=r===2*a?d:l(e+(n+.5)*t,6),u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++}}else if("defined-interval"===t){if(!r)return u;const e=c[0],n=c[c.length-1],t=Math.ceil((n-e)/r);let a=e;for(let n=1;n<t;n++){const t=l(e+n*r,6);u.push({minValue:a,maxValue:t,label:o(a,t,i)}),a=t}u.push({minValue:a,maxValue:n,label:o(a,n,i)})}return u}function o(e,n,t){let i=null;return i=e===n?t&&"percent-of-total"===t?e+"%":e.toString():t&&"percent-of-total"===t?e+"% - "+n+"%":e+" - "+n,i}function s(e,n,t){const i=e.length,l=[];t>i&&(t=i);for(let e=0;e<t;e++)l.push(Math.round(e*i/t-1));l.push(i-1);let r=u(l,e,n,t);return function(e,n,t,i,l,r){let a=0,o=0,s=0,u=0,f=!0;for(let d=0;d<2&&f;d++){0===d&&(f=!1);for(let d=0;d<r-1;d++)for(;t[d+1]+1!==t[d+2];){t[d+1]=t[d+1]+1;const r=c(d,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d+1,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d]+n[d+1])){t[d+1]=t[d+1]-1;break}n[d]=a,n[d+1]=o,e[d]=s,e[d+1]=u,f=!0}for(let d=r-1;d>0;d--)for(;t[d]!==t[d-1]+1;){t[d]=t[d]-1;const r=c(d-1,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d-1]+n[d])){t[d]=t[d]+1;break}n[d-1]=a,n[d]=o,e[d-1]=s,e[d]=u,f=!0}}return f}(r.mean,r.sdcm,l,e,n,t)&&(r=u(l,e,n,t)),l}function u(e,n,t,i){let l=[],r=[],a=[],o=0;const s=[],u=[];for(let l=0;l<i;l++){const i=c(l,e,n,t);s.push(i.sbMean),u.push(i.sbSdcm),o+=u[l]}let f,d=o,m=!0;for(;m||o<d;){m=!1,l=[];for(let n=0;n<i;n++)l.push(e[n]);for(let t=0;t<i;t++)for(let l=e[t]+1;l<=e[t+1];l++)if(f=n[l],t>0&&l!==e[t+1]&&Math.abs(f-s[t])>Math.abs(f-s[t-1]))e[t]=l;else if(t<i-1&&e[t]!==l-1&&Math.abs(f-s[t])>Math.abs(f-s[t+1])){e[t+1]=l-1;break}d=o,o=0,r=[],a=[];for(let l=0;l<i;l++){r.push(s[l]),a.push(u[l]);const i=c(l,e,n,t);s[l]=i.sbMean,u[l]=i.sbSdcm,o+=u[l]}}if(o>d){for(let n=0;n<i;n++)e[n]=l[n],s[n]=r[n],u[n]=a[n];o=d}return{mean:s,sdcm:u}}function c(e,n,t,l){let r=0,a=0;for(let i=n[e]+1;i<=n[e+1];i++){const e=l[i];r+=t[i]*e,a+=e}a<=0&&i.warn("Exception in Natural Breaks calculation");const o=r/a;let s=0;for(let i=n[e]+1;i<=n[e+1];i++)s+=l[i]*(t[i]-o)**2;return{sbMean:o,sbSdcm:s}}},24452:(e,n,t)=>{t.d(n,{DL:()=>D,F_:()=>T,G2:()=>N,H0:()=>y,Lq:()=>b,Qm:()=>_,S5:()=>p,XL:()=>g,eT:()=>x,fk:()=>w,i5:()=>h,oF:()=>M,wk:()=>m});var i=t(10278),l=t(622);const r="<Null>",a="equal-interval",o=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?r:e}function p(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!i}function y(e){const n=e.returnDistinct?[...new Set(e.values)]:e.values,t=n.filter((e=>null!=e)).length,i={count:t};return e.supportsNullCount&&(i.nullcount=n.length-t),e.percentileParams&&(i.median=g(n,e.percentileParams)),i}function h(e){const{values:n,useSampleStdDev:t,supportsNullCount:i}=e;let l=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=null,o=null,s=null,u=null,c=0;const f=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of n)Number.isFinite(e)?e>=f&&e<=d&&(a=null===a?e:a+e,l=Math.min(l,e),r=Math.max(r,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const t of n)Number.isFinite(t)&&t>=f&&t<=d&&(e+=(t-o)**2);u=t?c>1?e/(c-1):0:c>0?e/c:0,s=Math.sqrt(u)}else l=null,r=null;const m={avg:o,count:c,max:r,min:l,stddev:s,sum:a,variance:u};return i&&(m.nullcount=n.length-c),e.percentileParams&&(m.median=g(n,e.percentileParams)),m}function g(e,n){const{fieldType:t,value:i,orderBy:l,isDiscrete:r}=n,a=b(t,"desc"===l);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,n)=>a(e,n)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,s=Math.floor(o),u=s+1,c=o%1,f=e[s],d=e[u];return u>=e.length||r||"string"==typeof f||"string"==typeof d?f:f*(1-c)+d*c}function b(e,n){const t=n?1:-1,i=function(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:n-e}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:e-n}}(n),l=F(n);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...f].includes(e))return(e,n)=>"number"==typeof e&&"number"==typeof n?i(e,n):"string"==typeof e&&"string"==typeof n?l(e,n):t;if("esriFieldTypeDate"===e)return(e,n)=>{const l=new Date(e).getTime(),r=new Date(n).getTime();return isNaN(l)||isNaN(r)?t:i(l,r)};if(f.has(e))return(e,n)=>i(e,n);if("esriFieldTypeString"===e)return(e,n)=>l(e,n);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=F(n);return(n,t)=>e(V(n),V(t))}return n?(e,n)=>1:(e,n)=>-1}function v(e,n,t){if(t){if(null==e)return null==n?0:1;if(null==n)return-1}else{if(null==e)return null==n?0:-1;if(null==n)return 1}return null}function F(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}function V(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,n){let t;for(t in e)d.includes(t)&&(Number.isFinite(e[t])||(e[t]=null));return n?(["avg","stddev","variance"].forEach((n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))})),e):e}function x(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function I(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function _(e,n,t,i){const l=e.count,r=[];if(t&&n){const e=[],t=I(n[0]);for(const l of t)if(n[1]){const t=I(n[1]);for(const r of t)if(n[2]){const t=I(n[2]);for(const n of t)e.push(`${m(l)}${i}${m(r)}${i}${m(n)}`)}else e.push(`${m(l)}${i}${m(r)}`)}else e.push(l);for(const n of e)l.hasOwnProperty(n)||(l[n]={data:n,count:0})}for(const e in l){const n=l[e];r.push({value:n.data,count:n.count,label:n.label})}return{uniqueValueInfos:r}}function w(e,n,t,i){let l=null;switch(n){case"log":0!==e&&(l=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(l=e/i*100);break;case"field":Number.isFinite(t)&&0!==t&&(l=e/t);break;case"natural-log":e>0&&(l=Math.log(e));break;case"square-root":e>0&&(l=e**.5)}return l}function N(e,n){const t=S({field:n.field,normalizationType:n.normalizationType,normalizationField:n.normalizationField,classificationMethod:n.classificationMethod,standardDeviationInterval:n.standardDeviationInterval,breakCount:n.numClasses||s});return e=function(e,n,t){const i=n??-1/0,l=t??1/0;return e.filter((e=>Number.isFinite(e)&&e>=i&&e<=l))}(e,n.minValue,n.maxValue),(0,l.k)({definition:t,values:e,normalizationTotal:n.normalizationTotal})}function S(e){const{breakCount:n,field:t,normalizationField:l,normalizationType:r}=e,s=e.classificationMethod||a,u="standard-deviation"===s?e.standardDeviationInterval||o:void 0;return new i.Z({breakCount:n,classificationField:t,classificationMethod:s,normalizationField:"field"===r?l:void 0,normalizationType:r,standardDeviationInterval:u})}function D(e,n){let t=e.classBreaks;const i=t.length,l=t[0]?.minValue,r=t[i-1]?.maxValue,a="standard-deviation"===n,o=c;return t=t.map((e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(a&&n){const e=n.match(o),i=e?.map((e=>+e.trim()))??[];2===i.length?(t.minStdDev=i[0],t.maxStdDev=i[1],i[0]<0&&i[1]>0&&(t.hasAvg=!0)):1===i.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=i[0]):n.includes(">")&&(t.minStdDev=i[0],t.maxStdDev=null))}return t})),{minValue:l,maxValue:r,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function M(e,n){const t=C(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const i=t.intervals,l=t.min??0,r=t.max??0,a=i.map(((e,n)=>({minValue:i[n][0],maxValue:i[n][1],count:0})));for(const n of e)if(null!=n&&n>=l&&n<=r){const e=z(i,n);e>-1&&a[e].count++}return{bins:a,minValue:l,maxValue:r,normalizationTotal:n.normalizationTotal}}function C(e,n){const{field:t,classificationMethod:i,standardDeviationInterval:l,normalizationType:r,normalizationField:a,normalizationTotal:o,minValue:s,maxValue:c}=n,f=n.numBins||u;let d=null,m=null,y=null;if(i&&"equal-interval"!==i||r){const{classBreaks:n}=N(e,{field:t,normalizationType:r,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:l,minValue:s,maxValue:c,numClasses:f});d=n[0].minValue,m=n[n.length-1].maxValue,y=n.map((e=>[e.minValue,e.maxValue]))}else{if(null!=s&&null!=c)d=s,m=c;else{const n=h({values:e,minValue:s,maxValue:c,useSampleStdDev:!r,supportsNullCount:p({normalizationType:r,normalizationField:a,minValue:s,maxValue:c})});d=n.min??null,m=n.max??null}y=function(e,n,t){const i=(n-e)/t,l=[];let r,a=e;for(let e=1;e<=t;e++)r=a+i,r=Number(r.toFixed(16)),l.push([a,e===t?n:r]),a=r;return l}(d??0,m??0,f)}return{min:d,max:m,intervals:y}}function z(e,n){let t=-1;for(let i=e.length-1;i>=0;i--)if(n>=e[i][0]){t=i;break}return t}},59266:(e,n,t)=>{t.d(n,{LC:()=>s,WW:()=>u,Yi:()=>c,mz:()=>d,pp:()=>f}),t(66577);var i=t(20102),l=t(92604),r=t(82971);const a=l.Z.getLogger("esri.support.arcadeOnDemand");let o;function s(){return o||(o=(async()=>{const e=await Promise.all([t.e(7126),t.e(8732),t.e(1965),t.e(8522),t.e(1482),t.e(837)]).then(t.bind(t,20837));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),o}const u=(e,n,t)=>d.create(e,n,t,null,["$feature"],[]),c=(e,n,t)=>d.create(e,n,t,null,["$feature","$view"],[]),f=(e,n,t,i)=>d.create(e,n,t,i,["$feature","$view"],[]);class d{constructor(e,n,t,i,l,r,a){this.services=null,this.script=e,this.evaluate=i;const o=Array.isArray(r)?r:r.fields;this.fields=o,this._syntaxTree=t,this._arcade=n,this._arcadeFeature=l,this._spatialReference=a,this._referencesGeometry=n.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,n,t,l,o,u){const{arcade:c,Feature:f,Dictionary:m}=await s(),p=r.Z.fromJSON(n);let y;try{y=c.parseScript(e,u)}catch(n){return a.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:n})),null}const h=o.reduce(((e,n)=>({...e,[n]:null})),{});let g=null;null!=l&&(g=new m(l),g.immutable=!0,h.$config=null);const b=c.scriptUsesGeometryEngine(y),v=b&&c.enableGeometrySupport(),F=c.scriptUsesFeatureSet(y)&&c.enableFeatureSetSupport(),V=c.scriptIsAsync(y),T=V&&c.enableAsyncSupport(),x={vars:h,spatialReference:p,useAsync:!!T};await Promise.all([v,F,T]);const I=new Set;await c.loadDependentModules(I,y,null,V,b);const _=new m;_.immutable=!1,_.setField("scale",0);const w=c.compileScript(y,x);return new d(e,c,y,((e,n)=>("$view"in e&&e.$view&&(_.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=_),g&&(e.$config=g),w({vars:e,spatialReference:p,services:n}))),new f,t,p)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3847],{66577:(e,n,t)=>{t.d(n,{qM:()=>c});var i=t(75215),l=t(6570),r=t(9361),a=t(65091),o=t(94139),s=t(38913),u=t(58901);t(82971),t(86973),t(33955);const c={base:r.Z,key:"type",typeMap:{extent:l.Z,multipoint:a.Z,point:o.Z,polyline:u.Z,polygon:s.Z}};(0,i.N7)(c)},33955:(e,n,t)=>{t.d(n,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>p,l9:()=>d,oU:()=>m,q9:()=>g,wp:()=>f});var i=t(6570),l=t(9361),r=t(65091),a=t(94139),o=t(38913),s=t(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function f(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function m(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof l.Z?e:f(e)?a.Z.fromJSON(e):d(e)?s.Z.fromJSON(e):m(e)?o.Z.fromJSON(e):c(e)?r.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function y(e){return e?f(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":m(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const h={esriGeometryPoint:a.Z,esriGeometryPolyline:s.Z,esriGeometryPolygon:o.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:r.Z};function g(e){return e&&h[e]||null}},82397:(e,n,t)=>{t.d(n,{G6:()=>y,Ie:()=>p,J9:()=>d,RF:()=>f,U1:()=>m,vY:()=>a}),t(33955);const i=(e,n,t)=>[n,t],l=(e,n,t)=>[n,t,e[2]],r=(e,n,t)=>[n,t,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:n},t){return t*e[0]+n[0]}function s({scale:e,translate:n},t){return n[1]-t*e[1]}function u(e,n,t){const i=new Array(t.length);if(!t.length)return i;const[l,r]=e.scale;let a=o(e,t[0][0]),u=s(e,t[0][1]);i[0]=n(t[0],a,u);for(let e=1;e<t.length;e++){const o=t[e];a+=o[0]*l,u-=o[1]*r,i[e]=n(o,a,u)}return i}function c(e,n,t){const i=new Array(t.length);for(let l=0;l<t.length;l++)i[l]=u(e,n,t[l]);return i}function f(e,n,t,i,l){return n.x=function({scale:e,translate:n},t){return Math.round((t-n[0])/e[0])}(e,t.x),n.y=function({scale:e,translate:n},t){return Math.round((n[1]-t)/e[1])}(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m)),n}function d(e,n,t,a,o){return null!=t&&(n.points=function(e,n,t,a){return u(e,t?a?r:l:a?l:i,n)}(e,t.points,a,o)),n}function m(e,n,t,i,l){return null==t||(n.x=o(e,t.x),n.y=s(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m))),n}function p(e,n,t,a,o){return null!=t&&(n.rings=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.rings,a,o)),n}function y(e,n,t,a,o){return null!=t&&(n.paths=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.paths,a,o)),n}},86973:(e,n,t)=>{t.d(n,{M:()=>l,P:()=>r});var i=t(35454);const l=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},35671:(e,n,t)=>{t.d(n,{io:()=>F,AB:()=>b,gd:()=>g,Q0:()=>h,YN:()=>d,UF:()=>p,O5:()=>V,CH:()=>x,os:()=>C,Hp:()=>D,Fv:()=>M,H7:()=>U,Ec:()=>ee,qN:()=>q,q6:()=>u,Pz:()=>B,Lk:()=>v,Qc:()=>j,vP:()=>K}),t(20102);var i,l,r=t(78286);(l=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",l.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var a=t(59266);const o=/^([0-9_])/,s=/[^a-z0-9_\u0080-\uffff]+/gi;function u(e){return null==e?null:e.trim().replaceAll(s,"_").replace(o,"F$1")||null}const c=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function d(e,n){if(null!=e&&null!=n)for(const t of Array.isArray(e)?e:[e])if(m(c,t,n),"visualVariables"in t&&t.visualVariables)for(const e of t.visualVariables)m(f,e,n)}function m(e,n,t){if(e)for(const i of e){const e=(0,r.hS)(i,n),l=e&&"function"!=typeof e&&t.get(e);l&&(0,r.RB)(i,l.name,n)}}function p(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const t=n.get(e.startField),i=n.get(e.endField);e.startField=t?.name??null,e.endField=i?.name??null}else{const t=n.get(e.startTimeField),i=n.get(e.endTimeField);e.startTimeField=t?.name??null,e.endTimeField=i?.name??null}}const y=new Set;function h(e,n){return e&&n?(y.clear(),g(y,e,n),Array.from(y).sort()):[]}function g(e,n,t){if(t)if(n?.fields?.length)if(t.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const i of t)b(e,n,i);else{if(t.includes("*"))return e.clear(),void e.add("*");for(const n of t)null!=n&&e.add(n)}}function b(e,n,t){if("string"==typeof t)if(n){const i=n.get(t);i&&e.add(i.name)}else e.add(t)}function v(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}async function F(e,n,t){if(!t)return;const{arcadeUtils:i}=await(0,a.LC)(),l=i.extractFieldNames(t,n?.fields?.map((e=>e.name)));for(const t of l)b(e,n,t)}function V({displayField:e,fields:n}){return e||(n&&n.length?T(n,"name-or-title")||T(n,"unique-identifier")||T(n,"type-or-category")||function(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}(n):null)}function T(e,n){for(const t of e)if(t&&t.valueType&&t.valueType===n)return t.name;return null}function x(e){return e?h(e.fieldsIndex,N(e)):[]}const I=["oid","global-id","guid"],_=["oid","global-id"],w=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function N(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:t,creatorField:i,editDateField:l,editorField:r}=n;return[t,i,l,r].filter(Boolean)}function S(e){return N(e).map((e=>e.toLowerCase()))}function D(e,n){return e.editable&&!I.includes(e.type)&&!S(n).includes(e.name?.toLowerCase()??"")}function M(e,n){const t=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&t===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&t===n.globalIdField.toLowerCase()||function(e){const n=new Set;S(e).forEach((e=>n.add(e))),function(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?h(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}(e).forEach((e=>n.add(e.toLowerCase())));const t=e&&"infoFor3D"in e?e.infoFor3D:void 0;return t&&(Object.values(t.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(t.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}(n).includes(t)||_.includes(e.type)||w.some((e=>e.test(t))))}function C(e){const n=e.defaultValue;return void 0!==n&&O(e,n)?n:e.nullable?null:void 0}function z(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function $(e){return null===e||z(e)}const E="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function k(e){return null===e||E(e)}function A(e){return null!=e&&"string"==typeof e}function G(e){return null===e||A(e)}function L(){return!0}function O(e,n){let t;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":t=e.nullable?k:E;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":t=e.nullable?$:z;break;case"string":case"esriFieldTypeString":t=e.nullable?G:A;break;default:t=L}return 1===arguments.length?t:t(n)}const P=new Set(["integer","small-integer","single","double","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function U(e){return null!=e&&P.has(e.type)}function q(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var Z,R;function B(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function j(e,n){return null==e||e.nullable&&null===n?null:U(e)&&!function(e,n){const t="string"==typeof e?J(e):e;if(!t)return!1;const i=t.min,l=t.max;return t.isInteger?E(n)&&n>=i&&n<=l:n>=i&&n<=l}(e.type,Number(n))?Z.OUT_OF_RANGE:O(e,n)?e.domain?function(e,n){switch(e.type){case"range":{const t="range"in e?e.range[0]:e.minValue,l="range"in e?e.range[1]:e.maxValue;if(null!=t&&+n<t||null!=l&&+n>l)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==n)))return i.INVALID_CODED_VALUE}return null}(e.domain,n):null:R.INVALID_TYPE}function J(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Y;case"esriFieldTypeInteger":case"integer":return X;case"esriFieldTypeBigInteger":case"big-integer":return Q;case"esriFieldTypeSingle":case"single":return H;case"esriFieldTypeDouble":case"double":return W}}new Set(["date","date-only","time-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Z||(Z={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(R||(R={}));const Y={min:-32768,max:32767,isInteger:!0},X={min:-2147483648,max:2147483647,isInteger:!0},Q={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},H={min:-34e37,max:12e37,isInteger:!1},W={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function K(e,n,t){switch(e){case i.INVALID_CODED_VALUE:return`Value ${t} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${t} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case R.INVALID_TYPE:return`Value ${t} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Z.OUT_OF_RANGE:{const{min:e,max:i}=J(n.type);return`Value ${t} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${i}`}}}function ee(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}},10278:(e,n,t)=>{t.d(n,{Z:()=>d});var i=t(43697),l=t(35454),r=t(96674),a=t(5600),o=(t(75215),t(67676),t(80442),t(36030)),s=t(52011);const u=new l.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new l.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends r.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,o.J)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,i._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,i._)([(0,s.j)("esri.rest.support.ClassBreaksDefinition")],f);const d=f},622:(e,n,t)=>{t.d(n,{k:()=>r});const i=t(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function l(e,n){return Number(e.toFixed(n))}function r(e){const{normalizationTotal:n}=e;return{classBreaks:a(e),normalizationTotal:n}}function a(e){const n=e.definition,{classificationMethod:t,normalizationType:i,definedInterval:r}=n,a=n.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,n)=>e-n));const f=c[0],d=c[c.length-1];if("equal-interval"===t)if(c.length>=a){const e=(d-f)/a;let n=f;for(let t=1;t<a;t++){const r=l(f+t*e,6);u.push({minValue:n,maxValue:r,label:o(n,r,i)}),n=r}u.push({minValue:n,maxValue:d,label:o(n,d,i)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:o(e,e,i)})}));else if("natural-breaks"===t){const n=function(e){const n=[],t=[];let i=Number.MIN_VALUE,l=1,r=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(l++,t[r]=l):null!==o&&(n.push(o),i=o,l=1,t.push(l),r++)}return{uniqueValues:n,valueFrequency:t}}(c),t=e.valueFrequency||n.valueFrequency,r=s(n.uniqueValues,t,a);let m=f;for(let e=1;e<a;e++)if(n.uniqueValues.length>e){const t=l(n.uniqueValues[r[e]],6);u.push({minValue:m,maxValue:t,label:o(m,t,i)}),m=t}u.push({minValue:m,maxValue:d,label:o(m,d,i)})}else if("quantile"===t)if(c.length>=a&&f!==d){let e=f,n=Math.ceil(c.length/a),t=0;for(let l=1;l<a;l++){let r=n+t-1;r>c.length&&(r=c.length-1),r<0&&(r=0),u.push({minValue:e,maxValue:c[r],label:o(e,c[r],i)}),e=c[r],t+=n,n=Math.ceil((c.length-t)/(a-l))}u.push({minValue:e,maxValue:d,label:o(e,d,i)})}else{let e=-1;for(let n=0;n<c.length;n++){const t=c[n];t!==e&&(e=t,u.push({minValue:e,maxValue:t,label:o(e,t,i)}),e=t)}}else if("standard-deviation"===t){const e=function(e){let n=0;for(let t=0;t<e.length;t++)n+=e[t];return n/=e.length,n}(c),n=function(e,n){let t=0;for(let i=0;i<e.length;i++){const l=e[i];t+=(l-n)*(l-n)}return t/=e.length,Math.sqrt(t)}(c,e);if(0===n)u.push({minValue:c[0],maxValue:c[0],label:o(c[0],c[0],i)});else{const t=function(e,n,t,i,l){let r=Math.max(i-e,n-i)/l/t;return r=r>=1?1:r>=.5?.5:.25,r}(f,d,a,e,n)*n;let r=0,s=f;for(let n=a;n>=1;n--){const a=l(e-(n-.5)*t,6);u.push({minValue:s,maxValue:a,label:o(s,a,i)}),s=a,r++}let c=l(e+.5*t,6);u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++;for(let n=1;n<=a;n++)c=r===2*a?d:l(e+(n+.5)*t,6),u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++}}else if("defined-interval"===t){if(!r)return u;const e=c[0],n=c[c.length-1],t=Math.ceil((n-e)/r);let a=e;for(let n=1;n<t;n++){const t=l(e+n*r,6);u.push({minValue:a,maxValue:t,label:o(a,t,i)}),a=t}u.push({minValue:a,maxValue:n,label:o(a,n,i)})}return u}function o(e,n,t){let i=null;return i=e===n?t&&"percent-of-total"===t?e+"%":e.toString():t&&"percent-of-total"===t?e+"% - "+n+"%":e+" - "+n,i}function s(e,n,t){const i=e.length,l=[];t>i&&(t=i);for(let e=0;e<t;e++)l.push(Math.round(e*i/t-1));l.push(i-1);let r=u(l,e,n,t);return function(e,n,t,i,l,r){let a=0,o=0,s=0,u=0,f=!0;for(let d=0;d<2&&f;d++){0===d&&(f=!1);for(let d=0;d<r-1;d++)for(;t[d+1]+1!==t[d+2];){t[d+1]=t[d+1]+1;const r=c(d,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d+1,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d]+n[d+1])){t[d+1]=t[d+1]-1;break}n[d]=a,n[d+1]=o,e[d]=s,e[d+1]=u,f=!0}for(let d=r-1;d>0;d--)for(;t[d]!==t[d-1]+1;){t[d]=t[d]-1;const r=c(d-1,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d-1]+n[d])){t[d]=t[d]+1;break}n[d-1]=a,n[d]=o,e[d-1]=s,e[d]=u,f=!0}}return f}(r.mean,r.sdcm,l,e,n,t)&&(r=u(l,e,n,t)),l}function u(e,n,t,i){let l=[],r=[],a=[],o=0;const s=[],u=[];for(let l=0;l<i;l++){const i=c(l,e,n,t);s.push(i.sbMean),u.push(i.sbSdcm),o+=u[l]}let f,d=o,m=!0;for(;m||o<d;){m=!1,l=[];for(let n=0;n<i;n++)l.push(e[n]);for(let t=0;t<i;t++)for(let l=e[t]+1;l<=e[t+1];l++)if(f=n[l],t>0&&l!==e[t+1]&&Math.abs(f-s[t])>Math.abs(f-s[t-1]))e[t]=l;else if(t<i-1&&e[t]!==l-1&&Math.abs(f-s[t])>Math.abs(f-s[t+1])){e[t+1]=l-1;break}d=o,o=0,r=[],a=[];for(let l=0;l<i;l++){r.push(s[l]),a.push(u[l]);const i=c(l,e,n,t);s[l]=i.sbMean,u[l]=i.sbSdcm,o+=u[l]}}if(o>d){for(let n=0;n<i;n++)e[n]=l[n],s[n]=r[n],u[n]=a[n];o=d}return{mean:s,sdcm:u}}function c(e,n,t,l){let r=0,a=0;for(let i=n[e]+1;i<=n[e+1];i++){const e=l[i];r+=t[i]*e,a+=e}a<=0&&i.warn("Exception in Natural Breaks calculation");const o=r/a;let s=0;for(let i=n[e]+1;i<=n[e+1];i++)s+=l[i]*(t[i]-o)**2;return{sbMean:o,sbSdcm:s}}},24452:(e,n,t)=>{t.d(n,{DL:()=>D,F_:()=>T,G2:()=>N,H0:()=>y,Lq:()=>b,Qm:()=>_,S5:()=>p,XL:()=>g,eT:()=>x,fk:()=>w,i5:()=>h,oF:()=>M,wk:()=>m});var i=t(10278),l=t(622);const r="<Null>",a="equal-interval",o=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?r:e}function p(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!i}function y(e){const n=e.returnDistinct?[...new Set(e.values)]:e.values,t=n.filter((e=>null!=e)).sort(),i=t.length,l={count:i,min:t[0],max:t[i-1]};return e.supportsNullCount&&(l.nullcount=n.length-i),e.percentileParams&&(l.median=g(n,e.percentileParams)),l}function h(e){const{values:n,useSampleStdDev:t,supportsNullCount:i}=e;let l=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=null,o=null,s=null,u=null,c=0;const f=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of n)Number.isFinite(e)?e>=f&&e<=d&&(a=null===a?e:a+e,l=Math.min(l,e),r=Math.max(r,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const t of n)Number.isFinite(t)&&t>=f&&t<=d&&(e+=(t-o)**2);u=t?c>1?e/(c-1):0:c>0?e/c:0,s=Math.sqrt(u)}else l=null,r=null;const m={avg:o,count:c,max:r,min:l,stddev:s,sum:a,variance:u};return i&&(m.nullcount=n.length-c),e.percentileParams&&(m.median=g(n,e.percentileParams)),m}function g(e,n){const{fieldType:t,value:i,orderBy:l,isDiscrete:r}=n,a=b(t,"desc"===l);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,n)=>a(e,n)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,s=Math.floor(o),u=s+1,c=o%1,f=e[s],d=e[u];return u>=e.length||r||"string"==typeof f||"string"==typeof d?f:f*(1-c)+d*c}function b(e,n){const t=n?1:-1,i=function(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:n-e}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:e-n}}(n),l=F(n);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...f].includes(e))return(e,n)=>"number"==typeof e&&"number"==typeof n?i(e,n):"string"==typeof e&&"string"==typeof n?l(e,n):t;if("esriFieldTypeDate"===e)return(e,n)=>{const l=new Date(e).getTime(),r=new Date(n).getTime();return isNaN(l)||isNaN(r)?t:i(l,r)};if(f.has(e))return(e,n)=>i(e,n);if("esriFieldTypeString"===e)return(e,n)=>l(e,n);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=F(n);return(n,t)=>e(V(n),V(t))}return n?(e,n)=>1:(e,n)=>-1}function v(e,n,t){if(t){if(null==e)return null==n?0:1;if(null==n)return-1}else{if(null==e)return null==n?0:-1;if(null==n)return 1}return null}function F(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}function V(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,n){let t;for(t in e)d.includes(t)&&(Number.isFinite(e[t])||(e[t]=null));return n?(["avg","stddev","variance"].forEach((n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))})),e):e}function x(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function I(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function _(e,n,t,i){const l=e.count,r=[];if(t&&n){const e=[],t=I(n[0]);for(const l of t)if(n[1]){const t=I(n[1]);for(const r of t)if(n[2]){const t=I(n[2]);for(const n of t)e.push(`${m(l)}${i}${m(r)}${i}${m(n)}`)}else e.push(`${m(l)}${i}${m(r)}`)}else e.push(l);for(const n of e)l.hasOwnProperty(n)||(l[n]={data:n,count:0})}for(const e in l){const n=l[e];r.push({value:n.data,count:n.count,label:n.label})}return{uniqueValueInfos:r}}function w(e,n,t,i){let l=null;switch(n){case"log":0!==e&&(l=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(l=e/i*100);break;case"field":Number.isFinite(t)&&0!==t&&(l=e/t);break;case"natural-log":e>0&&(l=Math.log(e));break;case"square-root":e>0&&(l=e**.5)}return l}function N(e,n){const t=S({field:n.field,normalizationType:n.normalizationType,normalizationField:n.normalizationField,classificationMethod:n.classificationMethod,standardDeviationInterval:n.standardDeviationInterval,breakCount:n.numClasses||s});return e=function(e,n,t){const i=n??-1/0,l=t??1/0;return e.filter((e=>Number.isFinite(e)&&e>=i&&e<=l))}(e,n.minValue,n.maxValue),(0,l.k)({definition:t,values:e,normalizationTotal:n.normalizationTotal})}function S(e){const{breakCount:n,field:t,normalizationField:l,normalizationType:r}=e,s=e.classificationMethod||a,u="standard-deviation"===s?e.standardDeviationInterval||o:void 0;return new i.Z({breakCount:n,classificationField:t,classificationMethod:s,normalizationField:"field"===r?l:void 0,normalizationType:r,standardDeviationInterval:u})}function D(e,n){let t=e.classBreaks;const i=t.length,l=t[0]?.minValue,r=t[i-1]?.maxValue,a="standard-deviation"===n,o=c;return t=t.map((e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(a&&n){const e=n.match(o),i=e?.map((e=>+e.trim()))??[];2===i.length?(t.minStdDev=i[0],t.maxStdDev=i[1],i[0]<0&&i[1]>0&&(t.hasAvg=!0)):1===i.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=i[0]):n.includes(">")&&(t.minStdDev=i[0],t.maxStdDev=null))}return t})),{minValue:l,maxValue:r,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function M(e,n){const t=C(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const i=t.intervals,l=t.min??0,r=t.max??0,a=i.map(((e,n)=>({minValue:i[n][0],maxValue:i[n][1],count:0})));for(const n of e)if(null!=n&&n>=l&&n<=r){const e=z(i,n);e>-1&&a[e].count++}return{bins:a,minValue:l,maxValue:r,normalizationTotal:n.normalizationTotal}}function C(e,n){const{field:t,classificationMethod:i,standardDeviationInterval:l,normalizationType:r,normalizationField:a,normalizationTotal:o,minValue:s,maxValue:c}=n,f=n.numBins||u;let d=null,m=null,y=null;if(i&&"equal-interval"!==i||r){const{classBreaks:n}=N(e,{field:t,normalizationType:r,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:l,minValue:s,maxValue:c,numClasses:f});d=n[0].minValue,m=n[n.length-1].maxValue,y=n.map((e=>[e.minValue,e.maxValue]))}else{if(null!=s&&null!=c)d=s,m=c;else{const n=h({values:e,minValue:s,maxValue:c,useSampleStdDev:!r,supportsNullCount:p({normalizationType:r,normalizationField:a,minValue:s,maxValue:c})});d=n.min??null,m=n.max??null}y=function(e,n,t){const i=(n-e)/t,l=[];let r,a=e;for(let e=1;e<=t;e++)r=a+i,r=Number(r.toFixed(16)),l.push([a,e===t?n:r]),a=r;return l}(d??0,m??0,f)}return{min:d,max:m,intervals:y}}function z(e,n){let t=-1;for(let i=e.length-1;i>=0;i--)if(n>=e[i][0]){t=i;break}return t}},59266:(e,n,t)=>{t.d(n,{LC:()=>s,WW:()=>u,Yi:()=>c,mz:()=>d,pp:()=>f}),t(66577);var i=t(20102),l=t(92604),r=t(82971);const a=l.Z.getLogger("esri.support.arcadeOnDemand");let o;function s(){return o||(o=(async()=>{const e=await Promise.all([t.e(7126),t.e(8732),t.e(1965),t.e(8522),t.e(1482),t.e(837)]).then(t.bind(t,20837));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),o}const u=(e,n,t)=>d.create(e,n,t,null,["$feature"],[]),c=(e,n,t)=>d.create(e,n,t,null,["$feature","$view"],[]),f=(e,n,t,i)=>d.create(e,n,t,i,["$feature","$view"],[]);class d{constructor(e,n,t,i,l,r,a){this.services=null,this.script=e,this.evaluate=i;const o=Array.isArray(r)?r:r.fields;this.fields=o,this._syntaxTree=t,this._arcade=n,this._arcadeFeature=l,this._spatialReference=a,this._referencesGeometry=n.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,n,t,l,o,u){const{arcade:c,Feature:f,Dictionary:m}=await s(),p=r.Z.fromJSON(n);let y;try{y=c.parseScript(e,u)}catch(n){return a.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:n})),null}const h=o.reduce(((e,n)=>({...e,[n]:null})),{});let g=null;null!=l&&(g=new m(l),g.immutable=!0,h.$config=null);const b=c.scriptUsesGeometryEngine(y),v=b&&c.enableGeometrySupport(),F=c.scriptUsesFeatureSet(y)&&c.enableFeatureSetSupport(),V=c.scriptIsAsync(y),T=V&&c.enableAsyncSupport(),x={vars:h,spatialReference:p,useAsync:!!T};await Promise.all([v,F,T]);const I=new Set;await c.loadDependentModules(I,y,null,V,b);const _=new m;_.immutable=!1,_.setField("scale",0);const w=c.compileScript(y,x);return new d(e,c,y,((e,n)=>("$view"in e&&e.$view&&(_.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=_),g&&(e.$config=g),w({vars:e,spatialReference:p,services:n}))),new f,t,p)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3919],{13598:(e,t,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>n,b:()=>a,c:()=>s});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:s,createView:n,fromValues:function(e,t,r,s,a,n,i,o,u,l,d,c,p,h,y,f){return[e,t,r,s,a,n,i,o,u,l,d,c,p,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>a,d:()=>d,e:()=>u,n:()=>c,s:()=>l,t:()=>n});var s=r(72220);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return s.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/a,o=r[0],u=r[1],l=r[2],d=r[4],c=r[5],p=r[6],h=r[8],y=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let F=0,S=0;for(let r=0;r<i;r++){const r=t[F],s=t[F+1],i=t[F+2];e[S]=o*r+d*s+h*i+m,e[S+1]=u*r+c*s+y*i+g,e[S+2]=l*r+p*s+f*i+b,F+=n,S+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return void s.c.error("source and destination buffers need to have the same number of elements");const i=e.length/a,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],s=t[m+1],i=t[m+2];e[g]=o*r+d*s+h*i,e[g+1]=u*r+c*s+y*i,e[g+2]=l*r+p*s+f*i,m+=n,g+=a}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,s=3){const a=Math.min(e.length/s,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<a;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=s}function d(e,t){c(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r=3,s=r){const a=Math.min(e.length/r,t.length/s);let n=0,i=0;for(let o=0;o<a;o++){const a=t[n],o=t[n+1],u=t[n+2],l=a*a+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*a,e[i+1]=t*o,e[i+2]=t*u}n+=s,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:c,normalizeView:d,scale:l,scaleView:u,shiftRight:function(e,t,r){const s=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<s;e++)a[l]=i[u]>>r,a[l+1]=i[u+1]>>r,a[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:a},Symbol.toStringTag,{value:"Module"}))},41123:(e,t,r)=>{r.d(t,{D:()=>a,z:()=>n});const s="randomUUID"in crypto;function a(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${a()}}`}},85872:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),a=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),l=r(65617),d=r(94139);let c=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,l.c)()}getOriginPoint(e){const[t,r,s]=this.origin;return new d.Z({x:t,y:r,z:s,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:r}){this.origin=(0,l.f)(e,t,r??0)}};(0,s._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,s._)([(0,u.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],c);const p=c},72220:(e,t,r)=>{r.d(t,{c:()=>s});const s=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>F,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,a.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,s.default)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){return Array.isArray(e)?e.every((e=>m(e,t))):m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.Ow)(e.name,t)??(0,i.S0)(e.type,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function F(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>b,applyEdits:()=>F,aw:()=>m,uploadAssets:()=>v});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(92604),u=r(95330),l=r(81271),d=r(16306),c=r(66361),p=r(2981),h=r(84230);function y(e){return e&&null!=e.applyEdits}function f(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function m(e){return e.every(f)}function g(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function b(e){return e.every(g)}async function F(e,t,r,s={}){let l;if((0,c.lQ)(e)&&e.url)l=(0,c.jF)(e.url,e.layerId,"original-and-current-features"===s.returnServiceEditsOption);else{l=(0,u.hh)(),l.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:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:d}=await async function(e,t,r,s){if(await e.load(),!y(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,h.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(!t||!s&&!i)throw new n.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const l=(0,h.S1)(e);if(!l.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!l.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!l.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!l.editing.supportsGlobalId&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const d={...r};if(null!=d.rollbackOnFailureEnabled||l.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),d.rollbackOnFailureEnabled||"original-and-current-features"!==d.returnServiceEditsOption||(!1===d.rollbackOnFailureEnabled&&o.Z.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 overwrritten and set to true."),d.rollbackOnFailureEnabled=!0),!l.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&"original-and-current-features"!==d.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c={...t};if(c.addFeatures=t&&a.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():c.addFeatures||[],c.updateFeatures=t&&a.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():c.updateFeatures||[],c.deleteFeatures=t&&a.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():c.deleteFeatures||[],c.addFeatures.length&&!l.operations.supportsAdd)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(c.updateFeatures.length&&!l.operations.supportsUpdate)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(c.deleteFeatures.length&&!l.operations.supportsDelete)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");c.addAttachments=c.addAttachments||[],c.updateAttachments=c.updateAttachments||[],c.deleteAttachments=c.deleteAttachments||[],c.addFeatures=c.addFeatures.map(R),c.updateFeatures=c.updateFeatures.map(R),c.addAssetFeatures=[];const y=r?.globalIdUsed||u;return c.addFeatures.forEach((t=>function(e,t,r){S(e,t,r)}(t,e,y))),c.updateFeatures.forEach((t=>function(e,t,r){S(e,t,r);const s=(0,h.S1)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,y))),c.deleteFeatures.forEach((t=>function(e,t,r){S(e,t,r)}(t,e,y))),c.addAttachments.forEach((t=>w(t,e))),c.updateAttachments.forEach((t=>w(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,p.S0)("model/gltf-binary",r.supportedFormats)??(0,p.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${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??[])A(t)&&a.push(t);for(const t of e.updateFeatures??[])A(t)&&a.push(t)}(c,e),{edits:await _(c),options:d}}(e,r,s);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,r,s),c=e=>e.filter((e=>!e.error)).map(i.d9),f={edits:d,addedFeatures:c(u.addFeatureResults),updatedFeatures:c(u.updateFeatureResults),deletedFeatures:c(u.deleteFeatureResults),addedAttachments:c(u.addAttachmentResults),updatedAttachments:c(u.updateAttachmentResults),deletedAttachments:c(u.deleteAttachmentResults),exceededTransferLimit:!1};return u.editedFeatureResults?.length&&(f.editedFeatures=u.editedFeatureResults),l.resolve(f),u}catch(e){throw l.reject(e),e}}function S(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${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 n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function w(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,l.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function _(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,d.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function R(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function A(e){return"mesh"===e?.geometry?.type}function v(e,t,r,s){if(!y(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},73919:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Q});var s=r(43697),a=(r(66577),r(38171)),n=r(40330),i=r(3172),o=r(92835),u=r(67676),l=r(20102),d=r(80442),c=r(35454),p=r(83379),h=r(92604),y=r(78286),f=r(95330),m=r(67900),g=r(81271),b=r(41123),F=r(5600),S=(r(75215),r(52011)),w=r(6570),_=r(44547),R=r(33955),A=r(52138),v=r(13598),O=r(85872),I=r(20773);function E(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,s=r.clone(),a=(0,A.f)(q,[-s.x,-s.y,-s.z]),n=new O.Z({origin:[s.x,s.y,s.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,I.t)(new Float64Array(o.length),o,a),i.vertexAttributesChanged(),i}const q=(0,v.c)();var x=r(84470),C=r(14720),Z=r(25278),T=r(49735),D=r(66677),M=r(2981),P=r(4967),N=r(59431),k=r(14165),$=r(82971);const G=new c.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),U=new Set(["Feature Layer","Table"]),B=new c.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let J=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,f.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=null!=e?e.signal:null,r=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(r,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,d.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,u=e?.operations?.supportsQueryAttachments??!1;return new T.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),n=this._getFormDataForAttachment(t,a.query);try{const e=await(0,i.default)(s,{body:n});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",n=this._getLayerRequestOptions({query:{attachmentId:t}}),o=this._getFormDataForAttachment(r,n.query);try{const e=await(0,i.default)(a,{body:o});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this,s=r.infoFor3D,a=null!=s,o=a||(t?.globalIdUsed??!1),l=a?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],c=(await Promise.all(d)).filter(u.pC),p=e.updateFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],h=(await Promise.all(p)).filter(u.pC),y=this._getFeatureIds(e.deleteFeatures,o);(0,N.P)(c,h,r.spatialReference);const f=await this._getAttachmentEditsJSON(e),m=r.capabilities.editing.supportsAsyncApplyEdits&&a,g={gdbVersion:t?.gdbVersion||r.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:o,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:m};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:r.layerId,adds:c,updates:h,deletes:y,attachments:f,assetMaps:l}]),g.returnServiceEditsOption=G.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=c.length?JSON.stringify(c):null,g.updates=h.length?JSON.stringify(h):null,g.deletes=y.length?o?JSON.stringify(y):y.join(","):null,g.attachments=f&&JSON.stringify(f),g.assetMaps=null!=l?JSON.stringify(l):void 0);const b=this._getLayerRequestOptions({method:"post",query:g}),F=t?.returnServiceEditsOption?r.url:r.parsedUrl.path,S=m?await this._asyncApplyEdits(F+"/applyEdits",b):await(0,i.default)(F+"/applyEdits",b);if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=n.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(S)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,i.default)(`${s}/${r}`,t),{id:n,extent:u,fullExtent:l,timeExtent:d}=a,c=u||l;return{id:n,fullExtent:c&&w.Z.fromJSON(c),timeExtent:d&&o.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,D.M8)(this.layer.url))return"unavailable";const e=(0,g.v_)(this.layer.url,"status"),t=await(0,i.default)(e,{query:{f:"json"}});return B.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(6946).then(r.bind(r,36946));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,i.default)(e,t)).data.statusUrl;for(;;){const e=(await(0,i.default)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,i.default)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,f.e4)(j)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:r}=await(0,i.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,d.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!U.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,Z.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}async _getFeatureJSON(e,t){const{geometry:r}=e,s={...e.attributes};if(null!=t&&"mesh"===r?.type){const{transformFieldRoles:e}=t,{origin:a,spatialReference:n,transform:i}=r,o=this.layer.spatialReference;await(0,_.iQ)(n,o);const u=(0,_.iV)(a,o);if(s[e.originX]=u.x,s[e.originY]=u.y,s[e.originZ]=u.z??0,null!=i){const{translation:t,scale:a,rotation:u}=i,{vertexSpace:l}=r,d=l.isGeoreferenced?1:(0,m.r6)(n)/(0,m.r6)(o);s[e.translationX]=t[0]*d,s[e.translationY]=-t[2]*d,s[e.translationZ]=t[1]*d,s[e.scaleX]=a[0],s[e.scaleY]=a[2],s[e.scaleZ]=a[1],s[e.rotationX]=u[0],s[e.rotationY]=u[2],s[e.rotationZ]=u[1],s[e.rotationDeg]=u[3]}return{geometry:null,attributes:s}}return null==r?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _getAttachmentEditsJSON(e){const t=await Promise.all((e.addAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),r=await Promise.all((e.updateAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),s=e.deleteAttachments??[];return t.length||r.length||s.length?{adds:t,updates:r,deletes:[...s]}:null}async _getAttachmentEditJSON(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:i,uploadId:o}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),o)u.uploadId=o;else if(i){const e=await(0,g.IR)(i);e&&(u.contentType=e.mediaType,u.data=e.data),i instanceof File&&(u.name=i.name)}return a&&(u.name=a),n&&(u.contentType=n),u}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=new Array,a=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)s.push(t);else{const r=E(t);a.set(r,t),e.geometry=r,s.push(r)}}await this.uploadAssets(s);for(const[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){h.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(x.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,b.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):h.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_getFeatureIds(e,t){if(!e||0===e.length)return[];if(t&&(0,C.Ey)(e))return e.map((e=>e.globalId));if((0,C.aw)(e))return e.map((e=>e.objectId));const{layer:r}=this,s=t?r.globalIdField:r.objectIdField;return s?e.map((e=>e.getAttribute(s))):[]}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.assetMaps;if(n){for(const e of n.addResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of n.updateResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const i=a?.attachments,o={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:i&&i.addResults?i.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:i&&i.updateResults?i.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:i&&i.deleteResults?i.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(o.editMoment=a.editMoment),s.length>0){o.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new $.Z(t.spatialReference):null;o.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,r)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],r),current:this._createEditedFeature(e[1],r)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,r)))||[],spatialReference:r}})}}return o}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,R.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,M.$6)(s);if(null==n)return e;const i=(0,g.v_)(a.path,`../${n.id}`),o=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?l.push(t):o.push(t);const d=l.map((e=>e.getAttribute(r))).filter(u.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=s,h=new k.Z;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,P.e)(i,h),{features:f}=y;return 0===f.length?e:[...o,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=f.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,F.Cb)()],J.prototype,"type",void 0),(0,s._)([(0,F.Cb)({constructOnly:!0})],J.prototype,"layer",void 0),(0,s._)([(0,F.Cb)({readOnly:!0})],J.prototype,"queryTask",null),J=(0,s._)([(0,S.j)("esri.layers.graphics.sources.FeatureLayerSource")],J);const j=1e3,Q=J},49735:(e,t,r)=>{r.d(t,{Z:()=>R});var s=r(43697),a=r(92036),n=r(20102),i=r(80442),o=r(95330),u=r(81271),l=r(5600),d=(r(75215),r(67676),r(52011)),c=r(2981),p=r(10158),h=r(11282),y=r(41818),f=(r(66577),r(34599)),m=r(14165),g=r(6570),b=r(5396),F=r(4967),S=r(53261),w=r(74889);let _=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],a=(0,i.Z)("featurelayer-pbf-statistics"),n=!s||a;let o;if(this.pbfSupported&&n)try{o=await(0,S.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(o=await(0,F.F)(this.url,r,t)),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return w.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,o.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,h.en)(e);return(0,f.Vr)(s,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,b.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:a,processAttachmentQueryResult:n}=await(0,o.Hl)(r.e(540).then(r.bind(r,30540)),t),i=(0,h.en)(this.url);return n(i,await(this.queryAttachmentsSupported?s(i,e,t):a(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,o.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,o.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,o.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,o.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=r,i=(0,c.S0)("model/gltf-binary",s)??(0,c.Ow)("glb",s),o=(0,c.S0)("model/gltf+json",s)??(0,c.Ow)("gtlf",s);for(const e of a){if(e===i){t.formatOf3DObjects=e;break}e!==o||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new n.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:a,originZ:n,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:d,scaleZ:c,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,a,n,i,o,u,l,d,c,p,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,l.Cb)({type:p.n})],_.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"infoFor3D",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],_.prototype,"pbfSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.Cb)({type:String})],_.prototype,"url",void 0),_=(0,s._)([(0,d.j)("esri.tasks.QueryTask")],_);const R=_},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>n,S0:()=>a,d1:()=>i});const s=[["binary","application/octet-stream","bin",""]];function a(e,t){return u(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function n(e,t){return u(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return l(function(e,t){return o(t).find((t=>u(t)===e))}(e,t))}function o(e){return[...s,...e]}function u(e){return e?.[0]}function l(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},41818:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.hH)(i,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.Ev)(i,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>o});var s=r(11282),a=r(34599),n=r(74889),i=r(14165);async function o(e,t,r){const s=await u(e,t,r);return n.Z.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),o={...r},u=i.Z.from(t),{data:l}=await(0,a.JT)(n,u,u.sourceSpatialReference,o);return l}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var s=r(11282),a=r(70586),n=r(69285),i=r(98732);function o(e,t){return t}function u(e,t,r,s){switch(r){case 0:return p(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?p(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function l(e,t,r,s){return 2===r?p(e,t,2):u(e,t,r,s)}function d(e,t,r,s){return 2===r?p(e,t,3):u(e,t,r,s)}function c(e,t,r,s){return 3===r?p(e,t,3):l(e,t,r,s)}function p({translate:e,scale:t},r,s){return e[s]+r*t[s]}class h{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,a.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,i.$g)(r.clone(),r,!1,!1,this._transform),n=(0,i.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,a.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,a.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?c:t?l:r?d:u}}var y=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const a=(0,s.en)(e),n={...r},i=f.Z.from(t),o=!i.quantizationParameters,{data:u}=await(0,y.qp)(a,i,new h({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),n);return u}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8949],{59431:(e,t,n)=>{n.d(t,{P:()=>i});var o=n(67900),r=n(8744);function s(e,t,n){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=n)}function i(e,t,n){if(!e&&!t||!n)return;const r=(0,o._R)(n);l(e,n,r),l(t,n,r)}function l(e,t,n){if(e)for(const o of e)a(o.geometry,t,n)}function a(e,t,n){if(null==e||!e.spatialReference||(0,r.fS)(e.spatialReference,t))return;const i=(0,o._R)(e.spatialReference)/n;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)s(e,e.rings,i);else if("paths"in e)s(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=i)}},28694:(e,t,n)=>{n.d(t,{p:()=>r});var o=n(69285);function r(e,t,n){if(!n||!n.features||!n.hasZ)return;const r=(0,o.k)(n.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of n.features)r(e.geometry)}},74889:(e,t,n)=>{n.d(t,{Z:()=>R});var o,r=n(43697),s=n(66577),i=n(38171),l=n(35454),a=n(96674),f=n(22974),p=n(5600),u=(n(75215),n(71715)),y=n(52011),c=n(30556),m=n(82971),h=n(33955),g=n(1231);const d=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let x=o=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=m.Z.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const r=e[t],s=i.Z.fromJSON(r),l=r.geometry&&r.geometry.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=r.aggregateGeometries,f=s.aggregateGeometries;if(a&&null!=f)for(const e in f){const t=f[e],o=a[e],r=o?.spatialReference;null==t||r||(t.spatialReference=n)}o.push(s)}return o}writeGeometryType(e,t,n,o){if(e)return void d.write(e,t,n,o);const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry)return void d.write(e.geometry.type,t,n,o)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,o=(0,h.im)(e);return o&&!n&&t.spatialReference&&(o.spatialReference=m.Z.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,f.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const o=t.features[n];if(o.geometry){const t=e&&e[n];o.geometry=t&&t.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,n],translate:[o,r]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[o,r],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const f=this._getHydrationFunction(e,(e=>e*s+o),(e=>r-e*i),l,a);for(const{geometry:e}of t)null!=e&&f&&f(e);return this.transform=null,this}_quantizePoints(e,t,n){let o,r;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===o&&i===r||(s.push([e-o,i-r]),o=e,r=i)}else o=t(l[0]),r=n(l[1]),s.push([o,r])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,h.oU)(e)?e.rings:e.paths,r=[];for(let e=0,s=o.length;e<s;e++){const s=o[e],i=this._quantizePoints(s,t,n);i&&r.push(i)}return r.length>0?((0,h.oU)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,n);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,o,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.oU)(e)?e.rings:e.paths;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}}if(o&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2]),n[3]=r(n[3])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}if(o&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2]),t[3]=r(t[3])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,p.Cb)({type:String,json:{write:!0}})],x.prototype,"displayFieldName",void 0),(0,r._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,p.Cb)({type:[i.Z],json:{write:!0}})],x.prototype,"features",void 0),(0,r._)([(0,u.r)("features")],x.prototype,"readFeatures",null),(0,r._)([(0,p.Cb)({type:[g.Z],json:{write:!0}})],x.prototype,"fields",void 0),(0,r._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],x.prototype,"geometryType",void 0),(0,r._)([(0,c.c)("geometryType")],x.prototype,"writeGeometryType",null),(0,r._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasM",void 0),(0,r._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasZ",void 0),(0,r._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],x.prototype,"queryGeometry",void 0),(0,r._)([(0,u.r)("queryGeometry")],x.prototype,"readQueryGeometry",null),(0,r._)([(0,p.Cb)({type:m.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,r._)([(0,c.c)("spatialReference")],x.prototype,"writeSpatialReference",null),(0,r._)([(0,p.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=o=(0,r._)([(0,y.j)("esri.rest.support.FeatureSet")],x),x.prototype.toJSON.isDefaultToJSON=!0;const R=x}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9238],{19238:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ge});var i=r(43697),s=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),n=r(32400),a=r(3172),l=r(9790),u=r(2368),d=r(46791),p=r(20102),c=r(61247),y=r(22974),h=r(92604),f=r(70586),b=r(16453),m=r(78286),g=r(95330),w=r(42033),_=r(81271),v=r(5600),S=r(90578),C=r(71715),F=r(52011),I=r(30556),j=r(55343),T=r(82971),E=r(87085),R=(r(66577),r(38171)),x=r(3920),D=r(80442),O=r(83379),M=r(609),q=r(78346),P=r(75215),Z=(r(67676),r(52421)),L=r(59431),N=r(28694),G=r(74889),k=r(6570),A=r(38913),B=r(86973);let J=0;const V="esri.layers.graphics.sources.MemorySource",U=h.Z.getLogger(V);let Q=class extends(O.Z.LoadableMixin((0,M.v)((0,x.p)(d.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,N.p)(e,this.layer.spatialReference,r);const i=G.Z.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,N.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:k.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new p.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,L.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new p.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(J++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?A.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,q.bA)("MemorySourceWorker",{strategy:(0,D.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{U.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const u={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:B.P.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},d=await this._connection.invoke("load",u,{signal:e});for(const e of d.warnings)U.warn(e.message,{layer:this.layer,warning:e});d.featureErrors.length&&U.warn(`Encountered ${d.featureErrors.length} validation errors while loading features`,d.featureErrors);const p=d.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(p.geometryType=B.P.toJSON(l.inferredGeometryType)),this.sourceJSON=p,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(d.assignedObjectIds)}};(0,i._)([(0,Z.c)({Type:R.Z,ensureType:(0,P.se)(R.Z)})],Q.prototype,"itemType",void 0),(0,i._)([(0,v.Cb)()],Q.prototype,"type",void 0),(0,i._)([(0,v.Cb)({constructOnly:!0})],Q.prototype,"layer",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Q.prototype,"_workerGeometryType",null),(0,i._)([(0,v.Cb)()],Q.prototype,"sourceJSON",void 0),Q=(0,i._)([(0,F.j)(V)],Q);var W=r(54295),$=r(17287),z=r(71612),H=r(17017),X=r(66361),Y=r(69637),K=r(53713),ee=r(6404),te=r(38009),re=r(68825),ie=r(16859),se=r(92036);let oe=class extends se.Z{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i._)([(0,v.Cb)()],oe.prototype,"updating",void 0),(0,i._)([(0,v.Cb)()],oe.prototype,"status",void 0),oe=(0,i._)([(0,F.j)("esri.layers.support.PublishingInfo")],oe);const ne=oe,ae="esri.layers.mixins.PublishableLayer",le=Symbol(ae),ue=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ne;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),i.remove()),e.status=o,e.updating=!1,i.removed||(t=setTimeout(r,s,s+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>i.remove())),r(250),this.own(i)}};return t=le,(0,i._)([(0,v.Cb)({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=(0,i._)([(0,F.j)(ae)],r),r};var de=r(34760),pe=r(72965),ce=r(28294),ye=r(66677),he=r(21506),fe=r(50957),be=r(70082),me=r(16451),ge=r(53518),we=r(35671),_e=r(54306),ve=r(30707),Se=r(72064),Ce=r(76259),Fe=r(60199),Ie=r(10158),je=r(40555),Te=r(14165),Ee=r(28141),Re=r(32163),xe=r(65242);const De="FeatureLayer",Oe="esri.layers.FeatureLayer",Me=h.Z.getLogger(Oe);function qe(e,t){return new p.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Pe(e){return e&&e instanceof d.Z}const Ze=(0,ge.v)();function Le(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Ne=class extends((0,K.B)((0,ee.M)((0,Y.b)(ue((0,X.o1)((0,z.h)((0,re.c)((0,ce.n)((0,pe.M)((0,de.Q)((0,$.Y)((0,te.q)((0,ie.I)((0,b.R)((0,H.N)((0,W.V)((0,u.J)(E.Z)))))))))))))))))){constructor(...e){super(...e),this._handles=new c.Z,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.Z.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,f.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(g.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,fe.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,(0,Se.h)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,fe.sX)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,m.RB)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,fe.rk)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,fe.kZ)(t.layerDefinition||t)}get parsedUrl(){const e=(0,_.mN)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,_.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,_.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,we.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.a)(i,t,r)??void 0;return e||Me.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,fe.Ob)(t,r)}set source(e){const t=this._get("source");t!==e&&(Pe(t)&&this._resetMemorySource(t),Pe(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof d.Z?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=G.Z.fromJSON(t.featureSet);return new Q({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>be.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ye.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ye.Qc)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ye.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=me.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){return(0,fe.JD)(this,e,t,De)}async updateAttachment(e,t,r){return(0,fe.Y5)(this,e,t,r,De)}async applyEdits(e,t){return(0,fe.Jj)(this,e,t)}async uploadAssets(e,t){return(0,fe.uj)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Re.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,g.Hl)(Promise.all([r.e(4599),r.e(3919)]).then(r.bind(r,73919)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,fe.rP)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,w._)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return(0,fe.FV)(this,e,t,De)}async fetchRecomputedExtents(e){return(0,fe.Ci)(this,e,De)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,fe.SU)(this,e,t,De)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Te.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){return(0,fe.tD)(this,e,t,De)}async queryFeatureCount(e,t){return(0,fe.VG)(this,e,t,De)}async queryExtent(e,t){return(0,fe.KE)(this,e,t,De)}async queryRelatedFeatures(e,t){return(0,fe.kp)(this,e,t,De)}async queryRelatedFeaturesCount(e,t){return(0,fe.C9)(this,e,t,De)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Ee.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Ee.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Ee.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Ee.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(qe(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(qe(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(qe(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(qe(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p.Z(De,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,Fe.D)(this,e))}async save(e){const{save:t}=await r.e(2664).then(r.bind(r,32664));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(2664).then(r.bind(r,32664));return i(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,m.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,a.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,we.YN)(this.renderer,this.fieldsIndex),(0,we.UF)(this.timeInfo,this.fieldsIndex),(0,je.y)(this,{origin:"service"})}async hasDataChanged(){return(0,fe.gG)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};(0,i._)([(0,C.r)("service","capabilities")],Ne.prototype,"readCapabilities",null),(0,i._)([(0,v.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Ne.prototype,"charts",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"createQueryVersion",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ne.prototype,"copyright",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.displayField"}}})],Ne.prototype,"displayField",void 0),(0,i._)([(0,v.Cb)({types:l.LB,readOnly:!0})],Ne.prototype,"defaultSymbol",void 0),(0,i._)([(0,v.Cb)({type:Ie.n})],Ne.prototype,"dynamicDataSource",void 0),(0,i._)([(0,v.Cb)({type:Boolean})],Ne.prototype,"editingEnabled",null),(0,i._)([(0,C.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabled",null),(0,i._)([(0,C.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabledFromWebMap",null),(0,i._)([(0,I.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabled",null),(0,i._)([(0,I.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabledToWebMap",null),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,v.Cb)({...Ze.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Le}}}}})],Ne.prototype,"fields",void 0),(0,i._)([(0,v.Cb)(Ze.fieldsIndex)],Ne.prototype,"fieldsIndex",void 0),(0,i._)([(0,v.Cb)({type:j.Z,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ne.prototype,"formTemplate",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent"}}})],Ne.prototype,"fullExtent",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Le,writer(e,t,r){const i=e?fe.Fr.toJSON(e):null;i&&(0,m.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:fe.Fr.read}}})],Ne.prototype,"geometryType",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasM"}}})],Ne.prototype,"hasM",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasZ"}}})],Ne.prototype,"hasZ",void 0),(0,i._)([(0,v.Cb)(he.id)],Ne.prototype,"id",void 0),(0,i._)([(0,v.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ne.prototype,"infoFor3D",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ne.prototype,"isTable",void 0),(0,i._)([(0,C.r)("service","isTable",["type","geometryType"]),(0,C.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ne.prototype,"readIsTable",null),(0,i._)([(0,I.c)("web-map","isTable")],Ne.prototype,"writeIsTable",null),(0,i._)([(0,v.Cb)(he.iR)],Ne.prototype,"labelsVisible",void 0),(0,i._)([(0,v.Cb)({type:[_e.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:ve.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:ve.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Ne.prototype,"labelingInfo",void 0),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,m.RB)(r,(0,xe.a)(e),t)}}},e})())],Ne.prototype,"opacity",void 0),(0,i._)([(0,v.Cb)(he.rn)],Ne.prototype,"legendEnabled",void 0),(0,i._)([(0,v.Cb)({type:["show","hide"],json:(()=>{const e=(0,y.d9)(he.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ne.prototype,"listMode",void 0),(0,i._)([(0,C.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ne.prototype,"readGlobalIdField",null),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Le}}}}})],Ne.prototype,"objectIdField",void 0),(0,i._)([(0,C.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ne.prototype,"readObjectIdField",null),(0,i._)([(0,v.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ne.prototype,"operationalLayerType",void 0),(0,i._)([(0,v.Cb)(Ze.outFields)],Ne.prototype,"outFields",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"parsedUrl",null),(0,i._)([(0,v.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ne.prototype,"path",void 0),(0,i._)([(0,v.Cb)(he.C_)],Ne.prototype,"popupEnabled",void 0),(0,i._)([(0,v.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Ne.prototype,"popupTemplate",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"defaultPopupTemplate",null),(0,i._)([(0,v.Cb)({types:n.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Ne.prototype,"renderer",null),(0,i._)([(0,C.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,C.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ne.prototype,"readRenderer",null),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ne.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,v.Cb)({clonable:!1})],Ne.prototype,"source",null),(0,i._)([(0,S.p)("source")],Ne.prototype,"castSource",null),(0,i._)([(0,C.r)("portal-item","source",["featureSet"]),(0,C.r)("web-map","source",["featureSet"])],Ne.prototype,"readSource",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ne.prototype,"spatialReference",void 0),(0,i._)([(0,v.Cb)({type:Number})],Ne.prototype,"subtypeCode",void 0),(0,i._)([(0,v.Cb)({type:[be.Z]})],Ne.prototype,"templates",void 0),(0,i._)([(0,C.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ne.prototype,"readTemplates",null),(0,i._)([(0,v.Cb)({type:Ce.Z})],Ne.prototype,"timeInfo",void 0),(0,i._)([(0,v.Cb)()],Ne.prototype,"title",void 0),(0,i._)([(0,C.r)("service","title",["name"]),(0,C.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ne.prototype,"readTitle",null),(0,i._)([(0,C.r)("web-map","title",["layerDefinition.name","title"])],Ne.prototype,"readTitleFromWebMap",null),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,v.Cb)({json:{read:!1}})],Ne.prototype,"type",void 0),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"typeIdField",void 0),(0,i._)([(0,C.r)("service","typeIdField"),(0,C.r)("typeIdField",["layerDefinition.typeIdField"])],Ne.prototype,"readTypeIdField",null),(0,i._)([(0,v.Cb)({type:[me.Z]})],Ne.prototype,"types",void 0),(0,i._)([(0,C.r)("service","types",["types"]),(0,C.r)("types",["layerDefinition.types"])],Ne.prototype,"readTypes",null),(0,i._)([(0,v.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ne.prototype,"visible",void 0),(0,i._)([(0,C.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ne.prototype,"readVisible",null),Ne=(0,i._)([(0,F.j)(Oe)],Ne);const Ge=Ne},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(67760),p=r(66577),c=r(92835),y=r(35454),h=r(22974),f=r(14165);const b=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new f.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(o),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(o),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:n,distance:a})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:p.qM,json:{write:!0}})],g.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:b.apiValues,json:{name:"spatialRel",read:{reader:b.read},write:{allowNull:!1,writer:b.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],g.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],g);const w=g;var _;const v={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let F=_=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":v,"portal-item":v}}})],F.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],F);const I=F,j={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":j,"portal-item":j}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let p=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],p);const c=p;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(67900),s=r(8744);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function n(e,t,r){if(!e&&!t||!r)return;const s=(0,i._R)(r);a(e,r,s),a(t,r,s)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(null==e||!e.spatialReference||(0,s.fS)(e.spatialReference,t))return;const n=(0,i._R)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}},28141:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(92835),a=r(35454),l=r(96674),u=r(22974),d=r(5600),p=r(75215),c=r(52011),y=r(30556),h=r(33955);r(67676),r(80442);let f=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=i=(0,s._)([(0,c.j)("esri.rest.support.TopFilter")],f);const b=f;var m,g=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=m=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new m((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],v.prototype,"cacheHint",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],v.prototype,"distance",void 0),(0,s._)([(0,d.Cb)({types:o.qM,json:{read:h.im,write:!0}})],v.prototype,"geometry",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"geometryPrecision",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],v.prototype,"num",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"objectIds",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"orderByFields",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"outFields",void 0),(0,s._)([(0,d.Cb)({type:g.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],v.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"resultType",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"returnGeometry",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnZ",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],v.prototype,"start",void 0),(0,s._)([(0,y.c)("start"),(0,y.c)("num")],v.prototype,"writeStart",null),(0,s._)([(0,d.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],v.prototype,"spatialRelationship",void 0),(0,s._)([(0,d.Cb)({type:n.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),(0,s._)([(0,d.Cb)({type:b,json:{write:!0}})],v.prototype,"topFilter",void 0),(0,s._)([(0,d.Cb)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],v.prototype,"units",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),v=m=(0,s._)([(0,c.j)("esri.rest.support.TopFeaturesQuery")],v),v.from=(0,p.se)(v);const S=v}}]);