@arcgis/map-components 5.2.0-next.51 → 5.2.0-next.52

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 (39) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/4JAQPYHG.js +2 -0
  3. package/dist/cdn/7RN4FELN.js +2 -0
  4. package/dist/cdn/{TXPI3GGA.js → AIVVE6PW.js} +1 -1
  5. package/dist/cdn/{KBQRHXQ4.js → BCDL4T34.js} +1 -1
  6. package/dist/cdn/H5DDBPGU.js +2 -0
  7. package/dist/cdn/HFJDGHMV.js +2 -0
  8. package/dist/cdn/HGL6PAIG.js +2 -0
  9. package/dist/cdn/NWUV3BTR.js +2 -0
  10. package/dist/cdn/{6RSIIYYJ.js → QA56535U.js} +1 -1
  11. package/dist/cdn/U26MQUQF.js +2 -0
  12. package/dist/cdn/UOXJUYC7.js +2 -0
  13. package/dist/cdn/index.js +1 -1
  14. package/dist/chunks/useArcgisViewReadyError.js +14 -7
  15. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +59 -53
  16. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.d.ts +1 -1
  17. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +12 -12
  18. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +116 -105
  19. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +199 -182
  20. package/dist/components/arcgis-utility-network-trace-location/customElement.js +68 -67
  21. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +26 -26
  22. package/dist/components/arcgis-utility-network-trace-results/customElement.js +128 -108
  23. package/dist/docs/api.json +1 -1
  24. package/dist/docs/docs.json +1 -1
  25. package/dist/docs/web-types.json +1 -1
  26. package/dist/loader.js +1 -1
  27. package/dist/types/lumina.d.ts +1 -1
  28. package/dist/types/preact.d.ts +1 -1
  29. package/dist/types/react.d.ts +1 -1
  30. package/dist/types/stencil.d.ts +1 -1
  31. package/package.json +4 -4
  32. package/dist/cdn/3BU2B6F7.js +0 -2
  33. package/dist/cdn/3HHUVV6D.js +0 -2
  34. package/dist/cdn/4GZ7DNJF.js +0 -2
  35. package/dist/cdn/CWFOZVE7.js +0 -2
  36. package/dist/cdn/J6ZHNOE2.js +0 -2
  37. package/dist/cdn/MUAJSX4F.js +0 -2
  38. package/dist/cdn/MUFXNQE3.js +0 -2
  39. package/dist/cdn/NKWXCVN3.js +0 -2
