@arcgis/map-components 5.2.0-next.85 → 5.2.0-next.87

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 (113) hide show
  1. package/dist/cdn/3IY3D62Z.js +2 -0
  2. package/dist/cdn/{YXA3DG4H.js → 3W4IH5LQ.js} +1 -1
  3. package/dist/cdn/5L5UYV3H.js +2 -0
  4. package/dist/cdn/6NGRUK5C.js +2 -0
  5. package/dist/cdn/BPHJ4VBC.js +2 -0
  6. package/dist/cdn/CFB4ZR5F.js +2 -0
  7. package/dist/cdn/D6MRDGUC.js +2 -0
  8. package/dist/cdn/EFUTKX2O.js +2 -0
  9. package/dist/cdn/{PNSES5YC.js → EGUVICJF.js} +1 -1
  10. package/dist/cdn/FXK4G4VK.js +2 -0
  11. package/dist/cdn/GNVPXNTX.js +2 -0
  12. package/dist/cdn/HTEIMRY6.js +2 -0
  13. package/dist/cdn/I2D75Q7M.js +2 -0
  14. package/dist/cdn/IMG5GOJB.js +2 -0
  15. package/dist/cdn/IOZ5U2X7.js +2 -0
  16. package/dist/cdn/K3N6NHJW.js +2 -0
  17. package/dist/cdn/KN4PG54T.js +2 -0
  18. package/dist/cdn/{56NINR5L.js → KNMMVZVV.js} +1 -1
  19. package/dist/cdn/M66G67OC.js +2 -0
  20. package/dist/cdn/MQX2F54G.js +2 -0
  21. package/dist/cdn/NFWFRHUT.js +2 -0
  22. package/dist/cdn/PCEAIDCB.js +2 -0
  23. package/dist/cdn/PMU2DO3P.js +2 -0
  24. package/dist/cdn/{LTGPFC6N.js → PWEF6IKF.js} +1 -1
  25. package/dist/cdn/{HWLBIEGO.js → RS5BEGC5.js} +1 -1
  26. package/dist/cdn/{K4V76SMR.js → TAIZWQYU.js} +1 -1
  27. package/dist/cdn/TCMRGJTC.js +2 -0
  28. package/dist/cdn/TPG3TU6B.js +2 -0
  29. package/dist/cdn/TSZ26CSX.js +2 -0
  30. package/dist/cdn/V4W4ZP6M.js +2 -0
  31. package/dist/cdn/XM2OBGXW.js +2 -0
  32. package/dist/cdn/assets/presentation/t9n/messages.en.json +1 -1
  33. package/dist/cdn/assets/utility-network-picker/t9n/messages.en.json +1 -0
  34. package/dist/cdn/index.js +1 -1
  35. package/dist/cdn/main.css +1 -1
  36. package/dist/chunks/constants2.js +6 -0
  37. package/dist/chunks/useArcgisViewReadyError.js +42 -27
  38. package/dist/components/arcgis-aggregated-features/customElement.js +0 -1
  39. package/dist/components/arcgis-bookmarks/customElement.js +0 -1
  40. package/dist/components/arcgis-feature-next/customElement.js +4 -4
  41. package/dist/components/arcgis-features/customElement.js +3 -3
  42. package/dist/components/arcgis-features-next/customElement.js +98 -86
  43. package/dist/components/arcgis-features-next/index.js +0 -1
  44. package/dist/components/arcgis-grid-controls/customElement.js +1 -1
  45. package/dist/components/arcgis-link-chart/customElement.d.ts +9 -5
  46. package/dist/components/arcgis-link-chart/customElement.js +24 -18
  47. package/dist/components/arcgis-map/customElement.d.ts +9 -5
  48. package/dist/components/arcgis-map/customElement.js +19 -13
  49. package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +0 -2
  50. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +15 -16
  51. package/dist/components/arcgis-paste/customElement.js +0 -1
  52. package/dist/components/arcgis-popup/customElement.d.ts +7 -7
  53. package/dist/components/arcgis-popup/customElement.js +10 -13
  54. package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +6 -0
  55. package/dist/components/arcgis-presentation/customElement.d.ts +8 -6
  56. package/dist/components/arcgis-presentation/customElement.js +206 -165
  57. package/dist/components/arcgis-presentation/index.js +2 -0
  58. package/dist/components/arcgis-presentation-captions/customElement.js +4 -4
  59. package/dist/components/arcgis-presentation-slide-list/customElement.js +49 -0
  60. package/dist/components/arcgis-presentation-slide-list/index.js +3 -0
  61. package/dist/components/arcgis-scene/customElement.d.ts +9 -5
  62. package/dist/components/arcgis-scene/customElement.js +21 -15
  63. package/dist/components/arcgis-template-image/customElement.js +0 -1
  64. package/dist/components/arcgis-time-bar/customElement.js +1 -1
  65. package/dist/components/arcgis-utility-network-picker/customElement.d.ts +56 -0
  66. package/dist/components/arcgis-utility-network-picker/customElement.js +91 -0
  67. package/dist/components/arcgis-utility-network-picker/index.d.ts +1 -0
  68. package/dist/components/arcgis-utility-network-picker/index.js +7 -0
  69. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +0 -1
  70. package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +0 -1
  71. package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +123 -140
  72. package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +2 -1
  73. package/dist/components/arcgis-utility-network-trace-results/customElement.js +0 -2
  74. package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +0 -2
  75. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +0 -2
  76. package/dist/components/arcgis-version-management-service-item/customElement.js +3 -4
  77. package/dist/components/arcgis-video/customElement.d.ts +5 -3
  78. package/dist/components/arcgis-video-player-actions-group/customElement.js +6 -6
  79. package/dist/components/arcgis-video-player-controls-group/customElement.js +1 -1
  80. package/dist/docs/api.json +1 -1
  81. package/dist/docs/docs.json +1 -1
  82. package/dist/docs/vscode.html-custom-data.json +1 -1
  83. package/dist/docs/web-types.json +1 -1
  84. package/dist/index.d.ts +10 -0
  85. package/dist/loader.js +4 -2
  86. package/dist/types/lumina.d.ts +9 -2
  87. package/dist/types/preact.d.ts +10 -2
  88. package/dist/types/react.d.ts +11 -2
  89. package/dist/types/stencil.d.ts +9 -2
  90. package/package.json +7 -7
  91. package/dist/cdn/42TPQKQZ.js +0 -2
  92. package/dist/cdn/4T6ECCFH.js +0 -2
  93. package/dist/cdn/4UBDCXSK.js +0 -2
  94. package/dist/cdn/6MEC4BFN.js +0 -2
  95. package/dist/cdn/AJ7XRBWN.js +0 -2
  96. package/dist/cdn/ARVN7QLQ.js +0 -2
  97. package/dist/cdn/BVDQQOCR.js +0 -2
  98. package/dist/cdn/DKBC3UMW.js +0 -2
  99. package/dist/cdn/DSIL7TYR.js +0 -2
  100. package/dist/cdn/G2PAKIMS.js +0 -2
  101. package/dist/cdn/JOOHHKWH.js +0 -2
  102. package/dist/cdn/KS5TQB2A.js +0 -2
  103. package/dist/cdn/NAQYIBE5.js +0 -2
  104. package/dist/cdn/NBYN44GP.js +0 -2
  105. package/dist/cdn/NGB5WVIG.js +0 -2
  106. package/dist/cdn/PBNP6WFU.js +0 -2
  107. package/dist/cdn/RDARV7HC.js +0 -2
  108. package/dist/cdn/RXAUCQQC.js +0 -2
  109. package/dist/cdn/S22ZRUS7.js +0 -2
  110. package/dist/cdn/SVOAX4K6.js +0 -2
  111. package/dist/cdn/TI4BX367.js +0 -2
  112. package/dist/cdn/W5WXJT7N.js +0 -2
  113. package/dist/cdn/YTC3XBSZ.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import j from"./TIOCQR7Z.js";import i from"./SUUKWB22.js";import"./LTOXLO3L.js";import e from"./3T7L7UT5.js";import{a as F}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{e as E,g as P}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as k}from"./4W3T75SY.js";import{L as h,M as g,N as M,O as v,P as D,T as A,a as z,b,w as f}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([H,{stripHTML:B},{watch:p},V,,,,$,,L])=>{var R=z`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-spacing-lg) var(--calcite-spacing-lg) var(--calcite-spacing-xxxl) var(--calcite-spacing-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-spacing-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-spacing-xs));opacity:0}to{transform:translate(0);opacity:1}}`;function w(_){return _&&Number.parseInt(_.replaceAll(/[^-\d.]/gu,""),10)||0}var I=$(H),N={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends M{constructor(){super(...arguments),this._direction=E(),this._featuresComponent=h(),this._dockAction=new V({id:"popup-dock-action"}),this._mainContainerNode=h(),this._pointerNode=h(),this.messages=F(),this.viewModel=I(this),this._containerNode=h(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this.screenLocation=L(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.featureStream=this.viewModel.featureStream,this.focusTrapDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=P()("active","collapsed","currentAlignment","dockEnabled","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=f(),this.arcgisClose=f(),this.arcgisTriggerAction=f()}static{this.properties={screenLocation:16,positionStyle:16,_featureNavigationTop:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,effectiveHeading:32,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,featureStream:0,focusTrapDisabled:5,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,promises:0,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=R}get trackLocation(){return this.active&&!this.dockEnabled}get _featureNavigationTop(){let{currentAlignment:t,currentDockPosition:e}=this;return t==="bottom-left"||t==="bottom-center"||t==="bottom-right"||t==="bottom-start"||t==="bottom-end"||e==="top-left"||e==="top-center"||e==="top-right"||e==="top-start"||e==="top-end"}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||N}set dockOptions(t){let e={...N},o=this.viewModel?.view?.breakpoints,i={};o&&(i.width=o.xsmall,i.height=o.xsmall);let a={...e,...t},n={...e.breakpoint,...i},{breakpoint:r}=a;typeof r=="object"?a.breakpoint={...n,...r}:r&&(a.breakpoint=n),this._dockOptions=a}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async fetchFeatures(t,e){await this._featuresComponent.value?.fetchFeatures(t,e)}async next(){this.viewModel.next()}async previous(){this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._syncPopupResizeObserver()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.viewModel?.view?.widthBreakpoint,this.dockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),p(()=>[this.dockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),p(()=>[this.dockOptions,this._featuresComponent.value],()=>{let{_dockAction:t,dockOptions:e}=this,o=this._featuresComponent.value?.headerActions;o?.remove(t),e.buttonEnabled&&o?.add(t)},{initial:!0}),p(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this.dockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),p(()=>this._mainContainerNode.value,t=>{this._syncPopupResizeObserver(t)},{initial:!0}),p(()=>this.viewModel?.view?.size,(t,e)=>this._updateDockEnabledForViewSize(t,e)),p(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),p(()=>this.view?.map,t=>{this.viewModel.map=t},{initial:!0}),p(()=>this.screenLocation,(t,e)=>this._autoClose(t,e)),p(()=>[this.active,this._containerNode.value,this.dockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._popupResizeObserver.disconnect()}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this.dockEnabled&&!this.topLayerDisabled)}_syncPopupResizeObserver(t=this._mainContainerNode.value){this._popupResizeObserver.disconnect(),t&&this._popupResizeObserver.observe(t)}_handleClose(t){t.stopPropagation(),this.arcgisClose.emit()}_autoClose(t,e){this.autoCloseEnabled&&t!=null&&e!=null&&(this.open=!1)}_handleArcgisPropertyChange(t){t.detail.name==="collapsed"&&(this.collapsed=t.target.collapsed)}_handleArcgisTriggerAction(t){t.stopPropagation(),t.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:t.detail.action})}_isOutsideView(t){let{popupHeight:e,popupWidth:o,screenLocation:i,side:a,view:n}=t;return Number.isNaN(o)||Number.isNaN(e)||!n||!i?!1:a==="right"&&i.x+o/2>n.width||a==="left"&&i.x-o/2<0||a==="top"&&i.y-e<0||a==="bottom"&&i.y+e>n.height}_getPointerSize(){let{_pointerNode:t}=this,e=t.value?window.getComputedStyle(t.value):null,o=w(e?.height),i=w(e?.width);return Math.hypot(o,i)}_calculateAutoAlignment(t){if(t!=="auto")return t;let{_mainContainerNode:e,_popupRect:o,viewModel:i}=this,{view:a}=i,{screenLocation:n}=this;if(n==null||!a||!o||!e.value)return"top-center";let r=window.getComputedStyle(e.value),l=w(r.maxHeight),s=w(r.height),c=this._getPointerSize(),{height:d,width:y}=o,u=y+c,m=Math.max(d,l,s)+c,O=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"right",view:a}),S=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"left",view:a}),x=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"top",view:a}),T=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"bottom",view:a});return S?x?"bottom-right":"top-right":O?x?"bottom-left":"top-left":x?T?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(t){return typeof t=="function"?t.call(this):t}_getCurrentAlignment(){return this.dockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(t){return typeof t=="function"?t.call(this):t}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this.dockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(t){if(t!=="auto")return t;let e=this.viewModel?.view,o="top-end";if(!e)return o;let{breakpoints:i}=e;return i?.xsmall&&e.width<=i.xsmall?"bottom-center":o}_getDockIcon(){let t=this._getDockPosition(),{_direction:e}=this;if(this.dockEnabled)return"minimize";switch(t){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return e==="rtl"?"dock-right":"dock-left";default:return e==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this.dockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(t,e,o,i){if(t<0||e<0||!o||!i||t>o.width||e>o.height)return;let{topLayerDisabled:a}=this,n=a?t:t+o.x,r=a?e:e+o.y,{_direction:l,currentAlignment:s}=this,c=this._getPointerSize(),d=c/2;if(s==="top-left"||s==="top-start"&&l==="ltr"||s==="top-end"&&l==="rtl")return{top:r-(i.height+d),left:n-i.width-d};if(s==="top-center")return{top:r-(i.height+c),left:n-i.width/2};if(s==="top-right"||s==="top-end"&&l==="ltr"||s==="top-start"&&l==="rtl")return{top:r-(i.height+d),left:n+d};if(s==="bottom-left"||s==="bottom-start"&&l==="ltr"||s==="bottom-end"&&l==="rtl")return{top:r+d,left:n-i.width-d};if(s==="bottom-center")return{top:r+c,left:n-i.width/2};if(s==="bottom-right"||s==="bottom-end"&&l==="ltr"||s==="bottom-start"&&l==="rtl")return{top:r+d,left:n+d}}_getPositionStyleValue(t){return t!=null?`${t}px`:"auto"}_calculatePositionStyle(){if(this.dockEnabled)return;let{screenLocation:t}=this;if(t==null)return;let e=this.view?.container?.getBoundingClientRect(),o=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=o;let i=this._calculateAlignmentPosition(t.x,t.y,e,o);if(i)return`inset: ${this._getPositionStyleValue(i.top)} ${this._getPositionStyleValue(i.right)} ${this._getPositionStyleValue(i.bottom)} ${this._getPositionStyleValue(i.left)};`}_dockingThresholdCrossed(t,e,o){let[i,a]=t,[n,r]=e,{width:l=0,height:s=0}=o??{};return i<=l&&n>l||i>l&&n<=l||a<=s&&r>s||a>s&&r<=s}_updateDockEnabledForViewSize(t,e){if(!t||!e||!this.viewModel?.view?.ready)return;let{dockOptions:o}=this,i=o.breakpoint;typeof i=="object"&&this._dockingThresholdCrossed(t,e,i)&&this._setDockEnabledForViewSize(o)}_shouldDockAtCurrentViewSize(t){let e=t.breakpoint,o=this.viewModel?.view?.ui;if(!o)return!1;let{width:i,height:a}=o;if(Number.isNaN(i)||Number.isNaN(a)||typeof e!="object")return!1;let n=typeof e.width=="number"&&i<=(e.width??0),r=typeof e.height=="number"&&a<=(e.height??0);return n||r}_setDockEnabledForViewSize(t){this.viewModel?.view?.ready&&typeof t.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(t))}render(){let{_direction:t,dockEnabled:e,currentAlignment:o,currentDockPosition:i,positionStyle:a}=this,{active:n,view:r}=this.viewModel,l=n&&e,s=n&&!e,c=r?.widthBreakpoint,d=r?.heightBreakpoint,y={"aligned-top-center":o==="top-center","aligned-bottom-center":o==="bottom-center","aligned-top-left":o==="top-left"||o==="top-start"&&t==="ltr"||o==="top-end"&&t==="rtl","aligned-bottom-left":o==="bottom-left"||o==="bottom-start"&&t==="ltr"||o==="bottom-end"&&t==="rtl","aligned-top-right":o==="top-right"||o==="top-end"&&t==="ltr"||o==="top-start"&&t==="rtl","aligned-bottom-right":o==="bottom-right"||o==="bottom-end"&&t==="ltr"||o==="bottom-start"&&t==="rtl","is-docked":l,shadow:s,"is-rtl":this._direction==="rtl","is-docked-top-start":i==="top-start","is-docked-top-end":i==="top-end","is-docked-top-left":i==="top-left","is-docked-top-center":i==="top-center","is-docked-top-right":i==="top-right","is-docked-bottom-left":i==="bottom-left","is-docked-bottom-center":i==="bottom-center","is-docked-bottom-right":i==="bottom-right","is-docked-bottom-start":i==="bottom-start","is-docked-bottom-end":i==="bottom-end","is-xl-width-breakpoint":c==="xlarge","is-lg-width-breakpoint":c==="large","is-md-width-breakpoint":c==="medium","is-sm-width-breakpoint":c==="small","is-xs-width-breakpoint":c==="xsmall","is-xl-height-breakpoint":d==="xlarge","is-lg-height-breakpoint":d==="large","is-md-height-breakpoint":d==="medium","is-sm-height-breakpoint":d==="small","is-xs-height-breakpoint":d==="xsmall"};return b`<div style=${D(a)} class=${v(k("root",y,{hidden:!n||!a&&!e}))} .ariaHidden=${!n} .ariaLabel=${B(this.heading??"")} role=dialog popover=manual ${g(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this.dockEnabled||!this.active?b`<div class="pointer" role=presentation><div class=${v(k("pointer-direction","shadow"))} ${g(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let t={shadow:this.dockEnabled},e={...this.messageOverrides,collapse:this.messageOverrides?.collapse??this.messages.collapse,expand:this.messageOverrides?.expand??this.messages.expand};return b`<div class=${v(k("main-container",t))} ${g(this._mainContainerNode)}><arcgis-features-next .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .focusTrapEnabled=${!this.focusTrapDisabled} .headingLevel=${this.headingLevel} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .messageOverrides=${e} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${g(this._featuresComponent)}><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-features-next></div>`}};A("arcgis-popup",C);return C},"popup/FeatureContentCollection","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,c,d,e,i,j)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import g from"./7HL2TQ7E.js";import f from"./MZWO5JYA.js";import e from"./3T7L7UT5.js";import{a as D}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as _}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as C}from"./4W3T75SY.js";import{M as y,N as I,O as M,Q as b,T as x,a as $,b as r,w}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:N},B,{watch:H},{stripHTML:Z},P,,,,R,,{a:F,b:L,c:E,d:T,e:A,i:V,p:l}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=D(),this._rootFlowNode=null,this.internalFlowItems=new B,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return E(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return T(this.graphic)}get fieldInfoMap(){return F(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=r`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return r`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return r`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:r`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return r`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(V(f)||A(f)||f in a)),u=o?.expressionInfos,m=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return r`<arcgis-feature-content .creator=${l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .layer=${n} .map=${this.map??void 0} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return r`<arcgis-feature-content .creator=${l({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,state:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:r`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${a} .heading=${d?void 0:Z(o)} .selected=${!i.length}>${!d&&o?r`<div slot=heading><div .innerHTML=${N.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>r`<calcite-flow-item @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=k(n??"",{date:a,user:s});return r`<div class=${M(C("last-edited-info","content-element"))}>${o}</div>`}};x("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/FeatureContent",a,c,d,e,f,g)
2
+ import g from"./7HL2TQ7E.js";import f from"./MZWO5JYA.js";import e from"./3T7L7UT5.js";import{a as D}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as _}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as C}from"./4W3T75SY.js";import{M as y,N as I,O as M,Q as b,T as x,a as $,b as r,w}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:N},B,{watch:H},{stripHTML:Z},P,,,,R,,{a:F,b:E,c:L,d:T,e:A,i:V,p:l}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=D(),this._rootFlowNode=null,this.internalFlowItems=new B,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return L(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return T(this.graphic)}get fieldInfoMap(){return F(E(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=r`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return r`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return r`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:r`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return r`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(V(f)||A(f)||f in a)),u=o?.expressionInfos,m=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return r`<arcgis-feature-content .creator=${l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .layer=${n} .map=${this.map??void 0} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return r`<arcgis-feature-content .creator=${l({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,state:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:r`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} .loading=${s==="loading"} .headingLevel=${a} .heading=${d?void 0:Z(o)} .selected=${!i.length}>${!d&&o?r`<div slot=heading><div .innerHTML=${N.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>r`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=k(n??"",{date:a,user:s});return r`<div class=${M(C("last-edited-info","content-element"))}>${o}</div>`}};x("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/FeatureContent",a,c,d,e,f,g)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ var s="arcgis-presentation-slide-list-action";export{s as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as he,b as ce,c as me}from"./VDTRRLON.js";import c from"./3WTBTYMS.js";import b from"./3NWZC6DC.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as se}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as H,M as U,N as ie,T as oe,a as ee,b as O,o as te}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,pe,Z,W,Le,X,{createSphere:Re},Fe,Ne,$e,{b:I,d:ae,e:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Re(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function qe(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=qe(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Ae({components:[y],vertexAttributes:new Le({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},q=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},J=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Pe({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new q({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&Je(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Fe({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new J(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Extent","geometry/Mesh","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","layers/ImageryTileLayer","symbols/Font","symbols/TextSymbol",a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./MZWO5JYA.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as C}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as y,M as d,N as f,T as b,a as p,b as r,o,q as g,r as v,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([E,{a:R},{b:$,e:w}])=>{var x=p`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,u={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},m=class extends f{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#c=!0,this.#t=[],this.#s=y(),this.#a=new Map,this.#o=new Map,this.#i=new Map,this.#r=new Map,this.#l=[],this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=h(),this.arcgisHideGraphicsChange=h(),this.arcgisSelectedResultTypeChange=h(),this.arcgisTraceResultFeaturesReady=h()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=x}#c;#t;#n;#s;#a;#o;#i;#r;#l;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#n?.destroy()}async destroy(){this.#a.clear(),this.#i.clear(),this.#r.clear(),this.#n?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this.#$(),this.#f().then(()=>this.#b()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this.#t=[]))}loaded(){this.traceResult&&(this.utilityNetwork||o("warn",this,g("utilityNetwork")),this.layers.length||o("warn",this,v("layers")),this.view||o("warn",this,g("view")))}disconnectedCallback(){super.disconnectedCallback(),this.#o.clear()}#g(e){e&&(this.#n=e)}#u(e){e&&(this._featuresComponentElement=e)}async#m([e,t]){let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#p(a),i=this.#v(t);if(a==null||!s){this.#t.push(...i);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=i.map(n=>n.objectId),l.outFields=["*"];let{features:c}=await $(s,l);c.forEach(n=>{let k=n.layer;n.getEffectivePopupTemplate(this.#c)||(n.popupTemplate=k.createPopupTemplate())}),w(s)?c.forEach(n=>this.#h(this.#i,n.layer.subtypeCode,n)):this.#a.set(a,c)}#h(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}#p(e){if(e==null)return;let t=this.#o,a=this.#l,s=t.get(e);if(s)return s;if(!a)return;let i=a.find(l=>"layerId"in l&&l.layerId===e);return i&&t.set(e,i),i}#v(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#y(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this.#s.value?.open&&(this.#s.value.open=!1)}async#f(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this.#l=e.filter(s=>t.isUtilityLayer(s));let a=this.#l.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async#b(){let e=Array.from(this.#r.entries());if(!e.length)return;this.state="loading";let t=e.map(i=>this.#m(i));(await Promise.allSettled(t)).forEach((i,l)=>{if(i.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${i.reason}`)}});let a=Array.from(this.#a.values()),s=Array.from(this.#i.values());this.traceResultFeatures=a.concat(s).flat()}#$(){this.traceResult.elements?.forEach(e=>this.#h(this.#r,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this.#G(e);if(!t)return this.#A();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,l=!a.length&&!s.length&&!i,c=a.length>0&&!s.length&&!i;return l?this.#_():this.state==="loading"?this.#w():this.hideFeatureResults&&c?this.#k():this.isElementsSelected||c?r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${c} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#u)}></arcgis-features-next>`:this.#R(t)}#w(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}#R(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this.#e()}${s!=null?this.#C(s):null}${s!=null&&!t.length?this.#E():null}${t.length>0?this.hideFeatureResults?this.#d():this.#x():null}${a.length>0?this.#F(a):null}</calcite-panel>`}#C(e){let{_aggregatedGeometryDisabled:t,aggregatedGeometryGraphicsColor:a,_messages:s}=this;return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${a} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#y} auto-destroy-disabled ${d(this.#g)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor} .color=${a.toCss()} .disabled=${t}></calcite-swatch><calcite-popover .heading=${s.headings.setColor} .label=${s.headings.setColor} reference-element=geometry-color-swatch closable ${d(this.#s)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${a} @calciteColorPickerChange=${i=>{let l=i.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(l)}} .disabled=${t}></calcite-color-picker></calcite-popover></div>`}#k(){return r`<calcite-panel class="white-panel-background">${this.#e()}${this.#d()}</calcite-panel>`}#d(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}#E(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#x(){let{_messages:e}=this;return r`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}#F(e){let{_messages:t}=this;return r`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter(a=>a.networkAttributeName!=null&&a.result!=null&&a.functionType!=null).map(a=>{let{functionName:s,networkAttributeName:i,functionType:l,result:c}=a,n=s||`${i} ${l}`;return r`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${c}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}#e(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}#G(e){let{_messages:t}=this,a=e.message;switch(e.details?.raw?.extendedCode){case u.dirtyAreasDiscovered:a=t.traceErrors.dirtyAreasDiscovered;break;case u.noValidControllers:a=t.traceErrors.noValidControllers;break;case u.pathNotFound:a=t.traceErrors.pathNotFound;break}return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${a}</div></div></calcite-panel>`}#_(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div></calcite-panel>`}#A(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div></calcite-panel>`}};b("arcgis-utility-network-trace-results",m);return m},"Color",a,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as g}from"./LTOXLO3L.js";import i from"./FHWOIM57.js";import"./VJVKFKSG.js";import f from"./3T7L7UT5.js";import{a as v}from"./2BVXNQ3U.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{M as h,N as m,T as y,a as p,b as a,o as d,w as n}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([$,{when:_},T,,,,f,{a:b}])=>{var x=p`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs-next[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,R=f(T),u=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#t=R(this),this.#s=[],this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new $([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideFeatureResults=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=n(),this.arcgisReady=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisTraceResultClear=n(),this.arcgisTraceResultFeaturesReady=n()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_mode:16,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideFeatureResults:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=x}#t;#e;#i;get#c(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#o;#s;get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){this.#n(),this.#i?.destroy(),this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[_(()=>!this.#t.utilityNetwork,()=>this.#a("input"))])}#r(){this._traceResult=void 0,this.#n(),this.#g()}#l(){if(!this.#e)return;let{traceLocations:t,traceLocationFlagInfos:e,traceConfiguration:s,isSubnetworkNameTraceSelected:i}=this.#e,c=!!s?.subnetworkName,o=t?.some(r=>r.type==="starting-point"),l=e?.some(r=>!!r.flagProperties.terminalConfiguration&&!r.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!i&&!o||i&&!c,this._showMissingTerminalWarning=l}#a(t){this._activeTab=t}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}#n(){this.#s.forEach(t=>t.remove()),this.#s=[]}#g(){this.#i?.clearAggregatedGeometryGraphics()}#u(){let{_traceResult:t,view:e}=this,s=this.#t.utilityNetwork;!s||!t?.elements||!e||s.getObjectIdsFromElements(t.elements).forEach(i=>{let c=e.allLayerViews.find(l=>{let r=l.layer;if(s.isUtilityLayer(r)){let w=Number(i.layerUrl.split("/").pop());return r.layerId===w}return!1});if(!c)return;let o=c.highlight(i.objectIds);this.#s.push(o)})}async#p(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){d("error",this,"Trace configuration not found");return}let s=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:s??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference}),this.disableHighlightFeatureResults||this.#u()}catch(i){b(i,this,"Error while running trace"),this._traceError=i,this._traceResult=void 0}}#d(){this.#l(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#r(),this.#a("results"),this.#p())}#m(t){t&&(this.#e=t)}#y(t){t&&(this.#i=t)}#b(t){t.stopPropagation(),this.arcgisHideGraphicsChange.emit(t.detail)}#v(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#w(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#$(t){let e=t.detail;this.aggregatedGeometryGraphicsColor=e}#_(){this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1}#T(){this.#t.utilityNetwork=this.#e?.selectedUtilityNetwork}#x(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#R(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#k(){return g(`${this.el.id}__results-tab-item`,a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"?a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`:a`<arcgis-utility-network-trace-results-next .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#o?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#$} @arcgisHideGraphicsChange=${this.#b} @arcgisTraceResultFeaturesReady=${this.#w} ${h(this.#y)}></arcgis-utility-network-trace-results-next>`}</calcite-tab>`)}#S(){let{_messages:t,_traceResult:e}=this,s=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",i=this.#i?.numResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#a("input"),this.#r(),this.arcgisTraceResultClear.emit()}} .disabled=${!s} slot=footer>${i>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",i.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#C(){let{_mode:t}=this,{loadError:e}=this.#t,s=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#R()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#x()||""}<arcgis-utility-network-trace-inputs-next .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="mode"&&(this._mode=i.target.mode)}} @arcgisSelectedNamedTraceConfigurationChange=${this.#_} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationSelectStart=${this.#v} @arcgisUtilityNetworkChange=${this.#T} ${h(this.#m)}></arcgis-utility-network-trace-inputs-next>`;return g(`${this.el.id}__inputs-tab-item`,a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`)}#N(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#d} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#a("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#a("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#C()}${this.#k()}</calcite-tabs>${t==="input"?this.#N():null}${t==="results"?this.#S():null}</calcite-panel>`}};y("arcgis-utility-network-trace-analysis-next",u);return u},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,c,e,f,i)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as g}from"./2BVXNQ3U.js";import{g as m}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as d,T as n,a as c,b as r,o,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([k,{watch:y},{a:a}])=>{var u=c`:host{height:100%;flex-grow:1}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-label{margin:0 var(--calcite-space-md)}calcite-block calcite-notice{margin:var(--calcite-space-md) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}`,l=class extends d{constructor(){super(...arguments),this._messages=g({blocking:!0}),this.hideErrors=!1,this.hideLoader=!1,this.state="loading",this.arcgisPropertyChange=m()("selectedUtilityNetwork","state"),this.arcgisError=h()}static{this.properties={_utilityNetworks:16,view:0,hideErrors:5,hideLoader:5,state:1,error:1,selectedUtilityNetwork:0,heading:1}}static{this.styles=u}load(){this.#e(),this.manager.onLifecycle(()=>[y(()=>this.view?.map,()=>this.#e())])}willUpdate(t){t.has("_utilityNetworks")&&this.#s(),t.has("selectedUtilityNetwork")&&this.#r()}#t(t){this.error=t,this.state="error",this.arcgisError.emit()}#e(){if(this.error=void 0,this.state="loading",!this.view?.map){o("error",this,this._messages.errors.noView),this._utilityNetworks=void 0,this.#t(this._messages.errors.noView);return}let t=this.view.map;this.#i(t)}async#i(t){try{t.loaded||await t.load()}catch(e){this.#t(this._messages.errors.mapLoadFailed),a(e,this,this._messages.errors.mapLoadFailed)}finally{this._utilityNetworks=t.utilityNetworks||new k}}#s(){let{selectedUtilityNetwork:t,_utilityNetworks:e}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(this.#t(this._messages.errors.noUtilityNetwork),o("error",this,this._messages.errors.noUtilityNetwork),this.selectedUtilityNetwork=void 0)}async#r(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load(),this.state="ready"}catch(e){a(e,this,this._messages.errors.utilityNetworkLoadFailed),this.#t(this._messages.errors.utilityNetworkLoadFailed)}}#o(){return this.hideLoader?null:r`<calcite-loader label=loading></calcite-loader>`}#a(t,e=!1,i){return this.hideErrors?null:r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#l(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let s=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(w=>w.id===s))}}>${e}</calcite-combobox>`}#c(){let{selectedUtilityNetwork:t}=this;return r`<calcite-label>${t?.title}</calcite-label>`}#h(t){let e=this._messages.labels.utilityNetwork,i=this.heading||e,s=this._utilityNetworks?.length?this._utilityNetworks?.length===1?this.#c():this.#l():void 0;return r`<calcite-block .heading=${i} .label=${e} expanded>${s}${t}</calcite-block>`}render(){let{error:t,state:e,selectedUtilityNetwork:i}=this,s=e==="error"&&t?this.#a(t,!1,"exclamation-mark-triangle"):void 0;return!s&&!i?.loaded&&!i?.loadError?this.#o():e==="error"&&s&&!this._utilityNetworks?.length?s:this.#h(s)}};n("arcgis-utility-network-picker",l);return l},"core/Collection","core/reactiveUtils",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./TSZ26CSX.js";import{a as y}from"./MZBCC5YA.js";import{a as p}from"./TN5C3MSL.js";import{a as d}from"./BXP5RGPD.js";import e from"./2FM2FJAY.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as n,M as o,N as c,O as h,T as v,b as a,w as r}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:s},E,_,A,{d:u,e:g},{a:e,b:w,f:m},{a:b,b:f,c:V,d:C}])=>{var R=w(_,{}),D=w(E,{}),l=class extends c{constructor(){super(),this._attributionMode=null,this._containerRef=n(),this._mapRef=n(),this._uiController=new b(this),this.extraContent=new A,this.arcgisLoadError=V(this),this.arcgisViewReadyError=C(this),this._map=R(this),this.view=D(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),f(this),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[d,y]}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get center(){return this.view.center}set center(i){let t=g(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){m(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(i){u(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(i,t){return this.view.fetchPopupFeatures(i,t)}async destroy(){await this.manager.destroy()}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${h(p.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(p.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",l);return l},"core/reactiveUtils","views/MapView","WebMap","core/Collection",b,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import f from"./3T7L7UT5.js";import{a as k}from"./2BVXNQ3U.js";import{a as _}from"./JD74LG7K.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as C}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as g}from"./4W3T75SY.js";import{A as y,M as u,N as $,O as d,Q as h,T as S,a as w,b as a,w as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,p,{substitute:O},{watch:R},z,,,,M])=>{function D(o){if(o==null||Number.isNaN(o))return 0;let e=o+180;return Math.trunc(E(e,360))}function L(o){let e=o;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:E(Math.trunc(e),360)-180}function E(o,e){return(o%e+e)%e}var I={fromAttribute:o=>p.fromHex(o),toAttribute:o=>typeof o=="string"?o:o?.toHex()??""},B=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.root{user-select:none;display:flex;flex-flow:column wrap;padding:var(--arcgis-internal-padding);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,m={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},b=p.fromArray([115,115,115]),v=p.fromArray([200,200,200]),N=["interactive","place","rotate"],W=M(z),f=class extends ${constructor(){super(...arguments),this._labelUid=y(),this._messages=k({}),this._viewModel=W(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=m.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=C()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=x()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,icon:1,customColor:[3,{converter:I}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:I}],displayEnabled:36,gridOutOfScale:39,unit:1,dynamicScaling:5,gridControlsEnabled:36,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=B}get theme(){let e=this.gridColor;return!e||b.equals(e)?"dark":v.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=b;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new P().accentColor),this.gridColor=this.customColor;break;default:this.gridColor=v;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof p?e:typeof e=="string"?p.fromHex(e):null;i&&!b.equals(e)&&!v.equals(i)?this.customColor=i:b.equals(i)?this.theme="dark":v.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return a`<div class=${d(g("root",_.widget,_.panel))}><div class="container">${this._viewModel.destroyed?null:this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:r,hideGridSnapEnabledToggle:n,hideDynamicScaleToggle:l,hideRotateWithMapToggle:c,hideColorSelection:s}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),r?void 0:this._renderIntervalInput(),!n&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),c?void 0:this._renderRotateToggle(),s?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,r=i||!t;return a`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-disabled layout=horizontal>${N.map(n=>this._renderPlacementModeButton(n,r,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let r=this._messages?.placementState?.[e],n=this._placementModeButtonRefs.get(e);return a`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${m.placementState[e]} data-placement-action=${e??h} @click=${()=>this._togglePlacementState(e)} .text=${r??""} ${u(this._setPlacementButtonRef)}></calcite-action>${n?a`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${n}>${r}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:r,gridControlsEnabled:n}=this,l=t!=null&&t!==i;return a`<div class=${d(g("numeric-inputs-container"))}>${[r?a`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?a`<calcite-icon class=${d(g("inline-icon"))} .icon=${m.warning} scale=s tabindex=0 ${u(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!n} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:c})=>{let s=Number.parseFloat(c.value);this.spacing=s,s!==this.spacing&&(c.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?a`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${O(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,a`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!n} integer number-button-type=none suffix-text=\u00B0 .value=${`${D(e)}`} @calciteInputNumberChange=${({currentTarget:c})=>this.rotation=L(c.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return a`<div class=${d(g("numeric-inputs-container"))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let r=Number.parseInt(t.value,10);this.majorLineInterval=r,r!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${r=>{r.stopPropagation(),this.snappingOptions?.set("gridEnabled",r.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:r}=this,n=!this.hideOutOfScaleWarning&&i;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!r} .hint=${n?e?.warnings?.outOfScale:void 0} .hintIcon=${m.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return a`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return a`<div class="switch--bordered"><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return a`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class="tile-group">${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?a`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=p.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:r}=e,n=this._messages?.gridTheme?.[r],l=`${this._labelUid}--theme_tile_${r}`,c=`${l}__label`,s=m.gridTheme[r];return a`<div class=${d(g({tile:!0,disabled:!t}))} role=button ${u(r==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${c??h} .checked=${i===r} .disabled=${!t} id=${l??h} .name=${`${this._labelUid}--theme`} @change=${T=>{this.theme=r,T.currentTarget.focus()}} tabindex=0 type=radio><div class="content"><calcite-icon .icon=${s} scale=l></calcite-icon><calcite-label .for=${l} id=${c??h}>${n}</calcite-label></div></div>`}};S("arcgis-grid-controls",f);return f},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",b,c,e,f)
2
+ import f from"./3T7L7UT5.js";import{a as k}from"./2BVXNQ3U.js";import{a as _}from"./JD74LG7K.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as C}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as g}from"./4W3T75SY.js";import{A as y,M as u,N as $,O as d,Q as h,T as S,a as w,b as a,w as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,p,{substitute:O},{watch:R},z,,,,M])=>{function D(o){if(o==null||Number.isNaN(o))return 0;let e=o+180;return Math.trunc(E(e,360))}function L(o){let e=o;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:E(Math.trunc(e),360)-180}function E(o,e){return(o%e+e)%e}var I={fromAttribute:o=>p.fromHex(o),toAttribute:o=>typeof o=="string"?o:o?.toHex()??""},B=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.root{user-select:none;display:flex;flex-flow:column wrap;padding:var(--arcgis-internal-padding);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,m={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},b=p.fromArray([115,115,115]),v=p.fromArray([200,200,200]),N=["interactive","place","rotate"],W=M(z),f=class extends ${constructor(){super(...arguments),this._labelUid=y(),this._messages=k({}),this._viewModel=W(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=m.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=C()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=x()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,icon:1,customColor:[3,{converter:I}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:I}],displayEnabled:36,gridOutOfScale:39,unit:1,dynamicScaling:5,gridControlsEnabled:36,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=B}get theme(){let e=this.gridColor;return!e||b.equals(e)?"dark":v.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=b;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new P().accentColor),this.gridColor=this.customColor;break;default:this.gridColor=v;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof p?e:typeof e=="string"?p.fromHex(e):null;i&&!b.equals(e)&&!v.equals(i)?this.customColor=i:b.equals(i)?this.theme="dark":v.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return a`<div class=${d(g("root",_.widget,_.panel))}><div class="container">${this._viewModel.destroyed?null:this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:r,hideGridSnapEnabledToggle:n,hideDynamicScaleToggle:l,hideRotateWithMapToggle:c,hideColorSelection:s}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),r?void 0:this._renderIntervalInput(),!n&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),c?void 0:this._renderRotateToggle(),s?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,r=i||!t;return a`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-toggle-disabled layout=horizontal>${N.map(n=>this._renderPlacementModeButton(n,r,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let r=this._messages?.placementState?.[e],n=this._placementModeButtonRefs.get(e);return a`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${m.placementState[e]} data-placement-action=${e??h} @click=${()=>this._togglePlacementState(e)} .text=${r??""} ${u(this._setPlacementButtonRef)}></calcite-action>${n?a`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${n}>${r}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:r,gridControlsEnabled:n}=this,l=t!=null&&t!==i;return a`<div class=${d(g("numeric-inputs-container"))}>${[r?a`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?a`<calcite-icon class=${d(g("inline-icon"))} .icon=${m.warning} scale=s tabindex=0 ${u(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!n} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:c})=>{let s=Number.parseFloat(c.value);this.spacing=s,s!==this.spacing&&(c.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?a`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${O(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,a`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!n} integer number-button-type=none suffix-text=\u00B0 .value=${`${D(e)}`} @calciteInputNumberChange=${({currentTarget:c})=>this.rotation=L(c.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return a`<div class=${d(g("numeric-inputs-container"))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let r=Number.parseInt(t.value,10);this.majorLineInterval=r,r!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${r=>{r.stopPropagation(),this.snappingOptions?.set("gridEnabled",r.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:r}=this,n=!this.hideOutOfScaleWarning&&i;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!r} .hint=${n?e?.warnings?.outOfScale:void 0} .hintIcon=${m.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return a`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return a`<div class="switch--bordered"><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return a`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class="tile-group">${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?a`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=p.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:r}=e,n=this._messages?.gridTheme?.[r],l=`${this._labelUid}--theme_tile_${r}`,c=`${l}__label`,s=m.gridTheme[r];return a`<div class=${d(g({tile:!0,disabled:!t}))} role=button ${u(r==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${c??h} .checked=${i===r} .disabled=${!t} id=${l??h} .name=${`${this._labelUid}--theme`} @change=${T=>{this.theme=r,T.currentTarget.focus()}} tabindex=0 type=radio><div class="content"><calcite-icon .icon=${s} scale=l></calcite-icon><calcite-label .for=${l} id=${c??h}>${n}</calcite-label></div></div>`}};S("arcgis-grid-controls",f);return f},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",b,c,e,f)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import k from"./MZWO5JYA.js";import j from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as $}from"./2BVXNQ3U.js";import i from"./YHNRTH56.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import e from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{A as w,N as x,Q as g,T as f,a as b,b as a,o as c,q as h,w as d}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOwningPortalUrl:C,hasUserTypeExtension:I},{on:E,watch:T,whenOnce:L},D,{getVersioningStates:q},,{a:_},{a:k,b:l,d:N,e:V},{c:v}])=>{var B=b`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}calcite-block{margin:0;border-bottom:none}calcite-combobox{margin-bottom:var(--calcite-spacing-sm)}calcite-icon{width:32px}`,p={noDirtyAreasInExtent:-2147208940,operationOnlyAllowedByOwner:-2147217144,cannotAcquireVersionLockV10:-2147217146,cannotAcquireVersionLockV11:-2147220947},m=class extends x{constructor(){super(...arguments),this._messages=$({blocking:!0}),this.#o=`unvnt_${w()}`,this.disabled=!1,this.disableExecuteOnDefaultVersion=!1,this.extentToValidate="current",this.hideUtilityNetworkSelect=!1,this.state={type:"disabled"},this.view=_(this),this.arcgisReady=d(),this.arcgisValidateNetworkTopologyEnd=d(),this.arcgisValidateNetworkTopologyStart=d()}static{this.properties={beforeValidateNetworkTopologyStart:0,disabled:5,disableExecuteOnDefaultVersion:5,extentToValidate:1,hideUtilityNetworkSelect:5,label:1,messageOverrides:0,referenceElement:1,result:0,state:0,utilityNetwork:0,view:0}}static{this.styles=B}get#n(){return`${this.#o}_execute-action`}get#r(){return this._messages.actions.validateTopology+(this.extentToValidate==="current"?` ${this._messages.input.selectExtent.options.currentExtent.toLowerCase()}`:` ${this._messages.input.selectExtent.options.entireExtent.toLowerCase()}`)}get#h(){return this.#a.isDefault}get#d(){return this.#a?.currentVersionInfo?.access==="protected"}get#g(){return this.#i?.privileges?.includes("features:user:manageVersions")??!1}get#p(){let e=this.#a?.currentVersionInfo?.versionIdentifier.name;return e?.substring(0,e.lastIndexOf("."))?.toUpperCase()===this.#i?.username?.toUpperCase()}#i;#s;#o;#e;get#a(){return this.#l?.find(e=>e.featureServiceUrl===this.utilityNetwork?.featureServiceUrl)}#l;async load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map?.allLayers,"change",e=>{let t=e.added.concat(e.removed);this.#c(t)&&this.#t()}),E(()=>this.view?.map?.utilityNetworks,"change",()=>{this.#t()}),T(()=>this.utilityNetwork?.gdbVersion,()=>{L(()=>this.utilityNetwork?.gdbVersion===this.#a?.currentVersionInfo?.versionIdentifier.name).then(()=>{this.#t()})}),T(()=>this.view,()=>{this.#t()},{initial:!0})])}#c(e){let t=this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;if(t)return e.find(i=>v(i)&&`${i.url}/${i.layerId}`===t)}async#u(){try{if(this.result=void 0,!this.view){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!this.utilityNetwork){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}this.beforeValidateNetworkTopologyStart&&await this.beforeValidateNetworkTopologyStart();let{view:e,utilityNetwork:t}=this;if(!e){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!t){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetwork},c("warn",this,h("utilityNetwork"));return}if(this.arcgisValidateNetworkTopologyStart.emit().defaultPrevented){c("info",this,this._messages.info.validateCanceled);return}this.state={type:"executing"};let i={outSpatialReference:e.spatialReference?.clone()||null,validateArea:this.extentToValidate==="current"||!t.fullExtent?e.extent.clone():t.fullExtent.clone()};this.result=await t.validateTopology(i),this.state={type:"success",message:this._messages.status.success}}catch(e){let{_messages:{errors:{cannotAcquireVersionLock:t,noDirtyAreasInExtent:i,operationOnlyAllowedByOwner:o}}}=this;this.result=void 0;let r=e,s=r.details?.raw?.extendedCode,n=r.message||this._messages.info.validateCanceled;switch(s){case p.noDirtyAreasInExtent:n=i;break;case p.cannotAcquireVersionLockV10:case p.cannotAcquireVersionLockV11:n=t;break;case p.operationOnlyAllowedByOwner:n=o;break}this.state={type:"error-info",message:n}}finally{this.arcgisValidateNetworkTopologyEnd.emit()}}async#t(){this.#s?.abort();let e=V(async t=>{this.state={type:"loading"},this.result=void 0;let{view:i}=this;if(!i){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noView},c("warn",this,h("view"));return}if(i.type!=="2d"){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.sceneViewNotSupported};return}let o=i.map;await o.load({signal:t}),l(t);let r=o.utilityNetworks??null;if(!r?.length){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}let s=this.utilityNetwork;if((!s||!r.find(O=>O.id===s?.id))&&(s=r.getItemAt(0)),!s){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks},c("warn",this,h("utilityNetwork"));return}await s.load({signal:t}),l(t);let n=(Number(s.sourceJSON.currentVersion)||0)<=11.1?"utilityNetwork":"advediting",A=await C(s.layerUrl,{signal:t})??void 0;l(t);let u=new D({url:A});await u.load({signal:t}),l(t),this.#i=u.user;let U=this.#i?.username??"",S=await I(u,U,n);if(l(t),this.#e=r,this.utilityNetwork=s,!S){this.state=n==="advediting"?{type:"error-disable-execute",message:this._messages.errors.noAdvancedEditingUserTypeExtension}:{type:"error-disable-execute",message:this._messages.errors.noUtilityNetworkServiceUserTypeExtension};return}let y=this.#c(o.allLayers.toArray());if(!y){this.state={type:"error-disable-execute",message:this._messages.errors.noDirtyAreasLayer};return}if(await y.load({signal:t}),l(t),this.#l=await q(this.view,!1),this.#h&&this.disableExecuteOnDefaultVersion){this.state={type:"error-disable-execute",message:this._messages.errors.operationDisabledOnDefaultVersion};return}if(this.#d&&!this.#p&&!this.#g){this.state={type:"error-disable-execute",message:this._messages.errors.operationOnlyAllowedByOwner};return}this.state={type:"ready"}});this.#s=e;try{await e.promise}catch(t){if(N(t))return;this.state={type:"error-disable-execute",message:this._messages.errors.utilityNetworkLoadFailed},k(t,this,this.state.message)}finally{this.#s===e&&(this.#s=void 0)}}_renderExtentToValidateCombobox(){if(this.state.type!=="error-disable-component")return a`<calcite-combobox .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="executing"} .label=${this._messages.input.selectExtent.label} .labelText=${this._messages.input.selectExtent.label} selection-mode=single-persist @calciteComboboxChange=${e=>{this.extentToValidate=e.target.value}}><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.currentExtent} .selected=${this.extentToValidate==="current"} value=current></calcite-combobox-item><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.entireExtent} .selected=${this.extentToValidate==="entire"} value=entire></calcite-combobox-item></calcite-combobox>`}_renderInfoNotice(){if(this.state.type==="error-disable-component"||this.state.type==="error-disable-execute"||this.state.type==="error-info"||this.state.type==="success")return a`<calcite-notice .closable=${this.state.type==="error-info"||this.state.type==="success"} .kind=${this.state.type==="success"?"success":"warning"} open scale=s width=full @calciteNoticeClose=${()=>this.state={type:"ready"}}><div slot=message>${this.state.message}</div></calcite-notice>`}_renderStatusIcon(){let e=`${this.#o}_status-icon`;switch(this.state.type){case"error-disable-component":case"error-disable-execute":case"error-info":return a`<calcite-icon icon=exclamation-mark-triangle id=${e??g} scale=s slot=actions-end></calcite-icon>`;case"executing":return a`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;case"success":return a`<calcite-icon icon=check-circle id=${e??g} scale=s slot=actions-end></calcite-icon>`;default:return a`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`}}_renderUtilityNetworkCombobox(){if(!(!this.#e||this.#e?.length===1||this.state.type==="error-disable-component"||this.hideUtilityNetworkSelect))return a`<calcite-combobox .disabled=${this.state.type==="executing"} .label=${this._messages.input.selectUtilityNetwork.label} .labelText=${this._messages.input.selectUtilityNetwork.label} selection-mode=single-persist @calciteComboboxChange=${e=>{let t=e.target.value;this.utilityNetwork=this.#e?.find(i=>i.id===t),this.#t()}}>${this.#e.map(e=>a`<calcite-combobox-item .heading=${e.title} .selected=${e===this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`}_renderValidateNetworkTopologyAction(){if(this.state.type!=="error-disable-component")return a`<calcite-action .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="error-disable-execute"||this.state.type==="executing"} icon=play-f id=${this.#n??g} .label=${this.#r} slot=actions-end .text=${this.#r} @click=${this.#u}></calcite-action>`}_renderValidateNetworkTopologyActionTooltip(){if(this.state.type!=="error-disable-component")return a`<calcite-tooltip .referenceElement=${this.#n}><span>${this.#r}</span></calcite-tooltip>`}render(){let e=this._renderStatusIcon(),t=this._renderValidateNetworkTopologyAction(),i=this._renderValidateNetworkTopologyActionTooltip(),o=this._renderUtilityNetworkCombobox(),r=this._renderExtentToValidateCombobox(),s=this._renderInfoNotice();return a`<calcite-panel .loading=${this.state.type==="loading"}><calcite-block collapsible expanded .heading=${this.label}>${e}${t}${o}${r}${s}</calcite-block>${i}</calcite-panel>`}};f("arcgis-utility-network-validate-network-topology",m);return m},"applications/Components/featureUtils","core/reactiveUtils","portal/Portal","versionManagement/utils",e,i,j,k)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{N as l,T as b,a as o,b as i,w as g}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,{watch:d}])=>{var x=o`:host{--arcgis-internal-presentation-background-opacity: .6}.captions-container{width:100%;height:100%;padding-inline-start:var(--arcgis-internal-presentation-padding-start);padding-inline-end:var(--arcgis-internal-presentation-padding-end)}.captions{height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:16px;padding-inline-end:16px;opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-2xl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`,s=50,p=256,a=class extends l{constructor(){super(...arguments),this.transitionActive=!1,this.autoDestroyDisabled=!1,this.arcgisReady=g()}static{this.properties={_appliedSlide:16,slide:0,transitionActive:5,autoDestroyDisabled:5}}static{this.styles=x}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>d(()=>({slide:this.slide,transitionActive:this.transitionActive}),({slide:e,transitionActive:r})=>{r?this._appliedSlide=void 0:this._appliedSlide=e},{initial:!0}))}render(){let e=this._appliedSlide?.layout;if(!this._appliedSlide||!e||e==="none")return null;let r=this._appliedSlide.title?.text,t=this._appliedSlide.description?.text,c=r?.length&&r.length>s?`${r?.substring(0,s)}...`:r,n=t?.length&&t.length>p?`${t?.substring(0,p)}...`:t;return e==="caption"?this._renderCaptions(c,n):this._renderCover(c,n)}_renderCover(e,r){return i`<div class="cover-container"><div class="cover"><div class="title">${e}</div><div class="cover-description">${r}</div></div></div>`}_renderCaptions(e,r){return i`<div class="captions-container"><div class="captions"><div class="title">${e}</div><div class="captions-description">${r}</div></div></div>`}};b("arcgis-presentation-captions",a);return a},"core/accessorSupport/decorators","core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./7HL2TQ7E.js";import b from"./MZWO5JYA.js";import a from"./FHWOIM57.js";import{a as A}from"./VJVKFKSG.js";import{g as y}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as F,R as _,T as p,a as m,b as n,n as d}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,I,v,{getDisplayedSymbol:b},{stripHTML:x},{watch:h},{d:C},,{d:f}])=>{var $=m`calcite-notice{padding:var(--calcite-space-lg)}`,l=class extends F{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.selectedAggregatedFeatureIndex=-1,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.chartAnimationDisabled=!1,this.defaultPopupTemplateEnabled=!1,this.headingLevel=2,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.loading=!1,this.selectedAggregateBoundaryFeature=new I({symbol:new v({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=y()("aggregatedFeatureCount","selectedAggregatedFeatureIndex","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,selectedAggregatedFeatureIndex:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,chartAnimationDisabled:5,defaultPopupTemplateEnabled:5,headingLevel:9,location:0,messageOverrides:0,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=$}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}async next(){await this._selectRelativeAggregatedFeature(1)}async previous(){await this._selectRelativeAggregatedFeature(-1)}loaded(){this.manager.onLifecycle(()=>[h(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),h(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),h(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._setSelectedAggregatedFeatureIndex(t?this.aggregatedFeatures.indexOf(t):-1),this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){d(()=>this.aggregatedFeatureCount=e)}_setSelectedAggregatedFeatureIndex(e){d(()=>this.selectedAggregatedFeatureIndex=e)}_setAggregatedFeatureItemsReadOnly(e){d(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),d(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){d(()=>this.loading=e)}_cancelQuery(){this._abortController=A(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._setSelectedAggregatedFeatureIndex(-1),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new w({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=f(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let s=r.createQuery(),i=e.getObjectId();return s.aggregateIds=i!=null?[i]:[],[r,s]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,s=new AbortController;this._abortController=s,this._setLoading(!0);try{let[i,o]=await Promise.all([a.queryFeatures(r,{signal:s.signal}),a.queryExtent(r,{signal:s.signal})]);if(this._abortController!==s||s.signal.aborted)return;this._abortController=null,this._setLoading(!1);let g=i.features??[];this._setAggregatedFeaturesState(g),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(i){if(this._abortController!==s||(this._abortController=null,this._setLoading(!1),C(i)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await b(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(_(n`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${t} .graphic=${e.graphic} .headingLevel=${this.headingLevel} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} .hideHeading=${this.hideHeading} .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .showRelationshipContent=${this.showRelationshipContent} .showUtilityNetworkContent=${this.showUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature-next>`))}async _selectRelativeAggregatedFeature(e){let{aggregatedFeatures:t,aggregatedFeatureItems:a,flowItems:r}=this;if(!r||t.length===0||a.length===0)return;let s=t.length,i=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<s?this.selectedAggregatedFeatureIndex:-1;if(i===-1){let c=r.getItemAt(r.length-1)?.graphic;i=c?t.indexOf(c):-1}let o=i===-1?e>0?0:s-1:(i+e+s)%s,g=a[o];if(!g?.graphic)return;this._setSelectedAggregatedFeatureIndex(o);let u=r.getItemAt(r.length-1);if(u?.flowType==="feature"){u.graphic=g.graphic,this._removeSelectedAggregatedFeature(),await this._addSelectedAggregatedFeature(g.graphic);return}await this._selectFeature(g)}_renderChevronIconNode(){return n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?n`<calcite-list .loading=${t} display-mode=flat .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>n`<calcite-list-item .label=${a.heading?x(a.heading):void 0} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:n`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};p("arcgis-aggregated-features",l);return l},"popup/FeatureContent","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{C as u,D as d,E as g,L as y,M as f,N as _,P as v,T as b,a as h,b as s,e as p,f as l,o as m}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([x,{isSharedTemplateMetadata:D,isStandardFeatureTemplate:C},{renderPreviewHTML:L},{isTable:M}])=>{var n=class extends g{constructor(t){if(super(t),this.it=l,t.type!==u.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l||t==null)return this._t=void 0,this.it=t;if(t===p)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};n.directiveName="unsafeHTML",n.resultType=1;var w=d(n);var O=h`.esri-thumbnail-preview{width:22px;height:22px;background-position:50% 50%;background-repeat:no-repeat}.template-image-container{width:32px;height:32px;display:flex;align-items:center;justify-content:center}`;async function $(e,t,i){if(D(e)&&e.thumbnail){let T=`data:image/png;base64,${e.thumbnail.imageData}`;return s`<div class="esri-thumbnail-preview" style=${v({backgroundImage:`url(${T})`})}></div>`}if(M(t))return s`<calcite-icon icon=table scale=s></calcite-icon>`;let r=await H(t,e);if(r==null)return null;let a={maxSize:24,ariaLabel:i?.ariaLabel};C(e)&&"renderer"in t&&t.renderer?.type==="dictionary"&&(a.fieldMap=t.renderer.fieldMap??void 0,a.feature={attributes:e.prototype.attributes??{}});let o=await L(r,a);return o?s`${w(o.outerHTML)}`:null}async function H(e,t){if(D(t))return await I(e);if("renderer"in e&&e.renderer){let{renderer:i}=e,r=new x({attributes:t.prototype.attributes});if("getSymbolAsync"in i){let a=await i.getSymbolAsync(r);if(a)return a}}return await I(e)}async function S(e){let t=e==="point"||e==="multipoint"?await $arcgis.t(m=>m[0],"symbols/SimpleMarkerSymbol"):e==="polyline"?await $arcgis.t(m=>m[0],"symbols/SimpleLineSymbol"):e==="polygon"||e==="mesh"||e==="multipatch"?await $arcgis.t(m=>m[0],"symbols/SimpleFillSymbol"):null;return t?new t.default:null}async function I(e){return"geometryType"in e&&e.geometryType?await S(e.geometryType):null}var c=class extends _{constructor(){super(...arguments),this._lastRun=0,this._attempted=!1,this._isCurrentlyInView=!1,this._intersectionObserver=null,this._imageContainerDiv=y(),this._generatedImageData=null}static{this.properties={_generatedImageData:16,template:0}}static{this.styles=O}get rootLayer(){return this.template?.layer?.type==="subtype-sublayer"?this.template.layer.parent:this.template?.layer}willUpdate(t){t.has("template")&&(this.hasUpdated||this.template!==null)&&this._resetData()}updated(){!this._attempted&&this._isCurrentlyInView&&(this._attempted=!0,this._handleImage().catch(t=>{m("warn",this,"Failed processing image")}))}loaded(){this.manager.onLifecycle(()=>(this._addIntersectionObserver(),()=>{this._removeIntersectionObserver()}))}_resetData(){this._generatedImageData=null,this._attempted=!1}async _generateImage(){return this.template?await $(this.template.template,this.template.layer):""}async _handleImage(){let t=++this._lastRun;if(!this._generatedImageData||this._generatedImageData==="")try{let i=await this._generateImage();if(this._lastRun!==t||this._generatedImageData===i)return;this._generatedImageData=i}finally{this._attempted=!0}}_addIntersectionObserver(){let t={rootMargin:"50px 0px",threshold:.01};this._imageContainerDiv.value&&requestAnimationFrame(()=>{this.isConnected&&(this._intersectionObserver=new IntersectionObserver(i=>{let r=!1;i.forEach(a=>{a.intersectionRatio>0&&!r?(r=!0,this._isCurrentlyInView=!0,this._handleImage().catch(o=>{m("warn",this,"Failed processing image")})):this._isCurrentlyInView=!1})},t),this._intersectionObserver?.observe(this._imageContainerDiv.value))})}_removeIntersectionObserver(){this._intersectionObserver?.disconnect(),this._intersectionObserver=null}render(){return s`<div class="template-image-container" ${f(this._imageContainerDiv)}>${this._generatedImageData??""}</div>`}};b("arcgis-template-image",c);return c},"Graphic","applications/Components/templateUtils","symbols/support/symbolUtils","applications/Components/layerUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./MZWO5JYA.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as S}from"./2BVXNQ3U.js";import{g as $}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{M as h,N as y,T as k,a as b,b as s,o as d,q as w,w as n}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([l,{watch:L},{substitute:x},I,D,E,C,F,{a:_},{a:T,b:m,d:g,e:v,f:N}])=>{var P=b`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,p=`utility-network-trace-inputs-sketch-${Date.now()}`,U=20,f=class extends y{constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#d=!0,this.#u=new Map,this.#s=new l,this.#r=new l,this.#o=new l,this.#b=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this.#i=null,this.#n=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=$()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=n(),this.arcgisTraceInputsChange=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisUtilityNetworkChange=n()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=P}get#t(){return this._traceConfiguration?.subnetworkName??void 0}set#t(t){this._traceConfiguration&&(this._traceConfiguration.subnetworkName=t)}#d;get#C(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#e;#a;#u;#s;#r;#o;#b;#i;#c;#w;#y;#k;#n;get#$(){return!this.isSubnetworkNameTraceSelected}get#T(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#L(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}#x({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new l([...this.#s,...this.#r,...this.#o])}get traceLocations(){let t=[];return this.#$&&this.#s.forEach(e=>t.push(...this.#m(e))),this.#T&&this.#o.forEach(e=>t.push(...this.#m(e))),this.#r.forEach(e=>t.push(...this.#m(e))),t}async destroy(){this.#A(p),this.#N(),this.#e?.cancel(),this.#c?.destroy(),this.#w?.destroy(),this.#y?.destroy(),this.#k?.destroy(),await this.manager.destroy()}load(){this.#v(),this.manager.onLifecycle(()=>[L(()=>this.view?.map,()=>this.#v())])}willUpdate(t){t.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this.#K()),t.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this.#H())}disconnectedCallback(){super.disconnectedCallback(),this.#u.clear()}#v(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}let t=this.view.map;this.#B(t)}#I(t){t&&(this.#w=t)}#D(t){t&&(this.#y=t)}#E(t){t&&(this.#k=t)}#F(t){t&&(this.#c=t)}#m(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new E({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#N(){let{view:t}=this;this.#s.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#s.removeAll(),this.#r.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#r.removeAll(),this.#o.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#o.removeAll()}#P(t,e){if(!t.findLayerById(e)){let i=new I({id:e,listMode:"hide",title:e});T(this.view,i)}}#U(t,e){let i=t.findLayerById(e);return g(i)?(t.reorder(i,t.layers.length-1),i):null}#A(t){if(!this.view?.map)return;let{map:e}=this.view,i=e?.findLayerById(t);i&&g(i)&&e?.remove(i)}#_(){if(!this.#e)return;let t=new l;this.#a?.forEach(e=>{v(e)?e.sublayers.forEach(i=>{t.add(new C({layer:i,enabled:!0}))}):t.add(new C({layer:e,enabled:!0}))}),this.#e.snappingOptions={enabled:!1,featureSources:t}}#M(t){let{view:e}=this,i=this.#U(t,p);return new F({layer:i,view:e})}#B(t){this.#P(t,p),this.#e=this.#M(t),this.#_()}#V(){this.#t=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}async#j(){this._subnetworksTable||(this._subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async#G(){let{_subnetworksTable:t}=this;if(!t)return;let e=t.fieldsIndex.get("SUBNETWORKNAME"),i=(o,c,u)=>c===0||o.getAttribute(e.name)!==u[c-1].getAttribute(e.name),a=t.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this.#O(),a.outFields=[e.name],a.orderByFields=[e.name];let{features:r}=await m(t,a,void 0,!1);this._compatibleSubnetworkNames=r.filter(i).map(o=>o.getAttribute(e.name))}#O(){let t=this._traceConfiguration,e=`DOMAINNETWORKNAME = '${t.domainNetworkName}'`,i=`TIERNAME = '${t.tierName}'`;return[e,i].join(" AND ")}async#R(t){await this.#j(),await this.#G(),t.subnetworkName&&!this._compatibleSubnetworkNames.some(e=>e===t.subnetworkName)&&(this.#t=this._compatibleSubnetworkNames.at(0))}#z(t){let e=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===t);if(!e){d("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=e}async#H(){let{selectedNamedTraceConfiguration:t}=this;if(!(t?.traceConfiguration instanceof D)){d("error",this,w("selectedNamedTraceConfiguration.traceConfiguration")),this._traceConfiguration=void 0;return}this._traceConfiguration=t.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this.#R(this._traceConfiguration),this._subnetworkNamesState="ready")}async#K(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){_(e,this,"Error while loading the selected utility network")}this.#V(),this.#Q(),this.#W(),this.#N()}#Q(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],this._namedTraceConfigurations.length?this.selectedNamedTraceConfiguration=this._namedTraceConfigurations.at(0):d("error",this,"The selected utility network has no compatible named trace configurations.")}#W(){let{selectedUtilityNetwork:t}=this;this.#a=new l(this.#C.filter(e=>t?.isUtilityLayer(e)&&!this.#L.includes(e.layerId))),this.#_()}#g(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#q(t){if(t==null)return;let e=this.#u,i=this.#a,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(o=>"layerId"in o&&o.layerId===t);return r&&e.set(t,r),r}async#J(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await m(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#d)){let o=r.layer;r.popupTemplate=o.createPopupTemplate()}}),a}async#X(t){let e=new Map,i=[];return t.forEach(a=>{let r=N(a.layer)?a.layer.parent:a.layer;if(r){let o=this.#q(r.layerId);if(o){let c=e.get(o)||[];c.push(a),e.set(o,c)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],o=await this.#J(a,r);i.push(...o)})),i}async#p(t){return this._exceedDisplayLimit=t.length>this.#n,this._candidateFeatures=await this.#X(t.slice(0,this.#n)),this._candidateFeatures.length===0?(this.#l(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#i?.reject(),this.#i=Promise.withResolvers(),await this.#i.promise)}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#l()}#l(t){t?.stopPropagation(),this.#c?.clear(),this.#S(),this.#e?.cancel()}#S(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#i?.reject(),this.#i=null}#Y(){let t=this.#i,e=this.#c,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#i=null}}#h(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#Z(){let t=this._namedTraceConfigurations.map(i=>s`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),e=this._messages.labels.traceConfiguration;return s`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.#z(a)}}>${t}</calcite-combobox></calcite-block>`}#tt(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#et(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#h(t,!1,"exclamation-mark-triangle"):i=this.#ut(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#it(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#l(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#at(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#d} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#S()} @arcgisPropertyChange=${this.#x} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#F)}></arcgis-features-next>`}#st(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=x(e.warnings.exceededDisplayLimit,{limit:this.#n.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#l()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#Y()} .disabled=${c}>${e.buttons.add}</calcite-button>`||""}`}#rt(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#I)}></arcgis-utility-network-trace-location-next>`}#ot(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#E)}></arcgis-utility-network-trace-location-next>`}#ct(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#D)}></arcgis-utility-network-trace-location-next>`}#nt(){let{_messages:t}=this;return s`<calcite-input clearable type=text .placeholder=${t.instructions.enterSubnetworkName} max-length=64 .status=${this.#t?"valid":"invalid"} .value=${this.#t} @calciteInputInput=${e=>this.#t=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${t.labels.tooManySubnetworks}</calcite-input-message>`}#lt(){return s`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:t})=>{let e=t.selectedItems[0]?.value;this.#t=e}}>${this._compatibleSubnetworkNames.map(t=>s`<calcite-combobox-item .value=${t} .heading=${t} .selected=${t===this.#t}></calcite-combobox-item>`)}</calcite-combobox>`}#ht(){let{_messages:t}=this,e=t.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?s`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?s`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length>U?this.#nt():this.#lt()}</calcite-block>`:this.#h(t.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}#dt(){let{selectedNamedTraceConfiguration:t}=this;return this._traceConfiguration&&t?.traceType&&this.#b.has(t.traceType)?s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info-next .namedTraceConfiguration=${t}></arcgis-utility-network-subnetwork-info-next></calcite-block>`:null}#ut(){let{_messages:t}=this,{noTraceConfiguration:e,noNamedTraceConfigurations:i}=t.errors,a=this.#tt(),r;this._namedTraceConfigurations.length||(r=this.#h(i,!1,"exclamation-mark-triangle"));let o=s`${this.#Z()}${this.#dt()}${this.#ht()}`,c=this.traceConfiguration?s`${this.#$?this.#rt():null}${this.#T?this.#ot():null}${this.#ct()}`:this.#h(e,!1,"exclamation-mark-triangle"),u=this.selectedUtilityNetwork?.loaded?r??s`${o}${c}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${a}${u}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#at():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#et()}${this.#it()}</calcite-flow>${t!=="default"?this.#st():null}</calcite-panel>`}};k("arcgis-utility-network-trace-inputs-next",f);return f},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,c)