@arcgis/core 4.34.0-next.85 → 4.34.0-next.86

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 (142) hide show
  1. package/Basemap.js +1 -1
  2. package/arcade/functions/measures.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/06c389283ee5b60573f2.js +1 -0
  5. package/assets/esri/core/workers/chunks/0b679d5a1bfdbd006d6e.js +1 -0
  6. package/assets/esri/core/workers/chunks/1537b02e674f8ef77f4a.js +1 -0
  7. package/assets/esri/core/workers/chunks/{9eb1bfcb9b05f2a36748.js → 1f2d13466c60a6b57717.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js → 268f5b233640a9dbbf89.js} +2 -2
  9. package/assets/esri/core/workers/chunks/2896ada406074f754b00.js +1 -0
  10. package/assets/esri/core/workers/chunks/28d30be414e59eabd963.js +1 -0
  11. package/assets/esri/core/workers/chunks/29471e0b3f7296dee096.js +1 -0
  12. package/assets/esri/core/workers/chunks/{3192b68675ff2afcb1d6.js → 2d3ae187f8aa3495d4ae.js} +1 -1
  13. package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +2 -0
  14. package/assets/esri/core/workers/chunks/42bc1e981624ce9844a4.js +1 -0
  15. package/assets/esri/core/workers/chunks/436bbe99bedd7b331edb.js +1 -0
  16. package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js → 47e4f66c33bb697fbe6b.js} +2 -2
  17. package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +1 -0
  18. package/assets/esri/core/workers/chunks/4a06ab00d095f63598b5.js +1 -0
  19. package/assets/esri/core/workers/chunks/4d4db6854aff7656f6e1.js +1 -0
  20. package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +1 -0
  21. package/assets/esri/core/workers/chunks/655a878ddea4907d830e.js +1 -0
  22. package/assets/esri/core/workers/chunks/68f5a2d2666636c3f807.js +1 -0
  23. package/assets/esri/core/workers/chunks/6c36cef0b58b87a1f17f.js +316 -0
  24. package/assets/esri/core/workers/chunks/72fe4f1f789abb5b4035.js +1 -0
  25. package/assets/esri/core/workers/chunks/8307f635a5c0c4a95825.js +1 -0
  26. package/assets/esri/core/workers/chunks/{afb76f9d6abedef771df.js → 8380a092ffc8e92ede7a.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{f8f85207b382c1ea038c.js → 97489bf16a1d327992b2.js} +3 -3
  28. package/assets/esri/core/workers/chunks/9d7a22746dae1451deaf.js +1 -0
  29. package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +1 -0
  30. package/assets/esri/core/workers/chunks/a845c68e76382a73da5e.js +1 -0
  31. package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js → aa78b69219d9a0ef1c54.js} +2 -2
  32. package/assets/esri/core/workers/chunks/{1859a11df9f579b993d7.js → b2fbb44e219232e61cbd.js} +1 -1
  33. package/assets/esri/core/workers/chunks/b4349db7155673329432.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js → c50e8d5f554cf151865c.js} +2 -2
  35. package/assets/esri/core/workers/chunks/c5cc0fc652432a9264cc.js +1 -0
  36. package/assets/esri/core/workers/chunks/cab2a1382bdd32bb34d8.js +1 -0
  37. package/assets/esri/core/workers/chunks/ce937ff0dd1147ea297e.js +1 -0
  38. package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +1 -0
  39. package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js → d6e0528eacee7ea4c1ce.js} +2 -2
  40. package/assets/esri/core/workers/chunks/d9d86cf0500fa29d1d43.js +1 -0
  41. package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js → f651c05604eab83aef5f.js} +2 -2
  42. package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js → f6e18668f728dfd8ba5e.js} +2 -2
  43. package/assets/esri/core/workers/chunks/ff8e2f998169ca3a7a68.js +1 -0
  44. package/assets/esri/libs/dracoMeshDecoder/draco_mesh_decoder.wasm +0 -0
  45. package/assets/esri/libs/i3s/i3s.wasm +0 -0
  46. package/chunks/CloudsComposition.glsl.js +2 -2
  47. package/chunks/HUDMaterial.glsl.js +49 -50
  48. package/chunks/LineMarker.glsl.js +34 -34
  49. package/chunks/PointRenderer.glsl.js +4 -4
  50. package/chunks/ShadowHighlight.glsl.js +3 -3
  51. package/chunks/draco_mesh_decoder.js +1 -1
  52. package/config.js +1 -1
  53. package/core/NestedMap.js +1 -1
  54. package/core/iteratorUtils.js +1 -1
  55. package/editing/geometry/lineUtils.js +1 -1
  56. package/interfaces.d.ts +55 -7
  57. package/kernel.js +1 -1
  58. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  59. package/layers/IntegratedMeshLayer.js +1 -1
  60. package/layers/SceneLayer.js +1 -1
  61. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  62. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  63. package/layers/support/layerUtils.js +1 -1
  64. package/package.json +5 -5
  65. package/support/basemapEnsureType.js +1 -1
  66. package/support/revision.js +1 -1
  67. package/support/userTypeGuards/isBasemap.js +5 -0
  68. package/symbols/support/previewSymbol2D.js +1 -1
  69. package/views/3d/FocusAreasView.js +1 -1
  70. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  71. package/views/3d/glTF/internal/Resource.js +1 -1
  72. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  73. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  74. package/views/3d/support/engineContent/marker.js +1 -1
  75. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  76. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +11 -11
  77. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  78. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  79. package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAO.js +5 -0
  80. package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAOs.js +5 -0
  81. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  82. package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
  83. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  84. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  85. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +14 -9
  86. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  87. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  88. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  89. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  90. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
  91. package/views/BasemapView.js +1 -1
  92. package/views/GroundView.js +1 -1
  93. package/views/SceneView.js +1 -1
  94. package/views/View.js +1 -1
  95. package/views/View2D.js +1 -1
  96. package/views/support/LayerViewManager.js +1 -1
  97. package/views/webgl/RenderbufferDescriptor.js +1 -1
  98. package/views/webgl/TextureDescriptor.js +1 -1
  99. package/views/webgl/Util.js +1 -1
  100. package/views/webgl/VertexArrayObject.js +1 -1
  101. package/webscene/Slide.js +1 -1
  102. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  103. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  104. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  105. package/widgets/Editor/support/SketchController.js +1 -1
  106. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  107. package/widgets/Editor/workflowUtils.js +1 -1
  108. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  109. package/widgets/Sketch/SketchViewModel.js +1 -1
  110. package/widgets/Sketch/adapters/layer/GraphicsLayerAdapter.js +5 -0
  111. package/widgets/Sketch/adapters/layer/MapNotesLayerAdapter.js +5 -0
  112. package/assets/esri/core/workers/chunks/25ea02dd7d45a90cbb3b.js +0 -1
  113. package/assets/esri/core/workers/chunks/264a9a916e1e972b69d7.js +0 -1
  114. package/assets/esri/core/workers/chunks/30c85a1a4f118cc45a25.js +0 -1
  115. package/assets/esri/core/workers/chunks/3ef8a7468d7e3b2f0b69.js +0 -351
  116. package/assets/esri/core/workers/chunks/5c1cdc2ec06c4c6bd0b3.js +0 -1
  117. package/assets/esri/core/workers/chunks/609abf071c4ea24955c2.js +0 -1
  118. package/assets/esri/core/workers/chunks/71c2a8e5a17803d3e949.js +0 -1
  119. package/assets/esri/core/workers/chunks/7889a909394c61a9d3e0.js +0 -1
  120. package/assets/esri/core/workers/chunks/99ac292a858bbedc6a89.js +0 -1
  121. package/assets/esri/core/workers/chunks/9a6fa91dd204f64d2590.js +0 -1
  122. package/assets/esri/core/workers/chunks/9cdeead9d444e8d95477.js +0 -1
  123. package/assets/esri/core/workers/chunks/aa1eb7b4d9ccda725da5.js +0 -1
  124. package/assets/esri/core/workers/chunks/b4a053063e6022080d31.js +0 -1
  125. package/assets/esri/core/workers/chunks/b4b26cc2ba3ff30e1d03.js +0 -1
  126. package/assets/esri/core/workers/chunks/bbb585f0b484ab5eabb3.js +0 -1
  127. package/assets/esri/core/workers/chunks/c2bc70b65f5c2a2c9671.js +0 -1
  128. package/assets/esri/core/workers/chunks/cd1869e183001266c4c1.js +0 -2
  129. package/assets/esri/core/workers/chunks/d2fe403d6ab237bc89c2.js +0 -1
  130. package/assets/esri/core/workers/chunks/d51e8eeb1e1eb0605cc9.js +0 -1
  131. package/assets/esri/core/workers/chunks/e080628ac6e1cf25dc72.js +0 -1
  132. package/assets/esri/core/workers/chunks/e8e0f73fb94e63e2abc3.js +0 -1
  133. package/assets/esri/core/workers/chunks/f45c343527709f6f91c2.js +0 -1
  134. package/assets/esri/core/workers/chunks/fcac475e4e82911b3126.js +0 -1
  135. /package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js.LICENSE.txt → 268f5b233640a9dbbf89.js.LICENSE.txt} +0 -0
  136. /package/assets/esri/core/workers/chunks/{cd1869e183001266c4c1.js.LICENSE.txt → 336b54144afec0c7d396.js.LICENSE.txt} +0 -0
  137. /package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js.LICENSE.txt → 47e4f66c33bb697fbe6b.js.LICENSE.txt} +0 -0
  138. /package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js.LICENSE.txt → aa78b69219d9a0ef1c54.js.LICENSE.txt} +0 -0
  139. /package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js.LICENSE.txt → c50e8d5f554cf151865c.js.LICENSE.txt} +0 -0
  140. /package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js.LICENSE.txt → d6e0528eacee7ea4c1ce.js.LICENSE.txt} +0 -0
  141. /package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js.LICENSE.txt → f651c05604eab83aef5f.js.LICENSE.txt} +0 -0
  142. /package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js.LICENSE.txt → f6e18668f728dfd8ba5e.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3548,7548,7694],{4146:(e,t,r)=>{r.d(t,{A:()=>v});var i=r(31635),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(10107),f=(r(44208),r(87811),r(40608)),h=r(5443),y=r(16930),m=r(92602),g=r(79677);let w=0,v=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+w++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:h.A})],v.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i.Cg)([(0,f.$)("esri.layers.Layer")],v)},6797:(e,t,r)=>{r.d(t,{Mj:()=>p,Ui:()=>h,w2:()=>f});var i=r(65008),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),f=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),h=c(e);if(h&&o.has(h)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=a(e)&&a(t);for(const i of f){const n=u(e,i),s=u(t,i);let o;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=y?y.diff[i]=o:y={type:"partial",diff:{[i]:o}})}}return y}function p(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},17311:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(65008),s=r(4576),o=r(60999),a=r(7762),l=r(10107),u=(r(44208),r(53966),r(40608)),c=r(30524),d=r(43668);let p=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,l=a&&o;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],u=l?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:a}):"";i.set(r,u)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,i.Cg)([(0,l.MZ)()],p.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,l.MZ)()],p.prototype,"displayField",void 0),(0,i.Cg)([(0,l.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,l.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,l.MZ)()],p.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,l.MZ)()],p.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,l.MZ)()],p.prototype,"fields",void 0),(0,i.Cg)([(0,l.MZ)()],p.prototype,"objectIdField",void 0),(0,i.Cg)([(0,l.MZ)()],p.prototype,"requiredFields",null),p=(0,i.Cg)([(0,u.$)("esri.layers.support.TitleCreator")],p)},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureTemplate")],c)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>y,lc:()=>f,mX:()=>w,rU:()=>g,tH:()=>_});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return _(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let t=b.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),d=r(29005);let p=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],p)},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(7762),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let u=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n.Cg)([(0,l.$)("esri.layers.support.LayerFloorInfo")],u)},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:c.read,write:c.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,l.$)("esri.layers.support.Relationship")],d)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55674:(e,t,r)=>{r.d(t,{Ad:()=>f,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>h});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function f(e,t){return y.create(e,t,null,["$feature","$view"])}function h(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(a,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const f=new o;return f.immutable=!1,f.setField("scale",0),new y(e,s,a,d,t,f,p,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,h);return new l(h,c,f,y)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>y,tk:()=>d,BR:()=>c,wI:()=>u,G$:()=>f,$x:()=>p,Ov:()=>a,W_:()=>l,OP:()=>h,TU:()=>o,XX:()=>s});var i=r(70333),n=r(78888);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function p(e,t){return null}function f(e){return null}function h(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!h(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),d=r(98623);let p=class extends s.o{static{i=this}static get allTime(){return f}static get empty(){return h}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const f=new p,h=new p({start:void 0,end:void 0})},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],c)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7464],{50805:(e,t,o)=>{o.d(t,{L0:()=>f,Ot:()=>c,W4:()=>p,uV:()=>y});var r=o(31635),i=o(25482),s=o(10107),n=(o(44208),o(53966),o(87811),o(93223)),a=o(40608);let p=class extends i.o{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,r.Cg)([(0,s.MZ)({type:Number})],p.prototype,"nodesPerPage",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],p.prototype,"rootIndex",void 0),(0,r.Cg)([(0,s.MZ)({type:String})],p.prototype,"lodSelectionMetricType",void 0),p=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],p);let l=class extends i.o{constructor(){super(...arguments),this.factor=1}};(0,r.Cg)([(0,s.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],l.prototype,"factor",void 0),l=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],l);let d=class extends i.o{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,r.Cg)([(0,s.MZ)({type:[Number]})],d.prototype,"baseColorFactor",void 0),(0,r.Cg)([(0,s.MZ)({type:l})],d.prototype,"baseColorTexture",void 0),(0,r.Cg)([(0,s.MZ)({type:l})],d.prototype,"metallicRoughnessTexture",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],d.prototype,"metallicFactor",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],d.prototype,"roughnessFactor",void 0),d=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],d);let y=class extends i.o{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,r.Cg)([(0,n.e)({opaque:"opaque",mask:"mask",blend:"blend"})],y.prototype,"alphaMode",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],y.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],y.prototype,"doubleSided",void 0),(0,r.Cg)([(0,n.e)({none:"none",back:"back",front:"front"})],y.prototype,"cullFace",void 0),(0,r.Cg)([(0,s.MZ)({type:l})],y.prototype,"normalTexture",void 0),(0,r.Cg)([(0,s.MZ)({type:l})],y.prototype,"occlusionTexture",void 0),(0,r.Cg)([(0,s.MZ)({type:l})],y.prototype,"emissiveTexture",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number]})],y.prototype,"emissiveFactor",void 0),(0,r.Cg)([(0,s.MZ)({type:d})],y.prototype,"pbrMetallicRoughness",void 0),y=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],y);let u=class extends i.o{};(0,r.Cg)([(0,s.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],u.prototype,"name",void 0),(0,r.Cg)([(0,n.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],u.prototype,"format",void 0),u=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],u);let c=class extends i.o{constructor(){super(...arguments),this.atlas=!1}};(0,r.Cg)([(0,s.MZ)({type:[u]})],c.prototype,"formats",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],c.prototype,"atlas",void 0),c=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],c);let g=class extends i.o{};(0,r.Cg)([(0,n.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],g.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],g.prototype,"component",void 0),g=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],g);let h=class extends i.o{};(0,r.Cg)([(0,n.e)({draco:"draco"})],h.prototype,"encoding",void 0),(0,r.Cg)([(0,s.MZ)({type:[String]})],h.prototype,"attributes",void 0),h=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],h);let v=class extends i.o{constructor(){super(...arguments),this.offset=0}};(0,r.Cg)([(0,s.MZ)({type:Number})],v.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"position",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"normal",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"uv0",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"color",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"uvRegion",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"featureId",void 0),(0,r.Cg)([(0,s.MZ)({type:g})],v.prototype,"faceRange",void 0),(0,r.Cg)([(0,s.MZ)({type:h})],v.prototype,"compressedAttributes",void 0),v=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],v);let f=class extends i.o{};(0,r.Cg)([(0,n.e)({triangle:"triangle"})],f.prototype,"topology",void 0),(0,r.Cg)([(0,s.MZ)()],f.prototype,"geometryBuffers",void 0),f=(0,r.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],f)},73179:(e,t,o)=>{o.d(t,{b:()=>p,h:()=>l});var r=o(4718),i=o(53966),s=o(84952),n=o(60694),a=o(10873);function p(e){const{nonStandardUrlAllowed:t=!1,separator:o}=e??{},s=(0,r.o8)(a.OZ),p=s.json?.write;return"object"==typeof p&&p&&(p.writer=function(e,t,r,i){(0,n.LS)(this,e,o,t,i)}),{...s,set:function(e){if(null==e)return void this._set("url",e);const o=(0,n.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:i.A.getLogger(this)});this._set("url",o.url),null!=o.layerId&&this._set("layerId",o.layerId)}}}function l(e,t){const{separator:o}=t??{},r=(0,s.An)(e.url);return null!=r&&(null!=e.dynamicDataSource?r.path=(0,s.fj)(r.path,"dynamicLayer"):null!=e.layerId&&(r.path=(0,s.fj)(r.path,o??"",e.layerId.toString()))),r}},74660:(e,t,o)=>{o.r(t),o.d(t,{default:()=>_});var r=o(31635),i=o(69540),s=o(49186),n=o(53966),a=o(92071),p=o(74887),l=o(36708),d=o(10107),y=(o(44208),o(87811),o(36005)),u=o(40608),c=o(87024),g=o(4146),h=o(52136),v=o(18768),f=o(69208),m=o(16131),C=o(8303),M=o(25036),S=o(58947),I=o(10873),Z=o(50805),b=o(58325),x=o(56776),T=o(97159),L=o(16215);let w=class extends((0,S.w)((0,v.b)((0,m.q)((0,C.A)((0,M.j)((0,a.P)((0,f.d)((0,h.p)((0,i.OU)(g.A)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null,this._canReplaceTerrain=!1}initialize(){this.addHandles((0,l.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:(0,T.f)(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,p.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await b.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";(0,x.XF)(n.A.getLogger(this),(0,x.B)(t,"absolute-height",e)),(0,x.XF)(n.A.getLogger(this),(0,x.tW)(t,e))}get replacesTerrain(){return this._canReplaceTerrain&&this._isUsedAsGroundLayer}get _isUsedAsGroundLayer(){return(0,L.S)(this.parent)}};(0,r.Cg)([(0,d.MZ)({type:String,readOnly:!0})],w.prototype,"geometryType",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:["IntegratedMeshLayer"]})],w.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,d.MZ)({json:{read:!1},readOnly:!0})],w.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)({type:Z.W4,readOnly:!0,clonable:!1})],w.prototype,"nodePages",void 0),(0,r.Cg)([(0,d.MZ)({type:[Z.uV],readOnly:!0,clonable:!1})],w.prototype,"materialDefinitions",void 0),(0,r.Cg)([(0,d.MZ)({type:[Z.Ot],readOnly:!0,clonable:!1})],w.prototype,"textureSetDefinitions",void 0),(0,r.Cg)([(0,d.MZ)({type:[Z.L0],readOnly:!0,clonable:!1})],w.prototype,"geometryDefinitions",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],w.prototype,"serviceUpdateTimeStamp",void 0),(0,r.Cg)([(0,d.MZ)({type:b.A,clonable:e=>e?.clone()??e}),(0,c.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],w.prototype,"modifications",void 0),(0,r.Cg)([(0,y.w)(["web-scene","portal-item"],"modifications")],w.prototype,"readModifications",null),(0,r.Cg)([(0,d.MZ)(I.Yj)],w.prototype,"elevationInfo",null),(0,r.Cg)([(0,d.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],w.prototype,"path",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],w.prototype,"replacesTerrain",null),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],w.prototype,"_isUsedAsGroundLayer",null),(0,r.Cg)([(0,d.MZ)()],w.prototype,"_canReplaceTerrain",void 0),w=(0,r.Cg)([(0,u.$)("esri.layers.IntegratedMeshLayer")],w);const _=w}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>_});var a=i(31635),s=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),g=i(40608),f=i(43937),m=i(77548),w=i(20655),M=i(80812),b=i(41318),T=i(10407);const _=e=>{const t=e;let _=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new M.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:a}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await a({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:a},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",a),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const a=!r.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,a);let n,o;if(s)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(s?await i.reload():(i=new M.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,T.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const a=`${i.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,u.S8)(s.restUrl)===(0,u.S8)(a))return s.user;const l=`${a}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?b.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,a=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&a&&!(0,u.ut)(a.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,a.Cg)([(0,y.MZ)({type:M.default})],_.prototype,"portalItem",null),(0,a.Cg)([(0,c.w)("web-document","portalItem",["itemId"])],_.prototype,"readPortalItem",null),(0,a.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],_.prototype,"writePortalItem",null),(0,a.Cg)([(0,y.MZ)({clonable:!1})],_.prototype,"resourceReferences",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasEditingPrivileges",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasFullEditingPrivileges",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasUpdateItemPrivileges",void 0),_=(0,a.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],_),_},A={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>y,LG:()=>n,OM:()=>d,Sm:()=>h,Y:()=>o,bK:()=>l,mm:()=>u,sQ:()=>p});var a=i(98988),s=i(16930),r=i(28735);function n(e,t){if(!o(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,u.HOSTED_SERVICE)}function d(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function h(e,t,i){i?n(e,t):d(e,t)}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const i=s.A.WGS84;return await(0,a.initializeProjection)(t,i),(0,a.project)(e,i)}(i)}const u={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:i,itemControl:a}=e,s=t.user?.privileges;let r=!s||s.includes("features:user:edit"),n=!!i&&!!s?.includes("features:user:fullEdit");const o="update"===a||"admin"===a;return o?n=r=!0:n&&(r=!0),{features:{edit:r,fullEdit:n},content:{updateItem:o}}}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var a=i(31635),s=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,a.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,a.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,a.Cg)([(0,n.$)("esri.layers.mixins.ArcGISService")],i),i}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>N});var a=i(31635),s=i(67996),r=i(7762),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),g=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),w=i(35666),M=i(4146),b=i(80340),T=i(62796),_=i(85342),A=i(18768),v=i(63074),D=i(69208),I=i(16131),S=i(8303),C=i(54310),L=i(25036),E=i(10873),P=i(62568),k=i(97159);let G=class extends((0,v.dM)((0,L.j)((0,C.J)((0,A.b)((0,I.q)((0,S.A)((0,d.P)((0,D.d)(M.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(T.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(T.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,_.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,P.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType(e=>{e.name&&this._graphTypeLookup.set(e.name,e)})}async _initializeLayerProperties(){7===this.originIdOf("inclusionModeDefinition")?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new b.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,s.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach(t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})}),this.setAtOrigin("inclusionModeDefinition",e,(0,w.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach((e,i)=>{const a=this._graphTypeLookup.get(i);if(!a)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==a.type&&"entity"!==a.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))});else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,a=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach((i,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":t.push(s);break;case"entity":e.push(s)}}),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach(t=>{e(t)})}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=new Set,i=[];for(const a of e)this._graphTypeLookup.has(a.typeName)&&(!1===this.layers.concat(this.tables).some(e=>e.objectType.name===a.typeName)&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),t.add(a.typeName)),(0,l.tE)(this.sublayerIdsCache,a.typeName,()=>new Set).add(a.id),i.push(a));this.dataManager.addToLayer(i);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e))}await(0,_.qN)(this,Array.from(t)),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach(e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)})}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const i=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);i&&(t.objectType=i,this._updateSublayerCaches(i))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_saveUrlAsNewResource(e,t,i,a){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,s.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then(s=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(a);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})}))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}readDefinitionSetMap(e,t,i){return(0,k.f)(e,i)}writeDefinitionSetMap(e,t,i,a){const s=a?.portalItem,r=a?.resources,n=(0,w.aB)(a?.origin);if(!s||!r||null==n)return void(e&&(t[i]=(0,k.t)(e,a)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(7===l||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,s);else if(n===l&&e){const n=(0,k.t)(e,a);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,s):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new r.A,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new r.A,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(e=>{i.add(e.id)})})}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),(0,l.tE)(this.sublayerIdsCache,e,()=>new Set);const i=this._addSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await(0,_.qN)(this,[e]),this._refreshNamedTypes(),i}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);t?.useAllData?o.A.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!t||t.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.A.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())(0,l.tE)(this.sublayerIdsCache,e,()=>new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,a.Cg)([(0,c.MZ)()],G.prototype,"dataManager",void 0),(0,a.Cg)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],G.prototype,"definitionSetMap",void 0),(0,a.Cg)([(0,g.w)("definitionSetMap")],G.prototype,"readDefinitionSetMap",null),(0,a.Cg)([(0,m.K)("definitionSetMap")],G.prototype,"writeDefinitionSetMap",null),(0,a.Cg)([(0,c.MZ)()],G.prototype,"inclusionModeDefinition",null),(0,a.Cg)([(0,c.MZ)()],G.prototype,"knowledgeGraph",void 0),(0,a.Cg)([(0,c.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],G.prototype,"layers",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"memberEntityTypes",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"memberRelationshipTypes",void 0),(0,a.Cg)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],G.prototype,"operationalLayerType",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"sublayerIdsCache",void 0),(0,a.Cg)([(0,c.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],G.prototype,"tables",void 0),(0,a.Cg)([(0,c.MZ)({json:{read:!1}})],G.prototype,"type",void 0),(0,a.Cg)([(0,c.MZ)(E.OZ)],G.prototype,"url",void 0),G=(0,a.Cg)([(0,f.$)("esri.layers.KnowledgeGraphLayer")],G);const N=G},69208:(e,t,i)=>{i.d(t,{d:()=>n});var a=i(31635),s=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,a.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,a.Cg)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],i),i}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>_});var a=i(31635),s=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),g=i(40608),f=i(43937),m=i(77548),w=i(20655),M=i(80812),b=i(41318),T=i(10407);const _=e=>{const t=e;let _=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new M.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:a}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await a({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:a},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",a),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const a=!r.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,a);let n,o;if(s)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(s?await i.reload():(i=new M.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,T.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const a=`${i.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,u.S8)(s.restUrl)===(0,u.S8)(a))return s.user;const l=`${a}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?b.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,a=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&a&&!(0,u.ut)(a.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,a.Cg)([(0,y.MZ)({type:M.default})],_.prototype,"portalItem",null),(0,a.Cg)([(0,c.w)("web-document","portalItem",["itemId"])],_.prototype,"readPortalItem",null),(0,a.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],_.prototype,"writePortalItem",null),(0,a.Cg)([(0,y.MZ)({clonable:!1})],_.prototype,"resourceReferences",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasEditingPrivileges",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasFullEditingPrivileges",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasUpdateItemPrivileges",void 0),_=(0,a.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],_),_},A={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>y,LG:()=>n,OM:()=>d,Sm:()=>h,Y:()=>o,bK:()=>l,mm:()=>u,sQ:()=>p});var a=i(98988),s=i(16930),r=i(28735);function n(e,t){if(!o(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,u.HOSTED_SERVICE)}function d(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function h(e,t,i){i?n(e,t):d(e,t)}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const i=s.A.WGS84;return await(0,a.initializeProjection)(t,i),(0,a.project)(e,i)}(i)}const u={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:i,itemControl:a}=e,s=t.user?.privileges;let r=!s||s.includes("features:user:edit"),n=!!i&&!!s?.includes("features:user:fullEdit");const o="update"===a||"admin"===a;return o?n=r=!0:n&&(r=!0),{features:{edit:r,fullEdit:n},content:{updateItem:o}}}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var a=i(31635),s=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,a.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,a.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,a.Cg)([(0,n.$)("esri.layers.mixins.ArcGISService")],i),i}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>N});var a=i(31635),s=i(67996),r=i(7762),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),g=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),w=i(35666),M=i(4146),b=i(24137),T=i(62796),_=i(85342),A=i(18768),v=i(63074),D=i(69208),I=i(16131),S=i(8303),C=i(54310),L=i(25036),E=i(10873),P=i(62568),k=i(97159);let G=class extends((0,v.dM)((0,L.j)((0,C.J)((0,A.b)((0,I.q)((0,S.A)((0,d.P)((0,D.d)(M.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(T.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(T.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,_.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,P.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType(e=>{e.name&&this._graphTypeLookup.set(e.name,e)})}async _initializeLayerProperties(){7===this.originIdOf("inclusionModeDefinition")?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new b.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,s.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach(t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})}),this.setAtOrigin("inclusionModeDefinition",e,(0,w.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach((e,i)=>{const a=this._graphTypeLookup.get(i);if(!a)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==a.type&&"entity"!==a.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))});else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,a=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach((i,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":t.push(s);break;case"entity":e.push(s)}}),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach(t=>{e(t)})}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=new Set,i=[];for(const a of e)this._graphTypeLookup.has(a.typeName)&&(!1===this.layers.concat(this.tables).some(e=>e.objectType.name===a.typeName)&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),t.add(a.typeName)),(0,l.tE)(this.sublayerIdsCache,a.typeName,()=>new Set).add(a.id),i.push(a));this.dataManager.addToLayer(i);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e))}await(0,_.qN)(this,Array.from(t)),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach(e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)})}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const i=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);i&&(t.objectType=i,this._updateSublayerCaches(i))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_saveUrlAsNewResource(e,t,i,a){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,s.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then(s=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(a);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})}))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}readDefinitionSetMap(e,t,i){return(0,k.f)(e,i)}writeDefinitionSetMap(e,t,i,a){const s=a?.portalItem,r=a?.resources,n=(0,w.aB)(a?.origin);if(!s||!r||null==n)return void(e&&(t[i]=(0,k.t)(e,a)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(7===l||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,s);else if(n===l&&e){const n=(0,k.t)(e,a);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,s):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new r.A,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new r.A,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(e=>{i.add(e.id)})})}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),(0,l.tE)(this.sublayerIdsCache,e,()=>new Set);const i=this._addSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await(0,_.qN)(this,[e]),this._refreshNamedTypes(),i}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);t?.useAllData?o.A.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!t||t.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.A.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())(0,l.tE)(this.sublayerIdsCache,e,()=>new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,a.Cg)([(0,c.MZ)()],G.prototype,"dataManager",void 0),(0,a.Cg)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],G.prototype,"definitionSetMap",void 0),(0,a.Cg)([(0,g.w)("definitionSetMap")],G.prototype,"readDefinitionSetMap",null),(0,a.Cg)([(0,m.K)("definitionSetMap")],G.prototype,"writeDefinitionSetMap",null),(0,a.Cg)([(0,c.MZ)()],G.prototype,"inclusionModeDefinition",null),(0,a.Cg)([(0,c.MZ)()],G.prototype,"knowledgeGraph",void 0),(0,a.Cg)([(0,c.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],G.prototype,"layers",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"memberEntityTypes",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"memberRelationshipTypes",void 0),(0,a.Cg)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],G.prototype,"operationalLayerType",void 0),(0,a.Cg)([(0,c.MZ)()],G.prototype,"sublayerIdsCache",void 0),(0,a.Cg)([(0,c.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],G.prototype,"tables",void 0),(0,a.Cg)([(0,c.MZ)({json:{read:!1}})],G.prototype,"type",void 0),(0,a.Cg)([(0,c.MZ)(E.OZ)],G.prototype,"url",void 0),G=(0,a.Cg)([(0,f.$)("esri.layers.KnowledgeGraphLayer")],G);const N=G},69208:(e,t,i)=>{i.d(t,{d:()=>n});var a=i(31635),s=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,a.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,a.Cg)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],i),i}}}]);
