@kong/kongponents 9.36.5 → 9.36.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/kongponents.es.js
CHANGED
|
@@ -27018,7 +27018,7 @@ const VY = {
|
|
|
27018
27018
|
})), Ie = w(() => ue.value ? "loading" : Je.value ? "error" : "success"), { debouncedFn: Te } = u(Qe, 500), He = ({ sortColumnKey: ie, prevKey: Fe, sortColumnOrder: _ }) => {
|
|
27019
27019
|
var G;
|
|
27020
27020
|
S.value = !0;
|
|
27021
|
-
const ce = v.value.find((D) => D.key === ie), { useSortHandlerFunction: Ee } = ce;
|
|
27021
|
+
const ce = v.value.find((D) => D.key === ie) || {}, { useSortHandlerFunction: Ee } = ce;
|
|
27022
27022
|
if (i("sort", {
|
|
27023
27023
|
prevKey: Fe,
|
|
27024
27024
|
sortColumnKey: ie,
|
package/dist/kongponents.umd.js
CHANGED
|
@@ -39,4 +39,4 @@ Docs: https://kongponents.konghq.com/components/table-data.html`),P()}),(M,U)=>(
|
|
|
39
39
|
* @author RubaXa <trash@rubaxa.org>
|
|
40
40
|
* @author owenm <owen23355@gmail.com>
|
|
41
41
|
* @license MIT
|
|
42
|
-
*/function y1(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function un(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?y1(Object(r),!0).forEach(function(a){nR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function rl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rl=function(n){return typeof n}:rl=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rl(e)}function nR(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Nn(){return Nn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Nn.apply(this,arguments)}function rR(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,i;for(i=0;i<a.length;i++)o=a[i],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}function aR(e,n){if(e==null)return{};var r=rR(e,n),a,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)a=i[o],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var oR="1.14.0";function xn(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Mn=xn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ga=xn(/Edge/i),b1=xn(/firefox/i),Qa=xn(/safari/i)&&!xn(/chrome/i)&&!xn(/android/i),v1=xn(/iP(ad|od|hone)/i),iR=xn(/chrome/i)&&xn(/android/i),w1={capture:!1,passive:!1};function Pe(e,n,r){e.addEventListener(n,r,!Mn&&w1)}function Ne(e,n,r){e.removeEventListener(n,r,!Mn&&w1)}function al(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function lR(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function fn(e,n,r,a){if(e){r=r||document;do{if(n!=null&&(n[0]===">"?e.parentNode===r&&al(e,n):al(e,n))||a&&e===r)return e;if(e===r)break}while(e=lR(e))}return null}var k1=/\s+/g;function Dt(e,n,r){if(e&&n)if(e.classList)e.classList[r?"add":"remove"](n);else{var a=(" "+e.className+" ").replace(k1," ").replace(" "+n+" "," ");e.className=(a+(r?" "+n:"")).replace(k1," ")}}function be(e,n,r){var a=e&&e.style;if(a){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),n===void 0?r:r[n];!(n in a)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),a[n]=r+(typeof r=="string"?"":"px")}}function sa(e,n){var r="";if(typeof e=="string")r=e;else do{var a=be(e,"transform");a&&a!=="none"&&(r=a+" "+r)}while(!n&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function C1(e,n,r){if(e){var a=e.getElementsByTagName(n),o=0,i=a.length;if(r)for(;o<i;o++)r(a[o],o);return a}return[]}function pn(){var e=document.scrollingElement;return e||document.documentElement}function tt(e,n,r,a,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,l,d,c,s,u,f;if(e!==window&&e.parentNode&&e!==pn()?(i=e.getBoundingClientRect(),l=i.top,d=i.left,c=i.bottom,s=i.right,u=i.height,f=i.width):(l=0,d=0,c=window.innerHeight,s=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(n||r)&&e!==window&&(o=o||e.parentNode,!Mn))do if(o&&o.getBoundingClientRect&&(be(o,"transform")!=="none"||r&&be(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(be(o,"border-top-width")),d-=p.left+parseInt(be(o,"border-left-width")),c=l+i.height,s=d+i.width;break}while(o=o.parentNode);if(a&&e!==window){var m=sa(o||e),y=m&&m.a,b=m&&m.d;m&&(l/=b,d/=y,f/=y,u/=b,c=l+u,s=d+f)}return{top:l,left:d,bottom:c,right:s,width:f,height:u}}}function S1(e,n,r){for(var a=Zn(e,!0),o=tt(e)[n];a;){var i=tt(a)[r],l=void 0;if(l=o>=i,!l)return a;if(a===pn())break;a=Zn(a,!1)}return!1}function ca(e,n,r,a){for(var o=0,i=0,l=e.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==ve.ghost&&(a||l[i]!==ve.dragged)&&fn(l[i],r.draggable,e,!1)){if(o===n)return l[i];o++}i++}return null}function Bc(e,n){for(var r=e.lastElementChild;r&&(r===ve.ghost||be(r,"display")==="none"||n&&!al(r,n));)r=r.previousElementSibling;return r||null}function zt(e,n){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ve.clone&&(!n||al(e,n))&&r++;return r}function $1(e){var n=0,r=0,a=pn();if(e)do{var o=sa(e),i=o.a,l=o.d;n+=e.scrollLeft*i,r+=e.scrollTop*l}while(e!==a&&(e=e.parentNode));return[n,r]}function sR(e,n){for(var r in e)if(e.hasOwnProperty(r)){for(var a in n)if(n.hasOwnProperty(a)&&n[a]===e[r][a])return Number(r)}return-1}function Zn(e,n){if(!e||!e.getBoundingClientRect)return pn();var r=e,a=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var o=be(r);if(r.clientWidth<r.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return pn();if(a||n)return r;a=!0}}while(r=r.parentNode);return pn()}function cR(e,n){if(e&&n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function Dc(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var Za;function E1(e,n){return function(){if(!Za){var r=arguments,a=this;r.length===1?e.call(a,r[0]):e.apply(a,r),Za=setTimeout(function(){Za=void 0},n)}}}function dR(){clearTimeout(Za),Za=void 0}function B1(e,n,r){e.scrollLeft+=n,e.scrollTop+=r}function D1(e){var n=window.Polymer,r=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var Tt="Sortable"+new Date().getTime();function uR(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var a=[].slice.call(this.el.children);a.forEach(function(o){if(!(be(o,"display")==="none"||o===ve.ghost)){e.push({target:o,rect:tt(o)});var i=un({},e[e.length-1].rect);if(o.thisAnimationDuration){var l=sa(o,!0);l&&(i.top-=l.f,i.left-=l.e)}o.fromRect=i}})}},addAnimationState:function(a){e.push(a)},removeAnimationState:function(a){e.splice(sR(e,{target:a}),1)},animateAll:function(a){var o=this;if(!this.options.animation){clearTimeout(n),typeof a=="function"&&a();return}var i=!1,l=0;e.forEach(function(d){var c=0,s=d.target,u=s.fromRect,f=tt(s),p=s.prevFromRect,m=s.prevToRect,y=d.rect,b=sa(s,!0);b&&(f.top-=b.f,f.left-=b.e),s.toRect=f,s.thisAnimationDuration&&Dc(p,f)&&!Dc(u,f)&&(y.top-f.top)/(y.left-f.left)===(u.top-f.top)/(u.left-f.left)&&(c=pR(y,p,m,o.options)),Dc(f,u)||(s.prevFromRect=u,s.prevToRect=f,c||(c=o.options.animation),o.animate(s,y,f,c)),c&&(i=!0,l=Math.max(l,c),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},c),s.thisAnimationDuration=c)}),clearTimeout(n),i?n=setTimeout(function(){typeof a=="function"&&a()},l):typeof a=="function"&&a(),e=[]},animate:function(a,o,i,l){if(l){be(a,"transition",""),be(a,"transform","");var d=sa(this.el),c=d&&d.a,s=d&&d.d,u=(o.left-i.left)/(c||1),f=(o.top-i.top)/(s||1);a.animatingX=!!u,a.animatingY=!!f,be(a,"transform","translate3d("+u+"px,"+f+"px,0)"),this.forRepaintDummy=fR(a),be(a,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),be(a,"transform","translate3d(0,0,0)"),typeof a.animated=="number"&&clearTimeout(a.animated),a.animated=setTimeout(function(){be(a,"transition",""),be(a,"transform",""),a.animated=!1,a.animatingX=!1,a.animatingY=!1},l)}}}}function fR(e){return e.offsetWidth}function pR(e,n,r,a){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))*a.animation}var da=[],Tc={initializeByDefault:!0},Xa={mount:function(n){for(var r in Tc)Tc.hasOwnProperty(r)&&!(r in n)&&(n[r]=Tc[r]);da.forEach(function(a){if(a.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),da.push(n)},pluginEvent:function(n,r,a){var o=this;this.eventCanceled=!1,a.cancel=function(){o.eventCanceled=!0};var i=n+"Global";da.forEach(function(l){r[l.pluginName]&&(r[l.pluginName][i]&&r[l.pluginName][i](un({sortable:r},a)),r.options[l.pluginName]&&r[l.pluginName][n]&&r[l.pluginName][n](un({sortable:r},a)))})},initializePlugins:function(n,r,a,o){da.forEach(function(d){var c=d.pluginName;if(!(!n.options[c]&&!d.initializeByDefault)){var s=new d(n,r,n.options);s.sortable=n,s.options=n.options,n[c]=s,Nn(a,s.defaults)}});for(var i in n.options)if(n.options.hasOwnProperty(i)){var l=this.modifyOption(n,i,n.options[i]);typeof l<"u"&&(n.options[i]=l)}},getEventProperties:function(n,r){var a={};return da.forEach(function(o){typeof o.eventProperties=="function"&&Nn(a,o.eventProperties.call(r[o.pluginName],n))}),a},modifyOption:function(n,r,a){var o;return da.forEach(function(i){n[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[r]=="function"&&(o=i.optionListeners[r].call(n[i.pluginName],a))}),o}};function mR(e){var n=e.sortable,r=e.rootEl,a=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,d=e.fromEl,c=e.oldIndex,s=e.newIndex,u=e.oldDraggableIndex,f=e.newDraggableIndex,p=e.originalEvent,m=e.putSortable,y=e.extraEventProperties;if(n=n||r&&r[Tt],!!n){var b,h=n.options,g="on"+a.charAt(0).toUpperCase()+a.substr(1);window.CustomEvent&&!Mn&&!Ga?b=new CustomEvent(a,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(a,!0,!0)),b.to=l||r,b.from=d||r,b.item=o||r,b.clone=i,b.oldIndex=c,b.newIndex=s,b.oldDraggableIndex=u,b.newDraggableIndex=f,b.originalEvent=p,b.pullMode=m?m.lastPutMode:void 0;var v=un(un({},y),Xa.getEventProperties(a,n));for(var w in v)b[w]=v[w];r&&r.dispatchEvent(b),h[g]&&h[g].call(n,b)}}var hR=["evt"],vt=function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.evt,i=aR(a,hR);Xa.pluginEvent.bind(ve)(n,r,un({dragEl:ae,parentEl:Ge,ghostEl:Ce,rootEl:Ke,nextEl:Dr,lastDownEl:ol,cloneEl:Qe,cloneHidden:Xn,dragStarted:eo,putSortable:ot,activeSortable:ve.active,originalEvent:o,oldIndex:ua,oldDraggableIndex:Ja,newIndex:Nt,newDraggableIndex:Jn,hideGhostForTarget:O1,unhideGhostForTarget:P1,cloneNowHidden:function(){Xn=!0},cloneNowShown:function(){Xn=!1},dispatchSortableEvent:function(d){gt({sortable:r,name:d,originalEvent:o})}},i))};function gt(e){mR(un({putSortable:ot,cloneEl:Qe,targetEl:ae,rootEl:Ke,oldIndex:ua,oldDraggableIndex:Ja,newIndex:Nt,newDraggableIndex:Jn},e))}var ae,Ge,Ce,Ke,Dr,ol,Qe,Xn,ua,Nt,Ja,Jn,il,ot,fa=!1,ll=!1,sl=[],Tr,jt,Nc,xc,T1,N1,eo,pa,to,no=!1,cl=!1,dl,ct,Mc=[],Ac=!1,ul=[],fl=typeof document<"u",pl=v1,x1=Ga||Mn?"cssFloat":"float",gR=fl&&!iR&&!v1&&"draggable"in document.createElement("div"),M1=function(){if(fl){if(Mn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),A1=function(n,r){var a=be(n),o=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=ca(n,0,r),l=ca(n,1,r),d=i&&be(i),c=l&&be(l),s=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+tt(i).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+tt(l).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&d.float&&d.float!=="none"){var f=d.float==="left"?"left":"right";return l&&(c.clear==="both"||c.clear===f)?"vertical":"horizontal"}return i&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||s>=o&&a[x1]==="none"||l&&a[x1]==="none"&&s+u>o)?"vertical":"horizontal"},yR=function(n,r,a){var o=a?n.left:n.top,i=a?n.right:n.bottom,l=a?n.width:n.height,d=a?r.left:r.top,c=a?r.right:r.bottom,s=a?r.width:r.height;return o===d||i===c||o+l/2===d+s/2},bR=function(n,r){var a;return sl.some(function(o){var i=o[Tt].options.emptyInsertThreshold;if(!(!i||Bc(o))){var l=tt(o),d=n>=l.left-i&&n<=l.right+i,c=r>=l.top-i&&r<=l.bottom+i;if(d&&c)return a=o}}),a},I1=function(n){function r(i,l){return function(d,c,s,u){var f=d.options.group.name&&c.options.group.name&&d.options.group.name===c.options.group.name;if(i==null&&(l||f))return!0;if(i==null||i===!1)return!1;if(l&&i==="clone")return i;if(typeof i=="function")return r(i(d,c,s,u),l)(d,c,s,u);var p=(l?d:c).options.group.name;return i===!0||typeof i=="string"&&i===p||i.join&&i.indexOf(p)>-1}}var a={},o=n.group;(!o||rl(o)!="object")&&(o={name:o}),a.name=o.name,a.checkPull=r(o.pull,!0),a.checkPut=r(o.put),a.revertClone=o.revertClone,n.group=a},O1=function(){!M1&&Ce&&be(Ce,"display","none")},P1=function(){!M1&&Ce&&be(Ce,"display","")};fl&&document.addEventListener("click",function(e){if(ll)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ll=!1,!1},!0);var Nr=function(n){if(ae){n=n.touches?n.touches[0]:n;var r=bR(n.clientX,n.clientY);if(r){var a={};for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);a.target=a.rootEl=r,a.preventDefault=void 0,a.stopPropagation=void 0,r[Tt]._onDragOver(a)}}},vR=function(n){ae&&ae.parentNode[Tt]._isOutsideThisEl(n.target)};function ve(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=Nn({},n),e[Tt]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return A1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:ve.supportPointer!==!1&&"PointerEvent"in window&&!Qa,emptyInsertThreshold:5};Xa.initializePlugins(this,e,r);for(var a in r)!(a in n)&&(n[a]=r[a]);I1(n);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=n.forceFallback?!1:gR,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Pe(e,"pointerdown",this._onTapStart):(Pe(e,"mousedown",this._onTapStart),Pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Pe(e,"dragover",this),Pe(e,"dragenter",this)),sl.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Nn(this,uR())}ve.prototype={constructor:ve,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(pa=null)},_getDirection:function(n,r){return typeof this.options.direction=="function"?this.options.direction.call(this,n,r,ae):this.options.direction},_onTapStart:function(n){if(n.cancelable){var r=this,a=this.el,o=this.options,i=o.preventOnFilter,l=n.type,d=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(d||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=o.filter;if(DR(a),!ae&&!(/mousedown|pointerdown/.test(l)&&n.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Qa&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=fn(c,o.draggable,a,!1),!(c&&c.animated)&&ol!==c)){if(ua=zt(c),Ja=zt(c,o.draggable),typeof u=="function"){if(u.call(this,n,c,this)){gt({sortable:r,rootEl:s,name:"filter",targetEl:c,toEl:a,fromEl:a}),vt("filter",r,{evt:n}),i&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=fn(s,f.trim(),a,!1),f)return gt({sortable:r,rootEl:f,name:"filter",targetEl:c,fromEl:a,toEl:a}),vt("filter",r,{evt:n}),!0}),u)){i&&n.cancelable&&n.preventDefault();return}o.handle&&!fn(s,o.handle,a,!1)||this._prepareDragStart(n,d,c)}}},_prepareDragStart:function(n,r,a){var o=this,i=o.el,l=o.options,d=i.ownerDocument,c;if(a&&!ae&&a.parentNode===i){var s=tt(a);if(Ke=i,ae=a,Ge=ae.parentNode,Dr=ae.nextSibling,ol=a,il=l.group,ve.dragged=ae,Tr={target:ae,clientX:(r||n).clientX,clientY:(r||n).clientY},T1=Tr.clientX-s.left,N1=Tr.clientY-s.top,this._lastX=(r||n).clientX,this._lastY=(r||n).clientY,ae.style["will-change"]="all",c=function(){if(vt("delayEnded",o,{evt:n}),ve.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!b1&&o.nativeDraggable&&(ae.draggable=!0),o._triggerDragStart(n,r),gt({sortable:o,name:"choose",originalEvent:n}),Dt(ae,l.chosenClass,!0)},l.ignore.split(",").forEach(function(u){C1(ae,u.trim(),Ic)}),Pe(d,"dragover",Nr),Pe(d,"mousemove",Nr),Pe(d,"touchmove",Nr),Pe(d,"mouseup",o._onDrop),Pe(d,"touchend",o._onDrop),Pe(d,"touchcancel",o._onDrop),b1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ae.draggable=!0),vt("delayStart",this,{evt:n}),l.delay&&(!l.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(Ga||Mn))){if(ve.eventCanceled){this._onDrop();return}Pe(d,"mouseup",o._disableDelayedDrag),Pe(d,"touchend",o._disableDelayedDrag),Pe(d,"touchcancel",o._disableDelayedDrag),Pe(d,"mousemove",o._delayedDragTouchMoveHandler),Pe(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Pe(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(c,l.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var r=n.touches?n.touches[0]:n;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ae&&Ic(ae),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Ne(n,"mouseup",this._disableDelayedDrag),Ne(n,"touchend",this._disableDelayedDrag),Ne(n,"touchcancel",this._disableDelayedDrag),Ne(n,"mousemove",this._delayedDragTouchMoveHandler),Ne(n,"touchmove",this._delayedDragTouchMoveHandler),Ne(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,r){r=r||n.pointerType=="touch"&&n,!this.nativeDraggable||r?this.options.supportPointer?Pe(document,"pointermove",this._onTouchMove):r?Pe(document,"touchmove",this._onTouchMove):Pe(document,"mousemove",this._onTouchMove):(Pe(ae,"dragend",this),Pe(Ke,"dragstart",this._onDragStart));try{document.selection?hl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,r){if(fa=!1,Ke&&ae){vt("dragStarted",this,{evt:r}),this.nativeDraggable&&Pe(document,"dragover",vR);var a=this.options;!n&&Dt(ae,a.dragClass,!1),Dt(ae,a.ghostClass,!0),ve.active=this,n&&this._appendGhost(),gt({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(jt){this._lastX=jt.clientX,this._lastY=jt.clientY,O1();for(var n=document.elementFromPoint(jt.clientX,jt.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(jt.clientX,jt.clientY),n!==r);)r=n;if(ae.parentNode[Tt]._isOutsideThisEl(n),r)do{if(r[Tt]){var a=void 0;if(a=r[Tt]._onDragOver({clientX:jt.clientX,clientY:jt.clientY,target:n,rootEl:r}),a&&!this.options.dragoverBubble)break}n=r}while(r=r.parentNode);P1()}},_onTouchMove:function(n){if(Tr){var r=this.options,a=r.fallbackTolerance,o=r.fallbackOffset,i=n.touches?n.touches[0]:n,l=Ce&&sa(Ce,!0),d=Ce&&l&&l.a,c=Ce&&l&&l.d,s=pl&&ct&&$1(ct),u=(i.clientX-Tr.clientX+o.x)/(d||1)+(s?s[0]-Mc[0]:0)/(d||1),f=(i.clientY-Tr.clientY+o.y)/(c||1)+(s?s[1]-Mc[1]:0)/(c||1);if(!ve.active&&!fa){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<a)return;this._onDragStart(n,!0)}if(Ce){l?(l.e+=u-(Nc||0),l.f+=f-(xc||0)):l={a:1,b:0,c:0,d:1,e:u,f};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");be(Ce,"webkitTransform",p),be(Ce,"mozTransform",p),be(Ce,"msTransform",p),be(Ce,"transform",p),Nc=u,xc=f,jt=i}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!Ce){var n=this.options.fallbackOnBody?document.body:Ke,r=tt(ae,!0,pl,!0,n),a=this.options;if(pl){for(ct=n;be(ct,"position")==="static"&&be(ct,"transform")==="none"&&ct!==document;)ct=ct.parentNode;ct!==document.body&&ct!==document.documentElement?(ct===document&&(ct=pn()),r.top+=ct.scrollTop,r.left+=ct.scrollLeft):ct=pn(),Mc=$1(ct)}Ce=ae.cloneNode(!0),Dt(Ce,a.ghostClass,!1),Dt(Ce,a.fallbackClass,!0),Dt(Ce,a.dragClass,!0),be(Ce,"transition",""),be(Ce,"transform",""),be(Ce,"box-sizing","border-box"),be(Ce,"margin",0),be(Ce,"top",r.top),be(Ce,"left",r.left),be(Ce,"width",r.width),be(Ce,"height",r.height),be(Ce,"opacity","0.8"),be(Ce,"position",pl?"absolute":"fixed"),be(Ce,"zIndex","100000"),be(Ce,"pointerEvents","none"),ve.ghost=Ce,n.appendChild(Ce),be(Ce,"transform-origin",T1/parseInt(Ce.style.width)*100+"% "+N1/parseInt(Ce.style.height)*100+"%")}},_onDragStart:function(n,r){var a=this,o=n.dataTransfer,i=a.options;if(vt("dragStart",this,{evt:n}),ve.eventCanceled){this._onDrop();return}vt("setupClone",this),ve.eventCanceled||(Qe=D1(ae),Qe.draggable=!1,Qe.style["will-change"]="",this._hideClone(),Dt(Qe,this.options.chosenClass,!1),ve.clone=Qe),a.cloneId=hl(function(){vt("clone",a),!ve.eventCanceled&&(a.options.removeCloneOnHide||Ke.insertBefore(Qe,ae),a._hideClone(),gt({sortable:a,name:"clone"}))}),!r&&Dt(ae,i.dragClass,!0),r?(ll=!0,a._loopId=setInterval(a._emulateDragOver,50)):(Ne(document,"mouseup",a._onDrop),Ne(document,"touchend",a._onDrop),Ne(document,"touchcancel",a._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(a,o,ae)),Pe(document,"drop",a),be(ae,"transform","translateZ(0)")),fa=!0,a._dragStartId=hl(a._dragStarted.bind(a,r,n)),Pe(document,"selectstart",a),eo=!0,Qa&&be(document.body,"user-select","none")},_onDragOver:function(n){var r=this.el,a=n.target,o,i,l,d=this.options,c=d.group,s=ve.active,u=il===c,f=d.sort,p=ot||s,m,y=this,b=!1;if(Ac)return;function h(z,W){vt(z,y,un({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:p,target:a,completed:v,onMove:function(ne,X){return ml(Ke,r,ae,o,ne,tt(ne),n,X)},changed:w},W))}function g(){h("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function v(z){return h("dragOverCompleted",{insertion:z}),z&&(u?s._hideClone():s._showClone(y),y!==p&&(Dt(ae,ot?ot.options.ghostClass:s.options.ghostClass,!1),Dt(ae,d.ghostClass,!0)),ot!==y&&y!==ve.active?ot=y:y===ve.active&&ot&&(ot=null),p===y&&(y._ignoreWhileAnimating=a),y.animateAll(function(){h("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===ae&&!ae.animated||a===r&&!a.animated)&&(pa=null),!d.dragoverBubble&&!n.rootEl&&a!==document&&(ae.parentNode[Tt]._isOutsideThisEl(n.target),!z&&Nr(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),b=!0}function w(){Nt=zt(ae),Jn=zt(ae,d.draggable),gt({sortable:y,name:"change",toEl:r,newIndex:Nt,newDraggableIndex:Jn,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),a=fn(a,d.draggable,r,!0),h("dragOver"),ve.eventCanceled)return b;if(ae.contains(n.target)||a.animated&&a.animatingX&&a.animatingY||y._ignoreWhileAnimating===a)return v(!1);if(ll=!1,s&&!d.disabled&&(u?f||(l=Ge!==Ke):ot===this||(this.lastPutMode=il.checkPull(this,s,ae,n))&&c.checkPut(this,s,ae,n))){if(m=this._getDirection(n,a)==="vertical",o=tt(ae),h("dragOverValid"),ve.eventCanceled)return b;if(l)return Ge=Ke,g(),this._hideClone(),h("revert"),ve.eventCanceled||(Dr?Ke.insertBefore(ae,Dr):Ke.appendChild(ae)),v(!0);var C=Bc(r,d.draggable);if(!C||SR(n,m,this)&&!C.animated){if(C===ae)return v(!1);if(C&&r===n.target&&(a=C),a&&(i=tt(a)),ml(Ke,r,ae,o,a,i,n,!!a)!==!1)return g(),r.appendChild(ae),Ge=r,w(),v(!0)}else if(C&&CR(n,m,this)){var S=ca(r,0,d,!0);if(S===ae)return v(!1);if(a=S,i=tt(a),ml(Ke,r,ae,o,a,i,n,!1)!==!1)return g(),r.insertBefore(ae,S),Ge=r,w(),v(!0)}else if(a.parentNode===r){i=tt(a);var B=0,E,V=ae.parentNode!==r,O=!yR(ae.animated&&ae.toRect||o,a.animated&&a.toRect||i,m),D=m?"top":"left",N=S1(a,"top","top")||S1(ae,"top","top"),A=N?N.scrollTop:void 0;pa!==a&&(E=i[D],no=!1,cl=!O&&d.invertSwap||V),B=$R(n,a,i,m,O?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,cl,pa===a);var k;if(B!==0){var x=zt(ae);do x-=B,k=Ge.children[x];while(k&&(be(k,"display")==="none"||k===Ce))}if(B===0||k===a)return v(!1);pa=a,to=B;var T=a.nextElementSibling,L=!1;L=B===1;var K=ml(Ke,r,ae,o,a,i,n,L);if(K!==!1)return(K===1||K===-1)&&(L=K===1),Ac=!0,setTimeout(kR,30),g(),L&&!T?r.appendChild(ae):a.parentNode.insertBefore(ae,L?T:a),N&&B1(N,0,A-N.scrollTop),Ge=ae.parentNode,E!==void 0&&!cl&&(dl=Math.abs(E-tt(a)[D])),w(),v(!0)}if(r.contains(ae))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ne(document,"mousemove",this._onTouchMove),Ne(document,"touchmove",this._onTouchMove),Ne(document,"pointermove",this._onTouchMove),Ne(document,"dragover",Nr),Ne(document,"mousemove",Nr),Ne(document,"touchmove",Nr)},_offUpEvents:function(){var n=this.el.ownerDocument;Ne(n,"mouseup",this._onDrop),Ne(n,"touchend",this._onDrop),Ne(n,"pointerup",this._onDrop),Ne(n,"touchcancel",this._onDrop),Ne(document,"selectstart",this)},_onDrop:function(n){var r=this.el,a=this.options;if(Nt=zt(ae),Jn=zt(ae,a.draggable),vt("drop",this,{evt:n}),Ge=ae&&ae.parentNode,Nt=zt(ae),Jn=zt(ae,a.draggable),ve.eventCanceled){this._nulling();return}fa=!1,cl=!1,no=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Oc(this.cloneId),Oc(this._dragStartId),this.nativeDraggable&&(Ne(document,"drop",this),Ne(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Qa&&be(document.body,"user-select",""),be(ae,"transform",""),n&&(eo&&(n.cancelable&&n.preventDefault(),!a.dropBubble&&n.stopPropagation()),Ce&&Ce.parentNode&&Ce.parentNode.removeChild(Ce),(Ke===Ge||ot&&ot.lastPutMode!=="clone")&&Qe&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),ae&&(this.nativeDraggable&&Ne(ae,"dragend",this),Ic(ae),ae.style["will-change"]="",eo&&!fa&&Dt(ae,ot?ot.options.ghostClass:this.options.ghostClass,!1),Dt(ae,this.options.chosenClass,!1),gt({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:n}),Ke!==Ge?(Nt>=0&&(gt({rootEl:Ge,name:"add",toEl:Ge,fromEl:Ke,originalEvent:n}),gt({sortable:this,name:"remove",toEl:Ge,originalEvent:n}),gt({rootEl:Ge,name:"sort",toEl:Ge,fromEl:Ke,originalEvent:n}),gt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),ot&&ot.save()):Nt!==ua&&Nt>=0&&(gt({sortable:this,name:"update",toEl:Ge,originalEvent:n}),gt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),ve.active&&((Nt==null||Nt===-1)&&(Nt=ua,Jn=Ja),gt({sortable:this,name:"end",toEl:Ge,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){vt("nulling",this),Ke=ae=Ge=Ce=Dr=Qe=ol=Xn=Tr=jt=eo=Nt=Jn=ua=Ja=pa=to=ot=il=ve.dragged=ve.ghost=ve.clone=ve.active=null,ul.forEach(function(n){n.checked=!0}),ul.length=Nc=xc=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":ae&&(this._onDragOver(n),wR(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],r,a=this.el.children,o=0,i=a.length,l=this.options;o<i;o++)r=a[o],fn(r,l.draggable,this.el,!1)&&n.push(r.getAttribute(l.dataIdAttr)||BR(r));return n},sort:function(n,r){var a={},o=this.el;this.toArray().forEach(function(i,l){var d=o.children[l];fn(d,this.options.draggable,o,!1)&&(a[i]=d)},this),r&&this.captureAnimationState(),n.forEach(function(i){a[i]&&(o.removeChild(a[i]),o.appendChild(a[i]))}),r&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,r){return fn(n,r||this.options.draggable,this.el,!1)},option:function(n,r){var a=this.options;if(r===void 0)return a[n];var o=Xa.modifyOption(this,n,r);typeof o<"u"?a[n]=o:a[n]=r,n==="group"&&I1(a)},destroy:function(){vt("destroy",this);var n=this.el;n[Tt]=null,Ne(n,"mousedown",this._onTapStart),Ne(n,"touchstart",this._onTapStart),Ne(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ne(n,"dragover",this),Ne(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sl.splice(sl.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Xn){if(vt("hideClone",this),ve.eventCanceled)return;be(Qe,"display","none"),this.options.removeCloneOnHide&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),Xn=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Xn){if(vt("showClone",this),ve.eventCanceled)return;ae.parentNode==Ke&&!this.options.group.revertClone?Ke.insertBefore(Qe,ae):Dr?Ke.insertBefore(Qe,Dr):Ke.appendChild(Qe),this.options.group.revertClone&&this.animate(ae,Qe),be(Qe,"display",""),Xn=!1}}};function wR(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function ml(e,n,r,a,o,i,l,d){var c,s=e[Tt],u=s.options.onMove,f;return window.CustomEvent&&!Mn&&!Ga?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=e,c.dragged=r,c.draggedRect=a,c.related=o||n,c.relatedRect=i||tt(n),c.willInsertAfter=d,c.originalEvent=l,e.dispatchEvent(c),u&&(f=u.call(s,c,l)),f}function Ic(e){e.draggable=!1}function kR(){Ac=!1}function CR(e,n,r){var a=tt(ca(r.el,0,r.options,!0)),o=10;return n?e.clientX<a.left-o||e.clientY<a.top&&e.clientX<a.right:e.clientY<a.top-o||e.clientY<a.bottom&&e.clientX<a.left}function SR(e,n,r){var a=tt(Bc(r.el,r.options.draggable)),o=10;return n?e.clientX>a.right+o||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+o}function $R(e,n,r,a,o,i,l,d){var c=a?e.clientY:e.clientX,s=a?r.height:r.width,u=a?r.top:r.left,f=a?r.bottom:r.right,p=!1;if(!l){if(d&&dl<s*o){if(!no&&(to===1?c>u+s*i/2:c<f-s*i/2)&&(no=!0),no)p=!0;else if(to===1?c<u+dl:c>f-dl)return-to}else if(c>u+s*(1-o)/2&&c<f-s*(1-o)/2)return ER(n)}return p=p||l,p&&(c<u+s*i/2||c>f-s*i/2)?c>u+s/2?1:-1:0}function ER(e){return zt(ae)<zt(e)?1:-1}function BR(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,r=n.length,a=0;r--;)a+=n.charCodeAt(r);return a.toString(36)}function DR(e){ul.length=0;for(var n=e.getElementsByTagName("input"),r=n.length;r--;){var a=n[r];a.checked&&ul.push(a)}}function hl(e){return setTimeout(e,0)}function Oc(e){return clearTimeout(e)}fl&&Pe(document,"touchmove",function(e){(ve.active||fa)&&e.cancelable&&e.preventDefault()}),ve.utils={on:Pe,off:Ne,css:be,find:C1,is:function(n,r){return!!fn(n,r,n,!1)},extend:cR,throttle:E1,closest:fn,toggleClass:Dt,clone:D1,index:zt,nextTick:hl,cancelNextTick:Oc,detectDirection:A1,getChild:ca},ve.get=function(e){return e[Tt]},ve.mount=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n[0].constructor===Array&&(n=n[0]),n.forEach(function(a){if(!a.prototype||!a.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));a.utils&&(ve.utils=un(un({},ve.utils),a.utils)),Xa.mount(a)})},ve.create=function(e,n){return new ve(e,n)},ve.version=oR;var et=[],ro,Pc,Vc=!1,Lc,Rc,gl,ao;function TR(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(r){var a=r.originalEvent;this.sortable.nativeDraggable?Pe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Pe(document,"pointermove",this._handleFallbackAutoScroll):a.touches?Pe(document,"touchmove",this._handleFallbackAutoScroll):Pe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var a=r.originalEvent;!this.options.dragOverBubble&&!a.rootEl&&this._handleAutoScroll(a)},drop:function(){this.sortable.nativeDraggable?Ne(document,"dragover",this._handleAutoScroll):(Ne(document,"pointermove",this._handleFallbackAutoScroll),Ne(document,"touchmove",this._handleFallbackAutoScroll),Ne(document,"mousemove",this._handleFallbackAutoScroll)),V1(),yl(),dR()},nulling:function(){gl=Pc=ro=Vc=ao=Lc=Rc=null,et.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,a){var o=this,i=(r.touches?r.touches[0]:r).clientX,l=(r.touches?r.touches[0]:r).clientY,d=document.elementFromPoint(i,l);if(gl=r,a||this.options.forceAutoScrollFallback||Ga||Mn||Qa){zc(r,this.options,d,a);var c=Zn(d,!0);Vc&&(!ao||i!==Lc||l!==Rc)&&(ao&&V1(),ao=setInterval(function(){var s=Zn(document.elementFromPoint(i,l),!0);s!==c&&(c=s,yl()),zc(r,o.options,s,a)},10),Lc=i,Rc=l)}else{if(!this.options.bubbleScroll||Zn(d,!0)===pn()){yl();return}zc(r,this.options,Zn(d,!1),!1)}}},Nn(e,{pluginName:"scroll",initializeByDefault:!0})}function yl(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function V1(){clearInterval(ao)}var zc=E1(function(e,n,r,a){if(n.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,d=n.scrollSpeed,c=pn(),s=!1,u;Pc!==r&&(Pc=r,yl(),ro=n.scroll,u=n.scrollFn,ro===!0&&(ro=Zn(r,!0)));var f=0,p=ro;do{var m=p,y=tt(m),b=y.top,h=y.bottom,g=y.left,v=y.right,w=y.width,C=y.height,S=void 0,B=void 0,E=m.scrollWidth,V=m.scrollHeight,O=be(m),D=m.scrollLeft,N=m.scrollTop;m===c?(S=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),B=C<V&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(S=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"),B=C<V&&(O.overflowY==="auto"||O.overflowY==="scroll"));var A=S&&(Math.abs(v-o)<=l&&D+w<E)-(Math.abs(g-o)<=l&&!!D),k=B&&(Math.abs(h-i)<=l&&N+C<V)-(Math.abs(b-i)<=l&&!!N);if(!et[f])for(var x=0;x<=f;x++)et[x]||(et[x]={});(et[f].vx!=A||et[f].vy!=k||et[f].el!==m)&&(et[f].el=m,et[f].vx=A,et[f].vy=k,clearInterval(et[f].pid),(A!=0||k!=0)&&(s=!0,et[f].pid=setInterval((function(){a&&this.layer===0&&ve.active._onTouchMove(gl);var T=et[this.layer].vy?et[this.layer].vy*d:0,L=et[this.layer].vx?et[this.layer].vx*d:0;typeof u=="function"&&u.call(ve.dragged.parentNode[Tt],L,T,e,gl,et[this.layer].el)!=="continue"||B1(et[this.layer].el,L,T)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&p!==c&&(p=Zn(p,!1)));Vc=s}},30),L1=function(n){var r=n.originalEvent,a=n.putSortable,o=n.dragEl,i=n.activeSortable,l=n.dispatchSortableEvent,d=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(r){var s=a||i;d();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,f=document.elementFromPoint(u.clientX,u.clientY);c(),s&&!s.el.contains(f)&&(l("spill"),this.onSpill({dragEl:o,putSortable:a}))}};function Fc(){}Fc.prototype={startIndex:null,dragStart:function(n){var r=n.oldDraggableIndex;this.startIndex=r},onSpill:function(n){var r=n.dragEl,a=n.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var o=ca(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(r,o):this.sortable.el.appendChild(r),this.sortable.animateAll(),a&&a.animateAll()},drop:L1},Nn(Fc,{pluginName:"revertOnSpill"});function Yc(){}Yc.prototype={onSpill:function(n){var r=n.dragEl,a=n.putSortable,o=a||this.sortable;o.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),o.animateAll()},drop:L1},Nn(Yc,{pluginName:"removeOnSpill"}),ve.mount(new TR),ve.mount(Yc,Fc);function NR(){return typeof window<"u"?window.console:global.console}const xR=NR();function MR(e){const n=Object.create(null);return function(a){return n[a]||(n[a]=e(a))}}const AR=/-(\w)/g,R1=MR(e=>e.replace(AR,(n,r)=>r?r.toUpperCase():""));function Hc(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function z1(e,n,r){const a=r===0?e.children[0]:e.children[r-1].nextSibling;e.insertBefore(n,a)}function IR(e,n){return Object.values(e).indexOf(n)}function OR(e,n,r,a){if(!e)return[];const o=Object.values(e),i=n.length-a;return[...n].map((d,c)=>c>=i?o.length:o.indexOf(d))}function F1(e,n){this.$nextTick(()=>this.$emit(e.toLowerCase(),n))}function PR(e){return n=>{this.realList!==null&&this["onDrag"+e](n),F1.call(this,e,n)}}function VR(e){return["transition-group","TransitionGroup"].includes(e)}function LR(e){if(!e||e.length!==1)return!1;const[{type:n}]=e;return n?VR(n.name):!1}function RR(e,n){return n?{...n.props,...n.attrs}:e}const qc=["Start","Add","Remove","Update","End"],_c=["Choose","Unchoose","Sort","Filter","Clone"],zR=["Move",...qc,..._c].map(e=>"on"+e);let Kc=null;const FR={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},YR=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...qc.map(e=>e.toLowerCase()),..._c.map(e=>e.toLowerCase())],props:FR,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,n=RR(this.$attrs,this.componentData);return e?(this.transitionMode=LR(e),t.h(this.getTag(),n,e)):t.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&xR.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};qc.forEach(o=>{e["on"+o]=PR.call(this,o)}),_c.forEach(o=>{e["on"+o]=F1.bind(this,o)});const n=Object.keys(this.$attrs).reduce((o,i)=>(o[R1(i)]=this.$attrs[i],o),{}),r=Object.assign({},n,e,{onMove:(o,i)=>this.onDragMove(o,i)});!("draggable"in r)&&(r.draggable=">*");const a=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new ve(a,r),a.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(e){for(var n in e){const r=R1(n);zR.indexOf(r)===-1&&this._sortable.option(r,e[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=OR(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const n=IR(this.getChildrenNodes()||[],e);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const r=a=>a.splice(n,0,a.splice(e,1)[0]);this.alterList(r)},getVmIndex(e){const n=this.visibleIndexes,r=n.length;return e>r-1?r:n[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[e].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Kc=e.item)},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;Hc(e.item);const r=this.getVmIndex(e.newIndex);this.spliceList(r,0,n),this.computeIndexes();const a={element:n,newIndex:r};this.emitChanges({added:a})},onDragRemove(e){if(z1(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){Hc(e.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(e){Hc(e.item),z1(e.from,e.item,e.oldIndex);const n=this.context.index,r=this.getVmIndex(e.newIndex);this.updatePosition(n,r);const a={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:a})},updateProperty(e,n){e.hasOwnProperty(n)&&(e[n]+=this.headerOffset)},onDragMove(e,n){const r=this.move;if(!r||!this.realList)return!0;const a=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(a,e);Object.assign(o,{futureIndex:i});const l=Object.assign({},e,{relatedContext:a,draggedContext:o});return r(l,n)},onDragEnd(){this.computeIndexes(),Kc=null},getTrargetedComponent(e){return e.__draggable_component__},getRelatedContextFromMoveEvent({to:e,related:n}){const r=this.getTrargetedComponent(e);if(!r)return{component:r};const a=r.realList,o={list:a,component:r};if(e!==n&&a&&r.getUnderlyingVm){const i=r.getUnderlyingVm(n);if(i)return Object.assign(i,o)}return o},computeFutureIndex(e,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const a=r.indexOf(n.related),o=e.component.getVmIndex(a);return r.indexOf(Kc)!==-1||!n.willInsertAfter?o:o+1}}}),HR=["data-testid"],qR=["aria-controls","aria-expanded","aria-label"],_R=["data-testid"],KR={key:0,class:"tree-item-icon","data-testid":"tree-item-icon"},WR={class:"tree-item-label","data-testid":"tree-item-label"},UR=pe(t.defineComponent({__name:"KTreeItem",props:{item:{},disabled:{type:Boolean},hideIcons:{type:Boolean},collapsible:{type:Boolean},initialCollapse:{type:Boolean},hasChildren:{type:Boolean},controlsId:{}},emits:["selected","expanded"],setup(e,{expose:n,emit:r}){const a=r,o=t.useSlots(),i=t.computed(()=>!e.hideIcons||!!o["item-icon"]),l=u=>{u.target&&u.target.closest("a:not(.disabled), button:not([data-tree-item-trigger]), label, input, select")!==null||a("selected",e.item)},d=t.ref(!0),c=u=>{d.value=u};t.watch(()=>e.initialCollapse,(u,f)=>{u!==f&&(d.value=!u)},{immediate:!0});const s=()=>{d.value=!d.value,a("expanded",d.value)};return n({setExpandedValue:c,id:e.item.id}),(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"tree-item-wrapper","data-testid":`tree-item-wrapper-${u.item.id}`},[u.collapsible&&u.hasChildren?(t.openBlock(),t.createElementBlock("span",{key:0,"aria-controls":`tree-list-draggable-${u.controlsId}`,"aria-expanded":d.value,"aria-label":d.value?"Collapse":"Expand",class:t.normalizeClass(["tree-item-expanded-button",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-button",role:"button",onClick:t.withModifiers(s,["stop"]),onKeyup:t.withKeys(s,["enter"])},[t.createVNode(t.unref(Cl),{class:t.normalizeClass(["tree-item-expanded-icon",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-icon",decorative:"",size:t.unref(dt),tabindex:"0"},null,8,["class","size"])],42,qR)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["tree-item",{"not-draggable":u.disabled,selected:u.item.selected,expanded:u.collapsible&&d.value,collapsed:u.collapsible&&!d.value,"no-children":u.collapsible&&!u.hasChildren}]),"data-testid":`tree-item-${u.item.id}`,"data-tree-item-trigger":"true",draggable:"false",type:"button",onClick:t.withModifiers(l,["prevent"])},[i.value?(t.openBlock(),t.createElementBlock("div",KR,[t.renderSlot(u.$slots,"item-icon",{},()=>[t.createVNode(t.unref(Wy),{decorative:""})],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",WR,[t.renderSlot(u.$slots,"item-label",{},()=>[t.createTextVNode(t.toDisplayString(u.item.name),1)],!0)])],10,_R)],8,HR))}}),[["__scopeId","data-v-18967eab"]]),Wc=({children:e=[]})=>e.length===0?0:1+Math.max(...e.map(Wc)),jR=pe(t.defineComponent({__name:"KTreeDraggable",props:{items:{},disableDrag:{type:Boolean},filter:{type:[String,Function]},maxDepth:{},level:{default:0},parentId:{},hideIcons:{type:Boolean},group:{},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=r,o=t.ref(0),i=t.ref([]),l={tag:"div","force-fallback":!0,animation:"100",draggable:".tree-item-container","item-key":"id","ghost-class":"tree-item-dragged","drag-class":"tree-item-grabbing",class:"child-drop-zone","fallback-tolerance":10},d=t.ref(!1),c=t.computed(()=>[".tree-item-expanded-button",...(typeof e.filter=="function"?e.filter():e.filter).split(",").map(N=>N.trim()).filter(Boolean)].join(", ")),s=D=>{var N,A;return!((A=(N=i.value.filter(k=>k.id===D.id))==null?void 0:N[0].children)!=null&&A.length)},u=D=>D.children||[],f=D=>{e.parentId?a("child-change",{parentId:e.parentId,children:i.value,target:(D==null?void 0:D.added)||(D==null?void 0:D.removed)||(D==null?void 0:D.moved)}):a("change",{items:i.value,target:(D==null?void 0:D.added)||(D==null?void 0:D.removed)||(D==null?void 0:D.moved)})},p=D=>{a("child-change",D)},m=D=>{a("selected",D)},y=t.ref(new Map),b=(D,N)=>{y.value.set(N,D)},h=D=>e.collapsible?!!y.value.get(D):!0,g=t.useTemplateRef("tree-items"),v=()=>{var D;i.value.forEach(N=>{y.value.set(N.id,!1)}),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(!1)})},w=()=>{var D;i.value.forEach(N=>{y.value.set(N.id,!0)}),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(!0)})},C=t.computed(()=>e.level>e.maxDepth-1),S=D=>{var T,L,K,z;const N=((L=(T=D.relatedContext)==null?void 0:T.component)==null?void 0:L.$attrs.level)||0,A=(K=D.draggedContext)==null?void 0:K.element;let k=0;return(z=A.children)!=null&&z.length&&(k=Wc(A)),!(N+k>e.maxDepth-1)},B=D=>{var k,x;const N=((x=(k=D.item)==null?void 0:k._underlying_vm_)==null?void 0:x.id)||"",A=i.value.find(T=>T.id===N);d.value=!0,A&&a("selected",A),V(!0)},E=async()=>{var D;d.value=!1,V(!1),o.value++,await t.nextTick(),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(y.value.get(N==null?void 0:N.id))})},V=D=>{const N=document==null?void 0:document.getElementsByTagName("html").item(0);N&&N.classList.toggle("tree-list-grabbing",D)};t.watch(()=>e.items,(D,N)=>{JSON.stringify(D)!==JSON.stringify(N)&&(i.value=D,i.value.forEach(A=>{A.children||(A.children=[])}))});const O=()=>{i.value.forEach(D=>{y.value.set(D.id,!e.initialCollapseAll)})};return t.onMounted(async()=>{i.value=e.items,i.value.forEach(D=>{D.children||(D.children=[])}),await t.nextTick(),e.collapsible&&O()}),n({collapseAll:v,expandAll:w}),(D,N)=>{const A=t.resolveComponent("KTreeDraggable",!0);return t.openBlock(),t.createBlock(t.unref(YR),t.mergeProps(l,{class:"tree-draggable",direction:"vertical",disabled:D.disableDrag,filter:c.value,group:{name:D.group,pull:[D.group],put:C.value?[]:[D.group]},level:D.level,list:i.value,move:S,tag:"div",onChange:f,onEnd:E,onStart:B}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,k=>(t.openBlock(),t.createElementBlock("div",{key:k.id,class:t.normalizeClass(["tree-item-container",{"has-no-children":s(k)}])},[(t.openBlock(),t.createBlock(UR,{key:`tree-item-${k.id}-${o.value}`,ref_for:!0,ref:"tree-items",collapsible:D.collapsible,"controls-id":k.id,disabled:D.disableDrag,"has-children":!s(k),"hide-icons":D.hideIcons,"initial-collapse":D.initialCollapseAll,item:k,onExpanded:x=>b(x,k.id),onSelected:m},t.createSlots({"item-label":t.withCtx(()=>[t.renderSlot(D.$slots,"item-label",{item:k},()=>[t.createTextVNode(t.toDisplayString(k.name),1)],!0)]),_:2},[D.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(()=>[t.renderSlot(D.$slots,"item-icon",{item:k},void 0,!0)]),key:"0"}:void 0]),1032,["collapsible","controls-id","disabled","has-children","hide-icons","initial-collapse","item","onExpanded"])),t.withDirectives((t.openBlock(),t.createBlock(A,{id:`tree-list-draggable-${k.id}`,key:`tree-item-${k.id}-children-${o.value}`,class:t.normalizeClass({collapsible:D.collapsible}),collapsible:D.collapsible,"disable-drag":D.disableDrag,filter:c.value,group:D.group,"hide-icons":D.hideIcons,"initial-collapse-all":D.initialCollapseAll,items:u(k),level:D.level+1,"max-depth":D.maxDepth,"parent-id":k.id,onChildChange:p,onSelected:m},t.createSlots({"item-label":t.withCtx(({item:x})=>[t.renderSlot(D.$slots,"item-label",{item:x},void 0,!0)]),_:2},[D.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:x})=>[t.renderSlot(D.$slots,"item-icon",{item:x},void 0,!0)]),key:"0"}:void 0]),1032,["id","class","collapsible","disable-drag","filter","group","hide-icons","initial-collapse-all","items","level","max-depth","parent-id"])),[[t.vShow,h(k.id)]])],2))),128))]),_:3},16,["disabled","filter","group","level","list"])}}}),[["__scopeId","data-v-a7e11d91"]]),Y1=t.defineComponent({__name:"KTreeList",props:{modelValue:{default:null},items:{default:null},disableDrag:{type:Boolean},ignoreDragSelectors:{type:[String,Function],default:""},maxDepth:{default:3},width:{default:""},hideIcons:{type:Boolean},group:{default:"k-tree-list"},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=(h,g)=>(h.forEach(v=>{var w;g.push(v.id),(w=v.children)!=null&&w.length&&a(v.children,g)}),g),o=h=>{const g=a(h,[]),v=new Set(g);return g.length===v.size},i=(h,g)=>{let v=!0;return h.forEach(w=>{v=v&&(!w.children||Wc(w)<=g)}),v};t.watch(()=>e.modelValue,h=>{h&&!o(h)&&_n("modelValue","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.items,h=>{h&&!o(h)&&_n("items","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.maxDepth,h=>{h>5&&_n("maxDepth","Maximum depth must be less than or equal to 5.")},{immediate:!0}),t.watch([()=>e.modelValue,()=>e.items],([h,g])=>{h&&g&&_n("modelValue / items","You should not provide both v-model (or props.modelValue) and props.items")},{immediate:!0});const l=t.ref([]);t.watch([l,()=>e.maxDepth],([h,g])=>{i(h,g)||_n(e.modelValue?"modelValue":"items","Provided list depth exceeds `maxDepth`")},{immediate:!0,deep:!0});const d=r,c=t.computed({get(){return e.modelValue},set(h){l.value=h}}),s=t.computed(()=>({maxWidth:Je(e.width)})),u=(h,g)=>{(g||l.value).forEach(w=>{var C;w.id===h.id?(w.selected=!0,d("selected",h)):w.selected=!1,(C=w.children)!=null&&C.length&&u(h,w.children)})},f=h=>{d("change",h)},p=h=>{d("child-change",h)};t.watch(c,(h,g)=>{JSON.stringify(h)!==JSON.stringify(g)&&(l.value=h||[],l.value.forEach(v=>{v.children||(v.children=[])}))}),t.watch(()=>e.items,(h,g)=>{JSON.stringify(h)!==JSON.stringify(g)&&(l.value=h||[],l.value.forEach(v=>{v.children||(v.children=[])}))});const m=t.useTemplateRef("tree-draggable");return n({collapseAll:()=>{var h;(h=m.value)==null||h.collapseAll()},expandAll:()=>{var h;(h=m.value)==null||h.expandAll()}}),t.onMounted(()=>{e.modelValue?l.value=e.modelValue:e.items&&(l.value=e.items),l.value.forEach(h=>{h.children||(h.children=[])})}),(h,g)=>(t.openBlock(),t.createElementBlock("div",{class:"k-tree-list","data-testid":"k-tree-list",style:t.normalizeStyle(h.width?s.value:void 0)},[t.createVNode(jR,{ref:"tree-draggable",collapsible:h.collapsible,"data-testid":`k-tree-list-${h.group}`,"disable-drag":h.disableDrag,filter:h.ignoreDragSelectors,group:h.group,"hide-icons":h.hideIcons,"initial-collapse-all":h.initialCollapseAll,items:l.value,"max-depth":h.maxDepth,onChange:f,onChildChange:p,onSelected:u},t.createSlots({"item-label":t.withCtx(({item:v})=>[t.renderSlot(h.$slots,"item-label",{item:v})]),_:2},[h.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:v})=>[t.renderSlot(h.$slots,"item-icon",{item:v})]),key:"0"}:void 0]),1032,["collapsible","data-testid","disable-drag","filter","group","hide-icons","initial-collapse-all","items","max-depth"])],4))}}),GR=["href"],H1=pe(t.defineComponent({__name:"KExternalLink",props:{href:{},hideIcon:{type:Boolean}},setup(e){t.watch(()=>e.href,r=>{e1(r)||_n("href",`\`href\` should be a valid URL, but got "${r}".`)},{immediate:!0});const n=t.computed(()=>!!e1(e.href));return(r,a)=>n.value?(t.openBlock(),t.createElementBlock("a",{key:0,class:"k-external-link",href:r.href,rel:"noopener",target:"_blank"},[t.renderSlot(r.$slots,"default",{},void 0,!0),r.hideIcon?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Ay),{key:0,decorative:"",size:t.unref(Yt)},null,8,["size"]))],8,GR)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-ec2a67ce"]]),QR={key:0,class:"truncate-expand-controls"},ZR={key:0,"data-testid":"expand-trigger-wrapper"},XR=["aria-label"],JR={key:0,"data-testid":"collapse-trigger-wrapper"},ez={key:0,"data-testid":"expand-trigger-wrapper"},tz={key:1},q1=pe(t.defineComponent({__name:"KTruncate",props:{rows:{default:1},truncateText:{type:Boolean},expanded:{type:Boolean},width:{default:"100%"}},setup(e){t.useCssVars(b=>({"7164fd89":d.value,"5e3d5385":t.unref(c),"6972530a":b.rows})),t.watch(()=>e.rows,b=>{b<0&&_n("rows",`\`rows\` prop cannot be less than 0, but got "${b}".`)},{immediate:!0});const n=t.ref(e.expanded),r=t.ref(!1),a=t.ref(),o=t.ref(),i=t.ref(),l=t.ref(),d=t.ref("0px"),c=db,s=t.ref(0),u=async()=>{var b;if(!e.truncateText&&o.value&&(b=o.value.children)!=null&&b.length){const h=o.value.children,g=Number(String(c).replace(/px$/gi,""));let v=0;for(let C=0;C<h.length;C++)v=h[C].offsetHeight>v?h[C].offsetHeight:v;const w=(e.rows===1?0:(e.rows-1)*g)+v*e.rows+6;d.value=o.value.offsetHeight>w?`${w}px`:"auto",await t.nextTick(),f()}},f=()=>{if(o.value&&i.value){const b=e.truncateText?o.value.scrollHeight:o.value.offsetHeight,h=l.value?l.value.offsetHeight:0;r.value=b>i.value.offsetHeight-h,p()}},p=()=>{if(!e.truncateText&&(s.value=0,o.value&&i.value)){const b=o.value.children;for(let h=0;h<b.length;h++)b[h].offsetTop>i.value.offsetHeight?(s.value+=1,b[h].getAttribute("tabindex")&&(b[h].tabIndex=-1)):b[h].getAttribute("tabindex")&&(b[h].tabIndex=0)}},m=async()=>{n.value=!n.value,await t.nextTick(),f()},y=t.computed(()=>({width:Je(e.width)}));return t.onMounted(()=>{a.value=ir.create(u),a.value.observe(o.value),f()}),t.onBeforeUnmount(()=>{var b;(b=a.value)==null||b.unobserve(o.value)}),(b,h)=>{const g=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{ref_key:"kTruncateWrapper",ref:i,class:t.normalizeClass(["k-truncate",[n.value?"expanded":"",`truncate-${b.truncateText?"text":"content"}`]]),style:t.normalizeStyle(y.value)},[!b.truncateText&&r.value?(t.openBlock(),t.createElementBlock("div",QR,[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ZR,[t.renderSlot(b.$slots,"expand-trigger",{expand:m,truncatedCount:s.value},()=>[t.createElementVNode("button",{"aria-label":`Show ${s.value} more items`,class:"expand-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},t.toDisplayString(s.value),9,XR)],!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"kTruncateContainer",ref:o,class:"truncate-container"},[t.renderSlot(b.$slots,"default",{},void 0,!0),!b.truncateText&&n.value?(t.openBlock(),t.createElementBlock("div",JR,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createElementVNode("button",{"aria-label":"Collapse content",class:"collapse-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},[t.createVNode(t.unref($y),{decorative:"",size:t.unref(Yt)},null,8,["size"])])],!0)])):t.createCommentVNode("",!0)],512),b.truncateText&&(r.value||n.value)?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"textToggleControls",ref:l,class:"truncate-collapse-controls"},[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ez,[t.renderSlot(b.$slots,"expand-trigger",{expand:m},()=>[t.createVNode(g,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>h[0]||(h[0]=[t.createTextVNode(" Show more ")])),_:1,__:[0]})],!0)])),n.value?(t.openBlock(),t.createElementBlock("div",tz,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createVNode(g,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>h[1]||(h[1]=[t.createTextVNode(" Show less ")])),_:1,__:[1]})],!0)])):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-32767851"]]),nz={class:"k-copy"},rz={key:0,class:"copy-badge-text"},az=["id","aria-label","onClick"],_1=pe(t.defineComponent({__name:"KCopy",props:{badgeLabel:{default:""},text:{},textTooltip:{default:""},copyTooltip:{default:""},format:{default:"default"},badge:{type:Boolean},monospace:{type:Boolean},truncate:{type:Boolean},successTooltip:{default:"Copied!"},truncationLimit:{default:8}},setup(e,{expose:n}){const r=t.useId(),a=t.ref(""),o=t.computed(()=>!e.badgeLabel||e.copyTooltip?e.copyTooltip||"Copy":`Copy ${e.badgeLabel.replace(/:$/,"")}`);t.watch(o,h=>{a.value=h},{immediate:!0});const i=t.computed(()=>`copy-tooltip-wrapper ${e.truncate&&y.value||e.badge?"truncate-content":""}`),l=t.computed(()=>e.format==="redacted"?"*****":e.format==="deleted"?`*${String(e.text||"").substring(0,5)}`:e.truncate&&e.truncationLimit&&m.value?m.value.replace(/^"(.*)"$/,"$1"):e.text),d=t.computed(()=>{if(e.textTooltip)return e.textTooltip;if(!(e.format==="redacted"||!y.value))return e.text}),c=h=>{a.value=h||e.successTooltip,setTimeout(()=>{a.value=o.value},1800)},s=async h=>{if(!await h(e.text)){c("Failed to copy");return}c()};n({copy:()=>{var h;document!=null&&document.getElementById(r)&&((h=document==null?void 0:document.getElementById(r))==null||h.click())}});const f=t.ref(),p=t.ref(),m=t.computed(()=>e.truncate&&typeof e.truncationLimit=="number"?`${String(e.text||"").substring(0,e.truncationLimit)+"..."}`:null),y=t.ref(!1),b=()=>{var h,g;e.truncate&&(e.truncationLimit!=="auto"&&m.value?y.value=!0:e.truncationLimit==="auto"&&f.value&&(y.value=((h=f.value)==null?void 0:h.offsetWidth)<((g=f.value)==null?void 0:g.scrollWidth)))};return t.onMounted(()=>{p.value=ir.create(b),p.value.observe(f.value)}),t.onBeforeUnmount(()=>{p.value&&p.value.unobserve(f.value)}),(h,g)=>(t.openBlock(),t.createElementBlock("div",nz,[h.badge&&h.badgeLabel?(t.openBlock(),t.createElementBlock("span",rz,t.toDisplayString(h.badgeLabel),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["copy-container",{"copy-element":h.truncate||h.badge,"badge-styles":h.badge}])},[h.format!=="hidden"?(t.openBlock(),t.createBlock(Et,{key:0,class:t.normalizeClass([i.value]),"data-testid":"copy-tooltip-wrapper","max-width":"500px",placement:"bottom-start",text:d.value},{default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"copyTextElement",ref:f,class:t.normalizeClass(["copy-text",{monospace:h.monospace||!h.badge}])},t.toDisplayString(l.value),3)]),_:1},8,["class","text"])):t.createCommentVNode("",!0),t.createVNode(Et,{class:"text-icon-wrapper","max-width":"500px",placement:"bottom-start",text:a.value},{default:t.withCtx(()=>[t.createVNode(bl,null,{default:t.withCtx(({copyToClipboard:v})=>[t.createElementVNode("button",{id:t.unref(r),"aria-label":a.value,class:"copy-to-clipboard-button","data-testid":"copy-to-clipboard",type:"button",onClick:t.withModifiers(w=>s(v),["stop"])},[t.createVNode(t.unref(yd),{class:"text-icon",decorative:"",size:t.unref(Yt)},null,8,["size"])],8,az)]),_:1})]),_:1},8,["text"])],2)]))}}),[["__scopeId","data-v-5cce612d"]]),oz={key:0,class:"bulk-actions-dropdown-trigger-count"},iz=pe(t.defineComponent({__name:"BulkActionsDropdown",props:{disabled:{type:Boolean},count:{default:""},buttonLabel:{default:""}},setup(e){return(n,r)=>(t.openBlock(),t.createBlock(Fn,{class:"bulk-actions-dropdown","data-testid":"bulk-actions-dropdown",disabled:n.disabled,"kpop-attributes":{placement:"bottom-end"}},{items:t.withCtx(()=>[t.renderSlot(n.$slots,"items",{},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Et,{placement:"bottom-end",text:"Selected Row Actions"},{default:t.withCtx(()=>[t.createVNode(Ie,{appearance:"secondary","aria-label":n.buttonLabel,class:"bulk-actions-dropdown-trigger","data-testid":"bulk-actions-dropdown-trigger",disabled:n.disabled,icon:"",size:"large"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dd),{class:"more-icon",decorative:""}),t.createVNode(t.Transition,{name:"kongponents-fade-transition"},{default:t.withCtx(()=>[n.count?(t.openBlock(),t.createElementBlock("span",oz,t.toDisplayString(n.count),1)):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["aria-label","disabled"])]),_:1})]),_:3},8,["disabled"]))}}),[["__scopeId","data-v-cf7c2833"]]),lz={key:0,class:"table-toolbar","data-testid":"table-toolbar"},sz={key:0,class:"toolbar-default-items-container"},cz={key:2,class:"table-error-state","data-testid":"table-error-state"},dz={key:3,class:"table-empty-state","data-testid":"table-empty-state"},uz={key:4,class:"table-container"},fz=["data-tableid"],pz=["aria-sort","data-key","data-testid","onClick","onMouseover"],mz=["onMousedown","onMouseover"],hz=["aria-describedby"],gz={key:1,class:"table-header-bulk-actions-container"},yz=["onMousedown","onMouseover"],bz=["role","tabindex"],vz={key:1,class:"expandable-row-control-container"},wz=["aria-controls","aria-expanded","onClick"],kz=["id"],Cz=["colspan"],Sz={class:"expandable-content-wrapper"},Uc=pe(t.defineComponent({__name:"KTableView",props:{data:{default:()=>[]},headers:{default:()=>[]},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ft.Default},emptyStateButtonAppearance:{default:"primary"},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{default:"body"},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["page-change","page-size-change","get-next-offset","get-previous-offset","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{emit:n}){var Gt;t.useCssVars(I=>({"8623d80a":t.unref(ke).expandable,"7b68048c":J.value,"0431e2e4":C.value,"047c3890":T.value}));const r=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","tooltipTarget","data","headers"]),a=n,o=t.useSlots(),i=t.useId(),l=I=>typeof e.rowKey=="function"&&typeof e.rowKey(I)=="string"?e.rowKey(I):typeof e.rowKey=="string"&&e.rowKey in I&&typeof I[e.rowKey]=="string"?I[e.rowKey]:"",d=t.useTemplateRef("table-wrapper"),c=t.useTemplateRef("header-row"),s=t.ref([]),u=t.ref([]),f=t.ref(""),p=t.ref(""),m=t.ref(""),y=t.computed(()=>s.value.filter(I=>I.hidable).length>0),b=t.computed(()=>e.nested||!y.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),h=t.computed(()=>e.loading||!(e.data&&e.data.length)),g=t.computed(()=>s.value.filter(I=>I.hidable&&!me(I.key))),v=t.computed(()=>b.value?e.tablePreferences.columnVisibility||{}:{}),w=t.ref(b.value?e.tablePreferences.columnVisibility||{}:{}),C=t.ref("100%"),S=t.ref(!1),B=t.ref(!1),E=t.ref(!1),V=t.ref(!1),O=t.ref(e.tablePreferences.sortColumnKey||""),D=t.ref(e.tablePreferences.sortColumnOrder||"desc"),N=t.ref(!1),A=t.computed(()=>!e.hideToolbar&&!e.nested&&(!!o.toolbar||b.value||W.value)),k=t.ref(!1),x=t.computed(()=>({maxHeight:Je(e.maxHeight)})),T=t.computed(()=>`${Mf()}px`),L=t.ref([]),K=t.computed(()=>!e.nested&&!e.error&&s.value.some(I=>I.key===$e.BULK_ACTIONS)&&!!(o["bulk-action-items"]||o["bulk-actions"])&&!!e.data.every(I=>l(I))),z=t.ref([]),W=t.computed(()=>e.nested||!K.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),H=t.computed(()=>{const I=L.value.length;return I?I>100?"99+":String(I):""}),ne=t.ref(new WeakMap),X=I=>`column-${I}`,ce=I=>`tooltip-${I}`,re=(I,q)=>(M,U)=>{const _=/^on[^a-z]/,se={};for(const oe in q)_.test(oe)&&q[oe]&&(se[oe]=q[oe]);return Object.keys(se).reduce((oe,Be)=>{if(Be.indexOf(I)===0){const Te=Be.split(I);oe[Te[1]]=rt=>se[Be](rt,M,U)}return oe},{})},fe=t.computed(()=>(I,q)=>{const M=re("onRow:",r)(q,"row"),U=re("onCell:",r)(I,"cell"),_=["a","button","label","input","select",'span[role="checkbox"]'];return(M.click||U.click)&&(N.value=!0),{...M,...U,click(se){const oe=se.target,Be=oe.className;let Te=_.includes(oe.tagName.toLowerCase()),rt=!1;typeof Be=="string"||Array.isArray(Be)?rt=Be.includes("k-popover"):typeof Be=="object"&&(rt=Object.keys(Be).includes("k-popover")),oe.closest(".popover-content")!==null&&(rt=!0);for(let _e=0;_e<_.length;_e++)if(oe.closest(_[_e])!==null){Te=!0;break}if((!Te||oe.hasAttribute("disabled"))&&!rt&&(M.click||U.click))if(U.click){a("cell-click",{data:I});const _e=U.click(se,I,"cell");typeof _e=="function"&&_e(se,I)}else{a("row-click",{data:q});const _e=M.click(se,q,"row");typeof _e=="function"&&_e(se,q)}}}}),Ee=parseInt(zd)*2+parseInt(Yt),ye={expandable:Ee,bulkActions:48,actions:54},ke=A2(ye,I=>`${I}px`),De=t.ref(((Gt=e.tablePreferences)==null?void 0:Gt.columnWidths)||ye),Le=t.computed(()=>{const I={};for(const q in De.value){const M=q;if(!De.value[M])continue;const U=De.value[M]+"px";I[M]={width:U,maxWidth:U,minWidth:U}}return I}),xe=(I,q)=>({"resize-hover":G.value===I.key&&e.resizeColumns&&!e.nested&&q!==u.value.length-1&&ue(I),resizable:e.resizeColumns&&!e.nested,sortable:!I.hideLabel&&!!I.sortable,"active-sort":!I.hideLabel&&!!I.sortable&&I.key===O.value,[D.value]:I.key===O.value&&!I.hideLabel,"is-scrolled":B.value,"has-tooltip":!!I.tooltip,"sticky-column":(I.key===$e.BULK_ACTIONS||I.key===$e.EXPANDABLE)&&E.value,"second-sticky-column":I.key===$e.BULK_ACTIONS&&Z.value,"has-row-scroll-overlay":ie(I.key)}),Oe=I=>{if(I.sortable&&I.key!==$e.BULK_ACTIONS&&I.key!==$e.ACTIONS){let q="asc";I.key===O.value&&D.value==="asc"&&(q="desc"),a("sort",{prevKey:O.value,sortColumnKey:I.key,sortColumnOrder:q}),Ae(I)}},Me=t.computed(()=>f.value?"resizing":p.value?"resize-hover":m.value?"th-hover":""),G=t.computed(()=>{switch(Me.value){case"resizing":return f.value;case"resize-hover":return p.value;case"th-hover":return m.value;default:return""}}),Q=t.computed(()=>{var I;return(I=c.value)==null?void 0:I.querySelectorAll("th.resizable")}),J=t.computed(()=>{var q;const I=(q=Q.value)==null?void 0:q.item(0);if(I){const M=window==null?void 0:window.getComputedStyle(I);if(M!=null&&M.height)return`${parseInt(M.height,10)}px`}return"auto"}),P=(I,q)=>{var Be;if(I.button!==0)return;let M=0,U=0;f.value=q;let _=null;(Be=Q.value)==null||Be.forEach(Te=>{Te.getAttribute("data-testid")===`table-header-${q}`&&(_=document==null?void 0:document.querySelector(`[data-tableid="${i}"] [data-testid="table-header-${q}"]`))});const se=Te=>{const rt=Te.clientX-M;_==null||_.setAttribute("style",`width: ${U+rt}px`),De.value[q]=U+rt},oe=()=>{f.value="",document==null||document.removeEventListener("mousemove",se),document==null||document.removeEventListener("mouseup",oe),R(),Z.value&&Re()};if(M=I.clientX,_){const Te=window==null?void 0:window.getComputedStyle(_);Te!=null&&Te.width&&(U=parseInt(Te.width,10)),document==null||document.addEventListener("mousemove",se),document==null||document.addEventListener("mouseup",oe)}},ie=I=>E.value?K.value?I===$e.BULK_ACTIONS:Z.value?I===$e.EXPANDABLE:!1:!1,me=I=>I===$e.EXPANDABLE||I===$e.BULK_ACTIONS||I===$e.ACTIONS,ue=(I,q=!1)=>{if(q){if(u.value.indexOf(I)===u.value.length-1)return!1;const U=u.value[u.value.indexOf(I)-1];return!me(U.key)}const M=u.value[u.value.indexOf(I)+1];return!me(I.key)&&!me(M.key)},Se=(I,q)=>{a("row-actions-toggle",{row:I,open:q})},Ze=t.computed(()=>!(e.hidePagination||e.nested||e.hidePaginationWhenOptional&&e.data.length&&e.paginationAttributes.totalCount&&e.paginationAttributes.totalCount<=e.data.length));t.watch(()=>e.headers,I=>{if(I&&I.length){const q=I.filter(_=>_.key!==$e.BULK_ACTIONS&&_.key!==$e.ACTIONS),M=I.find(_=>_.key===$e.BULK_ACTIONS),U=I.find(_=>_.key===$e.ACTIONS);M&&q.unshift(M),U&&q.push(U),s.value=q}},{deep:!0,immediate:!0});const je=I=>!I.hideLabel&&!!I.sortable&&I.key!==$e.BULK_ACTIONS&&I.key!==$e.ACTIONS,Ae=I=>{const{key:q}=I;O.value&&q===O.value?D.value==="asc"?D.value="desc":D.value="asc":(O.value=q,D.value="asc"),R()},We=I=>{const q=I.target;q&&(typeof q.scrollTop=="number"||typeof q.scrollLeft=="number")&&(q.scrollTop>1?(S.value=!0,B.value=!0):q.scrollTop===0&&(B.value=!1),q.scrollLeft>1?E.value=!0:q.scrollLeft===0&&(E.value=!1),q.scrollWidth===q.scrollLeft+q.clientWidth?V.value=!1:V.value=!0)},Xe=I=>z.value.find(q=>q.rowKey===l(I)),nt=I=>{if(typeof e.rowBulkActionEnabled!="function")return!1;const q=e.rowBulkActionEnabled(I);return typeof q=="boolean"?q:q.enabled},wt=I=>{if(typeof e.rowBulkActionEnabled!="function")return"";const q=e.rowBulkActionEnabled(I);return typeof q=="boolean"?"":q.disabledTooltip||""},xt=(I,q)=>{const{to:M}=e.rowLink(I);return!M||q===$e.BULK_ACTIONS||q===$e.ACTIONS?"div":typeof M=="object"?"router-link":"a"},kt=(I,q)=>{if(q===$e.BULK_ACTIONS||q===$e.ACTIONS)return{};const{to:M,target:U}=e.rowLink(I),_=M&&typeof M=="object",se=M&&typeof M=="string";return{..._&&{to:M},...se&&{href:M},...(_||se)&&{...U&&{target:U}}}},at=t.ref(n1(e.tablePreferences,e.paginationAttributes)),j=I=>{at.value=I.pageSize,a("page-size-change",I),R()},we=t.computed(()=>({sortColumnKey:O.value,sortColumnOrder:D.value,...e.resizeColumns?{columnWidths:De.value}:{},...y.value?{columnVisibility:w.value}:{},...at.value&&!e.hidePagination&&{pageSize:at.value}})),R=()=>{a("update:table-preferences",we.value)},Z=t.computed(()=>!e.nested&&e.data.some(I=>e.rowExpandable(I))),he={key:$e.EXPANDABLE,label:"Expandable rows controls",hideLabel:!0},F=()=>{const I=[];return e.data.forEach((q,M)=>{e.rowExpanded(q)&&I.push(M)}),I},$=t.ref(F()),Y=async(I,q)=>{Re(),await t.nextTick(),$.value.includes(I)?($.value=$.value.filter(M=>M!==I),a("update:row-expanded",{row:q,expanded:!1})):($.value=[...$.value,I],a("update:row-expanded",{row:q,expanded:!0}))},te=t.computed(()=>u.value.filter(I=>I.key!==$e.EXPANDABLE&&I.key!==$e.BULK_ACTIONS)),le=t.ref({}),Re=()=>{if(typeof document>"u")return;const I=document==null?void 0:document.querySelector(`[data-tableid="${i}"]`),q=I==null?void 0:I.querySelectorAll("th"),M={};q==null||q.forEach((U,_)=>{const se=U.getAttribute("data-key");if(se===$e.EXPANDABLE)return;let oe=U.getBoundingClientRect().width;_===1&&(oe+=Ee),_===q.length-1&&(oe-=15),M[se]=oe}),le.value=M};t.watch([w,s,Z],I=>{const[q,M,U]=I;let _=M.filter(se=>se.key===$e.BULK_ACTIONS?K.value:q[se.key]!==!1);_.find(se=>se.key===$e.EXPANDABLE)&&(_=_.filter(se=>se.key!==$e.EXPANDABLE)),U&&_.unshift(he),JSON.stringify(_)!==JSON.stringify(u.value)&&(u.value=_,R()),U&&Re()},{deep:!0,immediate:!0}),t.watch(b,I=>{I&&(w.value=e.tablePreferences.columnVisibility||{})},{immediate:!0});const Ye=t.ref(!1),it=t.computed(()=>{const I=z.value.filter(q=>!q.disabled&&e.data.find(M=>l(M)===q.rowKey));return!!I.filter(q=>q.selected).length&&!!I.filter(q=>!q.selected).length}),mn=I=>{z.value.forEach(q=>{e.data.find(M=>l(M)===q.rowKey)&&!q.disabled&&(q.selected=I)})};return t.watch([()=>e.data,z],I=>{const[q,M]=I;if(q.forEach(U=>{if(!ne.value.get(U)){const _=l(U)||tl();ne.value.set(U,`table-${i}-row-${_}`)}}),K.value){q.forEach(oe=>{Xe(oe)||z.value.push({rowKey:l(oe),selected:!1,disabled:!nt(oe)})});const U=M.filter(oe=>!oe.disabled&&q.find(Be=>l(Be)===oe.rowKey));U.length&&U.filter(oe=>oe.selected).length===U.length?Ye.value=!0:(U.filter(oe=>!oe.selected).length,U.length,Ye.value=!1);const _=q.filter(oe=>{const Be=M.find(Te=>Te.rowKey===l(oe));return!!(Be&&Be.selected)}),se=[];L.value.forEach(oe=>{q.find(Te=>l(oe)===l(Te))||se.push(oe)}),L.value=[...se,..._]}$.value=F()},{deep:!0,immediate:!0}),t.watch(L,I=>{a("row-select",I)}),t.watch(()=>e.tablePreferences,I=>{I!=null&&I.columnWidths&&(De.value=I.columnWidths)}),Cv(d,I=>{var M;const q=(M=I[0])==null?void 0:M.target;q&&(V.value=q.scrollWidth>q.clientWidth,C.value=q.clientHeight+"px",S.value=q.scrollHeight>q.clientHeight)}),(I,q)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["k-table-view",{"hide-headers":I.hideHeaders}])},[A.value?(t.openBlock(),t.createElementBlock("div",lz,[t.renderSlot(I.$slots,"toolbar",{},void 0,!0),W.value||b.value?(t.openBlock(),t.createElementBlock("div",sz,[W.value?t.renderSlot(I.$slots,"bulk-actions",{key:0,selectedRows:L.value},()=>[I.$slots["bulk-actions"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(iz,{key:0,"button-label":s.value.find(M=>M.key===t.unref($e).BULK_ACTIONS).label,count:H.value,disabled:!H.value||I.loading||!I.data.length},{items:t.withCtx(()=>[t.renderSlot(I.$slots,"bulk-action-items",{selectedRows:L.value},void 0,!0)]),_:3},8,["button-label","count","disabled"]))],!0):t.createCommentVNode("",!0),b.value?(t.openBlock(),t.createBlock(d1,{key:1,columns:g.value,disabled:h.value,"table-id":t.unref(i),"visibility-preferences":v.value,onUpdate:q[0]||(q[0]=M=>w.value=M)},null,8,["columns","disabled","table-id","visibility-preferences"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),I.loading&&!I.error?(t.openBlock(),t.createBlock(wa,{key:1,"data-testid":"table-skeleton",type:"table"})):I.error?(t.openBlock(),t.createElementBlock("div",cz,[t.renderSlot(I.$slots,"error-state",{},()=>[t.createVNode(zn,{"icon-variant":"error",message:I.errorStateMessage,title:I.errorStateTitle},t.createSlots({_:2},[I.errorStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ie,{"data-testid":"error-state-action",to:I.errorStateActionRoute,onClick:q[1]||(q[1]=M=>a("error-action-click"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(I.errorStateActionMessage),1)]),_:1},8,["to"])]),key:"0"}:void 0]),1032,["message","title"])],!0)])):!I.error&&!I.loading&&I.data&&!I.data.length?(t.openBlock(),t.createElementBlock("div",dz,[t.renderSlot(I.$slots,"empty-state",{},()=>[t.createVNode(zn,{"icon-variant":I.emptyStateIconVariant,message:I.emptyStateMessage,title:I.emptyStateTitle},t.createSlots({_:2},[I.emptyStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ie,{appearance:I.emptyStateButtonAppearance,"data-testid":"empty-state-action",to:I.emptyStateActionRoute,onClick:q[2]||(q[2]=M=>a("empty-state-action-click"))},{default:t.withCtx(()=>[t.renderSlot(I.$slots,"empty-state-action-icon",{},void 0,!0),t.createTextVNode(" "+t.toDisplayString(I.emptyStateActionMessage),1)]),_:3},8,["appearance","to"])]),key:"0"}:void 0]),1032,["icon-variant","message","title"])],!0)])):(t.openBlock(),t.createElementBlock("div",uz,[t.createElementVNode("div",{ref:"table-wrapper",class:"table-wrapper",style:t.normalizeStyle(x.value),onScrollPassive:We},[t.createElementVNode("table",{class:t.normalizeClass(["table",{"has-hover":I.rowHover&&!k.value,"is-clickable":N.value}]),"data-tableid":t.unref(i)},[I.hideHeaders?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("thead",{key:0,class:t.normalizeClass({"is-scrolled":B.value})},[t.createElementVNode("tr",{ref:"header-row",class:t.normalizeClass({"is-scrolled":B.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(M,U)=>(t.openBlock(),t.createElementBlock("th",{key:`table-${t.unref(i)}-headers-${M.key}`,"aria-sort":M.key===O.value?D.value==="asc"?"ascending":"descending":void 0,class:t.normalizeClass(["table-headers",xe(M,U)]),"data-key":M.key,"data-testid":`table-header-${M.key}`,style:t.normalizeStyle(Le.value[M.key]),onClick:()=>Oe(M),onMouseleave:q[8]||(q[8]=_=>m.value=""),onMouseover:_=>m.value=M.key},[I.resizeColumns&&!I.nested&&U!==0&&ue(M,!0)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"resize-handle previous",onClick:q[3]||(q[3]=t.withModifiers(()=>{},["stop"])),onMousedown:_=>P(_,u.value[U-1].key),onMouseleave:q[4]||(q[4]=_=>p.value=""),onMouseover:_=>p.value=u.value[U-1].key},null,40,mz)):t.createCommentVNode("",!0),t.createElementVNode("div",{"aria-describedby":M.tooltip||o[ce(M.key)]?`${ce(M.key)}-${t.unref(i)}`:void 0,class:t.normalizeClass(["table-headers-container",{resized:f.value===M.key}])},[M.key!==t.unref($e).BULK_ACTIONS?t.renderSlot(I.$slots,X(M.key),{key:0,column:M},()=>[t.createElementVNode("span",{class:t.normalizeClass(["table-header-label",{"sr-only":M.hideLabel||M.key===t.unref($e).ACTIONS&&M.hideLabel!==!1}])},t.toDisplayString(M.label?M.label:M.key),3)],!0):(t.openBlock(),t.createElementBlock("div",gz,[t.createVNode(Ca,{modelValue:Ye.value,"onUpdate:modelValue":q[5]||(q[5]=_=>Ye.value=_),"aria-label":"Toggle selection for all rows",class:"table-header-bulk-actions-checkbox","data-testid":"table-header-bulk-actions-checkbox",indeterminate:it.value,onChange:mn},null,8,["modelValue","indeterminate"])])),M.tooltip||I.$slots[ce(M.key)]?(t.openBlock(),t.createBlock(Et,{key:2,"data-testid":ce(M.key),"kpop-attributes":{target:I.tooltipTarget},"max-width":"300","tooltip-id":`${ce(M.key)}-${t.unref(i)}`},{content:t.withCtx(()=>[t.renderSlot(I.$slots,ce(M.key),{column:M},()=>[t.createTextVNode(t.toDisplayString(M.tooltip),1)],!0)]),default:t.withCtx(()=>[t.createVNode(t.unref(In),{class:"header-tooltip-trigger",color:`var(--kui-color-text-neutral, ${t.unref(Qt)})`,size:t.unref(Yt),tabindex:"0"},null,8,["color","size"])]),_:2},1032,["data-testid","kpop-attributes","tooltip-id"])):t.createCommentVNode("",!0),je(M)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[O.value===M.key?(t.openBlock(),t.createBlock(t.unref(kl),{key:0,class:"active-sort-icon",color:`var(--kui-color-text-primary, ${t.unref(Rd)})`,decorative:"",size:t.unref(Yt)},null,8,["color","size"])):(t.openBlock(),t.createBlock(t.unref(jy),{key:1,class:"sort-icon",color:`var(--kui-color-text-neutral-weak, ${t.unref(Ld)})`,size:t.unref(Yt),title:`Sort by ${M.label}`},null,8,["color","size","title"]))],64)):t.createCommentVNode("",!0)],10,hz),I.resizeColumns&&!I.nested&&U!==u.value.length-1&&ue(M)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"resize-handle",onClick:q[6]||(q[6]=t.withModifiers(()=>{},["stop"])),onMousedown:_=>P(_,M.key),onMouseleave:q[7]||(q[7]=_=>p.value=""),onMouseover:_=>p.value=M.key},null,40,yz)):t.createCommentVNode("",!0),ie(M.key)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0)],46,pz))),128))],2)],2)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.data,(M,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ne.value.get(M)},[t.createElementVNode("tr",t.mergeProps({class:{"last-row":U===I.data.length-1&&!$.value.includes(U)},role:I.rowLink(M).to?"link":void 0,tabindex:N.value&&!I.rowLink(M).to?0:void 0},{ref_for:!0},I.rowAttrs(M)),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,se)=>(t.openBlock(),t.createElementBlock("td",t.mergeProps({key:`${ne.value.get(M)}-cell-${_.key}`,class:{"resize-hover":I.resizeColumns&&!I.nested&&G.value===_.key&&se!==u.value.length-1&&ue(_),"row-link":!!I.rowLink(M).to,"sticky-column":(_.key===t.unref($e).BULK_ACTIONS||_.key===t.unref($e).EXPANDABLE)&&E.value,"second-sticky-column":_.key===t.unref($e).BULK_ACTIONS&&Z.value,"has-row-scroll-overlay":ie(_.key)},style:Le.value[_.key]},{ref_for:!0},I.cellAttrs({headerKey:_.key,row:M,rowIndex:U,colIndex:se}),t.toHandlers(fe.value(M[_.key],M),!0)),[_.key!==t.unref($e).EXPANDABLE?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(xt(M,_.key)),t.mergeProps({key:0,class:"cell-wrapper"},{ref_for:!0},kt(M,_.key)),{default:t.withCtx(()=>[_.key!==t.unref($e).BULK_ACTIONS&&_.key!==t.unref($e).ACTIONS?t.renderSlot(I.$slots,_.key,{key:0,row:M,rowKey:U,rowValue:M[_.key]},()=>[t.createTextVNode(t.toDisplayString(M[_.key]),1)],!0):_.key===t.unref($e).BULK_ACTIONS&&Xe(M)?(t.openBlock(),t.createBlock(Et,{key:1,"kpop-attributes":{target:I.tooltipTarget},"max-width":"200",placement:"bottom-start",text:nt(M)?void 0:wt(M)},{default:t.withCtx(()=>[t.createVNode(Ca,{modelValue:Xe(M).selected,"onUpdate:modelValue":oe=>Xe(M).selected=oe,"aria-label":"Toggle row selection",class:"bulk-actions-checkbox","data-testid":"bulk-actions-checkbox",disabled:!nt(M)},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["kpop-attributes","text"])):_.key===t.unref($e).ACTIONS?(t.openBlock(),t.createBlock(Fn,{key:2,class:"actions-dropdown","data-testid":"actions-dropdown","kpop-attributes":{placement:"bottom-end"},onToggleDropdown:oe=>Se(M,oe)},{items:t.withCtx(()=>[t.renderSlot(I.$slots,"action-items",{row:M},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Ie,{appearance:"tertiary","aria-label":_.label,class:"actions-dropdown-trigger","data-testid":"row-actions-dropdown-trigger",icon:"",size:"small",onMouseleave:q[9]||(q[9]=oe=>k.value=!1),onMouseover:q[10]||(q[10]=oe=>k.value=!0)},{default:t.withCtx(()=>[t.createVNode(t.unref(Dd),{class:"more-icon",decorative:""})]),_:2},1032,["aria-label"])]),_:2},1032,["onToggleDropdown"])):t.createCommentVNode("",!0)]),_:2},1040)):I.rowExpandable(M)?(t.openBlock(),t.createElementBlock("div",vz,[t.createElementVNode("button",{"aria-controls":`table-${t.unref(i)}-row-${U}-expandable-content`,"aria-expanded":$.value.includes(U),"aria-label":"Toggle row expandable content",class:t.normalizeClass(["expandable-row-control",{expanded:$.value.includes(U)}]),"data-testid":"expandable-row-control",type:"button",onClick:oe=>Y(U,M)},[t.createVNode(t.unref(Cl),{class:"expandable-row-control-icon",decorative:""})],10,wz)])):t.createCommentVNode("",!0),ie(_.key)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0)],16))),128))],16,bz),Z.value&&I.rowExpandable(M)?t.withDirectives((t.openBlock(),t.createElementBlock("tr",{key:0,id:`table-${t.unref(i)}-row-${U}-expandable-content`,class:"expandable-content-row","data-testid":"expandable-content-row"},[t.createElementVNode("td",{colspan:u.value.length},[t.createElementVNode("div",Sz,[t.renderSlot(I.$slots,"row-expanded",{columnWidths:le.value,nestedHeaders:te.value,row:M},void 0,!0)])],8,Cz)],8,kz)),[[t.vShow,$.value.includes(U)]]):t.createCommentVNode("",!0)],64))),128))])],10,fz)],36),!K.value&&!Z.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["scroll-overlay table-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["scroll-overlay table-overlay right",{"overlay-visible":V.value,"scrollbar-offset":S.value}])},null,2),Ze.value?(t.openBlock(),t.createBlock(ka,t.mergeProps({key:1,class:"table-pagination","data-testid":"table-pagination"},I.paginationAttributes,{onGetNextOffset:q[11]||(q[11]=M=>a("get-next-offset")),onGetPreviousOffset:q[12]||(q[12]=M=>a("get-previous-offset")),onPageChange:q[13]||(q[13]=M=>a("page-change",M)),onPageSizeChange:j}),null,16)):t.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-b4e603fb"]]),K1=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ft.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{expose:n,emit:r}){const a=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),o=t.computed(()=>{const j=/^on[^a-z]/;return P2(a,(we,R)=>j.test(R))}),i=r,l=t.useSlots(),{useDebounce:d,useRequest:c,useSwrvState:s,clientSideSorter:u}=Rn(),f=t.useId(),p=t.ref([]),m=t.computed(()=>e.sortable?e.headers:e.headers.map(j=>({...j,sortable:!1}))),y=t.computed(()=>e.emptyStateButtonAppearance?e.emptyStateButtonAppearance:e.searchInput?"tertiary":"primary"),b=t.ref(0),h=t.ref(1),g=t.ref(n1(e.tablePreferences,e.paginationAttributes)),v=t.ref(e.searchInput??""),w=t.ref(e.tablePreferences.sortColumnKey||e.initialFetcherParams.sortColumnKey||""),C=t.ref(e.tablePreferences.sortColumnOrder||e.initialFetcherParams.sortColumnOrder||"desc"),S=t.ref(!w.value),B=t.ref(null),E=t.ref([]),V=t.ref(!0),O=t.ref(!1),D={pageSize:g.value,page:h.value,query:v.value,sortColumnKey:w.value,sortColumnOrder:C.value,offset:B.value},N=t.computed(()=>({totalCount:b.value,initialPageSize:g.value,currentPage:h.value,offsetPreviousButtonDisabled:!re.value,offsetNextButtonDisabled:!fe.value||!V.value,...e.paginationAttributes})),A=j=>j.startsWith("column-"),k=j=>j.startsWith("tooltip-"),x=j=>m.value.some(we=>we.key===j),T=t.computed(()=>l?Object.keys(l).filter(A):[]),L=t.computed(()=>l?Object.keys(l).filter(k):[]),K=t.computed(()=>l?Object.keys(l).filter(x):[]),z=t.computed(()=>({sortColumnKey:w.value,sortColumnOrder:C.value})),W=t.computed(()=>({pageSize:g.value,page:h.value,query:v.value,offset:B.value,...e.clientSort?{}:z.value})),H=t.computed(()=>({...W.value,...z.value})),ne=t.ref(!0),X=async()=>{const j=await e.fetcher(H.value);return ne.value=!1,j},ce=()=>{var we;const j={...D,...e.initialFetcherParams};h.value=j.page??D.page,g.value=j.pageSize??D.pageSize,v.value=j.query??D.query,w.value=j.sortColumnKey??D.sortColumnKey,C.value=j.sortColumnOrder??D.sortColumnOrder,e.clientSort&&w.value&&C.value&&u(w.value,"",C.value,p.value),(we=e.paginationAttributes)!=null&&we.offset&&(B.value=j.offset,E.value.push(j.offset)),O.value=!0},re=t.computed(()=>E.value[h.value-1]),fe=t.ref(null),Ee=t.computed(()=>{if(!e.fetcher||!O.value)return"";let j=f;return e.cacheIdentifier&&(j=e.cacheIdentifier),j+=`-${JSON.stringify(W.value)}`,e.fetcherCacheKey&&(j+=`-${e.fetcherCacheKey}`),`k-table_${j}`}),{debouncedFn:ye,generateDebouncedFn:ke}=d(j=>{v.value=j},350),De=ke(0),{data:Le,response:xe,error:Oe,revalidate:Me,isValidating:G,isLoading:Q}=c(()=>Ee.value,()=>X(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:J,hasData:P}=s(Le,Oe,G),ie=t.computed(()=>({hasData:P.value,state:J.value})),me=t.computed(()=>Q.value?"loading":Oe.value?"error":"success"),{debouncedFn:ue}=d(Me,500),Se=({sortColumnKey:j,prevKey:we,sortColumnOrder:R})=>{var F;S.value=!0;const Z=m.value.find($=>$.key===j),{useSortHandlerFunction:he}=Z;if(i("sort",{prevKey:we,sortColumnKey:j,sortColumnOrder:R}),h.value=1,(!w.value||j!==w.value)&&(E.value=[null]),w.value=j,C.value=R,e.clientSort)if(he&&e.sortHandlerFunction){const $=e.sortHandlerFunction({key:j,prevKey:we,sortColumnOrder:C.value,data:p.value});$&&(p.value=[...$])}else u(j,we,C.value,p.value);else(F=e.paginationAttributes)!=null&&F.offset||ue()},Ze=({page:j})=>{h.value=j},je=({pageSize:j})=>{E.value=[null],B.value=null,g.value=j,h.value=1},Ae=({columnWidths:j,columnVisibility:we})=>{We.value=j,Xe.value=we,wt()},We=t.ref({}),Xe=t.ref({}),nt=t.computed(()=>({pageSize:g.value,sortColumnKey:w.value,sortColumnOrder:C.value,...We.value?{columnWidths:We.value}:{},...Xe.value?{columnVisibility:Xe.value}:{}})),wt=()=>{me.value==="success"&&i("update:table-preferences",nt.value)},xt=()=>{h.value++,B.value=fe.value},kt=()=>{h.value--,B.value=re.value},at=t.computed(()=>{var we,R,Z;if(!e.fetcher||e.hidePagination)return!1;const j=((R=(we=e.paginationAttributes)==null?void 0:we.pageSizes)==null?void 0:R[0])??t1;return e.hidePaginationWhenOptional&&h.value===1?(Z=e.paginationAttributes)!=null&&Z.offset?!!re.value||!!fe.value||p.value.length>=j:b.value>j:!0});return t.watch(xe,j=>{var we,R,Z,he;j!=null&&j.data&&(p.value=[...j.data],b.value=((we=e.paginationAttributes)==null?void 0:we.totalCount)||j.total||((R=j.data)==null?void 0:R.length)||0,(Z=e.paginationAttributes)!=null&&Z.offset&&((he=j.pagination)!=null&&he.offset?(fe.value=j.pagination.offset,E.value[h.value]||E.value.push(j.pagination.offset)):fe.value=null,V.value=j.pagination&&"hasNextPage"in j.pagination?j.pagination.hasNextPage||!1:!0),p.value.length===0&&h.value>1&&(h.value=1,E.value=[null],B.value=null),e.sortable&&!S.value&&Se({sortColumnKey:w.value,prevKey:"",sortColumnOrder:C.value}))},{deep:!0,immediate:!0}),t.watch([ie,me],j=>{const[we,R]=j;i("state",{state:R,hasData:we.hasData})}),t.watch(()=>e.searchInput,j=>{j===""?De(j):ye(j)},{immediate:!0}),t.watch([v,g],async(j,we)=>{const[R]=we,[Z]=j;Z!==R&&h.value!==1&&(h.value=1,E.value=[null],B.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{ce()}),n({revalidate:()=>{Me()}}),(j,we)=>(t.openBlock(),t.createBlock(Uc,t.mergeProps({"cell-attrs":j.cellAttrs,class:"k-table-data",data:p.value,"empty-state-action-message":j.emptyStateActionMessage,"empty-state-action-route":j.emptyStateActionRoute,"empty-state-button-appearance":y.value,"empty-state-icon-variant":j.emptyStateIconVariant,"empty-state-message":j.emptyStateMessage,"empty-state-title":j.emptyStateTitle,error:j.error,"error-state-action-message":j.errorStateActionMessage,"error-state-action-route":j.errorStateActionRoute,"error-state-message":j.errorStateMessage,"error-state-title":j.errorStateTitle,headers:m.value,"hide-headers":j.hideHeaders,"hide-pagination":j.hidePagination||!at.value,"hide-pagination-when-optional":!1,"hide-toolbar":j.hideToolbar,loading:j.loading||t.unref(Q),"max-height":j.maxHeight,nested:j.nested,"pagination-attributes":N.value,"resize-columns":j.resizeColumns,"row-attrs":j.rowAttrs,"row-bulk-action-enabled":j.rowBulkActionEnabled,"row-expandable":j.rowExpandable,"row-expanded":j.rowExpanded,"row-hover":j.rowHover,"row-key":j.rowKey,"row-link":j.rowLink,"table-preferences":nt.value,"tooltip-target":j.tooltipTarget},o.value,{onEmptyStateActionClick:we[0]||(we[0]=R=>i("empty-state-action-click")),onErrorActionClick:we[1]||(we[1]=R=>i("error-action-click")),onGetNextOffset:xt,onGetPreviousOffset:kt,onPageChange:Ze,onPageSizeChange:je,onRowActionsToggle:we[2]||(we[2]=R=>j.$emit("row-actions-toggle",R)),onRowSelect:we[3]||(we[3]=R=>i("row-select",R)),onSort:Se,"onUpdate:rowExpanded":we[4]||(we[4]=R=>i("update:row-expanded",R)),"onUpdate:tablePreferences":Ae}),t.createSlots({_:2},[l.toolbar&&!j.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"toolbar",{state:ie.value})]),key:"0"}:void 0,l["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(R)))]),key:"1"}:void 0,l["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(R)))]),key:"2"}:void 0,l["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"error-state")]),key:"3"}:void 0,l["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"empty-state")]),key:"4"}:void 0,l["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(T.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),t.renderList(L.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),t.renderList(K.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),l["action-items"]?{name:"action-items",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(R)))]),key:"6"}:void 0,l["row-expanded"]?{name:"row-expanded",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(R)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}}),$z={class:"k-slider","data-testid":"k-slider"},Ez={class:"slider-container"},Bz={class:"input-value"},Dz=["id","disabled","list","max","min","step"],Tz=["id"],Nz=["data-testid","label","value"],xz={"aria-hidden":"true",class:"slider-marks","data-testid":"slider-marks"},Mz=["data-testid"],W1=pe(t.defineComponent({__name:"KSlider",props:t.mergeModels({label:{default:""},min:{default:0},max:{default:10},step:{default:1},showMarks:{type:Boolean,default:!1},marks:{default:()=>[]},showValue:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelAttributes:{default:()=>({})}},{modelValue:{required:!0,type:Number},modelModifiers:{}}),emits:t.mergeModels(["change","update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const r=n,a=t.useId(),o=t.computed(()=>({width:y(u.value)})),i=t.computed(()=>({left:y(u.value),transform:`translateX(-${y(u.value)})`})),l=()=>{r("change",u.value),c()},d=t.useTemplateRef("thumbPopover"),c=()=>{var b;(b=d.value)==null||b.showPopover()},s=()=>{var b;(b=d.value)==null||b.hidePopover()},u=t.useModel(e,"modelValue"),f=t.computed(()=>{if(e.max<=e.min||e.step<=0)return[];const b=[];for(let h=e.min;h<=e.max;h+=e.step)b.push(h);return b}),p=b=>b>=e.min&&b<=e.max&&f.value.includes(b),m=t.computed(()=>{var b,h;if(e.marks.length){if(typeof e.marks[0]=="object")return e.marks.filter(g=>p(g.value));{const g=e.marks.filter(v=>p(v)).map(v=>({label:String(v),value:v}));return((b=g[0])==null?void 0:b.value)!==e.min&&g.unshift({label:String(e.min),value:e.min}),((h=g.at(-1))==null?void 0:h.value)!==e.max&&g.push({label:String(e.max),value:e.max}),g}}return e.showMarks?f.value.map(g=>({label:String(g),value:g})):[{label:String(e.min),value:e.min},{label:String(e.max),value:e.max}]}),y=b=>`${(b-e.min)/(e.max-e.min)*100}%`;return t.watch(()=>e.max,b=>{b<=e.min&&console.warn(`KSlider: max value ${b} must be greater than min value ${e.min}.`)},{immediate:!0}),t.watch(()=>e.step,b=>{e.max>e.min&&(b<=0||(e.max-e.min)%b!==0)&&console.warn(`KSlider: step value ${b} is invalid.`)},{immediate:!0}),t.watch(u,b=>{e.max>e.min&&!p(b)&&(console.warn(`KSelect: value ${b} is out of range [${f.value.join(", ")}]. Setting to min value ${e.min}.`),u.value=e.min)},{immediate:!0}),t.watch(()=>e.marks,b=>{if(b.length){let h=[];h=b.filter(g=>!p(typeof e.marks[0]=="object"?g.value:g)),h.length&&console.warn(`KSlider: marks [${h.map(g=>typeof h[0]=="object"?g.value:g).join(", ")}] are out of range [${f.value.join(", ")}].`)}},{immediate:!0}),(b,h)=>(t.openBlock(),t.createElementBlock("div",$z,[b.label?(t.openBlock(),t.createBlock(_t,t.mergeProps({key:0},b.labelAttributes,{for:`${t.unref(a)}-input`}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:1},16,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",Ez,[t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["lower-range-track",{"is-disabled":b.disabled}]),style:t.normalizeStyle(o.value)},null,6),t.createVNode(Ln,{ref:"thumbPopover","aria-hidden":"true",disabled:b.disabled||!b.showValue,"hide-close-icon":"",placement:"top","popover-timeout":500,trigger:"hover",width:"auto"},{content:t.withCtx(()=>[t.createElementVNode("span",Bz,t.toDisplayString(u.value),1)]),default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["thumb",{"is-disabled":b.disabled}]),style:t.normalizeStyle(i.value)},null,6)]),_:1},8,["disabled"]),t.withDirectives(t.createElementVNode("input",{id:`${t.unref(a)}-input`,"onUpdate:modelValue":h[0]||(h[0]=g=>u.value=g),"data-testid":"slider-input",disabled:b.disabled,list:`${t.unref(a)}-markers`,max:b.max,min:b.min,step:b.step,type:"range",onBlur:s,onFocus:c,onInput:l,onMouseup:s,onTouchend:s},null,40,Dz),[[t.vModelText,u.value,void 0,{number:!0}]]),t.createElementVNode("datalist",{id:`${t.unref(a)}-markers`,"data-testid":"slider-datalist-marks"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,g=>(t.openBlock(),t.createElementBlock("option",{key:`datalist-mark-${g.value}`,"data-testid":`datalist-mark-${g.value}`,label:g.label,style:t.normalizeStyle({left:y(g.value)}),value:g.value},null,12,Nz))),128))],8,Tz),t.createElementVNode("div",xz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,g=>(t.openBlock(),t.createElementBlock("span",{key:`mark-${g.value}`,"data-testid":`mark-${g.value}`,style:t.normalizeStyle({left:y(g.value)})},t.toDisplayString(g.label||g.value),13,Mz))),128))])])]))}}),[["__scopeId","data-v-29cb81de"]]),jc=Object.freeze(Object.defineProperty({__proto__:null,KAlert:Fd,KBadge:Or,KBreadcrumbs:pu,KButton:Ie,KCard:Vl,KCatalog:vu,KCatalogItem:Yl,KCheckbox:Ca,KClipboardProvider:bl,KCodeBlock:Af,KCodeBlockIconButton:pr,KCollapse:If,KComponent:Gc,KCopy:_1,KDateTimePicker:Rg,KDropdown:Fn,KDropdownItem:wo,KDropdownMenu:Fn,KEmptyState:zn,KExternalLink:H1,KFileUpload:zg,KInput:Cn,KInputSwitch:Fg,KLabel:_t,KModal:kc,KModalFullscreen:Xg,KMultiselect:r1,KPagination:ka,KPop:Ln,KPrompt:a1,KRadio:o1,KSegmentedControl:ks,KSelect:l1,KSkeleton:wa,KSkeletonBox:At,KSlideout:s1,KSlider:W1,KStepper:c1,KTable:u1,KTableData:K1,KTableView:Uc,KTabs:f1,KTextArea:h1,KToaster:$c,KToggle:ma,KTooltip:Et,KTreeList:Y1,KTruncate:q1,ToastManager:g1},Symbol.toStringTag,{value:"Module"})),Az={install:e=>{for(const n in jc)e.component(n,jc[n])}};ee.AlertAppearances=xr,ee.BadgeAppearances=j1,ee.BadgeMethodAppearances=vl,ee.ButtonAppearances=Qc,ee.ButtonSizes=G1,ee.CardSizeArray=Z1,ee.DateTimePickerModes=ha,ee.EmptyStateIconVariants=Ft,ee.HeaderTags=Q1,ee.KAlert=Fd,ee.KBadge=Or,ee.KBreadcrumbs=pu,ee.KButton=Ie,ee.KCard=Vl,ee.KCatalog=vu,ee.KCatalogItem=Yl,ee.KCheckbox=Ca,ee.KClipboardProvider=bl,ee.KCodeBlock=Af,ee.KCodeBlockIconButton=pr,ee.KCollapse=If,ee.KComponent=Gc,ee.KCopy=_1,ee.KDateTimePicker=Rg,ee.KDropdown=Fn,ee.KDropdownItem=wo,ee.KDropdownMenu=Fn,ee.KEmptyState=zn,ee.KExternalLink=H1,ee.KFileUpload=zg,ee.KInput=Cn,ee.KInputSwitch=Fg,ee.KLabel=_t,ee.KModal=kc,ee.KModalFullscreen=Xg,ee.KMultiselect=r1,ee.KPagination=ka,ee.KPop=Ln,ee.KPrompt=a1,ee.KRadio=o1,ee.KSegmentedControl=ks,ee.KSelect=l1,ee.KSkeleton=wa,ee.KSkeletonBox=At,ee.KSlideout=s1,ee.KSlider=W1,ee.KStepper=c1,ee.KTable=u1,ee.KTableData=K1,ee.KTableView=Uc,ee.KTabs=f1,ee.KTextArea=h1,ee.KToaster=$c,ee.KToggle=ma,ee.KTooltip=Et,ee.KTreeList=Y1,ee.KTruncate=q1,ee.MethodsArray=ty,ee.ModeArray=ey,ee.ModeArrayCustom=Zc,ee.ModeArrayRelative=Xc,ee.ModeDateOnly=Jc,ee.PopPlacementsArray=ry,ee.PopTriggerArray=ny,ee.RadioTypesArray=ay,ee.SkeletonBoxHeightArray=ly,ee.SkeletonBoxWidthArray=iy,ee.SkeletonTypeArray=oy,ee.StepperStateArray=sy,ee.TableViewHeaderKeys=$e,ee.TimepickerMode=J1,ee.ToastManager=g1,ee.ToasterAppearances=wl,ee.TriggerAlignmentArray=X1,ee.components=jc,ee.default=Az,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
42
|
+
*/function y1(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function un(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?y1(Object(r),!0).forEach(function(a){nR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function rl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rl=function(n){return typeof n}:rl=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rl(e)}function nR(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Nn(){return Nn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Nn.apply(this,arguments)}function rR(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,i;for(i=0;i<a.length;i++)o=a[i],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}function aR(e,n){if(e==null)return{};var r=rR(e,n),a,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)a=i[o],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var oR="1.14.0";function xn(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Mn=xn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ga=xn(/Edge/i),b1=xn(/firefox/i),Qa=xn(/safari/i)&&!xn(/chrome/i)&&!xn(/android/i),v1=xn(/iP(ad|od|hone)/i),iR=xn(/chrome/i)&&xn(/android/i),w1={capture:!1,passive:!1};function Pe(e,n,r){e.addEventListener(n,r,!Mn&&w1)}function Ne(e,n,r){e.removeEventListener(n,r,!Mn&&w1)}function al(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function lR(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function fn(e,n,r,a){if(e){r=r||document;do{if(n!=null&&(n[0]===">"?e.parentNode===r&&al(e,n):al(e,n))||a&&e===r)return e;if(e===r)break}while(e=lR(e))}return null}var k1=/\s+/g;function Dt(e,n,r){if(e&&n)if(e.classList)e.classList[r?"add":"remove"](n);else{var a=(" "+e.className+" ").replace(k1," ").replace(" "+n+" "," ");e.className=(a+(r?" "+n:"")).replace(k1," ")}}function be(e,n,r){var a=e&&e.style;if(a){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),n===void 0?r:r[n];!(n in a)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),a[n]=r+(typeof r=="string"?"":"px")}}function sa(e,n){var r="";if(typeof e=="string")r=e;else do{var a=be(e,"transform");a&&a!=="none"&&(r=a+" "+r)}while(!n&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function C1(e,n,r){if(e){var a=e.getElementsByTagName(n),o=0,i=a.length;if(r)for(;o<i;o++)r(a[o],o);return a}return[]}function pn(){var e=document.scrollingElement;return e||document.documentElement}function tt(e,n,r,a,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,l,d,c,s,u,f;if(e!==window&&e.parentNode&&e!==pn()?(i=e.getBoundingClientRect(),l=i.top,d=i.left,c=i.bottom,s=i.right,u=i.height,f=i.width):(l=0,d=0,c=window.innerHeight,s=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(n||r)&&e!==window&&(o=o||e.parentNode,!Mn))do if(o&&o.getBoundingClientRect&&(be(o,"transform")!=="none"||r&&be(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(be(o,"border-top-width")),d-=p.left+parseInt(be(o,"border-left-width")),c=l+i.height,s=d+i.width;break}while(o=o.parentNode);if(a&&e!==window){var m=sa(o||e),y=m&&m.a,b=m&&m.d;m&&(l/=b,d/=y,f/=y,u/=b,c=l+u,s=d+f)}return{top:l,left:d,bottom:c,right:s,width:f,height:u}}}function S1(e,n,r){for(var a=Zn(e,!0),o=tt(e)[n];a;){var i=tt(a)[r],l=void 0;if(l=o>=i,!l)return a;if(a===pn())break;a=Zn(a,!1)}return!1}function ca(e,n,r,a){for(var o=0,i=0,l=e.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==ve.ghost&&(a||l[i]!==ve.dragged)&&fn(l[i],r.draggable,e,!1)){if(o===n)return l[i];o++}i++}return null}function Bc(e,n){for(var r=e.lastElementChild;r&&(r===ve.ghost||be(r,"display")==="none"||n&&!al(r,n));)r=r.previousElementSibling;return r||null}function zt(e,n){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ve.clone&&(!n||al(e,n))&&r++;return r}function $1(e){var n=0,r=0,a=pn();if(e)do{var o=sa(e),i=o.a,l=o.d;n+=e.scrollLeft*i,r+=e.scrollTop*l}while(e!==a&&(e=e.parentNode));return[n,r]}function sR(e,n){for(var r in e)if(e.hasOwnProperty(r)){for(var a in n)if(n.hasOwnProperty(a)&&n[a]===e[r][a])return Number(r)}return-1}function Zn(e,n){if(!e||!e.getBoundingClientRect)return pn();var r=e,a=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var o=be(r);if(r.clientWidth<r.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return pn();if(a||n)return r;a=!0}}while(r=r.parentNode);return pn()}function cR(e,n){if(e&&n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function Dc(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var Za;function E1(e,n){return function(){if(!Za){var r=arguments,a=this;r.length===1?e.call(a,r[0]):e.apply(a,r),Za=setTimeout(function(){Za=void 0},n)}}}function dR(){clearTimeout(Za),Za=void 0}function B1(e,n,r){e.scrollLeft+=n,e.scrollTop+=r}function D1(e){var n=window.Polymer,r=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var Tt="Sortable"+new Date().getTime();function uR(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var a=[].slice.call(this.el.children);a.forEach(function(o){if(!(be(o,"display")==="none"||o===ve.ghost)){e.push({target:o,rect:tt(o)});var i=un({},e[e.length-1].rect);if(o.thisAnimationDuration){var l=sa(o,!0);l&&(i.top-=l.f,i.left-=l.e)}o.fromRect=i}})}},addAnimationState:function(a){e.push(a)},removeAnimationState:function(a){e.splice(sR(e,{target:a}),1)},animateAll:function(a){var o=this;if(!this.options.animation){clearTimeout(n),typeof a=="function"&&a();return}var i=!1,l=0;e.forEach(function(d){var c=0,s=d.target,u=s.fromRect,f=tt(s),p=s.prevFromRect,m=s.prevToRect,y=d.rect,b=sa(s,!0);b&&(f.top-=b.f,f.left-=b.e),s.toRect=f,s.thisAnimationDuration&&Dc(p,f)&&!Dc(u,f)&&(y.top-f.top)/(y.left-f.left)===(u.top-f.top)/(u.left-f.left)&&(c=pR(y,p,m,o.options)),Dc(f,u)||(s.prevFromRect=u,s.prevToRect=f,c||(c=o.options.animation),o.animate(s,y,f,c)),c&&(i=!0,l=Math.max(l,c),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},c),s.thisAnimationDuration=c)}),clearTimeout(n),i?n=setTimeout(function(){typeof a=="function"&&a()},l):typeof a=="function"&&a(),e=[]},animate:function(a,o,i,l){if(l){be(a,"transition",""),be(a,"transform","");var d=sa(this.el),c=d&&d.a,s=d&&d.d,u=(o.left-i.left)/(c||1),f=(o.top-i.top)/(s||1);a.animatingX=!!u,a.animatingY=!!f,be(a,"transform","translate3d("+u+"px,"+f+"px,0)"),this.forRepaintDummy=fR(a),be(a,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),be(a,"transform","translate3d(0,0,0)"),typeof a.animated=="number"&&clearTimeout(a.animated),a.animated=setTimeout(function(){be(a,"transition",""),be(a,"transform",""),a.animated=!1,a.animatingX=!1,a.animatingY=!1},l)}}}}function fR(e){return e.offsetWidth}function pR(e,n,r,a){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))*a.animation}var da=[],Tc={initializeByDefault:!0},Xa={mount:function(n){for(var r in Tc)Tc.hasOwnProperty(r)&&!(r in n)&&(n[r]=Tc[r]);da.forEach(function(a){if(a.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),da.push(n)},pluginEvent:function(n,r,a){var o=this;this.eventCanceled=!1,a.cancel=function(){o.eventCanceled=!0};var i=n+"Global";da.forEach(function(l){r[l.pluginName]&&(r[l.pluginName][i]&&r[l.pluginName][i](un({sortable:r},a)),r.options[l.pluginName]&&r[l.pluginName][n]&&r[l.pluginName][n](un({sortable:r},a)))})},initializePlugins:function(n,r,a,o){da.forEach(function(d){var c=d.pluginName;if(!(!n.options[c]&&!d.initializeByDefault)){var s=new d(n,r,n.options);s.sortable=n,s.options=n.options,n[c]=s,Nn(a,s.defaults)}});for(var i in n.options)if(n.options.hasOwnProperty(i)){var l=this.modifyOption(n,i,n.options[i]);typeof l<"u"&&(n.options[i]=l)}},getEventProperties:function(n,r){var a={};return da.forEach(function(o){typeof o.eventProperties=="function"&&Nn(a,o.eventProperties.call(r[o.pluginName],n))}),a},modifyOption:function(n,r,a){var o;return da.forEach(function(i){n[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[r]=="function"&&(o=i.optionListeners[r].call(n[i.pluginName],a))}),o}};function mR(e){var n=e.sortable,r=e.rootEl,a=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,d=e.fromEl,c=e.oldIndex,s=e.newIndex,u=e.oldDraggableIndex,f=e.newDraggableIndex,p=e.originalEvent,m=e.putSortable,y=e.extraEventProperties;if(n=n||r&&r[Tt],!!n){var b,h=n.options,g="on"+a.charAt(0).toUpperCase()+a.substr(1);window.CustomEvent&&!Mn&&!Ga?b=new CustomEvent(a,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(a,!0,!0)),b.to=l||r,b.from=d||r,b.item=o||r,b.clone=i,b.oldIndex=c,b.newIndex=s,b.oldDraggableIndex=u,b.newDraggableIndex=f,b.originalEvent=p,b.pullMode=m?m.lastPutMode:void 0;var v=un(un({},y),Xa.getEventProperties(a,n));for(var w in v)b[w]=v[w];r&&r.dispatchEvent(b),h[g]&&h[g].call(n,b)}}var hR=["evt"],vt=function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.evt,i=aR(a,hR);Xa.pluginEvent.bind(ve)(n,r,un({dragEl:ae,parentEl:Ge,ghostEl:Ce,rootEl:Ke,nextEl:Dr,lastDownEl:ol,cloneEl:Qe,cloneHidden:Xn,dragStarted:eo,putSortable:ot,activeSortable:ve.active,originalEvent:o,oldIndex:ua,oldDraggableIndex:Ja,newIndex:Nt,newDraggableIndex:Jn,hideGhostForTarget:O1,unhideGhostForTarget:P1,cloneNowHidden:function(){Xn=!0},cloneNowShown:function(){Xn=!1},dispatchSortableEvent:function(d){gt({sortable:r,name:d,originalEvent:o})}},i))};function gt(e){mR(un({putSortable:ot,cloneEl:Qe,targetEl:ae,rootEl:Ke,oldIndex:ua,oldDraggableIndex:Ja,newIndex:Nt,newDraggableIndex:Jn},e))}var ae,Ge,Ce,Ke,Dr,ol,Qe,Xn,ua,Nt,Ja,Jn,il,ot,fa=!1,ll=!1,sl=[],Tr,jt,Nc,xc,T1,N1,eo,pa,to,no=!1,cl=!1,dl,ct,Mc=[],Ac=!1,ul=[],fl=typeof document<"u",pl=v1,x1=Ga||Mn?"cssFloat":"float",gR=fl&&!iR&&!v1&&"draggable"in document.createElement("div"),M1=function(){if(fl){if(Mn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),A1=function(n,r){var a=be(n),o=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=ca(n,0,r),l=ca(n,1,r),d=i&&be(i),c=l&&be(l),s=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+tt(i).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+tt(l).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&d.float&&d.float!=="none"){var f=d.float==="left"?"left":"right";return l&&(c.clear==="both"||c.clear===f)?"vertical":"horizontal"}return i&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||s>=o&&a[x1]==="none"||l&&a[x1]==="none"&&s+u>o)?"vertical":"horizontal"},yR=function(n,r,a){var o=a?n.left:n.top,i=a?n.right:n.bottom,l=a?n.width:n.height,d=a?r.left:r.top,c=a?r.right:r.bottom,s=a?r.width:r.height;return o===d||i===c||o+l/2===d+s/2},bR=function(n,r){var a;return sl.some(function(o){var i=o[Tt].options.emptyInsertThreshold;if(!(!i||Bc(o))){var l=tt(o),d=n>=l.left-i&&n<=l.right+i,c=r>=l.top-i&&r<=l.bottom+i;if(d&&c)return a=o}}),a},I1=function(n){function r(i,l){return function(d,c,s,u){var f=d.options.group.name&&c.options.group.name&&d.options.group.name===c.options.group.name;if(i==null&&(l||f))return!0;if(i==null||i===!1)return!1;if(l&&i==="clone")return i;if(typeof i=="function")return r(i(d,c,s,u),l)(d,c,s,u);var p=(l?d:c).options.group.name;return i===!0||typeof i=="string"&&i===p||i.join&&i.indexOf(p)>-1}}var a={},o=n.group;(!o||rl(o)!="object")&&(o={name:o}),a.name=o.name,a.checkPull=r(o.pull,!0),a.checkPut=r(o.put),a.revertClone=o.revertClone,n.group=a},O1=function(){!M1&&Ce&&be(Ce,"display","none")},P1=function(){!M1&&Ce&&be(Ce,"display","")};fl&&document.addEventListener("click",function(e){if(ll)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ll=!1,!1},!0);var Nr=function(n){if(ae){n=n.touches?n.touches[0]:n;var r=bR(n.clientX,n.clientY);if(r){var a={};for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);a.target=a.rootEl=r,a.preventDefault=void 0,a.stopPropagation=void 0,r[Tt]._onDragOver(a)}}},vR=function(n){ae&&ae.parentNode[Tt]._isOutsideThisEl(n.target)};function ve(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=Nn({},n),e[Tt]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return A1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:ve.supportPointer!==!1&&"PointerEvent"in window&&!Qa,emptyInsertThreshold:5};Xa.initializePlugins(this,e,r);for(var a in r)!(a in n)&&(n[a]=r[a]);I1(n);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=n.forceFallback?!1:gR,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Pe(e,"pointerdown",this._onTapStart):(Pe(e,"mousedown",this._onTapStart),Pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Pe(e,"dragover",this),Pe(e,"dragenter",this)),sl.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Nn(this,uR())}ve.prototype={constructor:ve,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(pa=null)},_getDirection:function(n,r){return typeof this.options.direction=="function"?this.options.direction.call(this,n,r,ae):this.options.direction},_onTapStart:function(n){if(n.cancelable){var r=this,a=this.el,o=this.options,i=o.preventOnFilter,l=n.type,d=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(d||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=o.filter;if(DR(a),!ae&&!(/mousedown|pointerdown/.test(l)&&n.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Qa&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=fn(c,o.draggable,a,!1),!(c&&c.animated)&&ol!==c)){if(ua=zt(c),Ja=zt(c,o.draggable),typeof u=="function"){if(u.call(this,n,c,this)){gt({sortable:r,rootEl:s,name:"filter",targetEl:c,toEl:a,fromEl:a}),vt("filter",r,{evt:n}),i&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=fn(s,f.trim(),a,!1),f)return gt({sortable:r,rootEl:f,name:"filter",targetEl:c,fromEl:a,toEl:a}),vt("filter",r,{evt:n}),!0}),u)){i&&n.cancelable&&n.preventDefault();return}o.handle&&!fn(s,o.handle,a,!1)||this._prepareDragStart(n,d,c)}}},_prepareDragStart:function(n,r,a){var o=this,i=o.el,l=o.options,d=i.ownerDocument,c;if(a&&!ae&&a.parentNode===i){var s=tt(a);if(Ke=i,ae=a,Ge=ae.parentNode,Dr=ae.nextSibling,ol=a,il=l.group,ve.dragged=ae,Tr={target:ae,clientX:(r||n).clientX,clientY:(r||n).clientY},T1=Tr.clientX-s.left,N1=Tr.clientY-s.top,this._lastX=(r||n).clientX,this._lastY=(r||n).clientY,ae.style["will-change"]="all",c=function(){if(vt("delayEnded",o,{evt:n}),ve.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!b1&&o.nativeDraggable&&(ae.draggable=!0),o._triggerDragStart(n,r),gt({sortable:o,name:"choose",originalEvent:n}),Dt(ae,l.chosenClass,!0)},l.ignore.split(",").forEach(function(u){C1(ae,u.trim(),Ic)}),Pe(d,"dragover",Nr),Pe(d,"mousemove",Nr),Pe(d,"touchmove",Nr),Pe(d,"mouseup",o._onDrop),Pe(d,"touchend",o._onDrop),Pe(d,"touchcancel",o._onDrop),b1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ae.draggable=!0),vt("delayStart",this,{evt:n}),l.delay&&(!l.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(Ga||Mn))){if(ve.eventCanceled){this._onDrop();return}Pe(d,"mouseup",o._disableDelayedDrag),Pe(d,"touchend",o._disableDelayedDrag),Pe(d,"touchcancel",o._disableDelayedDrag),Pe(d,"mousemove",o._delayedDragTouchMoveHandler),Pe(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Pe(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(c,l.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var r=n.touches?n.touches[0]:n;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ae&&Ic(ae),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Ne(n,"mouseup",this._disableDelayedDrag),Ne(n,"touchend",this._disableDelayedDrag),Ne(n,"touchcancel",this._disableDelayedDrag),Ne(n,"mousemove",this._delayedDragTouchMoveHandler),Ne(n,"touchmove",this._delayedDragTouchMoveHandler),Ne(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,r){r=r||n.pointerType=="touch"&&n,!this.nativeDraggable||r?this.options.supportPointer?Pe(document,"pointermove",this._onTouchMove):r?Pe(document,"touchmove",this._onTouchMove):Pe(document,"mousemove",this._onTouchMove):(Pe(ae,"dragend",this),Pe(Ke,"dragstart",this._onDragStart));try{document.selection?hl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,r){if(fa=!1,Ke&&ae){vt("dragStarted",this,{evt:r}),this.nativeDraggable&&Pe(document,"dragover",vR);var a=this.options;!n&&Dt(ae,a.dragClass,!1),Dt(ae,a.ghostClass,!0),ve.active=this,n&&this._appendGhost(),gt({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(jt){this._lastX=jt.clientX,this._lastY=jt.clientY,O1();for(var n=document.elementFromPoint(jt.clientX,jt.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(jt.clientX,jt.clientY),n!==r);)r=n;if(ae.parentNode[Tt]._isOutsideThisEl(n),r)do{if(r[Tt]){var a=void 0;if(a=r[Tt]._onDragOver({clientX:jt.clientX,clientY:jt.clientY,target:n,rootEl:r}),a&&!this.options.dragoverBubble)break}n=r}while(r=r.parentNode);P1()}},_onTouchMove:function(n){if(Tr){var r=this.options,a=r.fallbackTolerance,o=r.fallbackOffset,i=n.touches?n.touches[0]:n,l=Ce&&sa(Ce,!0),d=Ce&&l&&l.a,c=Ce&&l&&l.d,s=pl&&ct&&$1(ct),u=(i.clientX-Tr.clientX+o.x)/(d||1)+(s?s[0]-Mc[0]:0)/(d||1),f=(i.clientY-Tr.clientY+o.y)/(c||1)+(s?s[1]-Mc[1]:0)/(c||1);if(!ve.active&&!fa){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<a)return;this._onDragStart(n,!0)}if(Ce){l?(l.e+=u-(Nc||0),l.f+=f-(xc||0)):l={a:1,b:0,c:0,d:1,e:u,f};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");be(Ce,"webkitTransform",p),be(Ce,"mozTransform",p),be(Ce,"msTransform",p),be(Ce,"transform",p),Nc=u,xc=f,jt=i}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!Ce){var n=this.options.fallbackOnBody?document.body:Ke,r=tt(ae,!0,pl,!0,n),a=this.options;if(pl){for(ct=n;be(ct,"position")==="static"&&be(ct,"transform")==="none"&&ct!==document;)ct=ct.parentNode;ct!==document.body&&ct!==document.documentElement?(ct===document&&(ct=pn()),r.top+=ct.scrollTop,r.left+=ct.scrollLeft):ct=pn(),Mc=$1(ct)}Ce=ae.cloneNode(!0),Dt(Ce,a.ghostClass,!1),Dt(Ce,a.fallbackClass,!0),Dt(Ce,a.dragClass,!0),be(Ce,"transition",""),be(Ce,"transform",""),be(Ce,"box-sizing","border-box"),be(Ce,"margin",0),be(Ce,"top",r.top),be(Ce,"left",r.left),be(Ce,"width",r.width),be(Ce,"height",r.height),be(Ce,"opacity","0.8"),be(Ce,"position",pl?"absolute":"fixed"),be(Ce,"zIndex","100000"),be(Ce,"pointerEvents","none"),ve.ghost=Ce,n.appendChild(Ce),be(Ce,"transform-origin",T1/parseInt(Ce.style.width)*100+"% "+N1/parseInt(Ce.style.height)*100+"%")}},_onDragStart:function(n,r){var a=this,o=n.dataTransfer,i=a.options;if(vt("dragStart",this,{evt:n}),ve.eventCanceled){this._onDrop();return}vt("setupClone",this),ve.eventCanceled||(Qe=D1(ae),Qe.draggable=!1,Qe.style["will-change"]="",this._hideClone(),Dt(Qe,this.options.chosenClass,!1),ve.clone=Qe),a.cloneId=hl(function(){vt("clone",a),!ve.eventCanceled&&(a.options.removeCloneOnHide||Ke.insertBefore(Qe,ae),a._hideClone(),gt({sortable:a,name:"clone"}))}),!r&&Dt(ae,i.dragClass,!0),r?(ll=!0,a._loopId=setInterval(a._emulateDragOver,50)):(Ne(document,"mouseup",a._onDrop),Ne(document,"touchend",a._onDrop),Ne(document,"touchcancel",a._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(a,o,ae)),Pe(document,"drop",a),be(ae,"transform","translateZ(0)")),fa=!0,a._dragStartId=hl(a._dragStarted.bind(a,r,n)),Pe(document,"selectstart",a),eo=!0,Qa&&be(document.body,"user-select","none")},_onDragOver:function(n){var r=this.el,a=n.target,o,i,l,d=this.options,c=d.group,s=ve.active,u=il===c,f=d.sort,p=ot||s,m,y=this,b=!1;if(Ac)return;function h(z,W){vt(z,y,un({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:p,target:a,completed:v,onMove:function(ne,X){return ml(Ke,r,ae,o,ne,tt(ne),n,X)},changed:w},W))}function g(){h("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function v(z){return h("dragOverCompleted",{insertion:z}),z&&(u?s._hideClone():s._showClone(y),y!==p&&(Dt(ae,ot?ot.options.ghostClass:s.options.ghostClass,!1),Dt(ae,d.ghostClass,!0)),ot!==y&&y!==ve.active?ot=y:y===ve.active&&ot&&(ot=null),p===y&&(y._ignoreWhileAnimating=a),y.animateAll(function(){h("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===ae&&!ae.animated||a===r&&!a.animated)&&(pa=null),!d.dragoverBubble&&!n.rootEl&&a!==document&&(ae.parentNode[Tt]._isOutsideThisEl(n.target),!z&&Nr(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),b=!0}function w(){Nt=zt(ae),Jn=zt(ae,d.draggable),gt({sortable:y,name:"change",toEl:r,newIndex:Nt,newDraggableIndex:Jn,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),a=fn(a,d.draggable,r,!0),h("dragOver"),ve.eventCanceled)return b;if(ae.contains(n.target)||a.animated&&a.animatingX&&a.animatingY||y._ignoreWhileAnimating===a)return v(!1);if(ll=!1,s&&!d.disabled&&(u?f||(l=Ge!==Ke):ot===this||(this.lastPutMode=il.checkPull(this,s,ae,n))&&c.checkPut(this,s,ae,n))){if(m=this._getDirection(n,a)==="vertical",o=tt(ae),h("dragOverValid"),ve.eventCanceled)return b;if(l)return Ge=Ke,g(),this._hideClone(),h("revert"),ve.eventCanceled||(Dr?Ke.insertBefore(ae,Dr):Ke.appendChild(ae)),v(!0);var C=Bc(r,d.draggable);if(!C||SR(n,m,this)&&!C.animated){if(C===ae)return v(!1);if(C&&r===n.target&&(a=C),a&&(i=tt(a)),ml(Ke,r,ae,o,a,i,n,!!a)!==!1)return g(),r.appendChild(ae),Ge=r,w(),v(!0)}else if(C&&CR(n,m,this)){var S=ca(r,0,d,!0);if(S===ae)return v(!1);if(a=S,i=tt(a),ml(Ke,r,ae,o,a,i,n,!1)!==!1)return g(),r.insertBefore(ae,S),Ge=r,w(),v(!0)}else if(a.parentNode===r){i=tt(a);var B=0,E,V=ae.parentNode!==r,O=!yR(ae.animated&&ae.toRect||o,a.animated&&a.toRect||i,m),D=m?"top":"left",N=S1(a,"top","top")||S1(ae,"top","top"),A=N?N.scrollTop:void 0;pa!==a&&(E=i[D],no=!1,cl=!O&&d.invertSwap||V),B=$R(n,a,i,m,O?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,cl,pa===a);var k;if(B!==0){var x=zt(ae);do x-=B,k=Ge.children[x];while(k&&(be(k,"display")==="none"||k===Ce))}if(B===0||k===a)return v(!1);pa=a,to=B;var T=a.nextElementSibling,L=!1;L=B===1;var K=ml(Ke,r,ae,o,a,i,n,L);if(K!==!1)return(K===1||K===-1)&&(L=K===1),Ac=!0,setTimeout(kR,30),g(),L&&!T?r.appendChild(ae):a.parentNode.insertBefore(ae,L?T:a),N&&B1(N,0,A-N.scrollTop),Ge=ae.parentNode,E!==void 0&&!cl&&(dl=Math.abs(E-tt(a)[D])),w(),v(!0)}if(r.contains(ae))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ne(document,"mousemove",this._onTouchMove),Ne(document,"touchmove",this._onTouchMove),Ne(document,"pointermove",this._onTouchMove),Ne(document,"dragover",Nr),Ne(document,"mousemove",Nr),Ne(document,"touchmove",Nr)},_offUpEvents:function(){var n=this.el.ownerDocument;Ne(n,"mouseup",this._onDrop),Ne(n,"touchend",this._onDrop),Ne(n,"pointerup",this._onDrop),Ne(n,"touchcancel",this._onDrop),Ne(document,"selectstart",this)},_onDrop:function(n){var r=this.el,a=this.options;if(Nt=zt(ae),Jn=zt(ae,a.draggable),vt("drop",this,{evt:n}),Ge=ae&&ae.parentNode,Nt=zt(ae),Jn=zt(ae,a.draggable),ve.eventCanceled){this._nulling();return}fa=!1,cl=!1,no=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Oc(this.cloneId),Oc(this._dragStartId),this.nativeDraggable&&(Ne(document,"drop",this),Ne(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Qa&&be(document.body,"user-select",""),be(ae,"transform",""),n&&(eo&&(n.cancelable&&n.preventDefault(),!a.dropBubble&&n.stopPropagation()),Ce&&Ce.parentNode&&Ce.parentNode.removeChild(Ce),(Ke===Ge||ot&&ot.lastPutMode!=="clone")&&Qe&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),ae&&(this.nativeDraggable&&Ne(ae,"dragend",this),Ic(ae),ae.style["will-change"]="",eo&&!fa&&Dt(ae,ot?ot.options.ghostClass:this.options.ghostClass,!1),Dt(ae,this.options.chosenClass,!1),gt({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:n}),Ke!==Ge?(Nt>=0&&(gt({rootEl:Ge,name:"add",toEl:Ge,fromEl:Ke,originalEvent:n}),gt({sortable:this,name:"remove",toEl:Ge,originalEvent:n}),gt({rootEl:Ge,name:"sort",toEl:Ge,fromEl:Ke,originalEvent:n}),gt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),ot&&ot.save()):Nt!==ua&&Nt>=0&&(gt({sortable:this,name:"update",toEl:Ge,originalEvent:n}),gt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),ve.active&&((Nt==null||Nt===-1)&&(Nt=ua,Jn=Ja),gt({sortable:this,name:"end",toEl:Ge,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){vt("nulling",this),Ke=ae=Ge=Ce=Dr=Qe=ol=Xn=Tr=jt=eo=Nt=Jn=ua=Ja=pa=to=ot=il=ve.dragged=ve.ghost=ve.clone=ve.active=null,ul.forEach(function(n){n.checked=!0}),ul.length=Nc=xc=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":ae&&(this._onDragOver(n),wR(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],r,a=this.el.children,o=0,i=a.length,l=this.options;o<i;o++)r=a[o],fn(r,l.draggable,this.el,!1)&&n.push(r.getAttribute(l.dataIdAttr)||BR(r));return n},sort:function(n,r){var a={},o=this.el;this.toArray().forEach(function(i,l){var d=o.children[l];fn(d,this.options.draggable,o,!1)&&(a[i]=d)},this),r&&this.captureAnimationState(),n.forEach(function(i){a[i]&&(o.removeChild(a[i]),o.appendChild(a[i]))}),r&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,r){return fn(n,r||this.options.draggable,this.el,!1)},option:function(n,r){var a=this.options;if(r===void 0)return a[n];var o=Xa.modifyOption(this,n,r);typeof o<"u"?a[n]=o:a[n]=r,n==="group"&&I1(a)},destroy:function(){vt("destroy",this);var n=this.el;n[Tt]=null,Ne(n,"mousedown",this._onTapStart),Ne(n,"touchstart",this._onTapStart),Ne(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ne(n,"dragover",this),Ne(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sl.splice(sl.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Xn){if(vt("hideClone",this),ve.eventCanceled)return;be(Qe,"display","none"),this.options.removeCloneOnHide&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),Xn=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Xn){if(vt("showClone",this),ve.eventCanceled)return;ae.parentNode==Ke&&!this.options.group.revertClone?Ke.insertBefore(Qe,ae):Dr?Ke.insertBefore(Qe,Dr):Ke.appendChild(Qe),this.options.group.revertClone&&this.animate(ae,Qe),be(Qe,"display",""),Xn=!1}}};function wR(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function ml(e,n,r,a,o,i,l,d){var c,s=e[Tt],u=s.options.onMove,f;return window.CustomEvent&&!Mn&&!Ga?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=e,c.dragged=r,c.draggedRect=a,c.related=o||n,c.relatedRect=i||tt(n),c.willInsertAfter=d,c.originalEvent=l,e.dispatchEvent(c),u&&(f=u.call(s,c,l)),f}function Ic(e){e.draggable=!1}function kR(){Ac=!1}function CR(e,n,r){var a=tt(ca(r.el,0,r.options,!0)),o=10;return n?e.clientX<a.left-o||e.clientY<a.top&&e.clientX<a.right:e.clientY<a.top-o||e.clientY<a.bottom&&e.clientX<a.left}function SR(e,n,r){var a=tt(Bc(r.el,r.options.draggable)),o=10;return n?e.clientX>a.right+o||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+o}function $R(e,n,r,a,o,i,l,d){var c=a?e.clientY:e.clientX,s=a?r.height:r.width,u=a?r.top:r.left,f=a?r.bottom:r.right,p=!1;if(!l){if(d&&dl<s*o){if(!no&&(to===1?c>u+s*i/2:c<f-s*i/2)&&(no=!0),no)p=!0;else if(to===1?c<u+dl:c>f-dl)return-to}else if(c>u+s*(1-o)/2&&c<f-s*(1-o)/2)return ER(n)}return p=p||l,p&&(c<u+s*i/2||c>f-s*i/2)?c>u+s/2?1:-1:0}function ER(e){return zt(ae)<zt(e)?1:-1}function BR(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,r=n.length,a=0;r--;)a+=n.charCodeAt(r);return a.toString(36)}function DR(e){ul.length=0;for(var n=e.getElementsByTagName("input"),r=n.length;r--;){var a=n[r];a.checked&&ul.push(a)}}function hl(e){return setTimeout(e,0)}function Oc(e){return clearTimeout(e)}fl&&Pe(document,"touchmove",function(e){(ve.active||fa)&&e.cancelable&&e.preventDefault()}),ve.utils={on:Pe,off:Ne,css:be,find:C1,is:function(n,r){return!!fn(n,r,n,!1)},extend:cR,throttle:E1,closest:fn,toggleClass:Dt,clone:D1,index:zt,nextTick:hl,cancelNextTick:Oc,detectDirection:A1,getChild:ca},ve.get=function(e){return e[Tt]},ve.mount=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n[0].constructor===Array&&(n=n[0]),n.forEach(function(a){if(!a.prototype||!a.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));a.utils&&(ve.utils=un(un({},ve.utils),a.utils)),Xa.mount(a)})},ve.create=function(e,n){return new ve(e,n)},ve.version=oR;var et=[],ro,Pc,Vc=!1,Lc,Rc,gl,ao;function TR(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(r){var a=r.originalEvent;this.sortable.nativeDraggable?Pe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Pe(document,"pointermove",this._handleFallbackAutoScroll):a.touches?Pe(document,"touchmove",this._handleFallbackAutoScroll):Pe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var a=r.originalEvent;!this.options.dragOverBubble&&!a.rootEl&&this._handleAutoScroll(a)},drop:function(){this.sortable.nativeDraggable?Ne(document,"dragover",this._handleAutoScroll):(Ne(document,"pointermove",this._handleFallbackAutoScroll),Ne(document,"touchmove",this._handleFallbackAutoScroll),Ne(document,"mousemove",this._handleFallbackAutoScroll)),V1(),yl(),dR()},nulling:function(){gl=Pc=ro=Vc=ao=Lc=Rc=null,et.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,a){var o=this,i=(r.touches?r.touches[0]:r).clientX,l=(r.touches?r.touches[0]:r).clientY,d=document.elementFromPoint(i,l);if(gl=r,a||this.options.forceAutoScrollFallback||Ga||Mn||Qa){zc(r,this.options,d,a);var c=Zn(d,!0);Vc&&(!ao||i!==Lc||l!==Rc)&&(ao&&V1(),ao=setInterval(function(){var s=Zn(document.elementFromPoint(i,l),!0);s!==c&&(c=s,yl()),zc(r,o.options,s,a)},10),Lc=i,Rc=l)}else{if(!this.options.bubbleScroll||Zn(d,!0)===pn()){yl();return}zc(r,this.options,Zn(d,!1),!1)}}},Nn(e,{pluginName:"scroll",initializeByDefault:!0})}function yl(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function V1(){clearInterval(ao)}var zc=E1(function(e,n,r,a){if(n.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,d=n.scrollSpeed,c=pn(),s=!1,u;Pc!==r&&(Pc=r,yl(),ro=n.scroll,u=n.scrollFn,ro===!0&&(ro=Zn(r,!0)));var f=0,p=ro;do{var m=p,y=tt(m),b=y.top,h=y.bottom,g=y.left,v=y.right,w=y.width,C=y.height,S=void 0,B=void 0,E=m.scrollWidth,V=m.scrollHeight,O=be(m),D=m.scrollLeft,N=m.scrollTop;m===c?(S=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),B=C<V&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(S=w<E&&(O.overflowX==="auto"||O.overflowX==="scroll"),B=C<V&&(O.overflowY==="auto"||O.overflowY==="scroll"));var A=S&&(Math.abs(v-o)<=l&&D+w<E)-(Math.abs(g-o)<=l&&!!D),k=B&&(Math.abs(h-i)<=l&&N+C<V)-(Math.abs(b-i)<=l&&!!N);if(!et[f])for(var x=0;x<=f;x++)et[x]||(et[x]={});(et[f].vx!=A||et[f].vy!=k||et[f].el!==m)&&(et[f].el=m,et[f].vx=A,et[f].vy=k,clearInterval(et[f].pid),(A!=0||k!=0)&&(s=!0,et[f].pid=setInterval((function(){a&&this.layer===0&&ve.active._onTouchMove(gl);var T=et[this.layer].vy?et[this.layer].vy*d:0,L=et[this.layer].vx?et[this.layer].vx*d:0;typeof u=="function"&&u.call(ve.dragged.parentNode[Tt],L,T,e,gl,et[this.layer].el)!=="continue"||B1(et[this.layer].el,L,T)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&p!==c&&(p=Zn(p,!1)));Vc=s}},30),L1=function(n){var r=n.originalEvent,a=n.putSortable,o=n.dragEl,i=n.activeSortable,l=n.dispatchSortableEvent,d=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(r){var s=a||i;d();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,f=document.elementFromPoint(u.clientX,u.clientY);c(),s&&!s.el.contains(f)&&(l("spill"),this.onSpill({dragEl:o,putSortable:a}))}};function Fc(){}Fc.prototype={startIndex:null,dragStart:function(n){var r=n.oldDraggableIndex;this.startIndex=r},onSpill:function(n){var r=n.dragEl,a=n.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var o=ca(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(r,o):this.sortable.el.appendChild(r),this.sortable.animateAll(),a&&a.animateAll()},drop:L1},Nn(Fc,{pluginName:"revertOnSpill"});function Yc(){}Yc.prototype={onSpill:function(n){var r=n.dragEl,a=n.putSortable,o=a||this.sortable;o.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),o.animateAll()},drop:L1},Nn(Yc,{pluginName:"removeOnSpill"}),ve.mount(new TR),ve.mount(Yc,Fc);function NR(){return typeof window<"u"?window.console:global.console}const xR=NR();function MR(e){const n=Object.create(null);return function(a){return n[a]||(n[a]=e(a))}}const AR=/-(\w)/g,R1=MR(e=>e.replace(AR,(n,r)=>r?r.toUpperCase():""));function Hc(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function z1(e,n,r){const a=r===0?e.children[0]:e.children[r-1].nextSibling;e.insertBefore(n,a)}function IR(e,n){return Object.values(e).indexOf(n)}function OR(e,n,r,a){if(!e)return[];const o=Object.values(e),i=n.length-a;return[...n].map((d,c)=>c>=i?o.length:o.indexOf(d))}function F1(e,n){this.$nextTick(()=>this.$emit(e.toLowerCase(),n))}function PR(e){return n=>{this.realList!==null&&this["onDrag"+e](n),F1.call(this,e,n)}}function VR(e){return["transition-group","TransitionGroup"].includes(e)}function LR(e){if(!e||e.length!==1)return!1;const[{type:n}]=e;return n?VR(n.name):!1}function RR(e,n){return n?{...n.props,...n.attrs}:e}const qc=["Start","Add","Remove","Update","End"],_c=["Choose","Unchoose","Sort","Filter","Clone"],zR=["Move",...qc,..._c].map(e=>"on"+e);let Kc=null;const FR={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},YR=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...qc.map(e=>e.toLowerCase()),..._c.map(e=>e.toLowerCase())],props:FR,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,n=RR(this.$attrs,this.componentData);return e?(this.transitionMode=LR(e),t.h(this.getTag(),n,e)):t.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&xR.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};qc.forEach(o=>{e["on"+o]=PR.call(this,o)}),_c.forEach(o=>{e["on"+o]=F1.bind(this,o)});const n=Object.keys(this.$attrs).reduce((o,i)=>(o[R1(i)]=this.$attrs[i],o),{}),r=Object.assign({},n,e,{onMove:(o,i)=>this.onDragMove(o,i)});!("draggable"in r)&&(r.draggable=">*");const a=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new ve(a,r),a.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(e){for(var n in e){const r=R1(n);zR.indexOf(r)===-1&&this._sortable.option(r,e[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=OR(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const n=IR(this.getChildrenNodes()||[],e);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const r=a=>a.splice(n,0,a.splice(e,1)[0]);this.alterList(r)},getVmIndex(e){const n=this.visibleIndexes,r=n.length;return e>r-1?r:n[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[e].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Kc=e.item)},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;Hc(e.item);const r=this.getVmIndex(e.newIndex);this.spliceList(r,0,n),this.computeIndexes();const a={element:n,newIndex:r};this.emitChanges({added:a})},onDragRemove(e){if(z1(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){Hc(e.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(e){Hc(e.item),z1(e.from,e.item,e.oldIndex);const n=this.context.index,r=this.getVmIndex(e.newIndex);this.updatePosition(n,r);const a={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:a})},updateProperty(e,n){e.hasOwnProperty(n)&&(e[n]+=this.headerOffset)},onDragMove(e,n){const r=this.move;if(!r||!this.realList)return!0;const a=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(a,e);Object.assign(o,{futureIndex:i});const l=Object.assign({},e,{relatedContext:a,draggedContext:o});return r(l,n)},onDragEnd(){this.computeIndexes(),Kc=null},getTrargetedComponent(e){return e.__draggable_component__},getRelatedContextFromMoveEvent({to:e,related:n}){const r=this.getTrargetedComponent(e);if(!r)return{component:r};const a=r.realList,o={list:a,component:r};if(e!==n&&a&&r.getUnderlyingVm){const i=r.getUnderlyingVm(n);if(i)return Object.assign(i,o)}return o},computeFutureIndex(e,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const a=r.indexOf(n.related),o=e.component.getVmIndex(a);return r.indexOf(Kc)!==-1||!n.willInsertAfter?o:o+1}}}),HR=["data-testid"],qR=["aria-controls","aria-expanded","aria-label"],_R=["data-testid"],KR={key:0,class:"tree-item-icon","data-testid":"tree-item-icon"},WR={class:"tree-item-label","data-testid":"tree-item-label"},UR=pe(t.defineComponent({__name:"KTreeItem",props:{item:{},disabled:{type:Boolean},hideIcons:{type:Boolean},collapsible:{type:Boolean},initialCollapse:{type:Boolean},hasChildren:{type:Boolean},controlsId:{}},emits:["selected","expanded"],setup(e,{expose:n,emit:r}){const a=r,o=t.useSlots(),i=t.computed(()=>!e.hideIcons||!!o["item-icon"]),l=u=>{u.target&&u.target.closest("a:not(.disabled), button:not([data-tree-item-trigger]), label, input, select")!==null||a("selected",e.item)},d=t.ref(!0),c=u=>{d.value=u};t.watch(()=>e.initialCollapse,(u,f)=>{u!==f&&(d.value=!u)},{immediate:!0});const s=()=>{d.value=!d.value,a("expanded",d.value)};return n({setExpandedValue:c,id:e.item.id}),(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"tree-item-wrapper","data-testid":`tree-item-wrapper-${u.item.id}`},[u.collapsible&&u.hasChildren?(t.openBlock(),t.createElementBlock("span",{key:0,"aria-controls":`tree-list-draggable-${u.controlsId}`,"aria-expanded":d.value,"aria-label":d.value?"Collapse":"Expand",class:t.normalizeClass(["tree-item-expanded-button",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-button",role:"button",onClick:t.withModifiers(s,["stop"]),onKeyup:t.withKeys(s,["enter"])},[t.createVNode(t.unref(Cl),{class:t.normalizeClass(["tree-item-expanded-icon",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-icon",decorative:"",size:t.unref(dt),tabindex:"0"},null,8,["class","size"])],42,qR)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["tree-item",{"not-draggable":u.disabled,selected:u.item.selected,expanded:u.collapsible&&d.value,collapsed:u.collapsible&&!d.value,"no-children":u.collapsible&&!u.hasChildren}]),"data-testid":`tree-item-${u.item.id}`,"data-tree-item-trigger":"true",draggable:"false",type:"button",onClick:t.withModifiers(l,["prevent"])},[i.value?(t.openBlock(),t.createElementBlock("div",KR,[t.renderSlot(u.$slots,"item-icon",{},()=>[t.createVNode(t.unref(Wy),{decorative:""})],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",WR,[t.renderSlot(u.$slots,"item-label",{},()=>[t.createTextVNode(t.toDisplayString(u.item.name),1)],!0)])],10,_R)],8,HR))}}),[["__scopeId","data-v-18967eab"]]),Wc=({children:e=[]})=>e.length===0?0:1+Math.max(...e.map(Wc)),jR=pe(t.defineComponent({__name:"KTreeDraggable",props:{items:{},disableDrag:{type:Boolean},filter:{type:[String,Function]},maxDepth:{},level:{default:0},parentId:{},hideIcons:{type:Boolean},group:{},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=r,o=t.ref(0),i=t.ref([]),l={tag:"div","force-fallback":!0,animation:"100",draggable:".tree-item-container","item-key":"id","ghost-class":"tree-item-dragged","drag-class":"tree-item-grabbing",class:"child-drop-zone","fallback-tolerance":10},d=t.ref(!1),c=t.computed(()=>[".tree-item-expanded-button",...(typeof e.filter=="function"?e.filter():e.filter).split(",").map(N=>N.trim()).filter(Boolean)].join(", ")),s=D=>{var N,A;return!((A=(N=i.value.filter(k=>k.id===D.id))==null?void 0:N[0].children)!=null&&A.length)},u=D=>D.children||[],f=D=>{e.parentId?a("child-change",{parentId:e.parentId,children:i.value,target:(D==null?void 0:D.added)||(D==null?void 0:D.removed)||(D==null?void 0:D.moved)}):a("change",{items:i.value,target:(D==null?void 0:D.added)||(D==null?void 0:D.removed)||(D==null?void 0:D.moved)})},p=D=>{a("child-change",D)},m=D=>{a("selected",D)},y=t.ref(new Map),b=(D,N)=>{y.value.set(N,D)},h=D=>e.collapsible?!!y.value.get(D):!0,g=t.useTemplateRef("tree-items"),v=()=>{var D;i.value.forEach(N=>{y.value.set(N.id,!1)}),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(!1)})},w=()=>{var D;i.value.forEach(N=>{y.value.set(N.id,!0)}),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(!0)})},C=t.computed(()=>e.level>e.maxDepth-1),S=D=>{var T,L,K,z;const N=((L=(T=D.relatedContext)==null?void 0:T.component)==null?void 0:L.$attrs.level)||0,A=(K=D.draggedContext)==null?void 0:K.element;let k=0;return(z=A.children)!=null&&z.length&&(k=Wc(A)),!(N+k>e.maxDepth-1)},B=D=>{var k,x;const N=((x=(k=D.item)==null?void 0:k._underlying_vm_)==null?void 0:x.id)||"",A=i.value.find(T=>T.id===N);d.value=!0,A&&a("selected",A),V(!0)},E=async()=>{var D;d.value=!1,V(!1),o.value++,await t.nextTick(),(D=g.value)==null||D.forEach(N=>{N==null||N.setExpandedValue(y.value.get(N==null?void 0:N.id))})},V=D=>{const N=document==null?void 0:document.getElementsByTagName("html").item(0);N&&N.classList.toggle("tree-list-grabbing",D)};t.watch(()=>e.items,(D,N)=>{JSON.stringify(D)!==JSON.stringify(N)&&(i.value=D,i.value.forEach(A=>{A.children||(A.children=[])}))});const O=()=>{i.value.forEach(D=>{y.value.set(D.id,!e.initialCollapseAll)})};return t.onMounted(async()=>{i.value=e.items,i.value.forEach(D=>{D.children||(D.children=[])}),await t.nextTick(),e.collapsible&&O()}),n({collapseAll:v,expandAll:w}),(D,N)=>{const A=t.resolveComponent("KTreeDraggable",!0);return t.openBlock(),t.createBlock(t.unref(YR),t.mergeProps(l,{class:"tree-draggable",direction:"vertical",disabled:D.disableDrag,filter:c.value,group:{name:D.group,pull:[D.group],put:C.value?[]:[D.group]},level:D.level,list:i.value,move:S,tag:"div",onChange:f,onEnd:E,onStart:B}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,k=>(t.openBlock(),t.createElementBlock("div",{key:k.id,class:t.normalizeClass(["tree-item-container",{"has-no-children":s(k)}])},[(t.openBlock(),t.createBlock(UR,{key:`tree-item-${k.id}-${o.value}`,ref_for:!0,ref:"tree-items",collapsible:D.collapsible,"controls-id":k.id,disabled:D.disableDrag,"has-children":!s(k),"hide-icons":D.hideIcons,"initial-collapse":D.initialCollapseAll,item:k,onExpanded:x=>b(x,k.id),onSelected:m},t.createSlots({"item-label":t.withCtx(()=>[t.renderSlot(D.$slots,"item-label",{item:k},()=>[t.createTextVNode(t.toDisplayString(k.name),1)],!0)]),_:2},[D.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(()=>[t.renderSlot(D.$slots,"item-icon",{item:k},void 0,!0)]),key:"0"}:void 0]),1032,["collapsible","controls-id","disabled","has-children","hide-icons","initial-collapse","item","onExpanded"])),t.withDirectives((t.openBlock(),t.createBlock(A,{id:`tree-list-draggable-${k.id}`,key:`tree-item-${k.id}-children-${o.value}`,class:t.normalizeClass({collapsible:D.collapsible}),collapsible:D.collapsible,"disable-drag":D.disableDrag,filter:c.value,group:D.group,"hide-icons":D.hideIcons,"initial-collapse-all":D.initialCollapseAll,items:u(k),level:D.level+1,"max-depth":D.maxDepth,"parent-id":k.id,onChildChange:p,onSelected:m},t.createSlots({"item-label":t.withCtx(({item:x})=>[t.renderSlot(D.$slots,"item-label",{item:x},void 0,!0)]),_:2},[D.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:x})=>[t.renderSlot(D.$slots,"item-icon",{item:x},void 0,!0)]),key:"0"}:void 0]),1032,["id","class","collapsible","disable-drag","filter","group","hide-icons","initial-collapse-all","items","level","max-depth","parent-id"])),[[t.vShow,h(k.id)]])],2))),128))]),_:3},16,["disabled","filter","group","level","list"])}}}),[["__scopeId","data-v-a7e11d91"]]),Y1=t.defineComponent({__name:"KTreeList",props:{modelValue:{default:null},items:{default:null},disableDrag:{type:Boolean},ignoreDragSelectors:{type:[String,Function],default:""},maxDepth:{default:3},width:{default:""},hideIcons:{type:Boolean},group:{default:"k-tree-list"},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=(h,g)=>(h.forEach(v=>{var w;g.push(v.id),(w=v.children)!=null&&w.length&&a(v.children,g)}),g),o=h=>{const g=a(h,[]),v=new Set(g);return g.length===v.size},i=(h,g)=>{let v=!0;return h.forEach(w=>{v=v&&(!w.children||Wc(w)<=g)}),v};t.watch(()=>e.modelValue,h=>{h&&!o(h)&&_n("modelValue","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.items,h=>{h&&!o(h)&&_n("items","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.maxDepth,h=>{h>5&&_n("maxDepth","Maximum depth must be less than or equal to 5.")},{immediate:!0}),t.watch([()=>e.modelValue,()=>e.items],([h,g])=>{h&&g&&_n("modelValue / items","You should not provide both v-model (or props.modelValue) and props.items")},{immediate:!0});const l=t.ref([]);t.watch([l,()=>e.maxDepth],([h,g])=>{i(h,g)||_n(e.modelValue?"modelValue":"items","Provided list depth exceeds `maxDepth`")},{immediate:!0,deep:!0});const d=r,c=t.computed({get(){return e.modelValue},set(h){l.value=h}}),s=t.computed(()=>({maxWidth:Je(e.width)})),u=(h,g)=>{(g||l.value).forEach(w=>{var C;w.id===h.id?(w.selected=!0,d("selected",h)):w.selected=!1,(C=w.children)!=null&&C.length&&u(h,w.children)})},f=h=>{d("change",h)},p=h=>{d("child-change",h)};t.watch(c,(h,g)=>{JSON.stringify(h)!==JSON.stringify(g)&&(l.value=h||[],l.value.forEach(v=>{v.children||(v.children=[])}))}),t.watch(()=>e.items,(h,g)=>{JSON.stringify(h)!==JSON.stringify(g)&&(l.value=h||[],l.value.forEach(v=>{v.children||(v.children=[])}))});const m=t.useTemplateRef("tree-draggable");return n({collapseAll:()=>{var h;(h=m.value)==null||h.collapseAll()},expandAll:()=>{var h;(h=m.value)==null||h.expandAll()}}),t.onMounted(()=>{e.modelValue?l.value=e.modelValue:e.items&&(l.value=e.items),l.value.forEach(h=>{h.children||(h.children=[])})}),(h,g)=>(t.openBlock(),t.createElementBlock("div",{class:"k-tree-list","data-testid":"k-tree-list",style:t.normalizeStyle(h.width?s.value:void 0)},[t.createVNode(jR,{ref:"tree-draggable",collapsible:h.collapsible,"data-testid":`k-tree-list-${h.group}`,"disable-drag":h.disableDrag,filter:h.ignoreDragSelectors,group:h.group,"hide-icons":h.hideIcons,"initial-collapse-all":h.initialCollapseAll,items:l.value,"max-depth":h.maxDepth,onChange:f,onChildChange:p,onSelected:u},t.createSlots({"item-label":t.withCtx(({item:v})=>[t.renderSlot(h.$slots,"item-label",{item:v})]),_:2},[h.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:v})=>[t.renderSlot(h.$slots,"item-icon",{item:v})]),key:"0"}:void 0]),1032,["collapsible","data-testid","disable-drag","filter","group","hide-icons","initial-collapse-all","items","max-depth"])],4))}}),GR=["href"],H1=pe(t.defineComponent({__name:"KExternalLink",props:{href:{},hideIcon:{type:Boolean}},setup(e){t.watch(()=>e.href,r=>{e1(r)||_n("href",`\`href\` should be a valid URL, but got "${r}".`)},{immediate:!0});const n=t.computed(()=>!!e1(e.href));return(r,a)=>n.value?(t.openBlock(),t.createElementBlock("a",{key:0,class:"k-external-link",href:r.href,rel:"noopener",target:"_blank"},[t.renderSlot(r.$slots,"default",{},void 0,!0),r.hideIcon?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Ay),{key:0,decorative:"",size:t.unref(Yt)},null,8,["size"]))],8,GR)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-ec2a67ce"]]),QR={key:0,class:"truncate-expand-controls"},ZR={key:0,"data-testid":"expand-trigger-wrapper"},XR=["aria-label"],JR={key:0,"data-testid":"collapse-trigger-wrapper"},ez={key:0,"data-testid":"expand-trigger-wrapper"},tz={key:1},q1=pe(t.defineComponent({__name:"KTruncate",props:{rows:{default:1},truncateText:{type:Boolean},expanded:{type:Boolean},width:{default:"100%"}},setup(e){t.useCssVars(b=>({"7164fd89":d.value,"5e3d5385":t.unref(c),"6972530a":b.rows})),t.watch(()=>e.rows,b=>{b<0&&_n("rows",`\`rows\` prop cannot be less than 0, but got "${b}".`)},{immediate:!0});const n=t.ref(e.expanded),r=t.ref(!1),a=t.ref(),o=t.ref(),i=t.ref(),l=t.ref(),d=t.ref("0px"),c=db,s=t.ref(0),u=async()=>{var b;if(!e.truncateText&&o.value&&(b=o.value.children)!=null&&b.length){const h=o.value.children,g=Number(String(c).replace(/px$/gi,""));let v=0;for(let C=0;C<h.length;C++)v=h[C].offsetHeight>v?h[C].offsetHeight:v;const w=(e.rows===1?0:(e.rows-1)*g)+v*e.rows+6;d.value=o.value.offsetHeight>w?`${w}px`:"auto",await t.nextTick(),f()}},f=()=>{if(o.value&&i.value){const b=e.truncateText?o.value.scrollHeight:o.value.offsetHeight,h=l.value?l.value.offsetHeight:0;r.value=b>i.value.offsetHeight-h,p()}},p=()=>{if(!e.truncateText&&(s.value=0,o.value&&i.value)){const b=o.value.children;for(let h=0;h<b.length;h++)b[h].offsetTop>i.value.offsetHeight?(s.value+=1,b[h].getAttribute("tabindex")&&(b[h].tabIndex=-1)):b[h].getAttribute("tabindex")&&(b[h].tabIndex=0)}},m=async()=>{n.value=!n.value,await t.nextTick(),f()},y=t.computed(()=>({width:Je(e.width)}));return t.onMounted(()=>{a.value=ir.create(u),a.value.observe(o.value),f()}),t.onBeforeUnmount(()=>{var b;(b=a.value)==null||b.unobserve(o.value)}),(b,h)=>{const g=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{ref_key:"kTruncateWrapper",ref:i,class:t.normalizeClass(["k-truncate",[n.value?"expanded":"",`truncate-${b.truncateText?"text":"content"}`]]),style:t.normalizeStyle(y.value)},[!b.truncateText&&r.value?(t.openBlock(),t.createElementBlock("div",QR,[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ZR,[t.renderSlot(b.$slots,"expand-trigger",{expand:m,truncatedCount:s.value},()=>[t.createElementVNode("button",{"aria-label":`Show ${s.value} more items`,class:"expand-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},t.toDisplayString(s.value),9,XR)],!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"kTruncateContainer",ref:o,class:"truncate-container"},[t.renderSlot(b.$slots,"default",{},void 0,!0),!b.truncateText&&n.value?(t.openBlock(),t.createElementBlock("div",JR,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createElementVNode("button",{"aria-label":"Collapse content",class:"collapse-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},[t.createVNode(t.unref($y),{decorative:"",size:t.unref(Yt)},null,8,["size"])])],!0)])):t.createCommentVNode("",!0)],512),b.truncateText&&(r.value||n.value)?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"textToggleControls",ref:l,class:"truncate-collapse-controls"},[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ez,[t.renderSlot(b.$slots,"expand-trigger",{expand:m},()=>[t.createVNode(g,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>h[0]||(h[0]=[t.createTextVNode(" Show more ")])),_:1,__:[0]})],!0)])),n.value?(t.openBlock(),t.createElementBlock("div",tz,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createVNode(g,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>h[1]||(h[1]=[t.createTextVNode(" Show less ")])),_:1,__:[1]})],!0)])):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-32767851"]]),nz={class:"k-copy"},rz={key:0,class:"copy-badge-text"},az=["id","aria-label","onClick"],_1=pe(t.defineComponent({__name:"KCopy",props:{badgeLabel:{default:""},text:{},textTooltip:{default:""},copyTooltip:{default:""},format:{default:"default"},badge:{type:Boolean},monospace:{type:Boolean},truncate:{type:Boolean},successTooltip:{default:"Copied!"},truncationLimit:{default:8}},setup(e,{expose:n}){const r=t.useId(),a=t.ref(""),o=t.computed(()=>!e.badgeLabel||e.copyTooltip?e.copyTooltip||"Copy":`Copy ${e.badgeLabel.replace(/:$/,"")}`);t.watch(o,h=>{a.value=h},{immediate:!0});const i=t.computed(()=>`copy-tooltip-wrapper ${e.truncate&&y.value||e.badge?"truncate-content":""}`),l=t.computed(()=>e.format==="redacted"?"*****":e.format==="deleted"?`*${String(e.text||"").substring(0,5)}`:e.truncate&&e.truncationLimit&&m.value?m.value.replace(/^"(.*)"$/,"$1"):e.text),d=t.computed(()=>{if(e.textTooltip)return e.textTooltip;if(!(e.format==="redacted"||!y.value))return e.text}),c=h=>{a.value=h||e.successTooltip,setTimeout(()=>{a.value=o.value},1800)},s=async h=>{if(!await h(e.text)){c("Failed to copy");return}c()};n({copy:()=>{var h;document!=null&&document.getElementById(r)&&((h=document==null?void 0:document.getElementById(r))==null||h.click())}});const f=t.ref(),p=t.ref(),m=t.computed(()=>e.truncate&&typeof e.truncationLimit=="number"?`${String(e.text||"").substring(0,e.truncationLimit)+"..."}`:null),y=t.ref(!1),b=()=>{var h,g;e.truncate&&(e.truncationLimit!=="auto"&&m.value?y.value=!0:e.truncationLimit==="auto"&&f.value&&(y.value=((h=f.value)==null?void 0:h.offsetWidth)<((g=f.value)==null?void 0:g.scrollWidth)))};return t.onMounted(()=>{p.value=ir.create(b),p.value.observe(f.value)}),t.onBeforeUnmount(()=>{p.value&&p.value.unobserve(f.value)}),(h,g)=>(t.openBlock(),t.createElementBlock("div",nz,[h.badge&&h.badgeLabel?(t.openBlock(),t.createElementBlock("span",rz,t.toDisplayString(h.badgeLabel),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["copy-container",{"copy-element":h.truncate||h.badge,"badge-styles":h.badge}])},[h.format!=="hidden"?(t.openBlock(),t.createBlock(Et,{key:0,class:t.normalizeClass([i.value]),"data-testid":"copy-tooltip-wrapper","max-width":"500px",placement:"bottom-start",text:d.value},{default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"copyTextElement",ref:f,class:t.normalizeClass(["copy-text",{monospace:h.monospace||!h.badge}])},t.toDisplayString(l.value),3)]),_:1},8,["class","text"])):t.createCommentVNode("",!0),t.createVNode(Et,{class:"text-icon-wrapper","max-width":"500px",placement:"bottom-start",text:a.value},{default:t.withCtx(()=>[t.createVNode(bl,null,{default:t.withCtx(({copyToClipboard:v})=>[t.createElementVNode("button",{id:t.unref(r),"aria-label":a.value,class:"copy-to-clipboard-button","data-testid":"copy-to-clipboard",type:"button",onClick:t.withModifiers(w=>s(v),["stop"])},[t.createVNode(t.unref(yd),{class:"text-icon",decorative:"",size:t.unref(Yt)},null,8,["size"])],8,az)]),_:1})]),_:1},8,["text"])],2)]))}}),[["__scopeId","data-v-5cce612d"]]),oz={key:0,class:"bulk-actions-dropdown-trigger-count"},iz=pe(t.defineComponent({__name:"BulkActionsDropdown",props:{disabled:{type:Boolean},count:{default:""},buttonLabel:{default:""}},setup(e){return(n,r)=>(t.openBlock(),t.createBlock(Fn,{class:"bulk-actions-dropdown","data-testid":"bulk-actions-dropdown",disabled:n.disabled,"kpop-attributes":{placement:"bottom-end"}},{items:t.withCtx(()=>[t.renderSlot(n.$slots,"items",{},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Et,{placement:"bottom-end",text:"Selected Row Actions"},{default:t.withCtx(()=>[t.createVNode(Ie,{appearance:"secondary","aria-label":n.buttonLabel,class:"bulk-actions-dropdown-trigger","data-testid":"bulk-actions-dropdown-trigger",disabled:n.disabled,icon:"",size:"large"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dd),{class:"more-icon",decorative:""}),t.createVNode(t.Transition,{name:"kongponents-fade-transition"},{default:t.withCtx(()=>[n.count?(t.openBlock(),t.createElementBlock("span",oz,t.toDisplayString(n.count),1)):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["aria-label","disabled"])]),_:1})]),_:3},8,["disabled"]))}}),[["__scopeId","data-v-cf7c2833"]]),lz={key:0,class:"table-toolbar","data-testid":"table-toolbar"},sz={key:0,class:"toolbar-default-items-container"},cz={key:2,class:"table-error-state","data-testid":"table-error-state"},dz={key:3,class:"table-empty-state","data-testid":"table-empty-state"},uz={key:4,class:"table-container"},fz=["data-tableid"],pz=["aria-sort","data-key","data-testid","onClick","onMouseover"],mz=["onMousedown","onMouseover"],hz=["aria-describedby"],gz={key:1,class:"table-header-bulk-actions-container"},yz=["onMousedown","onMouseover"],bz=["role","tabindex"],vz={key:1,class:"expandable-row-control-container"},wz=["aria-controls","aria-expanded","onClick"],kz=["id"],Cz=["colspan"],Sz={class:"expandable-content-wrapper"},Uc=pe(t.defineComponent({__name:"KTableView",props:{data:{default:()=>[]},headers:{default:()=>[]},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ft.Default},emptyStateButtonAppearance:{default:"primary"},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{default:"body"},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["page-change","page-size-change","get-next-offset","get-previous-offset","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{emit:n}){var Gt;t.useCssVars(I=>({"8623d80a":t.unref(ke).expandable,"7b68048c":J.value,"0431e2e4":C.value,"047c3890":T.value}));const r=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","tooltipTarget","data","headers"]),a=n,o=t.useSlots(),i=t.useId(),l=I=>typeof e.rowKey=="function"&&typeof e.rowKey(I)=="string"?e.rowKey(I):typeof e.rowKey=="string"&&e.rowKey in I&&typeof I[e.rowKey]=="string"?I[e.rowKey]:"",d=t.useTemplateRef("table-wrapper"),c=t.useTemplateRef("header-row"),s=t.ref([]),u=t.ref([]),f=t.ref(""),p=t.ref(""),m=t.ref(""),y=t.computed(()=>s.value.filter(I=>I.hidable).length>0),b=t.computed(()=>e.nested||!y.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),h=t.computed(()=>e.loading||!(e.data&&e.data.length)),g=t.computed(()=>s.value.filter(I=>I.hidable&&!me(I.key))),v=t.computed(()=>b.value?e.tablePreferences.columnVisibility||{}:{}),w=t.ref(b.value?e.tablePreferences.columnVisibility||{}:{}),C=t.ref("100%"),S=t.ref(!1),B=t.ref(!1),E=t.ref(!1),V=t.ref(!1),O=t.ref(e.tablePreferences.sortColumnKey||""),D=t.ref(e.tablePreferences.sortColumnOrder||"desc"),N=t.ref(!1),A=t.computed(()=>!e.hideToolbar&&!e.nested&&(!!o.toolbar||b.value||W.value)),k=t.ref(!1),x=t.computed(()=>({maxHeight:Je(e.maxHeight)})),T=t.computed(()=>`${Mf()}px`),L=t.ref([]),K=t.computed(()=>!e.nested&&!e.error&&s.value.some(I=>I.key===$e.BULK_ACTIONS)&&!!(o["bulk-action-items"]||o["bulk-actions"])&&!!e.data.every(I=>l(I))),z=t.ref([]),W=t.computed(()=>e.nested||!K.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),H=t.computed(()=>{const I=L.value.length;return I?I>100?"99+":String(I):""}),ne=t.ref(new WeakMap),X=I=>`column-${I}`,ce=I=>`tooltip-${I}`,re=(I,q)=>(M,U)=>{const _=/^on[^a-z]/,se={};for(const oe in q)_.test(oe)&&q[oe]&&(se[oe]=q[oe]);return Object.keys(se).reduce((oe,Be)=>{if(Be.indexOf(I)===0){const Te=Be.split(I);oe[Te[1]]=rt=>se[Be](rt,M,U)}return oe},{})},fe=t.computed(()=>(I,q)=>{const M=re("onRow:",r)(q,"row"),U=re("onCell:",r)(I,"cell"),_=["a","button","label","input","select",'span[role="checkbox"]'];return(M.click||U.click)&&(N.value=!0),{...M,...U,click(se){const oe=se.target,Be=oe.className;let Te=_.includes(oe.tagName.toLowerCase()),rt=!1;typeof Be=="string"||Array.isArray(Be)?rt=Be.includes("k-popover"):typeof Be=="object"&&(rt=Object.keys(Be).includes("k-popover")),oe.closest(".popover-content")!==null&&(rt=!0);for(let _e=0;_e<_.length;_e++)if(oe.closest(_[_e])!==null){Te=!0;break}if((!Te||oe.hasAttribute("disabled"))&&!rt&&(M.click||U.click))if(U.click){a("cell-click",{data:I});const _e=U.click(se,I,"cell");typeof _e=="function"&&_e(se,I)}else{a("row-click",{data:q});const _e=M.click(se,q,"row");typeof _e=="function"&&_e(se,q)}}}}),Ee=parseInt(zd)*2+parseInt(Yt),ye={expandable:Ee,bulkActions:48,actions:54},ke=A2(ye,I=>`${I}px`),De=t.ref(((Gt=e.tablePreferences)==null?void 0:Gt.columnWidths)||ye),Le=t.computed(()=>{const I={};for(const q in De.value){const M=q;if(!De.value[M])continue;const U=De.value[M]+"px";I[M]={width:U,maxWidth:U,minWidth:U}}return I}),xe=(I,q)=>({"resize-hover":G.value===I.key&&e.resizeColumns&&!e.nested&&q!==u.value.length-1&&ue(I),resizable:e.resizeColumns&&!e.nested,sortable:!I.hideLabel&&!!I.sortable,"active-sort":!I.hideLabel&&!!I.sortable&&I.key===O.value,[D.value]:I.key===O.value&&!I.hideLabel,"is-scrolled":B.value,"has-tooltip":!!I.tooltip,"sticky-column":(I.key===$e.BULK_ACTIONS||I.key===$e.EXPANDABLE)&&E.value,"second-sticky-column":I.key===$e.BULK_ACTIONS&&Z.value,"has-row-scroll-overlay":ie(I.key)}),Oe=I=>{if(I.sortable&&I.key!==$e.BULK_ACTIONS&&I.key!==$e.ACTIONS){let q="asc";I.key===O.value&&D.value==="asc"&&(q="desc"),a("sort",{prevKey:O.value,sortColumnKey:I.key,sortColumnOrder:q}),Ae(I)}},Me=t.computed(()=>f.value?"resizing":p.value?"resize-hover":m.value?"th-hover":""),G=t.computed(()=>{switch(Me.value){case"resizing":return f.value;case"resize-hover":return p.value;case"th-hover":return m.value;default:return""}}),Q=t.computed(()=>{var I;return(I=c.value)==null?void 0:I.querySelectorAll("th.resizable")}),J=t.computed(()=>{var q;const I=(q=Q.value)==null?void 0:q.item(0);if(I){const M=window==null?void 0:window.getComputedStyle(I);if(M!=null&&M.height)return`${parseInt(M.height,10)}px`}return"auto"}),P=(I,q)=>{var Be;if(I.button!==0)return;let M=0,U=0;f.value=q;let _=null;(Be=Q.value)==null||Be.forEach(Te=>{Te.getAttribute("data-testid")===`table-header-${q}`&&(_=document==null?void 0:document.querySelector(`[data-tableid="${i}"] [data-testid="table-header-${q}"]`))});const se=Te=>{const rt=Te.clientX-M;_==null||_.setAttribute("style",`width: ${U+rt}px`),De.value[q]=U+rt},oe=()=>{f.value="",document==null||document.removeEventListener("mousemove",se),document==null||document.removeEventListener("mouseup",oe),R(),Z.value&&Re()};if(M=I.clientX,_){const Te=window==null?void 0:window.getComputedStyle(_);Te!=null&&Te.width&&(U=parseInt(Te.width,10)),document==null||document.addEventListener("mousemove",se),document==null||document.addEventListener("mouseup",oe)}},ie=I=>E.value?K.value?I===$e.BULK_ACTIONS:Z.value?I===$e.EXPANDABLE:!1:!1,me=I=>I===$e.EXPANDABLE||I===$e.BULK_ACTIONS||I===$e.ACTIONS,ue=(I,q=!1)=>{if(q){if(u.value.indexOf(I)===u.value.length-1)return!1;const U=u.value[u.value.indexOf(I)-1];return!me(U.key)}const M=u.value[u.value.indexOf(I)+1];return!me(I.key)&&!me(M.key)},Se=(I,q)=>{a("row-actions-toggle",{row:I,open:q})},Ze=t.computed(()=>!(e.hidePagination||e.nested||e.hidePaginationWhenOptional&&e.data.length&&e.paginationAttributes.totalCount&&e.paginationAttributes.totalCount<=e.data.length));t.watch(()=>e.headers,I=>{if(I&&I.length){const q=I.filter(_=>_.key!==$e.BULK_ACTIONS&&_.key!==$e.ACTIONS),M=I.find(_=>_.key===$e.BULK_ACTIONS),U=I.find(_=>_.key===$e.ACTIONS);M&&q.unshift(M),U&&q.push(U),s.value=q}},{deep:!0,immediate:!0});const je=I=>!I.hideLabel&&!!I.sortable&&I.key!==$e.BULK_ACTIONS&&I.key!==$e.ACTIONS,Ae=I=>{const{key:q}=I;O.value&&q===O.value?D.value==="asc"?D.value="desc":D.value="asc":(O.value=q,D.value="asc"),R()},We=I=>{const q=I.target;q&&(typeof q.scrollTop=="number"||typeof q.scrollLeft=="number")&&(q.scrollTop>1?(S.value=!0,B.value=!0):q.scrollTop===0&&(B.value=!1),q.scrollLeft>1?E.value=!0:q.scrollLeft===0&&(E.value=!1),q.scrollWidth===q.scrollLeft+q.clientWidth?V.value=!1:V.value=!0)},Xe=I=>z.value.find(q=>q.rowKey===l(I)),nt=I=>{if(typeof e.rowBulkActionEnabled!="function")return!1;const q=e.rowBulkActionEnabled(I);return typeof q=="boolean"?q:q.enabled},wt=I=>{if(typeof e.rowBulkActionEnabled!="function")return"";const q=e.rowBulkActionEnabled(I);return typeof q=="boolean"?"":q.disabledTooltip||""},xt=(I,q)=>{const{to:M}=e.rowLink(I);return!M||q===$e.BULK_ACTIONS||q===$e.ACTIONS?"div":typeof M=="object"?"router-link":"a"},kt=(I,q)=>{if(q===$e.BULK_ACTIONS||q===$e.ACTIONS)return{};const{to:M,target:U}=e.rowLink(I),_=M&&typeof M=="object",se=M&&typeof M=="string";return{..._&&{to:M},...se&&{href:M},...(_||se)&&{...U&&{target:U}}}},at=t.ref(n1(e.tablePreferences,e.paginationAttributes)),j=I=>{at.value=I.pageSize,a("page-size-change",I),R()},we=t.computed(()=>({sortColumnKey:O.value,sortColumnOrder:D.value,...e.resizeColumns?{columnWidths:De.value}:{},...y.value?{columnVisibility:w.value}:{},...at.value&&!e.hidePagination&&{pageSize:at.value}})),R=()=>{a("update:table-preferences",we.value)},Z=t.computed(()=>!e.nested&&e.data.some(I=>e.rowExpandable(I))),he={key:$e.EXPANDABLE,label:"Expandable rows controls",hideLabel:!0},F=()=>{const I=[];return e.data.forEach((q,M)=>{e.rowExpanded(q)&&I.push(M)}),I},$=t.ref(F()),Y=async(I,q)=>{Re(),await t.nextTick(),$.value.includes(I)?($.value=$.value.filter(M=>M!==I),a("update:row-expanded",{row:q,expanded:!1})):($.value=[...$.value,I],a("update:row-expanded",{row:q,expanded:!0}))},te=t.computed(()=>u.value.filter(I=>I.key!==$e.EXPANDABLE&&I.key!==$e.BULK_ACTIONS)),le=t.ref({}),Re=()=>{if(typeof document>"u")return;const I=document==null?void 0:document.querySelector(`[data-tableid="${i}"]`),q=I==null?void 0:I.querySelectorAll("th"),M={};q==null||q.forEach((U,_)=>{const se=U.getAttribute("data-key");if(se===$e.EXPANDABLE)return;let oe=U.getBoundingClientRect().width;_===1&&(oe+=Ee),_===q.length-1&&(oe-=15),M[se]=oe}),le.value=M};t.watch([w,s,Z],I=>{const[q,M,U]=I;let _=M.filter(se=>se.key===$e.BULK_ACTIONS?K.value:q[se.key]!==!1);_.find(se=>se.key===$e.EXPANDABLE)&&(_=_.filter(se=>se.key!==$e.EXPANDABLE)),U&&_.unshift(he),JSON.stringify(_)!==JSON.stringify(u.value)&&(u.value=_,R()),U&&Re()},{deep:!0,immediate:!0}),t.watch(b,I=>{I&&(w.value=e.tablePreferences.columnVisibility||{})},{immediate:!0});const Ye=t.ref(!1),it=t.computed(()=>{const I=z.value.filter(q=>!q.disabled&&e.data.find(M=>l(M)===q.rowKey));return!!I.filter(q=>q.selected).length&&!!I.filter(q=>!q.selected).length}),mn=I=>{z.value.forEach(q=>{e.data.find(M=>l(M)===q.rowKey)&&!q.disabled&&(q.selected=I)})};return t.watch([()=>e.data,z],I=>{const[q,M]=I;if(q.forEach(U=>{if(!ne.value.get(U)){const _=l(U)||tl();ne.value.set(U,`table-${i}-row-${_}`)}}),K.value){q.forEach(oe=>{Xe(oe)||z.value.push({rowKey:l(oe),selected:!1,disabled:!nt(oe)})});const U=M.filter(oe=>!oe.disabled&&q.find(Be=>l(Be)===oe.rowKey));U.length&&U.filter(oe=>oe.selected).length===U.length?Ye.value=!0:(U.filter(oe=>!oe.selected).length,U.length,Ye.value=!1);const _=q.filter(oe=>{const Be=M.find(Te=>Te.rowKey===l(oe));return!!(Be&&Be.selected)}),se=[];L.value.forEach(oe=>{q.find(Te=>l(oe)===l(Te))||se.push(oe)}),L.value=[...se,..._]}$.value=F()},{deep:!0,immediate:!0}),t.watch(L,I=>{a("row-select",I)}),t.watch(()=>e.tablePreferences,I=>{I!=null&&I.columnWidths&&(De.value=I.columnWidths)}),Cv(d,I=>{var M;const q=(M=I[0])==null?void 0:M.target;q&&(V.value=q.scrollWidth>q.clientWidth,C.value=q.clientHeight+"px",S.value=q.scrollHeight>q.clientHeight)}),(I,q)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["k-table-view",{"hide-headers":I.hideHeaders}])},[A.value?(t.openBlock(),t.createElementBlock("div",lz,[t.renderSlot(I.$slots,"toolbar",{},void 0,!0),W.value||b.value?(t.openBlock(),t.createElementBlock("div",sz,[W.value?t.renderSlot(I.$slots,"bulk-actions",{key:0,selectedRows:L.value},()=>[I.$slots["bulk-actions"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(iz,{key:0,"button-label":s.value.find(M=>M.key===t.unref($e).BULK_ACTIONS).label,count:H.value,disabled:!H.value||I.loading||!I.data.length},{items:t.withCtx(()=>[t.renderSlot(I.$slots,"bulk-action-items",{selectedRows:L.value},void 0,!0)]),_:3},8,["button-label","count","disabled"]))],!0):t.createCommentVNode("",!0),b.value?(t.openBlock(),t.createBlock(d1,{key:1,columns:g.value,disabled:h.value,"table-id":t.unref(i),"visibility-preferences":v.value,onUpdate:q[0]||(q[0]=M=>w.value=M)},null,8,["columns","disabled","table-id","visibility-preferences"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),I.loading&&!I.error?(t.openBlock(),t.createBlock(wa,{key:1,"data-testid":"table-skeleton",type:"table"})):I.error?(t.openBlock(),t.createElementBlock("div",cz,[t.renderSlot(I.$slots,"error-state",{},()=>[t.createVNode(zn,{"icon-variant":"error",message:I.errorStateMessage,title:I.errorStateTitle},t.createSlots({_:2},[I.errorStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ie,{"data-testid":"error-state-action",to:I.errorStateActionRoute,onClick:q[1]||(q[1]=M=>a("error-action-click"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(I.errorStateActionMessage),1)]),_:1},8,["to"])]),key:"0"}:void 0]),1032,["message","title"])],!0)])):!I.error&&!I.loading&&I.data&&!I.data.length?(t.openBlock(),t.createElementBlock("div",dz,[t.renderSlot(I.$slots,"empty-state",{},()=>[t.createVNode(zn,{"icon-variant":I.emptyStateIconVariant,message:I.emptyStateMessage,title:I.emptyStateTitle},t.createSlots({_:2},[I.emptyStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ie,{appearance:I.emptyStateButtonAppearance,"data-testid":"empty-state-action",to:I.emptyStateActionRoute,onClick:q[2]||(q[2]=M=>a("empty-state-action-click"))},{default:t.withCtx(()=>[t.renderSlot(I.$slots,"empty-state-action-icon",{},void 0,!0),t.createTextVNode(" "+t.toDisplayString(I.emptyStateActionMessage),1)]),_:3},8,["appearance","to"])]),key:"0"}:void 0]),1032,["icon-variant","message","title"])],!0)])):(t.openBlock(),t.createElementBlock("div",uz,[t.createElementVNode("div",{ref:"table-wrapper",class:"table-wrapper",style:t.normalizeStyle(x.value),onScrollPassive:We},[t.createElementVNode("table",{class:t.normalizeClass(["table",{"has-hover":I.rowHover&&!k.value,"is-clickable":N.value}]),"data-tableid":t.unref(i)},[I.hideHeaders?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("thead",{key:0,class:t.normalizeClass({"is-scrolled":B.value})},[t.createElementVNode("tr",{ref:"header-row",class:t.normalizeClass({"is-scrolled":B.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(M,U)=>(t.openBlock(),t.createElementBlock("th",{key:`table-${t.unref(i)}-headers-${M.key}`,"aria-sort":M.key===O.value?D.value==="asc"?"ascending":"descending":void 0,class:t.normalizeClass(["table-headers",xe(M,U)]),"data-key":M.key,"data-testid":`table-header-${M.key}`,style:t.normalizeStyle(Le.value[M.key]),onClick:()=>Oe(M),onMouseleave:q[8]||(q[8]=_=>m.value=""),onMouseover:_=>m.value=M.key},[I.resizeColumns&&!I.nested&&U!==0&&ue(M,!0)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"resize-handle previous",onClick:q[3]||(q[3]=t.withModifiers(()=>{},["stop"])),onMousedown:_=>P(_,u.value[U-1].key),onMouseleave:q[4]||(q[4]=_=>p.value=""),onMouseover:_=>p.value=u.value[U-1].key},null,40,mz)):t.createCommentVNode("",!0),t.createElementVNode("div",{"aria-describedby":M.tooltip||o[ce(M.key)]?`${ce(M.key)}-${t.unref(i)}`:void 0,class:t.normalizeClass(["table-headers-container",{resized:f.value===M.key}])},[M.key!==t.unref($e).BULK_ACTIONS?t.renderSlot(I.$slots,X(M.key),{key:0,column:M},()=>[t.createElementVNode("span",{class:t.normalizeClass(["table-header-label",{"sr-only":M.hideLabel||M.key===t.unref($e).ACTIONS&&M.hideLabel!==!1}])},t.toDisplayString(M.label?M.label:M.key),3)],!0):(t.openBlock(),t.createElementBlock("div",gz,[t.createVNode(Ca,{modelValue:Ye.value,"onUpdate:modelValue":q[5]||(q[5]=_=>Ye.value=_),"aria-label":"Toggle selection for all rows",class:"table-header-bulk-actions-checkbox","data-testid":"table-header-bulk-actions-checkbox",indeterminate:it.value,onChange:mn},null,8,["modelValue","indeterminate"])])),M.tooltip||I.$slots[ce(M.key)]?(t.openBlock(),t.createBlock(Et,{key:2,"data-testid":ce(M.key),"kpop-attributes":{target:I.tooltipTarget},"max-width":"300","tooltip-id":`${ce(M.key)}-${t.unref(i)}`},{content:t.withCtx(()=>[t.renderSlot(I.$slots,ce(M.key),{column:M},()=>[t.createTextVNode(t.toDisplayString(M.tooltip),1)],!0)]),default:t.withCtx(()=>[t.createVNode(t.unref(In),{class:"header-tooltip-trigger",color:`var(--kui-color-text-neutral, ${t.unref(Qt)})`,size:t.unref(Yt),tabindex:"0"},null,8,["color","size"])]),_:2},1032,["data-testid","kpop-attributes","tooltip-id"])):t.createCommentVNode("",!0),je(M)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[O.value===M.key?(t.openBlock(),t.createBlock(t.unref(kl),{key:0,class:"active-sort-icon",color:`var(--kui-color-text-primary, ${t.unref(Rd)})`,decorative:"",size:t.unref(Yt)},null,8,["color","size"])):(t.openBlock(),t.createBlock(t.unref(jy),{key:1,class:"sort-icon",color:`var(--kui-color-text-neutral-weak, ${t.unref(Ld)})`,size:t.unref(Yt),title:`Sort by ${M.label}`},null,8,["color","size","title"]))],64)):t.createCommentVNode("",!0)],10,hz),I.resizeColumns&&!I.nested&&U!==u.value.length-1&&ue(M)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"resize-handle",onClick:q[6]||(q[6]=t.withModifiers(()=>{},["stop"])),onMousedown:_=>P(_,M.key),onMouseleave:q[7]||(q[7]=_=>p.value=""),onMouseover:_=>p.value=M.key},null,40,yz)):t.createCommentVNode("",!0),ie(M.key)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0)],46,pz))),128))],2)],2)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.data,(M,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ne.value.get(M)},[t.createElementVNode("tr",t.mergeProps({class:{"last-row":U===I.data.length-1&&!$.value.includes(U)},role:I.rowLink(M).to?"link":void 0,tabindex:N.value&&!I.rowLink(M).to?0:void 0},{ref_for:!0},I.rowAttrs(M)),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,se)=>(t.openBlock(),t.createElementBlock("td",t.mergeProps({key:`${ne.value.get(M)}-cell-${_.key}`,class:{"resize-hover":I.resizeColumns&&!I.nested&&G.value===_.key&&se!==u.value.length-1&&ue(_),"row-link":!!I.rowLink(M).to,"sticky-column":(_.key===t.unref($e).BULK_ACTIONS||_.key===t.unref($e).EXPANDABLE)&&E.value,"second-sticky-column":_.key===t.unref($e).BULK_ACTIONS&&Z.value,"has-row-scroll-overlay":ie(_.key)},style:Le.value[_.key]},{ref_for:!0},I.cellAttrs({headerKey:_.key,row:M,rowIndex:U,colIndex:se}),t.toHandlers(fe.value(M[_.key],M),!0)),[_.key!==t.unref($e).EXPANDABLE?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(xt(M,_.key)),t.mergeProps({key:0,class:"cell-wrapper"},{ref_for:!0},kt(M,_.key)),{default:t.withCtx(()=>[_.key!==t.unref($e).BULK_ACTIONS&&_.key!==t.unref($e).ACTIONS?t.renderSlot(I.$slots,_.key,{key:0,row:M,rowKey:U,rowValue:M[_.key]},()=>[t.createTextVNode(t.toDisplayString(M[_.key]),1)],!0):_.key===t.unref($e).BULK_ACTIONS&&Xe(M)?(t.openBlock(),t.createBlock(Et,{key:1,"kpop-attributes":{target:I.tooltipTarget},"max-width":"200",placement:"bottom-start",text:nt(M)?void 0:wt(M)},{default:t.withCtx(()=>[t.createVNode(Ca,{modelValue:Xe(M).selected,"onUpdate:modelValue":oe=>Xe(M).selected=oe,"aria-label":"Toggle row selection",class:"bulk-actions-checkbox","data-testid":"bulk-actions-checkbox",disabled:!nt(M)},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["kpop-attributes","text"])):_.key===t.unref($e).ACTIONS?(t.openBlock(),t.createBlock(Fn,{key:2,class:"actions-dropdown","data-testid":"actions-dropdown","kpop-attributes":{placement:"bottom-end"},onToggleDropdown:oe=>Se(M,oe)},{items:t.withCtx(()=>[t.renderSlot(I.$slots,"action-items",{row:M},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Ie,{appearance:"tertiary","aria-label":_.label,class:"actions-dropdown-trigger","data-testid":"row-actions-dropdown-trigger",icon:"",size:"small",onMouseleave:q[9]||(q[9]=oe=>k.value=!1),onMouseover:q[10]||(q[10]=oe=>k.value=!0)},{default:t.withCtx(()=>[t.createVNode(t.unref(Dd),{class:"more-icon",decorative:""})]),_:2},1032,["aria-label"])]),_:2},1032,["onToggleDropdown"])):t.createCommentVNode("",!0)]),_:2},1040)):I.rowExpandable(M)?(t.openBlock(),t.createElementBlock("div",vz,[t.createElementVNode("button",{"aria-controls":`table-${t.unref(i)}-row-${U}-expandable-content`,"aria-expanded":$.value.includes(U),"aria-label":"Toggle row expandable content",class:t.normalizeClass(["expandable-row-control",{expanded:$.value.includes(U)}]),"data-testid":"expandable-row-control",type:"button",onClick:oe=>Y(U,M)},[t.createVNode(t.unref(Cl),{class:"expandable-row-control-icon",decorative:""})],10,wz)])):t.createCommentVNode("",!0),ie(_.key)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0)],16))),128))],16,bz),Z.value&&I.rowExpandable(M)?t.withDirectives((t.openBlock(),t.createElementBlock("tr",{key:0,id:`table-${t.unref(i)}-row-${U}-expandable-content`,class:"expandable-content-row","data-testid":"expandable-content-row"},[t.createElementVNode("td",{colspan:u.value.length},[t.createElementVNode("div",Sz,[t.renderSlot(I.$slots,"row-expanded",{columnWidths:le.value,nestedHeaders:te.value,row:M},void 0,!0)])],8,Cz)],8,kz)),[[t.vShow,$.value.includes(U)]]):t.createCommentVNode("",!0)],64))),128))])],10,fz)],36),!K.value&&!Z.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["scroll-overlay table-overlay left",{"overlay-visible":E.value}])},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["scroll-overlay table-overlay right",{"overlay-visible":V.value,"scrollbar-offset":S.value}])},null,2),Ze.value?(t.openBlock(),t.createBlock(ka,t.mergeProps({key:1,class:"table-pagination","data-testid":"table-pagination"},I.paginationAttributes,{onGetNextOffset:q[11]||(q[11]=M=>a("get-next-offset")),onGetPreviousOffset:q[12]||(q[12]=M=>a("get-previous-offset")),onPageChange:q[13]||(q[13]=M=>a("page-change",M)),onPageSizeChange:j}),null,16)):t.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-b4e603fb"]]),K1=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ft.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{expose:n,emit:r}){const a=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),o=t.computed(()=>{const j=/^on[^a-z]/;return P2(a,(we,R)=>j.test(R))}),i=r,l=t.useSlots(),{useDebounce:d,useRequest:c,useSwrvState:s,clientSideSorter:u}=Rn(),f=t.useId(),p=t.ref([]),m=t.computed(()=>e.sortable?e.headers:e.headers.map(j=>({...j,sortable:!1}))),y=t.computed(()=>e.emptyStateButtonAppearance?e.emptyStateButtonAppearance:e.searchInput?"tertiary":"primary"),b=t.ref(0),h=t.ref(1),g=t.ref(n1(e.tablePreferences,e.paginationAttributes)),v=t.ref(e.searchInput??""),w=t.ref(e.tablePreferences.sortColumnKey||e.initialFetcherParams.sortColumnKey||""),C=t.ref(e.tablePreferences.sortColumnOrder||e.initialFetcherParams.sortColumnOrder||"desc"),S=t.ref(!w.value),B=t.ref(null),E=t.ref([]),V=t.ref(!0),O=t.ref(!1),D={pageSize:g.value,page:h.value,query:v.value,sortColumnKey:w.value,sortColumnOrder:C.value,offset:B.value},N=t.computed(()=>({totalCount:b.value,initialPageSize:g.value,currentPage:h.value,offsetPreviousButtonDisabled:!re.value,offsetNextButtonDisabled:!fe.value||!V.value,...e.paginationAttributes})),A=j=>j.startsWith("column-"),k=j=>j.startsWith("tooltip-"),x=j=>m.value.some(we=>we.key===j),T=t.computed(()=>l?Object.keys(l).filter(A):[]),L=t.computed(()=>l?Object.keys(l).filter(k):[]),K=t.computed(()=>l?Object.keys(l).filter(x):[]),z=t.computed(()=>({sortColumnKey:w.value,sortColumnOrder:C.value})),W=t.computed(()=>({pageSize:g.value,page:h.value,query:v.value,offset:B.value,...e.clientSort?{}:z.value})),H=t.computed(()=>({...W.value,...z.value})),ne=t.ref(!0),X=async()=>{const j=await e.fetcher(H.value);return ne.value=!1,j},ce=()=>{var we;const j={...D,...e.initialFetcherParams};h.value=j.page??D.page,g.value=j.pageSize??D.pageSize,v.value=j.query??D.query,w.value=j.sortColumnKey??D.sortColumnKey,C.value=j.sortColumnOrder??D.sortColumnOrder,e.clientSort&&w.value&&C.value&&u(w.value,"",C.value,p.value),(we=e.paginationAttributes)!=null&&we.offset&&(B.value=j.offset,E.value.push(j.offset)),O.value=!0},re=t.computed(()=>E.value[h.value-1]),fe=t.ref(null),Ee=t.computed(()=>{if(!e.fetcher||!O.value)return"";let j=f;return e.cacheIdentifier&&(j=e.cacheIdentifier),j+=`-${JSON.stringify(W.value)}`,e.fetcherCacheKey&&(j+=`-${e.fetcherCacheKey}`),`k-table_${j}`}),{debouncedFn:ye,generateDebouncedFn:ke}=d(j=>{v.value=j},350),De=ke(0),{data:Le,response:xe,error:Oe,revalidate:Me,isValidating:G,isLoading:Q}=c(()=>Ee.value,()=>X(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:J,hasData:P}=s(Le,Oe,G),ie=t.computed(()=>({hasData:P.value,state:J.value})),me=t.computed(()=>Q.value?"loading":Oe.value?"error":"success"),{debouncedFn:ue}=d(Me,500),Se=({sortColumnKey:j,prevKey:we,sortColumnOrder:R})=>{var F;S.value=!0;const Z=m.value.find($=>$.key===j)||{},{useSortHandlerFunction:he}=Z;if(i("sort",{prevKey:we,sortColumnKey:j,sortColumnOrder:R}),h.value=1,(!w.value||j!==w.value)&&(E.value=[null]),w.value=j,C.value=R,e.clientSort)if(he&&e.sortHandlerFunction){const $=e.sortHandlerFunction({key:j,prevKey:we,sortColumnOrder:C.value,data:p.value});$&&(p.value=[...$])}else u(j,we,C.value,p.value);else(F=e.paginationAttributes)!=null&&F.offset||ue()},Ze=({page:j})=>{h.value=j},je=({pageSize:j})=>{E.value=[null],B.value=null,g.value=j,h.value=1},Ae=({columnWidths:j,columnVisibility:we})=>{We.value=j,Xe.value=we,wt()},We=t.ref({}),Xe=t.ref({}),nt=t.computed(()=>({pageSize:g.value,sortColumnKey:w.value,sortColumnOrder:C.value,...We.value?{columnWidths:We.value}:{},...Xe.value?{columnVisibility:Xe.value}:{}})),wt=()=>{me.value==="success"&&i("update:table-preferences",nt.value)},xt=()=>{h.value++,B.value=fe.value},kt=()=>{h.value--,B.value=re.value},at=t.computed(()=>{var we,R,Z;if(!e.fetcher||e.hidePagination)return!1;const j=((R=(we=e.paginationAttributes)==null?void 0:we.pageSizes)==null?void 0:R[0])??t1;return e.hidePaginationWhenOptional&&h.value===1?(Z=e.paginationAttributes)!=null&&Z.offset?!!re.value||!!fe.value||p.value.length>=j:b.value>j:!0});return t.watch(xe,j=>{var we,R,Z,he;j!=null&&j.data&&(p.value=[...j.data],b.value=((we=e.paginationAttributes)==null?void 0:we.totalCount)||j.total||((R=j.data)==null?void 0:R.length)||0,(Z=e.paginationAttributes)!=null&&Z.offset&&((he=j.pagination)!=null&&he.offset?(fe.value=j.pagination.offset,E.value[h.value]||E.value.push(j.pagination.offset)):fe.value=null,V.value=j.pagination&&"hasNextPage"in j.pagination?j.pagination.hasNextPage||!1:!0),p.value.length===0&&h.value>1&&(h.value=1,E.value=[null],B.value=null),e.sortable&&!S.value&&Se({sortColumnKey:w.value,prevKey:"",sortColumnOrder:C.value}))},{deep:!0,immediate:!0}),t.watch([ie,me],j=>{const[we,R]=j;i("state",{state:R,hasData:we.hasData})}),t.watch(()=>e.searchInput,j=>{j===""?De(j):ye(j)},{immediate:!0}),t.watch([v,g],async(j,we)=>{const[R]=we,[Z]=j;Z!==R&&h.value!==1&&(h.value=1,E.value=[null],B.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{ce()}),n({revalidate:()=>{Me()}}),(j,we)=>(t.openBlock(),t.createBlock(Uc,t.mergeProps({"cell-attrs":j.cellAttrs,class:"k-table-data",data:p.value,"empty-state-action-message":j.emptyStateActionMessage,"empty-state-action-route":j.emptyStateActionRoute,"empty-state-button-appearance":y.value,"empty-state-icon-variant":j.emptyStateIconVariant,"empty-state-message":j.emptyStateMessage,"empty-state-title":j.emptyStateTitle,error:j.error,"error-state-action-message":j.errorStateActionMessage,"error-state-action-route":j.errorStateActionRoute,"error-state-message":j.errorStateMessage,"error-state-title":j.errorStateTitle,headers:m.value,"hide-headers":j.hideHeaders,"hide-pagination":j.hidePagination||!at.value,"hide-pagination-when-optional":!1,"hide-toolbar":j.hideToolbar,loading:j.loading||t.unref(Q),"max-height":j.maxHeight,nested:j.nested,"pagination-attributes":N.value,"resize-columns":j.resizeColumns,"row-attrs":j.rowAttrs,"row-bulk-action-enabled":j.rowBulkActionEnabled,"row-expandable":j.rowExpandable,"row-expanded":j.rowExpanded,"row-hover":j.rowHover,"row-key":j.rowKey,"row-link":j.rowLink,"table-preferences":nt.value,"tooltip-target":j.tooltipTarget},o.value,{onEmptyStateActionClick:we[0]||(we[0]=R=>i("empty-state-action-click")),onErrorActionClick:we[1]||(we[1]=R=>i("error-action-click")),onGetNextOffset:xt,onGetPreviousOffset:kt,onPageChange:Ze,onPageSizeChange:je,onRowActionsToggle:we[2]||(we[2]=R=>j.$emit("row-actions-toggle",R)),onRowSelect:we[3]||(we[3]=R=>i("row-select",R)),onSort:Se,"onUpdate:rowExpanded":we[4]||(we[4]=R=>i("update:row-expanded",R)),"onUpdate:tablePreferences":Ae}),t.createSlots({_:2},[l.toolbar&&!j.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"toolbar",{state:ie.value})]),key:"0"}:void 0,l["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(R)))]),key:"1"}:void 0,l["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(R)))]),key:"2"}:void 0,l["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"error-state")]),key:"3"}:void 0,l["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"empty-state")]),key:"4"}:void 0,l["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(j.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(T.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),t.renderList(L.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),t.renderList(K.value,R=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(j.$slots,R,t.normalizeProps(t.guardReactiveProps(Z)))])})),l["action-items"]?{name:"action-items",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(R)))]),key:"6"}:void 0,l["row-expanded"]?{name:"row-expanded",fn:t.withCtx(R=>[t.renderSlot(j.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(R)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}}),$z={class:"k-slider","data-testid":"k-slider"},Ez={class:"slider-container"},Bz={class:"input-value"},Dz=["id","disabled","list","max","min","step"],Tz=["id"],Nz=["data-testid","label","value"],xz={"aria-hidden":"true",class:"slider-marks","data-testid":"slider-marks"},Mz=["data-testid"],W1=pe(t.defineComponent({__name:"KSlider",props:t.mergeModels({label:{default:""},min:{default:0},max:{default:10},step:{default:1},showMarks:{type:Boolean,default:!1},marks:{default:()=>[]},showValue:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelAttributes:{default:()=>({})}},{modelValue:{required:!0,type:Number},modelModifiers:{}}),emits:t.mergeModels(["change","update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const r=n,a=t.useId(),o=t.computed(()=>({width:y(u.value)})),i=t.computed(()=>({left:y(u.value),transform:`translateX(-${y(u.value)})`})),l=()=>{r("change",u.value),c()},d=t.useTemplateRef("thumbPopover"),c=()=>{var b;(b=d.value)==null||b.showPopover()},s=()=>{var b;(b=d.value)==null||b.hidePopover()},u=t.useModel(e,"modelValue"),f=t.computed(()=>{if(e.max<=e.min||e.step<=0)return[];const b=[];for(let h=e.min;h<=e.max;h+=e.step)b.push(h);return b}),p=b=>b>=e.min&&b<=e.max&&f.value.includes(b),m=t.computed(()=>{var b,h;if(e.marks.length){if(typeof e.marks[0]=="object")return e.marks.filter(g=>p(g.value));{const g=e.marks.filter(v=>p(v)).map(v=>({label:String(v),value:v}));return((b=g[0])==null?void 0:b.value)!==e.min&&g.unshift({label:String(e.min),value:e.min}),((h=g.at(-1))==null?void 0:h.value)!==e.max&&g.push({label:String(e.max),value:e.max}),g}}return e.showMarks?f.value.map(g=>({label:String(g),value:g})):[{label:String(e.min),value:e.min},{label:String(e.max),value:e.max}]}),y=b=>`${(b-e.min)/(e.max-e.min)*100}%`;return t.watch(()=>e.max,b=>{b<=e.min&&console.warn(`KSlider: max value ${b} must be greater than min value ${e.min}.`)},{immediate:!0}),t.watch(()=>e.step,b=>{e.max>e.min&&(b<=0||(e.max-e.min)%b!==0)&&console.warn(`KSlider: step value ${b} is invalid.`)},{immediate:!0}),t.watch(u,b=>{e.max>e.min&&!p(b)&&(console.warn(`KSelect: value ${b} is out of range [${f.value.join(", ")}]. Setting to min value ${e.min}.`),u.value=e.min)},{immediate:!0}),t.watch(()=>e.marks,b=>{if(b.length){let h=[];h=b.filter(g=>!p(typeof e.marks[0]=="object"?g.value:g)),h.length&&console.warn(`KSlider: marks [${h.map(g=>typeof h[0]=="object"?g.value:g).join(", ")}] are out of range [${f.value.join(", ")}].`)}},{immediate:!0}),(b,h)=>(t.openBlock(),t.createElementBlock("div",$z,[b.label?(t.openBlock(),t.createBlock(_t,t.mergeProps({key:0},b.labelAttributes,{for:`${t.unref(a)}-input`}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:1},16,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",Ez,[t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["lower-range-track",{"is-disabled":b.disabled}]),style:t.normalizeStyle(o.value)},null,6),t.createVNode(Ln,{ref:"thumbPopover","aria-hidden":"true",disabled:b.disabled||!b.showValue,"hide-close-icon":"",placement:"top","popover-timeout":500,trigger:"hover",width:"auto"},{content:t.withCtx(()=>[t.createElementVNode("span",Bz,t.toDisplayString(u.value),1)]),default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["thumb",{"is-disabled":b.disabled}]),style:t.normalizeStyle(i.value)},null,6)]),_:1},8,["disabled"]),t.withDirectives(t.createElementVNode("input",{id:`${t.unref(a)}-input`,"onUpdate:modelValue":h[0]||(h[0]=g=>u.value=g),"data-testid":"slider-input",disabled:b.disabled,list:`${t.unref(a)}-markers`,max:b.max,min:b.min,step:b.step,type:"range",onBlur:s,onFocus:c,onInput:l,onMouseup:s,onTouchend:s},null,40,Dz),[[t.vModelText,u.value,void 0,{number:!0}]]),t.createElementVNode("datalist",{id:`${t.unref(a)}-markers`,"data-testid":"slider-datalist-marks"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,g=>(t.openBlock(),t.createElementBlock("option",{key:`datalist-mark-${g.value}`,"data-testid":`datalist-mark-${g.value}`,label:g.label,style:t.normalizeStyle({left:y(g.value)}),value:g.value},null,12,Nz))),128))],8,Tz),t.createElementVNode("div",xz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,g=>(t.openBlock(),t.createElementBlock("span",{key:`mark-${g.value}`,"data-testid":`mark-${g.value}`,style:t.normalizeStyle({left:y(g.value)})},t.toDisplayString(g.label||g.value),13,Mz))),128))])])]))}}),[["__scopeId","data-v-29cb81de"]]),jc=Object.freeze(Object.defineProperty({__proto__:null,KAlert:Fd,KBadge:Or,KBreadcrumbs:pu,KButton:Ie,KCard:Vl,KCatalog:vu,KCatalogItem:Yl,KCheckbox:Ca,KClipboardProvider:bl,KCodeBlock:Af,KCodeBlockIconButton:pr,KCollapse:If,KComponent:Gc,KCopy:_1,KDateTimePicker:Rg,KDropdown:Fn,KDropdownItem:wo,KDropdownMenu:Fn,KEmptyState:zn,KExternalLink:H1,KFileUpload:zg,KInput:Cn,KInputSwitch:Fg,KLabel:_t,KModal:kc,KModalFullscreen:Xg,KMultiselect:r1,KPagination:ka,KPop:Ln,KPrompt:a1,KRadio:o1,KSegmentedControl:ks,KSelect:l1,KSkeleton:wa,KSkeletonBox:At,KSlideout:s1,KSlider:W1,KStepper:c1,KTable:u1,KTableData:K1,KTableView:Uc,KTabs:f1,KTextArea:h1,KToaster:$c,KToggle:ma,KTooltip:Et,KTreeList:Y1,KTruncate:q1,ToastManager:g1},Symbol.toStringTag,{value:"Module"})),Az={install:e=>{for(const n in jc)e.component(n,jc[n])}};ee.AlertAppearances=xr,ee.BadgeAppearances=j1,ee.BadgeMethodAppearances=vl,ee.ButtonAppearances=Qc,ee.ButtonSizes=G1,ee.CardSizeArray=Z1,ee.DateTimePickerModes=ha,ee.EmptyStateIconVariants=Ft,ee.HeaderTags=Q1,ee.KAlert=Fd,ee.KBadge=Or,ee.KBreadcrumbs=pu,ee.KButton=Ie,ee.KCard=Vl,ee.KCatalog=vu,ee.KCatalogItem=Yl,ee.KCheckbox=Ca,ee.KClipboardProvider=bl,ee.KCodeBlock=Af,ee.KCodeBlockIconButton=pr,ee.KCollapse=If,ee.KComponent=Gc,ee.KCopy=_1,ee.KDateTimePicker=Rg,ee.KDropdown=Fn,ee.KDropdownItem=wo,ee.KDropdownMenu=Fn,ee.KEmptyState=zn,ee.KExternalLink=H1,ee.KFileUpload=zg,ee.KInput=Cn,ee.KInputSwitch=Fg,ee.KLabel=_t,ee.KModal=kc,ee.KModalFullscreen=Xg,ee.KMultiselect=r1,ee.KPagination=ka,ee.KPop=Ln,ee.KPrompt=a1,ee.KRadio=o1,ee.KSegmentedControl=ks,ee.KSelect=l1,ee.KSkeleton=wa,ee.KSkeletonBox=At,ee.KSlideout=s1,ee.KSlider=W1,ee.KStepper=c1,ee.KTable=u1,ee.KTableData=K1,ee.KTableView=Uc,ee.KTabs=f1,ee.KTextArea=h1,ee.KToaster=$c,ee.KToggle=ma,ee.KTooltip=Et,ee.KTreeList=Y1,ee.KTruncate=q1,ee.MethodsArray=ty,ee.ModeArray=ey,ee.ModeArrayCustom=Zc,ee.ModeArrayRelative=Xc,ee.ModeDateOnly=Jc,ee.PopPlacementsArray=ry,ee.PopTriggerArray=ny,ee.RadioTypesArray=ay,ee.SkeletonBoxHeightArray=ly,ee.SkeletonBoxWidthArray=iy,ee.SkeletonTypeArray=oy,ee.StepperStateArray=sy,ee.TableViewHeaderKeys=$e,ee.TimepickerMode=J1,ee.ToastManager=g1,ee.ToasterAppearances=wl,ee.TriggerAlignmentArray=X1,ee.components=jc,ee.default=Az,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|