@arcgis/core 4.30.0-next.20240212 → 4.30.0-next.20240213

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 (69) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +1 -0
  3. package/assets/esri/core/workers/chunks/0d54451c740f54a59f49.js +1 -0
  4. package/assets/esri/core/workers/chunks/18551a7eb5a9b88aa0dc.js +1 -0
  5. package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +1 -0
  6. package/assets/esri/core/workers/chunks/{3f4d63436c3de04a6ebb.js → 254b4ee3621bbe345bb1.js} +1 -1
  7. package/assets/esri/core/workers/chunks/2d682ee6e5d66f2ea5cd.js +1 -0
  8. package/assets/esri/core/workers/chunks/{d5484d470121de2b403b.js → 36d091be859bbb1a149b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/50b41f91be903a0977f9.js +1 -0
  10. package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +1 -0
  11. package/assets/esri/core/workers/chunks/784b6a8216b97440b180.js +1 -0
  12. package/assets/esri/core/workers/chunks/{7f7a4de2cd4ab71b9aee.js → 8d119dc0a92ad3612daa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{0014635097a32ad38895.js → a854611d1a86b838c6ad.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{50a5abd75fa7dbb571a5.js → ccd53b81c2688dd11584.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{b2b8e6a0b3f70ada2799.js → e4da908079417cc2f495.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{af0314c2b5b7dc4f5bbd.js → e6dbf0a7b7b1cf64f23f.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{eba72ff1726ff6998204.js → f03d62ab7806b68d0b62.js} +1 -1
  18. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  19. package/geometry/Mesh.js +1 -1
  20. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  21. package/interfaces.d.ts +172 -14
  22. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  23. package/layers/SceneLayer.js +1 -1
  24. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  25. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  26. package/package.json +2 -2
  27. package/portal/support/resourceUtils.js +1 -1
  28. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  29. package/rest/support/meshFeatureSet.js +1 -1
  30. package/support/revision.js +1 -1
  31. package/symbols/cim/constants.js +1 -1
  32. package/symbols/support/previewSymbol2D.js +1 -1
  33. package/versionManagement/support/versionManagementUtils.js +1 -1
  34. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  35. package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
  36. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  37. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  38. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  40. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  41. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
  42. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  43. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  44. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  45. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  46. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  47. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  48. package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
  49. package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
  50. package/views/3d/layers/I3SMeshView3D.js +1 -1
  51. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  52. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  53. package/views/draw/DrawOperation.js +1 -1
  54. package/views/draw/support/Box.js +1 -1
  55. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  56. package/views/support/automaticLengthMeasurementUtils.js +1 -1
  57. package/views/support/extentUtils.js +5 -0
  58. package/widgets/BasemapLayerList.js +1 -1
  59. package/widgets/FeatureForm.js +1 -1
  60. package/widgets/LayerList.js +1 -1
  61. package/widgets/TableList.js +1 -1
  62. package/assets/esri/core/workers/chunks/062629a9b4695dea8bf8.js +0 -1
  63. package/assets/esri/core/workers/chunks/37803888bd9a537481a7.js +0 -1
  64. package/assets/esri/core/workers/chunks/5bfc5ffad705aaaafcd4.js +0 -1
  65. package/assets/esri/core/workers/chunks/655f4560fb36a0d9ff0b.js +0 -1
  66. package/assets/esri/core/workers/chunks/b927b655e955abe00d48.js +0 -1
  67. package/assets/esri/core/workers/chunks/bd2d64a5cd8e7a39c235.js +0 -1
  68. package/assets/esri/core/workers/chunks/d2417d179d015f1193a1.js +0 -1
  69. package/assets/esri/core/workers/chunks/f75ec599f53c66cab194.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{getActionIcon as l,getActionStyles as a}from"../support/actions/actionUtils.js";import r from"./Widget.js";import{minDragEnabledItems as c,minFilterItems as d,getLayerType as m,sortableRoot as p}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as g}from"./support/decorators/messageBundle.js";import{vmEvent as b}from"./support/decorators/vmEvent.js";import{tsx as f}from"./support/jsxFactory.js";import{css as _}from"./TableList/css.js";import I from"./TableList/ListItem.js";import v from"./TableList/TableListViewModel.js";import y from"./TableList/TableListVisibleElements.js";import{getItem as w,sortTablesToIds as E}from"./TableList/support/tableListUtils.js";const C=t.ofType(I),F="table";let L=class extends r{constructor(e,t){super(e,t),this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon=null,this.iconClass=_.widgetIcon,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=d,this.selectedItems=new C,this.selectionMode="none",this.viewModel=new v,this.visibleElements=new y,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,n=w(e);if(!n?.sortable)return!1;const l=w(t),a=m(t),r=w(i),c=m(i),d=!!a&&!!c&&a===c,p={selected:n,from:l,to:r};return t.group&&i.group&&"function"==typeof s?s.call(null,p):d},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:n}=e;if(!o||!i||t?.newIndex===n&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e;const l=Array.from(o.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));E(this.map?.tables,l)}}loadDependencies(){return u({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get multipleSelectionEnabled(){return i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),"multiple"===this.selectionMode}set multipleSelectionEnabled(e){i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),this.selectionMode=e?"multiple":this.selectionEnabled?"single":"none"}get selectionEnabled(){return i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),"none"!==this.selectionMode&&this.dragEnabled}set selectionEnabled(e){i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),this.dragEnabled=e,this.selectionMode=e?this.multipleSelectionEnabled?"multiple":"single":"none"}get tableItems(){return this.viewModel.tableItems}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[h.hidden]:"loading"===e,[h.disabled]:"disabled"===e},i=this.tableItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)));return f("div",{class:this.classes(_.base,h.widget,h.panel,t)},i?.length?this._renderItems(i):this._renderNoItems())}_renderNoItemsMessage(){return f("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return f("div",{class:_.itemMessage,key:"esri-layer-list__no-items"},f("calcite-notice",{icon:"information",kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(e){return e?.toArray().filter((({panel:e})=>e?.open&&!e.disabled&&e.flowEnabled)).map((({title:e,panel:t})=>{const i=()=>this._handlePanelFlowItemBack(t);return f("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:e,heading:t.title,headingLevel:this.headingLevel,key:`flow-panel-${t.uid}`,onCalciteFlowItemBack:e=>{e.preventDefault(),i()}},t.render(),f("calcite-button",{appearance:"transparent",onclick:i,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_renderItems(e){const{visible:t,collapsed:i,visibleElements:{closeButton:o,collapseButton:s,heading:n,flow:l},_dragEnabled:a,_filterEnabled:r,selectionMode:c,messages:d,filterPlaceholder:m,filterText:u}=this,h=[f("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:o,closed:!t,collapsed:i,collapsible:s,heading:n?d.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",onCalciteFlowItemClose:()=>this.visible=!1},f("calcite-list",{canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":F,dragEnabled:a,filterEnabled:r,filterPlaceholder:m,filterText:u,group:p,key:"root-list",label:d.widgetLabel,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.target?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e))),e?.length&&r?f("div",{class:_.filterNoResults,slot:"filter-no-results"},f("calcite-notice",{kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(e)];return t?l?f("calcite-flow",{key:"root-flow"},h):h:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItemMessage(e){return e.error?f("div",{class:_.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},f("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},f("div",{slot:"message"},this.messages.tableError))):null}_renderItem(e){const{_selectedDragItemLayerUid:t,selectionMode:i,selectedItems:o,messages:s}=this,n=e.title||s.untitledTable,l=this._filterActions(e.actionsSections),a=this._countActions(l);return f("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:_.item,"data-item":e,dragDisabled:!e.sortable,dragSelected:e.layer.uid===t,id:e.layer?.uid,key:`list-item-${e.layer.uid}`,metadata:{title:n},selected:"none"!==i&&o.includes(e),title:n,value:e.layer?.uid,onCalciteListItemDragHandleChange:t=>this._handleCalciteListItemDragHandleChange(t,e)},f("div",{class:_.itemContent,slot:"content"},n),this._renderItemStatus(e),this._renderItemTemporaryIcon(e),this._renderItemMessage(e),this._renderPanel(e.panel),this._renderPanelAction(e.panel),a>1?this._renderActionsSections(e,l):1===a?this._renderAction({item:e,action:this._getSingleActionButton(l),textEnabled:!1}):null)}_renderItemTemporaryIcon(e){return this.visibleElements.temporaryTableIndicators&&!e.layer.persistenceEnabled?f("calcite-icon",{class:_.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"actions-start",title:this.messages.temporary}):null}_renderItemStatus(e){const{visibleElements:t}=this;if(!t.statusIndicators)return null;const{publishing:i}=e;return f("calcite-icon",{class:this.classes({[_.statusIndicator]:!0,[_.publishing]:i}),icon:"stop-square",key:"layer-item-status",scale:"s",slot:"actions-end"})}_renderPanel(e){return!e?.open||e.disabled||e.flowEnabled?null:f("div",{class:_.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}_renderPanelAction(e){if(!e?.visible)return null;const{open:t,title:i,disabled:o}=e;return f("calcite-action",{active:t,appearance:"transparent",disabled:o,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}_renderActionsSections(e,t){return f("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:this.messagesCommon.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:t=>e.actionsOpen=t.target.open},f("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:this.messagesCommon.options,title:this.messagesCommon.options}),t.toArray().map(((t,i)=>this._renderActionSection(e,t,i))))}_renderActionSection(e,t,i){return f("calcite-action-group",{key:`action-section-${i}`},t.toArray().map((t=>this._renderAction({item:e,action:t,textEnabled:!0}))))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o="image"in e?e.image:void 0,s={[_.itemActionIcon]:!!t,[_.itemActionImage]:!!o};return t&&(s[t]=!0),o||t?f("span",{"aria-hidden":"true",class:this.classes(_.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderAction(e){const{item:t,action:i,textEnabled:o}=e,{active:s,disabled:n,title:a,type:r,indicator:c}=i;return f("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent",disabled:n,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:s,onclick:()=>this._triggerAction(t,i),scale:"s",slot:o?void 0:"actions-end",text:a??"",textEnabled:o,title:a??void 0},this._renderFallbackIcon(i))}_filterActions(e){return e.map((e=>e.filter((e=>e.visible))))}_getSingleActionButton(e){return e.reduce((e=>e)).filter((e=>e&&"button"===e.type)).at(0)}_countActions(e){return e.reduce(((e,t)=>e+t.length),0)}_focusSelectedDragEl(e,t){this._selectedDragItemLayerUid===t.layer.uid&&requestAnimationFrame((()=>e?.setFocus()))}_handleCalciteListItemDragHandleChange(e,t){e.stopPropagation();const i=e.target.dragSelected;this._selectedDragItemLayerUid=i?t.layer.uid:null}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map((e=>w(e))).filter(Boolean);i.removeAll(),i.addMany(o)}_togglePanel(e){e.open=!e.open,e.open&&(this._focusPanelFlowItem=!0)}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.triggerAction(t,e))}};e([s()],L.prototype,"_focusRootFlowItem",void 0),e([s()],L.prototype,"_focusPanelFlowItem",void 0),e([s()],L.prototype,"_dragEnabled",null),e([s()],L.prototype,"_filterEnabled",null),e([s()],L.prototype,"collapsed",void 0),e([s()],L.prototype,"dragEnabled",void 0),e([s()],L.prototype,"filterPlaceholder",void 0),e([s()],L.prototype,"filterText",void 0),e([s()],L.prototype,"headingLevel",void 0),e([s()],L.prototype,"icon",void 0),e([s()],L.prototype,"iconClass",void 0),e([s()],L.prototype,"label",null),e([s()],L.prototype,"listItemCanGiveFunction",void 0),e([s()],L.prototype,"listItemCanReceiveFunction",void 0),e([s()],L.prototype,"listItemCreatedFunction",null),e([s()],L.prototype,"map",null),e([s(),g("esri/widgets/TableList/t9n/TableList")],L.prototype,"messages",void 0),e([s(),g("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([s()],L.prototype,"minDragEnabledItems",void 0),e([s()],L.prototype,"minFilterItems",void 0),e([s()],L.prototype,"multipleSelectionEnabled",null),e([s()],L.prototype,"selectionEnabled",null),e([s()],L.prototype,"selectedItems",void 0),e([s()],L.prototype,"selectionMode",void 0),e([s({readOnly:!0})],L.prototype,"tableItems",null),e([b("trigger-action"),s({type:v})],L.prototype,"viewModel",void 0),e([s({type:y,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=e([n("esri.widgets.TableList")],L);const M=L;export{M as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{getActionIcon as l,getActionStyles as a}from"../support/actions/actionUtils.js";import r from"./Widget.js";import{minDragEnabledItems as c,minFilterItems as d,getLayerType as m,sortableRoot as p}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as g}from"./support/decorators/messageBundle.js";import{vmEvent as b}from"./support/decorators/vmEvent.js";import{tsx as f}from"./support/jsxFactory.js";import{css as _}from"./TableList/css.js";import I from"./TableList/ListItem.js";import v from"./TableList/TableListViewModel.js";import y from"./TableList/TableListVisibleElements.js";import{getItem as w,sortTablesToIds as E}from"./TableList/support/tableListUtils.js";const C=t.ofType(I),F="table";let L=class extends r{constructor(e,t){super(e,t),this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon=null,this.iconClass=_.widgetIcon,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=d,this.selectedItems=new C,this.selectionMode="none",this.viewModel=new v,this.visibleElements=new y,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,n=w(e);if(!n?.sortable)return!1;const l=w(t),a=m(t),r=w(i),c=m(i),d=!!a&&!!c&&a===c,p={selected:n,from:l,to:r};return t.group&&i.group&&"function"==typeof s?s.call(null,p):d},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:n}=e;if(!o||!i||t?.newIndex===n&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e;const l=Array.from(o.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));E(this.map?.tables,l)}}loadDependencies(){return u({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get multipleSelectionEnabled(){return i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),"multiple"===this.selectionMode}set multipleSelectionEnabled(e){i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),this.selectionMode=e?"multiple":this.selectionEnabled?"single":"none"}get selectionEnabled(){return i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),"none"!==this.selectionMode&&this.dragEnabled}set selectionEnabled(e){i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),this.dragEnabled=e,this.selectionMode=e?this.multipleSelectionEnabled?"multiple":"single":"none"}get tableItems(){return this.viewModel.tableItems}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[h.hidden]:"loading"===e,[h.disabled]:"disabled"===e},i=this.tableItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)));return f("div",{class:this.classes(_.base,h.widget,h.panel,t)},i?.length?this._renderItems(i):this._renderNoItems())}_renderNoItemsMessage(){return f("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return f("div",{class:_.itemMessage,key:"esri-layer-list__no-items"},f("calcite-notice",{icon:"information",kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(e){return e?.toArray().filter((({panel:e})=>e?.open&&!e.disabled&&e.flowEnabled)).map((({title:e,panel:t})=>{const i=()=>this._handlePanelFlowItemBack(t);return f("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:e,heading:t.title,headingLevel:this.headingLevel,key:`flow-panel-${t.uid}`,onCalciteFlowItemBack:e=>{e.preventDefault(),i()}},t.render(),f("calcite-button",{appearance:"transparent",onclick:i,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_renderItems(e){const{visible:t,collapsed:i,visibleElements:{closeButton:o,collapseButton:s,heading:n,flow:l},_dragEnabled:a,_filterEnabled:r,selectionMode:c,messages:d,filterPlaceholder:m,filterText:u}=this,h=[f("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:o,closed:!t,collapsed:i,collapsible:s,heading:n?d.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",onCalciteFlowItemClose:()=>this.visible=!1},f("calcite-list",{canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":F,dragEnabled:a,filterEnabled:r,filterPlaceholder:m,filterText:u,group:p,key:"root-list",label:d.widgetLabel,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.target?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e))),e?.length&&r?f("div",{class:_.filterNoResults,slot:"filter-no-results"},f("calcite-notice",{kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(e)];return t?l?f("calcite-flow",{key:"root-flow"},h):h:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItemMessage(e){return e.error?f("div",{class:_.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},f("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},f("div",{slot:"message"},this.messages.tableError))):null}_renderItem(e){const{_selectedDragItemLayerUid:t,selectionMode:i,selectedItems:o,messages:s}=this,n=e.title||s.untitledTable,l=this._filterActions(e.actionsSections),a=this._countActions(l);return f("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:_.item,"data-item":e,dragDisabled:!e.sortable,dragSelected:e.layer.uid===t,id:e.layer?.uid,key:`list-item-${e.layer.uid}`,label:n,metadata:{title:n},selected:"none"!==i&&o.includes(e),title:n,value:e.layer?.uid,onCalciteListItemDragHandleChange:t=>this._handleCalciteListItemDragHandleChange(t,e)},f("div",{class:_.itemContent,slot:"content"},n),this._renderItemStatus(e),this._renderItemTemporaryIcon(e),this._renderItemMessage(e),this._renderPanel(e.panel),this._renderPanelAction(e.panel),a>1?this._renderActionsSections(e,l):1===a?this._renderAction({item:e,action:this._getSingleActionButton(l),textEnabled:!1}):null)}_renderItemTemporaryIcon(e){return this.visibleElements.temporaryTableIndicators&&!e.layer.persistenceEnabled?f("calcite-icon",{class:_.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"actions-start",title:this.messages.temporary}):null}_renderItemStatus(e){const{visibleElements:t}=this;if(!t.statusIndicators)return null;const{publishing:i}=e;return f("calcite-icon",{class:this.classes({[_.statusIndicator]:!0,[_.publishing]:i}),icon:"stop-square",key:"layer-item-status",scale:"s",slot:"actions-end"})}_renderPanel(e){return!e?.open||e.disabled||e.flowEnabled?null:f("div",{class:_.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}_renderPanelAction(e){if(!e?.visible)return null;const{open:t,title:i,disabled:o}=e;return f("calcite-action",{active:t,appearance:"transparent",disabled:o,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}_renderActionsSections(e,t){return f("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:this.messagesCommon.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:t=>e.actionsOpen=t.target.open},f("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:this.messagesCommon.options,title:this.messagesCommon.options}),t.toArray().map(((t,i)=>this._renderActionSection(e,t,i))))}_renderActionSection(e,t,i){return f("calcite-action-group",{key:`action-section-${i}`},t.toArray().map((t=>this._renderAction({item:e,action:t,textEnabled:!0}))))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o="image"in e?e.image:void 0,s={[_.itemActionIcon]:!!t,[_.itemActionImage]:!!o};return t&&(s[t]=!0),o||t?f("span",{"aria-hidden":"true",class:this.classes(_.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderAction(e){const{item:t,action:i,textEnabled:o}=e,{active:s,disabled:n,title:a,type:r,indicator:c}=i;return f("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent",disabled:n,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:s,onclick:()=>this._triggerAction(t,i),scale:"s",slot:o?void 0:"actions-end",text:a??"",textEnabled:o,title:a??void 0},this._renderFallbackIcon(i))}_filterActions(e){return e.map((e=>e.filter((e=>e.visible))))}_getSingleActionButton(e){return e.reduce((e=>e)).filter((e=>e&&"button"===e.type)).at(0)}_countActions(e){return e.reduce(((e,t)=>e+t.length),0)}_focusSelectedDragEl(e,t){this._selectedDragItemLayerUid===t.layer.uid&&requestAnimationFrame((()=>e?.setFocus()))}_handleCalciteListItemDragHandleChange(e,t){e.stopPropagation();const i=e.target.dragSelected;this._selectedDragItemLayerUid=i?t.layer.uid:null}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map((e=>w(e))).filter(Boolean);i.removeAll(),i.addMany(o)}_togglePanel(e){e.open=!e.open,e.open&&(this._focusPanelFlowItem=!0)}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.triggerAction(t,e))}};e([s()],L.prototype,"_focusRootFlowItem",void 0),e([s()],L.prototype,"_focusPanelFlowItem",void 0),e([s()],L.prototype,"_dragEnabled",null),e([s()],L.prototype,"_filterEnabled",null),e([s()],L.prototype,"collapsed",void 0),e([s()],L.prototype,"dragEnabled",void 0),e([s()],L.prototype,"filterPlaceholder",void 0),e([s()],L.prototype,"filterText",void 0),e([s()],L.prototype,"headingLevel",void 0),e([s()],L.prototype,"icon",void 0),e([s()],L.prototype,"iconClass",void 0),e([s()],L.prototype,"label",null),e([s()],L.prototype,"listItemCanGiveFunction",void 0),e([s()],L.prototype,"listItemCanReceiveFunction",void 0),e([s()],L.prototype,"listItemCreatedFunction",null),e([s()],L.prototype,"map",null),e([s(),g("esri/widgets/TableList/t9n/TableList")],L.prototype,"messages",void 0),e([s(),g("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([s()],L.prototype,"minDragEnabledItems",void 0),e([s()],L.prototype,"minFilterItems",void 0),e([s()],L.prototype,"multipleSelectionEnabled",null),e([s()],L.prototype,"selectionEnabled",null),e([s()],L.prototype,"selectedItems",void 0),e([s()],L.prototype,"selectionMode",void 0),e([s({readOnly:!0})],L.prototype,"tableItems",null),e([b("trigger-action"),s({type:v})],L.prototype,"viewModel",void 0),e([s({type:y,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=e([n("esri.widgets.TableList")],L);const M=L;export{M as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[712,8648],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var i=r(41948),s=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),c=r(12552),d=r(4736);let u=class extends((0,s.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.G)(d.e,{nonNullable:!0})],u.prototype,"unit",void 0),(0,i._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,i._)([(0,c.c)("esri.TimeInterval")],u);const p=u},22156:(e,t,r)=>{r.d(t,{MR:()=>o,qm:()=>a});var i=r(41948),s=r(12552);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.c)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.c)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.c)("esri.core.Identifiable")],l)},77380:(e,t,r)=>{r.d(t,{I:()=>f,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function c(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function d(e,t,r,i,s,n,o){return c(t&r|~t&i,e,t,s,n,o)}function u(e,t,r,i,s,n,o){return c(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return c(t^r^i,e,t,s,n,o)}function y(e,t,r,i,s,n,o){return c(r^(t|~i),e,t,s,n,o)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,c=s,h=n;r=d(r,i,s,n,e[t],7,-680876936),n=d(n,r,i,s,e[t+1],12,-389564586),s=d(s,n,r,i,e[t+2],17,606105819),i=d(i,s,n,r,e[t+3],22,-1044525330),r=d(r,i,s,n,e[t+4],7,-176418897),n=d(n,r,i,s,e[t+5],12,1200080426),s=d(s,n,r,i,e[t+6],17,-1473231341),i=d(i,s,n,r,e[t+7],22,-45705983),r=d(r,i,s,n,e[t+8],7,1770035416),n=d(n,r,i,s,e[t+9],12,-1958414417),s=d(s,n,r,i,e[t+10],17,-42063),i=d(i,s,n,r,e[t+11],22,-1990404162),r=d(r,i,s,n,e[t+12],7,1804603682),n=d(n,r,i,s,e[t+13],12,-40341101),s=d(s,n,r,i,e[t+14],17,-1502002290),i=d(i,s,n,r,e[t+15],22,1236535329),r=u(r,i,s,n,e[t+1],5,-165796510),n=u(n,r,i,s,e[t+6],9,-1069501632),s=u(s,n,r,i,e[t+11],14,643717713),i=u(i,s,n,r,e[t],20,-373897302),r=u(r,i,s,n,e[t+5],5,-701558691),n=u(n,r,i,s,e[t+10],9,38016083),s=u(s,n,r,i,e[t+15],14,-660478335),i=u(i,s,n,r,e[t+4],20,-405537848),r=u(r,i,s,n,e[t+9],5,568446438),n=u(n,r,i,s,e[t+14],9,-1019803690),s=u(s,n,r,i,e[t+3],14,-187363961),i=u(i,s,n,r,e[t+8],20,1163531501),r=u(r,i,s,n,e[t+13],5,-1444681467),n=u(n,r,i,s,e[t+2],9,-51403784),s=u(s,n,r,i,e[t+7],14,1735328473),i=u(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=y(r,i,s,n,e[t],6,-198630844),n=y(n,r,i,s,e[t+7],10,1126891415),s=y(s,n,r,i,e[t+14],15,-1416354905),i=y(i,s,n,r,e[t+5],21,-57434055),r=y(r,i,s,n,e[t+12],6,1700485571),n=y(n,r,i,s,e[t+3],10,-1894986606),s=y(s,n,r,i,e[t+10],15,-1051523),i=y(i,s,n,r,e[t+1],21,-2054922799),r=y(r,i,s,n,e[t+8],6,1873313359),n=y(n,r,i,s,e[t+15],10,-30611744),s=y(s,n,r,i,e[t+6],15,-1560198380),i=y(i,s,n,r,e[t+13],21,1309151649),r=y(r,i,s,n,e[t+4],6,-145523070),n=y(n,r,i,s,e[t+11],10,-1120210379),s=y(s,n,r,i,e[t+2],15,718787259),i=y(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,c),n=o(n,h)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=h(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},90636:(e,t,r)=>{r.d(t,{O:()=>y});var i=r(20744),s=r(77380),n=r(4644),o=r(28176),a=r(63564),l=r(44296),c=r(71448),d=r(1580),u=r(73960),p=r(91952);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.EF)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const d=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,p.t)(d,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),g=i.type!==String&&(!(0,n.w)(this)||l?.origin&&this.originIdOf(r)>(0,c.CQ)(l.origin)),w={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&y&&!(0,o.ic)(y)?g&&e?.contentAddressed?h(w):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),c=m(s,r,t),d=(0,u.e)(c),p=(0,o.wt)(l.path),y=i?.compress??!1;d===p?(t.resources&&f({...e,resource:l,content:c,compress:y,updates:t.resources.toUpdate}),n[a]=r):h(e)}(w):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(w):l?.portalItem&&(null==y||null!=(0,p.i)(y)||(0,o.ue)(y)||g)?h(w):s[a]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,d.aq)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:n,context:l,dest:c,targetPropertyName:d}=e;if(!l.portalItem)return;const y=(0,p.p)(t),h=m(n,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${d}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const g=r?.contentAddressed&&"json"===h.type?(0,s.I)(h.jsonString):y?.filename??(0,a.g1)(),w=(0,o.kn)(r?.prefix??y?.prefix,g),v=`${w}.${(0,u.e)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((({resource:e})=>e.path===v))??l.resources.toAdd.find((({resource:e})=>e.path===v));if(e)return void(c[d]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(v);(0,o.ue)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.SW)(t).then((e=>{b.path=`${w}.${(0,u.e)({type:"blob",blob:e})}`,c[d]=b.itemRelativeUrl})).catch((()=>{})));const q=r?.compress??!1;l.resources&&f({...e,resource:b,content:h,compress:q,updates:l.resources.toAdd}),c[d]=b.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},63564:(e,t,r)=>{r.d(t,{Mr:()=>o,cf:()=>n,g1:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>v});var i,s=r(41948),n=r(92400),o=r(14628),a=r(40504),l=r(24296),c=r(69504),d=r(1580),u=(r(9456),r(66360),r(33600)),p=r(12552),y=r(18996);const h=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=h.jsonValues.slice();(0,n.sH)(f,"orthometric");const m=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new c.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.oG)(e)||m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new c.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.qq)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,y.G)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,u.E)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,d.qq)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,u.E)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,u.E)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,d.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,u.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,p.c)("esri.geometry.HeightModelInfo")],g);const v=g},81436:(e,t,r)=>{r.d(t,{c:()=>v});var i=r(41948),s=(r(60708),r(2600)),n=r(20744),o=r(77860),a=r(22156),l=r(95800),c=r(66360),d=r(10860),u=r(28176),p=r(1580),y=(r(9456),r(72052),r(12552)),h=r(6220),f=r(95247),m=r(56156);let g=0,w=class extends(o.c.EventedMixin((0,a.MR)(l.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.c(-180,-90,180,90,m.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",s=r&&r.portal&&r.portal.url||h.default.portalUrl;throw c.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.mA)(e)||c.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.qq)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.qq)({type:f.c})],w.prototype,"fullExtent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,p.qq)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,p.qq)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,p.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,p.qq)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,p.qq)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,p.qq)({type:m.c})],w.prototype,"spatialReference",void 0),(0,i._)([(0,p.qq)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,p.qq)()],w.prototype,"url",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,y.c)("esri.layers.Layer")],w);const v=w},3688:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Fe});var i=r(41948),s=r(6444),n=r(82692),o=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),a=r(2600),l=r(3856),c=r(2952),d=r(20744),u=r(66360),p=r(26496),y=r(10860),h=r(57896),f=r(28176),m=r(1580),g=(r(9456),r(72052),r(20916)),w=r(33600),v=r(12552),b=r(71448),q=r(94716),I=r(67776),_=r(81436),S=r(4040),F=r(38724),x=r(16660),j=r(28584),E=r(6576),L=r(66576),O=r(98768),A=r(3116),R=r(87072),T=r(6828),U=r(48212),P=r(50420),M=r(36088),D=r(21488),C=r(70388),N=r(66464),G=r(17968),$=r(81732),k=r(16424),V=r(564),H=r(44104),Q=r(4048),J=r(6168),W=r(34880),B=r(24144),K=r(83928),z=r(40504);let Z=class extends z.am{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"name",void 0),(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"field",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"currentRangeExtent",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"fullRangeExtent",void 0),(0,i._)([(0,m.qq)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],Z.prototype,"type",void 0),Z=(0,i._)([(0,v.c)("esri.layers.support.RangeInfo")],Z);var Y,X=r(62088),ee=r(90636),te=r(69504),re=r(7488),ie=r(60074);let se=Y=class extends((0,z.Ib)(c.c.ofType(re.c))){constructor(e){super(e)}clone(){return new Y(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,ie.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new re.c;(0,ie.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new Y;return e.forEach((e=>r.add(re.c.fromJSON(e,t)))),r}};se=Y=(0,i._)([(0,v.c)("esri.layers.support.PolygonCollection")],se);const ne=se;var oe,ae=r(91952);let le=oe=class extends z.am{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ne,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.du))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ne.fromJSON(e,r):this._geometriesSource={url:(0,ae.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.c)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ne.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new oe({geometries:(0,X.ct)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,m.qq)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],le.prototype,"spatialRelationship",void 0),(0,i._)([(0,m.qq)({type:ne,nonNullable:!0,json:{write:!0}}),(0,ee.O)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],le.prototype,"geometries",void 0),(0,i._)([(0,w.E)(["web-scene","portal-item"],"geometries")],le.prototype,"readGeometries",null),le=oe=(0,i._)([(0,v.c)("esri.layers.support.SceneFilter")],le);const ce=le;var de=r(97824),ue=r(95776),pe=r(69204),ye=r(56672),he=r(65548);async function fe(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(me(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function me(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(4831),r.e(9752)]).then(r.bind(r,79752)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then((t=>new File([t],e.filename)));r&&n.push(r)})),Promise.all(n)}var ge=r(74776),we=r(63680),ve=r(9332);const be=new Set(["3DObject","Point"]),qe=(0,$.l)();let Ie=class extends((0,T.c)((0,E.CE)((0,R.G6)((0,x.u)((0,L.Y)((0,O.K)((0,A.I)((0,p.U)((0,j.G)((0,F.C)((0,l.q)(_.c)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new c.c,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new k.c(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:H.yq.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,C.ig)(this.associatedLayer)}get geometryType(){return Se[this.profile]||"mesh"}set renderer(e){(0,V.Gi)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:M.u;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:c,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:p,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:w}}=e,v=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D&&(0,ye.g1)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:u,supportsZ:l,supportsM:c,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:p&&v,supportsAdd:b&&y&&v,supportsDelete:b&&f&&v,supportsUpdate:h&&v,supportsAsyncConvert3D:w}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(u.c.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.CE),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await(0,de.M)(this,{origin:"service"},t),(0,V.Gi)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.c.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ue.c;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,V.k7)(this.fieldsIndex,await(0,we.W_)(this,(0,we.M$)(this)));return(0,ge.cx)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.c("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.c;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.c.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,he.Ap)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.c("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new d.c("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new d.c("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.kn)(this.parsedUrl.path,e.href);return(0,a.c)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new d.c("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(R.UJ.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(R.UJ.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(387).then(r.bind(r,62768));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.c(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.c(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,U.Wq)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,C.wl)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=e=>{throw u.c.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new d.c("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>(0,Q.kD)(this.infoFor3D,t)?e+1:e),0);0===s&&r(new S.Su),s>1&&r(new S.Ev);const n=t?.location??new I.c({x:0,y:0,z:0,spatialReference:this.spatialReference}),o=q.c.createWithExternalSource(n,i),[a]=await this.uploadAssets([o],t);return a}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await fe(e)).filter((e=>(0,Q.sz)(t,e))):e}validateLayer(e){if(e.layerType&&!be.has(e.layerType))throw new d.c("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.c("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.c("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.c("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,g.m6)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===b.sT.SERVICE||n===b.sT.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ye.g1)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,U.Wq)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,g.m6)(this).setAtOrigin("fullExtent",r.clone(),b.sT.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,P.S)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await K.q.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,y.mA)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.Eq)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.c.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.c.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,pe.A$)(u.c.getLogger(this),(0,pe.ay)("Mesh scene layers","relative-to-scene",e)),(0,pe.A$)(u.c.getLogger(this),(0,pe.W8)("Scene layers",e))}};(0,i._)([(0,m.qq)({types:{key:"type",base:N.E,typeMap:{selection:G.c}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Ie.prototype,"featureReduction",void 0),(0,i._)([(0,m.qq)({type:[Z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Ie.prototype,"rangeInfos",void 0),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"associatedLayer",void 0),(0,i._)([(0,m.qq)({type:["show","hide"]})],Ie.prototype,"listMode",void 0),(0,i._)([(0,m.qq)({type:["ArcGISSceneServiceLayer"]})],Ie.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.qq)({json:{read:!1},readOnly:!0})],Ie.prototype,"type",void 0),(0,i._)([(0,m.qq)({...qe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"fields",void 0),(0,i._)([(0,m.qq)()],Ie.prototype,"types",null),(0,i._)([(0,m.qq)()],Ie.prototype,"typeIdField",null),(0,i._)([(0,m.qq)()],Ie.prototype,"templates",null),(0,i._)([(0,m.qq)()],Ie.prototype,"formTemplate",null),(0,i._)([(0,m.qq)({readOnly:!0,clonable:!1})],Ie.prototype,"fieldsIndex",null),(0,i._)([(0,m.qq)({type:B.c,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ie.prototype,"floorInfo",void 0),(0,i._)([(0,m.qq)(qe.outFields)],Ie.prototype,"outFields",void 0),(0,i._)([(0,m.qq)({type:H.yq,readOnly:!0,json:{read:!1}})],Ie.prototype,"nodePages",void 0),(0,i._)([(0,w.E)("service","nodePages",["nodePages","pointNodePages"])],Ie.prototype,"readNodePages",null),(0,i._)([(0,m.qq)({type:[H.a],readOnly:!0})],Ie.prototype,"materialDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.G4],readOnly:!0})],Ie.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.iK],readOnly:!0})],Ie.prototype,"geometryDefinitions",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"statisticsInfo",void 0),(0,i._)([(0,m.qq)({type:c.c.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ie.prototype,"excludeObjectIds",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ie.prototype,"definitionExpression",void 0),(0,i._)([(0,m.qq)({type:ce,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ie.prototype,"filter",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ie.prototype,"path",void 0),(0,i._)([(0,m.qq)(D.Kg)],Ie.prototype,"elevationInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"effectiveCapabilities",null),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,m.qq)({type:String})],Ie.prototype,"geometryType",null),(0,i._)([(0,m.qq)(D.Wu)],Ie.prototype,"labelsVisible",void 0),(0,i._)([(0,m.qq)({type:[J.c],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W.E},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Ie.prototype,"labelingInfo",void 0),(0,i._)([(0,m.qq)(D.Uj)],Ie.prototype,"legendEnabled",void 0),(0,i._)([(0,m.qq)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ve.u)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ie.prototype,"opacity",void 0),(0,i._)([(0,m.qq)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"priority",void 0),(0,i._)([(0,m.qq)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"semantic",void 0),(0,i._)([(0,m.qq)({types:o.Q,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ie.prototype,"renderer",null),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,w.E)("service","cachedDrawingInfo")],Ie.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"capabilities",null),(0,i._)([(0,m.qq)({type:Boolean,json:{read:!1}})],Ie.prototype,"editingEnabled",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"infoFor3D",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"relationships",null),(0,i._)([(0,m.qq)(D.Ou)],Ie.prototype,"popupEnabled",void 0),(0,i._)([(0,m.qq)({type:n.c,json:{name:"popupInfo",write:!0}})],Ie.prototype,"popupTemplate",void 0),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"defaultPopupTemplate",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"objectIdField",void 0),(0,i._)([(0,w.E)("service","objectIdField",["objectIdField","fields"])],Ie.prototype,"readObjectIdField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"globalIdField",void 0),(0,i._)([(0,w.E)("service","globalIdField",["globalIdField","fields"])],Ie.prototype,"readGlobalIdField",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{read:!1}})],Ie.prototype,"displayField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"profile",void 0),(0,i._)([(0,w.E)("service","profile",["store.profile"])],Ie.prototype,"readProfile",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ie.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,m.qq)(D.Q9)],Ie.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,m.qq)({json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"serviceItemId",void 0),Ie=(0,i._)([(0,v.c)("esri.layers.SceneLayer")],Ie);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Se={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},Fe=Ie},4040:(e,t,r)=>{r.d(t,{AQ:()=>u,Av:()=>d,Ev:()=>m,KY:()=>o,Qr:()=>l,Su:()=>f,a:()=>a,iq:()=>h,kQ:()=>p,kz:()=>c,q8:()=>y});var i=r(20744);const s="upload-assets",n=()=>new Error;class o extends i.c{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.c{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.c{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class c extends i.c{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class d extends i.c{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class u extends i.c{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class p extends i.c{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class y extends i.c{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class h extends i.c{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.c{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends i.c{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},6576:(e,t,r)=>{r.d(t,{CE:()=>m,iC:()=>y,mK:()=>d});var i=r(41948),s=r(77860),n=r(62088),o=r(10860),a=(r(66360),r(9456),r(20744),r(12552)),l=r(73184);const c=new s.c.EventEmitter;function d(e,t,r=null,i=!1){const s=(0,o.qG)();return i=null==t||i,c.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const u="esri.layers.mixins.EditBusLayer",p=Symbol(u);function y(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.k5.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,c=null!=r&&null!=this.layerId&&r===this.layerId,d=h(this),u=h(this)&&f(t,i,this.gdbVersion);if(!a||d&&!u||!c&&!s)return;const p=o.then((e=>{if(c&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.ct)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:i,deletes:s}=t.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)};return this.emit("edits",o),o}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.oK)(t,i)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=h(this),o=h(this)&&f(t,r,this.gdbVersion),a=h(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return c.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return c.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,r=(0,i._)([(0,a.c)(u)],r),r}},3116:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(41948),s=r(1580),n=(r(9456),r(66360),r(72052),r(12552));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66464:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(41948),s=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));let a=class extends s.am{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.qq)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.c)("esri.layers.support.FeatureReduction")],a)},17968:(e,t,r)=>{r.d(t,{c:()=>c});var i,s=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(66464);let l=i=class extends a.E{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.qq)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.c)("esri.layers.support.FeatureReductionSelection")],l);const c=l},99336:(e,t,r)=>{r.d(t,{c:()=>f});var i=r(41948),s=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),c=(r(9456),r(66360),r(72052),r(33600)),d=r(12552),u=r(18996),p=r(28484);function y(e,t){return n.c.fromJSON({value:e,unit:t})}let h=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.c({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,l.qq)({type:s.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,c.E)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.G)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.qq)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,c.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.G)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,l.qq)((0,p.SM)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,d.c)("esri.layers.support.TimeInfo")],h);const f=h},70388:(e,t,r)=>{r.d(t,{wj:()=>v,cV:()=>I,ig:()=>N,i:()=>$,cJ:()=>T,WC:()=>S,oh:()=>C,s1:()=>F,sD:()=>w,wl:()=>V,yo:()=>R,gx:()=>k,Q1:()=>x,iq:()=>L,YL:()=>E,W2:()=>j,ms:()=>O,UN:()=>A,Y9:()=>U,qY:()=>P,Ce:()=>M,kd:()=>q,Wm:()=>_});var i=r(47620),s=r(17988),n=r(40196),o=r(20744),a=r(14628),l=r(44247),c=r(64408),d=r(95776);async function u(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const i=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),s=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let n=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==n?n=o:n.features=n.features.concat(o.features),n.exceededTransferLimit=o.exceededTransferLimit,!s||!o.exceededTransferLimit)break;t.start+=i}return n}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.c.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(71068),h=r(64624),f=r(24948),m=r(19212),g=r(18648);const w=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function v(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.addAttachment)throw new o.c(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function b(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?i?s&&i[s]?Promise.resolve():Promise.reject(new o.c(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.c(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.c(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.c(r,"this layer doesn't support attachments"))}async function q(e,t,r,i,s){const n=await D(e);if(await b(e,t,s),!n.updateAttachment)throw new o.c(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function I(e,t,i){const{applyEdits:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load(),{source:o,globalIdField:a}=n;let l=i;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await V(e,t.deleteFeatures,a)}),s(n,o,t,i)}async function _(e,t,i){const{uploadAssets:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load();return s(n,n.source,t,i)}async function S(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.deleteAttachments)throw new o.c(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function F(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.c(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function x(e,t,r,i){t=m.c.from(t),await e.load();const s=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new o.c(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:c,num:d,size:u,start:p,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(a?.length>0||c?.length>0||u?.length>0||d||p||y))throw new o.c(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||c?.length||y))throw new o.c(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.c(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function j(e,t,r,i){const s=await D(e);if(!s.queryObjectIds)throw new o.c(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(d.c.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const s=await D(e);if(!s.queryFeatureCount)throw new o.c(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(d.c.from(t)??e.createQuery(),r)}async function L(e,t,r,i){const s=await D(e);if(!s.queryExtent)throw new o.c(i,"Layer source does not support queryExtent capability");return s.queryExtent(d.c.from(t)??e.createQuery(),r)}async function O(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeatures)throw new o.c(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(g.default.from(t),r)}async function A(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeaturesCount)throw new o.c(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(g.default.from(t),r)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.u)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function T(e){const t=new d.c,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:s,timeExtent:n}=e;return t.timeExtent=null!=s&&null!=n?n.offset(-s.value,s.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function U(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function P(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function M(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function D(e){return(await e.load()).source}async function C(e,t,r){const s=e.parsedUrl?.path;s&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const s=await(0,y.mK)(e,t);s&&(r=await i.id.checkSignInStatus(`${s}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(s,r)}function N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const G=(0,c.g)({types:s.IX});function $(e,t){if(e.defaultSymbol)return e.types?.length?new f.c({defaultSymbol:G(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:G(e.symbol,e,t)})))}):new h.c({symbol:G(e.defaultSymbol,e,t)})}function k(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function V(e,t,r){if(null==t)return null;const i=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[s]&&-1!==i[s]?i[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[s,r],o.cacheHint=!1;const a=await(0,n.SO)(u(e,o));if(!a.ok)return null;const l=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],i=e.attributes[s];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},81732:(e,t,r)=>{r.d(t,{l:()=>l});var i=r(9456),s=r(66360),n=r(600),o=r(16424),a=r(564);function l(){return{fields:{type:[n.c],value:null,set:function(e){if(e&&(0,i.c)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.c.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.c.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.c.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.OO)(this.fieldsIndex,e)}}}}},4048:(e,t,r)=>{r.d(t,{If:()=>a,K0:()=>c,Mn:()=>h,kD:()=>n,me:()=>o,sz:()=>s,w$:()=>l});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=u(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=c(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return p(function(e,t){const r=e.toLowerCase();return d(t).find((e=>y(e)===r))}(e,t))}function a(e,t){return p(u(e,t))}function l(e,t){return y(function(e,t){return d(t).find((t=>p(t)===e))}(e,t))}function c(e,t){return a(e.name,t)??o(e.type,t)}function d(e){return[...i,...e]}function u(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function y(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73960:(e,t,r)=>{r.d(t,{e:()=>s});var i=r(28176);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},4736:(e,t,r)=>{r.d(t,{e:()=>i});const i=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},97824:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(40196),s=r(10860),n=r(69504);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.aG)(o.populateFromStyle());if((0,s.wp)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.c("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},18648:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(41948),n=(r(60708),r(40504)),o=r(62088),a=r(1580),l=r(53368),c=r(12552),d=r(18996),u=r(88204),p=r(56156);let y=i=class extends n.am{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.ct)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:u.U,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,d.G)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:p.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,c.c)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.ey)(y);const h=y},73184:(e,t,r)=>{r.d(t,{aG:()=>i,eY:()=>o,k5:()=>s,oK:()=>a});const i=(0,r(63564).Mr)(),s=new Map,n=new Map;async function o(e,t,s=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=n.get(o)?.entries();if(a)for(const[e,n]of a)if(n.name===t){const t=!n.stack?.hasForwardEdits();if(!t&&s){const[{deleteForwardEdits:t},{default:s}]=await Promise.all([r.e(772).then(r.bind(r,70772)),r.e(2460).then(r.bind(r,22460))]);return t(o,e,new s({sessionId:i,moment:n.moment}))}return t}return!0}function a(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=n.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[572],{48952:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>o,c:()=>i,d:()=>s,e:()=>c,f:()=>u,n:()=>p,s:()=>l,t:()=>d}),r(9456);var a=r(23704);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,s=a){if(e.length/a!==Math.ceil(t.length/s))return e;const n=e.length/a,i=r[0],o=r[1],u=r[2],l=r[4],d=r[5],c=r[6],p=r[8],h=r[9],y=r[10],f=r[12],g=r[13],m=r[14];let b=0,w=0;for(let r=0;r<n;r++){const r=t[b],n=t[b+1],F=t[b+2];e[w]=i*r+l*n+p*F+f,e[w+1]=o*r+d*n+h*F+g,e[w+2]=u*r+c*n+y*F+m,b+=s,w+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void(0,a.A)().error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let g=0,m=0;for(let r=0;r<i;r++){const r=t[g],a=t[g+1],i=t[g+2];e[m]=o*r+d*a+h*i,e[m+1]=u*r+c*a+y*i,e[m+2]=l*r+p*a+f*i,g+=n,m+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t,r,a=3,s=a){const n=e.length/a;if(n!==Math.ceil(t.length/s))return e;let i=0,o=0;for(let u=0;u<n;u++)e[o]=t[i]+r[0],e[o+1]=t[i+1]+r[1],e[o+2]=t[i+2]+r[2],i+=s,o+=a;return e}function c(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:c,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s,translate:d},Symbol.toStringTag,{value:"Module"}))},51232:(e,t,r)=>{r.d(t,{c:()=>d});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552);let l=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,a._)([(0,o.G)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,a._)([(0,u.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const d=l},13708:(e,t,r)=>{r.d(t,{c:()=>c});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),l=r(62484);let d=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="local",this.origin=(0,l.Su)()}};(0,a._)([(0,o.G)({local:"local"},{readOnly:!0})],d.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"origin",void 0),d=(0,a._)([(0,u.c)("esri.geometry.support.MeshLocalVertexSpace")],d);const c=d},23704:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(66360);const s=()=>a.c.getLogger("esri.views.3d.support.buffer.math")},54264:(e,t,r)=>{r.d(t,{CT:()=>b,Ki:()=>m,Si:()=>o,Ud:()=>l,_o:()=>f,ai:()=>u,mK:()=>w,v_:()=>y});var a=r(2600),s=r(92400),n=r(10860),i=r(4048);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.wp)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.c)(this.partUrl,{responseType:"blob"});return(0,n.wp)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>g(e,t)))}return g(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function g(e,t){return e instanceof o&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,i.K0)(e,t):(0,i.me)(e.assetMimeType,t)??(0,i.If)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},21136:(e,t,r)=>{r.d(t,{Al:()=>h,k$:()=>c,mA:()=>p,wX:()=>d});var a=r(26832),s=r(66360),n=r(67776),i=r(51232),o=r(13708),u=r(48952);function l(){return s.c.getLogger("esri.geometry.Mesh")}function d(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,a=r.clone(),s=new i.c({origin:[a.x,a.y,a.z]}),n=e.cloneWithVertexSpace(s),{position:o}=n.vertexAttributes;return n.vertexAttributes.position=(0,u.t)(new Float64Array(o.length),o,[-a.x,-a.y,-(a.z??0)]),n.vertexAttributesChanged(),n}function c(e){return null!=e.origin}function p(e,t){if(!c(e))return null;const[r,a,s]=e.origin;return new n.c({x:r,y:a,z:s,spatialReference:t})}function h(e,t){const{x:r,y:s,z:n,spatialReference:u}=e,d=[r,s,n??0];if(void 0!==t?.geographic){if((0,a.O2)(l(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new o.c({origin:d}):new i.c({origin:d});l().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return u.isGeographic||u.isWebMercator?new o.c({origin:d}):new i.c({origin:d});switch(t.vertexSpace){case"local":return new o.c({origin:d});case"georeferenced":return new i.c({origin:d});case"georeferenced-absolute":return new i.c}}},13136:(e,t,r)=>{r.d(t,{u:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},62768:(e,t,r)=>{r.d(t,{applyEdits:()=>S,cV:()=>b,cd:()=>F,uploadAssets:()=>E});var a=r(6444),s=r(2952),n=r(20744),i=r(62088),o=r(66360),u=r(10860),l=r(28176),d=r(63564),c=r(20480),p=r(6576),h=r(564),y=r(4048),f=r(71068);function g(e){return null!=e?.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(m)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const c="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??c;if((0,p.iC)(e)&&e.url)l=(0,p.mK)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.qG)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,a){if(await e.load(),!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.UX)(e))throw new n.c(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.kZ)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.c(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.c(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.c(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.c(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.c(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.c.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.c(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.c.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.c(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.c(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.c(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(q),a.updateFeatures=a.updateFeatures.map(q),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,g=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.c(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.cf)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,g))),p.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.kZ)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.c(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,g))),p.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,g))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.me)("model/gltf-binary",r.supportedFormats)??(0,y.If)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.c(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])O(t)&&s.push(t);for(const t of e.updateFeatures??[])O(t)&&s.push(t)}(p,e),{edits:await I(p),options:c}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.ct),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.mS)(r,a))throw new n.c(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.c(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.c(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if("georeferenced"===r.vertexSpace.type)throw new n.c(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.c(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.nV)(a.data);if(e&&!e.isBase64)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,c.WW)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function q(e){const t=new a.c;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function O(e){return"mesh"===e?.geometry?.type}function E(e,t,r,a){if(!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.c(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},50572:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var a=r(41948),s=(r(60708),r(47620)),n=r(2600),i=r(25228),o=r(92400),u=r(20744),l=r(9456),d=r(14628),c=r(95800),p=r(66360),h=r(58820),y=r(10860),f=r(28176),g=r(63564),m=r(1580),b=r(12552),w=r(95247),F=r(21136),S=r(54264),A=r(6444),v=r(24296),R=r(60074),I=r(6704),q=r(62768);async function O(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,R.initializeProjection)(i,u);const l=(0,R.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d="georeferenced"===l.type?1:(0,v.eg)(i)/(0,v.eg)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function E(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>x(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>x(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function x(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.em)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function _(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.c("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function M(e,t){return new A.c({attributes:e.attributes,geometry:(0,I.h4)({...e.geometry,spatialReference:t})})}function T(e,t){return{adds:e?.adds?.map((e=>M(e,t)))||[],updates:e?.updates?.map((e=>({original:M(e[0],t),current:M(e[1],t)})))||[],deletes:e?.deletes?.map((e=>M(e,t)))||[],spatialReference:t}}var $=r(17724),C=r(95468),N=r(48212),k=r(70388),U=r(4048),B=r(99944),L=r(49624),D=r(95776),j=r(73184),G=r(56156);const Q=new d.O({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),J=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),P=new d.O({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let V=class extends c.c{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Cu)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.c)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new C.c({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return _((await(0,n.c)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,k.oh)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return _((await(0,n.c)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=r.infoFor3D,i=null!=a,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>O(this.layer,e,a)))??[],c=(await Promise.all(d)).filter(o.G6),p=e.updateFeatures?.map((e=>O(this.layer,e,a)))??[],h=(await Promise.all(p)).filter(o.G6),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,q.cd)(t))return t.map((e=>e.globalId));if((0,q.cV)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,u);(0,L.W)(c,h,r.spatialReference);const f=await E(this.layer,e),g=r.capabilities.editing.supportsAsyncApplyEdits&&i,m=t?.gdbVersion||r.gdbVersion,b={gdbVersion:m,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:g};await(0,j.eY)(this.layer.url,m,!0);const w=(0,j.oK)(this.layer.url,m||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:c,updates:h,deletes:y,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=Q.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=c.length?JSON.stringify(c):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=j.aG);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let A;try{A=g?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.c)(S+"/applyEdits",F)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;F.authMode="immediate",A=g?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.c)(S+"/applyEdits",F)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(A)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.c)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.c)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,c=u||l;return{id:o,fullExtent:c&&w.c.fromJSON(c),timeExtent:d&&i.c.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,N.Wq)(this.layer.url))return"unavailable";const e=(0,f.kn)(this.layer.url,"status"),t=await(0,n.c)(e,{query:{f:"json"}});return P.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(9920).then(r.bind(r,59920));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.c)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.c)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.c)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.iV)(z)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.c)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.c)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!J.has(r))throw new u.c("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,$.w7)(e.geometryType).renderer;(0,h.qQ)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.c)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.CE)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if((0,F.k$)(r))a.push(t);else{const r=(0,F.wX)(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){p.c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.mK)??i[0],{vertexSpace:l}=e,d="georeferenced"===l.type?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,g.cf)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):p.c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(_)??[],updateFeatureResults:e?.updateResults?.map(_)??[],deleteFeatureResults:e?.deleteResults?.map(_)??[],addAttachmentResults:r?.addResults?r.addResults.map(_):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(_):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(_):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new G.c(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:T(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.c("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,U.Mn)(a);if(null==n)return e;const i=(0,f.kn)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.G6);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=a,h=new D.c;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,B.c)(i,h),{features:g}=y;return 0===g.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=g.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,m.qq)()],V.prototype,"type",void 0),(0,a._)([(0,m.qq)({constructOnly:!0})],V.prototype,"layer",void 0),(0,a._)([(0,m.qq)({readOnly:!0})],V.prototype,"queryTask",null),V=(0,a._)([(0,b.c)("esri.layers.graphics.sources.FeatureLayerSource")],V);const z=1e3,H=V},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>d,QD:()=>c,w7:()=>o});var a=r(9456),s=r(62088),n=r(13136),i=r(9504);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.qe:"esriGeometryPolyline"===e?i.MZ:i.yq}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8240],{38240:(e,t,s)=>{s.d(t,{CW:()=>d,EN:()=>p,addOrUpdateResources:()=>c,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>l});var r=s(2600),o=s(20744),a=s(28176);async function n(e,t={},s){await e.load(s);const r=(0,a.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:c="asc",sortField:l="created"}=t,u={query:{start:o,num:n,sortOrder:c,sortField:l,token:e.apiKey},signal:s?.signal},i=await e.portal.request(r,u);return{total:i.total,nextStart:i.nextStart,resources:i.resources.map((({created:t,size:s,resource:r})=>({created:new Date(t),size:s,resource:e.resourceFromPath(r)})))}}async function c(e,t,s,r){const n=new Map;for(const{resource:e,content:r,compress:a,access:c}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${s}:invalid-path`,"Resource does not have a valid path");const[t,l]=i(e.path),u=`${t}/${a??""}/${c??""}`;n.has(u)||n.set(u,{prefix:t,compress:a,access:c,files:[]}),n.get(u).files.push({fileName:l,content:r})}await e.load(r);const c=(0,a.kn)(e.userItemUrl,"add"===s?"addResources":"updateResources");for(const{prefix:t,compress:s,access:o,files:a}of n.values()){const n=25;for(let l=0;l<a.length;l+=n){const u=a.slice(l,l+n),i=new FormData;t&&"."!==t&&i.append("resourcesPrefix",t),s&&i.append("compress","true"),o&&i.append("access",o);let p=0;for(const{fileName:e,content:t}of u)i.append("file"+ ++p,t,e);i.append("f","json"),await e.portal.request(c,{method:"post",body:i,signal:r?.signal})}}}async function l(e,t,s){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(s);const r=(0,a.kn)(e.userItemUrl,"removeResources");await e.portal.request(r,{method:"post",query:{resource:t.path},signal:s?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const s=(0,a.kn)(e.userItemUrl,"removeResources");return e.portal.request(s,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function i(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,r.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[s,,r]=function(e){const[t,s]=function(e){const t=(0,a.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[r,o]=i(t);return[r,o,s]}(e.path);return e.portalItem.resourceFromPath((0,a.kn)(s,t+r))}}}]);