@arcgis/map-components 6.0.0-next.33 → 6.0.0-next.34

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 (54) hide show
  1. package/dist/cdn/4UCQJWD2.js +2 -0
  2. package/dist/cdn/6UMEQS35.js +2 -0
  3. package/dist/cdn/7OLHJCFT.js +2 -0
  4. package/dist/cdn/AMRSK274.js +2 -0
  5. package/dist/cdn/D4UNIFIZ.js +2 -0
  6. package/dist/cdn/JKE3FA4Q.js +2 -0
  7. package/dist/cdn/JZTCF52M.js +2 -0
  8. package/dist/cdn/NZK2LVFA.js +2 -0
  9. package/dist/cdn/PTHNXKEA.js +2 -0
  10. package/dist/cdn/QCZQCLAT.js +2 -0
  11. package/dist/cdn/QVIQ66LA.js +2 -0
  12. package/dist/cdn/index.js +1 -1
  13. package/dist/chunks/layer-list-next.js +49 -4
  14. package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +3 -0
  15. package/dist/components/arcgis-basemap-layer-list-next/customElement.js +102 -101
  16. package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +3 -0
  17. package/dist/components/arcgis-catalog-layer-list-next/customElement.js +87 -86
  18. package/dist/components/arcgis-expand/customElement.js +13 -13
  19. package/dist/components/arcgis-layer-list-next/customElement.d.ts +1 -0
  20. package/dist/components/arcgis-layer-list-next/customElement.js +72 -71
  21. package/dist/components/arcgis-sketch/customElement.d.ts +6 -4
  22. package/dist/components/arcgis-sketch/customElement.js +177 -167
  23. package/dist/components/arcgis-table-list-next/customElement.d.ts +3 -0
  24. package/dist/components/arcgis-table-list-next/customElement.js +44 -43
  25. package/dist/components/arcgis-utility-network-picker/customElement.js +32 -31
  26. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +10 -4
  27. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +10 -9
  28. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +3 -0
  29. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +7 -7
  30. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -1
  31. package/dist/components/arcgis-view-popover/customElement.d.ts +65 -33
  32. package/dist/components/arcgis-view-popover/customElement.js +196 -108
  33. package/dist/components/arcgis-view-popover/index.js +1 -1
  34. package/dist/docs/api.json +1 -1
  35. package/dist/docs/docs.json +1 -1
  36. package/dist/docs/vscode.html-custom-data.json +1 -1
  37. package/dist/docs/web-types.json +1 -1
  38. package/dist/loader.js +1 -1
  39. package/dist/types/lumina.d.ts +1 -1
  40. package/dist/types/preact.d.ts +1 -1
  41. package/dist/types/react.d.ts +1 -1
  42. package/dist/types/stencil.d.ts +1 -1
  43. package/package.json +7 -7
  44. package/dist/cdn/3NUN6DK3.js +0 -2
  45. package/dist/cdn/6FJUKYNB.js +0 -2
  46. package/dist/cdn/7Y6PADB5.js +0 -2
  47. package/dist/cdn/I5F7MVDT.js +0 -2
  48. package/dist/cdn/P5U37XIA.js +0 -2
  49. package/dist/cdn/PD4ELTMF.js +0 -2
  50. package/dist/cdn/RAADOJWX.js +0 -2
  51. package/dist/cdn/TY4XRXLB.js +0 -2
  52. package/dist/cdn/UZ4VANCL.js +0 -2
  53. package/dist/cdn/W4BA3ECA.js +0 -2
  54. package/dist/cdn/ZEQHIKTN.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./3KAC2MKA.js";import a from"./BFYJTV6Q.js";import{d as ge,f as me,i as ue,m as fe,o as he,p as be,q as Z}from"./ZCFWKPXL.js";import{a as V}from"./5GFPOTOB.js";import{c as pe}from"./Q7GF26CL.js";import{a as K}from"./LXME6MU5.js";import{P as U,Q as B,T as d,X as p,a as Y,b as l}from"./PQ7NUE5C.js";export default $arcgis.t(([{isLayerFromCatalog:Ne},{a:ve},{a:F,b:G,c:_e,e:N,f:xe,g:we,h:ye,i:ke,j:$e,l:ze,m:H}])=>{var Ae=t=>t instanceof HTMLElement&&t.localName==="calcite-list-item",Xe=pe((t,e)=>{let g=!1,b=!1,v=null,r=()=>t.selectionMode==="multiple"&&!g?"single-persist":t.selectionMode,k=()=>{let m=r();t.el.shadowRoot?.querySelectorAll("calcite-list, calcite-list-item").forEach(o=>o.setAttribute("selection-mode",m))},E=m=>{if(t.selectionMode!=="multiple")return;let o=m.composedPath()[0];if(!(!Ae(o)||o.getRootNode()!==t.el.shadowRoot)){if(b){let _=o.parentElement;if(!_)return;if(!v?.isConnected||v.parentElement!==_){v=o;return}let w=Array.from(_.children).filter(h=>Ae(h)&&!h.closed&&!h.disabled&&!h.hidden&&!h.hasAttribute("filter-hidden")),C=w.indexOf(v),$=w.indexOf(o),L=Math.min(C,$),T=Math.max(C,$),S=w.slice(L,T+1);t.el.shadowRoot?.querySelectorAll("calcite-list-item").forEach(h=>h.selected=S.includes(h));return}v=o,!g&&t.el.shadowRoot?.querySelectorAll("calcite-list-item").forEach(_=>_.selected=_===o)}};return e.onLoaded(()=>{let m=o=>{g=o.ctrlKey||o.metaKey||o.shiftKey,b=o.shiftKey,k()};t.listenOn(window,"keydown",m),t.listenOn(window,"keyup",m),t.listenOn(window,"blur",()=>{g=!1,b=!1,k()}),t.listenOn(t.el.shadowRoot,"calciteListItemSelect",E)}),e.onUpdate(m=>{m.has("selectionMode")&&(v=null)}),{get selectionMode(){return r()}}}),ei=Y`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{width:100%;--arcgis-internal-layer-list-item-scroller-max-height: var(--arcgis-internal-panel-height-md)}.item{--calcite-list-item-icon-center: var(--calcite-space-sm)}.table-icon,.catalog-icon{margin-inline-end:0}.action-image{text-align:center;background-position:50%;background-repeat:no-repeat;background-size:contain;flex:0 0 var(--calcite-spacing-xl);width:var(--calcite-spacing-xl);height:var(--calcite-spacing-xl);font-size:14px}.item__filter-container--sticky{z-index:1;position:sticky;top:0}.item__group{margin-top:var(--calcite-space-md)}.item__scroller{overflow-y:auto;z-index:0;position:relative}.item__scroller--enabled{max-height:var(--arcgis-internal-layer-list-item-scroller-max-height)}.item__group__header{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-medium)}.item__list-item{cursor:pointer;min-height:var(--calcite-spacing-xxxl)}.item__list-item[class^=esri-icon-],.item__list-item[class*=" esri-icon-"]{padding-inline-end:2.8px}.item__list-item--disabled{cursor:default}.item__list-item-icon{justify-content:center;align-items:center;min-width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl);display:flex}.item__list-item-icon span{line-height:0}.arcgis-thumbnail-preview{background-position:50%;width:22px;height:22px}.item__no-matches-message{justify-content:center;align-items:center;height:96px;display:flex}.content-bottom{margin:var(--calcite-space-md) 15px}.content-bottom .arcgis-legend__service{padding:0 0 var(--calcite-space-md)}.message{margin:var(--calcite-space-md) 15px}.visible-icon{visibility:hidden}.item:hover>.visible-toggle>.visible-icon,.item:focus>.visible-toggle>.visible-icon,.item:focus-within>.visible-toggle>.visible-icon{visibility:visible}`,ii=Y`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex;transition:max-height .25s ease-in-out;overflow-y:auto;--arcgis-internal-layer-list-legend-color-text: var(--calcite-color-text-2)}:host>div{display:flex;width:100%}.filter-no-results{padding:var(--calcite-space-md) var(--calcite-space-md-plus)}.table-icon,.catalog-icon{margin-inline-end:0}.action-image{text-align:center;background-position:50%;background-repeat:no-repeat;background-size:contain;flex:0 0 var(--calcite-space-xl);width:var(--calcite-space-xl);height:var(--calcite-space-xl);font-size:var(--calcite-font-size)}.action-menu .action-group{display:none}.action-menu[open] .action-group{display:flex}.active:hover>.visible-toggle>.visible-icon,.active:focus>.visible-toggle>.visible-icon,.active:focus-within>.visible-toggle>.visible-icon{visibility:visible}.status-indicator{margin-inline:0}`;var Ie=new Map;function Ce(t){return t?Ie.get(t)??!1:!1}function He(t,e){let g=!(t.aria?.pressed??Ce(e));return t.aria={...t.aria,pressed:g},e&&Ie.set(e,g),g}function Je(t){let{item:e,itemType:g="layer",parent:b,hideStatusIndicators:v,css:r,visibilityAppearance:k,hideCatalogLayerList:E,dragEnabled:m=!1,rootGroupUid:o,listModeDisabled:_=!1,selectionMode:w,displayMode:C,layerTablesEnabled:$,showErrors:L,parentTitles:T,selectedItems:S,activeItem:h,handleCatalogOpen:Te,handleTablesOpen:Me,selectedDragItemLayerUid:Ee,handleSelectedDragItemLayerUidChange:Le,handlePanelOpen:Se,messages:a,setCurrentActiveItem:J,clearActiveItem:Q}=t,Oe=xe(e),je=we(e),c=ye(e),z=U(),O=U(),Re=g==="table"?a.untitledTable??"":a.untitledLayer??"",Pe=Oe?a.trackInfo?.[e.content.name]??e.content.name:"",qe=je?a.telemetryDisplay?.[e.content.name]??e.content.name:"",x=e.title||Pe||qe||Re||"",W=null;!v&&!c&&(W=l`<arcgis-layer-list-item-indicator class=${d(r.statusIndicator)} .messages=${a} .item=${e} .parent=${b} slot=content-end></arcgis-layer-list-item-indicator>`);let X=null;{let{layer:i}=e,n=i&&"persistenceEnabled"in i&&(Ne(i)||!i.persistenceEnabled);!c&&(t.showTemporaryLayerIndicators||t.showTemporaryTableIndicators)&&n&&(X=l`<calcite-icon class=${d(r.itemTemporaryIcon)} icon=temporary scale=s slot=content-start title=${a.temporary??p}></calcite-icon>`)}let ee=null;if("visible"in e&&"visibleToggle"in r&&k){let i=F(b);if(i!=="inherited"){let n=ge({visible:e.visible,exclusive:i==="exclusive",visibilityAppearance:k}),s=k==="checkbox",u=a.layerVisibility,A=x,y=A?`${u??""}: ${A}`:u??"",I=c?e.visible:Ce(e.layer?.id);ee=l`<calcite-action .aria=${{pressed:I}} class=${d(r.visibleToggle)} .icon=${s?n:void 0} .label=${y} @click=${D=>{c||He(D.currentTarget,e.layer?.id),G(e,b)}} .slot=${s?"actions-start":"actions-end"} .text=${u??""} title=${u??p}>${s?null:l`<calcite-icon class=${d(K({[r.visibleIcon]:i!=="exclusive"&&e.visible}))} .icon=${n} scale=s></calcite-icon>`}</calcite-action>`}}let ie=null;{let i=e.panel;i?.open&&!i.disabled&&!i.flowEnabled&&(!c||N(e))&&(ie=l`<div class=${d(r.itemContentBottom)} slot=content-bottom><arcgis-layer-list-item-panel .item=${e} .view=${t.view}></arcgis-layer-list-item-panel></div>`)}let te=null;{let i=e.panel;if(i?.visible&&(!c||N(e))){let{open:n,title:s,disabled:u}=i;(i.content==="legend"||Array.isArray(i.content)&&i.content.includes("legend"))&&(i.icon="legend");let A={icon:i.icon,image:i.image??void 0,indicator:!1},y=ve(A);te=l`<calcite-action .active=${n} .disabled=${u} .icon=${y} @click=${()=>_e(e,Se)} slot=actions-end .text=${s??""} title=${s??void 0??p}>${ze(r,i)}</calcite-action>`}}let re=null;{let i=e.layer,n=i?.type==="catalog-footprint",s=i?.type==="sublayer"&&Z(i,"footprints");!c&&"itemCatalogIcon"in r&&(n||s)&&(re=l`<calcite-icon class=${d(r.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`)}let ae=null;{let i=e.layer,n=i?.type==="catalog-dynamic-group",s=i?.type==="sublayer"&&Z(i,"layers-in-view");!c&&"itemCatalogIcon"in r&&(n||s)&&(ae=l`<calcite-icon class=${d(r.itemCatalogIcon)} icon=catalog-dataset scale=s slot=content-start></calcite-icon>`)}let oe=null;if("visible"in e){let i=e.layer;!c&&!E&&i?.type==="catalog-dynamic-group"&&(oe=l`<calcite-action .disabled=${!i.visible} icon=chevron-right icon-flip-rtl @click=${()=>Te?.(e)} slot=actions-end .text=${x??""}></calcite-action>`)}let ne=null,j=!1;{let i=e.layer;if(!c&&$&&i)switch(i.type){case"knowledge-graph":j=$.includes(i.type)&&"tables"in i&&!!i.tables?.length;break;case"map-image":case"tile":j=$.includes(i.type)&&"subtables"in i&&!!i.subtables?.length;break}"itemTableIcon"in r&&"visible"in e&&"tables"in a&&j&&(ne=V(`${e.uid}-tables`,l`<calcite-list-item class=${d(r.item)} data-layer-id=${i?.id??p} drag-disabled .label=${a.tables} title=${a.tables??p} @calciteListItemSelect=${()=>Me?.(e)} .value=${e}><calcite-icon class=${d(r.itemTableIcon)} icon=table scale=s slot=content-start></calcite-icon><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`))}let le=null;if("children"in e){let i=[...T??[],e.title],{children:n,layer:s}=e,u=s?.type!=="catalog-dynamic-group"&&he(e),A=_?!1:me(s),y=s?.type==="group",I=!A&&!u&&m&&y,D=y&&"sortable"in e&&e.sortable,Ve=n.some(f=>"sortable"in f&&f.sortable),Ze=g==="layer"?ue(e):!0,Fe=m&&(u||I)&&(Ve||I)&&("childrenSortable"in e&&e.childrenSortable||D)&&Ze,Ge=u?(n?.filter(f=>!f.hidden&&(L||!f.error)).toArray()??[]).map(f=>Je({...t,item:f,parent:e,parentTitles:i})):null;(u||I)&&(le=l`<calcite-list .canPull=${f=>t.canMove?t.canMove(f,"pull"):!1} .canPut=${f=>t.canMove?t.canMove(f,"put"):!1} data-item=${e.uid??p} data-layer-type=${o??p} .displayMode=${C} .dragEnabled=${Fe} .group=${y?o:`${o}-${s?.uid}`} .label=${e.title} selection-appearance=highlight .selectionMode=${w}>${Ge}${ne}</calcite-list>`)}let R=null;if(!c&&e.error){let i="layerError"in a?a.layerError:a.tableError;R=l`<div class=${d(r.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s width=full><div slot=message>${i}</div></calcite-notice></div>`}else"incompatible"in e&&e.incompatible&&"layerIncompatible"in a&&(R=l`<div class=${d(r.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${B(O)}><div slot=message>${a.layerIncompatible}</div></calcite-notice></div>`);let ce=$e(e),P=e.actionsSections.reduce((i,n)=>i+n.length,0),se=be(ce),De=ce.toArray().map(i=>l`<calcite-action-group>${i.toArray().map(n=>H(t,n,!0))}</calcite-action-group>`),Ye=i=>{e.actionsOpen=i.currentTarget.open},de=null;P>1&&(de=l`<calcite-action-menu appearance=transparent .label=${a.menu??""} .open=${e.actionsOpen} overlay-positioning=fixed placement=bottom-end slot=actions-end @calciteActionMenuOpen=${Ye}><calcite-action .aria=${{expanded:e.actionsOpen??!1,hasPopup:"true"}} icon=ellipsis slot=trigger .text=${a.options??""} title=${a.options??p}></calcite-action>${De}</calcite-action-menu>`);let q=null;P===1&&se?q=H(t,se,!1):P>1&&(q=de);let Ue=c?x:"visibleAtCurrentTimeExtent"in e&&"layerInvisibleAtTime"in a&&!e.visibleAtCurrentTimeExtent?`${x} (${a.layerInvisibleAtTime})`:"visibleAtCurrentScale"in e&&"layerInvisibleAtScale"in a&&!e.visibleAtCurrentScale?`${x} (${a.layerInvisibleAtScale})`:x,Be="parent"in e&&e.parent?.layer?.type==="catalog",M=e.layer,Ke=!c&&("visibleAtCurrentScale"in e&&!e.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in e&&!e.visibleAtCurrentTimeExtent);return queueMicrotask(()=>{c||ke(z.value??null,e,Ee,Le),O.value&&(t.handleTooltipReferenceChange?.(M?.uid,O.value),queueMicrotask(()=>t.handleTooltipReferenceChange?.(M?.uid,null)))}),V(e.uid,l`<calcite-list-item class=${d(K(r.item,"itemActive"in r&&{[r.itemActive]:h?.uid===e.uid}))} data-item=${e.uid??p} data-layer-id=${M?.id??p} .dragDisabled=${!("sortable"in e&&e.sortable)||Be} id=${(c?void 0:M?.uid)??p} .label=${x} .metadata=${{parentTitles:T??[],_title:x}} .expanded=${"open"in e&&e.open} .selected=${w!=="none"?S.includes(e):!1} title=${Ue??p} .unavailable=${Ke} .value=${e} @focusin=${()=>{J?.(e),z.value?.classList.add(r.itemActive)}} @focusout=${()=>{Q?.(),z.value?.classList.remove(r.itemActive)}} @mouseover=${()=>{J?.(e),z.value?.classList.add(r.itemActive)}} @mouseleave=${()=>{Q?.(),z.value?.classList.remove(r.itemActive)}} @calciteListItemSelect=${i=>{i.target===i.currentTarget&&"visible"in e&&fe(i.currentTarget,t.operationalItems)===e&&w==="none"&&F(b)!=="inherited"&&G(e,b)}} @calciteListItemToggle=${i=>{"open"in e&&(i.stopPropagation(),e.open=i.target.expanded)}} ${B(z)}>${re}${ae}${W}${ee}${oe}${X}${le}${R}${ie}${te}${q}</calcite-list-item>`)}return{a:Xe,b:ei,c:ii,d:Je}},"layers/catalog/catalogUtils",a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import l from"./4UCQJWD2.js";import{a as q}from"./4L43F7HU.js";import k from"./3KAC2MKA.js";import j from"./BFYJTV6Q.js";import{a as B,b as S,c as G,g as O}from"./ZCFWKPXL.js";import{a as U}from"./WVKMYNN7.js";import{a as I}from"./5GFPOTOB.js";import i from"./GEOME3IC.js";import h from"./HU57LQOA.js";import g from"./BOPNSNUT.js";import"./WJQUE4DR.js";import f from"./EJVFK7JX.js";import{a as T}from"./REB4CHAK.js";import{a as m}from"./L5IRXOCJ.js";import e from"./7ILT5PDJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{h as D}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as F}from"./LXME6MU5.js";import{B as y,P as M,Q as E,R as _,T as p,X as C,_ as L,b as o,x as d}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([z,{watch:w,on:H},V,,,,A,P,,,,,,{a:x,b:N,c:R,d:k}])=>{var v=q,j="nested",K=P(V),$=class extends _{constructor(){super(...arguments),this.#t=x(this),this.#i=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=M(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=K(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,a=this.#e(e);if(!a||!("sortable"in a)||!a.sortable)return!1;let c=this.#e(t),h=this.#s(t),n=this.#e(i),g=this.#s(i),u=!!h&&!!g&&h===g,f={selected:a,from:c,to:n},b=t?.group,r=i?.group;return b&&r&&typeof l=="function"?l(f):u},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=G,this.minFilterItems=S,this.selectedItems=new z,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryTableIndicators=!1,this.tables=this.viewModel.tables,this.arcgisClose=d(),this.arcgisFilterChange=d(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=d(),this.arcgisSelectedItemsChange=d(),this.arcgisTableItemsChanged=d(),this.arcgisTriggerAction=A(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,autoDestroyDisabled:5,closed:5,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryTableIndicators:5,state:32,tableItems:32,tables:0,view:0}}static{this.styles=[R,N]}#t;#i;get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[w(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),H(()=>this.viewModel.tableItems,"change",()=>{O(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),H(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),w(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),w(()=>[this.filterPredicate,this._rootListRef.value],()=>this.#r())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}#e(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this.#a(t):null}#a(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}#s(e){return e?.getAttribute("data-layer-type")??null}#r(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this.#e(t);return i?this.filterPredicate(i):!1}:void 0)}#o(e){e.open=!1}#n(e,t){e?.sort((i,s)=>{let l=i.uid!=null?t.indexOf(i.uid):-1,a=s.uid!=null?t.indexOf(s.uid):-1;return l>a?-1:l<a?1:0})}#h(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}#d(e){let t=this.#i,{toEl:i,fromEl:s,dragEl:l,newIndex:a}=e,c=t?.newIndex===a&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this.#i=e,this._selectedDragItemLayerUid=l.value;let h=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this.#n(this.map?.tables,h)}#c(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(l=>this.#e(l)).filter(Boolean);i.removeAll(),i.addMany(s)}#m(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${p(F(m.widget,m.panel,t))}>${this.#p()}</div>`}#l(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#g(){return this.hideNoItemsNotice?null:o`<div class=${p(v.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#l()}</calcite-notice></div>`}#u(){return U(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this.#o(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${a=>{a.preventDefault(),l()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#p(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:l,showCollapseButton:a,showHeading:c,_dragEnabled:h,filterText:n,filterPlaceholder:g,messages:u}=this,f=this.#t.selectionMode,b=[o`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${c?this.label??u.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this.#m()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??C} .displayMode=${j} .dragEnabled=${h} .filterEnabled=${i} .filterPlaceholder=${g} .filterProps=${B} .filterText=${i?n:""} .group=${s} .label=${this.label??u.componentLabel} selection-appearance=border .selectionMode=${f} @calciteListChange=${this.#c} @calciteListDragEnd=${r=>this.#h(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this.#d(r.detail)} ${E(this._rootListRef)}>${t.toArray().map(r=>this.#f(r))}${i&&!this.hideNoFilterResultsNotice?o`<div class=${p(v.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l()}</calcite-notice></div>`:null}</calcite-list>`:this.#g()}</calcite-flow-item>`,this.#u()];return this.closed?null:I("root-flow",o`<calcite-flow>${b}</calcite-flow>`)}#f(e){return I(e.uid,k({canMove:this._canMove,css:v,displayMode:j,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.#t.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",$);return $},"core/Collection","core/reactiveUtils","layerList/TableListModel",a,b,c,e,f,g,h,i,j,k,l)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import s from"./4UCQJWD2.js";import{a as J}from"./4L43F7HU.js";import o from"./3KAC2MKA.js";import n from"./BFYJTV6Q.js";import{a as G,b as U,g as j,h as q,m as F}from"./ZCFWKPXL.js";import{a as k}from"./WVKMYNN7.js";import{a as I}from"./5GFPOTOB.js";import l from"./GEOME3IC.js";import i from"./HU57LQOA.js";import h from"./BOPNSNUT.js";import"./WJQUE4DR.js";import g from"./EJVFK7JX.js";import{a as x}from"./REB4CHAK.js";import{a as p}from"./L5IRXOCJ.js";import e from"./7ILT5PDJ.js";import d from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{h as D}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as A}from"./LXME6MU5.js";import{B as E,P as T,Q as m,R as O,T as f,X as $,Y as L,_ as P,b as r,x as c}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{createReactiveMap:K},b,{on:C,watch:X},Y,Z,{j:w},,,N,R,,,,,,{a:B,b:S,c:H,d:z}])=>{var g=J,ee=u=>{let e=u?.type;return e==="knowledge-graph"||e==="map-image"||e==="tile"},te=u=>u?.type==="catalog",Q="nested",se=b.ofType(Z),ie=R(Y),_=class extends O{constructor(){super(...arguments),this.#l=B(this),this.#r=`operational-${E()}`,this.#e=null,this.#o=T(),this.#i=!1,this.#t=!1,this.messages=x(),this.#n=()=>{this._activeItem=null},this.#h=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(s=>s.classList?.contains(g.item));this._activeItem=F(t)},this.#a=K(),this.#s=K(),this.#c=e=>{e&&this.#$(e)},this.#d=e=>{e&&this.#v(e)},this.#m=e=>{e&&this.#L(e)},this.viewModel=ie(this),this._activeItem=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this.layerTablesEnabled=new b(["knowledge-graph"]),this.mapImageOptions=null,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayerLists=new b,this.openedLayers=new b,this.selectedItems=new se,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisCatalogItemsChange=c(),this.arcgisFilterChange=c(),this.arcgisOpenedLayersChange=c(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=c(),this.arcgisSelectedItemsChange=c(),this.arcgisTriggerAction=N(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_activeItem:16,_focusRootFlowItem:16,_focusPanelFlowItem:16,_focusLayerFlowItem:16,_totalItems:16,_filterEnabled:16,_visibleItems:16,_openedPanelItems:16,_renderedOpenLayerFlowItems:16,layerTablesEnabled:16,mapImageOptions:16,tileOptions:16,autoDestroyDisabled:5,catalogItems:0,catalogLayer:0,catalogOptions:0,closed:5,collapsed:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,knowledgeGraphOptions:0,label:1,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minFilterItems:9,onCatalogOpen:0,onTablesOpen:0,openedLayerLists:32,openedLayers:32,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,topLayerDisabled:5,view:0,visibilityAppearance:1}}static{this.styles=[H,S]}#l;#r;#e;#o;#i;#t;#n;#h;#a;#s;#c;#d;#m;get _totalItems(){return this.catalogItems?.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length??0}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _visibleItems(){return this.catalogItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,s)=>this.#R(t,s===e.length-1))}get catalogItems(){return this.viewModel.catalogItems}set catalogItems(e){this.viewModel.catalogItems=e}get catalogLayer(){return this.viewModel.catalogLayer}set catalogLayer(e){this.viewModel.catalogLayer=e}async destroy(){this.#i||this.#t||(this.#i=!0,this.#e?.abort(),this.#e=null,await this.manager.destroy(),this.openedLayerLists.removeAll(),this.openedLayers.removeAll(),this.#s.clear(),this.#a.clear(),this.#t=!0,this.#i=!1)}loaded(){this.manager.onLifecycle(()=>[C(()=>this.openedLayers,"change",()=>{this.#I()}),C(()=>this.viewModel.catalogItems,"change",()=>{j(this.selectedItems),this.arcgisCatalogItemsChange.emit()}),C(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),X(()=>[this.filterPredicate,this.#o.value],()=>q(this.#o.value,this.filterPredicate))])}disconnectedCallback(){super.disconnectedCallback(),this.#e?.abort(),this.#e=null,!this.autoDestroyDisabled&&!this.#t&&!this.#i&&this.destroy()}#f(e,t){return this.viewModel.triggerAction(e,t)}async#w(e,t){let s=this.#s.get(e);if(s)return s;let a=e.type==="catalog"?await this.#F(e):await this.#_(e);return t.aborted||!this.isConnected||this.#t?(a?.destroy?.(),a):(t.aborted||this.#s.set(e,a),a)}async#I(){if(!this.isConnected||this.#t)return;let{openedLayers:e,openedLayerLists:t}=this;this.#e?.abort();let s=new AbortController,{signal:a}=s;this.#e=s,this.#s.forEach((n,h)=>{e.includes(h)||(n?.destroy?.(),this.#s.delete(h))});let o=await Promise.all(e.map(n=>this.#w(n,a)));if(a.aborted||!this.isConnected||this.#t)return;t.removeAll(),t.addMany(o);let i=t.at(-1),l=i&&"catalogLayer"in i?i:void 0;this._catalogLayerList!==l&&(this._catalogLayerList=l),this.arcgisOpenedLayersChange.emit()}#b(e){e.open=!1,this._focusRootFlowItem=!0}#v(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,w(e))}#$(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,w(e))}#L(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,w(e))}async#F(e){let{headingLevel:t,catalogOptions:s,view:a,referenceElement:o,filterPlaceholder:i,listItemCreatedFunction:l,minFilterItems:n,selectionMode:h,visibilityAppearance:d}=this;return L(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder??i} .listItemCreatedFunction=${s?.listItemCreatedFunction??l} .minFilterItems=${s?.minFilterItems??n} .selectionMode=${s?.selectionMode??h} .visibilityAppearance=${s?.visibilityAppearance??d} .showErrors=${s?.showErrors??this.showErrors} .showFilter=${s?.showFilter??this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${y=>y.stopPropagation()} .catalogLayer=${e} .view=${a} .referenceElement=${o} @catalogOpen=${this.#g} @tablesOpen=${this.#p}></arcgis-catalog-layer-list-next>`)}#C(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async#_(e){let{headingLevel:t,selectionMode:s,referenceElement:a,view:o}=this,i=this.#C(e);return L(r`<arcgis-table-list-next .headingLevel=${i?.headingLevel??t} .selectionMode=${i?.selectionMode??s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${o} .referenceElement=${a} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#p(e){if(this.onTablesOpen){this.onTablesOpen(e);return}let t=e.layer;ee(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=t.uid)}#g(e){if(this.onCatalogOpen){this.onCatalogOpen(e);return}let t=e.layer?.parent;te(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=e.layer?.uid)}#M(e,t){t?this.#a.set(e,t):this.#a.delete(e)}#E(e,t){this.#f(e,t)}#T(e){let{selectionMode:t,selectedItems:s}=this;if(t==="none")return;let a=e.target.selectedItems.map(o=>F(o)).filter(Boolean);s.removeAll(),s.addMany(a)}render(){let{state:e}=this,t={[p.hidden]:e==="loading",[p.disabled]:e==="disabled"};return r`<div class=${f(A(p.widget,p.panel,t))}>${this._visibleItems?.length?this.#P():null}${this.#x()}</div>`}#O(e){let t=this.#a,s=this.messages;return e?.layer?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer.uid)} .topLayerDisabled=${this.topLayerDisabled}>${s.layerIncompatibleTooltip}</calcite-tooltip>`:null}#u(e){return e.incompatible?this.#O(e):e.children?.filter(t=>!t.hidden).toArray().map(t=>this.#u(t))}#P(){return this._visibleItems?.toArray().map(e=>this.#u(e))}#y(){return r`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#A(){return this.hideNoItemsNotice?null:r`<div class=${f(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#y()}</calcite-notice></div>`}#D(){let{_openedPanelItems:e,openedLayers:t}=this;return k(e.toArray(),({uid:s})=>s,(s,a)=>{let{uid:o,title:i,panel:l}=s,n=()=>this.#b(l);return r`<calcite-flow-item .description=${i} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${h=>{h.preventDefault(),n()}} ${m(this.#c)}><arcgis-layer-list-item-panel .item=${s} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent slot=footer-actions width=full @click=${n}>Back</calcite-button></calcite-flow-item>`})}#x(){let{collapsed:e,_visibleItems:t,_filterEnabled:s,showCloseButton:a,showCollapseButton:o,showHeading:i,filterText:l,filterPlaceholder:n,openedLayers:h,_openedPanelItems:d}=this,y=this.#r,M=this.label??this.messages.componentLabel??"",V=this.#l.selectionMode,W=[r`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${i?M:void 0} .headingLevel=${this.headingLevel} .selected=${!h.length&&!d.length} @calciteFlowItemClose=${()=>this.closed=!0} ${m(this.#d)}>${t?.length?r`<calcite-list data-layer-type=${y??$} .displayMode=${Q} .filterEnabled=${s} .filterPlaceholder=${n} .filterProps=${G} .filterText=${s?l:""} .group=${y} .label=${M} @focusin=${this.#h} @focusout=${this.#n} selection-appearance=border .selectionMode=${V} @calciteListChange=${this.#T} @calciteListFilter=${v=>{this.filterText=v.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @mouseleave=${this.#n} @mouseover=${this.#h} ${m(this.#o)}>${t.toArray().map(v=>this.#N(v))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${f(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#y()}</calcite-notice></div>`:null}</calcite-list>`:this.#A()}</calcite-flow-item>`,this.#D(),this._renderedOpenLayerFlowItems];return this.closed?null:I("root-flow",r`<calcite-flow>${W}</calcite-flow>`)}#R(e,t){let{openedLayers:s}=this,a=e.title||this.messages.untitledLayer;return I(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??$} .description=${a} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${o=>{o.preventDefault(),s.pop();let i=s.at(-1);i?this._focusLayerFlowItem=i.uid:this._focusRootFlowItem=!0}} ${m(this.#m)}>${this.#s.get(e)}</calcite-flow-item>`)}#N(e,t,s){let{hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d}=this;return I(e.uid,z({activeItem:this._activeItem??void 0,css:{...g,itemCatalogIcon:g.itemActionIcon},displayMode:Q,dragEnabled:!1,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,parent:t,parentTitles:s,rootGroupUid:this.#r,selectedItems:this.selectedItems,selectionMode:this.#l.selectionMode,visibilityAppearance:this.visibilityAppearance,hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d,handleAction:this.#E.bind(this),handleCatalogOpen:this.#g.bind(this),handleTablesOpen:this.#p.bind(this),handleTooltipReferenceChange:this.#M.bind(this),view:this.view}))}};P("arcgis-catalog-layer-list-next",_);return _},"applications/Components/featureUtils","core/Collection","core/reactiveUtils","layerList/CatalogLayerListModel","layerList/Item",a,b,d,e,g,h,i,l,n,o,s)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as x}from"./FH3WFF5O.js";import{a as w}from"./GDLDEHUJ.js";import{h as k}from"./Q7GF26CL.js";import"./U77WHUC6.js";import{c as S}from"./LXME6MU5.js";import{P as m,Q as b,R as A,U as C,_ as M,a as E,b as y}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:L}])=>{var O=E`:host{--arcgis-internal-view-popover-tail-size: 10px;display:block}.layout-metrics{position:absolute;visibility:hidden;pointer-events:none;width:var(--calcite-spacing-sm);height:var(--arcgis-internal-view-popover-tail-size)}.frame{position:fixed;inset:auto;margin:0;padding:0;border:0;overflow:visible;background:transparent;color:var(--calcite-color-text-1);pointer-events:none}.bounds{position:absolute;inset:0}[data-in-view] .bounds{top:var(--arcgis-layout-overlay-space-top, 0px);right:var(--arcgis-layout-overlay-space-right, 0px);bottom:var(--arcgis-layout-overlay-space-bottom, 0px);left:var(--arcgis-layout-overlay-space-left, 0px)}.surface{--arcgis-internal-view-popover-border-width: 1px;position:absolute;top:var(--top);right:var(--right);bottom:var(--bottom);left:var(--left);display:flex;flex-direction:column;width:max-content;height:fit-content;min-width:min(var(--min-content-width),var(--max-content-width),var(--available-width));max-width:min(var(--max-content-width),var(--available-width));max-height:var(--available-height);pointer-events:auto;box-sizing:border-box;border:var(--arcgis-internal-view-popover-border-width) solid var(--calcite-color-border-3);filter:drop-shadow(0 6px 10px rgb(0 0 0 / 10%)) drop-shadow(0 4px 6px rgb(0 0 0 / 8%));border-radius:var(--calcite-corner-radius-sm);background:var(--calcite-color-surface-2)}calcite-panel{--calcite-panel-corner-radius: var(--calcite-corner-radius-sm);--calcite-panel-background-color: var(--calcite-color-surface-2);block-size:auto;flex:1 1 auto;min-height:0;min-width:0;max-height:inherit}.content{flex:none;font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-1);-webkit-user-select:none;user-select:none}.surface:before{--arcgis-internal-view-popover-tail-half-size: calc(var(--arcgis-internal-view-popover-tail-size) / 2);--arcgis-internal-view-popover-tail-half-diagonal: calc(var(--arcgis-internal-view-popover-tail-half-size) * sqrt(2));--arcgis-internal-view-popover-tail-stretch: calc( (var(--anchor-gap) + var(--arcgis-internal-view-popover-border-width)) / var(--arcgis-internal-view-popover-tail-half-diagonal) );content:"";position:absolute;box-sizing:border-box;width:var(--arcgis-internal-view-popover-tail-size);height:var(--arcgis-internal-view-popover-tail-size);background:var(--calcite-color-surface-2);border:calc(var(--arcgis-internal-view-popover-tail-size) / 10) solid var(--calcite-color-border-3);pointer-events:none;opacity:var(--arcgis-internal-view-popover-tail-opacity, 1);z-index:1}[data-anchor-hidden] .surface:before,[data-tail-hidden] .surface:before{display:none}[data-layout=horizontal][data-vertical=top] .surface:before{top:calc(-1 * var(--arcgis-internal-view-popover-tail-half-size));clip-path:polygon(0 0,100% 0,0 100%);border-right-color:transparent;border-bottom-color:transparent}[data-layout=horizontal][data-vertical=bottom] .surface:before{bottom:calc(-1 * var(--arcgis-internal-view-popover-tail-half-size));clip-path:polygon(100% 100%,100% 0,0 100%);border-left-color:transparent;border-top-color:transparent}[data-layout=horizontal] .surface:before{transform:scaleY(var(--arcgis-internal-view-popover-tail-stretch)) rotate(45deg);left:calc(var(--tail-offset) - var(--arcgis-internal-view-popover-tail-half-size) - var(--arcgis-internal-view-popover-border-width))}[data-layout=vertical][data-horizontal=left] .surface:before{left:calc(-1 * var(--arcgis-internal-view-popover-tail-half-size));clip-path:polygon(0 0,0 100%,100% 100%);border-right-color:transparent;border-top-color:transparent}[data-layout=vertical][data-horizontal=right] .surface:before{right:calc(-1 * var(--arcgis-internal-view-popover-tail-half-size));clip-path:polygon(0 0,100% 0,100% 100%);border-left-color:transparent;border-bottom-color:transparent}[data-layout=vertical] .surface:before{transform:scaleX(var(--arcgis-internal-view-popover-tail-stretch)) rotate(45deg);top:calc(var(--tail-offset) - var(--arcgis-internal-view-popover-tail-half-size) - var(--arcgis-internal-view-popover-border-width))}`,R=class extends A{constructor(){super(...arguments),this._nativePopoverLayer=m(),this._bounds=m(),this._surface=m(),this._calcitePanel=m(),this._layoutMetrics=m(),this._visibilityTrackedElements=new Map,this._scheduleReposition=()=>{!this.isConnected||!this.open||this._positionAnimationFrame!==void 0||(this._positionAnimationFrame=requestAnimationFrame(()=>{this._positionAnimationFrame=void 0,this.isConnected&&this.open&&this._positionPopover()}))},this._isPositionedAndVisible=!1,this.open=!1,this.maxContentWidth=400,this.minContentWidth=300,this.minimumUsableWidth=200,this.viewEdgeMargin=16,this.visualScale="m",this.tailAttachmentAppearance="bar",this.arcgisPropertyChange=k()("open")}static{this.properties={_isPositionedAndVisible:16,actionBarLayout:32,actionBarElement:0,anchorElement:0,heading:1,open:5,maxContentWidth:9,minContentWidth:9,minimumUsableWidth:9,viewEdgeMargin:9,visualScale:1,tailAttachmentAppearance:1}}static{this.styles=O}get _containingView(){return S(this.anchorElement??this.el,"arcgis-map, arcgis-scene")}get actionBarLayout(){return this.actionBarElement?.layout==="vertical"?"vertical":"horizontal"}loaded(){this.listenOn(window,"resize",this._scheduleReposition),this.listenOn(window,"scroll",this._scheduleReposition,{capture:!0}),window.visualViewport&&(this.listenOn(window.visualViewport,"resize",this._scheduleReposition),this.listenOn(window.visualViewport,"scroll",this._scheduleReposition))}updated(){this._cancelRepositionAndStopObserving(),this.isConnected&&this.open?(this._observePosition(),this._scheduleReposition()):(this._visibilityTrackedElements.clear(),this._hidePopover())}willUpdate(){this.open||(this._isPositionedAndVisible=!1)}disconnectedCallback(){super.disconnectedCallback(),this._cancelRepositionAndStopObserving(),this._visibilityTrackedElements.clear(),this._hidePopover()}_observePosition(){let t=this._containingView?.view,e=this._observeLayoutElements(t),o=L(()=>[t?.padding.left,t?.padding.right,t?.padding.top,t?.padding.bottom,t?.attributionHeight],this._scheduleReposition);this._observableHandle=x(()=>{e.remove(),o.remove()})}_observeLayoutElements(t){let{anchorElement:e,actionBarElement:o}=this,a=new Set([e,o??e]);for(let r of this._visibilityTrackedElements.keys())a.has(r)||this._visibilityTrackedElements.delete(r);let n=new IntersectionObserver(r=>{for(let h of r){let d=h.intersectionRect.width>0&&h.intersectionRect.height>0;this._visibilityTrackedElements.get(h.target)!==d&&(this._visibilityTrackedElements.set(h.target,d),this._scheduleReposition())}},{threshold:Number.EPSILON});for(let r of a)r&&n.observe(r);let l=new ResizeObserver(this._scheduleReposition),s=new MutationObserver(this._scheduleReposition);for(let r of[this.el,e,o,t?.container])r&&(l.observe(r),s.observe(r,{attributes:!0,attributeFilter:["style","class","hidden","slot","layout","dir","scale","expanded","expand-position"],childList:r===o,subtree:r===o}));for(let r of[this._bounds.value,this._surface.value,this._layoutMetrics.value])r&&l.observe(r);let c=B([e,o]);for(let r of c)r.addEventListener("scroll",this._scheduleReposition,!0);return x(()=>{n.disconnect(),l.disconnect(),s.disconnect();for(let r of c)r.removeEventListener("scroll",this._scheduleReposition,!0)})}_cancelRepositionAndStopObserving(){this._observableHandle?.remove(),this._observableHandle=void 0,this._positionAnimationFrame!==void 0&&(cancelAnimationFrame(this._positionAnimationFrame),this._positionAnimationFrame=void 0)}_hidePopover(){this._isPositionedAndVisible=!1,this._nativePopoverLayer.value?.hidePopover()}_positionPopover(t=!0){let e=this._nativePopoverLayer.value,o=this._bounds.value,a=this._surface.value,n=this._layoutMetrics.value,l=this.anchorElement,s=this.actionBarElement??l;if(!e||!o||!a||!n||!l?.isConnected||!s||!this._visibilityTrackedElements.get(s)){this._hidePopover();return}let c=l.getBoundingClientRect(),r=s.getBoundingClientRect(),h=this.actionBarElement?$(c,r,this.actionBarLayout,getComputedStyle(s).direction==="rtl"):n.getBoundingClientRect().width,d=t?this._containingView:void 0,v=d?this.viewEdgeMargin:h,p=U(d?.view,v);if(!p.width||!p.height||!c.width||!c.height||!r.width||!r.height){this._hidePopover();return}F(e,p,!!d),e.toggleAttribute("data-anchor-hidden",!this._visibilityTrackedElements.get(l));let u=o.getBoundingClientRect();this._layoutSurface(e,a,{action:c,toolbar:r},u,h)}_layoutSurface(t,e,o,a,n){let{action:l,toolbar:s}=o,c=this.actionBarLayout,r=D(s,a),h=this.tailAttachmentAppearance==="action"?l:s,d=q(h,a,c,r,n),v=a.width-d.left-d.right,p=a.height-d.top-d.bottom;if(t.hasAttribute("data-in-view")&&v<this.minimumUsableWidth){this._positionPopover(!1);return}if(v<=0||p<=0){this._hidePopover();return}z(t,{"available-width":v,"available-height":p,"anchor-gap":n},!0);let u=e.getBoundingClientRect(),g=T(e),f=W(o,a,u,c,g),_=c==="vertical"?u.height:u.width;t.toggleAttribute("data-tail-hidden",f.tailOffset<g||f.tailOffset>_-g),V(t,c,r,d,f),this._isPositionedAndVisible=!0}_handlePanelClose(t){t.target===this._calcitePanel.value&&(t.preventDefault(),this.open=!1)}render(){return y`<div class="layout-metrics" aria-hidden=true ${b(this._layoutMetrics)}></div><div class="frame" popover=manual style=${C({"--min-content-width":`${this.minContentWidth}px`,"--max-content-width":`${this.maxContentWidth}px`})} ${b(this._nativePopoverLayer)}><div class="bounds" ${b(this._bounds)}><div class="surface" ${b(this._surface)}>${this._renderPanel()}</div></div></div>`}_renderPanel(){return y`<calcite-panel .closed=${!this.open} closable .heading=${this.heading} .scale=${this.visualScale} .focusTrapEnabled=${this.open&&this._isPositionedAndVisible} @calcitePanelClose=${this._handlePanelClose} ${b(this._calcitePanel)}><div class="content"><slot></slot></div></calcite-panel>`}};function B(i){let t=new Set;for(let e of i)for(;e;){let o=e.getRootNode();o instanceof ShadowRoot&&t.add(o),e.shadowRoot&&t.add(e.shadowRoot),e=e.assignedSlot??e.parentElement??(o instanceof ShadowRoot?o.host:void 0)}return t}function $(i,t,e,o){return e==="horizontal"?i.top-t.top:o?t.right-i.right:i.left-t.left}function T(i){let t=getComputedStyle(i),e=getComputedStyle(i,"::before"),o=Math.max(...[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomLeftRadius,t.borderBottomRightRadius].flatMap(n=>n.split(" ").map(Number.parseFloat))),a=Math.hypot(Number.parseFloat(e.width),Number.parseFloat(e.height))/2;return Math.ceil(o+a)}function F(i,t,e){i.toggleAttribute("data-in-view",e),z(i,{left:t.x,top:t.y,width:t.width,height:t.height}),i.showPopover()}function V(i,t,e,o,a){let n={left:"auto",right:"auto",top:"auto",bottom:"auto"};t==="vertical"?(n[e.horizontal]=o[e.horizontal],n.top=a.panelStart):(n[e.vertical]=o[e.vertical],n.left=a.panelStart),z(i,{...n,"tail-offset":a.tailOffset},!0),i.dataset.horizontal=e.horizontal,i.dataset.vertical=e.vertical,i.dataset.layout=t}function W(i,t,e,o,a){let{action:n,toolbar:l}=i,s=o==="vertical"?"top":"left",c=o==="vertical"?"bottom":"right",r=o==="vertical"?"height":"width",h=(n[s]+n[c])/2-t[s],d=l[s]-t[s],v=l[c]-t[s],p=e[r],u=t[r],g=h-d<=v-h?d:v-p,f=h-g,_=f>=a&&f<=p-a?g:h-p/2,P=w(_,0,Math.max(0,u-p));return{panelStart:P,tailOffset:h-P}}function H(){let i=window.visualViewport;return new DOMRect(i?.offsetLeft??0,i?.offsetTop??0,i?.width??document.documentElement.clientWidth,i?.height??document.documentElement.clientHeight)}function N(i){let t=i?.container?.getBoundingClientRect();if(!t)return;let e=i?.padding,o=i?.attributionHeight??0;return{left:t.left+(e?.left??0),top:t.top+(e?.top??0),right:t.right-(e?.right??0),bottom:t.bottom-(e?.bottom??0)-o}}function U(i,t){let e=H(),o=N(i)??e,a=Math.max(e.left,o.left)+t,n=Math.max(e.top,o.top)+t,l=Math.min(e.right,o.right)-t,s=Math.min(e.bottom,o.bottom)-t;return new DOMRect(a,n,Math.max(0,l-a),Math.max(0,s-n))}function D(i,t){return{horizontal:i.left-t.left<=t.right-i.right?"left":"right",vertical:i.top-t.top<=t.bottom-i.bottom?"top":"bottom"}}function q(i,t,e,o,a){let n={top:0,right:0,bottom:0,left:0};return e==="vertical"?o.horizontal==="left"?n.left=w(i.right-t.left+a,0,t.width):n.right=w(t.right-i.left+a,0,t.width):o.vertical==="top"?n.top=w(i.bottom-t.top+a,0,t.height):n.bottom=w(t.bottom-i.top+a,0,t.height),n}function z(i,t,e=!1){for(let[o,a]of Object.entries(t)){let n=e?`--${o}`:o,l=typeof a=="number"?`${a}px`:a;i.style.setProperty(n,l)}}M("arcgis-view-popover",R);return R},"core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import c from"./QBVHLHRR.js";import b from"./HU57LQOA.js";import a from"./BOPNSNUT.js";import"./WJQUE4DR.js";import{a as v}from"./REB4CHAK.js";import{h as w}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{Q as h,R as m,_ as f,a as p,b as r,x as l}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([o,{watch:k},{substitute:$},T,{a:u},{d:y,h:b},d])=>{var _=p`: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-space-md);background-color:var(--calcite-color-surface-2)}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-space-md)}calcite-block calcite-input-message{padding:var(--calcite-space-sm) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}.subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.results-limited-message{padding:var(--calcite-space-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-space-md);margin:var(--calcite-space-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-space-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,g=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#n=!0,this.#d=new Map,this.#t=new o,this.#i=new o,this.#e=new o,this.#a=null,this.#r=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.includeDefaultActionsDisabled=!1,this.mode="default",this.arcgisPropertyChange=w()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisTriggerAction=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,actions:0,beforeMapInteraction:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,includeDefaultActionsDisabled:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,messageOverrides:0,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#n;get#T(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#d;#t;#i;#e;#a;#s;#f;#w;#y;#r;get#h(){return!this.isSubnetworkNameTraceSelected}get#u(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#b(){return this._namedTraceConfigurations.length>0&&!!this.traceConfiguration}get#_(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#t,...this.#i,...this.#e])}get traceLocations(){let t=[];return this.#h&&this.#t.forEach(e=>t.push(...this.#g(e))),this.#u&&this.#e.forEach(e=>t.push(...this.#g(e))),this.#i.forEach(e=>t.push(...this.#g(e))),t}async destroy(){this.#k(),d.getSketchViewModel(this.view)?.cancel(),d.removeSketchGraphicsLayer(this.view);let t=await Promise.allSettled([this.#s?.destroy(),this.#f?.destroy(),this.#w?.destroy(),this.#y?.destroy()]);for(let e of t)e.status==="rejected"&&u(e.reason,this,"Error while destroying trace inputs");await this.manager.destroy()}load(){this.#v(),this.manager.onLifecycle(()=>[k(()=>this.view?.map,()=>this.#v())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#P()}disconnectedCallback(){super.disconnectedCallback(),this.#d.clear()}#N(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#C({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#v(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#L(t){t&&(this.#f=t)}#S(t){t&&(this.#w=t)}#D(t){t&&(this.#y=t)}#F(t){t&&(this.#s=t)}#g(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#k(){this.#o(new o([...this.#t,...this.#i,...this.#e])),this.#t.removeAll(),this.#i.removeAll(),this.#e.removeAll()}async#P(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){u(e,this,"Error while loading the selected utility network")}this.#U(),this.#E(),this.#k()}#A(){if(!this.#b){this.#o(new o([...this.#t,...this.#i,...this.#e]));return}this.#p(this.#i),this.#h?this.#p(this.#t):this.#o(this.#t),this.#u?this.#p(this.#e):this.#o(this.#e)}#U(){this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],(!this.selectedNamedTraceConfiguration||!this._namedTraceConfigurations.includes(this.selectedNamedTraceConfiguration))&&(this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0)}#E(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#T.filter(e=>t?.isUtilityLayer(e)&&!this.#_.includes(e.layerId)))}#I(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.#d,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(c=>"layerId"in c&&c.layerId===t);return s&&e.set(t,s),s}async#M(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#n)){let c=s.layer;s.popupTemplate=c.createPopupTemplate()}}),a}async#O(t){let e=new Map,i=[];return t.forEach(a=>{let s=b(a.layer)?a.layer.parent:a.layer;if(s){let c=this.#x(s.layerId);if(c){let n=e.get(c)||[];n.push(a),e.set(c,n)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],c=await this.#M(a,s);i.push(...c)})),i}async#B(t){return this._exceedDisplayLimit=t.length>this.#r,this._candidateFeatures=await this.#O(t.slice(0,this.#r)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#a?.reject(),this.#a=Promise.withResolvers(),await this.#a.promise)}#j(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#s?.clear(),this.#$(),(this.view?d.getSketchViewModel(this.view):null)?.cancel()}#$(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#a?.reject(),this.#a=null}#V(){let t=this.#a,e=this.#s,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#a=null}}#p(t){let e=t.map(({spatialProperties:i})=>i.flagGraphic).filter(i=>i!==void 0&&!this.view?.graphics.includes(i));this.view?.graphics.addMany(e)}#o(t){let e=t.map(({spatialProperties:i})=>i.flagGraphic).filter(i=>i!==void 0);this.view?.graphics.removeMany(e)}#z(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>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return r`<arcgis-utility-network-trace-configuration-picker .messageOverrides=${this.messageOverrides} .selectedNamedTraceConfiguration=${this.selectedNamedTraceConfiguration} .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"?(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration,this.#A()):i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#q(){let{selectedUtilityNetwork:t,view:e}=this;return r`<arcgis-utility-network-picker .messageOverrides=${this.messageOverrides} .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#Q(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#z(t,!1,"exclamation-mark-triangle"):i=this.#W(),r`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#R(){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.#c(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>`}#H(){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 .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#n} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .initialDisplayMode=${s} .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.#$()} @arcgisPropertyChange=${this.#C} @arcgisTriggerAction=${this.#N} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#F)}></arcgis-features-next>`}#J(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#r.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#V()} .disabled=${n}>${e.buttons.add}</calcite-button>`||""}`}#m(t,e,i){return r`<arcgis-utility-network-trace-locations .messageOverrides=${this.messageOverrides} .view=${this.view} .traceLocationType=${t} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisTraceLocationSelectStart=${this.#I} @arcgisTraceLocationSelectEnd=${this.#j} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#B.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#W(){let{_messages:t}=this,e=this.#q(),i=this.#G(),a=this.#b?r`${this.#h?this.#m("starting-point",this.#t,this.#L):null}${this.#u?this.#m("stopping-point",this.#e,this.#D):null}${this.#m("barrier",this.#i,this.#S)}`:null,s=this.selectedUtilityNetwork?.loaded?r`${i}${a}`:null;return r`<calcite-block-group .label=${t.labels.traceInputs}>${e}${s}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#H():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#Q()}${this.#R()}</calcite-flow>${t!=="default"?this.#J():null}</calcite-panel>`}};f("arcgis-utility-network-trace-inputs",g);return g},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import w from"./4UCQJWD2.js";import"./EVWWTIEQ.js";import{a as V}from"./4L43F7HU.js";import u from"./RXKIZFNQ.js";import t from"./3KAC2MKA.js";import s from"./BFYJTV6Q.js";import{a as H,b as q,g as j,h as L,j as z,k as J,m as c,n as $}from"./ZCFWKPXL.js";import{a as N}from"./WVKMYNN7.js";import{a as m}from"./5GFPOTOB.js";import o from"./GEOME3IC.js";import n from"./HU57LQOA.js";import l from"./BOPNSNUT.js";import"./WJQUE4DR.js";import i from"./EJVFK7JX.js";import{a as B}from"./REB4CHAK.js";import{a as _}from"./L5IRXOCJ.js";import{a as k}from"./7Y4SF2NT.js";import h from"./7ILT5PDJ.js";import f from"./7JPHMESH.js";import e from"./OLY5EME5.js";import{h as x}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as P}from"./LXME6MU5.js";import{B as R,P as d,Q as p,R as C,T as g,X as y,Y as v,_ as A,a as M,b as r,x as b}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([ae,w,{on:le,watch:re},,,,D,O,,,,,{k:K},,{a:S,b:U,c:G,d:Q}])=>{var u={...V,section:"section",editing:"editing",editingForm:"editing-form"},oe=M`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-space-sm);padding-inline:var(--calcite-space-sm)}`,W="nested",ne=".*\\S+.*",X="data-basemap-layer-type",he=O(ae),F=class extends C{constructor(){super(...arguments),this.#t=S(this),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this.#i=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${R()}`,this.#s=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=B(),this.viewModel=he(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let n=c(t,this._allItems),a=$(t),h=c(i,this._allItems),f=$(i),I=!!a&&!!f&&a===f,Z={selected:o,from:n,to:h},ee=t.group,te=i.group,ie=n?.layer?.type??"",se=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return ee&&te&&typeof l=="function"?l(Z):I&&!T.has(ie)&&!T.has(se)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new w,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new w(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=q,this.openedLayers=new w,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new w,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=b(),this.arcgisOpenedLayersChange=b(),this.arcgisPropertyChange=x()("state"),this.arcgisReady=b(),this.arcgisReferenceFilterChange=b(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[G,oe,U]}#t;#i;#s;get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this.#$(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#h(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[le(()=>this.openedLayers,"change",()=>{this.#n()},{initial:!0}),re(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>j(this.selectedItems),{initial:!0})])}updated(){L(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),L(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async#o(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this.#c(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async#n(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#s?.abort();let s=new AbortController,{signal:l}=s;this.#s=s,e.forEach((a,h)=>{t.includes(h)||(a?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(a=>this.#o(a,l)));if(l.aborted)return;i.removeAll(),i.addMany(o);let n=i.at(-1);n?"catalogLayer"in n?(this._catalogLayerList=n,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=n):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#h(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#c(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:l,selectionMode:o,visibilityAppearance:n,layerTablesEnabled:a}=this;return v(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??n} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${a} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#d(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this.#d(e);return v(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}#m(e){e.open=!1,this._focusRootFlowItem=!0}#p({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let l=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,n=t.hasAttribute("data-item")?c(t,this._allItems):null,a=Y(t),h=Y(e);s==null||!l||!a||!h||(this.viewModel.moveItem({targetItem:l,fromParentItem:n,toParentItem:o,newIndex:s,from:a,to:h}),K(this,l.uid,f=>f.parentElement?.closest("calcite-list")===e))}#g(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:l}=e;if(t!==i){s.remove();return}l==null||!t||!s||t.insertBefore(s,t.children[l])}_onCalciteListOrderChange(e){let t=this.#i,{toEl:i,fromEl:s,dragEl:l,newIndex:o}=e,n=t?.newIndex===o&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||n)return;this.#i=e,this._selectedDragItemLayerUid=l.value.layer?.uid??null;let a=s,h=i;if(a===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(a,f);return}this.#p({toEl:h,fromEl:a,dragEl:l,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;z(s,t);return}let i=c(e,this._allItems);i&&J(i,t)}#u(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}#e(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[_.hidden]:this.state==="loading",[_.disabled]:this.state==="disabled"};return r`<div class=${g(P(_.widget,_.panel,e))}>${this.#v()}${this.#y()}</div>`}#f(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}#a(e){if(e.incompatible)return this.#f(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#a(i));return t?.length?t:null}#y(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this.#a(e))}#l(e){return r`<div slot=message>${e}</div>`}#I(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this.#l(e)}</calcite-notice>`)}</div>`}#b(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${ne} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??y} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}#_(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this.#b()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}#w(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??y}></calcite-action>`:null}#v(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this.#w()}${this.#E()}${this.#F()}</calcite-flow-item>`),this.#_(),this.#L(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this.#e(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this.#e(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}#L(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this.#m(i);return this._focusPanelFlowItem=this.#e(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#$(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this.#e(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??y} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let l=this.openedLayers.at(-1);l?this._focusLayerFlowItem=l.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#r(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,l=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"",n=this.#t.selectionMode;return m(`block-${t}`,r`<calcite-block class=${g(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this.#I(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${a=>this._canMove(a,"pull")} .canPut=${a=>this._canMove(a,"put")} data-basemap-layer-type=${t??y} data-layer-type=${this._rootGroupUid??y} .displayMode=${W} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${H} .filterText=${s?l:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#u} @calciteListDragEnd=${a=>this.#g(a.detail)} @calciteListFilter=${a=>{let h=a.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=h,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${a=>this._onCalciteListOrderChange(a.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(a=>this.#T(a,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}#F(){return this.hideBaseLayers?null:this.#r(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}#E(){return this.hideReferenceLayers?null:this.#r(this._visibleReferenceItems,"reference",!1)}#T(e,t,i,s){return m(e.uid,Q({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:W,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.#t.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function Y(E){let e=E.closest(`[${X}]`)?.getAttribute(X);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layerList/BasemapLayerListModel","core/Collection","core/reactiveUtils",a,e,f,h,i,l,n,o,s,t,u,w)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./HU57LQOA.js";import{a as f}from"./REB4CHAK.js";import{h as g}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{R as m,_ as d,a as u,b as a,p as n,x as h}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([k,{d:b}])=>{var w=u`:host{height:100%;flex-grow:1}.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-space-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)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-input,calcite-label,calcite-notice){margin:0 var(--calcite-space-md)}calcite-block>:is(calcite-combobox,calcite-input,calcite-notice):not(:last-child){margin-bottom:var(--calcite-space-md)}calcite-block calcite-input-message{padding:var(--calcite-space-sm) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}#subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}`,C=20,N=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),c=class extends m{constructor(){super(...arguments),this._messages=f({blocking:!0}),this._subnetworkNamesState="ready",this._compatibleSubnetworkNames=[],this.traceConfigurations=[],this.hideSubnetworkInfo=!1,this.hideErrors=!1,this.state="ready",this.arcgisPropertyChange=g()("selectedNamedTraceConfiguration","traceConfiguration"),this.arcgisError=h()}static{this.properties={_subnetworksTable:16,_subnetworkNamesState:16,_compatibleSubnetworkNames:16,messageOverrides:0,selectedNamedTraceConfiguration:0,traceConfigurations:0,utilityNetwork:0,heading:1,traceConfiguration:0,isSubnetworkNameTraceSelected:32,hideSubnetworkInfo:5,hideErrors:5,error:1,state:1}}static{this.styles=w}get#e(){return this.traceConfiguration?.subnetworkName??void 0}set#e(e){this.traceConfiguration&&(this.traceConfiguration.subnetworkName=e)}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:e}=this;return!!e?.traceConfiguration?.subnetworkName&&e?.traceType==="subnetwork"}willUpdate(e){e.has("traceConfigurations")&&this.#h(),e.has("utilityNetwork")&&(this.#u(),!e.has("selectedNamedTraceConfiguration")&&this.isSubnetworkNameTraceSelected&&this.traceConfiguration&&this.#s(this.traceConfiguration)),e.has("selectedNamedTraceConfiguration")&&this.#o()}async#o(){let{selectedNamedTraceConfiguration:e}=this;if(!e||!(e.traceConfiguration instanceof k)){this.#t(e?this._messages.errors.noTraceConfiguration:this._messages.errors.traceConfigurationNotFound),this.traceConfiguration=void 0,this.arcgisPropertyChange.emit({name:"traceConfiguration"});return}this.#i(),this.traceConfiguration=e.traceConfiguration.clone(),this.arcgisPropertyChange.emit({name:"selectedNamedTraceConfiguration"}),this.arcgisPropertyChange.emit({name:"traceConfiguration"}),this.isSubnetworkNameTraceSelected&&await this.#s(this.traceConfiguration)}async#s(e){this._subnetworkNamesState="loading",this.state="loading",await this.#n(),await this.#c(),e.subnetworkName&&!this._compatibleSubnetworkNames.some(t=>t===e.subnetworkName)&&(this.#e=this._compatibleSubnetworkNames.at(0)),this._subnetworkNamesState="ready",this.state="ready"}async#n(){this._subnetworksTable||(this._subnetworksTable=await this.utilityNetwork?.loadSubnetworksTable())}async#c(){let{_subnetworksTable:e}=this;if(!e)return;let t=e.fieldsIndex.get("SUBNETWORKNAME"),i=(o,l,p)=>l===0||o.getAttribute(t.name)!==p[l-1].getAttribute(t.name),r=e.createQuery();r.gdbVersion=this.utilityNetwork?.gdbVersion,r.where=this.#l(),r.outFields=[t.name],r.orderByFields=[t.name];let{features:s}=await b(e,r,void 0,!1);this._compatibleSubnetworkNames=s.filter(i).map(o=>o.getAttribute(t.name))}#l(){let e=this.traceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}#u(){this.#e=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}#h(){let{selectedNamedTraceConfiguration:e}=this;this.traceConfigurations.length?(!e||!this.traceConfigurations.includes(e))&&(this.#i(),this.selectedNamedTraceConfiguration=this.traceConfigurations.find(t=>t.traceConfiguration instanceof k)??this.traceConfigurations.at(0)):(this.traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.#t(this._messages.errors.noTraceConfigurations))}#t(e){n("error",this,e),this.error=e,this.state="error",this.arcgisError.emit()}#i(){this.error=void 0,this.state="ready"}#a(e,t){return a`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${t}</div></div>`}#r(e,t=!1,i="exclamation-mark-triangle"){return this.hideErrors?null:a`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}#m(){let e=this.selectedNamedTraceConfiguration?.title;return e?a`<calcite-label>${e}</calcite-label>`:null}#d(){let e=this.traceConfigurations.map(i=>a`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return a`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let r=i.selectedItems[0]?.value;this.selectedNamedTraceConfiguration=this.traceConfigurations.find(s=>s.globalId===r)}}>${e}</calcite-combobox>`}#g(){let{_messages:e}=this;if(this.error===e.errors.noTraceConfigurations)return this.#r(e.errors.noTraceConfigurations);let t=this.error?this.#r(this.error):null,i=this.traceConfigurations.length>1?this.#d():this.#m(),r=this._messages.labels.traceConfiguration,s=this.heading??r;return a`<calcite-block .heading=${s} .label=${r} expanded>${i}${t}</calcite-block>`}#b(){if(this.hideSubnetworkInfo)return null;let{_messages:e,selectedNamedTraceConfiguration:t}=this;if(!t?.traceConfiguration)return this.traceConfiguration=void 0,this.#t(this._messages.errors.noTraceConfiguration),null;this.#i();let{domainNetworkName:i,tierName:r,targetTierName:s}=t.traceConfiguration;return!i&&!r&&!s?(n("warn",this,"`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."),null):a`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><div class="subnetwork-details">${i?this.#a(e.headings.domainNetwork,i):null}${r?this.#a(e.headings.tier,r):null}${s?this.#a(e.headings.targetTier,s):null}</div></calcite-block>`}#f(){let{_messages:e}=this,t=e.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?a`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?a`<calcite-block .heading=${t} .label=${t} expanded>${this._compatibleSubnetworkNames.length>C?this.#k():this.#p()}</calcite-block>`:this.#r(e.errors.noCompatibleSubnetworks):null}#k(){let{_messages:e}=this;return a`<calcite-input clearable type=text .placeholder=${e.instructions.enterSubnetworkName} max-length=64 .status=${this.#e?"valid":"invalid"} .value=${this.#e} @calciteInputInput=${t=>this.#e=t.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${e.labels.tooManySubnetworks}</calcite-input-message>`}#p(){return a`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.#e=t}}>${this._compatibleSubnetworkNames.map(e=>a`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.#e}></calcite-combobox-item>`)}</calcite-combobox>`}render(){let{selectedNamedTraceConfiguration:e}=this,t=e?.traceType&&N.has(e.traceType)?a`${this.#b()}${this.#f()}`:null;return a`${this.#g()}${t}`}};d("arcgis-utility-network-trace-configuration-picker",c);return c},"networks/support/UNTraceConfiguration",b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{b as oe}from"./JB6WQEFJ.js";import g from"./DSIYRWN2.js";import{a as T}from"./LTFGTX7S.js";import"./FH3WFF5O.js";import{a as M}from"./6J3KSMFG.js";import f from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./EJVFK7JX.js";import{a as ee}from"./REB4CHAK.js";import d from"./7ILT5PDJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{d as X,h as Y}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{b as Q}from"./LXME6MU5.js";import{E as N,F as H,O as q,P as k,Q as _,R as j,X as A,_ as J,a as K,b as v,e as O,x as W,z as U}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:de},pe,ge,{watch:y,on:ue,whenOnce:me},ve,{getOrCreateMapValue:ae,createReactiveMap:ye},be,{property:p,subclass:fe},{ignoreAbortErrors:E},Ce,we,,,,w,te,{f:Z},ie])=>{function se(i,e){let t=e;for(let o of i.split(".")){if(typeof t!="object"||t===null)return;t=Reflect.get(t,o)}return typeof t=="string"?t:void 0}var Te=K`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px;-webkit-user-select:none;user-select:none;pointer-events:initial;padding:var(--calcite-space-sm);arcgis-sketch-tooltip-controls+arcgis-snapping-controls{border-block-start:1px solid var(--calcite-color-border-3)}}:host{pointer-events:none}.toolbar-container{block-size:100%;min-block-size:0;min-inline-size:0}arcgis-toolbar-stack[layout=vertical]{block-size:100cqh;min-block-size:100%;max-block-size:100%}:host([data-intrinsic-toolbar-sizing]){min-inline-size:0;min-block-size:0;max-inline-size:100%;max-block-size:100%;arcgis-toolbar-stack[layout=vertical]{block-size:100%}}:host([data-intrinsic-toolbar-sizing][layout="vertical"]){display:grid;grid-template-columns:minmax(min-content,1fr);grid-template-rows:minmax(0,1fr);inline-size:fit-content;block-size:100%;.toolbar-container{block-size:auto}.toolbar-container,arcgis-view-popover{grid-area:1 / 1}}:host([data-intrinsic-toolbar-sizing][layout="vertical"][toolbar-kind="floating"]){block-size:auto}`,Se={point:"pin",polyline:"line",polygon:"polygon",rectangle:"rectangle",circle:"circle",multipoint:"pins",mesh:"i3d-building",freehandPolygon:"freehand-area",freehandPolyline:"freehand",text:"text"},Ee={selectionTools:{defaultPriority:T.Default,groupKind:"split-button",overflowLabel:"selection"},selectionSet:{defaultPriority:T.High,groupKind:"actions"},createTools:{defaultPriority:T.High,groupKind:"more-button",overflowLabel:"drawing"},undoRedo:{defaultPriority:T.Medium,groupKind:"split-button",overflowLabel:"action",preferEndSlot:!0},settings:{defaultPriority:T.Max,groupKind:"more-button",overflowLabel:"action",preferEndSlot:!0},geometrySimplification:{defaultPriority:T.Default,groupKind:"actions",preferEndSlot:!0}},_e=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,d=(i,e,t,o)=>{for(var s=o>1?void 0:o?Me(e,t):e,a=i.length-1,c;a>=0;a--)(c=i[a])&&(s=(o?c(e,t,s):c(s))||s);return o&&s&&_e(e,t,s),s},h=class extends be{constructor(i){super(i),this._effectiveRenderStateCache=new Map,this._effectiveGeometrySimplificationInProgress=!1,this.visibleElements=new Ce,this.settingsPopoverOpen=!1,this.availableCreateTools=["point","polyline","freehandPolyline","polygon","freehandPolygon","rectangle","circle"]}initialize(){this.selectionViewModel??=new we({persistSelection:!1}),this.addHandles([y(()=>this.sketchViewModel,(i,e)=>{i!==e&&this._effectiveRenderStateCache.clear()},{sync:!0}),ie({getLoading:()=>this.sketchViewModel?.geometrySimplificationInProgress??!1,setEffectiveLoading:i=>{this._effectiveGeometrySimplificationInProgress=i}}),y(()=>this.view,i=>{this.selectionViewModel.view=i},{initial:!0,sync:!0}),y(()=>this.sketchViewModel?.layer,i=>this.selectionViewModel.sources=i?[i]:[],{initial:!0,sync:!0}),this.selectionViewModel.on("complete",({selection:i})=>{let{sketchViewModel:e}=this;if(i.length&&e){let{defaultUpdateOptions:t}=e,{tool:o}=t;this.update(i,{...t,tool:i.length>1&&o==="reshape"?"transform":o})}}),y(()=>this.selectionViewModel.activeOperation,i=>{i&&(this.sketchViewModel?.cancel(),this._activeCustomToolOptions=void 0)},{sync:!0}),ue(()=>this.sketchViewModel,"create",i=>{i.state==="complete"&&this.sketchViewModel?.creationMode!=="continuous"&&(this._activeCustomToolOptions=void 0)}),y(()=>this.visibleElements.settingsMenu,i=>{i||(this.settingsPopoverOpen=!1)},{sync:!0})])}destroy(){this._pendingCommandAbortController?.abort(),this.selectionViewModel.destroy(),this.sketchViewModel=void 0}get _isEffectiveRenderStateFrozen(){let{sketchViewModel:i}=this;return!!(i?.toolTransitionInProgress||i?.geometrySimplificationInProgress)}_getEffectiveValue(i,e){if(!this._isEffectiveRenderStateFrozen||!this._effectiveRenderStateCache.has(i)){let t=e();return this._effectiveRenderStateCache.set(i,t),t}return this._effectiveRenderStateCache.get(i)}get _state(){return this.sketchViewModel?.state??"disabled"}get test(){return{activeCustomToolOptions:this._activeCustomToolOptions,activeSelectionTool:this._activeSelectionTool,selectionViewModel:this.selectionViewModel}}get _activeSelectionTool(){switch(this.selectionViewModel.activeOperation?.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";default:return}}get _activePluginUniqueIds(){let i=this.sketchViewModel?.activePluginConfigurations.filter(e=>!e.hidden).map(e=>e.uniqueId);return new Set(i??[])}get _createToolActions(){let{sketchViewModel:i}=this;if(!i)return[];let e=i.effectiveAvailablePlugins,t=this.state==="disabled",o=this.visibleElements.createTools,s=this.activeTool,a=this._activeCustomToolOptions,c=a||!i.firstPluginWithSwappableLeaf?this._customToolOptions:[],r=i.rootPlugins,n=c?.map(l=>({active:l===a,disabled:t,icon:l.icon,labelKey:l.label,onClick:l===a?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(l.toolName,l.createOptions,l)}))??[];if(a&&r)return[...this._pluginsToActions(r),...n];if(e?.length&&this.view?.type!=="3d")return[...this._pluginsToActions(e),...n];let g=this.view?.type==="3d";return[...this.availableCreateTools?.filter(l=>g&&l==="multipoint"?!1:l==="mesh"?!0:o[l])?.map(l=>({active:l===s,disabled:t,icon:Se[l],labelKey:`draw.${l}`,onClick:l===s?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(l)}))??[],...n]}get _shouldShowBackButton(){let i=this.sketchViewModel?.firstPluginWithSwappableLeaf,e=this.sketchViewModel?.rootPlugins,t=this._activeCustomToolOptions;return!!(this.sketchViewModel?.multiplePluginsActive&&i&&e&&!(e.length<2&&e.includes(i)&&!this.visibleElements.singlePluginBackButton)&&!t)}get _selectionToolActions(){return this._shouldShowBackButton?[{active:!1,disabled:this.state==="disabled",icon:"chevron-left",iconFlipRTL:!0,labelKey:"back",onClick:()=>this._cancelActiveOperation()}]:this._selectionCommands}get _settingsActions(){let i=this._customActions?.get("settings-before"),e=this._customActions?.get("settings-after"),t=this.visibleElements.settingsMenu,o=[];return!i?.length&&!e?.length&&!t||(i&&o.push(...this._customActionsToSketchActions(i)),t&&o.push({icon:"gear",active:this.settingsPopoverOpen,disabled:this.state==="disabled",labelKey:"settings.heading",tooltipKey:"settings.heading",refKey:"settings",onClick:()=>this.toggleSettingsPopover()}),e&&o.push(...this._customActionsToSketchActions(e))),o}get _activeTool(){let i=this.selectionViewModel.activeOperation;if(i)switch(i.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";case"default":return"custom-selection"}if(!this.sketchViewModel)return;let{availableCreateTools:e}=this,{activeTool:t,activeCreateToolDrawMode:o}=this.sketchViewModel;return t==="polygon"&&o==="freehand"&&e?.includes("freehandPolygon")?"freehandPolygon":t==="polyline"&&o==="freehand"&&e?.includes("freehandPolyline")?"freehandPolyline":t??void 0}get _selectionCommands(){let{state:i,visibleElements:e,_activeSelectionTool:t,_customActions:o}=this,s=this.state==="disabled",a=[];this.sketchViewModel?.updateOnGraphicClick!==!1&&a.push({active:i==="ready"&&this._activeSelectionTool==null,disabled:s,icon:"cursor",labelKey:"selectFeature",onClick:()=>this._activateDefaultSelectionTool()});let c=e.selectionTools;c["rectangle-selection"]&&a.push({active:t==="rectangle-selection",disabled:s,icon:"cursor-marquee",labelKey:"rectangleSelection",onClick:()=>this._activateSelectionTool("rectangle-selection")}),c["lasso-selection"]&&a.push({active:t==="lasso-selection",disabled:s,icon:"lasso-select",labelKey:"lassoSelection",onClick:()=>this._activateSelectionTool("lasso-selection")});let r=o?.get("selection-toolbar");return r&&a.push(...this._customActionsToSketchActions(r)),a}get _selectionSetActions(){let i=this.sketchViewModel?.updateGraphics.length??0;if(!i)return[];let e=this.state==="disabled",t=[],o=this._customActions?.get("before-selection-set"),s=this._customActions?.get("after-selection-set");return this.visibleElements.selectionCountLabel&&t.push({active:!1,appearance:"outline",disabled:e,icon:"selection-x",kind:"brand",labelKey:"deselectCount",labelParameters:{count:i},textEnabled:!0,renderAsAction:!0,onClick:()=>this._cancelSketchOperation()}),o&&t.push(...this._customActionsToSketchActions(o)),this.visibleElements.duplicateButton&&t.push({active:!1,disabled:e,icon:"copy",renderAsAction:!0,labelKey:i>1?"duplicateFeatures":"duplicateFeature",onClick:()=>this._duplicate()}),this.visibleElements.deleteButton&&t.push({active:!1,disabled:e,icon:"trash",kind:"danger",renderAsAction:!0,labelKey:i>1?"deleteFeatures":"deleteFeature",onClick:()=>this._delete()}),s&&t.push(...this._customActionsToSketchActions(s)),t}get _undoRedoActions(){return this.visibleElements.undoRedoMenu?[{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canUndo(),icon:"undo",labelKey:"undo",iconFlipRTL:!0,onClick:()=>this._undo()},{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canRedo(),icon:"redo",labelKey:"redo",iconFlipRTL:!0,onClick:()=>this._redo()}]:[]}get state(){return this._getEffectiveValue("state",()=>this._state)}get activeTool(){return this._getEffectiveValue("activeTool",()=>this._activeTool)}get activePluginIds(){return this._getEffectiveValue("activePluginId",()=>this._activePluginUniqueIds)}get groupedActions(){let i=this._getEffectiveValue("availableCommandGroups",()=>[["selectionTools",this._selectionToolActions],["createTools",this._createToolActions],["undoRedo",this._undoRedoActions],["settings",this._settingsActions],["selectionSet",this._selectionSetActions]].map(([t,o])=>({name:t,commands:o,visible:o.length>0}))),e=this._effectiveGeometrySimplificationInProgress?i.map(t=>({...t,commands:t.commands.map(o=>({...o,disabled:!0}))})):i;return!this.visibleElements.geometrySimplificationActivityIndicator||!this._effectiveGeometrySimplificationInProgress?e:[...e,{name:"geometrySimplification",commands:[{active:!1,appearance:"transparent",disabled:!0,kind:"warning",labelKey:"processing",loading:!0,onClick:()=>{},renderAsAction:!0}],visible:!0}]}async create(i,e){await this._executeWhenReady(async()=>{this.cancelAll();let t=this.sketchViewModel;t&&await E(t.create(i,e))})}async _executeWhenReady(i){this._pendingCommandAbortController?.abort();let e=new AbortController;this._pendingCommandAbortController=e;try{await E((async()=>{this.sketchViewModel?.geometrySimplificationInProgress&&await me(()=>!this.sketchViewModel?.geometrySimplificationInProgress,e.signal),e.signal.aborted||await i()})())}finally{this._pendingCommandAbortController===e&&(this._pendingCommandAbortController=void 0)}}toggleSettingsPopover(){this.settingsPopoverOpen=!this.settingsPopoverOpen}setCustomTools(i,e){this._customToolOptions=i??void 0;let t=this._activeCustomToolOptions;if(t){let o=this._customToolOptions?.find(s=>s.toolKey===t.toolKey);o?this._activeCustomToolOptions=o:this.cancelAll()}if(e?.length){let o=new Map;for(let s of e)ae(o,s.position,()=>[]).push(s);this._customActions=o}else this._customActions=void 0}cancelAll(){this._pendingCommandAbortController?.abort(),this._cancelSupportingOperations(),this.sketchViewModel?.cancel()}async update(i,e){await this._executeWhenReady(async()=>{let t=this.sketchViewModel;t&&await E(t.update(i,e))})}_activateDefaultSelectionTool(){this._executeWhenReady(()=>{this.cancelAll(),this.view?.focus()})}_cancelActiveOperation(){this._executeWhenReady(()=>this.cancelAll())}_cancelSketchOperation(){this._executeWhenReady(()=>this.sketchViewModel?.cancel())}_cancelSupportingOperations(){this.selectionViewModel.cancel(),this._activeCustomToolOptions=void 0}_activatePlugin(i){this._executeWhenReady(()=>{let e=this._activeCustomToolOptions!=null;this._cancelSupportingOperations();let t=this.sketchViewModel;if(t){if(e){t.cancel(),E(t.create(i));return}t.firstPluginWithSwappableLeaf?(t.replaceLeaf(i),this.view?.focus()):E(t.create(i))}})}_activateLegacyDrawTool(i,e,t){this._executeWhenReady(()=>{this._cancelSupportingOperations();let o=this.sketchViewModel;o&&(this._activeCustomToolOptions=t,E(o.create(i,e)))})}_activateSelectionTool(i){this._executeWhenReady(()=>{if(this._activeSelectionTool===i){this.selectionViewModel.cancel();return}this.cancelAll();let e={createTool:i==="lasso-selection"?"polygon":"rectangle",...i==="lasso-selection"?{mode:"hybrid",toolName:"lasso"}:{toolName:"rectangle"},type:"replace",selectOnComplete:!0};this.selectionViewModel.activate(e)&&this.view?.focus()})}_delete(){this._executeWhenReady(()=>this.sketchViewModel?.delete())}_duplicate(){this._executeWhenReady(()=>{this.sketchViewModel?.duplicate()})}_executeCustomAction(i){this._executeWhenReady(()=>i.onclick?.())}_redo(){this._executeWhenReady(()=>{this.sketchViewModel?.redo()})}_undo(){this._executeWhenReady(()=>{this.sketchViewModel?.undo()})}_customActionsToSketchActions(i){let e=this.state==="disabled";return i.map(t=>({active:t.active??!1,afterCreate:t.afterCreate,afterRemoved:t.afterRemoved,afterUpdate:t.afterUpdate,disabled:e||(t.disabled??!1),icon:t.icon,iconFlipRTL:t.flipRTL,id:t.id,labelKey:t.text,onClick:()=>this._executeCustomAction(t)}))}_pluginsToActions(i){let e=this.activePluginIds,t=this._activeCustomToolOptions,o=this.state==="disabled";return i.map(s=>({active:(e?.has(s.uniqueId)??!1)&&!t,icon:s.icon,disabled:o,labelKey:`digitizers.${s.localizationKey}`,onClick:()=>this._activatePlugin([s])}))}};d([p()],h.prototype,"_isEffectiveRenderStateFrozen",1);d([p()],h.prototype,"_effectiveGeometrySimplificationInProgress",2);d([p()],h.prototype,"_state",1);d([p()],h.prototype,"_customToolOptions",2);d([p()],h.prototype,"_activeCustomToolOptions",2);d([p()],h.prototype,"_customActions",2);d([p()],h.prototype,"selectionViewModel",2);d([p()],h.prototype,"_activeSelectionTool",1);d([p()],h.prototype,"_activePluginUniqueIds",1);d([p()],h.prototype,"_createToolActions",1);d([p()],h.prototype,"_shouldShowBackButton",1);d([p()],h.prototype,"_selectionToolActions",1);d([p()],h.prototype,"_settingsActions",1);d([p()],h.prototype,"_activeTool",1);d([p()],h.prototype,"_selectionCommands",1);d([p()],h.prototype,"_selectionSetActions",1);d([p()],h.prototype,"_undoRedoActions",1);d([p()],h.prototype,"sketchViewModel",2);d([p()],h.prototype,"visibleElements",2);d([p()],h.prototype,"view",2);d([p()],h.prototype,"settingsPopoverOpen",2);d([p()],h.prototype,"availableCreateTools",2);d([p()],h.prototype,"state",1);d([p()],h.prototype,"activeTool",1);d([p()],h.prototype,"activePluginIds",1);d([p()],h.prototype,"groupedActions",1);h=d([fe("components.sketch.SketchComponentViewModel")],h);var R=class extends q{#t;#e=!1;#i;constructor(e){if(super(e),e.type!==N.ELEMENT)throw new Error("nodeHooks() can only be used on elements")}render(e){return O}update(e,[t]){let o=e.element;if(!(o instanceof HTMLElement))throw new TypeError("nodeHooks() can only be used on HTMLElements");let s=this.#e?t.afterUpdate:t.afterCreate;return this.#t=o,this.#e=!0,this.#i=t,queueMicrotask(()=>{o.isConnected&&s?.(o)}),O}disconnected(){let e=this.#t,t=this.#i?.afterRemoved;!e||!t||queueMicrotask(()=>{e.isConnected||Z(()=>t(e),{timeout:16})})}},ne=H(R),ke=new Set(["arcgis-map","arcgis-scene"]),Pe=8,x=class extends U{constructor(e){super(e),this.#t=new MutationObserver(()=>this.#c()),this.#e=new ResizeObserver(()=>this.#v()),this.#i=new ResizeObserver(([t])=>{if(!t)return;let o=this.component.layout==="horizontal"?t.contentRect.height:t.contentRect.width;o!==this.#s&&(this.#s=o,this.#v())}),this.#h=[],this.ref=t=>{this.#o!==t&&(this.#o=t,this.#a=void 0,this.#r=void 0,this.#c())},this.#u=()=>this.#c(),this.exports=void 0,e.listenOn(window,"resize",()=>this.#g()),this.onConnected(()=>this.#g()),this.onUpdated(()=>{(this.#d!==this.component.layout||this.#y!==this.component.toolbarKind)&&this.#c()}),this.onDisconnected(()=>this.#C()),this.onLifecycle(()=>y(()=>this.component.view?.attributionHeight,()=>{this.#g()},{initial:!0}))}#t;#e;#i;#l;#s;#n;#h;#m;#o;#a;#r;#d;#y;#p;#g(){queueMicrotask(()=>{this.component.el.isConnected&&this.#c()})}#c(){this.#y=this.component.toolbarKind;let e=this.#b();if(this.component.el.toggleAttribute("data-intrinsic-toolbar-sizing",!e),!e){this.#f(),this.#C();return}this.#w(e.toolbar),this.#T(e),this.#S(e),this.#v(e)}#b(){let e=this.component.el,t=e.parentElement,o=this.#o,s=e.assignedSlot;if(!t||!ke.has(t.localName)||!o||!s?.parentElement)return;let a=getComputedStyle(t).direction==="rtl"?"rtl":"ltr",c=re(e.slot,a);if(!c)return;let r=Array.from(t.children).filter(n=>n instanceof HTMLElement&&n.localName!=="arcgis-sketch");return{assignedSlot:s,content:r,direction:a,parent:t,position:c,toolbar:o}}#u;#w(e){this.#d!==this.component.layout&&(this.#s=void 0,this.#d=this.component.layout),this.#l!==e&&(this.#i.disconnect(),this.#l=e,this.#s=void 0,this.#i.observe(e))}#T(e){let t=e.assignedSlot;this.#n!==t&&(this.#n?.removeEventListener("slotchange",this.#u),this.#n=t,t.addEventListener("slotchange",this.#u)),this.#m!==e.parent&&(this.#t.disconnect(),this.#p?.(),this.#m=e.parent,this.#p=Q(e.parent,["dir"],()=>{this.#g()}),this.#t.observe(e.parent,{childList:!0,subtree:!1}))}#S(e){let t=[e.parent,...e.content];Ae(this.#h,t)||(this.#e.disconnect(),t.forEach(o=>this.#e.observe(o)),this.#h=t)}#v(e=this.#b()){if(!e){this.#f();return}let t=this.component.layout,o=e.parent.getBoundingClientRect(),s=Le({content:Oe(e),gap:Pe,layout:t,position:e.position,sameSlotReserve:Ge(e.assignedSlot,this.component.el,t,e.assignedSlot),toolbarBounds:e.toolbar.getBoundingClientRect(),viewBounds:o}),a=s;if(e.toolbar.toolbarKind==="floating"){let c=getComputedStyle(e.assignedSlot.parentElement.parentElement),r=Math.max(Number.parseFloat(c.marginLeft),Number.parseFloat(c.marginRight)),n=t==="horizontal"?window.innerWidth:window.innerHeight,g=t==="horizontal"?o.width:o.height,l=t==="vertical"?this.component.view?.attributionHeight??0:0;a=Math.max(0,Math.min(s,g-2*r-l,n-2*r))}this.#E(e.toolbar,t,s,a)}#E(e,t,o,s){o===this.#a&&s===e.allocatedLength&&t===this.#r||(this.#a=o,this.#r=t,e.allocatedLength=s,t==="horizontal"?(e.style.height="",e.style.maxHeight="",e.style.maxWidth=`${o}px`,e.style.width="fit-content"):(e.style.height="fit-content",e.style.maxHeight=`${o}px`,e.style.maxWidth="",e.style.width=""))}#f(){this.#o&&(this.#o.style.maxHeight="",this.#o.style.maxWidth="",this.#o.style.height="",this.#o.style.width="",this.#o.allocatedLength=void 0,this.#a=void 0,this.#r=void 0)}#C(){this.#t.disconnect(),this.#p?.(),this.#p=void 0,this.#e.disconnect(),this.#i.disconnect(),this.#l=void 0,this.#s=void 0,this.#h=[],this.#n?.removeEventListener("slotchange",this.#u),this.#n=void 0,this.#a=void 0,this.#r=void 0,this.#d=void 0,this.#m=void 0}};function Le({content:i,gap:e,layout:t,position:o,sameSlotReserve:s,toolbarBounds:a,viewBounds:c}){let r=G(c,t),n=G(a,t),g=le(o,t),l=g?n.start-r.start:r.end-n.end,u=0,b=!1;for(let C of i){if(le(C.position,t)===g)continue;let m=G(C.bounds,t);if(!(m.crossStart<n.crossEnd&&m.crossEnd>n.crossStart))continue;let S=g?r.end-m.start:m.end-r.start;u=Math.max(u,S),b=!0}let f=b?e:0;return Math.max(0,r.length-Math.max(0,l)-s-u-f)}function G(i,e){return e==="horizontal"?{start:i.left,end:i.right,length:i.width,crossStart:i.top,crossEnd:i.bottom}:{start:i.top,end:i.bottom,length:i.height,crossStart:i.left,crossEnd:i.right}}function le(i,e){return e==="horizontal"?i.endsWith("left"):i.startsWith("top")}function Oe(i){return i.content.flatMap(e=>{if(e.assignedSlot===i.assignedSlot)return[];let t=re(e.slot,i.direction);return t?[{bounds:e.getBoundingClientRect(),position:t}]:[]})}function Ae(i,e){return i.length===e.length&&i.every((t,o)=>t===e[o])}function Ge(i,e,t,o){let s=getComputedStyle(o),a=s.flexDirection;if(!(t==="horizontal"?a.startsWith("row"):a.startsWith("column")))return 0;let c=i.assignedElements().filter(b=>b instanceof HTMLElement),r=c.indexOf(e);if(r<0)return 0;let n=getComputedStyle(e),g=a==="row"?Number.parseFloat(n.marginRight):a==="row-reverse"?Number.parseFloat(n.marginLeft):a==="column"?Number.parseFloat(n.marginBottom):Number.parseFloat(n.marginTop),l=c.slice(r+1),u=Number.parseFloat(t==="horizontal"?s.columnGap:s.rowGap);return l.reduce((b,f)=>{let C=f.getBoundingClientRect(),m=getComputedStyle(f),S=t==="horizontal"?C.width+Number.parseFloat(m.marginLeft)+Number.parseFloat(m.marginRight):C.height+Number.parseFloat(m.marginTop)+Number.parseFloat(m.marginBottom);return b+S+u},g)}function re(i,e){let[t,o]=i.split("-");if(t!=="bottom"&&t!=="top")return;let s=o==="start"?e==="ltr"?"left":"right":o==="end"?e==="ltr"?"right":"left":o;return s==="left"||s==="right"?`${t}-${s}`:void 0}var Re=["bottom-end","bottom-start","bottom-left","bottom-right","top-end","top-start","top-left","top-right"],xe=new Set(Re),$e=te(i=>new ve({...i,cancelUpdateOnClickAway:!0,creationMode:"continuous",textSymbol:new ge({text:"hello world"}),useLegacyCreateTools:!1})),$=class extends j{constructor(){super(),this.#t=new h,this.#l=k(),this.#s=new x(this),this.#n=k(),this._defaultGraphicsLayer=null,this._messages=ee(),this.test={componentViewModel:this.#t},this._groupLayoutPriorityOverrides=new Map,this._contextualToolLocation="separate",this._refMap=ye(),this.viewModel=$e(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.createGraphic=this.viewModel.createGraphic,this.creationMode=this.viewModel.creationMode,this.defaultCreateOptions=this.viewModel.defaultCreateOptions,this.defaultGraphicsLayerDisabled=!1,this.defaultUpdateOptions=this.viewModel.defaultUpdateOptions,this.geometrySimplificationInProgress=this.viewModel.geometrySimplificationInProgress,this.icon="pencil",this.label=this._messages?.componentLabel,this.labelOptions=this.viewModel.labelOptions,this.layer=this.viewModel.layer,this.layout="horizontal",this.pointSymbol=this.viewModel.pointSymbol,this.polygonSymbol=this.viewModel.polygonSymbol,this.polylineSymbol=this.viewModel.polylineSymbol,this.activeFillSymbol=this.viewModel.activeFillSymbol,this.activeLineSymbol=this.viewModel.activeLineSymbol,this.activeVertexSymbol=this.viewModel.activeVertexSymbol,this.activeCreateToolDrawMode=this.viewModel.activeCreateToolDrawMode,this.visualScale="m",this.snappingOptions=this.viewModel.snappingOptions,this.textSymbol=this.viewModel.textSymbol,this.toolbarKind="floating",this.tooltipOptions=this.viewModel.tooltipOptions,this.useViewOptions=this.viewModel.useViewOptions,this.valueOptions=this.viewModel.valueOptions,this.useLegacyCreateTools=this.viewModel.useLegacyCreateTools,this.updateOnGraphicClickDisabled=this.viewModel.updateOnGraphicClick,this.updateGraphics=this.viewModel.updateGraphics,this.activeTooltip=this.viewModel.activeTooltip,this.arcgisCreate=w(()=>this.viewModel,"create"),this.arcgisDelete=w(()=>this.viewModel,"delete"),this.arcgisDuplicate=w(()=>this.viewModel,"duplicate"),this.arcgisPropertyChange=Y()("activeTool","geometrySimplificationInProgress","state"),this.arcgisReady=W(),this.arcgisRedo=w(()=>this.viewModel,"redo"),this.arcgisUndo=w(()=>this.viewModel,"undo"),this.arcgisUpdate=w(()=>this.viewModel,"update"),X(["slot"],()=>{this.requestUpdate()}),this.manager.onLifecycle(()=>[y(()=>this.el.view?.map,(e,t)=>{let o=this._defaultGraphicsLayer;o&&(t?.allLayers.includes(o)&&t.remove(o),o&&!e?.allLayers.includes(o)&&e?.add(o))}),y(()=>this.el.view,e=>{this.viewModel.view=e,this.#t.view=e??void 0},{initial:!0}),y(()=>this.viewModel,e=>{this.#t.sketchViewModel=e,this.viewModel.pluginManager.sketch=this},{initial:!0}),y(()=>this.#t.state,(e,t)=>{this.requestUpdate("state",t)},{initial:!0}),y(()=>this.#t.activeTool,()=>this.arcgisPropertyChange.emit({name:"activeTool"}),{sync:!0})]),this.manager.onDestroy(()=>{this._defaultGraphicsLayer&&this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.el.view?.map?.remove(this._defaultGraphicsLayer),this._defaultGraphicsLayer?.destroy(),this._defaultGraphicsLayer=null,this.#t.destroy()})}static{this.properties={_groupLayoutPriorityOverrides:16,_contextualToolLocation:16,_refMap:16,viewModel:0,view:0,activeTool:32,autoDestroyDisabled:5,visibleElements:0,availableCreateTools:0,createGraphic:32,creationMode:1,defaultCreateOptions:0,defaultGraphicsLayerDisabled:5,defaultUpdateOptions:0,geometrySimplificationInProgress:36,hideCreateToolsCircle:5,hideCreateToolsMultipoint:5,hideCreateToolsPoint:5,hideCreateToolsPolygon:5,hideCreateToolsPolyline:5,hideCreateToolsRectangle:5,hideDuplicateButton:5,hideDeleteButton:5,hideSelectionCountLabel:5,hideLabelsToggle:5,hideSelectionToolsLassoSelection:5,hideSelectionToolsRectangleSelection:5,hideSettingsMenu:5,hideSinglePluginBackButton:5,hideSnappingControls:5,hideSnappingControlsElementsEnabledToggle:5,hideSnappingControlsElementsFeatureEnabledToggle:5,hideSnappingControlsElementsLayerList:5,hideSnappingControlsElementsSelfEnabledToggle:5,hideSnappingControlsElementsGridEnabledToggle:5,hideSnappingControlsElementsGridControls:5,hideSnappingControlsElementsGridControlsElementsColorSelection:5,hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle:5,hideSnappingControlsElementsGridControlsElementsLineIntervalInput:5,hideSnappingControlsElementsGridControlsElementsNumericInputs:5,hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning:5,hideSnappingControlsElementsGridControlsElementsPlacementButtons:5,hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle:5,hideTooltipsToggle:5,hideUndoRedoMenu:5,icon:1,label:1,labelOptions:0,layer:0,layout:3,pointSymbol:0,polygonSymbol:0,polylineSymbol:0,activeFillSymbol:0,activeLineSymbol:0,activeVertexSymbol:0,activeCreateToolDrawMode:1,referenceElement:1,relativePosition:1,scale:1,visualScale:1,showSnappingControlsElementsHeader:5,showCreateToolsFreehandPolygon:5,showCreateToolsFreehandPolyline:5,showCreateToolsText:5,hideGeometrySimplificationActivityIndicator:5,snappingOptions:0,state:32,textSymbol:0,toolbarKind:3,tooltipOptions:0,useViewOptions:5,valueOptions:0,useLegacyCreateTools:5,updateOnGraphicClickDisabled:5,cancelUpdateOnClickAwayDisabled:5,updateGraphics:32,activeTooltip:0}}static{this.styles=Te}#t;get#e(){return this.#t.visibleElements}#i;#l;#s;#n;get activeTool(){return this.#t.activeTool}get visibleElements(){return this.#t.visibleElements}set visibleElements(e){this.#t.visibleElements=e}get availableCreateTools(){return this.#t.availableCreateTools}set availableCreateTools(e){this.#t.availableCreateTools=e}get hideCreateToolsCircle(){return!this.#e.createTools.circle}set hideCreateToolsCircle(e){this.#e.createTools.circle=!e}get hideCreateToolsMultipoint(){return!this.#e.createTools.multipoint}set hideCreateToolsMultipoint(e){this.#e.createTools.multipoint=!e}get hideCreateToolsPoint(){return!this.#e.createTools.point}set hideCreateToolsPoint(e){this.#e.createTools.point=!e}get hideCreateToolsPolygon(){return!this.#e.createTools.polygon}set hideCreateToolsPolygon(e){this.#e.createTools.polygon=!e}get hideCreateToolsPolyline(){return!this.#e.createTools.polyline}set hideCreateToolsPolyline(e){this.#e.createTools.polyline=!e}get hideCreateToolsRectangle(){return!this.#e.createTools.rectangle}set hideCreateToolsRectangle(e){this.#e.createTools.rectangle=!e}get hideDuplicateButton(){return!this.#e.duplicateButton}set hideDuplicateButton(e){this.#e.duplicateButton=!e}get hideDeleteButton(){return!this.#e.deleteButton}set hideDeleteButton(e){this.#e.deleteButton=!e}get hideSelectionCountLabel(){return!this.#e.selectionCountLabel}set hideSelectionCountLabel(e){this.#e.selectionCountLabel=!e}get hideLabelsToggle(){return!this.#e.labelsToggle}set hideLabelsToggle(e){this.#e.labelsToggle=!e}get hideSelectionToolsLassoSelection(){return!this.#e.selectionTools["lasso-selection"]}set hideSelectionToolsLassoSelection(e){this.#e.selectionTools["lasso-selection"]=!e}get hideSelectionToolsRectangleSelection(){return!this.#e.selectionTools["rectangle-selection"]}set hideSelectionToolsRectangleSelection(e){this.#e.selectionTools["rectangle-selection"]=!e}get hideSettingsMenu(){return!this.#e.settingsMenu}set hideSettingsMenu(e){this.#e.settingsMenu=!e}get hideSinglePluginBackButton(){return!this.#e.singlePluginBackButton}set hideSinglePluginBackButton(e){this.#e.singlePluginBackButton=!e}get hideSnappingControls(){return!this.#e.snappingControls}set hideSnappingControls(e){this.#e.snappingControls=!e}get hideSnappingControlsElementsEnabledToggle(){return!this.#e.snappingControlsElements.enabledToggle}set hideSnappingControlsElementsEnabledToggle(e){this.#e.snappingControlsElements.enabledToggle=!e}get hideSnappingControlsElementsFeatureEnabledToggle(){return!this.#e.snappingControlsElements.featureEnabledToggle}set hideSnappingControlsElementsFeatureEnabledToggle(e){this.#e.snappingControlsElements.featureEnabledToggle=!e}get hideSnappingControlsElementsLayerList(){return!this.#e.snappingControlsElements.layerList}set hideSnappingControlsElementsLayerList(e){this.#e.snappingControlsElements.layerList=!e}get hideSnappingControlsElementsSelfEnabledToggle(){return!this.#e.snappingControlsElements.selfEnabledToggle}set hideSnappingControlsElementsSelfEnabledToggle(e){this.#e.snappingControlsElements.selfEnabledToggle=!e}get hideSnappingControlsElementsGridEnabledToggle(){return!this.#e.snappingControlsElements.gridEnabledToggle}set hideSnappingControlsElementsGridEnabledToggle(e){this.#e.snappingControlsElements.gridEnabledToggle=!e}get hideSnappingControlsElementsGridControls(){return!this.#e.snappingControlsElements.gridControls}set hideSnappingControlsElementsGridControls(e){this.#e.snappingControlsElements.gridControls=!e}get hideSnappingControlsElementsGridControlsElementsColorSelection(){return!this.#e.snappingControlsElements.gridControlsElements.colorSelection}set hideSnappingControlsElementsGridControlsElementsColorSelection(e){this.#e.snappingControlsElements.gridControlsElements.colorSelection=!e}get hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(){return!this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle}set hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(e){this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle=!e}get hideSnappingControlsElementsGridControlsElementsLineIntervalInput(){return!this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput}set hideSnappingControlsElementsGridControlsElementsLineIntervalInput(e){this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput=!e}get hideSnappingControlsElementsGridControlsElementsNumericInputs(){return!this.#e.snappingControlsElements.gridControlsElements.numericInputs}set hideSnappingControlsElementsGridControlsElementsNumericInputs(e){this.#e.snappingControlsElements.gridControlsElements.numericInputs=!e}get hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(){return!this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning}set hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(e){this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning=!e}get hideSnappingControlsElementsGridControlsElementsPlacementButtons(){return!this.#e.snappingControlsElements.gridControlsElements.placementButtons}set hideSnappingControlsElementsGridControlsElementsPlacementButtons(e){this.#e.snappingControlsElements.gridControlsElements.placementButtons=!e}get hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(){return!this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle}set hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(e){this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle=!e}get hideTooltipsToggle(){return!this.#e.tooltipsToggle}set hideTooltipsToggle(e){this.#e.tooltipsToggle=!e}get hideUndoRedoMenu(){return!this.#e.undoRedoMenu}set hideUndoRedoMenu(e){this.#e.undoRedoMenu=!e}get relativePosition(){let e=this.el.slot||this.el.closest("arcgis-expand")?.slot||"";return this.#i??(xe.has(e)?e:oe.topRight)}set relativePosition(e){this.#i=e}get scale(){return this.visualScale}set scale(e){this.visualScale=e}get showSnappingControlsElementsHeader(){return this.#e.snappingControlsElements.header}set showSnappingControlsElementsHeader(e){this.#e.snappingControlsElements.header=e}get showCreateToolsFreehandPolygon(){return this.#e.createTools.freehandPolygon}set showCreateToolsFreehandPolygon(e){this.#e.createTools.freehandPolygon=e}get showCreateToolsFreehandPolyline(){return this.#e.createTools.freehandPolyline}set showCreateToolsFreehandPolyline(e){this.#e.createTools.freehandPolyline=e}get showCreateToolsText(){return this.#e.createTools.text}set showCreateToolsText(e){this.#e.createTools.text=e}get hideGeometrySimplificationActivityIndicator(){return!this.#e.geometrySimplificationActivityIndicator}set hideGeometrySimplificationActivityIndicator(e){this.#e.geometrySimplificationActivityIndicator=!e}get state(){return this.#t.state}get cancelUpdateOnClickAwayDisabled(){return!this.viewModel.cancelUpdateOnClickAway}set cancelUpdateOnClickAwayDisabled(e){this.viewModel.cancelUpdateOnClickAway=!e}async addGraphic(e){this.viewModel.addGraphic(e)}async addGraphics(e){this.viewModel.addGraphics(e)}async cancel(){this.#t.cancelAll()}async complete(){this.viewModel.complete()}async create(e,t){await this.#t.create(e,t)}async delete(){this.viewModel.delete()}async destroy(){await this.manager.destroy()}async dismissFloatingElements(){this.#t.settingsPopoverOpen=!1}async duplicate(){this.viewModel.duplicate()}async hasGraphic(e){return this.viewModel.hasGraphic(e)}async removeAllGraphics(){this.viewModel.removeAllGraphics()}async removeGraphic(e){this.viewModel.removeGraphic(e)}async removeGraphics(e){this.viewModel.removeGraphics(e)}async redo(){this.viewModel.redo()}async canRedo(){return this.viewModel.canRedo()}async setContextualToolLocation(e){this._contextualToolLocation=e}async setCustomTools(e,t){this.#t.setCustomTools(e,t)}async setGroupCollapsePriorities(e){this._groupLayoutPriorityOverrides=e||new Map}async triggerUpdate(e,t){await this.#t.update(e,t)}async place(e){this.viewModel.place(e)}async undo(){this.#t.sketchViewModel?.undo()}async canUndo(){return this.viewModel.canUndo()}connectedCallback(){super.connectedCallback(),this.defaultGraphicsLayerDisabled||(this._defaultGraphicsLayer?.destroyed&&(this._defaultGraphicsLayer=null),this._defaultGraphicsLayer??=new pe({title:"Sketch Layer"}),this.layer=this._defaultGraphicsLayer,this.view?.map?.add(this.layer),this.viewModel.layer=this._defaultGraphicsLayer)}disconnectedCallback(){this._defaultGraphicsLayer&&this.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.view?.map?.remove(this._defaultGraphicsLayer),this.cancel(),super.disconnectedCallback()}render(){let e=this._refMap.get("settings")?.value?.actionElement,t=this.#t.groupedActions,{visualScale:o,layout:s,toolbarKind:a,relativePosition:c,_contextualToolLocation:r}=this,n=t.find(({name:l})=>l==="selectionSet"),g=t.filter(({name:l})=>l!=="selectionSet");return v`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${a} .relativePosition=${c} .scale=${o} tooltip-appearance=calcite ${_(this.#s.ref)}><arcgis-toolbar ${_(this.#l)}>${M({hidden:!n?.visible||r!=="inline",children:this._renderActionGroup(n)})}${g.map(l=>this._renderActionGroup(l))}${M({hidden:!n?.visible||r!=="inline-end",children:this._renderActionGroup(n)})}</arcgis-toolbar>${M({hidden:!n?.visible||r!=="separate",children:v`<arcgis-toolbar>${this._renderActionGroup(n)}</arcgis-toolbar>`})}</arcgis-toolbar-stack></div>${M({hidden:this.hideSettingsMenu,children:v`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} .heading=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#l.value?.barElement} @arcgisPropertyChange=${l=>this.#t.settingsPopoverOpen=l.target.open??!1}>${this._renderSettings()}</arcgis-view-popover>`})}`}_renderSettings(){let{autoDestroyDisabled:e,hideLabelsToggle:t,hideSnappingControls:o,hideTooltipsToggle:s,showSnappingControlsElementsHeader:a,useViewOptions:c,view:r,viewModel:n}=this;return v`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${c||s} .directionMode=${n.valueOptions.directionMode} .labelsEnabled=${n.labelOptions.enabled} .tooltipsEnabled=${n.tooltipOptions.enabled} @arcgisPropertyChange=${g=>{g.stopPropagation();let{labelsEnabled:l,tooltipsEnabled:u,directionMode:b}=g.currentTarget,f=this.viewModel;switch(g.detail.name){case"labelsEnabled":f.labelOptions.enabled=l;break;case"directionMode":f.valueOptions.directionMode=b;break;case"tooltipsEnabled":f.tooltipOptions.enabled=u;break}}}></arcgis-sketch-tooltip-controls>${!c&&!o?v`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${r} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${n.snappingOptions} .showHeader=${a} @arcgisPropertyChange=${g=>g.stopPropagation()}></arcgis-snapping-controls>`:void 0}</div>`}_renderActionGroup({visible:e,commands:t,name:o}){if(!e||!t.length)return;let{defaultPriority:s,groupKind:a,overflowLabel:c,preferEndSlot:r}=Ee[o],n=(o==="geometrySimplification"?void 0:this._groupLayoutPriorityOverrides.get(o))??s,g=t.map(u=>this._renderCommand(u)),l=se(`more.${c}`,this._messages);switch(a){case"more-button":return v`<arcgis-toolbar-group .priority=${n} .preferEndSlot=${r}><arcgis-toolbar-more-button .overflowActionLabel=${l} .priority=${n}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;case"split-button":return v`<arcgis-toolbar-group .priority=${n} .preferEndSlot=${r}><arcgis-toolbar-split-button .overflowActionLabel=${l} .priority=${n}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;case"actions":return v`<arcgis-toolbar-group .priority=${n} .preferEndSlot=${r}>${g}</arcgis-toolbar-group>`}}_renderCommand({active:e,afterCreate:t,afterRemoved:o,afterUpdate:s,appearance:a,icon:c,disabled:r,id:n,kind:g,labelKey:l,labelParameters:u,loading:b,tooltipKey:f,iconFlipRTL:C,onClick:m,refKey:S,textEnabled:V,renderAsAction:ce}){let{_messages:B,_refMap:he,layout:I}=this,P=se(l,B),L=P===void 0?l:u?de(P,u):P,D=B?.[f]??L,z=S?ae(he,S,k):this.#n,F={afterCreate:t,afterRemoved:o,afterUpdate:s};return ce?v`<arcgis-toolbar-action .active=${e} .appearance=${a} .disabled=${r} .icon=${c} .iconFlipRtl=${C} id=${n??A} .kind=${g} .loading=${b} .labelText=${I==="horizontal"?L:""} .textEnabled=${V} .tooltipText=${I==="horizontal"&&V?"":D} @arcgisToolbarItemSelected=${m} ${ne(F)} ${_(z)}></arcgis-toolbar-action>`:v`<arcgis-toolbar-item .active=${e} .disabled=${r} .icon=${c} id=${n??A} .iconFlipRtl=${C} .labelText=${L} .tooltipText=${D} @arcgisItemSelected=${m} ${ne(F)} ${_(z)}></arcgis-toolbar-item>`}};J("arcgis-sketch",$);return $},"intl","layers/GraphicsLayer","symbols/TextSymbol","core/reactiveUtils","widgets/Sketch/SketchViewModel","applications/Components/featureUtils","core/Accessor","core/accessorSupport/decorators","core/promiseUtils","widgets/Sketch/VisibleElements","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,b,c,d,e,f,g)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import q from"./4UCQJWD2.js";import"./EVWWTIEQ.js";import{a as g}from"./4L43F7HU.js";import o from"./3KAC2MKA.js";import n from"./BFYJTV6Q.js";import{a as J,b as K,c as Q,g as A,h as V,j as W,k as X,m,n as F}from"./ZCFWKPXL.js";import{a as H}from"./WVKMYNN7.js";import{a as _}from"./5GFPOTOB.js";import l from"./GEOME3IC.js";import j from"./HU57LQOA.js";import i from"./BOPNSNUT.js";import"./WJQUE4DR.js";import h from"./EJVFK7JX.js";import{a as k}from"./REB4CHAK.js";import{a as b}from"./L5IRXOCJ.js";import{a as G}from"./7Y4SF2NT.js";import f from"./7ILT5PDJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as N}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as B}from"./LXME6MU5.js";import{B as P,P as v,Q as L,R as D,T as w,X as M,Y as C,_ as x,b as c,x as p}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([re,u,{on:T,watch:ie},,,,U,S,,,,,{e:Y,h:Z,k:ee},{a:j,b:q,c:z,d:te}])=>{var se="nested",oe=S(re),O=class extends D{constructor(){super(...arguments),this.#i=j(this),this.#s=null,this._rootListRef=v(),this._layerFlowItemRef=v(),this._panelFlowItemRef=v(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${P()}`,this.#a=null,this.messages=k(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=m(e,this.operationalItems);if(!l?.sortable)return!1;let r=this.#e(t),o=this.#e(i),n=this.#t(r),d=F(r),f=this.#t(o),y=F(o),I=!!d&&!!y&&d===y,$={selected:l,from:n,to:f},E=r?.group,h=o?.group,ae=n?.layer?.type??"",le=f?.layer?.type??"",R=new Set(["map-image","catalog","knowledge-graph"]);return E&&h&&typeof s=="function"?s($):I&&!R.has(ae)&&!R.has(le)&&l?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(a=>a.classList?.contains(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=oe(this),this.arcgisClose=G(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesAvailable=new u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=Q,this.minFilterItems=K,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisFilterChange=p(),this.arcgisOpenedLayersChange=p(),this.arcgisPropertyChange=N()("state"),this.arcgisReady=p(),this.arcgisSelectedItemsChange=p(),this.arcgisTriggerAction=U(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,tableList:32,view:0,visibilityAppearance:1}}static{this.styles=[z,q]}#i;#s;#a;get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(e=>!e.hidden&&e.panel?.open&&!e.panel.disabled&&e.panel.flowEnabled&&(!Z(e)||Y(e)))}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this.#_(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#c(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[T(()=>this.openedLayers,"change",()=>{this.#h()},{initial:!0}),T(()=>this.viewModel.operationalItems,"change",()=>A(this.selectedItems),{initial:!0}),ie(()=>this.operationalItems.flatten(e=>e.children).map(e=>e.uid).join(","),()=>{A(this.selectedItems),this.requestUpdate()},{initial:!0}),T(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),ie(()=>[this.filterPredicate,this._rootListRef.value],()=>V(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}#e(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}#t(e){let t=e?.getAttribute("data-item");return t?this.#o(t):null}#o(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async#n(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this.#d(e):await this.#p(e);return t.aborted||i.set(e,s),s}async#h(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#a?.abort();let a=new AbortController,{signal:s}=a;this.#a=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let l=await Promise.all(t.map(o=>this.#n(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);let r=i.at(-1);r?"catalogLayer"in r?(this._catalogLayerList=r,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=r):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#c(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#d(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:l,selectionMode:r,visibilityAppearance:o}=this;return C(c`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??r} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#m(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async#p(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this.#m(e);return C(c`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#g(e){e.open=!1}#u({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this.#e(e),l=this.#e(t),r=m(i,this.operationalItems),o=this.#t(s),n=this.#t(l);a==null||!r||(this.viewModel.moveItem(r,n,o,a),ee(this,r.uid,d=>d!==i&&this.#e(d.parentElement)===s))}#f(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}#y(e){let t=this.#s,{dragEl:i,newIndex:a}=e,s=this.#e(e.fromEl),l=this.#e(e.toEl),r=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===l&&t?.fromEl===s;if(!(!s||!l||r)){if(this.#s={...e,fromEl:s,toEl:l},this._selectedDragItemLayerUid=i.value,s===l){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this.#I(s,o);return}this.#u({toEl:l,fromEl:s,dragEl:i,newIndex:a})}}#I(e,t){if(e)if(e===this._rootListRef.value)W(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;X(i,t)}}#v(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[b.hidden]:e==="loading",[b.disabled]:e==="disabled"};return c`<div class=${w(B(b.widget,t))}>${this._visibleItems?.length?this.#w():null}${this.#E()}</div>`}#L(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?c`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}#l(e){if(e.incompatible)return this.#L(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#l(i))??[];return t.length?t:null}#w(){return this._visibleItems?.toArray().map(e=>this.#l(e))}#r(){return c`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#b(){return this.hideNoItemsNotice?null:c`<div class=${w(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#r()}</calcite-notice></div>`}#_(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return _(e?.uid??s,c`<calcite-flow-item data-layer-uid=${e?.uid??""??M} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${l=>{l.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${L(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#$(){let{_openedPanelItems:e,openedLayers:t}=this;return H(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:l}=i,r=()=>this.#g(s);return c`<calcite-flow-item .description=${l} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),r()}} ${L(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${r} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#E(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:l,showCollapseButton:r,showHeading:o,_dragEnabled:n,filterText:d,openedLayers:f,filterPlaceholder:y,messages:I}=this,$=this.#i.selectionMode,E=[c`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${r} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!f.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?c`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??M} .displayMode=${se} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${y} .filterProps=${J} .filterText=${a?d:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${$} @calciteListChange=${this.#v} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this.#y(h.detail)} @calciteListDragEnd=${h=>this.#f(h.detail)} ${L(this._rootListRef)}>${t.toArray().map(h=>this.#M(h))}${a&&!this.hideNoFilterResultsNotice?c`<div class=${w(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#r()}</calcite-notice></div>`:null}</calcite-list>`:this.#b()}</calcite-flow-item>`,this.#$(),this._renderedOpenLayerFlowItems];return this.closed?null:_("root-flow",c`<calcite-flow>${E}</calcite-flow>`)}#M(e,t,i){return _(e.uid,te({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:se,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.#i.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};x("arcgis-layer-list-next",O);return O},"layerList/LayerListModel","core/Collection","core/reactiveUtils",a,d,e,f,h,i,j,l,n,o,q)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import e from"./EJVFK7JX.js";import{a as k}from"./REB4CHAK.js";import{a as T}from"./L5IRXOCJ.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as $}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as u}from"./LXME6MU5.js";import{P as p,Q as g,R as b,T as h,X as y,_,a as w,b as s,x as f}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{on:O,when:C,watch:H},P,{property:d,subclass:S},,,,D])=>{var L=Object.defineProperty,z=Object.getOwnPropertyDescriptor,l=(a,e,t,i)=>{for(var n=i>1?void 0:i?z(e,t):e,o=a.length-1,c;o>=0;o--)(c=a[o])&&(n=(i?c(e,t,n):c(n))||n);return i&&n&&L(e,t,n),n},E=new EventTarget;function B(a,e,t){let i=!1,n=H(a,(o,c)=>{i||e(o,c)},t);return{remove(){n.remove()},pause(){i=!0},resume(){i=!1}}}var r=class extends P{constructor(a){super(a),this._viewpointHandle=null,this.addHandles(O(()=>E,"expand",e=>{let{target:t}=e.detail;t!==this&&t.expanded&&t.group&&t.group===this.group&&this.expanded&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(a){this._set("autoCollapse",a),this._watchViewpoint()}set expanded(a){this._set("expanded",a),this.group&&a&&E.dispatchEvent(new CustomEvent("expand",{detail:{target:this}})),this._viewpointHandleChange(a)}get state(){return this.view?.ready?"ready":"disabled"}set view(a){this._get("view")!==a&&(this._set("view",a),a&&C(()=>a.ready,()=>{this.view===a&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(a){this._viewpointHandle&&(a?C(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){let a="viewpoint";this.removeHandles(a),this._viewpointHandle=null;let{autoCollapse:e,view:t}=this;if(!t||!e)return;let i=B(()=>t.type==="3d"?t.camera:t.viewpoint,()=>this._collapse());this.addHandles(i,a),this._viewpointHandle=i}_collapse(){this.expanded=!1}};l([d({value:!1})],r.prototype,"autoCollapse",1);l([d({value:!1})],r.prototype,"expanded",1);l([d()],r.prototype,"group",2);l([d({readOnly:!0})],r.prototype,"state",1);l([d({value:null})],r.prototype,"view",1);r=l([S("map-components.expand.ExpandViewModel")],r);var j=w`:host{display:flex;pointer-events:auto;--arcgis-internal-expand-icon-number-spacing-left: none;--arcgis-internal-expand-icon-number-spacing-right: none;--arcgis-internal-expand-action-background-color: var( --calcite-action-background-color, var(--calcite-color-foreground-1) );--arcgis-internal-expand-action-background-color-hover: var( --calcite-action-background-color-hover, var(--calcite-color-surface-3) );--arcgis-internal-expand-action-background-color-press: var( --calcite-action-background-color-press, var(--calcite-color-foreground-3) )}arcgis-expand>.content-expanded{background-color:var(--calcite-color-background)}.root{--esri-widget-panel-max-height: 95svh;--calcite-sheet-max-height: var(--esri-widget-panel-max-height);--calcite-sheet-height: auto;--calcite-action-corner-radius: 0}.action{--calcite-action-background-color: var(--arcgis-internal-expand-action-background-color);--calcite-action-background-color-hover: var(--arcgis-internal-expand-action-background-color-hover);--calcite-action-background-color-press: var(--arcgis-internal-expand-action-background-color-press);cursor:pointer;text-align:center;color:var(--calcite-color-text-2);justify-content:center;align-items:center;margin:0;padding:0;font-size:var(--calcite-font-size);transition:background-color .125s ease-in-out;display:flex;flex-direction:column;overflow:hidden}.toggle{position:relative}.popover-content{flex-direction:column;display:flex;max-height:var(--arcgis-internal-expand-max-height, 95svh);::slotted(*){max-height:var(--arcgis-internal-expand-max-height, 95svh);overflow-y:auto}::slotted(arcgis-sketch){--arcgis-internal-sketch-gap: var(--calcite-spacing-none);max-inline-size:calc(min(100cqw,100vw) - 80px)}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){width:var(--arcgis-internal-panel-width);min-width:var(--calcite-spacing-xxxl);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}::slotted(arcgis-exploratory-analysis){width:var(--arcgis-internal-exploratory-analysis-width, fit-content);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}}.popover-content .esri-widget--panel{width:300px}.panel{max-height:var(--esri-widget-panel-max-height)}.panel-content{::slotted(*){width:100%}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){overflow-y:auto}}.panel-content .esri-widget{width:auto}.panel-content .esri-widget--panel{flex:auto}.arcgis-map-container-ui__element .popover-content .esri-widget,.arcgis-map-container-ui__element .popover-content .esri-widget.esri-component,.arcgis-map-container-ui__element .panel-content .esri-widget,.arcgis-map-container-ui__element .panel-content .esri-widget.esri-component,.popover-content .esri-widget,.popover-content .esri-widget.esri-component,.panel-content .esri-widget,.panel-content .esri-widget.esri-component{box-sizing:border-box;box-shadow:none;margin-bottom:0}.panel-content,.content-container{background-color:var(--calcite-color-foreground-1);flex-direction:column;flex:auto;justify-content:stretch;display:flex}.sheet .panel-content,.sheet .content-container{overflow:hidden}.panel-icon-number{align-self:center}.icon{display:flex}calcite-button:not(:hover) .icon:not(calcite-icon){color:var(--calcite-color-text-3)}.icon-flip{transform:var(--arcgis-internal-collapse-icon-flip)}.icon-number{transform-origin:50%;color:var(--calcite-color-text-inverse);pointer-events:none;background-color:var(--calcite-color-text-3);border-radius:var(--calcite-spacing-xl);justify-content:center;align-items:center;height:var(--calcite-space-lg);padding:.125em .333em;font-size:var(--calcite-font-size-sm);line-height:1em;display:flex;position:absolute;top:-6px;left:var(--arcgis-internal-expand-icon-number-spacing-left);right:var(--arcgis-internal-expand-icon-number-spacing-right)}`,I="chevrons-left",M="chevrons-right",N=D(r),m=class extends b{constructor(){super(...arguments),this.popoverEl=p(),this.messages=k({}),this.viewModel=N(this),this.toggleActionEl=p(),this.view=this.viewModel.view,this.state=this.viewModel.state,this.autoDestroyDisabled=!1,this.autoCollapse=this.viewModel.autoCollapse,this.closeOnEscDisabled=!1,this.content="",this.expanded=this.viewModel.expanded,this.expandTooltip="",this.collapseTooltip="",this.focusTrapDisabled=!1,this.focusTrapInitialFocusDisabled=!1,this.group=this.viewModel.group,this.iconNumber=0,this.mode="auto",this.topLayerDisabled=!1,this.modalDisabled=!1,this.visualScale="m",this.arcgisPropertyChange=$()("expanded"),this.arcgisReady=f()}static{this.properties={_slottedIcon:16,expandTitle:16,_displaySheet:16,view:0,state:32,icon:1,label:1,autoDestroyDisabled:5,referenceElement:1,autoCollapse:5,autoModeBreakpoint:9,closeOnEscDisabled:5,content:1,expanded:7,expandIcon:3,expandTooltip:1,collapseIcon:3,collapseTooltip:1,focusTrapDisabled:5,focusTrapInitialFocusDisabled:5,group:1,iconNumber:9,mode:1,placement:1,messageOverrides:0,topLayerDisabled:5,modalDisabled:5,visualScale:1}}static{this.styles=j}get expandTitle(){let{expanded:e,messages:t,collapseTooltip:i,expandTooltip:n}=this;return(e?i||t.collapse:n||t.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return!!this.viewModel.view&&this.viewModel.view.width<=(this.autoModeBreakpoint??544);default:return!1}}get expandIcon(){if(this._expandIcon)return this._expandIcon;if(this._slottedIcon)return this._slottedIcon;let e=null;return this.content instanceof HTMLElement&&("widget"in this.content&&this.content.widget?.icon?e=this.content.widget.icon:"icon"in this.content?e=this.content.icon:e=this.content.getAttribute("icon")),e??I}set expandIcon(e){this._expandIcon=e}get collapseIcon(){return this._collapseIcon??M}set collapseIcon(e){this._collapseIcon=e}async collapse(){this.expanded=!1}async destroy(){await this.manager.destroy()}async expand(){this.expanded=!0}loaded(){this.manager.onLifecycle(()=>[H(()=>this.viewModel?.view?.size,()=>{this.popoverEl?.value?.reposition()},{initial:!0})])}toggle(){this.expanded=!this.expanded}getPopoverPlacement(){if(this.placement)return this.placement;switch(this.el.slot){case"bottom-start":case"bottom-left":return"right-end";case"bottom-right":case"bottom-end":return"left-end";case"top-start":case"top-left":return"right-start";case"top-right":case"top-end":return"left-start";default:return"auto"}}_isCloseOnEscapeDisabled(e){let{closeOnEscDisabled:t}=this;return typeof t=="function"?t(e):t}_handlePopoverClose(e){e.target===this.popoverEl.value&&this.collapse()}_handleKeyDown(e){this.expanded&&e.key==="Escape"&&this._isCloseOnEscapeDisabled(e)&&e.preventDefault()}_handleSlotChange({currentTarget:e}){let t=e.assignedElements().find(i=>"icon"in i);this._slottedIcon=t?.icon}render(){let{_displaySheet:e,toggleActionEl:t,expanded:i,focusTrapInitialFocusDisabled:n,label:o,modalDisabled:c,topLayerDisabled:v}=this,x=n?{initialFocus:!1}:void 0;return s`<div class=${h(u("root",T.widget))}>${this._renderToggle()}${e?s`<calcite-sheet class="sheet" .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} height=l .label=${o??""} .modalDisabled=${c} .topLayerDisabled=${v} @keydown=${this._handleKeyDown} .open=${i} position=block-end @calciteSheetClose=${this.collapse}><calcite-panel class="panel" closable .closed=${!i} .heading=${o} @keydown=${this._handleKeyDown} @calcitePanelClose=${this.collapse}><div class="panel-content">${this._renderContent()}</div></calcite-panel></calcite-sheet>`:t.value?s`<calcite-popover .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} .label=${o??""} @keydown=${this._handleKeyDown} trigger-disabled .open=${i} overlay-positioning=fixed .placement=${this.getPopoverPlacement()} .referenceElement=${t.value} .topLayerDisabled=${v} @calcitePopoverClose=${this._handlePopoverClose} ${g(this.popoverEl)}><div class="popover-content">${this._renderContent()}</div></calcite-popover>`:null}</div>`}_renderBadgeNumber(){let{expanded:e,iconNumber:t}=this;return t&&!e?s`<span class="icon-number">${t}</span>`:null}_renderToggleButton(){let{expanded:e,expandTitle:t,expandIcon:i,collapseIcon:n}=this,o=e?n:i;return s`<calcite-action class=${h(u("action","icon",{"icon-flip":o===I||o===M}))} @click=${this.toggle} .text=${t} title=${t??y} .icon=${o} .scale=${this.visualScale} ${g(this.toggleActionEl)}></calcite-action>`}_renderToggle(){return s`<div class="toggle">${this._renderToggleButton()}${this._renderBadgeNumber()}</div>`}_renderContent(){return s`<div class="content-container"><slot @slotchange=${this._handleSlotChange}></slot></div>`}};_("arcgis-expand",m);return m},"core/reactiveUtils","core/Accessor","core/accessorSupport/decorators",a,c,d,e)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./BOPNSNUT.js";import"./WJQUE4DR.js";import{a as w}from"./REB4CHAK.js";import{h as g}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{R as n,_ as m,a as h,b as r,p as a,x as d}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([y,{watch:u},{a:l}])=>{var p=h`:host{height:100%;flex-grow:1}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-label,calcite-notice){margin:0 var(--calcite-space-md) var(--calcite-space-md)}calcite-block :last-child{margin-bottom:0}calcite-notice{margin:var(--calcite-space-md)}`,c=class extends n{constructor(){super(...arguments),this._messages=w({blocking:!0}),this.hideErrors=!1,this.hideLoader=!1,this.state="loading",this.arcgisPropertyChange=g()("selectedUtilityNetwork","state"),this.arcgisError=d()}static{this.properties={_utilityNetworks:16,view:0,messageOverrides:0,hideErrors:5,hideLoader:5,state:1,error:1,selectedUtilityNetwork:0,heading:1}}static{this.styles=p}load(){this.#e(),this.manager.onLifecycle(()=>[u(()=>this.view?.map,()=>this.#e())])}willUpdate(t){t.has("_utilityNetworks")&&this.#r(),t.has("selectedUtilityNetwork")&&this.#o()}#t(t){this.error=t,this.state="error",this.arcgisError.emit()}#i(){this.error=void 0,this.state="ready"}#e(){if(this.error=void 0,this.state="loading",!this.view?.map){a("error",this,this._messages.errors.noView),this._utilityNetworks=void 0,this.#t(this._messages.errors.noView);return}let t=this.view.map;this.#s(t)}async#s(t){try{t.loaded||await t.load(),this._utilityNetworks=t.utilityNetworks||new y}catch(e){this.#t(this._messages.errors.mapLoadFailed),l(e,this,this._messages.errors.mapLoadFailed)}}#r(){let{selectedUtilityNetwork:t,_utilityNetworks:e}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0),this.arcgisPropertyChange.emit({name:"selectedUtilityNetwork"})):(this.#t(this._messages.errors.noUtilityNetwork),a("error",this,this._messages.errors.noUtilityNetwork),this.selectedUtilityNetwork=void 0)}async#o(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&(this.state="loading",await t.load()),this.#i()}catch(e){l(e,this,this._messages.errors.utilityNetworkLoadFailed),this.#t(this._messages.errors.utilityNetworkLoadFailed)}}#a(){return this.hideLoader?null:r`<calcite-loader label=loading></calcite-loader>`}#l(t,e=!1,i){return this.hideErrors?null:r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#c(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let s=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(o=>o.id===s))}}>${e}</calcite-combobox>`}#h(){let{selectedUtilityNetwork:t}=this;return r`<calcite-label>${t?.title}</calcite-label>`}#d(t){let e=this._messages.labels.utilityNetwork,i=this.heading||e,s=this._utilityNetworks?.length?this._utilityNetworks?.length===1?this.#h():this.#c():void 0;return r`<calcite-block .heading=${i} .label=${e} expanded>${s}${t}</calcite-block>`}render(){let{error:t,state:e,selectedUtilityNetwork:i,_messages:s}=this,o=e==="error"&&t?this.#l(t,!1,"exclamation-mark-triangle"):void 0;if(!o&&!i?.loaded&&!i?.loadError)return this.#a();let k=t===s.errors.mapLoadFailed||t===s.errors.noView||t===s.errors.noUtilityNetwork;return e==="error"&&o&&k?o:this.#d(o)}};m("arcgis-utility-network-picker",c);return c},"core/Collection","core/reactiveUtils",b)