package/README.md CHANGED
@@ -27,5 +27,5 @@ Want to get started immediately? See [Get started](https://developers.arcgis.com
27
27
 
28
28
  ## License
29
29
 
30
- This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.1/LICENSE.txt.
31
- For third party notices, see https://js.arcgis.com/5.1/third-party-notices.txt.
30
+ This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
31
+ For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as u}from"./JP24H6WY.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{O as h,U as g,a as m,b as c,p as o,s as p}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([v,{substitute:b}])=>{var $=m`:host{padding:0 var(--calcite-spacing-sm) var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}calcite-list{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`,d=class extends h{constructor(){super(...arguments),this._messages=u({blocking:!0}),this.traceLocations=new v,this.traceLocationType="starting-point"}static{this.properties={traceLocations:0,traceLocationType:1,view:0}}static{this.styles=$}loaded(){this.traceLocations.length||o("warn",this,p("traceLocations"))}#t(t){let{traceLocations:i,view:e}=this;t.spatialProperties.flagGraphic&&e&&e.graphics.remove(t.spatialProperties.flagGraphic),i?.remove(t)}#e(t,i){let{flagProperties:e}=t,{selectedTerminals:a}=e,{name:s,id:r}=i,n=a?.has(r)??!1;return c`<calcite-label layout=inline><calcite-checkbox .value=${r} .checked=${n} @calciteCheckboxChange=${l=>{l.target.checked?a?.add(r):a?.delete(r),this.requestUpdate()}}></calcite-checkbox>${s}</calcite-label>`}#i(){return c`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`}#a(t){let{traceLocation:i}=t;return c`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${i.isFilterBarrier} @calciteSwitchChange=${e=>{i.isFilterBarrier=e.target.checked}}></calcite-switch></div></calcite-label>`}#c(t){let{flagProperties:i}=t,{terminalConfiguration:e,selectedTerminals:a}=i,s=t.traceLocation.type==="barrier",r=e&&e.terminals.length>0&&a?.size===0;return c`<calcite-action .icon=${i.expanded?"chevron-up":"chevron-down"} slot=actions-end scale=s text @click=${()=>{i.expanded=!i.expanded,this.requestUpdate()}}></calcite-action>${r&&c`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>`||""}${i.expanded&&c`<div class="terminals" slot=content-bottom>${s&&this.#a(t)||""}${e&&this.#r(t)||""}${r&&this.#i()||""}</div>`||""}`}#r(t){let{flagProperties:i}=t,{terminalConfiguration:e}=i;if(!e)return o("warn",this,"One or more locations are missing the required flag property `terminalConfiguration`."),[];let a=e.terminals;return a.length?a.length===1?[]:a.map(s=>this.#e(t,s)):(o("warn",this,"`terminalConfiguration.terminals` is required but either missing or empty.`"),[])}#s(t){let{flagProperties:i}=t,{terminalConfiguration:e,expanded:a,title:s}=i,r=e&&e.id!==0,n=t.traceLocation.type==="barrier",l=r||n,f=e?.name??void 0;return c`<calcite-list-item .label=${s} .description=${f} .value=${s} .expanded=${a}>${l?this.#c(t):c`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${()=>this.#t(t)}></calcite-action></calcite-list-item>`}render(){let t=this.traceLocations.map(e=>this.#s(e)).toArray();if(!t.length)return null;let i=b(this._messages.labels.list,{traceLocationType:this.traceLocationType});return c`<div><calcite-list interaction-mode=static selection-mode=none .label=${i}>${t}</calcite-list></div>`}};g("arcgis-utility-network-trace-location-list",d);return d},"core/Collection","intl")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./MZWO5JYA.js";import{a as N}from"./JP24H6WY.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{O as P,U as C,a as I,b as w,p as c,r as y,x as T}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([E,L,u,G,A,M,S,x,{c:v,f:$}])=>{var U=I`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}`,k=class extends P{constructor(){super(...arguments),this._messages=N({blocking:!0}),this._isSelectWaiting=!1,this.traceLocationType="starting-point",this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationChange=T(),this.arcgisTraceLocationSelectEnd=T(),this.arcgisTraceLocationSelectStart=T()}static{this.properties={_isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterHitTest:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,sketchViewModel:0,spatialTolerance:9,autoDestroyDisabled:5,utilityNetwork:0}}static{this.styles=U}#e;async destroy(){this.#i(),await this.manager.destroy()}async load(){u.isLoaded()||await u.load()}#r(t,e){let i=t.clone(),a=i.spatialReference,o=e.spatialReference;if(!a||!o)return c("warn",this,"Unable to calculate percent along because geometry is missing a spatial reference."),-1;let s=e;if(!a.equals(o)){let m=u.execute(e,a);if(!m)return c("warn",this,"Unable to project flag point to source geometry spatial reference."),-1;s=m}let l=G.getNearestCoordinate(i,s);if(l.isEmpty)return c("warn",this,"Unable to compute nearest coordinate for polyline flag."),-1;let r=l.coordinate,n=r.x-.5,p=r.y-.5,h=r.x+.5,g=r.y+.5,f=new A({hasZ:!1,hasM:!0,paths:[[[n,p],[h,g]]],spatialReference:i.spatialReference}),d=E.execute(i,f);if(d.length>0){let m=L.execute(i,{unit:"feet"}),b;return d[0].paths[0][0][0]===i.paths[0][0][0]?b=L.execute(d[0],{unit:"feet"}):d.length>1?b=L.execute(d[1],{unit:"feet"}):b=0,b/m}return c("warn",this,"Unable to cut the source geometry with the flag geometry."),-1}get#a(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async#o(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){c("error",this,"Cannot add trace location."),e||c("error",this,y("sketchViewModel")),t||c("error",this,y("view"));return}if(this.beforeTraceLocationSelectStart){this._isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this._isSelectWaiting=!1}}await this.#t(t,e)}async#t(t,e){this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||(this.#e?.remove(),this.#e=e.on("create",i=>this.#s(i,t,e)),"acquireCursor"in t&&t.acquireCursor("crosshair"),e.snappingOptions.enabled=!0,e.create("point"))}#s(t,e,i){if(t.state==="complete"&&t.graphic){i.layer.remove(t.graphic),this.#n(t,e,i);return}t.state==="cancel"&&(this.#i(),this.arcgisTraceLocationSelectEnd.emit())}async#n(t,e,i){let{utilityNetwork:a}=this,{graphic:o}=t;if(!a){c("error",this,y("utilityNetwork")),this.#i(),this.arcgisTraceLocationSelectEnd.emit();return}if(o?.geometry?.type!=="point"){c("warn",this,"No screen point available for hit test."),this.#t(e,i);return}let s=o.geometry,l=e.toScreen(s);if(!l){c("warn",this,"No screen point available for hit test."),this.#t(e,i);return}let r=(await e.hitTest(l,{include:this.filterLayers})).results.filter(n=>n.type==="graphic"&&n?.layer&&n.graphic);if(!r.length){c("info",this,"No usable hit test results found."),this.#t(e,i);return}this.#i(),await this.#c(r,s,e)?this.arcgisTraceLocationSelectEnd.emit():this.#t(e,i)}#i(){let{view:t,sketchViewModel:e}=this;if(!t){c("error",this,y("view"));return}e&&(e.snappingOptions.enabled=!1),this.#e?.remove(),this.#e=void 0,"acquireCursor"in t&&t.acquireCursor("default")}async#c(t,e,i){if(!t.length)return c("error",this,"There are no hit test results to process."),!1;let a=t[0].graphic;if(this.afterHitTest){let s=t.map(l=>{let r=l,n=r.graphic;return n.origin=r.layer,n.sourceLayer=r.layer,n});try{a=await this.afterHitTest(s)}catch{a=null}}if(!a)return c("error",this,"No graphic available from hit test results."),this.arcgisTraceLocationSelectEnd.emit(),!0;let o=await this.#l(a);return o?await this.#p(o,e,i):(c("error",this,"Unable to ensure necessary attributes on the selected graphic."),this.arcgisTraceLocationSelectEnd.emit(),!0)}async#l(t){let e=(v(t.layer),t.layer),i=e.geometryType===null,a=e.fieldsIndex?.get("assetgroup")??!1,o=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",s=e.fieldsIndex?.get("assettype")??!1,l=e.fieldsIndex?.get("assettype")?.name??"assettype",r=t.getGlobalId(),n=t.getObjectId(),p=a?!!t.getAttribute(o):!0,h=s?!!t.getAttribute(l):!0,g=!!t.geometry;if(r&&n&&p&&h&&(g||i))return t;let f=e.createQuery();return f.objectIds=[n],(await e.queryFeatures(f)).features[0]||null}async#p(t,e,i){let{traceLocations:a}=this,o=t.getGlobalId()??"",s=t.geometry?.type,l=await this.#h(t,e);if(!l)return c("error",this,"Unable to generate flag info for trace location."),!1;let r=a?.filter(p=>p.spatialProperties.mapGraphic?.getGlobalId()===o)??[];if(r.length>0){if(s!=="polyline")return c("warn",this,"A flag with the same globalId already exists."),!1;if(r.some(p=>Math.abs(p.traceLocation.percentAlong-l.traceLocation.percentAlong)<=this.spatialTolerance))return c("warn",this,"A flag with the same globalId already exists within tolerance."),!1}let n=this.#g(t,e,i);return n?(l.spatialProperties.flagGraphic=n,a?.add(l),!0):(c("warn",this,"Unable to add flag graphic."),!1)}async#h(t,e){let{traceLocationType:i,utilityNetwork:a}=this,o=t.getGlobalId()??"",s=t.geometry?.type,l=await this.#u(t);if(s==="point"||s==="polygon"){let r=a?.getTerminalConfiguration(t),n=r?r.terminals[0].id:1;return{traceLocation:new S({type:i,isFilterBarrier:!1,globalId:o,terminalId:n}),flagProperties:{title:l,expanded:!1,terminalConfiguration:r??void 0,selectedTerminals:r?new Set([n]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(s==="polyline"){let r=this.#r(t.geometry,e);return r<0?(c("warn",this,"Unable to calculate percent along for polyline flag."),null):{traceLocation:new S({type:i,isFilterBarrier:!1,globalId:o,percentAlong:r}),flagProperties:{title:l,expanded:!1,terminalConfiguration:void 0,selectedTerminals:void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!s){let r=$(t.layer)?t.layer.parent:t.layer,n=r&&this.#a.includes(r.layerId),p=a?.getTerminalConfiguration(t),h=p?p.terminals[0].id:n?-1:1,g=n?.5:-1;return{traceLocation:new S({type:i,isFilterBarrier:!1,globalId:o,terminalId:h,percentAlong:g}),flagProperties:{title:l,expanded:!1,terminalConfiguration:p??void 0,selectedTerminals:p?new Set([h]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}return null}async#u(t){let e=(v(t.layer),t.layer);return("getFeatureTitle"in e?await e.getFeatureTitle(t):null)||t.getObjectId()?.toString()||this._messages.unknown}#g(t,e,i){let a=t.geometry?t.geometry.type==="point"?t.geometry:e:null,o=this.#d(),s=new M({geometry:a,symbol:o,attributes:t.attributes});return i.graphics.add(s),s}#d(){let{traceLocationType:t}=this,e=[244,21,21,.6],i=[21,244,21,.6];return t==="stopping-point"?new x({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new x({color:e,style:"square",size:12,outline:{color:e,width:0}}):new x({color:i,style:"circle",size:12,outline:{color:i,width:0}})}#y(){let{view:t,traceLocations:e}=this;e?.forEach(i=>{i.spatialProperties.flagGraphic&&t&&t.graphics.remove(i.spatialProperties.flagGraphic)}),e?.removeAll()}#f(){let{traceLocationType:t,_messages:e,traceLocations:i,view:a}=this,o=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,s=o.heading,l=o.description,r=o.buttonText;return w`<calcite-block .heading=${s} .label=${s} expanded .description=${l}>${i?.length?w`<calcite-button slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this.#y()}>${e.buttons.clear}</calcite-button><arcgis-utility-network-trace-location-list .traceLocations=${i} .traceLocationType=${t} .view=${a}></arcgis-utility-network-trace-location-list>`:null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${r} @click=${()=>this.#o()}>${r}</calcite-button></div></calcite-block>`}render(){return w`<div class="root">${this.#f()}</div>`}};C("arcgis-utility-network-trace-location",k);return k},"geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/operators/proximityOperator","geometry/Polyline","Graphic","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import g from"./NKWXCVN3.js";import{a as E}from"./R2Z6LGSX.js";import{a as d}from"./TN5C3MSL.js";import{a as A}from"./XH4BVYMC.js";import e from"./P6CDJ2IV.js";import"./VJVKFKSG.js";import b from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import a from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as w,N as v,O as f,P as m,U as _,b as p,x as c}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:n},U,R,{fetchKnowledgeGraph:P},x,{isAbortError:D},Q,{d:V,e:I},{a:i,b:g,f:C},{b:u},{a:L,b:k,c:M}])=>{var z=g(R,{}),Z=g(U,{}),y=class extends f{constructor(){super(),this._containerRef=w(),this._mapRef=w(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=M(this),this._map=z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=Z(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,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.graphics=this.view.graphics,this.highlights=this.view.highlights,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.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.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=c(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=c(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId: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,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl: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,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!D(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new x({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!D(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(d.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(d.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await P(r),WebLinkChart:R,LinkChartLayer:Q,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};_("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,e,g)
2
+ import g from"./H5DDBPGU.js";import{a as E}from"./R2Z6LGSX.js";import{a as d}from"./TN5C3MSL.js";import{a as A}from"./XH4BVYMC.js";import e from"./P6CDJ2IV.js";import"./VJVKFKSG.js";import b from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import a from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as w,N as v,O as f,P as m,U as _,b as p,x as c}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:n},U,R,{fetchKnowledgeGraph:P},x,{isAbortError:D},Q,{d:V,e:I},{a:i,b:g,f:C},{b:u},{a:L,b:k,c:M}])=>{var z=g(R,{}),Z=g(U,{}),y=class extends f{constructor(){super(),this._containerRef=w(),this._mapRef=w(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=M(this),this._map=z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=Z(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,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.graphics=this.view.graphics,this.highlights=this.view.highlights,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.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.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=c(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=c(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId: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,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl: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,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!D(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new x({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!D(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(d.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(d.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await P(r),WebLinkChart:R,LinkChartLayer:Q,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};_("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,e,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import g from"./NKWXCVN3.js";import{a as b}from"./R2Z6LGSX.js";import{a as c}from"./TN5C3MSL.js";import{a as f}from"./XH4BVYMC.js";import e from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import d from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as n,N as o,O as l,P as h,U as p,b as a,x as r}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,{watch:s},A,D,R,{c:u,d:g,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C}])=>{var I=w(R,{}),M=w(D,{}),m=class extends l{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=_(this),this.arcgisViewReadyError=C(this),this._map=I(this),this.view=M(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,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.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.updating=this.view.updating,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,updating:36,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new A(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(E=>{E.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){let e=d(i,this.view);e&&(this.view.center=e)}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){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}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){g(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,e){return this.view.fetchPopupFeatures(i,e)}async destroy(){await this.manager.destroy()}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}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,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new P;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",m);return m},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",d,e,g)
2
+ import g from"./H5DDBPGU.js";import{a as b}from"./R2Z6LGSX.js";import{a as c}from"./TN5C3MSL.js";import{a as f}from"./XH4BVYMC.js";import e from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import d from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as n,N as o,O as l,P as h,U as p,b as a,x as r}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,{watch:s},A,D,R,{c:u,d:g,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C}])=>{var I=w(R,{}),M=w(D,{}),m=class extends l{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=_(this),this.arcgisViewReadyError=C(this),this._map=I(this),this.view=M(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,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.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.updating=this.view.updating,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,updating:36,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new A(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(E=>{E.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){let e=d(i,this.view);e&&(this.view.center=e)}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){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}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){g(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,e){return this.view.fetchPopupFeatures(i,e)}async destroy(){await this.manager.destroy()}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}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,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new P;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",m);return m},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",d,e,g)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as c,c as d}from"./R2Z6LGSX.js";import{c as r,e as m}from"./Z7J6NDSB.js";import{b as h}from"./RZ6SODVT.js";import{M as u,b as a,x as s,z as l}from"./CDSRIIHC.js";export default $arcgis.t(([{when:E,watch:w}])=>{var b=class extends l{constructor(t){super(t),this.direction=m(),this.popupRef=u(),this.slotGroupRefs=c(),this.attributionHeight=0,this._uiContainer=null,this.component.listenOn(globalThis,"unhandledrejection",o=>{let e=o.reason;if(e?.name==="webgl:required"){let{name:p}=e;this.webGLError={name:p}}})}hostLifecycle(){return[E(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),E(()=>this.component.view.popup?.visible,()=>{this.popupElement?.open&&(this.popupElement.open=!1)}),this.component.view.on("click",[],t=>{let o=t.native;t.button!==0||o?.ctrlKey||o?.metaKey||this._handleOpenPopup(t)},-2)]}async openPopup(t){if(this._assignDefaultPopup(),this.closePopup(),this.popupElement){await this.popupElement.componentOnReady(),this.popupElement.open=!0;let{fetchFeatures:o,shouldFocus:e,title:p,...n}=t;delete t.fetchFeatures,Object.assign(this.popupElement,n),p!==void 0&&(this.popupElement.heading=p),e&&await this.popupElement.setFocus(),o&&this.popupElement.fetchFeatures()}else await this.component.view.openPopup(t)}closePopup(){this.popupElement&&(this.popupElement.open=!1),this.component.view.closePopup()}_assignDefaultPopup(){this.popupRef.value&&!this.popupElement&&(this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){if(!(this.attributionHeight===t||!this.component.el.shadowRoot)){if(this.attributionHeight=t,!this._uiContainer){let o=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=o}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}_maybeDisableViewPopup(){this.component.view&&(this.component.popupComponentEnabled||this.popupElement)&&(this.previousViewPopupEnabled=this.component.view.popupEnabled,this.component.view.popupEnabled=!1)}_maybeResetViewPopup(){this.component.view&&this.previousViewPopupEnabled!==void 0&&(this.component.view.popupEnabled=this.previousViewPopupEnabled,this.previousViewPopupEnabled=void 0)}async _handleOpenPopup(t){if(this._assignDefaultPopup(),!this.component.popupDisabled){if(this._maybeDisableViewPopup(),this.popupElement){let{location:o,promises:e}=await this.popupElement?.handleViewClick(t)??{};e?.length?this.openPopup({location:o,promises:e}):this.popupElement?.open&&this.closePopup()}this._maybeResetViewPopup()}}_handlePopupSlotChange(t){let o=h(t.target,"arcgis-popup");!this.popupElement&&o.length?this.popupElement=o[0]:o.length||(this.popupElement=void 0)}_webGLErrorAlert(){return this.webGLError?a`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return d({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:t=>this._handlePopupSlotChange(t),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}},C=r((i,t)=>{let o=s();return t.onLifecycle(()=>w(()=>{let{map:e}=i;if(!e||e.destroyed)return[];let p=[];return e.loadError&&p.push(e),e.basemap?.loadError&&p.push(e.basemap),e.ground.loadError&&p.push(e.ground),[...e.allLayers,...e.allTables].forEach(n=>{n.loadError&&p.push(n)}),p},e=>{e.length&&(i.loadErrorSources=e,o.emit())})),o}),G=r((i,t)=>{let o=s();return t.onLifecycle(()=>w(()=>i.view?.readyState,e=>{(e==="map-content-error"||e==="rendering-error")&&o.emit()})),o});return{a:b,b:C,c:G}},"core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as g}from"./O5T75PGZ.js";import i from"./P6CDJ2IV.js";import"./VJVKFKSG.js";import f from"./SYRZLONH.js";import{a as v}from"./JP24H6WY.js";import e from"./V6VLUKHQ.js";import c from"./7MO7E734.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import b from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{N as h,O as m,U as y,a as p,b as a,p as d,x as n}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,,{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[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.#a=[],this.#s=()=>{this.#g(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#c(),this._switchTab("results"),this.#m())},this.#r=t=>{t&&(this.#e=t)},this.#n=t=>{t&&(this.#i=t)},this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new w([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#l(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#h;#a;#s;#r;#n;get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){this.#o(),this.#i?.destroy(),this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[_(()=>!this.#t.utilityNetwork,()=>this._switchTab("input"))])}#c(){this._traceResult=void 0,this.#o(),this.#p()}#g(){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}_switchTab(t){this._activeTab=t}#u(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}}#o(){this.#a.forEach(t=>t.remove()),this.#a=[]}#p(){this.#i?.clearAggregatedGeometryGraphics()}#d(){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 $=Number(i.layerUrl.split("/").pop());return r.layerId===$}return!1});if(!c)return;let o=c.highlight(i.objectIds);this.#a.push(o)})}async#m(){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.#d()}catch(i){b(i,this,"Error while running trace"),this._traceError=i,this._traceResult=void 0}}#y(t){t.stopPropagation(),this.arcgisHideGraphicsChange.emit(t.detail)}#b(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#v(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#f(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#w(t){let e=t.detail;this.aggregatedGeometryGraphicsColor=new w(e)}#$(){this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1}#_(){this.#t.utilityNetwork=this.#e?.selectedUtilityNetwork}#T(){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>`}#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._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#R(){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 .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#l} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#h?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#w} @arcgisHideGraphicsChange=${this.#y} @arcgisTraceResultFeaturesReady=${this.#f} ${h(this.#n)}></arcgis-utility-network-trace-results>`}</calcite-tab>`)}#k(){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._switchTab("input"),this.#c(),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>`}#S(){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.#u(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#x()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#T()||""}<arcgis-utility-network-trace-inputs .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.#v} @arcgisTraceLocationSelectStart=${this.#b} @arcgisUtilityNetworkChange=${this.#_} ${h(this.#r)}></arcgis-utility-network-trace-inputs>`;return g(`${this.el.id}__inputs-tab-item`,a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`)}#C(){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.#s} 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._switchTab("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this._switchTab("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#S()}${this.#R()}</calcite-tabs>${t==="input"?this.#C():null}${t==="results"?this.#k():null}</calcite-panel>`}};y("arcgis-utility-network-trace-analysis",u);return u},"Color","core/Error","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 c from"./MZWO5JYA.js";import a from"./P6CDJ2IV.js";import"./VJVKFKSG.js";import{a as C}from"./JP24H6WY.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as y,N as d,O as f,U as b,a as p,b as r,p as o,r as g,s as v,x as h}from"./CDSRIIHC.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.#i=new Map,this.#o=new Map,this.#a=new Map,this.#r=new Map,this.#l=[],this.#h=async([e,t])=>{let i=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#p(i),a=this.#v(t);if(i==null||!s){this.#t.push(...a);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=a.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.#u(this.#a,n.layer.subtypeCode,n)):this.#i.set(i,c)},this.#d=e=>{e&&(this.#n=e)},this.#g=e=>{e&&(this._featuresComponentElement=e)},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;#i;#o;#a;#r;#l;#h;#d;#g;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#n?.destroy()}async destroy(){this.#i.clear(),this.#a.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()}#u(e,t,i){let s=e.get(t);s==null?e.set(t,[i]):s.push(i)}#p(e){if(e==null)return;let t=this.#o,i=this.#l,s=t.get(e);if(s)return s;if(!i)return;let a=i.find(l=>"layerId"in l&&l.layerId===e);return a&&t.set(e,a),a}#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 i=this.#l.filter(s=>!s.loaded).map(s=>s.load());i.length>0&&(this.state="loading",(await Promise.allSettled(i)).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(this.#h);(await Promise.allSettled(t)).forEach((a,l)=>{if(a.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${a.reason}`)}});let i=Array.from(this.#i.values()),s=Array.from(this.#a.values());this.traceResultFeatures=i.concat(s).flat()}#$(){this.traceResult.elements?.forEach(e=>this.#u(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:i,globalFunctionResults:s,aggregatedGeometry:a}=t,l=!i.length&&!s.length&&!a,c=i.length>0&&!s.length&&!a;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.#g)}></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:i,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.#m():this.#x():null}${i.length>0?this.#F(i):null}</calcite-panel>`}#C(e){let{_aggregatedGeometryDisabled:t,aggregatedGeometryGraphicsColor:i,_messages:s}=this;return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${i} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#y} auto-destroy-disabled ${d(this.#d)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor} .color=${i.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=${i} @calciteColorPickerChange=${a=>{let l=a.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.#m()}</calcite-panel>`}#m(){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(i=>i.networkAttributeName!=null&&i.result!=null&&i.functionType!=null).map(i=>{let{functionName:s,networkAttributeName:a,functionType:l,result:c}=i,n=s||`${a} ${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,i=e.message;switch(e.details?.raw?.extendedCode){case u.dirtyAreasDiscovered:i=t.traceErrors.dirtyAreasDiscovered;break;case u.noValidControllers:i=t.traceErrors.noValidControllers;break;case u.pathNotFound:i=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">${i}</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","core/Error","Graphic",a,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as m}from"./JP24H6WY.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{O as d,U as u,a as c,b as s,p as a,r as n}from"./CDSRIIHC.js";import"./H6RQVSYM.js";var g=c`.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-spacing-sm)}.key-value-pair__key{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3)}.key-value-pair__value{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}`,l=class extends d{constructor(){super(...arguments),this._messages=m({blocking:!0})}static{this.properties={namedTraceConfiguration:0}}static{this.styles=g}loaded(){this.namedTraceConfiguration||a("warn",this,n("namedTraceConfiguration"))}render(){let{_messages:e,namedTraceConfiguration:r}=this;if(!r?.traceConfiguration)return a("error",this,n("namedTraceConfig.traceConfiguration")),null;let{domainNetworkName:i,tierName:t,targetTierName:o}=r.traceConfiguration;return!i&&!t&&!o?(a("warn",this,"`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."),null):s`<div class="subnetwork-details">${i?this._renderKeyValuePair(e.headings.domainNetwork,i):null}${t?this._renderKeyValuePair(e.headings.tier,t):null}${o?this._renderKeyValuePair(e.headings.targetTier,o):null}</div>`}_renderKeyValuePair(e,r){return s`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${r}</div></div>`}};u("arcgis-utility-network-subnetwork-info",l);export{l as ArcgisUtilityNetworkSubnetworkInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import f from"./NKWXCVN3.js";import{a as y}from"./R2Z6LGSX.js";import{a as p}from"./TN5C3MSL.js";import{a as d}from"./XH4BVYMC.js";import e from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import b from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as n,N as o,O as c,P as h,U as v,b as a,x as r}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:s},C,E,A,{d:u,e:g},{a:e,b:w,f:m},{a:f,b:b,c:V}])=>{var R=w(E,{}),_=w(C,{}),l=class extends c{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new f(this),this.extraContent=new A,this.arcgisLoadError=b(this),this.arcgisViewReadyError=V(this),this._map=R(this),this.view=_(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,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"),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 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)
2
+ import f from"./H5DDBPGU.js";import{a as y}from"./R2Z6LGSX.js";import{a as p}from"./TN5C3MSL.js";import{a as d}from"./XH4BVYMC.js";import e from"./V6VLUKHQ.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import b from"./3MWUCGFA.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{M as n,N as o,O as c,P as h,U as v,b as a,x as r}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:s},C,E,A,{d:u,e:g},{a:e,b:w,f:m},{a:f,b:b,c:V}])=>{var R=w(E,{}),_=w(C,{}),l=class extends c{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new f(this),this.extraContent=new A,this.arcgisLoadError=b(this),this.arcgisViewReadyError=V(this),this._map=R(this),this.view=_(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,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"),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 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)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import b from"./MZWO5JYA.js";import a from"./P6CDJ2IV.js";import"./VJVKFKSG.js";import{a as S}from"./JP24H6WY.js";import{g as T}from"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{N as d,O as $,U as N,a as w,b as r,p as h,r as y,s as k,x as l}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([n,{watch:x},{substitute:I},E,D,F,L,U,{a:p},{a:_,b:m,d:g,e:v,f:C}])=>{var P=w`: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)}`,b=`utility-network-trace-inputs-sketch-${Date.now()}`,A=20,f=class extends ${constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#d=!0,this.#u=new Map,this.#s=new n,this.#r=new n,this.#o=new n,this.#w=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this.#m=()=>{if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView,this._utilityNetworks=void 0;return}let t=this.view.map;this.#J(t),this.#B(t)},this.#i=null,this.#l=20,this.#N=t=>{t&&(this.#y=t)},this.#T=t=>{t&&(this.#k=t)},this.#_=t=>{t&&(this.#$=t)},this.#v=t=>{t&&(this.#n=t)},this.#L=({detail:t,target:e})=>{(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)},this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=T()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=l(),this.arcgisTraceInputsChange=l(),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisUtilityNetworkChange=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_utilityNetworks: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#D(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#e;#a;#u;#s;#r;#o;#w;#m;#i;#n;#y;#k;#$;#l;#N;#T;#_;#v;get#C(){return!this.isSubnetworkNameTraceSelected}get#S(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#F(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}#L;get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new n([...this.#s,...this.#r,...this.#o])}get traceLocations(){let t=[];return this.#C&&this.#s.forEach(e=>t.push(...this.#g(e))),this.#S&&this.#o.forEach(e=>t.push(...this.#g(e))),this.#r.forEach(e=>t.push(...this.#g(e))),t}async destroy(){this.#A(b),this.#x(),this.#e?.cancel(),this.#n?.destroy(),this.#y?.destroy(),this.#k?.destroy(),this.#$?.destroy(),await this.manager.destroy()}load(){this.#m(),this.manager.onLifecycle(()=>[x(()=>this.view?.map,()=>this.#m())])}willUpdate(t){t.has("_utilityNetworks")&&this.#q(),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()}#g(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new F({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#x(){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()}#U(t,e){if(!t.findLayerById(e)){let i=new E({id:e,listMode:"hide",title:e});_(this.view,i)}}#P(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)}#I(){if(!this.#e)return;let t=new n;this.#a?.forEach(e=>{v(e)?e.sublayers.forEach(i=>{t.add(new L({layer:i,enabled:!0}))}):t.add(new L({layer:e,enabled:!0}))}),this.#e.snappingOptions={enabled:!1,featureSources:t}}#M(t){let{view:e}=this,i=this.#P(t,b);return new U({layer:i,view:e})}#B(t){this.#U(t,b),this.#e=this.#M(t),this.#I()}#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:s}=await m(t,a,void 0,!1);this._compatibleSubnetworkNames=s.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){h("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=e}async#H(){let{selectedNamedTraceConfiguration:t}=this;if(!(t?.traceConfiguration instanceof D)){h("error",this,y("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){p(e,this,"Error while loading the selected utility network")}this.#V(),this.#Q(),this.#W(),this.#x()}#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):h("error",this,"The selected utility network has no compatible named trace configurations.")}#W(){let{selectedUtilityNetwork:t}=this;this.#a=new n(this.#D.filter(e=>t?.isUtilityLayer(e)&&!this.#F.includes(e.layerId))),this.#I()}#q(){let{_utilityNetworks:t,selectedUtilityNetwork:e}=this;t?.length?(!e||!t.includes(e))&&(this.selectedUtilityNetwork=t.at(0)):(h("error",this,k("_utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetwork)}async#J(t){try{t.loaded||await t.load()}catch(e){p(e,this,"Error while loading `view.map`")}finally{this._utilityNetworks=t.utilityNetworks||new n}}#p(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#X(t){if(t==null)return;let e=this.#u,i=this.#a,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(o=>"layerId"in o&&o.layerId===t);return s&&e.set(t,s),s}async#Y(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await m(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#d)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async#Z(t){let e=new Map,i=[];return t.forEach(a=>{let s=C(a.layer)?a.layer.parent:a.layer;if(s){let o=this.#X(s.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 s=e.get(a)??[],o=await this.#Y(a,s);i.push(...o)})),i}async#b(t){return this._exceedDisplayLimit=t.length>this.#l,this._candidateFeatures=await this.#Z(t.slice(0,this.#l)),this._candidateFeatures.length===0?(this.#h(),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.#h()}#h(t){t?.stopPropagation(),this.#n?.clear(),this.#E(),this.#e?.cancel()}#E(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#i?.reject(),this.#i=null}#tt(){let t=this.#i,e=this.#n,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#i=null}}#c(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#et(){return r`<calcite-loader label=loading></calcite-loader>`}#it(){let t=this._namedTraceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),e=this._messages.labels.traceConfiguration;return r`<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>`}#at(){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-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==a&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(s=>s.id===a))}}>${e}</calcite-combobox></calcite-block>`}#st(){let{_error:t,selectedUtilityNetwork:e}=this,{noView:i,noUtilityNetwork:a}=this._messages.errors,s;return t===i||t===a?s=this.#c(t,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?s=this.#et():s=this.#pt(),r`<calcite-flow-item .selected=${this.mode==="default"}>${s}</calcite-flow-item>`}#rt(){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 r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#h(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>`}#ot(){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,s=e.length===1?"feature":"list";return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#d} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${s} @arcgisClose=${()=>this.#E()} @arcgisPropertyChange=${this.#L} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#v)}></arcgis-features-next>`}#ct(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=I(e.warnings.exceededDisplayLimit,{limit:this.#l.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<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.#h()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#tt()} .disabled=${c}>${e.buttons.add}</calcite-button>`||""}`}#nt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#b.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#N)}></arcgis-utility-network-trace-location>`}#lt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#b.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#_)}></arcgis-utility-network-trace-location>`}#ht(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#b.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#T)}></arcgis-utility-network-trace-location>`}#dt(){let{_messages:t}=this;return r`<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>`}#ut(){return r`<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=>r`<calcite-combobox-item .value=${t} .heading=${t} .selected=${t===this.#t}></calcite-combobox-item>`)}</calcite-combobox>`}#mt(){let{_messages:t}=this,e=t.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?r`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length>A?this.#dt():this.#ut()}</calcite-block>`:this.#c(t.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}#gt(){let{selectedNamedTraceConfiguration:t}=this;return this._traceConfiguration&&t?.traceType&&this.#w.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}#pt(){let{_messages:t}=this,{noTraceConfiguration:e,noNamedTraceConfigurations:i,utilityNetworkLoadFailed:a}=t.errors,s=this._utilityNetworks&&this._utilityNetworks.length>1?this.#at():null,o;this.selectedUtilityNetwork?.loadError?o=this.#c(a,!1,"exclamation-mark-triangle"):this._namedTraceConfigurations.length||(o=this.#c(i,!1,"exclamation-mark-triangle"));let c=r`${this.#it()}${this.#gt()}${this.#mt()}`,u=this.traceConfiguration?r`${this.#C?this.#nt():null}${this.#S?this.#lt():null}${this.#ht()}`:this.#c(e,!1,"exclamation-mark-triangle");return r`<calcite-block-group .label=${t.labels.traceInputs}>${s}${o??r`${c}${u}`}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#ot():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#st()}${this.#rt()}</calcite-flow>${t!=="default"?this.#ct():null}</calcite-panel>`}};N("arcgis-utility-network-trace-inputs",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,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./MZWO5JYA.js";import{a as w}from"./JP24H6WY.js";import"./Z7J6NDSB.js";import"./VWED2WAO.js";import"./QUZTFUWM.js";import"./RZ6SODVT.js";import{O as n,R as p,U as g,b as m,p as s,r,x as l}from"./CDSRIIHC.js";import"./H6RQVSYM.js";export default $arcgis.t(([u,v,f,G,b,C,{a:h,d:d}])=>{var a=12,c=class extends n{constructor(){super(...arguments),this._messages=w({blocking:!0}),this.#e="arcgis-utility-network-aggregated-geometry-graphics",this.#t=[],this.hideGraphics=!1,this.graphicsColor=new u([255,255,0,.6]),this.autoDestroyDisabled=!1,this.arcgisHideGraphicsChange=l()}static{this.properties={geometry:0,hideGraphics:5,graphicsColor:0,view:0,autoDestroyDisabled:5}}#i;#e;#t;async destroy(){this.view?.map&&this.#i&&this.view.map.remove(this.#i),await this.manager.destroy()}connectedCallback(){super.connectedCallback(),this.view&&this.#i&&h(this.view,this.#i)}load(){!this.geometry||!this.view?.map||this.#r()}willUpdate(i){if(i.has("graphicsColor")&&this.#c(),i.has("geometry")&&(this.#i?.removeAll(),this.#s()),i.has("view")){let t=i.get("view");t?.map&&this.#i&&(t.map.remove(this.#i),this.#r(),this.#s())}}loaded(){this.geometry||s("error",this,r("geometry")),this.view?this.view.map||s("error",this,r("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")):s("error",this,r("view"))}#s(){let i=this.geometry,{line:t,multipoint:e,polygon:y}=i;this.#t=[t,e,y].filter(o=>o!=null).map(o=>this.#a(o)),this.#i.addMany(this.#t)}#r(){let i=this.view.map,t=this.#e,e=i.findLayerById(t);if(e&&d(e)){this.#i=e;return}this.#i=new f({id:t,listMode:"hide",title:t}),h(this.view,this.#i)}#h(){this.hideGraphics=!this.hideGraphics,this.hideGraphics?this.#i?.removeAll():this.#i?.addMany(this.#t),this.arcgisHideGraphicsChange.emit(this.hideGraphics)}#a(i){return new v({geometry:i,symbol:this.#o(i)})}#o(i){let t=this.graphicsColor;switch(i.type){case"multipoint":return new C({color:t,size:a,outline:{color:t,width:0}});case"polygon":return new G({color:t,outline:{color:t,width:a}});case"polyline":return new b({color:t,width:a})}}#c(){this.#i?.graphics.forEach(i=>{let t=i.geometry;i.symbol=this.#o(t)})}render(){let{_messages:i}=this;return m`<calcite-switch .checked=${!this.hideGraphics} .label=${i.labels.showGraphicsToggle} label-text-end=${i.showGraphics??p} @calciteSwitchChange=${this.#h}></calcite-switch>`}};g("arcgis-utility-network-aggregated-geometry",c);return c},"Color","Graphic","layers/GraphicsLayer","symbols/SimpleFillSymbol","symbols/SimpleLineSymbol","symbols/SimpleMarkerSymbol",a)