@@ -381,7 +381,7 @@ forwardTextureCoordinates();`),v.include(n.HQ,t),e.include(m.S,t),e.include(h.Q,
381
381
  discardBySlice(vpos);
382
382
  ${(0,d.If)(y,d.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
383
383
  discardOrAdjustAlpha(texColor);`)}
384
- calculateOcclusionAndOutputHighlight();`)}}},42293:(e,t,r)=>{r.d(t,{I:()=>n}),r(44208),r(94656);var i=r(63907);function n(e){switch(e){case 6406:case 6409:case 6403:case 36244:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.SB.DEPTH_COMPONENT32F:case i.iE.DEPTH24_STENCIL8:return 4;case i.iE.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},42398:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(43519),n=r(33079),o=r(71988),a=r(74333);class s extends a.n{constructor(e,t,r,i){super(e,"vec4",1,(r,n,o)=>r.setUniform4fv(e,t(n,o),i),r)}}class l extends a.n{constructor(e,t,r,i){super(e,"float",1,(r,n,o)=>r.setUniform1fv(e,t(n,o),i),r)}}var c=r(31821),d=r(35644);r(78662).Gd;const u=8;function h(e,t){const{vertex:r,attributes:a}=e;t.hasVVInstancing&&(t.hasVVSize||t.hasVVColor)&&a.add("instanceFeatureAttribute","vec4"),t.hasVVSize?(r.uniforms.add(new n.t("vvSizeMinSize",e=>e.vvSize.minSize)),r.uniforms.add(new n.t("vvSizeMaxSize",e=>e.vvSize.maxSize)),r.uniforms.add(new n.t("vvSizeOffset",e=>e.vvSize.offset)),r.uniforms.add(new n.t("vvSizeFactor",e=>e.vvSize.factor)),r.uniforms.add(new n.t("vvSizeFallback",e=>e.vvSize.fallback)),r.uniforms.add(new d.k("vvSymbolRotationMatrix",e=>e.vvSymbolRotationMatrix)),r.uniforms.add(new n.t("vvSymbolAnchor",e=>e.vvSymbolAnchor)),r.code.add(c.H`vec3 vvScale(vec4 _featureAttribute) {
384
+ calculateOcclusionAndOutputHighlight();`)}}},42293:(e,t,r)=>{r.d(t,{MW:()=>o,wH:()=>n}),r(44208),r(94656);var i=r(63907);function n(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.SB.DEPTH_COMPONENT32F:case i.iE.DEPTH24_STENCIL8:return 4;case i.iE.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},42398:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(43519),n=r(33079),o=r(71988),a=r(74333);class s extends a.n{constructor(e,t,r,i){super(e,"vec4",1,(r,n,o)=>r.setUniform4fv(e,t(n,o),i),r)}}class l extends a.n{constructor(e,t,r,i){super(e,"float",1,(r,n,o)=>r.setUniform1fv(e,t(n,o),i),r)}}var c=r(31821),d=r(35644);r(78662).Gd;const u=8;function h(e,t){const{vertex:r,attributes:a}=e;t.hasVVInstancing&&(t.hasVVSize||t.hasVVColor)&&a.add("instanceFeatureAttribute","vec4"),t.hasVVSize?(r.uniforms.add(new n.t("vvSizeMinSize",e=>e.vvSize.minSize)),r.uniforms.add(new n.t("vvSizeMaxSize",e=>e.vvSize.maxSize)),r.uniforms.add(new n.t("vvSizeOffset",e=>e.vvSize.offset)),r.uniforms.add(new n.t("vvSizeFactor",e=>e.vvSize.factor)),r.uniforms.add(new n.t("vvSizeFallback",e=>e.vvSize.fallback)),r.uniforms.add(new d.k("vvSymbolRotationMatrix",e=>e.vvSymbolRotationMatrix)),r.uniforms.add(new n.t("vvSymbolAnchor",e=>e.vvSymbolAnchor)),r.code.add(c.H`vec3 vvScale(vec4 _featureAttribute) {
385
385
  if (isnan(_featureAttribute.x)) {
386
386
  return vvSizeFallback;
387
387
  }
@@ -513,7 +513,7 @@ return MaskedColor(masked1 * masked2, bvec4(ivec4(color1.mask) & ivec4(color2.ma
513
513
  return MaskedColor(color, isnan(color));
514
514
  }`)}},43616:(e,t,r)=>{r.d(t,{MB:()=>l,Um:()=>c,kE:()=>a});var i=r(4576),n=r(34727),o=r(77194);function a(e,t,r,i,o,a){let s=r.screenLength*e.pixelRatio;null!=o&&(d.update(i,t,o,a),s=d.apply(s));const l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(l*t,r.minWorldLength,r.maxWorldLength)}const s=(0,i.VO)();function l(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(Array.isArray(n)?Array.isArray(e[i])&&s(n,e[i])||(e[i]=n.slice(),r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4},d=new o.PS},46686:(e,t,r)=>{r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
515
515
  void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
516
- `)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(99677),h=r(56058),p=r(2741);let m;var f=r(63907),g=r(76284),v=r(42293);let _=null,x=null;async function w(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function y(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function b(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,n){const o=(0,v.I)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<h;e++)p.push(new Uint8Array(a(e,d))),s(e,d,p[e]);return t.internalFormat=u,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new g.g(e,t,{type:"compressed",levels:p})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const I=R("DXT1"),F=R("DXT3"),O=R("DXT5");function P(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case I:n=8,o=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let p=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*n,u=new Uint8Array(e.buffer,p,h),m.push(u),p+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function N(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:H(e,r,i)}function H(e,t,r){if(e instanceof ImageData)return H(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var L=r(620),z=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new n.bk,this._parameters={...U,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new z.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?b(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=P(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new g.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const n=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const n=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromPixelData(e,t){(0,L.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?6409:3===this._parameters.components?6407:6408,6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((n,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,o.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),n(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=N(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?6407:6408,n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._glTexture=new g.g(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const U={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),n=r(31821),o=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
516
+ `)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(99677),h=r(56058),p=r(2741);let m;var f=r(63907),g=r(76284),v=r(42293);let _=null,x=null;async function w(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function y(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function b(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,n){const o=(0,v.MW)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<h;e++)p.push(new Uint8Array(a(e,d))),s(e,d,p[e]);return t.internalFormat=u,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new g.g(e,t,{type:"compressed",levels:p})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const I=R("DXT1"),F=R("DXT3"),O=R("DXT5");function P(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case I:n=8,o=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let p=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*n,u=new Uint8Array(e.buffer,p,h),m.push(u),p+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function N(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:H(e,r,i)}function H(e,t,r){if(e instanceof ImageData)return H(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var L=r(620),z=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new n.bk,this._parameters={...U,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new z.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?b(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t,n=t.pixelFormat??6408,o=(0,v.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,s.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=P(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new g.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const n=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const n=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromPixelData(e,t){(0,L.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((n,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,o.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),n(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=N(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._glTexture=new g.g(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const U={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),n=r(31821),o=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
517
517
  colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
518
518
  }`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new o.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK)).code.add(n.H`void forwardNormalUV(){
519
519
  normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
@@ -717,7 +717,7 @@ return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSiz
717
717
  float evaluateAmbientOcclusion() {
718
718
  return 1.0 - evaluateAmbientOcclusionInverse();
719
719
  }`)):e.code.add(i.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
720
- float evaluateAmbientOcclusion() { return 0.0; }`)}},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>a});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.I)(e.internalFormat))*(34067===e.target?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},71955:(e,t,r)=>{r.d(t,{K:()=>l});var i=r(43519),n=r(31821),o=r(74333);class a extends o.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var s=r(43616);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new a("symbolColorMixMode",e=>s.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
720
+ float evaluateAmbientOcclusion() { return 0.0; }`)}},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>a});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.MW)(e.internalFormat))*(34067===e.target?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},71955:(e,t,r)=>{r.d(t,{K:()=>l});var i=r(43519),n=r(31821),o=r(74333);class a extends o.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var s=r(43616);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new a("symbolColorMixMode",e=>s.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
721
721
  MaskedColor applySymbolColor(MaskedColor color) {
722
722
  return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
723
723
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1698],{24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))},51698:(e,t,r)=>{r.d(t,{loadGLTF:()=>k});var o=r(53966),n=r(93637),s=r(9093),a=r(49186),i=r(91869),u=r(74887),l=r(84952),c=r(46140),f=r(58083),d=r(67026),p=r(82534),m=r(13030),h=r(24045),T=(r(44208),r(2741));let w;function g(){return w??=(async()=>{const{default:e}=await r.e(2423).then(r.bind(r,2423));return await e({locateFile:e=>(0,T.s)(`esri/libs/dracoMeshDecoder/${e}`)})})(),w}class b{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}var y=r(21818);const x={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},_={pbrMetallicRoughness:x,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},S={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},A=(e={})=>{const t={...x,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,y.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...S,...e.extras});return{..._,...e,pbrMetallicRoughness:t,extras:r}},O={magFilter:9729,minFilter:9987,wrapS:10497,wrapT:10497},v=e=>({...O,...e});var R=r(51530),N=r(63907);const C=1179937895;class E{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._dracoBuffersSize=0,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform","KHR_draco_mesh_compression"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,(e,o,n)=>(t=o||"",r=n||"","")),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new a.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new a.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new a.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,l.DB)(t)){const r=(0,l.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new E(e,t,o)}catch{}const o=(0,l.lJ)(t);if(E._isGLBData(o))return this._fromGLBData(e,t,o)}if(G.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new E(e,t,o)}const o=await e.loadBinary(t,r);if(E._isGLBData(o))return this._fromGLBData(e,t,o);if(P.test(t)||"glb"===r?.expectedType)throw new a.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new E(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new b(e);return t.remainingBytes()>=4&&t.readUint32()===C}static async _fromGLBData(e,t,r){const o=await E._parseGLBData(r);return new E(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new b(e);if(t.remainingBytes()<12)throw new a.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),n=t.readUint32(),s=t.readUint32();if(r!==C)throw new a.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<s)throw new a.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==n)throw new a.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let i,u,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new a.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new a.A("gltf-loader-error","No JSON data found.");i=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new a.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");u=t.readUint8Array(e)}else o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!i)throw new a.A("gltf-loader-error","No glb JSON chunk detected.");return{json:i,binaryData:u}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new a.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new a.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,n),n}_validateAccessor(e){if(!this.json.accessors)throw new a.A("gltf-loader-unsupported-feature","Accessors missing.");const t=this.json.accessors[e];if(t.type in["MAT2","MAT3","MAT4"])throw new a.A("gltf-loader-unsupported-feature",`AttributeType ${t.type} is not supported`);return t}_getComponentInfo(e,t){const r=F[e.type],o=t?.componentType||e.componentType,n=D[o];return{componentType:o,componentCount:r,componentByteSize:n,denseByteStride:r*n}}getDracoAccessor(e,t){const r=this._validateAccessor(e),o=t.accessorInfos.get(e),{componentType:n,componentCount:s,componentByteSize:a,denseByteStride:i}=this._getComponentInfo(r,o);return{raw:t.data.buffer,byteStride:i,byteOffset:t.data.byteOffset+(o?.byteOffset||0),entryCount:o?.count??r.count,isDenselyPacked:!0,componentCount:s,componentByteSize:a,componentType:n,min:r.min,max:r.max,normalized:!!r.normalized}}async getAccessor(e,t){const r=this._validateAccessor(e);if(null==r?.bufferView)throw new a.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");const{componentCount:o,componentByteSize:n,denseByteStride:s}=this._getComponentInfo(r),i=this.json.bufferViews[r.bufferView],u=await this.getBuffer(i.buffer,t),l=i.byteStride||s;return{raw:u.buffer,byteStride:l,byteOffset:u.byteOffset+(i.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===s,componentCount:o,componentByteSize:n,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t,r){if(null==e.indices)return;const o=e.indices,n=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(n.isDenselyPacked)switch(n.componentType){case N.pe.UNSIGNED_BYTE:return new Uint8Array(n.raw,n.byteOffset,n.entryCount);case N.pe.UNSIGNED_SHORT:return new Uint16Array(n.raw,n.byteOffset,n.entryCount);case N.pe.UNSIGNED_INT:return new Uint32Array(n.raw,n.byteOffset,n.entryCount)}else switch(n.componentType){case N.pe.UNSIGNED_BYTE:return(0,h.m)(U(m.SL,n));case N.pe.UNSIGNED_SHORT:return(0,h.m)(U(m.h,n));case N.pe.UNSIGNED_INT:return(0,h.m)(U(m.P,n))}}async getPositionData(e,t,r){if(null==e.attributes.POSITION)throw new a.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const o=e.attributes.POSITION,s=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+(0,n.i7)(N.pe,s.componentType));if(3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+s.componentCount.toFixed());return U(m.xs,s)}async getNormalData(e,t,r){if(null==e.attributes.NORMAL)throw new a.A("gltf-loader-error","No NORMAL vertex data found.");const o=e.attributes.NORMAL,s=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+(0,n.i7)(N.pe,s.componentType));if(3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+s.componentCount.toFixed());return U(m.xs,s)}async getTangentData(e,t,r){if(null==e.attributes.TANGENT)throw new a.A("gltf-loader-error","No TANGENT vertex data found.");const o=e.attributes.TANGENT,s=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+(0,n.i7)(N.pe,s.componentType));if(4!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+s.componentCount.toFixed());return U(m.Eq,s)}async getTextureCoordinates(e,t,r){if(null==e.attributes.TEXCOORD_0)throw new a.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const o=e.attributes.TEXCOORD_0,n=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(2!==n.componentCount)throw new a.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+n.componentCount.toFixed());if(n.componentType===N.pe.FLOAT)return U(m.gH,n);if(!n.normalized)throw new a.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case N.pe.BYTE:return new m.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_BYTE:return new m.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.SHORT:return new m.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_SHORT:return new m.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_INT:return new m.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.FLOAT:return new m.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(n)}async getVertexColors(e,t,r){if(null==e.attributes.COLOR_0)throw new a.A("gltf-loader-error","No COLOR_0 vertex data found.");const o=e.attributes.COLOR_0,s=r?this.getDracoAccessor(o,r):await this.getAccessor(o,t);if(4!==s.componentCount&&3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+s.componentCount.toFixed());if(4===s.componentCount){if(s.componentType===N.pe.FLOAT)return U(m.Eq,s);if(s.componentType===N.pe.UNSIGNED_BYTE)return U(m.XP,s);if(s.componentType===N.pe.UNSIGNED_SHORT)return U(m.Uz,s)}else if(3===s.componentCount){if(s.componentType===N.pe.FLOAT)return U(m.xs,s);if(s.componentType===N.pe.UNSIGNED_BYTE)return U(m.eI,s);if(s.componentType===N.pe.UNSIGNED_SHORT)return U(m.nS,s)}throw new a.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+(0,n.i7)(N.pe,s.componentType))}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?A(this.json.materials[e.material]):A(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async decode(e,t){const r=e.extensions?.KHR_draco_mesh_compression;if(!r)return;if(null==e.indices)throw new a.A("gltf-loader-error","Found Draco compressed primitive without indices.");const o=this.json.bufferViews[r.bufferView],n=await this.getBuffer(o.buffer,t),s=(await g()).decode(new Uint8Array(n.buffer,o.byteOffset,o.byteLength));this._bufferLoaders.delete(o.buffer);const i=new Map([[e.indices,s.indices],[e.attributes.POSITION,s.positions]]);return e.attributes.TEXCOORD_0&&i.set(e.attributes.TEXCOORD_0,s.uvs),e.attributes.NORMAL&&i.set(e.attributes.NORMAL,s.normals),e.attributes.COLOR_0&&i.set(e.attributes.COLOR_0,s.colors),e.attributes.TANGENT&&i.set(e.attributes.TANGENT,s.tangents),this._dracoBuffersSize+=s.buffer.byteLength,{data:s.buffer,accessorInfos:i}}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new a.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=v(null!=o.sampler?this.json.samplers[o.sampler]:{}),s=B(o),u=this.json.images[s],l=await this._loadTextureImageData(r,o,t);return(0,i.tE)(this._textureCache,r,()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new a.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:l,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:u.name,id:r}})}getNodeTransform(e){if(void 0===e)return I;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,f.lw)((0,s.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,s.o8)(r),o.translation&&(0,f.Tl)(t,t,o.translation),o.rotation&&(M[3]=(0,d.Xd)(M,o.rotation),(0,f.e$)(t,t,M[3],M)),o.scale&&(0,f.hs)(t,t,o.scale)):t=(0,s.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,l.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=c.R.parse(this.json.asset.version,"glTF");L.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new a.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=B(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new a.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new a.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new a.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const i=s.byteOffset+(n.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,i,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,u.nA)(Array.from(this._bufferLoaders.values())),t=await(0,u.nA)(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+this._dracoBuffersSize+t.reduce((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const I=(0,f.hM)((0,s.vt)(),Math.PI/2),L=new c.R(2,0,"glTF"),M=(0,p.vt)(),F={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},D={[N.pe.BYTE]:1,[N.pe.UNSIGNED_BYTE]:1,[N.pe.SHORT]:2,[N.pe.UNSIGNED_SHORT]:2,[N.pe.HALF_FLOAT]:2,[N.pe.FLOAT]:4,[N.pe.INT]:4,[N.pe.UNSIGNED_INT]:4};function U(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function B(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new a.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const G=/\.gltf$/i,P=/\.glb$/i;let j=0;async function k(e,t,r={},a=!0){const i=await E.load(e,t,r),u="gltf_"+j++,l={lods:[],materials:new Map,textures:new Map,meta:H(i)},c=!(!i.json.asset.extras||"symbolResource"!==i.json.asset.extras.ESRI_type),f=i.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await V(i,async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const m=void 0!==e.mode?e.mode:N.WR.TRIANGLES,h=m===N.WR.TRIANGLES||m===N.WR.TRIANGLE_STRIP||m===N.WR.TRIANGLE_FAN?m:null;if(null==h)return void o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+(0,n.i7)(N.WR,m)+"). Skipping primitive.");if(!i.hasPositions(e))return void o.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=await i.decode(e,r),w=i.getPositionData(e,r,T),g=i.getMaterial(e,r,a),b=i.hasNormals(e)?i.getNormalData(e,r,T):null,y=i.hasTangents(e)?i.getTangentData(e,r,T):null,x=i.hasTextureCoordinates(e)?i.getTextureCoordinates(e,r,T):null,_=i.hasVertexColors(e)?i.getVertexColors(e,r,T):null,S=i.getIndexData(e,r,T),A={name:f,transform:(0,s.o8)(t),attributes:{position:await w,normal:b?await b:null,texCoord0:x?await x:null,color:_?await _:null,tangent:y?await y:null},indices:await S,primitiveType:h,material:$(l,await g,u)};let O=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(O=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:O},l.lods[c].parts[p]=A});for(const e of l.lods)e.parts=e.parts.filter(e=>!!e);const p=await i.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:i.uri,ESRI_webstyle:f},customMeta:{},usedMemory:p}}function H(e){const t=e.json;let r=null;return t.nodes.forEach(e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}async function V(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,s=n.length>1,a=[];for(const e of n){const t=r.nodes[e];a.push(i(e,0)),z(t)&&!s&&t.extensions.MSFT_lod.ids.forEach((e,t)=>i(e,t+1))}async function i(n,s){const u=r.nodes[n],l=e.getNodeTransform(n);if(null!=u.weights&&o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,s,e.name))}for(const e of u.children||[])a.push(i(e,s))}await Promise.all(a)}function z(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function $(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:10497,t:10497,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:K.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclusion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?o(t.colorTexture):void 0,normalTexture:t.normalTexture?o(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?o(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?o(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclusion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const K=new Set([9987,9985])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(212),r.e(9719),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(8991)]).then(r.bind(r,51613))).default,CSVLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(212),r.e(1407)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(8506),r.e(364),r.e(8628),r.e(2593),r.e(9279),r.e(9692)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(4045),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(4045),r.e(9953),r.e(4660),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(212),r.e(6713)]).then(r.bind(r,40212))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(4045),r.e(9719),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(5890)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(4045),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(9719),r.e(364),r.e(3356),r.e(6699),r.e(5794)]).then(r.bind(r,55942))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(9719),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(9718)]).then(r.bind(r,19718))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(4045),r.e(9719),r.e(2515),r.e(132)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(4045),r.e(9719),r.e(9240),r.e(2515),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(8368),r.e(3577),r.e(1812),r.e(217),r.e(2568),r.e(5655),r.e(489),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(4045),r.e(9719),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(8368),r.e(3577),r.e(1812),r.e(217),r.e(2568),r.e(5655),r.e(489),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(364),r.e(7048),r.e(7656),r.e(3217)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(212),r.e(5655),r.e(744)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(4045),r.e(3577),r.e(2763)]).then(r.bind(r,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(5971),r.e(5363),r.e(4224)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(9573),r.e(4806)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(212),r.e(9361),r.e(5950)]).then(r.bind(r,9352))).default,PointCloudLayer:async()=>(await Promise.all([r.e(4045),r.e(2869),r.e(9719),r.e(9240),r.e(7984),r.e(873)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(4045),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(979)]).then(r.bind(r,64185))).default,SceneLayer:async()=>(await Promise.all([r.e(4045),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(9719),r.e(7005),r.e(9240),r.e(3474),r.e(5971),r.e(61),r.e(1713)]).then(r.bind(r,36969))).default,StreamLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(8506),r.e(9211)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(364),r.e(4660),r.e(7048),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(4660),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(4045),r.e(3910),r.e(5323),r.e(8303),r.e(957),r.e(6171)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(4045),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(4045),r.e(2869),r.e(9240),r.e(3081)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(1791)]).then(r.bind(r,88854))).default,WFSLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(5323),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(4660),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(4045),r.e(6554),r.e(9573),r.e(3310)]).then(r.bind(r,47314))).default}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(24183);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.V)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.V)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(24183);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,b="SceneServer"===c,L={parsedUrl:r,Constructor:null,layerId:p||b?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.V)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.V)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.V)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.V)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.V)(e,{customParameters:a});L.sourceJSON=r,L.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.V)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.V)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(L.preferredUrl=r.preferredUrl,L.sublayerInfos=r.layerInfos,L.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)L.layers=r.layers,L.tables=r.tables,p&&r.layerInfos?.length&&(L.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||b){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(L.layerId=r.layers[0]?.id??r.tables[0]?.id,L.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return L.Constructor=await h(f),L}(c,a?.customParameters),{Constructor:b,layerId:L,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=L&&(d.layerId=L),null!=S&&(d.sourceJSON=S),new b(d);const I=new(0,(await Promise.all([r.e(4045),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(78888),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561],{4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(31635),o=r(78888),s=r(49186),n=r(65529),l=r(4902),a=r(92474),p=r(53966),u=r(74887),d=r(84952),c=r(10107),y=(r(44208),r(87811),r(40608)),h=r(5443),g=r(16930),f=r(92602),m=r(79677);let v=0,b=class extends((0,n.Zt)((0,l.sA)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||f.A.portalUrl;throw p.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||p.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:h.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,y.$)("esri.layers.Layer")],b)},4902:(e,t,r)=>{r.d(t,{PH:()=>l,sA:()=>n});var i=r(31635),o=r(40608);let s=0;const n=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,o.$)("esri.core.Identifiable")],r),r},l=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return r=(0,i.Cg)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],r),r};n(class{})},16215:(e,t,r)=>{r.d(t,{S:()=>o,Y:()=>i});const i=Symbol("BasemapInstance");function o(e){return null!=e&&"object"==typeof e&&i in e}},17311:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),o=r(65008),s=r(4576),n=r(60999),l=r(7762),a=r(10107),p=(r(44208),r(53966),r(40608)),u=r(30524),d=r(43668);let c=class extends o.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,o=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,a=l&&n;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],p=a?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,o).global,layer:e,text:l}):"";i.set(r,p)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,u.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const o=await e.queryFeatures(i);if(o?.features.length===t.length)return o.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],o={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{o[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...o};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,i.Cg)([(0,a.MZ)()],c.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,a.MZ)()],c.prototype,"displayField",void 0),(0,i.Cg)([(0,a.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,a.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,a.MZ)()],c.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,a.MZ)()],c.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,a.MZ)()],c.prototype,"fields",void 0),(0,i.Cg)([(0,a.MZ)()],c.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)()],c.prototype,"requiredFields",null),c=(0,i.Cg)([(0,p.$)("esri.layers.support.TitleCreator")],c)},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,o=r(31635),s=r(52106),n=r(66552),l=r(25482),a=r(4718),p=r(10107),u=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),g=r(50498),f=r(20437);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[s,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*n,l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=r.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(l[0]),o=r(l[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,u.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:g.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,u.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),o=r(69540),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],u)},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var i=r(31635),o=r(93637),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const o=new l.A;return o.read(i,r),[o]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,o.sM)(r,[s.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(p)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),o=r(69540),s=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),d=r(29005);let c=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureType")],c)},37352:(e,t,r)=>{r.d(t,{A:()=>p});var i,o=r(31635),s=r(7762),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let p=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"floorField",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,o.Cg)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p)},45067:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),o=r(69540),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,a.$)("esri.layers.support.Relationship")],d)},52106:(e,t,r)=>{r.d(t,{A:()=>C});var i,o=r(31635),s=r(37838),n=r(69540),l=r(51447),a=r(25482),p=r(53966),u=r(36708),d=r(24326),c=r(10107),y=(r(44208),r(87811),r(40608)),h=r(12195),g=r(65864),f=r(50498),m=r(55156),v=r(60950),b=r(54339),w=r(33910);function M(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let C=class extends((0,n.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:M(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,u.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,o.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,g.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],C.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,c.MZ)({value:null})],C.prototype,"attributes",null),(0,o.Cg)([(0,c.MZ)({value:null,types:f.yR,json:{read:g.rS}})],C.prototype,"geometry",null),(0,o.Cg)([(0,c.MZ)({type:Boolean})],C.prototype,"isAggregate",void 0),(0,o.Cg)([(0,c.MZ)({clonable:!1})],C.prototype,"layer",void 0),(0,o.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"origin",void 0),(0,o.Cg)([(0,c.MZ)({type:s.A,value:null})],C.prototype,"popupTemplate",null),(0,o.Cg)([(0,c.MZ)({clonable:"reference"})],C.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,c.MZ)({value:null,types:w.Es})],C.prototype,"symbol",null),(0,o.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],C.prototype,"_version",void 0),(0,o.Cg)([(0,c.MZ)({type:Boolean,value:!0})],C.prototype,"visible",null),C=i=(0,o.Cg)([(0,y.$)("esri.Graphic")],C)},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(31635),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>o,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>d,BR:()=>u,wI:()=>p,G$:()=>y,$x:()=>c,Ov:()=>l,W_:()=>a,OP:()=>h,TU:()=>n,XX:()=>s});var i=r(70333),o=r(78888);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function n(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function p(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,o.A)(n,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function c(e,t){return null}function y(e){return null}function h(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!h(e))return;const r=(e.url,null);r&&(e.url=r)}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var i,o=r(31635),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,o.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],u)}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 9c64b78c5c9b35b31d98.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6395],{18883:(e,t,i)=>{i.d(t,{g:()=>a});const a=()=>[2,1,1,1,3].map(e=>{let t="";for(let i=0;i<e;i++)t+=(65536*(1+Math.random())|0).toString(16).substring(1);return t}).join("-")},21796:(e,t,i)=>{i.d(t,{H:()=>E,c:()=>f,d:()=>z,f:()=>p,i:()=>b,r:()=>h,s:()=>m});var a=i(46337),n=i(79e3);const r=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"],l="hidden-form-input";function o(e){return"checked"in e}const c=new WeakMap,s=new WeakSet;function d(e){return"CALCITE-RADIO-BUTTON"===e.nodeName?(0,n.l)(e,"calcite-radio-button-group"):e}const v=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function u(e){const t=e?.target,i=t?.validationMessage,a=d(t?.parentElement);if(!a)return;const n=a?.nodeName?.toLowerCase(),l=n?.split("-");if(l.length<2||"calcite"!==l[0])return;e?.preventDefault(),"validity"in a&&(a.validity=t?.validity),a.dispatchEvent(v),function(e,{status:t,message:i,icon:a}){"status"in e&&(e.status=t),"validationIcon"in e&&"string"!=typeof e.validationIcon&&(e.validationIcon=a),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=i)}(a,{message:i,icon:!0,status:"invalid"});const o=function(e){return`${e.split("-").map((e,t)=>0===t?e:`${e[0].toUpperCase()}${e.slice(1)}`).join("")}${r.includes(e)?"Input":"Change"}`}(n);a.addEventListener(o,()=>{"status"in a&&(a.status="idle"),!("validationIcon"in a)||""!==a.validationIcon&&!0!==a.validationIcon||(a.validationIcon=!1),"validationMessage"in a&&a.validationMessage===i&&(a.validationMessage=""),"validity"in a&&(a.validity=t?.validity)},{once:!0})}function m(e){const{formEl:t}=e;return!!t&&(t.addEventListener("invalid",u,!0),t.requestSubmit(),t.removeEventListener("invalid",u,!0),requestAnimationFrame(()=>{const e=t.querySelectorAll("[status=invalid]");for(const t of e)if(t?.validationMessage){t?.setFocus();break}}),!0)}function h(e){e.formEl?.reset()}function f(e){const{el:t,value:i}=e,a=p(e);if(!a||function(e,t){if((0,n.l)(t.parentElement,"[form]"))return!0;const i="calciteInternalFormComponentRegister";let a=!1;return e.addEventListener(i,e=>{a=e.composedPath().some(e=>s.has(e)),e.stopPropagation()},{once:!0}),t.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0})),a}(a,t))return;e.formEl=a,e.defaultValue=i,o(e)&&(e.defaultChecked=e.checked);const r=g.bind(e);a.addEventListener("reset",r),c.set(e.el,r),s.add(t)}function p(e){const{el:t,form:i}=e;return i?(0,n.q)(t,{id:i}):(0,n.l)(t,"form")}function g(){"status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),o(this)?this.checked=this.defaultChecked:(this.value=this.defaultValue,this.onFormReset?.())}function z(e){const{el:t,formEl:i}=e;if(!i)return;const a=c.get(t);i.removeEventListener("reset",a),c.delete(t),e.formEl=null,s.delete(t)}const b="calciteInternalHiddenInputInput",k=e=>{e.target.dispatchEvent(new CustomEvent(b,{bubbles:!0}))},y=e=>e.removeEventListener("input",k);function $(e,t,i){const{defaultValue:a,disabled:n,form:r,name:l,required:c}=e;t.defaultValue=a,t.disabled=n,t.name=l,t.required=c,t.tabIndex=-1,r?t.setAttribute("form",r):t.removeAttribute("form"),o(e)?(t.checked=e.checked,t.defaultChecked=e.defaultChecked,t.value=e.checked?i||"on":""):t.value=i||"",e.syncHiddenFormInput?.(t);const s=d(e.el);if(s&&"validity"in s)for(const e in{...t?.validity})s.validity[e]=t.validity[e]}const E=({component:e})=>(function(e){const{el:t,formEl:i,name:n,value:r}=e,{ownerDocument:o}=t;if(a.S$)return;const c=t.querySelectorAll(`input[slot="${l}"]`);if(!i||!n)return void c.forEach(e=>{y(e),e.remove()});const s=Array.isArray(r)?r:[r],d=[],v=new Set;let u;c.forEach(t=>{const i=s.find(e=>e==t.value);null!=i?(v.add(i),$(e,t,i)):d.push(t)}),s.forEach(t=>{if(v.has(t))return;let i=d.pop();i||(i=o.createElement("input"),i.ariaHidden="true",i.slot=l),u||(u=o.createDocumentFragment()),u.append(i),i.addEventListener("input",k),$(e,i,t)}),u&&t.append(u),d.forEach(e=>{y(e),e.remove()})}(e),a.qy`<slot name=${l}></slot>`)},30357:(e,t,i)=>{var a=i(34088),n=i(46337),r=i(17899),l=i(18883),o=i(75572);const c="ring--progress",s="ring",d="ring--track",v=n.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-0);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-2);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`;class u extends r.WF{constructor(){super(...arguments),this.messages=(0,o.u)({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||0!==this.value)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||"indeterminate"!==this.type)||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&100===this.value}formatValue(){return"determinate-value"!==this.type?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){"determinate-value"===this.type&&this.formatter?.resolvedOptions().locale!==this.messages._lang&&(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){const{el:e,inline:t,label:i,text:a,type:o,value:c}=this,s=e.id||(0,l.g)(),d="indeterminate"!==o,v=Math.floor(c);return this.el.ariaLabel=i,this.el.ariaValueMax=d?"100":void 0,this.el.ariaValueMin=d?"0":void 0,this.el.ariaValueNow=d?v.toString():void 0,(0,r.Bq)(this.el,"id",s),this.el.role="progressbar",n.qy`<div class=${(0,r.CP)("rings")}>${this.renderRing("track")}${this.renderRing("progress")}${!t&&d&&n.qy`<div class=${(0,r.CP)("percentage")}>${this.formatValue()}</div>`||""}</div>${!t&&a&&n.qy`<div class=${(0,r.CP)("text")}>${a}</div>`||""}`}renderRing(e){const{inline:t,scale:i,value:a}=this,l=t?this.getInlineSize(i):this.getSize(i),o=.45*l;let v;if("progress"===e){const e=2*o*Math.PI,t=(this.type.startsWith("determinate")?a:24)/100*e;v={"stroke-dasharray":`${t} ${e-t}`}}return n.qy`<svg aria-hidden=true class=${(0,r.CP)({[s]:!0,[d]:"track"===e,[c]:"progress"===e})} style=${(0,r.zl)(v)} viewBox=${`0 0 ${l} ${l}`}>${n.JW`<circle cx=${l/2} cy=${l/2} r=${o??n.s6} />`}</svg>`}}(0,a.c)("calcite-loader",u)},52567:(e,t,i)=>{i.d(t,{Bk:()=>l,eu:()=>o,qy:()=>d});var a=i(36752);const n=Symbol.for(""),r=e=>{if(e?.r===n)return e?._$litStatic$},l=e=>({_$litStatic$:e,r:n}),o=(e,...t)=>({_$litStatic$:t.reduce((t,i,a)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[a+1],e[0]),r:n}),c=new Map,s=e=>(t,...i)=>{const a=i.length;let n,l;const o=[],s=[];let d,v=0,u=!1;for(;v<a;){for(d=t[v];v<a&&void 0!==(l=i[v],n=r(l));)d+=n+t[++v],u=!0;v!==a&&s.push(l),o.push(d),v++}if(v===a&&o.push(t[a]),u){const e=o.join("$$lit$$");void 0===(t=c.get(e))&&(o.raw=o,c.set(e,t=o)),i=s}return e(t,...i)},d=s(a.qy);s(a.JW),s(a.ej)},60992:(e,t,i)=>{i.d(t,{I:()=>v,u:()=>d});var a=i(36752),n=i(17899);function r(){const{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function l(e){e.target.disabled&&e.preventDefault()}const o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}const s={capture:!0};function d(e){if(e.disabled)return e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),void function(e){var t;e.el.click=r,(t=e.el).addEventListener("pointerdown",l,s),o.forEach(e=>t.addEventListener(e,c,s))}(e);!function(e){var t;delete e.el.click,(t=e.el).removeEventListener("pointerdown",l,s),o.forEach(e=>t.removeEventListener(e,c,s))}(e),e.el.removeAttribute("aria-disabled")}const v=({children:e,disabled:t})=>a.qy`<div class=${(0,n.CP)("interaction-container")} .inert=${t}>${e}</div>`}}]);
1
+ /*! For license information please see aa78b69219d9a0ef1c54.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6395],{18883:(e,t,i)=>{i.d(t,{g:()=>a});const a=()=>[2,1,1,1,3].map(e=>{let t="";for(let i=0;i<e;i++)t+=(65536*(1+Math.random())|0).toString(16).substring(1);return t}).join("-")},21796:(e,t,i)=>{i.d(t,{H:()=>E,c:()=>f,d:()=>z,f:()=>p,i:()=>b,r:()=>h,s:()=>m});var a=i(46337),n=i(79e3);const r=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"],l="hidden-form-input";function o(e){return"checked"in e}const c=new WeakMap,s=new WeakSet;function d(e){return"CALCITE-RADIO-BUTTON"===e.nodeName?(0,n.l)(e,"calcite-radio-button-group"):e}const v=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function u(e){const t=e?.target,i=t?.validationMessage,a=d(t?.parentElement);if(!a)return;const n=a?.nodeName?.toLowerCase(),l=n?.split("-");if(l.length<2||"calcite"!==l[0])return;e?.preventDefault(),"validity"in a&&(a.validity=t?.validity),a.dispatchEvent(v),function(e,{status:t,message:i,icon:a}){"status"in e&&(e.status=t),"validationIcon"in e&&"string"!=typeof e.validationIcon&&(e.validationIcon=a),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=i)}(a,{message:i,icon:!0,status:"invalid"});const o=function(e){return`${e.split("-").map((e,t)=>0===t?e:`${e[0].toUpperCase()}${e.slice(1)}`).join("")}${r.includes(e)?"Input":"Change"}`}(n);a.addEventListener(o,()=>{"status"in a&&(a.status="idle"),!("validationIcon"in a)||""!==a.validationIcon&&!0!==a.validationIcon||(a.validationIcon=!1),"validationMessage"in a&&a.validationMessage===i&&(a.validationMessage=""),"validity"in a&&(a.validity=t?.validity)},{once:!0})}function m(e){const{formEl:t}=e;return!!t&&(t.addEventListener("invalid",u,!0),t.requestSubmit(),t.removeEventListener("invalid",u,!0),requestAnimationFrame(()=>{const e=t.querySelectorAll("[status=invalid]");for(const t of e)if(t?.validationMessage){t?.setFocus();break}}),!0)}function h(e){e.formEl?.reset()}function f(e){const{el:t,value:i}=e,a=p(e);if(!a||function(e,t){if((0,n.l)(t.parentElement,"[form]"))return!0;const i="calciteInternalFormComponentRegister";let a=!1;return e.addEventListener(i,e=>{a=e.composedPath().some(e=>s.has(e)),e.stopPropagation()},{once:!0}),t.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0})),a}(a,t))return;e.formEl=a,e.defaultValue=i,o(e)&&(e.defaultChecked=e.checked);const r=g.bind(e);a.addEventListener("reset",r),c.set(e.el,r),s.add(t)}function p(e){const{el:t,form:i}=e;return i?(0,n.q)(t,{id:i}):(0,n.l)(t,"form")}function g(){"status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),o(this)?this.checked=this.defaultChecked:(this.value=this.defaultValue,this.onFormReset?.())}function z(e){const{el:t,formEl:i}=e;if(!i)return;const a=c.get(t);i.removeEventListener("reset",a),c.delete(t),e.formEl=null,s.delete(t)}const b="calciteInternalHiddenInputInput",k=e=>{e.target.dispatchEvent(new CustomEvent(b,{bubbles:!0}))},y=e=>e.removeEventListener("input",k);function $(e,t,i){const{defaultValue:a,disabled:n,form:r,name:l,required:c}=e;t.defaultValue=a,t.disabled=n,t.name=l,t.required=c,t.tabIndex=-1,r?t.setAttribute("form",r):t.removeAttribute("form"),o(e)?(t.checked=e.checked,t.defaultChecked=e.defaultChecked,t.value=e.checked?i||"on":""):t.value=i||"",e.syncHiddenFormInput?.(t);const s=d(e.el);if(s&&"validity"in s)for(const e in{...t?.validity})s.validity[e]=t.validity[e]}const E=({component:e})=>(function(e){const{el:t,formEl:i,name:n,value:r}=e,{ownerDocument:o}=t;if(a.S$)return;const c=t.querySelectorAll(`input[slot="${l}"]`);if(!i||!n)return void c.forEach(e=>{y(e),e.remove()});const s=Array.isArray(r)?r:[r],d=[],v=new Set;let u;c.forEach(t=>{const i=s.find(e=>e==t.value);null!=i?(v.add(i),$(e,t,i)):d.push(t)}),s.forEach(t=>{if(v.has(t))return;let i=d.pop();i||(i=o.createElement("input"),i.ariaHidden="true",i.slot=l),u||(u=o.createDocumentFragment()),u.append(i),i.addEventListener("input",k),$(e,i,t)}),u&&t.append(u),d.forEach(e=>{y(e),e.remove()})}(e),a.qy`<slot name=${l}></slot>`)},30357:(e,t,i)=>{var a=i(34088),n=i(46337),r=i(41557),l=i(18883),o=i(75572);const c="ring--progress",s="ring",d="ring--track",v=n.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-0);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-2);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`;class u extends r.WF{constructor(){super(...arguments),this.messages=(0,o.u)({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||0!==this.value)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||"indeterminate"!==this.type)||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&100===this.value}formatValue(){return"determinate-value"!==this.type?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){"determinate-value"===this.type&&this.formatter?.resolvedOptions().locale!==this.messages._lang&&(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){const{el:e,inline:t,label:i,text:a,type:o,value:c}=this,s=e.id||(0,l.g)(),d="indeterminate"!==o,v=Math.floor(c);return this.el.ariaLabel=i,this.el.ariaValueMax=d?"100":void 0,this.el.ariaValueMin=d?"0":void 0,this.el.ariaValueNow=d?v.toString():void 0,(0,r.Bq)(this.el,"id",s),this.el.role="progressbar",n.qy`<div class=${(0,r.CP)("rings")}>${this.renderRing("track")}${this.renderRing("progress")}${!t&&d&&n.qy`<div class=${(0,r.CP)("percentage")}>${this.formatValue()}</div>`||""}</div>${!t&&a&&n.qy`<div class=${(0,r.CP)("text")}>${a}</div>`||""}`}renderRing(e){const{inline:t,scale:i,value:a}=this,l=t?this.getInlineSize(i):this.getSize(i),o=.45*l;let v;if("progress"===e){const e=2*o*Math.PI,t=(this.type.startsWith("determinate")?a:24)/100*e;v={"stroke-dasharray":`${t} ${e-t}`}}return n.qy`<svg aria-hidden=true class=${(0,r.CP)({[s]:!0,[d]:"track"===e,[c]:"progress"===e})} style=${(0,r.zl)(v)} viewBox=${`0 0 ${l} ${l}`}>${n.JW`<circle cx=${l/2} cy=${l/2} r=${o??n.s6} />`}</svg>`}}(0,a.c)("calcite-loader",u)},52567:(e,t,i)=>{i.d(t,{Bk:()=>l,eu:()=>o,qy:()=>d});var a=i(36752);const n=Symbol.for(""),r=e=>{if(e?.r===n)return e?._$litStatic$},l=e=>({_$litStatic$:e,r:n}),o=(e,...t)=>({_$litStatic$:t.reduce((t,i,a)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[a+1],e[0]),r:n}),c=new Map,s=e=>(t,...i)=>{const a=i.length;let n,l;const o=[],s=[];let d,v=0,u=!1;for(;v<a;){for(d=t[v];v<a&&void 0!==(l=i[v],n=r(l));)d+=n+t[++v],u=!0;v!==a&&s.push(l),o.push(d),v++}if(v===a&&o.push(t[a]),u){const e=o.join("$$lit$$");void 0===(t=c.get(e))&&(o.raw=o,c.set(e,t=o)),i=s}return e(t,...i)},d=s(a.qy);s(a.JW),s(a.ej)},60992:(e,t,i)=>{i.d(t,{I:()=>v,u:()=>d});var a=i(36752),n=i(41557);function r(){const{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function l(e){e.target.disabled&&e.preventDefault()}const o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}const s={capture:!0};function d(e){if(e.disabled)return e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),void function(e){var t;e.el.click=r,(t=e.el).addEventListener("pointerdown",l,s),o.forEach(e=>t.addEventListener(e,c,s))}(e);!function(e){var t;delete e.el.click,(t=e.el).removeEventListener("pointerdown",l,s),o.forEach(e=>t.removeEventListener(e,c,s))}(e),e.el.removeAttribute("aria-disabled")}const v=({children:e,disabled:t})=>a.qy`<div class=${(0,n.CP)("interaction-container")} .inert=${t}>${e}</div>`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,l,t)=>{t.r(l),t.d(l,{build:()=>c.b,calculateAnchorPosition:()=>c.c,fullUV:()=>c.f}),t(37585),t(48163),t(91829),t(79258),t(76591),t(36782),t(47522),t(40268),t(63578),t(50832),t(42593),t(42398),t(63365),t(26835),t(52587),t(25178),t(47286),t(14314),t(81961),t(71988),t(33094),t(20304),t(31821),t(12791),t(63761),t(14113);var c=t(13259)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,l,t)=>{t.r(l),t.d(l,{build:()=>c.b,calculateAnchorPosition:()=>c.c,fullUV:()=>c.f}),t(37585),t(48163),t(91829),t(79258),t(76591),t(36782),t(47522),t(40268),t(63578),t(50832),t(42593),t(42398),t(63365),t(52587),t(25178),t(47286),t(14314),t(81961),t(71988),t(33094),t(20304),t(31821),t(12791),t(63761),t(14113);var c=t(13259)}}]);