1import"./index-BRIVKnL2.js";import"./customElement-CMuGA6IM.js";import{ft as xe,fo as _e,fq as F,fr as T,fu as Ae,k9 as Ue,gb as et}from"./index-Cf8Ahf00.js";import{i as Tt}from"./keyed-bb9v-Oaa.js";import{d as ut,e as vi}from"./dom-DsJ7S-mJ.js";import"./index-6LNHyhwk.js";import"./index-BXCEq2ju.js";import{n as $e}from"./index-BT6ZLJt-.js";import{e as bi,n as ge}from"./ref-BOIOpoZ9.js";import{u as je,I as We}from"./interactive-DYKHhLuT.js";import{u as qe}from"./useCancelable-BpV1rhc3.js";import{u as Ve}from"./useT9n-BO3sRQui.js";import{u as Ke}from"./useSetFocus-B6nw-TFL.js";import{d as Ze}from"./debounce-D3NSP8gs.js";import{c as Ei}from"./observers-CDZcxuXr.js";import{b as Ct,i as Ht,l as ne,u as yi,c as me,e as Me}from"./utils2-CnrHjnX4.js";import{g as Si}from"./guid-DlHjpvET.js";import"./static-5Ckaqqjg.js";import"./index-C2T1vx1E.js";import"./form-CKroUJ2B.js";import"./key-HTOW8iPe.js";import"./label-RaLToJSE.js";function Ii(n){return n}function wi(n){return n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 2See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 3v3.3.3 */const ht={container:"container",actionsStart:"actions-start",contentStart:"content-start",content:"content",contentEnd:"content-end",actionsEnd:"actions-end"},mt={actionsStart:"actions-start",contentStart:"content-start",contentEnd:"content-end",actionsEnd:"actions-end"};/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 4See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 5v3.3.3 */const Di=xe`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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, .75rem);padding-block:var(--calcite-stack-padding-block, .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:.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}`,Jt=class Jt extends _e{constructor(){super(...arguments),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.disabled=!1}handleActionsStartSlotChange(t){this.hasActionsStart=ut(t)}handleActionsEndSlotChange(t){this.hasActionsEnd=ut(t)}handleContentStartSlotChange(t){this.hasContentStart=ut(t)}handleContentEndSlotChange(t){this.hasContentEnd=ut(t)}renderActionsStart(){const{hasActionsStart:t}=this;return Tt("actions-start-container",T`<div class=${F(ht.actionsStart)} .hidden=${!t}><slot name=${mt.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){const{hasActionsEnd:t}=this;return Tt("actions-end-container",T`<div class=${F(ht.actionsEnd)} .hidden=${!t}><slot name=${mt.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`)}renderContentStart(){const{hasContentStart:t}=this;return T`<div class=${F(ht.contentStart)} .hidden=${!t}><slot name=${mt.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderDefaultContent(){return T`<div class=${F(ht.content)}><slot></slot></div>`}renderContentEnd(){const{hasContentEnd:t}=this;return T`<div class=${F(ht.contentEnd)} .hidden=${!t}><slot name=${mt.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}render(){return T`<div class=${F(ht.container)}>${this.renderActionsStart()}${this.renderContentStart()}${this.renderDefaultContent()}${this.renderContentEnd()}${this.renderActionsEnd()}</div>`}};Jt.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}]},Jt.styles=Di;let ve=Jt;Ae("calcite-stack",ve);function Qe(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(Qe).join(",");const t=String(n);return t==="0"&&Object.is(Number(n),-0)?"-0":t}function Ci(n,t=Ii){if(n==null)return n;for(const e in n)if(t(n[e],e,n)===!1)break;return n}function xi(n){return wi(Qe(n))}/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 6See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 7v3.3.3 */const re=(n,t,e)=>{const i=xi(t),r=new RegExp(i,"i");
7n.length===0&&console.warn(`No data was passed to the filter function. 8 The data argument should be an array of objects`);const a=(o,s,l)=>{if(o!=null&&o.constant||o!=null&&o.filterDisabled)return!0;let c=!1;return Ci(o,(d,h)=>{typeof d=="function"||d==null||l&&!l.includes(h)||(Array.isArray(d)||typeof d=="object"&&d!==null?a(d,s)&&(c=!0):s.test(d)&&(c=!0))}),c};return n.filter(o=>a(o,r,e))};/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 9See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 10v3.3.3 */const _i={container:"container"},Ai={search:"search"},Ti=xe`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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%}:host([scale=s]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-sm))}:host([scale=m]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-md))}:host([scale=l]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-lg))}label{position:relative;margin-block:0px;display:flex;inline-size:100%;align-items:center;overflow:hidden}calcite-input{inline-size:100%;--calcite-input-background-color: var(--calcite-filter-input-background-color);--calcite-input-border-color: var(--calcite-filter-input-border-color);--calcite-input-corner-radius: var(--calcite-filter-input-corner-radius);--calcite-input-shadow: var(--calcite-filter-input-shadow);--calcite-input-icon-color: var(--calcite-filter-input-icon-color);--calcite-input-text-color: var(--calcite-filter-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-filter-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-filter-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-filter-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-filter-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-filter-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-filter-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-filter-input-actions-icon-color-press)}:host([hidden]){display:none}[hidden]{display:none}`,Mt=class Mt extends _e{constructor(){super(...arguments),this.cancelable=qe()(this),this.filterDebounced=Ze((t,e=!1,i)=>this.updateFiltered(re(this.items??[],t,this.filterProps),e,i),Ue.filter),this.textInput=bi(),this._value="",this.messages=Ve(),this.focusSetter=Ke()(this),this.disabled=!1,this.filteredItems=[],this.items=[],this.scale="m",this.calciteFilterChange=et({cancelable:!1})}get value(){return this._value}set value(t){const e=this._value;t!==e&&(this._value=t,this.valueHandler(t))}async filter(t=this.value){return new Promise(e=>{this.value=t,this.updateFiltered(re(this.items??[],t,this.filterProps),!1,e)})}async setFocus(t){return this.focusSetter(()=>this.textInput.value,t)}connectedCallback(){super.connectedCallback(),this.cancelable.add(this.filterDebounced)}async load(){this.updateFiltered(re(this.items??[],this.value,this.filterProps))}willUpdate(t){var e;(t.has("items")&&(this.hasUpdated||((e=this.items)==null?void 0:e.length)>0)||t.has("filterProps"))&&this.filterDebounced(this.value)}updated(){je(this)}valueHandler(t){this.filterDebounced(t)}inputHandler(t){const e=t.target;this.value=e.value,this.filterDebounced(e.value,!0)}
10keyDownHandler(t){t.defaultPrevented||(t.key==="Escape"&&(this.clear(),t.preventDefault()),t.key==="Enter"&&t.preventDefault())}clear(){this.value="",this.filterDebounced("",!0),this.setFocus()}updateFiltered(t,e=!1,i){this.filteredItems=t,e&&this.calciteFilterChange.emit(),i==null||i()}render(){const{disabled:t,scale:e}=this;return We({disabled:t,children:T`<div class=${F(_i.container)}><label><calcite-input clearable .disabled=${t} .icon=${Ai.search} .label=${this.label??this.messages.label} .messageOverrides=${{clear:this.messages.clear}} @keydown=${this.keyDownHandler} @calciteInputInput=${this.inputHandler} .placeholder=${this.placeholder} .scale=${e} type=text .value=${this.value} ${ge(this.textInput)}></calcite-input></label></div>`})}};Mt.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterProps:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],items:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],placeholder:1,scale:[3,{},{reflect:!0}],value:1},Mt.shadowRootOptions={mode:"open",delegatesFocus:!0},Mt.styles=Ti;let be=Mt;Ae("calcite-filter",be);/**! 11 * Sortable 1.15.7 12 * @author RubaXa <[email protected]> 13 * @author owenm <[email protected]> 14 * @license MIT 15 */function Pi(n,t,e){return(t=$i(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Z(){return Z=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)({}).hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Z.apply(null,arguments)}function ke(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),e.push.apply(e,i)}return e}function j(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ke(Object(e),!0).forEach(function(i){Pi(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ke(Object(e)).forEac
vendor: 37,189 bytes, lines 15-17
15h(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Oi(n,t){if(n==null)return{};var e,i,r=Fi(n,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(i=0;i<a.length;i++)e=a[i],t.indexOf(e)===-1&&{}.propertyIsEnumerable.call(n,e)&&(r[e]=n[e])}return r}function Fi(n,t){if(n==null)return{};var e={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(t.indexOf(i)!==-1)continue;e[i]=n[i]}return e}function Li(n,t){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $i(n){var t=Li(n,"string");return typeof t=="symbol"?t:t+""}function Ee(n){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(n)}var Mi="1.15.7";function K(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var Q=K(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),kt=K(/Edge/i),Ne=K(/firefox/i),Pt=K(/safari/i)&&!K(/chrome/i)&&!K(/android/i),Te=K(/iP(ad|od|hone)/i),Je=K(/chrome/i)&&K(/android/i),ti={capture:!1,passive:!1};function E(n,t,e){n.addEventListener(t,e,!Q&&ti)}function b(n,t,e){n.removeEventListener(t,e,!Q&&ti)}function qt(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function ei(n){return n.host&&n!==document&&n.host.nodeType&&n.host!==n?n.host:n.parentNode}function X(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&qt(n,t):qt(n,t))||i&&n===e)return n;if(n===e)break}while(n=ei(n))}return null}var Re=/\s+/g;function N(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Re," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Re," ")}}function p(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function bt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=p(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function ii(n,t,e){if(n){var i=n.getElementsByTagName(t),r=0,a=i.length;if(e)for(;r<a;r++)e(i[r],r);return i}return[]}function U(){var n=document.scrollingElement;return n||document.documentElement}function x(n,t,e,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var a,o,s,l,c,d,h;if(n!==window&&n.parentNode&&n!==U()?(a=n.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,c=a.right,d=a.height,h=a.width):(o=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(t||e)&&n!==window&&(r=r||n.parentNode,!Q))do if(r&&r.getBoundingClientRect&&(p(r,"transform")!=="none"||e&&p(r,"position")!=="static")){var v=r.getBoundingClientRect();o-=v.top+parseInt(p(r,"border-top-width")),s-=v.left+parseInt(p(r,"border-left-width")),l=o+a.height,c=s+a.width;break}while(r=r.parentNode);if(i&&n!==window){var S=bt(r||n),f=S&&S.a,y=S&&S.d;S&&(o/=y,s/=f,h/=f,d/=y,l=o+d,c=s+h)}return{top:o,left:s,bottom:l,right:c,width:h,height:d}}}function He(n,t,e){for(var i=rt(n,!0),r=x(n)[t];i;){var a=x(i)[e],o=void 0;if(o=r>=a,!o)return i;if(i===U())break;i=rt(i,!1)}return!1}function Et(n,t,e,i){for(var r=0,a=0,o=n.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==g.ghost&&(i||o[a]!==g.dragged)&&X(o[a],e.draggable,n,!1)){if(r===t)return o[a];r++}a++}return null}function Pe(n,t){for(var e=n.lastElementChild;e&&(e===g.ghost||p(e,"display")==="none"||t&&!qt(e,t));)e=e.previousElementSibling;return e||null}function H(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==g.clone&&(!t||qt(n,t))&&e++;return e}function Ge(n){var t=0,e=0,i=U();if(n)do{var r=bt(n),a=r.a,o=r.d;t+=n.scrollLeft*a,e+=n.scrollTop*o}while(n!==i&&(n=n.parentNode));return[t,e]}function ki(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function rt(n,t){if(!n||!n.getBoundingClientRect)return U();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=p(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return U();if(i||t)return e;i=!0}}while(e=e.parentNode);return U()}function Ni(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function ae(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var Ot;function ni(n,t){return function(){if(!Ot){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),Ot=setTimeout(function(){Ot=void 0},t)}}}function Ri(){clearTimeout(Ot),Ot=void 0}function ri(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function ai(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function oi(n,t,e){var i={};return Array.from(n.children).forEach(function(r){var a,o,s,l;if(!(!X(r,t.draggable,n,!1)||r.animated||r===e)){var c=x(r);i.left=Math.min((a=i.left)!==null&&a!==void 0?a:1/0,c.left),i.top=Math.min((o=i.top)!==null&&o!==void 0?o:1/0,c.top),i.right=Math.max((s=i.right)!==null&&s!==void 0?s:-1/0,c.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var $="Sortable"+new Date().getTime();function Hi(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(p(r,"display")==="none"||r===g.ghost)){n.push({target:r,rect:x(r)});var a=j({},n[n.length-1].rect);if(r.thisAnimationDuration){var o=bt(r,!0);o&&(a.top-=o.f,a.left-=o.e)}r.fromRect=a}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(ki(n,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var a=!1,o=0;n.forEach(function(s){var l=0,c=s.target,d=c.fromRect,h=x(c),v=c.prevFromRect,S=c.prevToRect,f=s.rect,y=bt(c,!0);y&&(h.top-=y.f,h.left-=y.e),c.toRect=h,c.thisAnimationDuration&&ae(v,h)&&!ae(d,h)&&(f.top-h.top)/(f.left-h.left)===(d.top-h.top)/(d.left-h.left)&&(l=Bi(f,v,S,r.options)),ae(h,d)||(c.prevFromRect=d,c.prevToRect=h,l||(l=r.options.animation),r.animate(c,f,h,l)),l&&(a=!0,o=Math.max(o,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof i=="function"&&i()},o):typeof i=="function"&&i(),n=[]},animate:function(i,r,a,o){if(o){p(i,"transition",""),p(i,"transform","");var s=bt(this.el),l=s&&s.a,c=s&&s.d,d=(r.left-a.left)/(l||1),h=(r.top-a.top)/(c||1);i.animatingX=!!d,i.animatingY=!!h,p(i,"transform","translate3d("+d+"px,"+h+"px,0)"),this.forRepaintDummy=Gi(i),p(i,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),p(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){p(i,"transition",""),p(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},o)}}}}function Gi(n){return n.offsetWidth}function Bi(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var ft=[],oe={initializeByDefault:!0},Nt={mount:function(t){for(var e in oe)oe.hasOwnProperty(e)&&!(e in t)&&(t[e]=oe[e]);ft.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ft.push(t)},pluginEvent:function(t,e,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var a=t+"Global";ft.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][a]&&e[o.pluginName][a](j({sortable:e},i)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](j({sortable:e},i)))})},initializePlugins:function(t,e,i,r){ft.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var c=new s(t,e,t.options);c.sortable=t,c.options=t.options,t[l]=c,Z(i,c.defaults)}});for(var a in t.options)if(t.options.hasOwnProperty(a)){var o=this.modifyOption(t,a,t.options[a]);typeof o<"u"&&(t.options[a]=o)}},getEventProperties:function(t,e){var i={};return ft.forEach(function(r){typeof r.eventProperties=="function"&&Z(i,r.eventProperties.call(e[r.pluginName],t))}),i},modifyOption:function(t,e,i){var r;return ft.forEach(function(a){t[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[e]=="function"&&(r=a.optionListeners[e].call(t[a.pluginName],i))}),r}};function zi(n){var t=n.sortable,e=n.rootEl,i=n.name,r=n.targetEl,a=n.cloneEl,o=n.toEl,s=n.fromEl,l=n.oldIndex,c=n.newIndex,d=n.oldDraggableIndex,h=n.newDraggableIndex,v=n.originalEvent,S=n.putSortable,f=n.extraEventProperties;if(t=t||e&&e[$],!!t){var y,G=t.options,W="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Q&&!kt?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=o||e,y.from=s||e,y.item=r||e,y.clone=a,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=d,y.newDraggableIndex=h,y.originalEvent=v,y.pullMode=S?S.lastPutMode:void 0;var P=j(j({},f),Nt.getEventProperties(i,t));for(var B in P)y[B]=P[B];e&&e.dispatchEvent(y),G[W]&&G[W].call(t,y)}}var Xi=["evt"],L=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,a=Oi(i,Xi);Nt.pluginEvent.bind(g)(t,e,j({dragEl:u,parentEl:D,ghostEl:m,rootEl:I,nextEl:dt,lastDownEl:Yt,cloneEl:w,cloneHidden:nt,dragStarted:xt,putSortable:_,activeSortable:g.active,originalEvent:r,oldIndex:vt,oldDraggableIndex:Ft,newIndex:R,newDraggableIndex:it,hideGhostForTarget:di,unhideGhostForTarget:ui,cloneNowHidden:function(){nt=!0},cloneNowShown:function(){nt=!1},dispatchSortableEvent:function(s){O({sortable:e,name:s,originalEvent:r})}},a))};function O(n){zi(j({putSortable:_,cloneEl:w,targetEl:u,rootEl:I,oldIndex:vt,oldDraggableIndex:Ft,newIndex:R,newDraggableIndex:it},n))}var u,D,m,I,dt,Yt,w,nt,vt,R,Ft,it,Gt,_,gt=!1,Vt=!1,Kt=[],lt,z,se,le,Be,ze,xt,pt,Lt,$t=!1,Bt=!1,Ut,A,ce=[],ye=!1,Zt=[],ee=typeof document<"u",zt=Te,Xe=kt||Q?"cssFloat":"float",Yi=ee&&!Je&&!Te&&"draggable"in document.createElement("div"),si=(function(){if(ee){if(Q)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),li=function(t,e){var i=p(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),a=Et(t,0,e),o=Et(t,1,e),s=a&&p(a),l=o&&p(o),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+x(a).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+x(o).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var h=s.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===h)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&i[Xe]==="none"||o&&i[Xe]==="none"&&c+d>r)?"vertical":"horizontal"},Ui=function(t,e,i){var r=i?t.left:t.top,a=i?t.right:t.bottom,o=i?t.width:t.height,s=i?e.left:e.top,l=i?e.right:e.bottom,c=i?e.width:e.height;return r===s||a===l||r+o/2===s+c/2},ji=function(t,e){var i;return Kt.some(function(r){var a=r[$].options.emptyInsertThreshold;if(!(!a||Pe(r))){var o=x(r),s=t>=o.left-a&&t<=o.right+a,l=e>=o.top-a&&e<=o.bottom+a;if(s&&l)return i=r}}),i},ci=function(t){function e(a,o){return function(s,l,c,d){var h=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(o||h))return!0;if(a==null||a===!1)return!1;if(o&&a==="clone")return a;if(typeof a=="function")return e(a(s,l,c,d),o)(s,l,c,d);var v=(o?s:l).options.group.name;return a===!0||typeof a=="string"&&a===v||a.join&&a.indexOf(v)>-1}}var i={},r=t.group;(!r||Ee(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=e(r.pull,!0),i.checkPut=e(r.put),i.revertClone=r.revertClone,t.group=i},di=function(){!si&&m&&p(m,"display","none")},ui=function(){!si&&m&&p(m,"display","")};ee&&!Je&&document.addEventListener("click",function(n){if(Vt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Vt=!1,!1},!0);var ct=function(t){if(u){t=t.touches?t.touches[0]:t;var e=ji(t.clientX,t.clientY);if(e){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[$]._onDragOver(i)}}},Wi=function(t){u&&u.parentNode[$]._isOutsideThisEl(t.target)};function g(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=Z({},t),n[$]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return li(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:g.supportPointer!==!1&&"PointerEvent"in window&&(!Pt||Te),emptyInsertThreshold:5};Nt.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);ci(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:Yi,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(n,"pointerdown",this._onTapStart):(E(n,"mousedown",this._onTapStart),E(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(n,"dragover",this),E(n,"dragenter",this)),Kt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Z(this,Hi())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(pt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,u):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,r=this.options,a=r.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=r.filter;if(en(i),!u&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Pt&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=X(l,r.draggable,i,!1),!(l&&l.animated)&&Yt!==l)){if(vt=H(l),Ft=H(l,r.draggable),typeof d=="function"){if(d.call(this,t,l,this)){O({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),L("filter",e,{evt:t}),a&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(h){if(h=X(c,h.trim(),i,!1),h)return O({sortable:e,rootEl:h,name:"filter",targetEl:l,fromEl:i,toEl:i}),L("filter",e,{evt:t}),!0}),d)){a&&t.preventDefault();return}r.handle&&!X(c,r.handle,i,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,e,i){var r=this,a=r.el,o=r.options,s=a.ownerDocument,l;if(i&&!u&&i.parentNode===a){var c=x(i);if(I=a,u=i,D=u.parentNode,dt=u.nextSibling,Yt=i,Gt=o.group,g.dragged=u,lt={target:u,clientX:(e||t).clientX,clientY:(e||t).clientY},Be=lt.clientX-c.left,ze=lt.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,u.style["will-change"]="all",l=function(){if(L("delayEnded",r,{evt:t}),g.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Ne&&r.nativeDraggable&&(u.draggable=!0),r._triggerDragStart(t,e),O({sortable:r,name:"choose",originalEvent:t}),N(u,o.chosenClass,!0)},o.ignore.split(",").forEach(function(d){ii(u,d.trim(),de)}),E(s,"dragover",ct),E(s,"mousemove",ct),E(s,"touchmove",ct),o.supportPointer?(E(s,"pointerup",r._onDrop),!this.nativeDraggable&&E(s,"pointercancel",r._onDrop)):(E(s,"mouseup",r._onDrop),E(s,"touchend",r._onDrop),E(s,"touchcancel",r._onDrop)),Ne&&this.nativeDraggable&&(this.options.touchStartThreshold=4,u.draggable=!0),L("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(kt||Q))){if(g.eventCanceled){this._onDrop();return}o.supportPointer?(E(s,"pointerup",r._disableDelayedDrag),E(s,"pointercancel",r._disableDelayedDrag)):(E(s,"mouseup",r._disableDelayedDrag),E(s,"touchend",r._disableDelayedDrag),E(s,"touchcancel",r._disableDelayedDrag)),E(s,"mousemove",r._delayedDragTouchMoveHandler),E(s,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&E(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){u&&de(u),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"pointerup",this._disableDelayedDrag),b(t,"pointercancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):e?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(u,"dragend",this),E(I,"dragstart",this._onDragStart));try{document.selection?jt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(gt=!1,I&&u){L("dragStarted",this,{evt:e}),this.nativeDraggable&&E(document,"dragover",Wi);var i=this.options;!t&&N(u,i.dragClass,!1),N(u,i.ghostClass,!0),g.active=this,t&&this._appendGhost(),O({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(z){this._lastX=z.clientX,this._lastY=z.clientY,di();for(var t=document.elementFromPoint(z.clientX,z.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(z.clientX,z.clientY),t!==e);)e=t;if(u.parentNode[$]._isOutsideThisEl(t),e)do{if(e[$]){var i=void 0;if(i=e[$]._onDragOver({clientX:z.clientX,clientY:z.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=ei(e));ui()}},_onTouchMove:function(t){if(lt){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,a=t.touches?t.touches[0]:t,o=m&&bt(m,!0),s=m&&o&&o.a,l=m&&o&&o.d,c=zt&&A&&Ge(A),d=(a.clientX-lt.clientX+r.x)/(s||1)+(c?c[0]-ce[0]:0)/(s||1),h=(a.clientY-lt.clientY+r.y)/(l||1)+(c?c[1]-ce[1]:0)/(l||1);if(!g.active&&!gt){if(i&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(m){o?(o.e+=d-(se||0),o.f+=h-(le||0)):o={a:1,b:0,c:0,d:1,e:d,f:h};var v="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");p(m,"webkitTransform",v),p(m,"mozTransform",v),p(m,"msTransform",v),p(m,"transform",v),se=d,le=h,z=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!m){var t=this.options.fallbackOnBody?document.body:I,e=x(u,!0,zt,!0,t),i=this.options;if(zt){for(A=t;p(A,"position")==="static"&&p(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=U()),e.top+=A.scrollTop,e.left+=A.scrollLeft):A=U(),ce=Ge(A)}m=u.cloneNode(!0),N(m,i.ghostClass,!1),N(m,i.fallbackClass,!0),N(m,i.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",e.top),p(m,"left",e.left),p(m,"width",e.width),p(m,"height",e.height),p(m,"opacity","0.8"),p(m,"position",zt?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),g.ghost=m,t.appendChild(m),p(m,"transform-origin",Be/parseInt(m.style.width)*100+"% "+ze/parseInt(m.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,r=t.dataTransfer,a=i.options;if(L("dragStart",this,{evt:t}),g.eventCanceled){this._onDrop();return}L("setupClone",this),g.eventCanceled||(w=ai(u),w.removeAttribute("id"),w.draggable=!1,w.style["will-change"]="",this._hideClone(),N(w,this.options.chosenClass,!1),g.clone=w),i.cloneId=jt(function(){L("clone",i),!g.eventCanceled&&(i.options.removeCloneOnHide||I.insertBefore(w,u),i._hideClone(),O({sortable:i,name:"clone"}))}),!e&&N(u,a.dragClass,!0),e?(Vt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(b(document,"mouseup",i._onDrop),b(document,"touchend",i._onDrop),b(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(i,r,u)),E(document,"drop",i),p(u,"transform","translateZ(0)")),gt=!0,i._dragStartId=jt(i._dragStarted.bind(i,e,t)),E(document,"selectstart",i),xt=!0,window.getSelection().removeAllRanges(),Pt&&p(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,r,a,o,s=this.options,l=s.group,c=g.active,d=Gt===l,h=s.sort,v=_||c,S,f=this,y=!1;if(ye)return;function G(Dt,gi){L(Dt,f,j({evt:t,isOwner:d,axis:S?"vertical":"horizontal",revert:o,dragRect:r,targetRect:a,canSort:h,fromSortable:v,target:i,completed:P,onMove:function(Le,mi){return Xt(I,e,u,r,Le,x(Le),t,mi)},changed:B},gi))}function W(){G("dragOverAnimationCapture"),f.captureAnimationState(),f!==v&&v.captureAnimationState()}function P(Dt){return G("dragOverCompleted",{insertion:Dt}),Dt&&(d?c._hideClone():c._showClone(f),f!==v&&(N(u,_?_.options.ghostClass:c.options.ghostClass,!1),N(u,s.ghostClass,!0)),_!==f&&f!==g.active?_=f:f===g.active&&_&&(_=null),v===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){G("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(i===u&&!u.animated||i===e&&!i.animated)&&(pt=null),!s.dragoverBubble&&!t.rootEl&&i!==document&&(u.parentNode[$]._isOutsideThisEl(t.target),!Dt&&ct(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function B(){R=H(u),it=H(u,s.draggable),O({sortable:f,name:"change",toEl:e,newIndex:R,newDraggableIndex:it,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=X(i,s.draggable,e,!0),G("dragOver"),g.eventCanceled)return y;if(u.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return P(!1);if(Vt=!1,c&&!s.disabled&&(d?h||(o=D!==I):_===this||(this.lastPutMode=Gt.checkPull(this,c,u,t))&&l.checkPut(this,c,u,t))){if(S=this._getDirection(t,i)==="vertical",r=x(u),G("dragOverValid"),g.eventCanceled)return y;if(o)return D=I,W(),this._hideClone(),G("revert"),g.eventCanceled||(dt?I.insertBefore(u,dt):I.appendChild(u)),P(!0);var M=Pe(e,s.draggable);if(!M||Zi(t,S,this)&&!M.animated){if(M===u)return P(!1);if(M&&e===t.target&&(i=M),i&&(a=x(i)),Xt(I,e,u,r,i,a,t,!!i)!==!1)return W(),M&&M.nextSibling?e.insertBefore(u,M.nextSibling):e.appendChild(u),D=e,B(),P(!0)}else if(M&&Ki(t,S,this)){var at=Et(e,0,s,!0);if(at===u)return P(!1);if(i=at,a=x(i),Xt(I,e,u,r,i,a,t,!1)!==!1)return W(),e.insertBefore(u,at),D=e,B(),P(!0)}else if(i.parentNode===e){a=x(i);var Y=0,ot,yt=u.parentNode!==e,k=!Ui(u.animated&&u.toRect||r,i.animated&&i.toRect||a,S),St=S?"top":"left",J=He(i,"top","top")||He(u,"top","top"),It=J?J.scrollTop:void 0;pt!==i&&(ot=a[St],$t=!1,Bt=!k&&s.invertSwap||yt),Y=Qi(t,i,a,S,k?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Bt,pt===i);var q;if(Y!==0){var st=H(u);do st-=Y,q=D.children[st];while(q&&(p(q,"display")==="none"||q===m))}if(Y===0||q===i)return P(!1);pt=i,Lt=Y;var wt=i.nextElementSibling,tt=!1;tt=Y===1;var Rt=Xt(I,e,u,r,i,a,t,tt);if(Rt!==!1)return(Rt===1||Rt===-1)&&(tt=Rt===1),ye=!0,setTimeout(Vi,30),W(),tt&&!wt?e.appendChild(u):i.parentNode.insertBefore(u,tt?wt:i),J&&ri(J,0,It-J.scrollTop),D=u.parentNode,ot!==void 0&&!Bt&&(Ut=Math.abs(ot-x(i)[St])),B(),P(!0)}if(e.contains(u))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",ct),b(document,"mousemove",ct),b(document,"touchmove",ct)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"pointercancel",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(R=H(u),it=H(u,i.draggable),L("drop",this,{evt:t}),D=u&&u.parentNode,R=H(u),it=H(u,i.draggable),g.eventCanceled){this._nulling();return}gt=!1,Bt=!1,$t=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Se(this.cloneId),Se(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Pt&&p(document.body,"user-select",""),p(u,"transform",""),t&&(xt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(I===D||_&&_.lastPutMode!=="clone")&&w&&w.parentNode&&w.parentNode.removeChild(w),u&&(this.nativeDraggable&&b(u,"dragend",this),de(u),u.style["will-change"]="",xt&&!gt&&N(u,_?_.options.ghostClass:this.options.ghostClass,!1),N(u,this.options.chosenClass,!1),O({sortable:this,name:"unchoose",toEl:D,newIndex:null,newDraggableIndex:null,originalEvent:t}),I!==D?(R>=0&&(O({rootEl:D,name:"add",toEl:D,fromEl:I,originalEvent:t}),O({sortable:this,name:"remove",toEl:D,originalEvent:t}),O({rootEl:D,name:"sort",toEl:D,fromEl:I,originalEvent:t}),O({sortable:this,name:"sort",toEl:D,originalEvent:t})),_&&_.save()):R!==vt&&R>=0&&(O({sortable:this,name:"update",toEl:D,originalEvent:t}),O({sortable:this,name:"sort",toEl:D,originalEvent:t})),g.active&&((R==null||R===-1)&&(R=vt,it=Ft),O({sortable:this,name:"end",toEl:D,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){L("nulling",this),I=u=D=m=dt=w=Yt=nt=lt=z=xt=R=it=vt=Ft=pt=Lt=_=Gt=g.dragged=g.ghost=g.clone=g.active=null;var t=this.el;Zt.forEach(function(e){t.contains(e)&&(e.checked=!0)}),Zt.length=se=le=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":u&&(this._onDragOver(t),qi(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,r=0,a=i.length,o=this.options;r<a;r++)e=i[r],X(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||tn(e));return t},sort:function(t,e){var i={},r=this.el;this.toArray().forEach(function(a,o){var s=r.children[o];X(s,this.options.draggable,r,!1)&&(i[a]=s)},this),e&&this.captureAnimationState(),t.forEach(function(a){i[a]&&(r.removeChild(i[a]),r.appendChild(i[a]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return X(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var r=Nt.modifyOption(this,t,e);typeof r<"u"?i[t]=r:i[t]=e,t==="group"&&ci(i)},destroy:function(){L("destroy",this);var t=this.el;t[$]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Kt.splice(Kt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!nt){if(L("hideClone",this),g.eventCanceled)return;p(w,"display","none"),this.options.removeCloneOnHide&&w.parentNode&&w.parentNode.removeChild(w),nt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(nt){if(L("showClone",this),g.eventCanceled)return;u.parentNode==I&&!this.options.group.revertClone?I.insertBefore(w,u):dt?I.insertBefore(w,dt):I.appendChild(w),this.options.group.revertClone&&this.animate(u,w),p(w,"display",""),nt=!1}}};function qi(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Xt(n,t,e,i,r,a,o,s){var l,c=n[$],d=c.options.onMove,h;return window.CustomEvent&&!Q&&!kt?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=r||t,l.relatedRect=a||x(t),l.willInsertAfter=s,l.originalEvent=o,n.dispatchEvent(l),d&&(h=d.call(c,l,o)),h}function de(n){n.draggable=!1}function Vi(){ye=!1}function Ki(n,t,e){var i=x(Et(e.el,0,e.options,!0)),r=oi(e.el,e.options,m),a=10;return t?n.clientX<r.left-a||n.clientY<i.top&&n.clientX<i.right:n.clientY<r.top-a||n.clientY<i.bottom&&n.clientX<i.left}function Zi(n,t,e){var i=x(Pe(e.el,e.options.draggable)),r=oi(e.el,e.options,m),a=10;return t?n.clientX>r.right+a||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>r.bottom+a||n.clientX>i.right&&n.clientY>i.top}function Qi(n,t,e,i,r,a,o,s){var l=i?n.clientY:n.clientX,c=i?e.height:e.width,d=i?e.top:e.left,h=i?e.bottom:e.right,v=!1;if(!o){if(s&&Ut<c*r){if(!$t&&(Lt===1?l>d+c*a/2:l<h-c*a/2)&&($t=!0),$t)v=!0;else if(Lt===1?l<d+Ut:l>h-Ut)return-Lt}else if(l>d+c*(1-r)/2&&l<h-c*(1-r)/2)return Ji(t)}return v=v||o,v&&(l<d+c*a/2||l>h-c*a/2)?l>d+c/2?1:-1:0}function Ji(n){return H(u)<H(n)?1:-1}function tn(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function en(n){Zt.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Zt.push(i)}}function jt(n){return setTimeout(n,0)}function Se(n){return clearTimeout(n)}ee&&E(document,"touchmove",function(n){(g.active||gt)&&n.cancelable&&n.preventDefault()});g.utils={on:E,off:b,css:p,find:ii,is:function(t,e){return!!X(t,e,t,!1)},extend:Ni,throttle:ni,closest:X,toggleClass:N,clone:ai,index:H,nextTick:jt,cancelNextTick:Se,detectDirection:li,getChild:Et,expando:$};g.get=function(n){return n[$]};g.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(g.utils=j(j({},g.utils),i.utils)),Nt.mount(i)})};g.create=function(n,t){return new g(n,t)};g.version=Mi;var C=[],_t,Ie,we=!1,ue,he,Qt,At;function nn(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):i.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),Ye(),Wt(),Ri()},nulling:function(){Qt=Ie=_t=we=At=ue=he=null,C.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var r=this,a=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=document.elementFromPoint(a,o);if(Qt=e,i||this.options.forceAutoScrollFallback||kt||Q||Pt){fe(e,this.options,s,i);var l=rt(s,!0);we&&(!At||a!==ue||o!==he)&&(At&&Ye(),At=setInterval(function(){var c=rt(document.elementFromPoint(a,o),!0);c!==l&&(l=c,Wt()),fe(e,r.options,c,i)},10),ue=a,he=o)}else{if(!this.options.bubbleScroll||rt(s,!0)===U()){Wt();return}fe(e,this.options,rt(s,!1),!1)}}},Z(n,{pluginName:"scroll",initializeByDefault:!0})}function Wt(){C.forEach(function(n){clearInterval(n.pid)}),C=[]}function Ye(){clearInterval(At)}var fe=ni(function(n,t,e,i){if(t.scroll){var r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,l=U(),c=!1,d;Ie!==e&&(Ie=e,Wt(),_t=t.scroll,d=t.scrollFn,_t===!0&&(_t=rt(e,!0)));var h=0,v=_t;do{var S=v,f=x(S),y=f.top,G=f.bottom,W=f.left,P=f.right,B=f.width,M=f.height,at=void 0,Y=void 0,ot=S.scrollWidth,yt=S.scrollHeight,k=p(S),St=S.scrollLeft,J=S.scrollTop;S===l?(at=B<ot&&(k.overflowX==="auto"||k.overflowX==="scroll"||k.overflowX==="visible"),Y=M<yt&&(k.overflowY==="auto"||k.overflowY==="scroll"||k.overflowY==="visible")):(at=B<ot&&(k.overflowX==="auto"||k.overflowX==="scroll"),Y=M<yt&&(k.overflowY==="auto"||k.overflowY==="scroll"));var It=at&&(Math.abs(P-r)<=o&&St+B<ot)-(Math.abs(W-r)<=o&&!!St),q=Y&&(Math.abs(G-a)<=o&&J+M<yt)-(Math.abs(y-a)<=o&&!!J);if(!C[h])for(var st=0;st<=h;st++)C[st]||(C[st]={});(C[h].vx!=It||C[h].vy!=q||C[h].el!==S)&&(C[h].el=S,C[h].vx=It,C[h].vy=q,clearInterval(C[h].pid),(It!=0||q!=0)&&(c=!0,C[h].pid=setInterval((function(){i&&this.layer===0&&g.active._onTouchMove(Qt);var wt=C[this.layer].vy?C[this.layer].vy*s:0,tt=C[this.layer].vx?C[this.layer].vx*s:0;typeof d=="function"&&d.call(g.dragged.parentNode[$],tt,wt,n,Qt,C[this.layer].el)!=="continue"||ri(C[this.layer].el,tt,wt)}).bind({layer:h}),24))),h++}while(t.bubbleScroll&&v!==l&&(v=rt(v,!1)));we=c}},30),hi=function(t){var e=t.originalEvent,i=t.putSortable,r=t.dragEl,a=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var c=i||a;s();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,h=document.elementFromPoint(d.clientX,d.clientY);l(),c&&!c.el.contains(h)&&(o("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Oe(){}Oe.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=Et(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:hi};Z(Oe,{pluginName:"revertOnSpill"});function Fe(){}Fe.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:hi};Z(Fe,{pluginName:"removeOnSpill"});g.mount(new nn);g.mount(Fe,Oe);/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 16See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 17v3.3.3 */const ie=new Set,rn={ghostClass:"calcite-sortable--ghost",chosenClass:"calcite-sortable--chosen",dragClass:"calcite-sortable--drag",fallbackClass:"calcite-sortable--fallback"};function an(n){if(pi(n))return;fi(n),ie.add(n);const t="id",{group:e,handleSelector:i,dragSelector:r,sortDisabled:a}=n;n.sortable=g.create(n.el,{dataIdAttr:t,swapThreshold:.5,...rn,...!!r&&{draggable:r},...!!e&&{sort:!a,group:{name:e,...!!n.canPull&&{pull:(o,s,l,{newDraggableIndex:c,oldDraggableIndex:d})=>n.canPull({toEl:o.el,fromEl:s.el,dragEl:l,newIndex:c,oldIndex:d})},...!!n.canPut&&{put:(o,s,l,{newDraggableIndex:c,oldDraggableIndex:d})=>n.canPut({toEl:o.el,fromEl:s.el,dragEl:l,newIndex:c,oldIndex:d})}}},onMove:({from:o,dragged:s,to:l,related:c})=>{n.onDragMove&&n.onDragMove({fromEl:o,dragEl:s,toEl:l,relatedEl:c})},handle:i,filter:`${i}[disabled]`,onStart:({from:o,item:s,to:l,newDraggableIndex:c,oldDraggableIndex:d})=>
17{De.active=!0,on(),n.onDragStart({fromEl:o,dragEl:s,toEl:l,newIndex:c,oldIndex:d})},onEnd:({from:o,item:s,to:l,newDraggableIndex:c,oldDraggableIndex:d})=>{De.active=!1,sn(),n.onDragEnd({fromEl:o,dragEl:s,toEl:l,newIndex:c,oldIndex:d})},onSort:({from:o,item:s,to:l,newDraggableIndex:c,oldDraggableIndex:d})=>{n.onDragSort({fromEl:o,dragEl:s,toEl:l,newIndex:c,oldIndex:d})}})}function fi(n){var t;pi(n)||(ie.delete(n),(t=n.sortable)==null||t.destroy(),n.sortable=null)}const De={active:!1};function pi(n){return n.dragEnabled&&De.active}function on(){Array.from(ie).forEach(n=>n.onGlobalDragStart())}function sn(){Array.from(ie).forEach(n=>n.onGlobalDragEnd())}/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. 18See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. 19v3.3.3 */const V={container:"container",table:"table",scrim:"scrim",stack:"stack",tableContainer:"table-container",sticky:"sticky-pos",assistiveText:"assistive-text",containerHeight:"container-height"},pe={filterNoResults:"filter-no-results",filterActionsStart:"filter-actions-start",filterActionsEnd:"filter-actions-end"},ln=xe`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.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%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;
19inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.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}`,cn=`${me}, ${Ct}`,te=class te extends _e{constructor(){super(),this.dragSelector=Ct,this.focusableItems=[],this.handleSelector="calcite-sort-handle",this.listItems=[],this.listItemGroups=[],this.mutationObserver=Ei("mutation",()=>{this.willPerformFilter=!0,this.updateListItemsDebounced()}),this.cancelable=qe()(this),this.updateListItemsDebounced=Ze(this.updateListItems,Ue.nextTick),this.visibleItems=[],this.willFilterEmit=!1,this.willPerformFilter=!1,this.messages=Ve({blocking:!0}),this.focusSetter=Ke()(this),this.dataForFilter=[],this.hasFilterActionsEnd=!1,this.hasFilterActionsStart=!1,this.hasFilterNoResults=!1,this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.filterEnabled=!1,this.filteredData=[],this.filteredItems=[],this.interactionMode="interactive",this.loading=!1,this.displayMode="flat",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.sortDisabled=!1,this.calciteInternalListDefaultSlotChange=et({cancelable:!1}),this.calciteListChange=et({cancelable:!1}),this.calciteListDragEnd=et({cancelable:!1}),this.calciteListDragStart=et({cancelable:!1}),this.calciteListFilter=et({cancelable:!1}),this.calciteListMoveHalt=et({cancelable:!1}),this.calciteListOrderChange=et({cancelable:!1}),this.listen("calciteInternalListItemToggle",this.handleCalciteListItemToggle),this.listen("calciteInternalFocusPreviousItem",this.handleCalciteInternalFocusPreviousItem),this.listen("calciteInternalListItemActive",this.handleCalciteInternalListItemActive),this.listen("calciteListItemSelect",this.handleCalciteListItemSelect),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteListItemSortHandleBeforeOpen",this.updateListItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd),this.listen("calciteInternalListItemSelect",this.handleCalciteInternalListItemSelect),this.listen("calciteInternalListItemSelectMultiple",this.handleCalciteInternalListItemSelectMultiple),this.listen("calciteInternalListItemChange",this.handleCalciteInternalListItemChange),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListItemGroupDefaultSlotChange)}get hasActiveFilter(){return this.filterEnabled&&this.filterText&&this.filteredItems.length!==this.visibleItems.length}get showNoResultsContainer(){return this.filterEnabled&&this.filterText&&this.hasFilterNoResults&&this.visibleItems.length&&!this.filteredItems.length}async setFocus(t){return this.focusSetter(()=>this.filterEnabled?this.filterEl:this.focusableItems.find(e=>e.active),t)}emitOrderChangeEvent(t){this.calciteListOrderChange.emit(t)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.willPerformFilter=!0,this.updateListItemsDebounced(),this.setUpSorting(),this.setParentList(),this.setListItemGroups(),this.cancelable.add(this.updateListItemsDebounced)}async load(){this.handleInteractionModeWarning()}willUpdate(t){(t.has("filterText")||t.has("filterProps")||t.has("filterPredicate"))&&this.performFilter(),(t.has("filterEnabled")&&(this.hasUpdated||this.filterEnabled!==!1)||t.has("group")||t.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1)||t.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||t.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon")||t.has("displayMode")&&this.hasUpdated||t.has("scale")&&this.hasUpdated||t.has("canPull")&&this.hasUpdated||t.has("canPut")&&this.hasUpdated||t.has("filterPredicate")&&this.hasUpdated)&&this.handleListItemChange()}updated(){je(this)}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),fi(this)}updateListItems(){this.updateGroupItems();const{selectionAppearance:t,selectionMode:e,interactionMode:i,dragEnabled:r,el:a,filterEl:o,displayMode:s,scale:l,sortDisabled:c,sortHandleMenuItems:d}=this,h=Array.from(this.el.querySelectorAll(Ct)),v=a,S=Array.from(v.children).filter(Ht);
19if(h.forEach(f=>{f.scale=l,f.selectionAppearance=t,f.selectionMode=e,f.interactionMode=i,f.closest(ne)===a&&(f.moveToItems=d.filter(y=>this.validateSortMenuItem({type:"move",fromEl:v,toEl:y.element,dragEl:f,newIndex:0,oldIndex:S.indexOf(f)})),f.addToItems=this.sortHandleMenuItems.filter(y=>this.validateSortMenuItem({type:"add",fromEl:v,toEl:y.element,dragEl:f,newIndex:0,oldIndex:S.indexOf(f)})),f.dragHandle=r,f.displayMode=s,f.sortDisabled=c)}),this.parentListEl){this.setUpSorting();return}this.listItems=h,this.filterEnabled&&this.willPerformFilter&&(this.willPerformFilter=!1,this.dataForFilter=this.getItemData(),o&&(o.items=this.dataForFilter,this.filterAndUpdateData())),this.visibleItems=this.listItems.filter(f=>!f.closed&&!f.hidden),this.updateFilteredItems(),this.borderItems(),this.focusableItems=this.filteredItems.filter(f=>!f.disabled),this.setActiveListItem(),this.updateSelectedItems(),this.setUpSorting()}handleListItemChange(){this.willPerformFilter=!0,this.updateListItemsDebounced()}handleCalciteListItemToggle(t){this.parentListEl||(t.stopPropagation(),this.borderItems())}handleCalciteInternalFocusPreviousItem(t){if(this.parentListEl)return;t.stopPropagation();const{focusableItems:e}=this,r=e.findIndex(a=>a.active)-1;e[r]&&this.focusRow(e[r])}handleCalciteInternalListItemActive(t){if(this.parentListEl)return;t.stopPropagation();const e=t.target,{listItems:i}=this;i.forEach(r=>{r.active=r===e})}handleCalciteListItemSelect(){this.parentListEl||this.updateSelectedItems(!0)}handleCalciteInternalAssistiveTextChange(t){this.assistiveText=t.detail.message,t.stopPropagation()}handleSortReorder(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleReorder(t))}handleSortAdd(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleAdd(t))}handleSortMove(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleMove(t))}handleCalciteInternalListItemSelect(t){if(this.parentListEl)return;t.stopPropagation();const e=t.target,{listItems:i,selectionMode:r}=this;e.selected&&(r==="single"||r==="single-persist")&&i.forEach(a=>a.selected=a===e),this.updateSelectedItems()}handleCalciteInternalListItemSelectMultiple(t){if(this.parentListEl)return;t.stopPropagation();const{target:e,detail:i}=t,{focusableItems:r,lastSelectedInfo:a}=this,o=e;if(i.selectMultiple&&a){const s=r.indexOf(o),l=r.indexOf(a.selectedItem),c=Math.min(l,s),d=Math.max(l,s);r.slice(c,d+1).forEach(h=>h.selected=a.selected)}else this.lastSelectedInfo={selectedItem:o,selected:o.selected}}handleCalciteInternalListItemChange(t){this.parentListEl||(t.stopPropagation(),this.updateListItemsDebounced())}handleCalciteInternalListItemGroupDefaultSlotChange(t){t.stopPropagation()}connectObserver(){var t;(t=this.mutationObserver)==null||t.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){var t;(t=this.mutationObserver)==null||t.disconnect()}setUpSorting(){const{dragEnabled:t,defaultSlotEl:e}=this;t&&(e&&yi(e),an(this))}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(t){this.calciteListDragEnd.emit(t)}onDragStart(t){t.dragEl.sortHandleOpen=!1,this.calciteListDragStart.emit(t)}onDragSort(t){this.setParentList(),this.updateListItemsDebounced(),this.calciteListOrderChange.emit(t)}setParentList(){var t;this.parentListEl=(t=this.el.parentElement)==null?void 0:t.closest(ne)}handleDefaultSlotChange(){this.parentListEl&&this.calciteInternalListDefaultSlotChange.emit()}setListItemGroups(){this.listItemGroups=Array.from(this.el.querySelectorAll(me))}handleFilterActionsStartSlotChange(t){this.hasFilterActionsStart=ut(t)}handleFilterActionsEndSlotChange(t){this.hasFilterActionsEnd=ut(t)}handleFilterNoResultsSlotChange(t){this.hasFilterNoResults=ut(t)}setActiveListItem(){const{focusableItems:t}=this;t.some(e=>e.active)||t[0]&&(t[0].active=!0)}async updateSelectedItems(t=!1){await this.updateComplete,this.selectedItems=this.visibleItems.filter(e=>e.selected),t&&this.calciteListChange.emit()}filterElements({el:t,filteredItems:e,visibleParents:i}){const r=!i.has(t)&&!e.includes(t);t.filterHidden=r;const a=t.parentElement.closest(cn);a&&(r||i.add(a),this.filterElements({el:a,filteredItems:e,visibleParents:i}))}allParentListItemsExpanded(t){var i;const e=(i=t.parentElement)==null?void 0:i.closest(Ct);if(e){if(!e.expanded)return!1}else return!0;return this.allParentListItemsExpanded(e)}borderItems(){const t=this.visibleItems.filter(e=>!e.filterHidden&&this.allParentListItemsExpanded(e));
19t.forEach(e=>e.bordered=e!==t[t.length-1])}updateFilteredItems(){const{visibleItems:t,filteredData:e,filterText:i,filterPredicate:r}=this,a=t==null?void 0:t.filter(l=>t.every(c=>c===l||!l.contains(c))),o=r?t.filter(r):i?e.map(l=>l.el):t||[],s=new WeakSet;a.forEach(l=>this.filterElements({el:l,filteredItems:o,visibleParents:s})),this.filteredItems=o,this.willFilterEmit&&(this.willFilterEmit=!1,this.calciteListFilter.emit())}updateFilteredData(){const{filterEl:t}=this;t&&(t.filteredItems&&(this.filteredData=t.filteredItems),this.updateListItemsDebounced())}async filterAndUpdateData(){var t;await((t=this.filterEl)==null?void 0:t.filter(this.filterText)),this.updateFilteredData()}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(t=>t!=="el"):["description","label","metadata","heading"]}performFilter(){const{filterEl:t,filterText:e,effectiveFilterProps:i}=this;t&&(t.value=e,t.filterProps=i,this.filterAndUpdateData())}setDefaultSlotEl(t){this.defaultSlotEl=t}setFilterEl(t){this.filterEl=t,this.performFilter()}handleFilterChange(t){t.stopPropagation();const{value:e}=t.currentTarget;this.filterText=e,this.willFilterEmit=!0,this.updateFilteredData()}getItemData(){return this.listItems.map(t=>({label:t.label,description:t.description,metadata:t.metadata,heading:this.getGroupHeading(t),el:t}))}getGroupHeading(t){return this.listItemGroups.filter(i=>i.contains(t)).map(i=>i.heading)}updateGroupItems(){const{el:t,group:e,scale:i}=this,r=vi(t),a=e?Array.from(r.querySelectorAll(`${ne}[group="${e}"]`)).filter(s=>!s.disabled&&s.dragEnabled):[];this.sortHandleMenuItems=a.map(s=>({element:s,label:s.label??s.id,id:Si()})),Array.from(this.el.querySelectorAll(me)).forEach(s=>{s.scale=i})}focusRow(t){const{focusableItems:e}=this;t&&(e.forEach(i=>i.active=i===t),t.setFocus())}isNavigable(t){var i;const e=(i=t.parentElement)==null?void 0:i.closest(Ct);return e?e.expanded&&this.isNavigable(e):!0}handleListKeydown(t){if(t.defaultPrevented||this.parentListEl)return;const{key:e}=t,i=this.focusableItems.filter(a=>this.isNavigable(a)),r=i.findIndex(a=>a.active);if(e==="ArrowDown"){t.preventDefault();const a=t.target===this.filterEl?0:r+1;i[a]&&this.focusRow(i[a])}else if(e==="ArrowUp"){if(t.preventDefault(),r===0&&this.filterEnabled){this.filterEl.setFocus();return}const a=r-1;i[a]&&this.focusRow(i[a])}else if(e==="Home"){t.preventDefault();const a=i[0];a&&this.focusRow(a)}else if(e==="End"){t.preventDefault();const a=i[i.length-1];a&&this.focusRow(a)}}handleInteractionModeWarning(){this.interactionMode==="static"&&this.selectionMode!=="none"&&this.selectionAppearance==="border"&&console.warn('selection-appearance="border" requires interaction-mode="interactive"')}validateSortMenuItem({fromEl:t,toEl:e,dragEl:i,newIndex:r,oldIndex:a,type:o}){var c,d;if(!t||!e||e===t||i.contains(e))return!1;const s=((c=t.canPull)==null?void 0:c.call(t,{toEl:e,fromEl:t,dragEl:i,newIndex:r,oldIndex:a}))??!0,l=((d=e.canPut)==null?void 0:d.call(e,{toEl:e,fromEl:t,dragEl:i,newIndex:r,oldIndex:a}))??!0;return(o==="add"?s==="clone":s===!0)&&l}handleAdd(t){const{addTo:e}=t.detail,i=t.target,r=i==null?void 0:i.parentElement,a=e.element,s=Array.from(r.children).filter(Ht).indexOf(i),l=0;if(!this.validateSortMenuItem({type:"add",fromEl:r,toEl:a,dragEl:i,newIndex:l,oldIndex:s}))return;i.sortHandleOpen=!1,this.disconnectObserver();const c=i.cloneNode();a.prepend(c),Me(i),this.updateListItemsDebounced(),this.connectObserver();const d={dragEl:i,fromEl:r,toEl:a,newIndex:l,oldIndex:s};this.calciteListOrderChange.emit(d),a.emitOrderChangeEvent(d)}handleMove(t){const{moveTo:e}=t.detail,i=t.target,r=i==null?void 0:i.parentElement,a=e.element,s=Array.from(r.children).filter(Ht).indexOf(i),l=0;if(!this.validateSortMenuItem({type:"move",fromEl:r,toEl:a,dragEl:i,newIndex:l,oldIndex:s}))return;i.sortHandleOpen=!1,this.disconnectObserver(),a.prepend(i),Me(i),this.updateListItemsDebounced(),this.connectObserver();const c={dragEl:i,fromEl:r,toEl:a,newIndex:l,oldIndex:s};this.calciteListOrderChange.emit(c),a.emitOrderChangeEvent(c)}handleReorder(t){const{reorder:e}=t.detail,i=t.target,r=i==null?void 0:i.parentElement;if(!r)return;i.sortHandleOpen=!1;const a=Array.from(r.children).filter(Ht),o=a.length-1,s=a.indexOf(i);let l=s;switch(e){case"top":l=0;break;case"bottom":l=o;break;case"up":l=s===0?0:s-1;break;case"down":l=s===o?o:s+1;break}this.disconnectObserver();const c=e==="up"||e==="top"?a[l]:a[l].nextSibling;r.insertBefore(i,c),this.updateListItemsDebounced(),this.connectObserver(),this.calciteListOrderChange.emit({dragEl:i,fromEl:r,toEl:r,
19newIndex:l,oldIndex:s})}render(){const{loading:t,label:e,disabled:i,dataForFilter:r,filterEnabled:a,filterPlaceholder:o,filterText:s,filterLabel:l,hasFilterActionsStart:c,hasFilterActionsEnd:d,effectiveFilterProps:h}=this;return We({disabled:this.disabled,children:T`<div class=${F({[V.container]:!0,[V.containerHeight]:this.listItems.length<1&&t})}>${this.dragEnabled?T`<span aria-live=assertive class=${F(V.assistiveText)}>${this.assistiveText}</span>`:null}${this.renderItemAriaLive()}${t?T`<calcite-scrim class=${F(V.scrim)} .loading=${t}></calcite-scrim>`:null}<div .ariaBusy=${t} .ariaLabel=${e||""} class=${F(V.table)} @keydown=${this.handleListKeydown} role=treegrid>${a||c||d?T`<div class=${F(V.sticky)} role=rowgroup><div role=row><div role=columnheader><calcite-stack class=${F(V.stack)}><slot name=${pe.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${mt.actionsStart}></slot><calcite-filter .ariaLabel=${o} .disabled=${i} .filterProps=${h} .items=${r} .label=${l} @calciteFilterChange=${this.handleFilterChange} .placeholder=${o} .scale=${this.scale} .value=${s} ${ge(this.setFilterEl)}></calcite-filter><slot name=${pe.filterActionsEnd} @slotchange=${this.handleFilterActionsEndSlotChange} slot=${mt.actionsEnd}></slot></calcite-stack></div></div></div>`:null}<div class=${F(V.tableContainer)} role=rowgroup><slot @slotchange=${this.handleDefaultSlotChange} ${ge(this.setDefaultSlotEl)}></slot></div></div><div aria-live=polite data-test-id=no-results-container .hidden=${!this.showNoResultsContainer}><slot name=${pe.filterNoResults} @slotchange=${this.handleFilterNoResultsSlotChange}></slot></div></div>`})}renderItemAriaLive(){const{messages:t,filteredItems:e,parentListEl:i,messages:{_lang:r},numberingSystem:a}=this;return $e.numberFormatOptions={locale:r,numberingSystem:a},i?null:T`<div aria-live=polite class=${F(V.assistiveText)}>${this.hasActiveFilter?Tt("aria-filter-enabled",T`<div>${t.filterEnabled}</div>`):null}${Tt("aria-item-count",T`<div>${t.total.replace("{count}",$e.localize(e.length.toString()))}</div>`)}${e.length?Tt("aria-item-list",T`<ol>${e.map(o=>T`<li>${o.label}</li>`)}</ol>`):null}</div>`}};te.properties={assistiveText:[16,{},{state:!0}],dataForFilter:[16,{},{state:!0}],hasFilterActionsEnd:[16,{},{state:!0}],hasFilterActionsStart:[16,{},{state:!0}],hasFilterNoResults:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],filterEnabled:[7,{},{reflect:!0,type:Boolean}],filterPredicate:[0,{},{attribute:!1}],filterLabel:[3,{},{reflect:!0}],filterPlaceholder:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filterText:[3,{},{reflect:!0}],filteredData:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],group:[3,{},{reflect:!0}],interactionMode:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],numberingSystem:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]},te.styles=ln;let Ce=te;Ae("calcite-list",Ce);export{Ce as List};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.