@arcgis/core 4.29.0-next.20240221 → 4.29.0

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 (52) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0bc21d2a0b65bd4e9d76.js +1 -0
  3. package/assets/esri/core/workers/chunks/{6e50220f8e2d392e2855.js → 5b275309d78453a9319e.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{6fd8047741a0df006ddd.js → 69f6558b538d1b2d3086.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{63c2ca47e8df5e9b5574.js → 87fb028c66de06bf6d75.js} +1 -1
  6. package/assets/esri/core/workers/chunks/9307d485a9e5f9fa77d1.js +1 -0
  7. package/assets/esri/core/workers/chunks/{958402a4f6dd0d23546d.js → a4c3da057ec2a07bbbe8.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{48c6a9ed53cf4f9255b0.js → b454c6b992bcdbab36a8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{e7b26c7e9e24dc6255be.js → cacf97b0a7a1057b9f79.js} +1 -1
  10. package/config.js +1 -1
  11. package/copyright.txt +56 -28
  12. package/geometry/support/meshUtils/rotate.js +1 -1
  13. package/interfaces.d.ts +8 -8
  14. package/kernel.js +1 -1
  15. package/layers/orientedImagery/core/CameraOrientation.js +1 -1
  16. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  17. package/layers/orientedImagery/transformations/imageToWorld.js +5 -0
  18. package/layers/orientedImagery/transformations/updateElevation.js +5 -0
  19. package/layers/orientedImagery/transformations/updateElevationUtils.js +5 -0
  20. package/layers/orientedImagery/transformations/utils.js +1 -1
  21. package/layers/orientedImagery/transformations/worldToImage.js +5 -0
  22. package/layers/support/EditingCapabilities.js +1 -1
  23. package/layers/support/LayerContingentValuesCache.js +1 -1
  24. package/layers/support/editableLayers.js +1 -1
  25. package/package.json +1 -1
  26. package/rest/print.js +1 -1
  27. package/smartMapping/renderers/pieChart.js +1 -1
  28. package/support/elevationInfoUtils.js +1 -1
  29. package/support/revision.js +1 -1
  30. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  31. package/views/3d/interactive/Manipulator3D.js +1 -1
  32. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  33. package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
  34. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  35. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  36. package/views/3d/terrain/OverlayRenderer.js +1 -1
  37. package/views/layers/support/editableLayerViews.js +5 -0
  38. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  39. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  40. package/widgets/Editor/EditorViewModel.js +1 -1
  41. package/widgets/Editor/support/EditorEditingCapabilities.js +1 -1
  42. package/widgets/Editor/support/EditorItem.js +1 -1
  43. package/widgets/Editor.js +1 -1
  44. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  45. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  46. package/widgets/FeatureForm.js +1 -1
  47. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  48. package/widgets/OrientedImageryViewer.js +1 -1
  49. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  50. package/widgets/UtilityNetworkTrace.js +1 -1
  51. package/assets/esri/core/workers/chunks/25f73748df0ee82d06cb.js +0 -1
  52. package/assets/esri/core/workers/chunks/2d7a18f8c540269ecee9.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.29/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,when as s}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import l from"../layers/support/CodedValueDomain.js";import o from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as c}from"./support/legacyIcon.js";import{storeNode as d}from"./support/widgetUtils.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{vmEvent as u}from"./support/decorators/vmEvent.js";import{tsx as p}from"./support/jsxFactory.js";import g from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as m}from"./UtilityNetworkTrace/support/GraphicHandler.js";const _="esri-utility-trace-network",w={base:_,widgetIcon:c.polyline,loaderContainer:`${_}__loader-container`,loader:`${_}__loader`,fadeIn:`${_}--fade-in`,addButtonContainer:`${_}__add-button-container`,noticeContainer:`${_}__notice-container`,listContainer:`${_}__list-container`,resultsContainer:`${_}__results-container`,flow:`${_}__flow`,numberInput:`${_}__number-input`,clearPrompt:`${_}__reset-prompt`,promptDivider:`${_}__divider`,paddingTop:`${_}__padTop`},v="esri.widgets.UtilityNetworkTrace";function b(e){return{height:e+"px"}}function y(e){return{width:e+"px"}}function f(){return{width:"75%"}}function T(){return{textAlign:"center",padding:"1rem"}}function S(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function R(){return{height:"100%"}}function C(e){return{display:"flex",flexDirection:e}}function A(e){return e instanceof l}const F={noExtension:-2147208474};let k=class extends o{constructor(e,t){super(e,t),this._tracesExists=!0,this._selectToolActive=!1,this._activeTrace=null,this._activeSwatch="",this._traceHeaderForFlow="",this._assetGroupHeader="",this._assetTypeHeader="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this._activeTab="input",this._flagViewType="starting-point",this._alertRemoveModal=!1,this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoStartAssetFound=!1,this._warningNoBarrierAssetFound=!1,this._warningNoTerminal=!1,this._confirmReset=!1,this._showResultOptions=!1,this._resultObjectIdField="objectid",this._resultDisplayField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._swatchNode=null,this._individualResultNode=null,this._symbolStartFlag=null,this._symbolBarrier=null,this._watchHandler=null,this._loadUNError=!0,this._errorMessage="",this.disabled=!0,this.iconClass=w.widgetIcon,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new g,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles(t((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())))}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return this.viewModel.gdbVersion}set gdbVersion(e){this.viewModel.gdbVersion=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1;const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this.switchTab("result"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStart":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){const{state:e}=this.viewModel;this._mixCustomStrings(),this._overrideFlagSymbol();const t="loading"===e?this._renderLoading():this._renderUtilityNetworkTrace();return p("div",{class:this.classes(w.base,n.widget,n.panel,{[n.widgetDisabled]:this.disabled}),styles:R()},t)}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad.js"),block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox.js"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.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"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),option:()=>import("@esri/calcite-components/dist/components/calcite-option.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover.js"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim.js"),select:()=>import("@esri/calcite-components/dist/components/calcite-select.js"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab.js"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav.js"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title.js"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}switchTab(e){this._activeTab=e}switchToFunctions(e,t){this._traceResultsFunctions=e,this._showTraceResultFunctions=t}switchToAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._showTraceResultAssetGroup=s}switchToAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._showTraceResultAssetType=s}switchToIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._showIndividualRecords=s}_renderLoading(){return p("div",{class:w.loaderContainer,key:"loader"},p("div",{class:w.loader}))}_renderUtilityNetworkTrace(){const{messages:e,messagesCommon:t}=this;let s=p("calcite-tabs",{layout:"center",position:"top",styles:S(this.container)},p("calcite-tab-nav",{slot:"title-group"},p("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},e.inputsStrings.headerTabInputs),p("calcite-tab-title",{onclick:()=>{this.switchTab("result")},selected:"result"===this._activeTab},e.resultsStrings.headerTabResults)),p("calcite-tab",{selected:"input"===this._activeTab},this._renderInputPanel()),p("calcite-tab",{selected:"result"===this._activeTab},this.viewModel._activeProgress?p("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"}):this.viewModel.traceResults.length>0?this._renderResultPanel():this._renderWarningMessage("noTraceExecuted",!1),this._confirmReset?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.resultsStrings.startOverButton),p("div",{slot:"content"},e.resultsStrings.startOverValidation),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok)))):null));return this._tracesExists||(s=p("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUNError||(s=p("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),s}_renderInputPanel(){const{messages:e}=this;return p("calcite-flow",{class:w.flow},p("calcite-flow-item",null,this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?p("div",{styles:b(10)}):null,p("calcite-button",{kind:"brand",onclick:()=>{this.checkCanTrace()},scale:"m",slot:"footer",width:"full"},e.tracingStrings.runTrace)),this._selectToolActive?this._renderActiveTool():null)}_renderResultPanel(){return p("calcite-flow",{styles:R()},this._renderTraceResults(),this._showTraceResultFunctions?this._renderTraceResultFunctions():null,this._showTraceResultAssetGroup?this._renderTraceResultByAssetGroup():null,this._showTraceResultAssetType?this._renderTraceResultByAssetType():null,this._showIndividualRecords?this._renderTraceResultIndividual():null,this._showIndividualRecords?this._renderTraceResultIndividualPopover():null)}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"pin",scale:"s"})),p("div",null,e.inputsStrings.startingPointHint),p("div",{class:w.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="starting-point",this._selectToolActive=!0,this._warningNoStartAssetFound=!1,this.viewModel.addFlagByHit("starting-point",this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:this._warningNoStartAssetFound=!0,this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!1,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"x-circle-f",scale:"s"})),p("div",null,e.inputsStrings.barrierPointHint),p("div",{class:w.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",kind:"brand",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="barrier",this._selectToolActive=!0,this._warningNoBarrierAssetFound=!1,this.viewModel.addFlagByHit("barrier",this._symbolBarrier).then((e=>{this._changeCursor("default"),e||(this._warningNoBarrierAssetFound=!0),this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let l=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(l=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(p("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),p("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},p("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),p("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}),"barrier"===e.type?p("calcite-label",{layout:"inline",scale:"s"},p("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,l?p("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.target.selectedItems.length>0?(e.selectedTerminals=[],t.target.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.target.value,e)}},r):null)}_renderActiveTool(){const{messages:e}=this;let t=null;return"starting-point"===this._flagViewType?this._symbolStartFlag&&(t=this._getSymbolIcon(this._symbolStartFlag)):this._symbolBarrier&&(t=this._getSymbolIcon(this._symbolBarrier)),p("calcite-flow-item",{heading:e.inputsStrings.addPointOption,onCalciteFlowItemBack:()=>{this.viewModel._clickHandler&&(this.viewModel._clickHandler.remove(),this.view?.popup&&(this.view.popupEnabled=!0)),this._selectToolActive=!1}},p("calcite-block",{collapsible:!1,heading:"",open:!0,overlayPositioning:"fixed"},p("div",{styles:T()},t||p("calcite-icon",{icon:"starting-point"===this._flagViewType?"pin-plus":"x-circle-f",scale:"m"})),p("div",{styles:T()},e.inputsStrings.addPointHint)))}_renderTraceSelectorContainer(){const{messages:e}=this,t=[];let s=e.tracingStrings.traceOperation,i=0;return this.viewModel._traces.length>0&&this.viewModel._traces.forEach((e=>{t.push(p("calcite-combobox-item",{key:e.globalId,selected:e.selected,textLabel:e.title,value:e.globalId,onCalciteComboboxItemChange:e=>{const t=e.target;this.viewModel.selectTraces(t.selected,t.value),this.viewModel._traces.length>0&&(this._warningNoTraceSelected=!1)}})),e.selected&&i++})),s+=` (${i})`,p("calcite-block",{collapsible:!0,heading:s,open:!0,overlayPositioning:"fixed"},p("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),p("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple"},t))}_renderStartOverContainer(){const{messages:e}=this;return p("calcite-button",{kind:"brand",onclick:()=>{this.confirmReset()},scale:"m",slot:"footer",width:"full"},e.resultsStrings.startOverButton)}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,l=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,l=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,l=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,l=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",l=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,l=s||""}return p("div",{class:w.noticeContainer,key:e},p("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>{switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1}}},p("div",{slot:"title"},r),p("div",{slot:"message"},l)))}_renderRemoveTraceContainer(e){const{messages:t}=this;return p("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,l=[],o=new RegExp(`^${e.hex}$`,"i"),a=r.highlightColor.length>m.length?5:4;for(const n of r.highlightColor)l.push(p("calcite-action",{active:o.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},p("calcite-color-picker-swatch",{active:o.test(n.hex),color:n.hex,scale:"s"})));return p("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},p("calcite-action-group",{columns:a,layout:"grid"},l))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let l=[],o=[],a=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(o=t.results.globalFunctionResults,o.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(l=t.results.elements,l.length>0&&(a=!0)),(n||a)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(p("calcite-block",{collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),p("calcite-list",null,c?p("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFunctions(o,!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,a&&this.viewModel.showSelectionAttributes?p("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+l.length+")",onCalciteListItemSelect:()=>{this.switchToAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+l.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?p("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),a?p("div",{class:w.paddingTop},p("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},p("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"m"}),this.viewModel.showSelectionAttributes?s:`${s} (${l.length})`)):null,n?p("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="aggGeom_"+i}},p("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||a)?p("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},p("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},p("calcite-input-number",{afterCreate:this._afterComponentCreate,class:w.numberInput,max:999999,maxLength:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.target;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,p("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(p("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),p("calcite-flow-item",{key:"traceResults",styles:R()},r,this._renderStartOverContainer(),this._alertRemoveModal?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.globalStrings.clearResults),p("div",{slot:"content"},e.alertsStrings.clearResultsAlert),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1)},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceResultFunctions(){const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),p("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",onCalciteFlowItemBack:()=>{this.switchToFunctions([],!1)}},s,this._renderStartOverContainer())}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return p("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",onCalciteFlowItemBack:()=>{this.switchToAssetGroup([],"",!1)}},p("calcite-list",null,t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return p("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",onCalciteFlowItemBack:()=>{this.switchToAssetType([],"",!1)}},p("calcite-list",{selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(p("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return p("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToIndividualRecords([],"",!1)}},p("calcite-action",{afterCreate:d,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},scale:"m",slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),p("calcite-list",{selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(p("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(p("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(p("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(p("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),p("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?y(.75*this.domNode.clientWidth):f()},p("calcite-block",{heading:"",open:!0,overlayPositioning:"fixed"},p("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,p("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.target;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),p("calcite-label",{scale:"s"},e.resultsStrings.sortBy,p("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.target;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderResultRowFunctions(e){return p("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToIndividualRecords(i,t+" ("+e.length+")",!0)}else this.switchToIndividualRecords(e,t+" ("+e.length+")",!0)}))}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this,s=`display-${e.objectId}-nso`,{nonSpatialObject:i,zoomToFeature:r}=t.globalStrings;let l="",o=null;if(o=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===o?.type){l=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())l=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())l=this._getAssetTypeName(e);else if(o?.domain&&A(o.domain)){const t=o.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));l=t?.name}else l=e.details?.attributes[this._resultDisplayField]??e.objectId;return l&&""!==l&&null!==l?"string"==typeof l&&(l.trim()||(l=t.resultsStrings.noValue)):l=t.resultsStrings.noValue,null!==e?.details?.geometry?p("calcite-list-item",{label:l,onCalciteListItemSelect:()=>{this.viewModel.zoomToAsset(e.details.geometry)}},p("calcite-icon",{icon:"zoom-to-object",scale:"s",slot:"content-end",textLabel:r})):p("calcite-list-item",{label:l},p("calcite-icon",{icon:"table",id:s,scale:"s",slot:"content-end",textLabel:i}),p("calcite-tooltip",{label:i,referenceElement:s},p("span",null,i)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_utilityNetworkTraceInitialized(){return this.viewModel.loadUtilityNetwork().then((e=>{if(e)return this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel._traces.length<=0&&(this._tracesExists=!1),this.viewModel.flags.length>0&&this._processFlagOnLoad(),this.view?.when().then((()=>{this._watchViewState()}));this._tracesExists=!1,this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUNError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw.extendedCode===F.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=s((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([t((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),t((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_compare(e,t){return(s,i)=>{let r=0,l=s.details?.attributes[e]??s.objectId,o=i.details?.attributes[e]??i.objectId;return isNaN(l)&&(l=l.toLowerCase()),isNaN(o)&&(o=o.toLowerCase()),"desc"===t?l>o?r=1:l<o&&(r=-1):l<o?r=1:l>o&&(r=-1),r}}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_getSymbolIcon(e){return"picture-marker"===e.type?p("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_watchViewState(){this._watchHandler=s((()=>!this.view?.updating),(()=>{this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}),{initial:!0})}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}};e([i()],k.prototype,"_tracesExists",void 0),e([i()],k.prototype,"_selectToolActive",void 0),e([i()],k.prototype,"_activeTrace",void 0),e([i()],k.prototype,"_activeSwatch",void 0),e([i()],k.prototype,"_traceHeaderForFlow",void 0),e([i()],k.prototype,"_assetGroupHeader",void 0),e([i()],k.prototype,"_assetTypeHeader",void 0),e([i()],k.prototype,"_traceResultsFunctions",void 0),e([i()],k.prototype,"_traceResultsAssetGroup",void 0),e([i()],k.prototype,"_traceResultsAssetType",void 0),e([i()],k.prototype,"_traceResultsIndividual",void 0),e([i()],k.prototype,"_showTraceResultFunctions",void 0),e([i()],k.prototype,"_showTraceResultAssetGroup",void 0),e([i()],k.prototype,"_showTraceResultAssetType",void 0),e([i()],k.prototype,"_showIndividualRecords",void 0),e([i()],k.prototype,"_activeTab",void 0),e([i()],k.prototype,"_alertRemoveModal",void 0),e([i()],k.prototype,"_warningNoFlag",void 0),e([i()],k.prototype,"_warningNoTraceSelected",void 0),e([i()],k.prototype,"_confirmReset",void 0),e([i()],k.prototype,"_swatchNode",void 0),e([i()],k.prototype,"_errorMessage",void 0),e([i()],k.prototype,"defaultGraphicColor",null),e([i()],k.prototype,"disabled",void 0),e([i()],k.prototype,"flags",null),e([i()],k.prototype,"gdbVersion",null),e([i()],k.prototype,"iconClass",void 0),e([i()],k.prototype,"inputSettings",void 0),e([i()],k.prototype,"label",null),e([i(),h("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],k.prototype,"messages",void 0),e([i(),h("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([i(),h("esri/core/t9n/Units")],k.prototype,"messagesUnits",void 0),e([i()],k.prototype,"resultAreaProperties",null),e([i()],k.prototype,"selectedTraces",null),e([i()],k.prototype,"selectOnComplete",null),e([i()],k.prototype,"showGraphicsOnComplete",null),e([i()],k.prototype,"enableResultArea",null),e([i()],k.prototype,"showSelectionAttributes",null),e([i()],k.prototype,"utilityNetwork",null),e([i()],k.prototype,"view",null),e([u(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area"]),i({type:g})],k.prototype,"viewModel",void 0),k=e([r(v)],k);const M=k;export{M as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,when as s}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import l from"../layers/support/CodedValueDomain.js";import o from"./Widget.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as n}from"./support/globalCss.js";import{legacyIcon as c}from"./support/legacyIcon.js";import{storeNode as d}from"./support/widgetUtils.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{vmEvent as u}from"./support/decorators/vmEvent.js";import{tsx as p}from"./support/jsxFactory.js";import g from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as m}from"./UtilityNetworkTrace/support/GraphicHandler.js";const _="esri-utility-trace-network",w={base:_,widgetIcon:c.polyline,loaderContainer:`${_}__loader-container`,loader:`${_}__loader`,fadeIn:`${_}--fade-in`,addButtonContainer:`${_}__add-button-container`,noticeContainer:`${_}__notice-container`,listContainer:`${_}__list-container`,resultsContainer:`${_}__results-container`,flow:`${_}__flow`,numberInput:`${_}__number-input`,clearPrompt:`${_}__reset-prompt`,promptDivider:`${_}__divider`,paddingTop:`${_}__padTop`},v="esri.widgets.UtilityNetworkTrace";function b(e){return{height:e+"px"}}function y(e){return{width:e+"px"}}function f(){return{width:"75%"}}function T(){return{textAlign:"center",padding:"1rem"}}function S(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function R(){return{height:"100%"}}function C(e){return{display:"flex",flexDirection:e}}function A(e){return e instanceof l}const F={noExtension:-2147208474};let k=class extends o{constructor(e,t){super(e,t),this._selectToolActive=!1,this._activeTrace=null,this._activeSwatch="",this._traceHeaderForFlow="",this._assetGroupHeader="",this._assetTypeHeader="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this._activeTab="input",this._flagViewType="starting-point",this._alertRemoveModal=!1,this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoStartAssetFound=!1,this._warningNoBarrierAssetFound=!1,this._warningNoTerminal=!1,this._confirmReset=!1,this._showResultOptions=!1,this._resultObjectIdField="objectid",this._resultDisplayField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._swatchNode=null,this._individualResultNode=null,this._symbolStartFlag=null,this._symbolBarrier=null,this._watchHandler=null,this._loadUNError=!0,this._errorMessage="",this.disabled=!0,this.iconClass=w.widgetIcon,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new g,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles(t((()=>this.viewModel?.resultAreaProperties),(()=>this.scheduleRender())))}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get gdbVersion(){return this.viewModel.gdbVersion}set gdbVersion(e){this.viewModel.gdbVersion=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1;const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1,this.switchTab("result"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach((e=>{switch(e){case"noStart":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}}))}confirmReset(){this._confirmReset=!0}render(){const{state:e}=this.viewModel;this._mixCustomStrings(),this._overrideFlagSymbol();const t="loading"===e?this._renderWarningMessage("noTraceConfig",!1):this._renderUtilityNetworkTrace();return p("div",{class:this.classes(w.base,n.widget,n.panel,{[n.widgetDisabled]:this.disabled}),styles:R()},t)}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad.js"),block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox.js"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.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"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),option:()=>import("@esri/calcite-components/dist/components/calcite-option.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover.js"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim.js"),select:()=>import("@esri/calcite-components/dist/components/calcite-select.js"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab.js"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav.js"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title.js"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}switchTab(e){this._activeTab=e}switchToFunctions(e,t){this._traceResultsFunctions=e,this._showTraceResultFunctions=t}switchToAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._showTraceResultAssetGroup=s}switchToAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._showTraceResultAssetType=s}switchToIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._showIndividualRecords=s}_renderUtilityNetworkTrace(){const{messages:e,messagesCommon:t}=this;let s=p("calcite-tabs",{layout:"center",position:"top",styles:S(this.container)},p("calcite-tab-nav",{slot:"title-group"},p("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},e.inputsStrings.headerTabInputs),p("calcite-tab-title",{onclick:()=>{this.switchTab("result")},selected:"result"===this._activeTab},e.resultsStrings.headerTabResults)),p("calcite-tab",{selected:"input"===this._activeTab},this._renderInputPanel()),p("calcite-tab",{selected:"result"===this._activeTab},this.viewModel._activeProgress?p("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"}):this.viewModel.traceResults.length>0?this._renderResultPanel():this._renderWarningMessage("noTraceExecuted",!1),this._confirmReset?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.resultsStrings.startOverButton),p("div",{slot:"content"},e.resultsStrings.startOverValidation),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok)))):null));return 0===this.viewModel.traces.length&&(s=p("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUNError||(s=p("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),s}_renderInputPanel(){const{messages:e}=this;return p("calcite-flow",{class:w.flow},p("calcite-flow-item",null,this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?p("div",{styles:b(10)}):null,p("calcite-button",{kind:"brand",onclick:()=>{this.checkCanTrace()},scale:"m",slot:"footer",width:"full"},e.tracingStrings.runTrace)),this._selectToolActive?this._renderActiveTool():null)}_renderResultPanel(){return p("calcite-flow",{styles:R()},this._renderTraceResults(),this._showTraceResultFunctions?this._renderTraceResultFunctions():null,this._showTraceResultAssetGroup?this._renderTraceResultByAssetGroup():null,this._showTraceResultAssetType?this._renderTraceResultByAssetType():null,this._showIndividualRecords?this._renderTraceResultIndividual():null,this._showIndividualRecords?this._renderTraceResultIndividualPopover():null)}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"starting-point"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))}));let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",open:!0,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"pin",scale:"s"})),p("div",null,e.inputsStrings.startingPointHint),p("div",{class:w.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="starting-point",this._selectToolActive=!0,this._warningNoStartAssetFound=!1,this.viewModel.addFlagByHit("starting-point",this._symbolStartFlag).then((e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:this._warningNoStartAssetFound=!0,this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter((e=>"barrier"===e.type)),s.forEach((e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))}));let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),p("calcite-block",{collapsible:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",open:!1,overlayPositioning:"fixed"},p("div",{slot:"icon"},i||p("calcite-icon",{icon:"x-circle-f",scale:"s"})),p("div",null,e.inputsStrings.barrierPointHint),p("div",{class:w.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,p("div",{class:w.addButtonContainer},p("calcite-button",{alignment:"center",appearance:"outline",href:"",iconStart:"plus",kind:"brand",label:e.inputsStrings.addPointOption,onclick:()=>{this._changeCursor("crosshair"),this._flagViewType="barrier",this._selectToolActive=!0,this._warningNoBarrierAssetFound=!1,this.viewModel.addFlagByHit("barrier",this._symbolBarrier).then((e=>{this._changeCursor("default"),e||(this._warningNoBarrierAssetFound=!0),this._selectToolActive=!1}))},round:!0,scale:"m"})))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let l=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(l=!0,e.allTerminals.terminals.forEach((t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(p("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))}))),p("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},p("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),p("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}),"barrier"===e.type?p("calcite-label",{layout:"inline",scale:"s"},p("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,l?p("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.target.selectedItems.length>0?(e.selectedTerminals=[],t.target.selectedItems.forEach((t=>{this.viewModel.addTerminal(t.value,e)}))):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.target.value,e)}},r):null)}_renderActiveTool(){const{messages:e}=this;let t=null;return"starting-point"===this._flagViewType?this._symbolStartFlag&&(t=this._getSymbolIcon(this._symbolStartFlag)):this._symbolBarrier&&(t=this._getSymbolIcon(this._symbolBarrier)),p("calcite-flow-item",{heading:e.inputsStrings.addPointOption,onCalciteFlowItemBack:()=>{this.viewModel._clickHandler&&(this.viewModel._clickHandler.remove(),this.view?.popup&&(this.view.popupEnabled=!0)),this._selectToolActive=!1}},p("calcite-block",{collapsible:!1,heading:"",open:!0,overlayPositioning:"fixed"},p("div",{styles:T()},t||p("calcite-icon",{icon:"starting-point"===this._flagViewType?"pin-plus":"x-circle-f",scale:"m"})),p("div",{styles:T()},e.inputsStrings.addPointHint)))}_renderTraceSelectorContainer(){const{messages:e}=this,t=[];let s=e.tracingStrings.traceOperation,i=0;return this.viewModel.traces.length>0&&this.viewModel.traces.forEach((e=>{t.push(p("calcite-combobox-item",{key:e.globalId,selected:e.selected,textLabel:e.title,value:e.globalId,onCalciteComboboxItemChange:e=>{const t=e.target;this.viewModel.selectTraces(t.selected,t.value),this.viewModel.traces.length>0&&(this._warningNoTraceSelected=!1)}})),e.selected&&i++})),s+=` (${i})`,p("calcite-block",{collapsible:!0,heading:s,open:!0,overlayPositioning:"fixed"},p("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),p("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple"},t))}_renderStartOverContainer(){const{messages:e}=this;return p("calcite-button",{kind:"brand",onclick:()=>{this.confirmReset()},scale:"m",slot:"footer",width:"full"},e.resultsStrings.startOverButton)}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,l=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,l=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,l=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,l=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,l=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",l=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,l=s||""}return p("div",{class:w.noticeContainer,key:e},p("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>{switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1}}},p("div",{slot:"title"},r),p("div",{slot:"message"},l)))}_renderRemoveTraceContainer(e){const{messages:t}=this;return p("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,l=[],o=new RegExp(`^${e.hex}$`,"i"),a=r.highlightColor.length>m.length?5:4;for(const n of r.highlightColor)l.push(p("calcite-action",{active:o.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},p("calcite-color-picker-swatch",{active:o.test(n.hex),color:n.hex,scale:"s"})));return p("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},p("calcite-action-group",{columns:a,layout:"grid"},l))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach(((t,i)=>{let l=[],o=[],a=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(o=t.results.globalFunctionResults,o.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(l=t.results.elements,l.length>0&&(a=!0)),(n||a)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(p("calcite-block",{collapsible:!0,description:t.trace.description??"",heading:t.trace.title,key:`${t.trace.title}${i}`,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),p("calcite-list",null,c?p("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFunctions(o,!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,a&&this.viewModel.showSelectionAttributes?p("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+l.length+")",onCalciteListItemSelect:()=>{this.switchToAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+l.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?p("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),a?p("div",{class:w.paddingTop},p("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},p("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"m"}),this.viewModel.showSelectionAttributes?s:`${s} (${l.length})`)):null,n?p("calcite-block-section",{key:`aggregate-${t.trace.title}-${i}`,open:t.graphicEnabled,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="aggGeom_"+i}},p("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||a)?p("calcite-block-section",{key:`area-${t.trace.title}-${i}`,open:t.resultArea?.show,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.target.open?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.target;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},p("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),p("calcite-list",{selectionMode:"none"},p("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},p("calcite-input-number",{afterCreate:this._afterComponentCreate,class:w.numberInput,max:999999,maxLength:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.target;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,p("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(p("calcite-block",{collapsible:!1,heading:t.trace.title,key:"error-"+i,open:!0,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))})),p("calcite-flow-item",{key:"traceResults",styles:R()},r,this._renderStartOverContainer(),this._alertRemoveModal?p("calcite-scrim",{key:"prompt"},p("div",{class:w.clearPrompt},p("h3",{slot:"header"},e.globalStrings.clearResults),p("div",{slot:"content"},e.alertsStrings.clearResultsAlert),p("div",{class:w.promptDivider}),p("div",{styles:C("row")},p("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),p("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._showTraceResultFunctions=!1,this._showTraceResultAssetGroup=!1,this._showTraceResultAssetType=!1,this._showIndividualRecords=!1)},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceResultFunctions(){const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach((e=>{s.push(this._renderResultRowFunctions(e))})),p("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",onCalciteFlowItemBack:()=>{this.switchToFunctions([],!1)}},s,this._renderStartOverContainer())}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return p("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",onCalciteFlowItemBack:()=>{this.switchToAssetGroup([],"",!1)}},p("calcite-list",null,t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return p("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",onCalciteFlowItemBack:()=>{this.switchToAssetType([],"",!1)}},p("calcite-list",{selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some((({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase()))??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach((e=>{e?.details&&s.push(this._renderResultRowIndividual(e))})),0===s.length&&s.push(p("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return p("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToIndividualRecords([],"",!1)}},p("calcite-action",{afterCreate:d,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},scale:"m",slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),p("calcite-list",{selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach((({name:e,alias:t})=>{s.push(p("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(p("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))})):(s.push(p("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(p("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),p("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?y(.75*this.domNode.clientWidth):f()},p("calcite-block",{heading:"",open:!0,overlayPositioning:"fixed"},p("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,p("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.target;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),p("calcite-label",{scale:"s"},e.resultsStrings.sortBy,p("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.target;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderResultRowFunctions(e){return p("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")",!0)}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return p("calcite-list-item",{label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.viewModel.queryFeaturesById(e).then((s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToIndividualRecords(i,t+" ("+e.length+")",!0)}else this.switchToIndividualRecords(e,t+" ("+e.length+")",!0)}))}},p("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this,s=`display-${e.objectId}-nso`,{nonSpatialObject:i,zoomToFeature:r}=t.globalStrings;let l="",o=null;if(o=e?.details?.fields.find((({name:e})=>e===this._resultDisplayField)),"date"===o?.type){l=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())l=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())l=this._getAssetTypeName(e);else if(o?.domain&&A(o.domain)){const t=o.domain.codedValues.find((({code:t})=>t===e.details.attributes[this._resultDisplayField]));l=t?.name}else l=e.details?.attributes[this._resultDisplayField]??e.objectId;return l&&""!==l&&null!==l?"string"==typeof l&&(l.trim()||(l=t.resultsStrings.noValue)):l=t.resultsStrings.noValue,null!==e?.details?.geometry?p("calcite-list-item",{label:l,onCalciteListItemSelect:()=>{this.viewModel.zoomToAsset(e.details.geometry)}},p("calcite-icon",{icon:"zoom-to-object",scale:"s",slot:"content-end",textLabel:r})):p("calcite-list-item",{label:l},p("calcite-icon",{icon:"table",id:s,scale:"s",slot:"content-end",textLabel:i}),p("calcite-tooltip",{label:i,referenceElement:s},p("span",null,i)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach((t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)}))}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach((e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)}))}_utilityNetworkTraceInitialized(){return this.viewModel.loadUtilityNetwork().then((e=>{if(e)return this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&this._processFlagOnLoad(),this.view?.when().then((()=>{this._watchViewState()}));this.disabled=!1})).catch((e=>{const{messages:t}=this;this._loadUNError=!1,"utility-network:no-user-type-extension"===e.name||e.details.raw.extendedCode===F.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1}))}_processFlagOnLoad(){return this.view?.when().then((()=>{this._watchHandler=s((()=>!this.view?.updating),(async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}))}))}_registerWatchers(){this.addHandles([t((()=>this.selectedTraces),(()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()})),t((()=>this.defaultGraphicColor),(()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach((e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)})),this.scheduleRender()}))])}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_appendAttributes(e,t,s){const i=[];return e.forEach((e=>{t.forEach((t=>{t.featureSet.features.forEach((r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))}))}))})),i}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const e=i.assetGroups.find((e=>e.assetGroupCode===s));e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find((t=>t.sourceId===e.networkSourceId));if(i){const r=i.assetGroups.find((e=>e.assetGroupCode===s));if(r){const s=r.assetTypes.find((t=>t.assetTypeCode===e.assetTypeCode));s&&(t=s.assetTypeName)}}return t}_compare(e,t){return(s,i)=>{let r=0,l=s.details?.attributes[e]??s.objectId,o=i.details?.attributes[e]??i.objectId;return isNaN(l)&&(l=l.toLowerCase()),isNaN(o)&&(o=o.toLowerCase()),"desc"===t?l>o?r=1:l<o&&(r=-1):l<o?r=1:l>o&&(r=-1),r}}_groupBy(e,t){return e.reduce(((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e)),{})}_getSymbolIcon(e){return"picture-marker"===e.type?p("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_watchViewState(){this._watchHandler=s((()=>!this.view?.updating),(()=>{this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()}),{initial:!0})}_changeCursor(e="default"){const t=this.view?.container?.style;t&&(t.cursor=e)}};e([i()],k.prototype,"_selectToolActive",void 0),e([i()],k.prototype,"_activeTrace",void 0),e([i()],k.prototype,"_activeSwatch",void 0),e([i()],k.prototype,"_traceHeaderForFlow",void 0),e([i()],k.prototype,"_assetGroupHeader",void 0),e([i()],k.prototype,"_assetTypeHeader",void 0),e([i()],k.prototype,"_traceResultsFunctions",void 0),e([i()],k.prototype,"_traceResultsAssetGroup",void 0),e([i()],k.prototype,"_traceResultsAssetType",void 0),e([i()],k.prototype,"_traceResultsIndividual",void 0),e([i()],k.prototype,"_showTraceResultFunctions",void 0),e([i()],k.prototype,"_showTraceResultAssetGroup",void 0),e([i()],k.prototype,"_showTraceResultAssetType",void 0),e([i()],k.prototype,"_showIndividualRecords",void 0),e([i()],k.prototype,"_activeTab",void 0),e([i()],k.prototype,"_alertRemoveModal",void 0),e([i()],k.prototype,"_warningNoFlag",void 0),e([i()],k.prototype,"_warningNoTraceSelected",void 0),e([i()],k.prototype,"_confirmReset",void 0),e([i()],k.prototype,"_swatchNode",void 0),e([i()],k.prototype,"_errorMessage",void 0),e([i()],k.prototype,"defaultGraphicColor",null),e([i()],k.prototype,"disabled",void 0),e([i()],k.prototype,"flags",null),e([i()],k.prototype,"gdbVersion",null),e([i()],k.prototype,"iconClass",void 0),e([i()],k.prototype,"inputSettings",void 0),e([i()],k.prototype,"label",null),e([i(),h("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],k.prototype,"messages",void 0),e([i(),h("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([i(),h("esri/core/t9n/Units")],k.prototype,"messagesUnits",void 0),e([i()],k.prototype,"resultAreaProperties",null),e([i()],k.prototype,"selectedTraces",null),e([i()],k.prototype,"selectOnComplete",null),e([i()],k.prototype,"showGraphicsOnComplete",null),e([i()],k.prototype,"enableResultArea",null),e([i()],k.prototype,"showSelectionAttributes",null),e([i()],k.prototype,"utilityNetwork",null),e([i()],k.prototype,"view",null),e([u(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area"]),i({type:g})],k.prototype,"viewModel",void 0),k=e([r(v)],k);const M=k;export{M as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4716,4828],{17012:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,a=r(8528),s={exports:{}};n=s,o=function(){function e(e,r,o){o=o||2;var i,a,s,c,u,p,f,h=r&&r.length,g=h?r[0]*o:e.length,m=t(e,0,g,o,!0),y=[];if(!m||m.next===m.prev)return y;if(h&&(m=l(e,r,m,o)),e.length>80*o){i=s=e[0],a=c=e[1];for(var d=o;d<g;d+=o)(u=e[d])<i&&(i=u),(p=e[d+1])<a&&(a=p),u>s&&(s=u),p>c&&(c=p);f=0!==(f=Math.max(s-i,c-a))?1/f:0}return n(m,y,o,i,a,f),y}function t(e,t,r,n,o){var i,a;if(o===F(e,t,r,n)>0)for(i=t;i<r;i+=n)a=S(i,e[i],e[i+1],a);else for(i=r-n;i>=t;i-=n)a=S(i,e[i],e[i+1],a);if(a&&v(a,a.next)){var s=a.next;q(a),a=s}return a}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(q(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(e,t,l,c,u,p,f){if(e){!f&&p&&h(e,c,u,p);for(var g,m,y=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),q(e),e=m.next,y=m.next;else if((e=m)===y){f?1===f?n(e=a(r(e),t,l),t,l,c,u,p,2):2===f&&s(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(y(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,a=e.next;if(x(o,i,a)>=0)return!1;for(var s=o.x<i.x?o.x<a.x?o.x:a.x:i.x<a.x?i.x:a.x,l=o.y<i.y?o.y<a.y?o.y:a.y:i.y<a.y?i.y:a.y,c=o.x>i.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,u=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,p=g(s,l,t,r,n),f=g(c,u,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=p&&m&&m.z<=f;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=p;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function a(e,t,n){var o=e;do{var i=o.prev,a=o.next.next;!v(i,a)&&w(i,o,o.next,a)&&_(i,a)&&_(a,i)&&(t.push(i.i/n),t.push(o.i/n),t.push(a.i/n),q(o),q(o.next),o=e=a),o=o.next}while(o!==e);return r(o)}function s(e,t,o,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&d(l,c)){var u=T(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,a,s),void n(u,t,o,i,a,s)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var a,s,l,u=[];for(a=0,s=n.length;a<s;a++)(l=t(e,n[a]*i,a<s-1?n[a+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),a=0;a<u.length;a++)o=r(o=p(u[a],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===a)return r;var l,c=r,u=r.x,p=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&y(i<p?o:a,i,u,p,i<p?a:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),_(n,e)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=T(n,e),i=r(n,n.next);let a=u(o);return r(a,a.next),i=u(i),u(t===n?i:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,n,o,i,a,s){return(o-a)*(t-s)-(e-a)*(i-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function d(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=b(x(e,t,r)),i=b(x(e,t,n)),a=b(x(r,n,e)),s=b(x(r,n,t));return o!==i&&a!==s||!(0!==o||!A(e,r,t))||!(0!==i||!A(e,n,t))||!(0!==a||!A(r,e,n))||!(0!==s||!A(r,t,n))}function A(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function T(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function S(e,t,r,n){var o=new M(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function q(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(e,t,r,n){for(var o=0,i=t,a=r-n;i<r;i+=n)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,a=Math.abs(F(e,0,i,r));if(o)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;a-=Math.abs(F(e,c,u,r))}var p=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;p+=Math.abs((e[f]-e[g])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[g+1]-e[f+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)r.vertices.push(e[o][i][a]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,a.g)(s.exports)},63316:(e,t,r)=>{r.d(t,{AD:()=>p,wV:()=>u});var n=r(2600),o=r(20744),i=r(10860),a=r(28176),s=r(49416);let l=null,c=!0;function u(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,r)}catch(e){c=!1}const o=function(e,t,r){return r||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),r=l),r.getContext("2d").createImageData(e,t)}(t,r,n);return o.data.set(e,0),o}async function p(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const r=(0,a.nV)(e);if(r?.isBase64)return{arrayBuffer:(0,s.K)(r.data),mediaType:r.mediaType};const o=await(0,n.c)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:n}=await r.e(8560).then(r.bind(r,68560));if(e(l))return n(l,t)}if(u){const{isAnimatedPNG:e,parseApng:n}=await r.e(4464).then(r.bind(r,84464));if(e(l))return n(l,t)}return async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,n.c)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,i.mA)(e))throw new o.c("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([l],{type:c}),t)}},94716:(e,t,r)=>{r.d(t,{c:()=>Ze});var n=r(41948),o=r(26832),i=r(20744),a=r(95800),s=r(66360),l=r(94804),c=r(10860),u=r(57896),p=r(1580),f=(r(9456),r(72052),r(12552)),h=r(62484),g=r(95247),m=r(50853),y=r(67776),d=r(7488),x=r(66952),v=r(43912);const w="Expected location to be a Point instance";class A extends i.c{constructor(){super("invalid-input:location",w)}}var b=r(51232),_=r(13708),T=r(41104),S=r(60003),q=r(21136),M=r(17012),F=r(82315),R=r(47452),C=r(15688),L=r(97143),j=r(77080),I=(r(60708),r(53648)),P=r(24296),k=r(98472),N=r(58632);r(89560),r(74376),r(71520),r(4636);const O=(0,N.Su)();function U(e,t,r,n,o,i,a){o*=3;for(let s=0;s<i;++s){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=a?i[2]:0,t+=r}return o/3}function E(e,t,r){if(t){const t=function(e,t,r){const n=function(e,t,r,n){const o=(e=>!Array.isArray(e[0]))(t)?(e,r)=>t[3*e+r]:(e,r)=>t[e][r],i=n?(0,P.k8)(n)/(0,P.gl)(n):1;return(0,N.XX)(e,((e,t)=>(0,k.s)(e,o(t,0)*i,o(t,1)*i,o(t,2))),r)}(O,e,t,r)?(0,N.Oq)(O):[0,0,1];return Math.abs(n[2])>Math.cos((0,I.EF)(80))?F.k.Z:Math.abs(n[1])>Math.abs(n[0])?F.k.Y:F.k.X}(e,e.length-1,r);if(t===F.k.X)return!(0,R.K_)(e,F.k.Y,F.k.Z);if(t===F.k.Y)return!(0,R.K_)(e,F.k.X,F.k.Z)}return!(0,R.K_)(e,F.k.X,F.k.Y)}var W,D;(D=W||(W={}))[D.NONE=0]="NONE",D[D.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=r(77048),$=r(54828);let G=null;function Z(e){if(0===e.length)return z.UN;const t=(0,z.Su)([Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY]);return(0,z.qe)(t,e),t}function B(e,t){const[r,n,o,i,a,s]=Z(e);return new g.c({xmin:r,ymin:n,zmin:o,xmax:i,ymax:a,zmax:s,spatialReference:t})}var Y=r(93184),H=r(71488);const V="esri.geometry.support.meshUtils.centerAt";const K=(0,h.Su)(),X=(0,h.Su)(),Q=(0,h.Su)();var J=r(28176);function ee(e){const t=(0,J.iu)(e.url);return r=>{const n=(0,J.SU)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function te(e){return se.fromBlob(e,le(e.name,e.type))}const re=/^model\/gltf\+json$/,ne=/^model\/gltf-binary$/,oe=/\.gltf$/i,ie=/\.glb$/i;function ae(e){const t=new Map;let r,n=null;for(const{name:o,mimeType:i,source:a}of e)null===n&&(re.test(i)||oe.test(o)?(n=a.url,r="gltf"):(ne.test(i)||ie.test(o))&&(n=a.url,r="glb")),t.set(o,a.url),a.files.forEach(((e,r)=>t.set(r,e)));if(null==n)throw new i.c("mesh-load-external:missing-files","Missing files to load external mesh source");return new se(n,(()=>e.forEach((({source:e})=>e.dispose()))),t,r)}class se{constructor(e,t=(()=>{}),r=new Map,n){this.url=e,this.dispose=t,this.files=r,this.type=n}static fromBlob(e,t){const r=URL.createObjectURL(e);return new se(r,(()=>URL.revokeObjectURL(r)),void 0,t)}}function le(e,t){return re.test(t)||oe.test(e)?"gltf":ne.test(t)||oe.test(e)?"glb":void 0}var ce=r(3856),ue=r(2952),pe=r(54264);let fe=class extends ce.m{constructor(){super(),this.externalSources=new ue.c,this._explicitDisplaySource=null,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,pe.Ud)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,pe._o)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,pe.v_)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(pe.Ud)}};(0,n._)([(0,p.qq)()],fe.prototype,"externalSources",void 0),(0,n._)([(0,p.qq)()],fe.prototype,"displaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_implicitDisplaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_explicitDisplaySource",void 0),fe=(0,n._)([(0,f.c)("esri.geometry.support.meshUtils.Metadata")],fe);var he=r(68612);const ge={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function me(e,t,r){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){ve[0]=t[0],ve[4]=t[1],ve[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.position[t+r];(0,k.t)(xe,xe,ve);for(let r=0;r<3;r++)e.position[t+r]=xe[r]}if(t[0]!==t[1]||t[1]!==t[2]){ve[0]=1/t[0],ve[4]=1/t[1],ve[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.normal[t+r];(0,k.t)(xe,xe,ve),(0,k.n)(xe,xe);for(let r=0;r<3;r++)e.normal[t+r]=xe[r]}}}}(e,function(e,t,r){const n=(0,$._0)(t,r);if(null==e&&1===n)return null;if(null==e)return[n,n,n];if("number"==typeof e){const t=e*n;return[t,t,t]}return[null!=e.width?e.width*n:n,null!=e.depth?e.depth*n:n,null!=e.height?e.height*n:n]}(r?.size,r?.unit,t.spatialReference));const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,$.EX)(e,t,{vertexSpace:r?.vertexSpace,geographic:r?.geographic});return{vertexAttributes:new S.s({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new v.c({faces:e.faces,material:r?.material||null})],spatialReference:t.spatialReference}}const ye={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},xe=(0,h.Su)(),ve=(0,he.Su)();var we=r(77556),Ae=r(15008),be=r(87104),_e=r(82448),Te=r(51120),Se=r(38496);const qe="esri.geometry.support.meshUtils.rotate";function Me(e,t,r,n=h.cX){if(null!=e){(0,Ae.IT)(Le,(0,x.kX)(t),(0,x.Yz)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Fe[r]=e[t+r]-n[r];(0,k.e)(Fe,Fe,Le);for(let r=0;r<3;r++)e[t+r]=Fe[r]+n[r]}}}const Fe=(0,h.Su)(),Re=(0,h.Su)(),Ce=(0,x.Su)(),Le=(0,be.Su)(),je=(0,he.Su)(),Ie=(0,h.Su)(),Pe="esri.geometry.support.meshUtils.scale";function ke(e,t,r=h.cX){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)Ne[t]=e[n+t]-r[t];(0,k.h)(Ne,Ne,t);for(let t=0;t<3;t++)e[n+t]=Ne[t]+r[t]}}const Ne=(0,h.Su)(),Oe=(0,h.Su)(),Ue=(0,h.Su)();var Ee;const We="esri.geometry.Mesh";function De(){return s.c.getLogger(We)}const ze={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b.c,local:_.c}};let $e=Ee=class extends(a.c.LoadableMixin((0,l.g)(m.c))){constructor(e){super(e),this.components=null,this.vertexSpace=new b.c,this.transform=null,this.metadata=new fe,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new S.s,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.aE)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:n}=this,o=r.position;if(0===o.length||e&&0===e.length)return new g.c({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if((0,q.k$)(n)){const{_untransformedBounds:e,transform:r}=this;return function([e,t,r,n,o,i],a,s,l){G??=new Float64Array(24);const c=G;return c[0]=e,c[1]=t,c[2]=r,c[3]=e,c[4]=o,c[5]=r,c[6]=n,c[7]=o,c[8]=r,c[9]=n,c[10]=t,c[11]=r,c[12]=e,c[13]=t,c[14]=i,c[15]=e,c[16]=o,c[17]=i,c[18]=n,c[19]=o,c[20]=i,c[21]=n,c[22]=t,c[23]=i,(0,$.project)({positions:c,transform:a,vertexSpace:s,inSpatialReference:l,outSpatialReference:l,outPositions:c}),B(c,l)}(e,r,n,t)}return B(o,t)}get _untransformedBounds(){return Z(this.vertexAttributes.position)}get anchor(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new y.c({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);return null!=e?e:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.c.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}De().error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,r,n){return(0,x.GA)(e,t,r,Ge),function(e,t,r){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(qe,o,n,a);(0,q.k$)(o)?(e.transform??=new T.c,function(e,t,r,n){const o=(0,k.s)(Fe,n.x,n.y,n.z??0),i=(0,k.f)(Fe,o,t);e.applyLocalInverse(i,Re),e.rotation=(0,x.Jn)(e.rotation,r,(0,x.Su)()),e.applyLocalInverse(i,i),(0,k.f)(i,i,Re),e.translation=(0,k.g)((0,h.Su)(),e.translation,i)}(e.transform,o.origin,t,i)):l?function(e,t,r){const n=e.spatialReference,o=(0,_e._s)(n),i=Ie;(0,Y.M)(r,i,o)||(0,Y.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Te.y)(o,i,Le,o),(0,we.kr)(je,Le);const f=Ce;(0,k.t)((0,x.Yz)(Ce),(0,x.Yz)(t),je),f[3]=t[3],(0,Se.K_)(a,n,c),null!=s&&null!=u&&(0,Se.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Se.GW)(l,a,c,n,p),Me(c,f,3,i),(0,Se.o$)(c,a,n),null!=s&&null!=u&&(Me(u,f,3),(0,Se.QP)(u,a,c,n,s)),null!=l&&null!=p&&(Me(p,f,4),(0,Se.Cr)(p,a,c,n,l)),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ie;if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(qe).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Me(e.vertexAttributes.position,t,3,n),Me(e.vertexAttributes.normal,t,3),Me(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Ge,n),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:n,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,q.k$)(n)){const[o,i,a]=n.origin;n.origin=(0,h.WK)(o+e,i+t,a+r)}else{for(let n=0;n<i.length;n+=3)i[n]+=e,i[n+1]+=t,i[n+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n,spatialReference:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(Pe,n,o,a);(0,q.k$)(n)?(e.transform??=new T.c,function(e,t,r,n){const o=(0,k.s)(Ne,n.x,n.y,n.z),i=(0,k.f)(Ne,o,t);e.applyLocalInverse(i,Oe);const a=(0,k.h)((0,h.Su)(),e.scale,r);e.scale=a,e.applyLocalInverse(i,i),(0,k.f)(i,i,Oe),e.translation=(0,k.g)((0,h.Su)(),e.translation,i)}(e.transform,n.origin,t,i)):l?function(e,t,r){const n=e.spatialReference,o=(0,_e._s)(n),i=Ue;(0,Y.M)(r,i,o)||(0,Y.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Se.K_)(a,n,c),null!=s&&null!=u&&(0,Se.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Se.GW)(l,a,c,n,p),ke(c,t,i),(0,Se.o$)(c,a,n),null!=s&&null!=u&&(0,Se.QP)(u,a,c,n,s),null!=l&&null!=p&&(0,Se.Cr)(p,a,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ue;if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(Pe).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}ke(e.vertexAttributes.position,t,n),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n}=e,o=r?.origin??e.anchor,i=r?.geographic,a=(0,H.QL)(V,n,o.spatialReference,i);(0,q.k$)(n)?function(e,t,r){const{vertexSpace:n}=e;if(!(0,q.k$)(n))return;const o=X,i=K;if(!(0,Y.M)(t,i,e.spatialReference))return void s.c.getLogger(V).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,Y.M)(r,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.f)(Q,i,o);n.origin=(0,k.g)((0,h.Su)(),n.origin,a)}(e,t,o):a?function(e,t,r){const n=(0,$.qu)(e.vertexAttributes,r),{position:o,normal:i,tangent:a}=(0,$.mC)(n,t,!1);e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=a,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=X,o=K;if((0,Y.M)(t,o,e.spatialReference)){if(!(0,Y.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),e.vertexAttributesChanged()}else s.c.getLogger(V).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){const{source:o}=t,{loadGLTFMesh:a}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new i.c("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ae(e.map((e=>({name:e.name,mimeType:e.type,source:te(e)}))))}(e):async function(e,t){const r=await(0,c.Y3)(e.map((async e=>{const r=await async function(e,t){const{parts:r,assetMimeType:n,assetName:o}=e;if(1===r.length)return new se(r[0].partUrl);const i=await e.toBlob(t);return(0,c.wp)(t),se.fromBlob(i,le(o,n))}(e);return(0,c.wp)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,c.wv)(t))throw r.forEach((e=>e.source.dispose())),(0,c.Uh)();return ae(r)}(e,t)}return te(e)}(o,n);(0,c.wp)(n);const l=a(new y.c({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:ee(s),signal:n?.signal,expectedType:s.type});l.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:u,components:p}=await l;e.vertexAttributes=u,e.components=p}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(r)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=r.e(4232).then(r.bind(r,4232)),n=this.load(),o=await Promise.all([t,n]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(De().error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof y.c))return De().error(".createBox()",w),null;const r=new Ee(me(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=ye,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const f=e[n],h=l/3;for(const e of t)s[p++]=h+e;const g=f.corners;for(let e=0;e<4;e++){const t=g[e];let n=0;a[u++]=.25*r[e][0]+f.uvOrigin[0],a[u++]=f.uvOrigin[1]-.25*r[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(o[l++]=.5*f.axis[e],i[c++]=f.axis[e]):(o[l++]=.5*t[n++],i[c++]=0)}}return{position:o,normal:i,uv:a,faces:s}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const r=e.components[0],n=r.faces,o=de[t],i=6*o,a=new Array(6),s=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?a[l++]=n[e]:s[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new v.c({faces:a,material:r.material}),new v.c({faces:s})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof y.c?new Ee(me(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,f=Math.cos(n),h=Math.sin(n);xe[2]=h;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const h=n/m*2*Math.PI;xe[0]=-Math.sin(h)*f,xe[1]=Math.cos(h)*f;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;a[c++]=(n+(g?.5:0))/r,a[c++]=e/t,0!==e&&n!==r&&(e!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-r),1!==e&&(s[u++]=p,s[u++]=p-r,s[u++]=p-r-1)),p++}}return{position:o,normal:i,uv:a,faces:s}}(t?.densificationFactor||0),e,t)):(De().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof y.c?new Ee(me(function(e=0){const t=Math.round(16*2**e),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),a=new Uint32Array(4*t*3);let s=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const r=0===e||5===e,f=e<=1||e>=4,h=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const y=m/g*2*Math.PI,d=r?0:.5;xe[0]=d*Math.sin(y),xe[1]=d*-Math.cos(y),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[s++]=xe[t],o[l++]=f?2===t?e<=1?1:-1:0:2===t?0:xe[t]/d;i[c++]=(m+(r?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||m===t||(5!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-t),1!==e&&(a[u++]=p,a[u++]=p-t,a[u++]=p-t-1)),p++}}return{position:n,normal:o,uv:i,faces:a}}(t?.densificationFactor||0),e,t)):(De().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof y.c))return De().error(".createPlane()",w),null;const r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Ee(me(function(e){const t=ge.facingAxisOrderSwap[e],r=ge.position,n=ge.normal,o=new Float64Array(r.length),i=new Float32Array(n.length);let a=0;for(let e=0;e<4;e++){const e=a;for(let s=0;s<3;s++){const l=t[s],c=Math.abs(l)-1,u=l>=0?1:-1;o[a]=r[e+c]*u,i[a]=n[e+c]*u,a++}}return{position:o,normal:i,uv:new Float32Array(ge.uv),faces:new Uint32Array(ge.faces),isPlane:!0}}(r),e,{...t,size:n}))}static createFromPolygon(e,t){if(!(e instanceof d.c))return De().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const r=function(e){const t=function(e,t,r,n){const o=e.length,i=new Array(o),a=new Array(o),s=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const f=(0,C.Gg)(3*p);let h=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===W.CCW_IS_HOLE&&E(g,t,n);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const r={index:h,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(s[u++]={index:h,count:g.length}),h=m?U(g,g.length-1,-1,f,h,g.length,t):U(g,0,1,f,h,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=h,r.pathLengths[e+1]=n.length,n.length>0&&(s[u++]={index:h,count:n.length}),h=U(n,0,1,f,h,n.length,t)}l=0,r.count>0&&(a[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(s[u++]={index:h,count:r.length}),h=U(r,0,1,f,h,r.length,t)}return a.length=c,s.length=u,{position:f,polygons:a,outlines:s}}(e.rings,e.hasZ,W.CCW_IS_HOLE,e.spatialReference),r=new Array;let n=0,o=0;for(const e of t.polygons){const i=e.count,a=e.index,s=(0,C.lL)(t.position,3*a,3*i),l=e.holeIndices.map((e=>e-a)),c=(0,L.Uv)((0,M.e)(s,l,3));r.push({position:s,faces:c}),n+=s.length,o+=c.length}const i=function(e,t,r){if(1===e.length)return e[0];const n=(0,C.Gg)(t),o=new Array(r);let i=0,a=0,s=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[a++]=e+s;s=i/3}return{position:n,faces:(0,L.Uv)(o)}}(r,n,o),a=Array.isArray(i.position)?(0,j.g)(i.position,3,{originalIndices:i.faces}):(0,j.g)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,C.cp)(new Float64Array(a.buffer)),i.faces=a.indices,i}(e);return new Ee({vertexAttributes:new S.s({position:r.position}),components:[new v.c({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new b.c})}static async createFromGLTF(e,t,n){if(!(e instanceof y.c)){const e=new A;throw De().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n);return new Ee(await o(e,t,n))}static async createFromFiles(e,t,r){if((0,o.gx)(De(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"}),!(e instanceof y.c)){const e=new A;throw(e=>{De().error(".createFromFiles()",e.message)})(e),e}if(!r?.layer)throw new i.c("invalid:no-layer","SceneLayer required for file to mesh conversion.");return r.layer.convertMesh(t,{location:e,...r})}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:a,spatialReference:s}=e,l=r?.transform?.clone()??new T.c,c=(0,h.WK)(o,i,a??0),u=(0,q.mm)(r?.vertexSpace??(0,q.GF)(s),c),p={source:t,extent:n},f=new fe;return f.externalSources.push(p),new Ee({metadata:f,transform:l,vertexSpace:u,spatialReference:s})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:a}=e,s=t?.transform?.clone()??new T.c,l=(0,h.WK)(r,n,o??0),c=(0,q.mm)(t?.vertexSpace??(0,q.GF)(a),l),u=new Ee({transform:s,vertexSpace:c,spatialReference:a});return u.addResolvingPromise(Promise.reject(new i.c("mesh-incomplete","Mesh resources are not complete"))),u}};(0,n._)([(0,p.qq)({type:[v.c],json:{write:!0}})],$e.prototype,"components",void 0),(0,n._)([(0,p.qq)({nonNullable:!0,types:ze,constructOnly:!0,json:{write:!0}})],$e.prototype,"vertexSpace",void 0),(0,n._)([(0,p.qq)({type:T.c,json:{write:!0}})],$e.prototype,"transform",void 0),(0,n._)([(0,p.qq)({constructOnly:!0})],$e.prototype,"metadata",void 0),(0,n._)([(0,p.qq)()],$e.prototype,"hasExtent",null),(0,n._)([(0,p.qq)()],$e.prototype,"_transformedExtent",null),(0,n._)([(0,p.qq)()],$e.prototype,"_untransformedBounds",null),(0,n._)([(0,p.qq)()],$e.prototype,"anchor",null),(0,n._)([(0,p.qq)()],$e.prototype,"origin",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],$e.prototype,"extent",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],$e.prototype,"hasZ",void 0),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],$e.prototype,"hasM",void 0),(0,n._)([(0,p.qq)({type:S.s,nonNullable:!0,json:{write:!0}})],$e.prototype,"vertexAttributes",void 0),$e=Ee=(0,n._)([(0,f.c)(We)],$e);const Ge=(0,x.Su)(),Ze=$e},15688:(e,t,r)=>{r.d(t,{Gg:()=>o,cp:()=>i,lL:()=>a,mw:()=>s,qW:()=>l});var n=r(72008);function o(e,t=!1){return e<=n._?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.c7)(e)?e.length:e.byteLength/8)<=n._?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function s(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},43912:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552),p=r(53368),f=r(96344),h=r(70492),g=r(60003);let m=n=class extends i.am{static from(e){return(0,p.uY)(n,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.c)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},s.c.getLogger(this))}castMaterial(e){return(0,p.uY)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?h.c:f.c,e)}clone(){return new n({faces:(0,a.ct)(this.faces),shading:this.shading,material:(0,a.ct)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const r={faces:(0,a.ct)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new n(r)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.qq)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.W)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.qq)({type:f.c,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.W)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.qq)()],m.prototype,"name",void 0),(0,o._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.qq)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshComponent")],m);const y=m},51232:(e,t,r)=>{r.d(t,{c:()=>u});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);let c=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,n._)([(0,s.G)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,n._)([(0,l.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},13708:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552),c=r(62484);let u=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="local",this.origin=(0,c.Su)()}};(0,n._)([(0,s.G)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n._)([(0,l.c)("esri.geometry.support.MeshLocalVertexSpace")],u);const p=u},96344:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(40504),s=r(1580),l=(r(9456),r(66360),r(72052),r(12552)),c=r(7192),u=r(56160);let p=n=class extends a.am{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,s.qq)({type:i.c,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=n=(0,o._)([(0,l.c)("esri.geometry.support.MeshMaterial")],p);const f=p},70492:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(96344),c=r(7192),u=r(56160);let p=n=class extends l.c{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,a.qq)({type:i.c,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const f=p},7192:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=(r(9456),r(63316)),a=r(40504),s=r(1580),l=r(53368),c=(r(72052),r(33600)),u=r(12552),p=r(18996),f=r(91952);const h=new WeakMap;let g=0,m=n=class extends a.am{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(h.has(this.data)||h.set(this.data,++g),t(h.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new n(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return(0,i.wV)(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new n({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new n({data:e}):(0,l.uY)(n,e)}};(0,o._)([(0,s.qq)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o._)([(0,s.qq)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,s.qq)()],m.prototype,"data",null),(0,o._)([(0,p.G)("data")],m.prototype,"writeData",null),(0,o._)([(0,c.E)("data")],m.prototype,"readData",null),(0,o._)([(0,s.qq)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o._)([(0,s.qq)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o._)([(0,s.qq)({readOnly:!0})],m.prototype,"contentHash",null),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshTexture")],m);const y=m},56160:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552));let l=class extends((0,o.q)(i.am)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,s.c)("esri.geometry.support.MeshTextureTransform")],l);const c=l},41104:(e,t,r)=>{r.d(t,{c:()=>d});var n,o=r(41948),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(15008),c=r(87104),u=r(41512),p=r(2620),f=r(98472),h=r(62484),g=r(66952);let m=n=class extends i.am{constructor(e){super(e),this.translation=(0,h.Su)(),this.rotationAxis=(0,h.eu)(g.up),this.rotationAngle=0,this.scale=(0,h.WK)(1,1,1)}get rotation(){return(0,g.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,h.ct)((0,g.Yz)(e)),this.rotationAngle=(0,g.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,u.yG)(y,(0,g.Yz)(this.rotation),(0,g.kX)(this.rotation)),(0,l.um)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,f.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,f.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,l.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,h.ct)(this.translation),rotationAxis:(0,h.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,h.ct)(this.scale)};return new n(e)}};(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"translation",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAxis",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAngle",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"scale",void 0),(0,o._)([(0,a.qq)()],m.prototype,"rotation",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrix",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrixInverse",null),m=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshTransform")],m);const y=(0,p.Su)(),d=m},60003:(e,t,r)=>{r.d(t,{c:()=>h,s:()=>p});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552);let p=n=class extends i.am{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return h(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},s.c.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&s.c.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),h(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},s.c.getLogger(this))}castUv(e){return h(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},s.c.getLogger(this))}castNormal(e){return h(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},s.c.getLogger(this))}castTangent(e){return h(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},s.c.getLogger(this))}clone(){const e={position:(0,a.ct)(this.position),uv:(0,a.ct)(this.uv),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),color:(0,a.ct)(this.color)};return new n(e)}clonePositional(){const e={position:(0,a.ct)(this.position),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function f(e,t,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function h(e,t,r,n,o){if(!e)return e;if(e instanceof t)return f(e,n,t,o);for(const i of r)if(e instanceof i)return f(new t(e),n,t,o);if(Array.isArray(e))return f(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function g(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"color",void 0),(0,o._)([(0,c.W)("color")],p.prototype,"castColor",null),(0,o._)([(0,l.qq)({nonNullable:!0,json:{write:g}})],p.prototype,"position",void 0),(0,o._)([(0,c.W)("position")],p.prototype,"castPosition",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"uv",void 0),(0,o._)([(0,c.W)("uv")],p.prototype,"castUv",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"normal",void 0),(0,o._)([(0,c.W)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"tangent",void 0),(0,o._)([(0,c.W)("tangent")],p.prototype,"castTangent",null),p=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshVertexAttributes")],p)},66952:(e,t,r)=>{r.d(t,{GA:()=>p,Jn:()=>u,Su:()=>l,Yz:()=>f,eE:()=>c,i4:()=>h,kX:()=>g,up:()=>m});var n=r(53648),o=r(41512),i=r(2620),a=r(98472),s=r(62484);function l(e=m){return[e[0],e[1],e[2],e[3]]}function c(e,t,r=l()){return(0,a.c)(r,e),r[3]=t,r}function u(e,t,r=l()){return(0,o.yG)(y,e,g(e)),(0,o.yG)(d,t,g(t)),(0,o.iW)(y,d,y),function(e,t){return e[3]=t,e}(r,(0,n.UB)((0,o.C0)(r,y)))}function p(e,t,r,n=l()){return c(s.UV,e,x),c(s.IR,t,v),c(s.wx,r,w),u(x,v,x),u(x,w,n),n}function f(e){return e}function h(e){return e[3]}function g(e){return(0,n.EF)(e[3])}r(37008);const m=[0,0,1,0],y=(0,i.Su)(),d=(0,i.Su)(),x=(l(),l()),v=l(),w=l()},54264:(e,t,r)=>{r.d(t,{CT:()=>x,Ki:()=>d,Si:()=>s,Ud:()=>c,_o:()=>m,ai:()=>l,mK:()=>v,v_:()=>g});var n=r(2600),o=r(92400),i=r(10860),a=r(4048);class s{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,o.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,i.wp)(e),new Blob(r)}}class l{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,n.c)(this.partUrl,{responseType:"blob"});return(0,i.wp)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof s))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||f.test(r)}return p.test(e.assetMimeType)||f.test(e.assetName)}function g(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=>y(e,t)))}return y(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof s&&e.isOnService(t)}function d(e,t){return e instanceof File?(0,a.K0)(e,t):(0,a.me)(e.assetMimeType,t)??(0,a.If)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},77080:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(53648),o=r(97143);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),f=r?.minReduction??0,h=r?.originalIndices||null,g=h?h.length:0,m=r?.componentOffsets||null;let y=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>y&&(y=t)}else y=u;const d=Math.floor(1.1*y)+1;(null==c||c.length<2*d)&&(c=new Uint32Array((0,n.w7)(2*d)));for(let e=0;e<2*d;e++)c[e]=0;let x=0;const v=!!m&&!!h,w=v?g:u;let A=(0,o.aw)(u);const b=new Uint32Array(g),_=1.96;let T=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,S=1,q=m?m[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;T*=2}if(e===q){for(let e=0;e<2*d;e++)c[e]=0;if(h)for(let e=m[S-1];e<m[S];e++)b[e]=A[h[e]];q=m[++S]}const r=v?h[e]:e,n=r*t,o=l(p,n,t);let i=o%d,s=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(a(p,n,e*t,t)){s=A[e];break}}i++,i>=d&&(i-=d)}s===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),A[r]=s}if(0!==f&&1-x/u<f)return null;if(v){for(let e=m[S-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.Uv)(b)}const M=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(s(p,(v?h[e]:e)*t,M,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.Uv)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:A,uniqueCount:x}}function a(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function s(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},71488:(e,t,r)=>{r.d(t,{Kk:()=>s,QL:()=>l,yO:()=>a});var n=r(26832),o=r(66360),i=r(21136);function a(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function s(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function l(e,t,r,a){if(void 0!==a){(0,n.O2)(o.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const s="local"===t.type;if(!(0,i.k$)(t)||a===s)return r.isGeographic||r.isWebMercator&&a;o.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${a}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return s(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>A,EX:()=>_,_0:()=>I,_S:()=>b,iS:()=>S,mC:()=>M,project:()=>q,qu:()=>R});var n=r(24296),o=r(68612),i=r(15008),a=r(87104),s=r(98472),l=r(62484),c=r(77556),u=r(60074),p=r(82448),f=r(51120),h=r(62880),g=r(15688),m=r(41104),y=r(21136),d=r(48952),x=r(71488),v=r(38496);function w(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?M(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=I(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=o[e]*l+i,n[e+1]=o[e+1]*l+a,n[e+2]=o[e+2]*l+s;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function A(e,t=a.IJ){const{position:r,normal:n,tangent:o}=e;return{position:(0,d.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,v.W4)(n,new Float32Array(n.length),t):null,tangent:null!=o?(0,v.AT)(o,new Float32Array(o.length),t):null}}function b(e,t,r,n){const{position:o,normal:i,tangent:a}=e;if(!(0,y.k$)(t))return{position:o,normal:i,tangent:a};const s=(0,y.mA)(t,n);return w(A(e,r?.localMatrix),s,{geographic:"local"===t.type})}function _(e,t,r){const n=(0,y.Al)(t,r),o=t.spatialReference,i=(0,y.k$)(n);if(!i)return{vertexAttributes:w(e,t,r),vertexSpace:n,transform:null};const{position:a,normal:s,tangent:l}=e,c=(0,x.Kk)(n,o);switch(n.type){case"georeferenced":return c?{vertexAttributes:M(e,t,i,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c};case"local":return{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c}}}function T(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?R(e,t,r):F(e,t,r)}function S(e,t,r,n,o){if(!(0,y.k$)(t))return T(e,n,o);const{spatialReference:i}=n,a=b(e,t,r,i);return n.equals((0,y.mA)(t,i))?F(a,n,o):T(a,n,o)}function q({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:o,outPositions:c,localMode:m}){const y=r.origin??l.cX,x=null!=r.origin?t?.localMatrix??a.IJ:a.IJ;if("georeferenced"===r.type){const t=c??(0,g.Gg)(e.length);if((0,i.yK)(x,a.IJ)?(0,g.mw)(t,e):(0,d.a)(t,e,x),!(0,s.i)(y,l.cX)){const[e,r,n]=y;for(let o=0;o<t.length;o+=3)t[o]+=e,t[o+1]+=r,t[o+2]+=n}return(0,h.projectBuffer)(t,n,0,t,o,0,t.length/3),t}let v=n;const w=(0,p._s)(n);v=o.isWebMercator&&m||!(0,u.canProjectWithoutEngine)(n,w)?v:w,(0,f.y)(n,y,P,v),(0,i.iW)(P,P,x);const A=c??(0,g.Gg)(e.length);return(0,d.a)(A,e,P),(0,h.projectBuffer)(A,v,0,A,o,0,A.length/3),A}function M(e,t,r,n){const o=t.spatialReference,i=C(t,n,P),a=new Float64Array(e.position.length),s=function(e,t,r,n){(0,d.a)(n,e,t);const o=new Float64Array(e.length);return(0,v.o$)(n,o,r)}(e.position,i,o,a),l=(0,c.yy)(N,i),u=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);return(0,d.b)(i,r,n),(0,v.QP)(i,e,t,o,i),i}(s,a,e.normal,l,o),p=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);(0,d.b)(i,r,n,4);for(let e=3;e<i.length;e+=4)i[e]=r[e];return(0,v.Cr)(i,e,t,o,i),i}(s,a,e.tangent,l,o);if(r){const{x:e,y:r,z:n}=t;(0,d.t)(s,s,[-e,-r,-(n??0)])}return{position:s,normal:u,tangent:p}}function F(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=I(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=(o[e]-i)/l,n[e+1]=(o[e+1]-a)/l,n[e+2]=(o[e+2]-s)/l;return{position:n,normal:e.normal,tangent:e.tangent}}function R(e,t,r){const n=t.spatialReference;C(t,r,P);const o=(0,i.S_)(k,P),a=new Float64Array(e.position.length),s=function(e,t,r,n){const o=(0,v.K_)(e,t,n),i=new Float64Array(o.length);return(0,d.a)(i,o,r),i}(e.position,n,o,a),l=(0,c.yy)(N,o);return{position:s,normal:L(e.normal,e.position,a,n,l),tangent:j(e.tangent,e.position,a,n,l)}}function C(e,t,r){(0,f.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,p._s)(e.spatialReference));const n=I(t?t.unit:null,e.spatialReference);return(0,i.aU)(r,r,[n,n,n]),r}function L(e,t,r,n,o){if(null==e)return null;const i=(0,v.cH)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o),i}function j(e,t,r,n,o){if(null==e)return null;const i=(0,v.GW)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o,4),i}function I(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const P=(0,a.Su)(),k=(0,a.Su)(),N=(0,o.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>b,Cr:()=>T,GW:()=>_,K_:()=>v,QP:()=>x,W4:()=>A,cH:()=>d,o$:()=>w});var n=r(66360),o=r(77556),i=r(68612),a=r(87104),s=r(98472),l=r(62484),c=r(82448),u=r(51120),p=r(62880),f=r(60544),h=r(29120),g=r(71004),m=r(48952);const y=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function d(e,t,r,n,o){return q(n)?(S(F.TO_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert spatial reference to PCPF"),o)}function x(e,t,r,n,o){return q(n)?(S(F.FROM_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert to spatial reference from PCPF"),o)}function v(e,t,r){return(0,p.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function w(e,t,r){return(0,p.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function A(e,t,r){return(0,o.yy)(I,r),(0,m.b)(t,e,I),(0,o.QT)(I)||(0,m.n)(t,t),t}function b(e,t,r){if((0,o.yy)(I,r),(0,m.b)(t,e,I,4),(0,o.QT)(I)||(0,m.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function _(e,t,r,n,o){if(!q(n))return y().error("Cannot convert spatial reference to PCPF"),o;S(F.TO_PCPF,g.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function T(e,t,r,n,o){if(!q(n))return y().error("Cannot convert to spatial reference from PCPF"),o;S(F.FROM_PCPF,g.Yj.fromTypedArray(e,16),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,16));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function S(e,t,r,n,i,a){if(!t)return;const l=r.count,p=(0,c._s)(i);if(M(i))for(let r=0;r<l;r++)n.getVec(r,C),t.getVec(r,L),(0,u.y)(p,C,j,p),(0,o.kr)(I,j),e===F.FROM_PCPF&&(0,o.oL)(I,I),(0,s.t)(L,L,I),a.setVec(r,L);else for(let i=0;i<l;i++){n.getVec(i,C),t.getVec(i,L),(0,u.y)(p,C,j,p),(0,o.kr)(I,j);const l=(0,h.MB)(r.get(i,1));let c=Math.cos(l);e===F.TO_PCPF&&(c=1/c),I[0]*=c,I[1]*=c,I[2]*=c,I[3]*=c,I[4]*=c,I[5]*=c,e===F.FROM_PCPF&&(0,o.oL)(I,I),(0,s.t)(L,L,I),(0,s.n)(L,L),a.setVec(i,L)}return a}function q(e){return M(e)||function(e){return e.isWebMercator}(e)}function M(e){return e.isWGS84||(0,f.Ub)(e)||(0,f.qg)(e)||(0,f.UB)(e)}var F,R;(R=F||(F={}))[R.TO_PCPF=0]="TO_PCPF",R[R.FROM_PCPF=1]="FROM_PCPF";const C=(0,l.Su)(),L=(0,l.Su)(),j=(0,a.Su)(),I=(0,i.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>h,GF:()=>g,k$:()=>p,mA:()=>f,mm:()=>m,wX:()=>u});var n=r(26832),o=r(66360),i=r(67776),a=r(51232),s=r(13708),l=r(48952);function c(){return o.c.getLogger("esri.geometry.Mesh")}function u(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),o=new a.c({origin:[n.x,n.y,n.z]}),i=e.cloneWithVertexSpace(o),{position:s}=i.vertexAttributes;return i.vertexAttributes.position=(0,l.t)(new Float64Array(s.length),s,[-n.x,-n.y,-(n.z??0)]),i.vertexAttributesChanged(),i}function p(e){return null!=e.origin}function f(e,t){if(!p(e))return null;const[r,n,o]=e.origin;return new i.c({x:r,y:n,z:o,spatialReference:t})}function h(e,t){const{x:r,y:o,z:i,spatialReference:l}=e,u=[r,o,i??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new s.c({origin:u}):new a.c({origin:u});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return l.isGeographic||l.isWebMercator?new s.c({origin:u}):new a.c({origin:u});switch(t.vertexSpace){case"local":return new s.c({origin:u});case"georeferenced":return new a.c({origin:u});case"georeferenced-absolute":return new a.c}}function g(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function m(e,t){return"local"===e?new s.c({origin:t}):new a.c({origin:t})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1740,8348],{44247:(e,t,i)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([i.e(3220),i.e(988)]).then(i.bind(i,63220));return r.create(e,t)}function o(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}i.d(t,{_:()=>o,u:()=>r})},75824:(e,t,i)=>{i.d(t,{Md:()=>n,m0:()=>s,qG:()=>o});var r=i(39452);class o{}function n(e){return e instanceof r.C?e===o.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return n(e)?o.instance:e}o.instance=new r._C("Etc/UTC")},77048:(e,t,i)=>{i.d(t,{C6:()=>c,FZ:()=>m,K:()=>v,K8:()=>l,MZ:()=>a,Qv:()=>f,Su:()=>o,UN:()=>w,WK:()=>n,WO:()=>y,WU:()=>s,eC:()=>u,is:()=>g,mK:()=>d,qe:()=>p,qy:()=>h,yK:()=>q});var r=i(95247);function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,i,r,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=n,a[5]=s,a}function s(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.c(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,i=0,r=t.length/3){let o=e[0],n=e[1],s=e[2],a=e[3],l=e[4],p=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[i+3*e]),n=Math.min(n,t[i+3*e+1]),s=Math.min(s,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),p=Math.max(p,t[i+3*e+2]);e[0]=o,e[1]=n,e[2]=s,e[3]=a,e[4]=l,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function d(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?y(e,v):o(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,i,r,o){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function q(e,t,i){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(83372);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},75432:(e,t,i)=>{i.r(t),i.d(t,{default:()=>A});var r=i(41948),o=i(20744),n=i(14628),s=i(1580),a=i(33392),l=i(12552),p=i(672),u=i(3856),c=i(40504),d=(i(9456),i(66360),i(72052),i(43780));const y=[2155,2194,2204,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2314,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2964,2965,2966,2967,2968,2992,2994,3080,3089,3091,3102,3359,3359,3361,3363,3365,3366,3404,3407,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3441,3442,3443,3444,3445,3446,3451,3452,3453,3454,3455,3456,3457,3458,3459,3479,3481,3483,3485,3487,3490,3492,3494,3496,3498,3500,3502,3504,3506,3508,3510,3512,3515,3517,3519,3521,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541,3543,3545,3547,3549,3551,3553,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3582,3584,3586,3588,3590,3593,3598,3600,3605,3608,3610,3612,3614,3616,3618,3620,3622,3624,3626,3628,3630,3632,3634,3636,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660,3662,3664,3668,3670,3672,3674,3676,3677,3679,3680,3682,3683,3686,3688,3690,3692,3696,3698,3700,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3753,3754,3755,3756,3757,3758,3759,3760,3991,3992,4217,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4438,4439,4455,4456,4457,5466,5588,5589,5623,5624,5625,5646,5654,5655,6128,6129,6141,6200,6201,6202,6391,6405,6407,6409,6411,6413,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6441,6443,6445,6447,6449,6451,6453,6455,6457,6459,6461,6463,6465,6467,6469,6471,6473,6475,6477,6479,6484,6486,6488,6490,6492,6494,6496,6499,6501,6503,6505,6507,6510,6515,6517,6519,6521,6523,6525,6527,6529,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,6553,6555,6557,6559,6561,6563,6565,6568,6570,6572,6574,6576,6578,6582,6584,6586,6588,6590,6593,6595,6597,6599,6601,6603,6605,6607,6609,6612,6614,6616,6618,6625,6626,6627,6633,6785,6787,6789,6791,6793,6795,6797,6799,6801,6803,6805,6807,6809,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841,6843,6845,6847,6849,6851,6853,6855,6857,6859,6861,6863,6868,6880,6885,6887,6923,6925,6966,6997,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7132,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7558,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,24100,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26814,26815,26819,26820,26821,26822,26825,26826,26830,26831,26832,26833,26836,26837,26841,26842,26843,26844,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32064,32065,32066,32067,32074,32075,32076,32077,32099,32164,32165,32166,32167,32664,32665,32666,32667,65061,102120,102121,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102700,102704,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102766],m=[5614,5702,6130,6131,6132,6358,6359,6360],f=[115700,4326];function h(e){return y.includes(e)?"feet":"meters"}function g(e,t){return"number"==typeof e?m.includes(e)?"feet":"meters":h(t)}function q(e,t){return e&&f.includes(e)||4326===t?"ellipsoidal":"gravity-related-height"}let v=class extends d.c{constructor(){super(...arguments),this.verticalWKID=null}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&r?.length>1&&o?.length>1}getInfo(){const{horizontalWKID:e,verticalWKID:t}=this;let i=e,r=t;const o=this;if(4===o.type){const{properties:e}=o;i=4326,r=e.verticalWKID}return{heightModel:q(r,i),heightUnit:g(r,i),horizontalUnit:h(i)}}};(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"horizontalWKID",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"verticalWKID",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"x",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"y",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"z",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],v.prototype,"type",void 0),v=(0,r._)([(0,l.c)("esri.layers.orientedImagery.core.CameraOrientation")],v);const w=v;let _=class extends((0,u.q)((0,c.Ib)(w))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:c,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,m=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>m.push(e))),m.push(u),c?.forEach((e=>m.push(e))),d?.forEach((e=>m.push(e))),y?.forEach((e=>m.push(e)))),m.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,s.qq)({json:{write:!0}})],_.prototype,"type",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],_.prototype,"affineTransformations",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"focalLength",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],_.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],_.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],_.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"heading",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"pitch",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"roll",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"horizontalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"verticalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"x",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"y",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],_.prototype,"z",void 0),_=(0,r._)([(0,l.c)("esri.layers.orientedImagery.core.CameraOrientationHPR")],_);const S=_;let x=class extends((0,u.q)((0,c.Ib)(w))){constructor(){super(...arguments),this.type=2,this.verticalWKID=null}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:u,principalOffsetPoint:c,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,m=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>m.push(e))),m.push(u),c?.forEach((e=>m.push(e))),d?.forEach((e=>m.push(e))),y?.forEach((e=>m.push(e)))),m.map((e=>isNaN(e)?"":e)).join("|")}};(0,r._)([(0,s.qq)({json:{write:!0}})],x.prototype,"type",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],x.prototype,"affineTransformations",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"focalLength",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],x.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],x.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],x.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"omega",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"phi",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"kappa",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"horizontalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"verticalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"x",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"y",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],x.prototype,"z",void 0),x=(0,r._)([(0,l.c)("esri.layers.orientedImagery.core.CameraOrientationOPK")],x);const F=x;let b=class extends((0,u.q)((0,c.Ib)(w))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||r?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:c,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,m=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>m.push(e))),m.push(u),c?.forEach((e=>m.push(e))),c?.forEach((e=>m.push(e))),d?.forEach((e=>m.push(e))),y?.forEach((e=>m.push(e)))),m.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,s.qq)({json:{write:!0}})],b.prototype,"type",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],b.prototype,"affineTransformations",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"focalLength",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],b.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],b.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:[Number],json:{write:!0}})],b.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"yaw",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"pitch",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"roll",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"horizontalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"verticalWKID",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"x",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],b.prototype,"z",void 0),b=(0,r._)([(0,l.c)("esri.layers.orientedImagery.core.CameraOrientationYPR")],b);const N=b;i(66668);let T=class extends c.am{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],T.prototype,"lod",void 0),(0,r._)([(0,s.qq)({type:String,json:{write:!0}})],T.prototype,"rasterFunction",void 0),(0,r._)([(0,s.qq)({type:String,json:{write:!0}})],T.prototype,"url",void 0),T=(0,r._)([(0,l.c)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],T);let I=class extends c.am{};var j;(0,r._)([(0,s.qq)({type:Number,json:{write:!0}})],I.prototype,"constantElevation",void 0),I=(0,r._)([(0,l.c)("esri.layers.orientedImagery.cor.ElevationSourceDefinitions.ConstantElevation")],I),function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(j||(j={}));var P=i(82060);const O=new n.O({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),D=new n.O({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),C=new Map;C.set(`${j.OPK}`,{desc:"Using Omega Phi Kappa",constructor:F}),C.set(`${j.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:S}),C.set(`${j.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:N});const R=new Map;function M(e,t,i){return{name:`orientedImageryProperties.${e}`,write:!t||{target:`orientedImageryProperties.${e}`,writer:t},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${e}`,write:t,read:i}}}}R.set(`${j.HPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,u,c,d,y,m,f,h,g,q,v,w,_,S]=e.slice(1),x=[p,u,c,d,y,m].map((e=>Number(e))),F=[h,g].map((e=>Number(e))),b=[q,v,w],N=[_,S];return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:6===x.filter(P.I).length?x:null,focalLength:f,principalOffsetPoint:2!==F.filter(P.I).length?null:F,radialDistortionCoefficients:3!==b.filter(P.I).length?null:b,tangentialDistortionCoefficients:2!==N.filter(P.I).length?null:N}})),R.set(`${j.YPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,u,c,d,y,m,f,h,g,q,v,w,_,S]=e.slice(1),x=[p,u,c,d,y,m].map((e=>Number(e))),F=[h,g].map((e=>Number(e))),b=[q,v,w],N=[_,S];return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:6===x.filter(P.I).length?x:null,focalLength:f,principalOffsetPoint:2!==F.filter(P.I).length?null:F,radialDistortionCoefficients:3!==b.filter(P.I).length?null:b,tangentialDistortionCoefficients:2!==N.filter(P.I).length?null:N}})),R.set(`${j.OPK}`,(function(e){const[t,i,r,o,n,s,a,l,p,u,c,d,y,m,f,h,g,q,v,w,_,S]=e.slice(1),x=[p,u,c,d,y,m].map((e=>Number(e))),F=[h,g].map((e=>Number(e))),b=[q,v,w].map((e=>Number(e))),N=[_,S].map((e=>Number(e)));return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:6===x.filter(P.I).length?x:null,focalLength:f,principalOffsetPoint:2!==F.filter(P.I).length?null:F,radialDistortionCoefficients:3!==b.filter(P.I).length?[0,0,0]:b,tangentialDistortionCoefficients:2!==N.filter(P.I).length?[0,0]:N}})),R.set(`${j.LTP}`,(function(e){const[t,i,r,o,n,...s]=e.slice(1),a=R.get(n);return a?{latitude:t,longitude:i,ellipsoidRadius:r,squaredEccentricity:o,properties:a([n,"",...s])}:null}));let E=class extends p.default{constructor(){super(...arguments),this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return function(e,t,i){return e?(e=>"constantElevation"in e)(e)?new I(e):function(e,t,i){let{url:r}=e;return r?(r=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(r,t,i),new T({...e,url:r})):null}(e,t,i):e}(e,t,i)}findFirstValidLayerId(e){return e.layers?.find((e=>"Oriented Imagery Layer"===e.type))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.c("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,r._)([(0,s.qq)({type:Number,json:M("cameraHeading")})],E.prototype,"cameraHeading",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("cameraHeight")})],E.prototype,"cameraHeight",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("cameraPitch")})],E.prototype,"cameraPitch",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("cameraRoll")})],E.prototype,"cameraRoll",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("coveragePercent")})],E.prototype,"coveragePercent",void 0),(0,r._)([(0,s.qq)({type:String,json:M("demPathPrefix")})],E.prototype,"demPathPrefix",void 0),(0,r._)([(0,s.qq)({type:String,json:M("demPathSuffix")})],E.prototype,"demPathSuffix",void 0),(0,r._)([(0,s.qq)({type:String,json:M("depthImagePathPrefix")})],E.prototype,"depthImagePathPrefix",void 0),(0,r._)([(0,s.qq)({type:String,json:M("depthImagePathSuffix")})],E.prototype,"depthImagePathSuffix",void 0),(0,r._)([(0,s.qq)({type:Object,json:M("elevationSource")})],E.prototype,"elevationSource",void 0),(0,r._)([(0,s.qq)()],E.prototype,"effectiveElevationSource",null),(0,r._)([(0,s.qq)({type:Number,json:M("farDistance")})],E.prototype,"farDistance",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],E.prototype,"geometryType",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("horizontalFieldOfView")})],E.prototype,"horizontalFieldOfView",void 0),(0,r._)([(0,s.qq)({type:String,json:M("horizontalMeasurementUnit")})],E.prototype,"horizontalMeasurementUnit",void 0),(0,r._)([(0,s.qq)({type:String,json:M("imagePathPrefix")})],E.prototype,"imagePathPrefix",void 0),(0,r._)([(0,s.qq)({type:String,json:M("imagePathSuffix")})],E.prototype,"imagePathSuffix",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("imageRotation")})],E.prototype,"imageRotation",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("maximumDistance")})],E.prototype,"maximumDistance",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("nearDistance")})],E.prototype,"nearDistance",void 0),(0,r._)([(0,s.qq)({type:["OrientedImageryLayer"]})],E.prototype,"operationalLayerType",void 0),(0,r._)([(0,s.qq)({json:M("orientationAccuracy",((e,t)=>{e&&(t.orientationAccuracy=e.join(","))}))}),(0,a.W)((e=>e?e.trim().split(",").map(Number):null))],E.prototype,"orientationAccuracy",void 0),(0,r._)([(0,s.qq)({json:{...M("orientedImageryType",D.write,D.read),type:D.apiValues}})],E.prototype,"orientedImageryType",void 0),(0,r._)([(0,s.qq)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],E.prototype,"type",void 0),(0,r._)([(0,s.qq)({json:{...M("timeIntervalUnit",O.write,O.read),type:O.apiValues}})],E.prototype,"timeIntervalUnit",void 0),(0,r._)([(0,s.qq)({type:Number,json:M("verticalFieldOfView")})],E.prototype,"verticalFieldOfView",void 0),(0,r._)([(0,s.qq)({json:{...M("verticalMeasurementUnit"),type:new n.O({Feet:"feet",Meter:"meter"}).apiValues}})],E.prototype,"verticalMeasurementUnit",void 0),(0,r._)([(0,s.qq)({type:String,json:M("videoPathPrefix")})],E.prototype,"videoPathPrefix",void 0),(0,r._)([(0,s.qq)({type:String,json:M("videoPathSuffix")})],E.prototype,"videoPathSuffix",void 0),E=(0,r._)([(0,l.c)("esri.layers.OrientedImageryLayer")],E);const A=E},38724:(e,t,i)=>{i.d(t,{C:()=>s});var r=i(41948),o=i(1580),n=(i(9456),i(66360),i(72052),i(12552));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,o.qq)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.c)("esri.layers.mixins.APIKeyMixin")],t),t}},16660:(e,t,i)=>{i.d(t,{u:()=>l});var r=i(41948),o=i(66360),n=i(1580),s=(i(9456),i(72052),i(12552)),a=i(48212);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.K0)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.oR)(e,o.c.getLogger(this)))}};return(0,r._)([(0,n.qq)()],t.prototype,"title",null),(0,r._)([(0,n.qq)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,s.c)("esri.layers.mixins.ArcGISService")],t),t}},87352:(e,t,i)=>{i.d(t,{c:()=>c});var r=i(41948),o=i(3856),n=i(14628),s=i(40504),a=i(1580),l=(i(9456),i(66360),i(72052),i(12552));const p=new n.O({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.q)(s.am)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,a.qq)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,a.qq)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,a.qq)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,a.qq)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,a.qq)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,l.c)("esri.layers.support.FeatureTemplate")],u);const c=u},79648:(e,t,i)=>{i.d(t,{c:()=>y});var r=i(41948),o=i(3856),n=i(40504),s=i(1580),a=(i(9456),i(66360),i(72052),i(33600)),l=i(12552),p=i(18996),u=i(89812),c=i(87352);let d=class extends((0,o.q)(n.am)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,u.h4)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,s.qq)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,s.qq)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,a.E)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,p.G)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,s.qq)({type:[c.c],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,l.c)("esri.layers.support.FeatureType")],d);const y=d},600:(e,t,i)=>{i.d(t,{c:()=>h});var r,o=i(41948),n=i(14628),s=i(40504),a=i(1580),l=i(53368),p=(i(72052),i(9456),i(9968)),u=i(33600),c=i(12552),d=i(89812),y=i(36408);const m=new n.O({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends s.am{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?m.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.qq)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,o._)([(0,a.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,o._)([(0,a.qq)()],f.prototype,"description",void 0),(0,o._)([(0,u.E)("description")],f.prototype,"readDescription",null),(0,o._)([(0,a.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],f.prototype,"domain",void 0),(0,o._)([(0,a.qq)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,o._)([(0,a.qq)({type:l.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,o._)([(0,a.qq)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.qq)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,o._)([(0,p.G)(y.M)],f.prototype,"type",void 0),(0,o._)([(0,a.qq)()],f.prototype,"valueType",void 0),(0,o._)([(0,u.E)("valueType",["description"])],f.prototype,"readValueType",null),(0,o._)([(0,a.qq)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,o._)([(0,c.c)("esri.layers.support.Field")],f);const h=f},16424:(e,t,i)=>{i.d(t,{c:()=>d});var r=i(20744),o=i(40504),n=i(66360),s=i(86916),a=i(75824),l=i(564),p=i(28484),u=i(39452);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],h(e))}static fromLayerJSON(e){return new d(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=m(t);if(t&&r){const o=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),i.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new r.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),p.Gw):f.has(t.type)?p.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===p.OI?a.qG.instance:t===p.Gw?u.Kq.utcInstance:(0,s.wJ)(c,t,(()=>u._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,l.gP)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",s=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.Mt)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,p.Mt)(o.dateFieldsTimeReference):a??p.Gw:null,u=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,p.Mt)(r.timeReference):a:null,c=new Map([[y(o?.creationDateField??""),l],[y(o?.editDateField??""),l],[y(n),u],[y(s),u]]);for(const{name:r,type:o}of e.fields)if(f.has(o))t.set(r,p.OI);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,p.OI);else{const e=c.get(y(r??""))??a;t.set(r,e)}return t}},24144:(e,t,i)=>{i.d(t,{c:()=>u});var r,o=i(41948),n=i(2952),s=i(40504),a=i(1580),l=(i(9456),i(66360),i(72052),i(12552));let p=r=class extends s.am{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.c}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.qq)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,a.qq)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,a.qq)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=r=(0,o._)([(0,l.c)("esri.layers.support.LayerFloorInfo")],p);const u=p},89812:(e,t,i)=>{i.d(t,{h4:()=>F,i2:()=>x}),i(9456);var r,o=i(41948),n=i(62088),s=i(1580),a=(i(66360),i(9968)),l=i(12552),p=i(40504);i(72052);let u=r=class extends p.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,s.qq)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,o._)([(0,l.c)("esri.layers.support.CodedValue")],u);const c=new(i(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends p.am{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,a.G)(c)],d.prototype,"type",void 0),d=(0,o._)([(0,l.c)("esri.layers.support.Domain")],d);const y=d;var m;let f=m=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,n.ct)(this.codedValues),name:this.name})}};(0,o._)([(0,s.qq)({type:[u],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,o._)([(0,a.G)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=m=(0,o._)([(0,l.c)("esri.layers.support.CodedValueDomain")],f);const h=f;var g;i(20744);let q=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,a.G)({inherited:"inherited"})],q.prototype,"type",void 0),q=g=(0,o._)([(0,l.c)("esri.layers.support.InheritedDomain")],q);const v=q;var w;let _=w=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,o._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,o._)([(0,a.G)({range:"range"})],_.prototype,"type",void 0),_=w=(0,o._)([(0,l.c)("esri.layers.support.RangeDomain")],_);const S=_,x={key:"type",base:y,typeMap:{range:_,"coded-value":h,inherited:v}};function F(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},36408:(e,t,i)=>{i.d(t,{M:()=>r});const r=new(i(14628).O)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},4144:(e,t,i)=>{i.d(t,{GC:()=>x,I5:()=>f,Wi:()=>g,Y$:()=>m,cF:()=>h,wf:()=>q,y6:()=>y});var r=i(88264);const o="__begin__",n="__end__",s=new RegExp(o,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+o,"i"),p=new RegExp(n+"$","i"),u='"',c=u+" + ",d=" + "+u;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function h(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return q(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function q(e){let t;return e?(t=(0,r.qq)(e,(e=>o+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(s,c).replaceAll(a,d)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=w.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},54712:(e,t,i)=>{i.d(t,{S:()=>c});var r=i(9456),o=i(48212);function n(e,t,i){return!!a(e,t,i)}function s(e,t,i){return a(e,t,i)}function a(e,t,i){return e&&e.hasOwnProperty(t)?e[t]:i}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const i=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!i?.includes(t.toLowerCase())}function c(e,t){return{analytics:d(e),attachment:y(e),data:m(e),metadata:f(e),operations:h(e.capabilities,e,t),query:g(e,t),queryRelated:q(e),queryTopFeatures:v(e),editing:w(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,i={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(i[t]=!!e.isEnabled)})),i}function m(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function h(e,t,i){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=i?(0,o.K0)(i):null,a=r.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),l=r.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&r.includes("create"),u=l&&r.includes("delete"),c=l&&r.includes("update");const d=r.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(p||u||c)&&(p=u=c=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:d,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const i=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,c=e.currentVersion,d=t?.includes("MapServer"),y=!d||c>=(0,r.c)("mapserver-pbf-version-support"),m=(0,o.Wq)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(i,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(i,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(i,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(i),supportsCentroid:n(i,"supportsReturningGeometryCentroid",!1),supportsDistance:n(i,"supportsQueryWithDistance",!1),supportsDistinct:n(i,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(i,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(i,"supportsHavingClause",!1),supportsOrderBy:n(i,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(i,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(i,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(i,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(i,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(a,"allowOthersToQuery",!0),supportsHistoricMoment:n(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&f.has("pbf"),supportsDisjointSpatialRelationship:n(i,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(i,"supportsQueryWithCacheHint",!1)||u(i,"query"),supportsDefaultSpatialReference:n(i,"supportsDefaultSR",!1),supportsCompactGeometry:m,supportsFullTextSearch:n(i,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function q(e){const t=e.advancedQueryCapabilities,i=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:i,supportsOrderBy:i,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,i=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(i,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}},21012:(e,t,i)=>{i.d(t,{M:()=>o});var r=i(37924);function o(e,t,i){if(!i?.features||!i.hasZ)return;const o=(0,r.O)(i.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of i.features)o(e.geometry)}},59500:(e,t,i)=>{i.d(t,{c:()=>v});var r,o=i(41948),n=i(60708),s=i(6444),a=i(14628),l=i(40504),p=i(62088),u=i(1580),c=(i(9456),i(66360),i(33600)),d=i(12552),y=i(18996),m=i(56156),f=i(6704),h=i(600);const g=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let q=r=class extends l.am{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=m.c.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],n=s.c.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=i);const l=o.aggregateGeometries,p=n.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.h4)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=m.c.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.ct)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[n,s]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const p=this._getHydrationFunction(e,(e=>e*n+r),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=i(a[1]);e===r&&s===o||(n.push([e-r,s-o]),r=e,o=s)}else r=t(a[0]),o=i(a[1]),n.push([r,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Cs)(e)?e.rings:e.paths,o=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],s=this._quantizePoints(n,t,i);s&&o.push(s)}return o.length>0?((0,f.Cs)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Cs)(e)?e.rings:e.paths;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=i(a)}}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=i(a)}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.qq)({type:String,json:{write:!0}})],q.prototype,"displayFieldName",void 0),(0,o._)([(0,u.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],q.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.qq)({type:[s.c],json:{write:!0}})],q.prototype,"features",void 0),(0,o._)([(0,c.E)("features")],q.prototype,"readFeatures",null),(0,o._)([(0,u.qq)({type:[h.c],json:{write:!0}})],q.prototype,"fields",void 0),(0,o._)([(0,u.qq)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],q.prototype,"geometryType",void 0),(0,o._)([(0,y.G)("geometryType")],q.prototype,"writeGeometryType",null),(0,o._)([(0,u.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],q.prototype,"hasM",void 0),(0,o._)([(0,u.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],q.prototype,"hasZ",void 0),(0,o._)([(0,u.qq)({types:n.Su,json:{write:!0}})],q.prototype,"queryGeometry",void 0),(0,o._)([(0,c.E)("queryGeometry")],q.prototype,"readQueryGeometry",null),(0,o._)([(0,u.qq)({type:m.c,json:{write:!0}})],q.prototype,"spatialReference",void 0),(0,o._)([(0,y.G)("spatialReference")],q.prototype,"writeSpatialReference",null),(0,o._)([(0,u.qq)({json:{write:!0}})],q.prototype,"transform",void 0),q=r=(0,o._)([(0,d.c)("esri.rest.support.FeatureSet")],q),q.prototype.toJSON.isDefaultToJSON=!0;const v=q},45704:(e,t,i)=>{i.d(t,{Sg:()=>u,Uj:()=>p,Uz:()=>l,YP:()=>c}),i(9456);var r=i(47472),o=i(7432),n=i(49736),s=i(28652),a=i(9504);const l=n.c.fromJSON(a.qe),p=o.c.fromJSON(a.MZ),u=r.c.fromJSON(a.yq),c=s.c.fromJSON(a.gF);n.c.fromJSON(a.gP),o.c.fromJSON(a.aV),r.c.fromJSON(a.wp)},9504:(e,t,i)=>{i.d(t,{MZ:()=>n,aV:()=>p,gF:()=>a,gP:()=>l,qe:()=>o,wp:()=>u,yq:()=>s});const r=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);