// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("exports ./componentsUtils ./dom ./interactive ./observers ./resources4 ./utils3 ./loadable ./t9n ./locale ./filter ./icon ./input2 ./input-message ./progress ./debounce ./loader ./scrim".split(" "),function(Ya,q,da,ea,Wb,Xb,ob,oa,fa,Ga,pb,qb,rb,sb,tb,ub,Yb,Zb){function vb(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}));c.push.apply(c,d)}return c}function T(a){for(var b= 1;b=b;if(!e)return d;if(d===ba())break;d=ha(d, !1)}return!1}function qa(a,b,c,d){for(var e=0,f=0,g=a.children;fc.right+10||a.clientY>d.bottom&&a.clientX>d.left:a.clientY>c.bottom+10||a.clientX>d.right&&a.clientY>d.top}function fc(a,b,c,d,e,f,g,h){a=d?a.clientY:a.clientX;var k=d?c.height:c.width,m=d?c.top:c.left;c=d?c.bottom:c.right;d=!1;if(!g)if(h&&Kam+k*f/2:ac-Ka)return-Ca}else if(a>m+k*(1-e)/2&&ac-k*f/2)return a>m+k/2?1:-1;return 0}function gc(a){La.length=0;a=a.getElementsByTagName("input");for(var b=a.length;b--;){var c=a[b];c.checked&&La.push(c)}}function Ma(a){return setTimeout(a,0)}function Na(){E.forEach(function(a){clearInterval(a.pid)});E=[]}function db(){}function eb(){}function hc(a){Hb(a);Oa.add(a);const {group:b,handleSelector:c,dragSelector:d}=a;a.sortable=r.create(a.el, {dataIdAttr:"id",...ic,...(!!d&&{draggable:d}),...(!!b&&{group:{name:b,...(!!a.canPull&&{pull:(e,f,g,{newIndex:h,oldIndex:k})=>a.canPull({toEl:e.el,fromEl:f.el,dragEl:g,newIndex:h,oldIndex:k})}),...(!!a.canPut&&{put:(e,f,g,{newIndex:h,oldIndex:k})=>a.canPut({toEl:e.el,fromEl:f.el,dragEl:g,newIndex:h,oldIndex:k})})}}),handle:c,filter:`${c}[disabled]`,onStart:({from:e,item:f,to:g,newIndex:h,oldIndex:k})=>{Pa=!0;jc();a.onDragStart({fromEl:e,dragEl:f,toEl:g,newIndex:h,oldIndex:k})},onEnd:({from:e,item:f, to:g,newIndex:h,oldIndex:k})=>{Pa=!1;kc();a.onDragEnd({fromEl:e,dragEl:f,toEl:g,newIndex:h,oldIndex:k})},onSort:({from:e,item:f,to:g,newIndex:h,oldIndex:k})=>{a.onDragSort({fromEl:e,dragEl:f,toEl:g,newIndex:h,oldIndex:k})}})}function Hb(a){Oa.delete(a);a.sortable?.destroy();a.sortable=null}function jc(){Array.from(Oa).forEach(a=>a.onGlobalDragStart())}function kc(){Array.from(Oa).forEach(a=>a.onGlobalDragEnd())}function Ib(){"undefined"!==typeof customElements&&["calcite-stack"].forEach(a=>{switch(a){case "calcite-stack":customElements.get(a)|| customElements.define(a,lc)}})}function Jb(){"undefined"!==typeof customElements&&["calcite-filter","calcite-icon","calcite-input","calcite-input-message","calcite-progress"].forEach(a=>{switch(a){case "calcite-filter":customElements.get(a)||customElements.define(a,mc);break;case "calcite-icon":customElements.get(a)||qb.defineCustomElement();break;case "calcite-input":customElements.get(a)||rb.defineCustomElement();break;case "calcite-input-message":customElements.get(a)||sb.defineCustomElement(); break;case "calcite-progress":customElements.get(a)||tb.defineCustomElement()}})}function Kb(){"undefined"!==typeof customElements&&"calcite-list calcite-filter calcite-icon calcite-input calcite-input-message calcite-loader calcite-progress calcite-scrim calcite-stack".split(" ").forEach(a=>{switch(a){case "calcite-list":customElements.get(a)||customElements.define(a,Lb);break;case "calcite-filter":customElements.get(a)||Jb();break;case "calcite-icon":customElements.get(a)||qb.defineCustomElement(); break;case "calcite-input":customElements.get(a)||rb.defineCustomElement();break;case "calcite-input-message":customElements.get(a)||sb.defineCustomElement();break;case "calcite-loader":customElements.get(a)||Yb.defineCustomElement();break;case "calcite-progress":customElements.get(a)||tb.defineCustomElement();break;case "calcite-scrim":customElements.get(a)||Zb.defineCustomElement();break;case "calcite-stack":customElements.get(a)||Ib()}})}var aa=Z(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ya=Z(/Edge/i),Mb=Z(/firefox/i),Aa=Z(/safari/i)&&!Z(/chrome/i)&&!Z(/android/i),Da=Z(/iP(ad|od|hone)/i),Nb=Z(/chrome/i)&&Z(/android/i),wb={capture:!1,passive:!1},xb=/\s+/g,wa,O="Sortable"+(new Date).getTime(),sa=[],fb={initializeByDefault:!0},za={mount:function(a){for(var b in fb)!fb.hasOwnProperty(b)||b in a||(a[b]=fb[b]);sa.forEach(function(c){if(c.pluginName===a.pluginName)throw"Sortable: Cannot mount plugin ".concat(a.pluginName," more than once");});sa.push(a)},pluginEvent:function(a,b,c){var d= this;this.eventCanceled=!1;c.cancel=function(){d.eventCanceled=!0};var e=a+"Global";sa.forEach(function(f){if(b[f.pluginName]){if(b[f.pluginName][e])b[f.pluginName][e](T({sortable:b},c));if(b.options[f.pluginName]&&b[f.pluginName][a])b[f.pluginName][a](T({sortable:b},c))}})},initializePlugins:function(a,b,c,d){sa.forEach(function(f){var g=f.pluginName;if(a.options[g]||f.initializeByDefault)f=new f(a,b,a.options),f.sortable=a,f.options=a.options,a[g]=f,Y(c,f.defaults)});for(var e in a.options)a.options.hasOwnProperty(e)&& (d=this.modifyOption(a,e,a.options[e]),"undefined"!==typeof d&&(a.options[e]=d))},getEventProperties:function(a,b){var c={};sa.forEach(function(d){"function"===typeof d.eventProperties&&Y(c,d.eventProperties.call(b[d.pluginName],a))});return c},modifyOption:function(a,b,c){var d;sa.forEach(function(e){a[e.pluginName]&&e.optionListeners&&"function"===typeof e.optionListeners[b]&&(d=e.optionListeners[b].call(a[e.pluginName],c))});return d}},nc=["evt"],L=function(a,b){var c=2=c.gridTemplateColumns.split(" ").length?"vertical":"horizontal":e&&f["float"]&&"none"!==f["float"]?(c="left"===f["float"]?"left":"right",!a||"both"!==b.clear&&b.clear!==c?"horizontal":"vertical"): e&&("block"===f.display||"flex"===f.display||"table"===f.display||"grid"===f.display||g>=d&&"none"===c[Sb]||a&&"none"===c[Sb]&&g+h>d)?"vertical":"horizontal"},oc=function(a,b,c){var d=c?a.left:a.top,e=c?a.right:a.bottom;a=c?a.width:a.height;var f=c?b.left:b.top,g=c?b.right:b.bottom;b=c?b.width:b.height;return d===f||e===g||d+a/2===f+b/2},pc=function(a,b){var c;Ia.some(function(d){var e=d[O].options.emptyInsertThreshold;if(e&&!$a(d)){var f=C(d),g=b>=f.top-e&&b<=f.bottom+e;if(a>=f.left-e&&a<=f.right+ e&&g)return c=d}});return c},Gb=function(a){function b(e,f){return function(g,h,k,m){var n=g.options.group.name&&h.options.group.name&&g.options.group.name===h.options.group.name;if(null==e&&(f||n))return!0;if(null==e||!1===e)return!1;if(f&&"clone"===e)return e;if("function"===typeof e)return b(e(g,h,k,m),f)(g,h,k,m);g=(f?g:h).options.group.name;return!0===e||"string"===typeof e&&e===g||e.join&&-1=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){l&&bb(l);clearTimeout(this._dragStartTimer); this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var a=this.el.ownerDocument;v(a,"mouseup",this._disableDelayedDrag);v(a,"touchend",this._disableDelayedDrag);v(a,"touchcancel",this._disableDelayedDrag);v(a,"mousemove",this._delayedDragTouchMoveHandler);v(a,"touchmove",this._delayedDragTouchMoveHandler);v(a,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(a,b){b=b||"touch"==a.pointerType&&a;!this.nativeDraggable||b?this.options.supportPointer?w(document, "pointermove",this._onTouchMove):b?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(l,"dragend",this),w(z,"dragstart",this._onDragStart));try{document.selection?Ma(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(c){}},_dragStarted:function(a,b){ta=!1;if(z&&l){L("dragStarted",this,{evt:b});this.nativeDraggable&&w(document,"dragover",qc);var c=this.options;!a&&M(l,c.dragClass,!1);M(l,c.ghostClass,!0);r.active=this;a&&this._appendGhost(); J({sortable:this,name:"start",originalEvent:b})}else this._nulling()},_emulateDragOver:function(){if(S){this._lastX=S.clientX;this._lastY=S.clientY;Ob();for(var a=document.elementFromPoint(S.clientX,S.clientY),b=a;a&&a.shadowRoot;){a=a.shadowRoot.elementFromPoint(S.clientX,S.clientY);var c=a.getRootNode().host;c&&(a=c);if(a===b)break;b=a}l.parentNode[O]._isOutsideThisEl(a);if(b){do{if(b[O]&&(c=void 0,(c=b[O]._onDragOver({clientX:S.clientX,clientY:S.clientY,target:a,rootEl:b}))&&!this.options.dragoverBubble))break; a=b}while(b=b.parentNode)}Pb()}},_onTouchMove:function(a){if(ma){var b=this.options,c=b.fallbackTolerance,d=b.fallbackOffset;b=a.touches?a.touches[0]:a;var e=t&&pa(t,!0),f=t&&e&&e.a,g=t&&e&&e.d,h=Da&&I&&Bb(I);f=(b.clientX-ma.clientX+d.x)/(f||1)+(h?h[0]-ib[0]:0)/(f||1);d=(b.clientY-ma.clientY+d.y)/(g||1)+(h?h[1]-ib[1]:0)/(g||1);if(!r.active&&!ta){if(c&&Math.max(Math.abs(b.clientX-this._lastX),Math.abs(b.clientY-this._lastY)){this.hasActionsStart=da.slotChangeHasAssignedElement(a)};this.handleActionsEndSlotChange=a=>{this.hasActionsEnd=da.slotChangeHasAssignedElement(a)};this.handleContentStartSlotChange=a=>{this.hasContentStart=da.slotChangeHasAssignedElement(a)};this.handleContentEndSlotChange=a=>{this.hasContentEnd=da.slotChangeHasAssignedElement(a)};this.hasContentEnd=this.hasContentStart=this.hasActionsEnd=this.hasActionsStart=this.disabled=!1}renderActionsStart(){const {hasActionsStart:a}= this;return q.h("div",{class:"actions-start",hidden:!a,key:"actions-start-container"},q.h("slot",{name:"actions-start",onSlotchange:this.handleActionsStartSlotChange}))}renderActionsEnd(){const {hasActionsEnd:a}=this;return q.h("div",{class:"actions-end",hidden:!a,key:"actions-end-container"},q.h("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}))}renderContentStart(){const {hasContentStart:a}=this;return q.h("div",{class:"content-start",hidden:!a},q.h("slot",{name:"content-start", onSlotchange:this.handleContentStartSlotChange}))}renderDefaultContent(){return q.h("div",{class:"content"},q.h("slot",null))}renderContentEnd(){const {hasContentEnd:a}=this;return q.h("div",{class:"content-end",hidden:!a},q.h("slot",{name:"content-end",onSlotchange:this.handleContentEndSlotChange}))}render(){return q.h(q.Host,{key:"f8d423aff1f3991e45cf591bd0480537cc09f846"},q.h("div",{key:"6c8e70bc5cced152dde2592c2b6f1f28695de681",class:"container"},this.renderActionsStart(),this.renderContentStart(), this.renderDefaultContent(),this.renderContentEnd(),this.renderActionsEnd()))}static get style(){return":host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;padding-inline:var(--calcite-stack-padding-inline, 0.75rem);padding-block:var(--calcite-stack-padding-block, 0.5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}"}}, [1,"calcite-stack",{disabled:[516],hasActionsStart:[32],hasActionsEnd:[32],hasContentStart:[32],hasContentEnd:[32]}]);Ib();const mc=q.proxyCustomElement(class extends q.H{constructor(){super();this.__registerHost();this.__attachShadow();this.calciteFilterChange=q.createEvent(this,"calciteFilterChange",6);this.filterDebounced=ub.debounce((a,b=!1,c)=>this.items.length&&this.updateFiltered(pb.filter(this.items,a),b,c),250);this.inputHandler=a=>{a=a.target;this.value=a.value;this.filterDebounced(a.value, !0)};this.keyDownHandler=a=>{a.defaultPrevented||("Escape"===a.key&&(this.clear(),a.preventDefault()),"Enter"===a.key&&a.preventDefault())};this.clear=()=>{this.value="";this.filterDebounced("",!0);this.setFocus()};this.items=[];this.disabled=!1;this.filteredItems=[];this.placeholder=void 0;this.scale="m";this.value="";this.defaultMessages=this.effectiveLocale=this.messageOverrides=this.messages=void 0}watchItemsHandler(){this.filterDebounced(this.value)}onMessagesChange(){}valueHandler(a){this.filterDebounced(a)}effectiveLocaleChange(){fa.updateMessages(this, this.effectiveLocale)}async componentWillLoad(){oa.setUpLoadableComponent(this);this.items.length&&this.updateFiltered(pb.filter(this.items,this.value));await fa.setUpMessages(this)}connectedCallback(){ea.connectInteractive(this);Ga.connectLocalized(this);fa.connectMessages(this)}componentDidRender(){ea.updateHostInteraction(this)}disconnectedCallback(){ea.disconnectInteractive(this);Ga.disconnectLocalized(this);fa.disconnectMessages(this);this.filterDebounced.cancel()}componentDidLoad(){oa.setComponentLoaded(this)}async filter(a= this.value){return new Promise(b=>{this.value=a;this.filterDebounced(a,!1,b)})}async setFocus(){await oa.componentFocusable(this);this.el?.focus()}updateFiltered(a,b=!1,c){this.filteredItems=a;b&&this.calciteFilterChange.emit();c?.()}render(){const {disabled:a,scale:b}=this;return q.h(ea.InteractiveContainer,{key:"f7270a6dc848da7a11ffeffd783836d083f75378",disabled:a},q.h("div",{key:"7fe378823d3a5c458fcf385ffce80b498a599fa8",class:"container"},q.h("label",{key:"7ff51820e2e168353ff00629c3bcbc9e5b13ef54"}, q.h("calcite-input",{key:"bc6bb09f4a967f31a55d000e377379842d150f1c",clearable:!0,disabled:a,icon:"search",label:this.messages.label,messageOverrides:{clear:this.messages.clear},onCalciteInputInput:this.inputHandler,onKeyDown:this.keyDownHandler,placeholder:this.placeholder,scale:b,type:"text",value:this.value,ref:c=>{this.textInput=c}}))))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{items:["watchItemsHandler"],messageOverrides:["onMessagesChange"], value:["valueHandler"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;inline-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;inline-size:100%;padding:0.5rem}label{position:relative;margin-inline:0.25rem;margin-block:0px;display:flex;inline-size:100%;align-items:center;overflow:hidden}input[type\x3dtext]{margin-block-end:0.25rem;inline-size:100%;border-style:none;background-color:transparent;padding-block:0.25rem;font-family:inherit;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-color-text-1);padding-inline-end:0.25rem;padding-inline-start:1.5rem;transition:padding var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}input[type\x3dtext]::-ms-clear{display:none}calcite-input{inline-size:100%}.search-icon{position:absolute;display:flex;color:var(--calcite-color-text-2);inset-inline-start:0;transition:inset-inline-start var(--calcite-animation-timing), inset-inline-end var(--calcite-animation-timing), opacity var(--calcite-animation-timing)}input[type\x3dtext]:focus{border-color:var(--calcite-color-brand);outline:2px solid transparent;outline-offset:2px;padding-inline:0.25rem}input[type\x3dtext]:focus~.search-icon{inset-inline-start:calc(1rem * -1);opacity:0}.clear-button{display:flex;cursor:pointer;align-items:center;border-width:0px;background-color:transparent;color:var(--calcite-color-text-2)}.clear-button:hover,.clear-button:focus{color:var(--calcite-color-text-1)}:host([hidden]){display:none}[hidden]{display:none}"}}, [17,"calcite-filter",{items:[16],disabled:[516],filteredItems:[1040],placeholder:[1],scale:[513],value:[1025],messages:[1040],messageOverrides:[1040],effectiveLocale:[32],defaultMessages:[32],filter:[64],setFocus:[64]},void 0,{items:["watchItemsHandler"],messageOverrides:["onMessagesChange"],value:["valueHandler"],effectiveLocale:["effectiveLocaleChange"]}]);Jb();const Lb=q.proxyCustomElement(class extends q.H{constructor(){super();this.__registerHost();this.__attachShadow();this.calciteListChange= q.createEvent(this,"calciteListChange",6);this.calciteListDragEnd=q.createEvent(this,"calciteListDragEnd",6);this.calciteListDragStart=q.createEvent(this,"calciteListDragStart",6);this.calciteListFilter=q.createEvent(this,"calciteListFilter",6);this.calciteListOrderChange=q.createEvent(this,"calciteListOrderChange",6);this.calciteInternalListDefaultSlotChange=q.createEvent(this,"calciteInternalListDefaultSlotChange",6);this.dragSelector="calcite-list-item";this.focusableItems=[];this.handleSelector= "calcite-handle";this.listItems=[];this.mutationObserver=Wb.createObserver("mutation",()=>this.updateListItems());this.visibleItems=[];this.handleDefaultSlotChange=a=>{ob.updateListItemChildren(ob.getListItemChildren(a.target));this.parentListEl&&this.calciteInternalListDefaultSlotChange.emit()};this.handleFilterActionsStartSlotChange=a=>{this.hasFilterActionsStart=da.slotChangeHasAssignedElement(a)};this.handleFilterActionsEndSlotChange=a=>{this.hasFilterActionsEnd=da.slotChangeHasAssignedElement(a)}; this.handleFilterNoResultsSlotChange=a=>{this.hasFilterNoResults=da.slotChangeHasAssignedElement(a)};this.setActiveListItem=()=>{const {focusableItems:a}=this;!a.some(b=>b.active)&&a[0]&&(a[0].active=!0)};this.updateSelectedItems=(a=!1)=>{this.selectedItems=this.visibleItems.filter(b=>b.selected);a&&this.calciteListChange.emit()};this.borderItems=()=>{const a=this.visibleItems.filter(b=>!b.filterHidden&&this.allParentListItemsOpen(b));a.forEach(b=>b.bordered=b!==a[a.length-1])};this.updateFilteredItems= (a=!1)=>{const {visibleItems:b,filteredData:c,filterText:d}=this,e=c.map(k=>k.value),f=b?.filter(k=>b.every(m=>m===k||!k.contains(m))),g=b.filter(k=>!d||e.includes(k.value))||[],h=new WeakSet;f.forEach(k=>this.filterElements({el:k,filteredItems:g,visibleParents:h}));this.filteredItems=g;a&&this.calciteListFilter.emit()};this.setFilterEl=a=>{this.filterEl=a;this.performFilter()};this.handleFilterChange=a=>{a.stopPropagation();({value:a}=a.currentTarget);this.filterText=a;this.updateFilteredData(!0)}; this.getItemData=()=>this.listItems.map(a=>({label:a.label,description:a.description,metadata:a.metadata,value:a.value}));this.updateListItems=ub.debounce((a=!1)=>{const {selectionAppearance:b,selectionMode:c,dragEnabled:d}=this,e=this.queryListItems();e.forEach(f=>{f.selectionAppearance=b;f.selectionMode=c});this.queryListItems(!0).forEach(f=>{f.dragHandle=d});this.parentListEl||(this.listItems=e,this.filterEnabled&&(this.dataForFilter=this.getItemData(),this.filterEl&&(this.filterEl.items=this.dataForFilter)), this.visibleItems=this.listItems.filter(f=>!f.closed&&!f.hidden),this.updateFilteredItems(a),this.borderItems(),this.focusableItems=this.filteredItems.filter(f=>!f.disabled),this.setActiveListItem(),this.updateSelectedItems(a));this.setUpSorting()},0);this.queryListItems=(a=!1)=>Array.from(this.el.querySelectorAll(a?":scope \x3e calcite-list-item":"calcite-list-item"));this.focusRow=a=>{const {focusableItems:b}=this;a&&(b.forEach(c=>c.active=c===a),a.setFocus())};this.isNavigable=a=>(a=a.parentElement?.closest("calcite-list-item"))? a.open&&this.isNavigable(a):!0;this.handleListKeydown=a=>{if(!a.defaultPrevented&&!this.parentListEl){var {key:b}=a,c=this.focusableItems.filter(e=>this.isNavigable(e)),d=c.findIndex(e=>e.active);"ArrowDown"===b?(a.preventDefault(),a=a.target===this.filterEl?0:d+1,c[a]&&this.focusRow(c[a])):"ArrowUp"===b?(a.preventDefault(),0===d&&this.filterEnabled?this.filterEl?.setFocus():(a=d-1,c[a]&&this.focusRow(c[a]))):"Home"===b?(a.preventDefault(),(c=c[0])&&this.focusRow(c)):"End"===b&&(a.preventDefault(), (c=c[c.length-1])&&this.focusRow(c))}};this.disabled=!1;this.canPut=this.canPull=void 0;this.dragEnabled=!1;this.group=void 0;this.filterEnabled=!1;this.filteredItems=[];this.filteredData=[];this.label=this.filterText=this.filterPlaceholder=void 0;this.loading=!1;this.numberingSystem=this.messages=this.messageOverrides=void 0;this.openable=!1;this.selectedItems=[];this.selectionMode="none";this.selectionAppearance="icon";this.effectiveLocale="";this.assistiveText=this.defaultMessages=void 0;this.dataForFilter= [];this.hasFilterNoResults=this.hasFilterActionsStart=this.hasFilterActionsEnd=!1}async handleFilterTextChange(){this.performFilter()}onMessagesChange(){}handleListItemChange(){this.updateListItems()}handleCalciteListItemToggle(){this.parentListEl||this.borderItems()}handleCalciteInternalFocusPreviousItem(a){if(!this.parentListEl){a.stopPropagation();({focusableItems:a}=this);var b=a.findIndex(c=>c.active)-1;a[b]&&this.focusRow(a[b])}}handleCalciteInternalListItemActive(a){if(!this.parentListEl){a.stopPropagation(); var b=a.target;({listItems:a}=this);a.forEach(c=>{c.active=c===b})}}handleCalciteListItemSelect(){this.parentListEl||this.updateSelectedItems(!0)}handleCalciteInternalAssistiveTextChange(a){this.assistiveText=a.detail.message;a.stopPropagation()}handleCalciteHandleNudge(a){this.parentListEl||this.handleNudgeEvent(a)}handleCalciteInternalListItemSelect(a){if(!this.parentListEl){a.stopPropagation();var b=a.target,{listItems:c,selectionMode:d}=this;!b.selected||"single"!==d&&"single-persist"!==d||c.forEach(e=> e.selected=e===b);this.updateSelectedItems()}}handleCalciteInternalListItemSelectMultiple(a){if(!this.parentListEl){a.stopPropagation();var {target:b,detail:c}=a,{focusableItems:d,lastSelectedInfo:e}=this;if(c.selectMultiple&&e){a=d.indexOf(b);const f=d.indexOf(e.selectedItem);d.slice(Math.min(f,a),Math.max(f,a)+1).forEach(g=>g.selected=e.selected)}else this.lastSelectedInfo={selectedItem:b,selected:b.selected}}}handleCalciteInternalListItemChange(a){this.parentListEl||(a.stopPropagation(),this.updateListItems())}handleCalciteInternalListItemGroupDefaultSlotChange(a){a.stopPropagation()}connectedCallback(){this.dragEnabled&& Pa||(fa.connectMessages(this),this.connectObserver(),this.updateListItems(),this.setUpSorting(),ea.connectInteractive(this),this.setParentList())}async componentWillLoad(){oa.setUpLoadableComponent(this);await fa.setUpMessages(this)}componentDidRender(){ea.updateHostInteraction(this)}componentDidLoad(){oa.setComponentLoaded(this)}disconnectedCallback(){this.dragEnabled&&Pa||(this.disconnectObserver(),Hb(this),ea.disconnectInteractive(this),fa.disconnectMessages(this))}effectiveLocaleChange(){fa.updateMessages(this, this.effectiveLocale)}async setFocus(){await oa.componentFocusable(this);return this.filterEnabled?this.filterEl?.setFocus():this.focusableItems.find(a=>a.active)?.setFocus()}render(){const {loading:a,label:b,disabled:c,dataForFilter:d,filterEnabled:e,filterPlaceholder:f,filterText:g,filteredItems:h,hasFilterActionsStart:k,hasFilterActionsEnd:m,hasFilterNoResults:n}=this;return q.h(ea.InteractiveContainer,{key:"be7d5300b720d3c2adb29ee3dec27d7b70c3e0b4",disabled:this.disabled},q.h("div",{key:"1c6ff5516994d00848c331174d07ab4c7a70d5a1", class:"container"},this.dragEnabled?q.h("span",{"aria-live":"assertive",class:"assistive-text"},this.assistiveText):null,this.renderItemAriaLive(),a?q.h("calcite-scrim",{class:"scrim",loading:a}):null,q.h("table",{key:"78bfe1d34ec213e8f0c5494784298ff67d39ec8c","aria-busy":da.toAriaBoolean(a),"aria-label":b||"",class:"table",onKeyDown:this.handleListKeydown,role:"treegrid"},e||k||m?q.h("thead",{class:"sticky-pos"},q.h("tr",null,q.h("th",{colSpan:Xb.MAX_COLUMNS},q.h("calcite-stack",{class:"stack"}, q.h("slot",{name:"filter-actions-start",onSlotchange:this.handleFilterActionsStartSlotChange,slot:"actions-start"}),q.h("calcite-filter",{"aria-label":f,disabled:c,items:d,onCalciteFilterChange:this.handleFilterChange,placeholder:f,value:g,ref:this.setFilterEl}),q.h("slot",{name:"filter-actions-end",onSlotchange:this.handleFilterActionsEndSlotChange,slot:"actions-end"}))))):null,q.h("tbody",{key:"8950cb148789530e6dad16a722c7c6077b2a5ab8",class:"table-container"},q.h("slot",{key:"a8333193d984d6534f5861a1cee0cd98744573b6", onSlotchange:this.handleDefaultSlotChange}))),q.h("div",{key:"2b96f30d61ac1d33e6709afe93ce259b61d1ab67","aria-live":"polite","data-test-id":"no-results-container",hidden:!(n&&e&&g&&!h.length)},q.h("slot",{key:"12c5d5758a840ef8eb9cbc5df36b73ec7a8f3c94",name:"filter-no-results",onSlotchange:this.handleFilterNoResultsSlotChange}))))}renderItemAriaLive(){const {messages:a,filteredItems:b,parentListEl:c,effectiveLocale:d,numberingSystem:e,filterEnabled:f,filterText:g,filteredData:h}=this;Ga.numberStringFormatter.numberFormatOptions= {locale:d,numberingSystem:e};return c?null:q.h("div",{"aria-live":"polite",class:"assistive-text"},f&&g&&h?.length?q.h("div",{key:"aria-filter-enabled"},a.filterEnabled):null,q.h("div",{key:"aria-item-count"},a.total.replace("{count}",Ga.numberStringFormatter.localize(b.length.toString()))),b.length?q.h("ol",{key:"aria-item-list"},b.map(k=>q.h("li",null,k.label))):null)}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){const {dragEnabled:a}= this;a&&hc(this)}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(a){this.calciteListDragEnd.emit(a)}onDragStart(a){this.calciteListDragStart.emit(a)}onDragSort(a){this.setParentList();this.updateListItems();this.calciteListOrderChange.emit(a)}setParentList(){this.parentListEl=this.el.parentElement?.closest("calcite-list")}filterElements({el:a,filteredItems:b,visibleParents:c}){const d=!c.has(a)&&!b.includes(a);a.filterHidden=d;if(a=a.parentElement.closest("calcite-list-item-group, calcite-list-item"))d|| c.add(a),this.filterElements({el:a,filteredItems:b,visibleParents:c})}allParentListItemsOpen(a){return(a=a.parentElement?.closest("calcite-list-item"))?a.open?this.allParentListItemsOpen(a):!1:!0}updateFilteredData(a=!1){const {filterEl:b}=this;b&&(b.filteredItems&&(this.filteredData=b.filteredItems),this.updateListItems(a))}async performFilter(){const {filterEl:a,filterText:b}=this;a&&(a.value=b,await a.filter(b),this.updateFilteredData())}handleNudgeEvent(a){const {handleSelector:b,dragSelector:c}= this,{direction:d}=a.detail;a=a.composedPath();const e=a.find(n=>n?.tagName&&n.matches(b));a=a.find(n=>n?.tagName&&n.matches(c));const f=a?.parentElement;if(f){var {filteredItems:g}=this;g=g.filter(n=>n.parentElement===f);var h=g.length-1,k=g.indexOf(a);var m="up"===d?0===k?h:k-1:k===h?0:k+1;this.disconnectObserver();e.blurUnselectDisabled=!0;f.insertBefore(a,"up"===d&&m!==h||"down"===d&&0===m?g[m]:g[m].nextSibling);this.updateListItems();this.connectObserver();this.calciteListOrderChange.emit({dragEl:a, fromEl:f,toEl:f,newIndex:m,oldIndex:k});e.setFocus().then(()=>e.blurUnselectDisabled=!1)}}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{filterText:["handleFilterTextChange"],messageOverrides:["onMessagesChange"],filterEnabled:["handleListItemChange"],group:["handleListItemChange"],dragEnabled:["handleListItemChange"],selectionMode:["handleListItemChange"],selectionAppearance:["handleListItemChange"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return":host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%;border-collapse:collapse}.stack{--calcite-stack-padding-inline:0;--calcite-stack-padding-block:0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-color-foreground-1)}.sticky-pos th{padding:0px}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}"}}, [1,"calcite-list",{disabled:[516],canPull:[16],canPut:[16],dragEnabled:[516,"drag-enabled"],group:[513],filterEnabled:[516,"filter-enabled"],filteredItems:[1040],filteredData:[1040],filterPlaceholder:[513,"filter-placeholder"],filterText:[1537,"filter-text"],label:[1],loading:[516],messageOverrides:[1040],messages:[1040],numberingSystem:[1,"numbering-system"],openable:[4],selectedItems:[1040],selectionMode:[513,"selection-mode"],selectionAppearance:[513,"selection-appearance"],effectiveLocale:[32], defaultMessages:[32],assistiveText:[32],dataForFilter:[32],hasFilterActionsEnd:[32],hasFilterActionsStart:[32],hasFilterNoResults:[32],setFocus:[64]},[[0,"calciteListItemToggle","handleCalciteListItemToggle"],[0,"calciteInternalFocusPreviousItem","handleCalciteInternalFocusPreviousItem"],[0,"calciteInternalListItemActive","handleCalciteInternalListItemActive"],[0,"calciteListItemSelect","handleCalciteListItemSelect"],[0,"calciteInternalAssistiveTextChange","handleCalciteInternalAssistiveTextChange"], [0,"calciteHandleNudge","handleCalciteHandleNudge"],[0,"calciteInternalListItemSelect","handleCalciteInternalListItemSelect"],[0,"calciteInternalListItemSelectMultiple","handleCalciteInternalListItemSelectMultiple"],[0,"calciteInternalListItemChange","handleCalciteInternalListItemChange"],[0,"calciteInternalListItemGroupDefaultSlotChange","handleCalciteInternalListItemGroupDefaultSlotChange"]],{filterText:["handleFilterTextChange"],messageOverrides:["onMessagesChange"],filterEnabled:["handleListItemChange"], group:["handleListItemChange"],dragEnabled:["handleListItemChange"],selectionMode:["handleListItemChange"],selectionAppearance:["handleListItemChange"],effectiveLocale:["effectiveLocaleChange"]}]);Kb();Ya.CalciteList=Lb;Ya.defineCustomElement=Kb;Object.defineProperty(Ya,Symbol.toStringTag,{value:"Module"})});