@turquoisehealth/pit-viper 2.94.1-dev.0 → 2.94.2-dev.0

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.
@@ -22,4 +22,4 @@
22
22
  * @author RubaXa <trash@rubaxa.org>
23
23
  * @author owenm <owen23355@gmail.com>
24
24
  * @license MIT
25
- */function Dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dl(Object(n),!0).forEach(function(i){cf(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Bi(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bi=function(t){return typeof t}:Bi=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}function cf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},At.apply(this,arguments)}function uf(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ff(e,t){if(e==null)return{};var n=uf(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var df="1.15.6";function Dt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ot=Dt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Bn=Dt(/Edge/i),Ol=Dt(/firefox/i),Vn=Dt(/safari/i)&&!Dt(/chrome/i)&&!Dt(/android/i),nr=Dt(/iP(ad|od|hone)/i),Il=Dt(/chrome/i)&&Dt(/android/i),Ml={capture:!1,passive:!1};function G(e,t,n){e.addEventListener(t,n,!Ot&&Ml)}function K(e,t,n){e.removeEventListener(t,n,!Ot&&Ml)}function Vi(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Rl(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function it(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Vi(e,t):Vi(e,t))||i&&e===n)return e;if(e===n)break}while(e=Rl(e))}return null}var $l=/\s+/g;function Ge(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace($l," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace($l," ")}}function F(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function an(e,t){var n="";if(typeof e=="string")n=e;else do{var i=F(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Nl(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function pt(){var e=document.scrollingElement;return e||document.documentElement}function _e(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,l,a,c,u,d;if(e!==window&&e.parentNode&&e!==pt()?(r=e.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,c=r.right,u=r.height,d=r.width):(s=0,l=0,a=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Ot))do if(o&&o.getBoundingClientRect&&(F(o,"transform")!=="none"||n&&F(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(F(o,"border-top-width")),l-=p.left+parseInt(F(o,"border-left-width")),a=s+r.height,c=l+r.width;break}while(o=o.parentNode);if(i&&e!==window){var g=an(o||e),v=g&&g.a,b=g&&g.d;g&&(s/=b,l/=v,d/=v,u/=b,a=s+u,c=l+d)}return{top:s,left:l,bottom:a,right:c,width:d,height:u}}}function Ll(e,t,n){for(var i=Lt(e,!0),o=_e(e)[t];i;){var r=_e(i)[n],s=void 0;if(s=o>=r,!s)return i;if(i===pt())break;i=Lt(i,!1)}return!1}function cn(e,t,n,i){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==B.ghost&&(i||s[r]!==B.dragged)&&it(s[r],n.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function ir(e,t){for(var n=e.lastElementChild;n&&(n===B.ghost||F(n,"display")==="none"||t&&!Vi(n,t));)n=n.previousElementSibling;return n||null}function et(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==B.clone&&(!t||Vi(e,t))&&n++;return n}function kl(e){var t=0,n=0,i=pt();if(e)do{var o=an(e),r=o.a,s=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}function hf(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Lt(e,t){if(!e||!e.getBoundingClientRect)return pt();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=F(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return pt();if(i||t)return n;i=!0}}while(n=n.parentNode);return pt()}function pf(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function or(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var jn;function Fl(e,t){return function(){if(!jn){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),jn=setTimeout(function(){jn=void 0},t)}}}function gf(){clearTimeout(jn),jn=void 0}function Bl(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Vl(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function jl(e,t,n){var i={};return Array.from(e.children).forEach(function(o){var r,s,l,a;if(!(!it(o,t.draggable,e,!1)||o.animated||o===n)){var c=_e(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,c.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,c.top),i.right=Math.max((l=i.right)!==null&&l!==void 0?l:-1/0,c.right),i.bottom=Math.max((a=i.bottom)!==null&&a!==void 0?a:-1/0,c.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var je="Sortable"+new Date().getTime();function mf(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(F(o,"display")==="none"||o===B.ghost)){e.push({target:o,rect:_e(o)});var r=ht({},e[e.length-1].rect);if(o.thisAnimationDuration){var s=an(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(hf(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;e.forEach(function(l){var a=0,c=l.target,u=c.fromRect,d=_e(c),p=c.prevFromRect,g=c.prevToRect,v=l.rect,b=an(c,!0);b&&(d.top-=b.f,d.left-=b.e),c.toRect=d,c.thisAnimationDuration&&or(p,d)&&!or(u,d)&&(v.top-d.top)/(v.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(a=yf(v,p,g,o.options)),or(d,u)||(c.prevFromRect=u,c.prevToRect=d,a||(a=o.options.animation),o.animate(c,v,d,a)),a&&(r=!0,s=Math.max(s,a),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},a),c.thisAnimationDuration=a)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),e=[]},animate:function(i,o,r,s){if(s){F(i,"transition",""),F(i,"transform","");var l=an(this.el),a=l&&l.a,c=l&&l.d,u=(o.left-r.left)/(a||1),d=(o.top-r.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,F(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=vf(i),F(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),F(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){F(i,"transition",""),F(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function vf(e){return e.offsetWidth}function yf(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var un=[],rr={initializeByDefault:!0},Hn={mount:function(t){for(var n in rr)rr.hasOwnProperty(n)&&!(n in t)&&(t[n]=rr[n]);un.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),un.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";un.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](ht({sortable:n},i)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](ht({sortable:n},i)))})},initializePlugins:function(t,n,i,o){un.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var c=new l(t,n,t.options);c.sortable=t,c.options=t.options,t[a]=c,At(i,c.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,n){var i={};return un.forEach(function(o){typeof o.eventProperties=="function"&&At(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return un.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(o=r.optionListeners[n].call(t[r.pluginName],i))}),o}};function bf(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,l=e.fromEl,a=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,g=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[je],!!t){var b,T=t.options,P="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Ot&&!Bn?b=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(i,!0,!0)),b.to=s||n,b.from=l||n,b.item=o||n,b.clone=r,b.oldIndex=a,b.newIndex=c,b.oldDraggableIndex=u,b.newDraggableIndex=d,b.originalEvent=p,b.pullMode=g?g.lastPutMode:void 0;var M=ht(ht({},v),Hn.getEventProperties(i,t));for(var U in M)b[U]=M[U];n&&n.dispatchEvent(b),T[P]&&T[P].call(t,b)}}var _f=["evt"],He=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=ff(i,_f);Hn.pluginEvent.bind(B)(t,n,ht({dragEl:x,parentEl:me,ghostEl:W,rootEl:ue,nextEl:Ut,lastDownEl:ji,cloneEl:pe,cloneHidden:kt,dragStarted:zn,putSortable:Ae,activeSortable:B.active,originalEvent:o,oldIndex:fn,oldDraggableIndex:Wn,newIndex:Xe,newDraggableIndex:Ft,hideGhostForTarget:Gl,unhideGhostForTarget:Xl,cloneNowHidden:function(){kt=!0},cloneNowShown:function(){kt=!1},dispatchSortableEvent:function(l){Fe({sortable:n,name:l,originalEvent:o})}},r))};function Fe(e){bf(ht({putSortable:Ae,cloneEl:pe,targetEl:x,rootEl:ue,oldIndex:fn,oldDraggableIndex:Wn,newIndex:Xe,newDraggableIndex:Ft},e))}var x,me,W,ue,Ut,ji,pe,kt,fn,Xe,Wn,Ft,Hi,Ae,dn=!1,Wi=!1,zi=[],Kt,ot,sr,lr,Hl,Wl,zn,hn,Un,Kn=!1,Ui=!1,Ki,Re,ar=[],cr=!1,Yi=[],Gi=typeof document<"u",Xi=nr,zl=Bn||Ot?"cssFloat":"float",wf=Gi&&!Il&&!nr&&"draggable"in document.createElement("div"),Ul=(function(){if(Gi){if(Ot)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),Kl=function(t,n){var i=F(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=cn(t,0,n),s=cn(t,1,n),l=r&&F(r),a=s&&F(s),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_e(r).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+_e(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return s&&(a.clear==="both"||a.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=o&&i[zl]==="none"||s&&i[zl]==="none"&&c+u>o)?"vertical":"horizontal"},Sf=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,l=i?n.left:n.top,a=i?n.right:n.bottom,c=i?n.width:n.height;return o===l||r===a||o+s/2===l+c/2},xf=function(t,n){var i;return zi.some(function(o){var r=o[je].options.emptyInsertThreshold;if(!(!r||ir(o))){var s=_e(o),l=t>=s.left-r&&t<=s.right+r,a=n>=s.top-r&&n<=s.bottom+r;if(l&&a)return i=o}}),i},Yl=function(t){function n(r,s){return function(l,a,c,u){var d=l.options.group.name&&a.options.group.name&&l.options.group.name===a.options.group.name;if(r==null&&(s||d))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,a,c,u),s)(l,a,c,u);var p=(s?l:a).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Bi(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},Gl=function(){!Ul&&W&&F(W,"display","none")},Xl=function(){!Ul&&W&&F(W,"display","")};Gi&&!Il&&document.addEventListener("click",function(e){if(Wi)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Wi=!1,!1},!0);var Yt=function(t){if(x){t=t.touches?t.touches[0]:t;var n=xf(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[je]._onDragOver(i)}}},Ef=function(t){x&&x.parentNode[je]._isOutsideThisEl(t.target)};function B(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=At({},t),e[je]=this;var n={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 Kl(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(s,l){s.setData("Text",l.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:B.supportPointer!==!1&&"PointerEvent"in window&&(!Vn||nr),emptyInsertThreshold:5};Hn.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Yl(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:wf,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?G(e,"pointerdown",this._onTapStart):(G(e,"mousedown",this._onTapStart),G(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(G(e,"dragover",this),G(e,"dragenter",this)),zi.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),At(this,mf())}B.prototype={constructor:B,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(hn=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,x):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=o.filter;if(Mf(i),!x&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Vn&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=it(a,o.draggable,i,!1),!(a&&a.animated)&&ji!==a)){if(fn=et(a),Wn=et(a,o.draggable),typeof u=="function"){if(u.call(this,t,a,this)){Fe({sortable:n,rootEl:c,name:"filter",targetEl:a,toEl:i,fromEl:i}),He("filter",n,{evt:t}),r&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=it(c,d.trim(),i,!1),d)return Fe({sortable:n,rootEl:d,name:"filter",targetEl:a,fromEl:i,toEl:i}),He("filter",n,{evt:t}),!0}),u)){r&&t.preventDefault();return}o.handle&&!it(c,o.handle,i,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,s=o.options,l=r.ownerDocument,a;if(i&&!x&&i.parentNode===r){var c=_e(i);if(ue=r,x=i,me=x.parentNode,Ut=x.nextSibling,ji=i,Hi=s.group,B.dragged=x,Kt={target:x,clientX:(n||t).clientX,clientY:(n||t).clientY},Hl=Kt.clientX-c.left,Wl=Kt.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,x.style["will-change"]="all",a=function(){if(He("delayEnded",o,{evt:t}),B.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ol&&o.nativeDraggable&&(x.draggable=!0),o._triggerDragStart(t,n),Fe({sortable:o,name:"choose",originalEvent:t}),Ge(x,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){Nl(x,u.trim(),ur)}),G(l,"dragover",Yt),G(l,"mousemove",Yt),G(l,"touchmove",Yt),s.supportPointer?(G(l,"pointerup",o._onDrop),!this.nativeDraggable&&G(l,"pointercancel",o._onDrop)):(G(l,"mouseup",o._onDrop),G(l,"touchend",o._onDrop),G(l,"touchcancel",o._onDrop)),Ol&&this.nativeDraggable&&(this.options.touchStartThreshold=4,x.draggable=!0),He("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Bn||Ot))){if(B.eventCanceled){this._onDrop();return}s.supportPointer?(G(l,"pointerup",o._disableDelayedDrag),G(l,"pointercancel",o._disableDelayedDrag)):(G(l,"mouseup",o._disableDelayedDrag),G(l,"touchend",o._disableDelayedDrag),G(l,"touchcancel",o._disableDelayedDrag)),G(l,"mousemove",o._delayedDragTouchMoveHandler),G(l,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&G(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(a,s.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){x&&ur(x),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._disableDelayedDrag),K(t,"touchend",this._disableDelayedDrag),K(t,"touchcancel",this._disableDelayedDrag),K(t,"pointerup",this._disableDelayedDrag),K(t,"pointercancel",this._disableDelayedDrag),K(t,"mousemove",this._delayedDragTouchMoveHandler),K(t,"touchmove",this._delayedDragTouchMoveHandler),K(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?G(document,"pointermove",this._onTouchMove):n?G(document,"touchmove",this._onTouchMove):G(document,"mousemove",this._onTouchMove):(G(x,"dragend",this),G(ue,"dragstart",this._onDragStart));try{document.selection?Ji(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(dn=!1,ue&&x){He("dragStarted",this,{evt:n}),this.nativeDraggable&&G(document,"dragover",Ef);var i=this.options;!t&&Ge(x,i.dragClass,!1),Ge(x,i.ghostClass,!0),B.active=this,t&&this._appendGhost(),Fe({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ot){this._lastX=ot.clientX,this._lastY=ot.clientY,Gl();for(var t=document.elementFromPoint(ot.clientX,ot.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ot.clientX,ot.clientY),t!==n);)n=t;if(x.parentNode[je]._isOutsideThisEl(t),n)do{if(n[je]){var i=void 0;if(i=n[je]._onDragOver({clientX:ot.clientX,clientY:ot.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=Rl(n));Xl()}},_onTouchMove:function(t){if(Kt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,s=W&&an(W,!0),l=W&&s&&s.a,a=W&&s&&s.d,c=Xi&&Re&&kl(Re),u=(r.clientX-Kt.clientX+o.x)/(l||1)+(c?c[0]-ar[0]:0)/(l||1),d=(r.clientY-Kt.clientY+o.y)/(a||1)+(c?c[1]-ar[1]:0)/(a||1);if(!B.active&&!dn){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(W){s?(s.e+=u-(sr||0),s.f+=d-(lr||0)):s={a:1,b:0,c:0,d:1,e:u,f:d};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");F(W,"webkitTransform",p),F(W,"mozTransform",p),F(W,"msTransform",p),F(W,"transform",p),sr=u,lr=d,ot=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!W){var t=this.options.fallbackOnBody?document.body:ue,n=_e(x,!0,Xi,!0,t),i=this.options;if(Xi){for(Re=t;F(Re,"position")==="static"&&F(Re,"transform")==="none"&&Re!==document;)Re=Re.parentNode;Re!==document.body&&Re!==document.documentElement?(Re===document&&(Re=pt()),n.top+=Re.scrollTop,n.left+=Re.scrollLeft):Re=pt(),ar=kl(Re)}W=x.cloneNode(!0),Ge(W,i.ghostClass,!1),Ge(W,i.fallbackClass,!0),Ge(W,i.dragClass,!0),F(W,"transition",""),F(W,"transform",""),F(W,"box-sizing","border-box"),F(W,"margin",0),F(W,"top",n.top),F(W,"left",n.left),F(W,"width",n.width),F(W,"height",n.height),F(W,"opacity","0.8"),F(W,"position",Xi?"absolute":"fixed"),F(W,"zIndex","100000"),F(W,"pointerEvents","none"),B.ghost=W,t.appendChild(W),F(W,"transform-origin",Hl/parseInt(W.style.width)*100+"% "+Wl/parseInt(W.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,r=i.options;if(He("dragStart",this,{evt:t}),B.eventCanceled){this._onDrop();return}He("setupClone",this),B.eventCanceled||(pe=Vl(x),pe.removeAttribute("id"),pe.draggable=!1,pe.style["will-change"]="",this._hideClone(),Ge(pe,this.options.chosenClass,!1),B.clone=pe),i.cloneId=Ji(function(){He("clone",i),!B.eventCanceled&&(i.options.removeCloneOnHide||ue.insertBefore(pe,x),i._hideClone(),Fe({sortable:i,name:"clone"}))}),!n&&Ge(x,r.dragClass,!0),n?(Wi=!0,i._loopId=setInterval(i._emulateDragOver,50)):(K(document,"mouseup",i._onDrop),K(document,"touchend",i._onDrop),K(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,x)),G(document,"drop",i),F(x,"transform","translateZ(0)")),dn=!0,i._dragStartId=Ji(i._dragStarted.bind(i,n,t)),G(document,"selectstart",i),zn=!0,window.getSelection().removeAllRanges(),Vn&&F(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,r,s,l=this.options,a=l.group,c=B.active,u=Hi===a,d=l.sort,p=Ae||c,g,v=this,b=!1;if(cr)return;function T(Z,It){He(Z,v,ht({evt:t,isOwner:u,axis:g?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:d,fromSortable:p,target:i,completed:M,onMove:function(gt,tt){return qi(ue,n,x,o,gt,_e(gt),t,tt)},changed:U},It))}function P(){T("dragOverAnimationCapture"),v.captureAnimationState(),v!==p&&p.captureAnimationState()}function M(Z){return T("dragOverCompleted",{insertion:Z}),Z&&(u?c._hideClone():c._showClone(v),v!==p&&(Ge(x,Ae?Ae.options.ghostClass:c.options.ghostClass,!1),Ge(x,l.ghostClass,!0)),Ae!==v&&v!==B.active?Ae=v:v===B.active&&Ae&&(Ae=null),p===v&&(v._ignoreWhileAnimating=i),v.animateAll(function(){T("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===x&&!x.animated||i===n&&!i.animated)&&(hn=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(x.parentNode[je]._isOutsideThisEl(t.target),!Z&&Yt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function U(){Xe=et(x),Ft=et(x,l.draggable),Fe({sortable:v,name:"change",toEl:n,newIndex:Xe,newDraggableIndex:Ft,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=it(i,l.draggable,n,!0),T("dragOver"),B.eventCanceled)return b;if(x.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||v._ignoreWhileAnimating===i)return M(!1);if(Wi=!1,c&&!l.disabled&&(u?d||(s=me!==ue):Ae===this||(this.lastPutMode=Hi.checkPull(this,c,x,t))&&a.checkPut(this,c,x,t))){if(g=this._getDirection(t,i)==="vertical",o=_e(x),T("dragOverValid"),B.eventCanceled)return b;if(s)return me=ue,P(),this._hideClone(),T("revert"),B.eventCanceled||(Ut?ue.insertBefore(x,Ut):ue.appendChild(x)),M(!0);var I=ir(n,l.draggable);if(!I||Af(t,g,this)&&!I.animated){if(I===x)return M(!1);if(I&&n===t.target&&(i=I),i&&(r=_e(i)),qi(ue,n,x,o,i,r,t,!!i)!==!1)return P(),I&&I.nextSibling?n.insertBefore(x,I.nextSibling):n.appendChild(x),me=n,U(),M(!0)}else if(I&&Pf(t,g,this)){var Y=cn(n,0,l,!0);if(Y===x)return M(!1);if(i=Y,r=_e(i),qi(ue,n,x,o,i,r,t,!1)!==!1)return P(),n.insertBefore(x,Y),me=n,U(),M(!0)}else if(i.parentNode===n){r=_e(i);var ee=0,re,$=x.parentNode!==n,N=!Sf(x.animated&&x.toRect||o,i.animated&&i.toRect||r,g),z=g?"top":"left",te=Ll(i,"top","top")||Ll(x,"top","top"),We=te?te.scrollTop:void 0;hn!==i&&(re=r[z],Kn=!1,Ui=!N&&l.invertSwap||$),ee=Df(t,i,r,g,N?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ui,hn===i);var Se;if(ee!==0){var qe=et(x);do qe-=ee,Se=me.children[qe];while(Se&&(F(Se,"display")==="none"||Se===W))}if(ee===0||Se===i)return M(!1);hn=i,Un=ee;var Bt=i.nextElementSibling,fe=!1;fe=ee===1;var ie=qi(ue,n,x,o,i,r,t,fe);if(ie!==!1)return(ie===1||ie===-1)&&(fe=ie===1),cr=!0,setTimeout(Cf,30),P(),fe&&!Bt?n.appendChild(x):i.parentNode.insertBefore(x,fe?Bt:i),te&&Bl(te,0,We-te.scrollTop),me=x.parentNode,re!==void 0&&!Ui&&(Ki=Math.abs(re-_e(i)[z])),U(),M(!0)}if(n.contains(x))return M(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){K(document,"mousemove",this._onTouchMove),K(document,"touchmove",this._onTouchMove),K(document,"pointermove",this._onTouchMove),K(document,"dragover",Yt),K(document,"mousemove",Yt),K(document,"touchmove",Yt)},_offUpEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._onDrop),K(t,"touchend",this._onDrop),K(t,"pointerup",this._onDrop),K(t,"pointercancel",this._onDrop),K(t,"touchcancel",this._onDrop),K(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(Xe=et(x),Ft=et(x,i.draggable),He("drop",this,{evt:t}),me=x&&x.parentNode,Xe=et(x),Ft=et(x,i.draggable),B.eventCanceled){this._nulling();return}dn=!1,Ui=!1,Kn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fr(this.cloneId),fr(this._dragStartId),this.nativeDraggable&&(K(document,"drop",this),K(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Vn&&F(document.body,"user-select",""),F(x,"transform",""),t&&(zn&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),W&&W.parentNode&&W.parentNode.removeChild(W),(ue===me||Ae&&Ae.lastPutMode!=="clone")&&pe&&pe.parentNode&&pe.parentNode.removeChild(pe),x&&(this.nativeDraggable&&K(x,"dragend",this),ur(x),x.style["will-change"]="",zn&&!dn&&Ge(x,Ae?Ae.options.ghostClass:this.options.ghostClass,!1),Ge(x,this.options.chosenClass,!1),Fe({sortable:this,name:"unchoose",toEl:me,newIndex:null,newDraggableIndex:null,originalEvent:t}),ue!==me?(Xe>=0&&(Fe({rootEl:me,name:"add",toEl:me,fromEl:ue,originalEvent:t}),Fe({sortable:this,name:"remove",toEl:me,originalEvent:t}),Fe({rootEl:me,name:"sort",toEl:me,fromEl:ue,originalEvent:t}),Fe({sortable:this,name:"sort",toEl:me,originalEvent:t})),Ae&&Ae.save()):Xe!==fn&&Xe>=0&&(Fe({sortable:this,name:"update",toEl:me,originalEvent:t}),Fe({sortable:this,name:"sort",toEl:me,originalEvent:t})),B.active&&((Xe==null||Xe===-1)&&(Xe=fn,Ft=Wn),Fe({sortable:this,name:"end",toEl:me,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){He("nulling",this),ue=x=me=W=Ut=pe=ji=kt=Kt=ot=zn=Xe=Ft=fn=Wn=hn=Un=Ae=Hi=B.dragged=B.ghost=B.clone=B.active=null,Yi.forEach(function(t){t.checked=!0}),Yi.length=sr=lr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":x&&(this._onDragOver(t),Tf(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)n=i[o],it(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||If(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(r,s){var l=o.children[s];it(l,this.options.draggable,o,!1)&&(i[r]=l)},this),n&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return it(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Hn.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&Yl(i)},destroy:function(){He("destroy",this);var t=this.el;t[je]=null,K(t,"mousedown",this._onTapStart),K(t,"touchstart",this._onTapStart),K(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(K(t,"dragover",this),K(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),zi.splice(zi.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!kt){if(He("hideClone",this),B.eventCanceled)return;F(pe,"display","none"),this.options.removeCloneOnHide&&pe.parentNode&&pe.parentNode.removeChild(pe),kt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(kt){if(He("showClone",this),B.eventCanceled)return;x.parentNode==ue&&!this.options.group.revertClone?ue.insertBefore(pe,x):Ut?ue.insertBefore(pe,Ut):ue.appendChild(pe),this.options.group.revertClone&&this.animate(x,pe),F(pe,"display",""),kt=!1}}};function Tf(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function qi(e,t,n,i,o,r,s,l){var a,c=e[je],u=c.options.onMove,d;return window.CustomEvent&&!Ot&&!Bn?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=e,a.dragged=n,a.draggedRect=i,a.related=o||t,a.relatedRect=r||_e(t),a.willInsertAfter=l,a.originalEvent=s,e.dispatchEvent(a),u&&(d=u.call(c,a,s)),d}function ur(e){e.draggable=!1}function Cf(){cr=!1}function Pf(e,t,n){var i=_e(cn(n.el,0,n.options,!0)),o=jl(n.el,n.options,W),r=10;return t?e.clientX<o.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<o.top-r||e.clientY<i.bottom&&e.clientX<i.left}function Af(e,t,n){var i=_e(ir(n.el,n.options.draggable)),o=jl(n.el,n.options,W),r=10;return t?e.clientX>o.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>o.bottom+r||e.clientX>i.right&&e.clientY>i.top}function Df(e,t,n,i,o,r,s,l){var a=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,p=!1;if(!s){if(l&&Ki<c*o){if(!Kn&&(Un===1?a>u+c*r/2:a<d-c*r/2)&&(Kn=!0),Kn)p=!0;else if(Un===1?a<u+Ki:a>d-Ki)return-Un}else if(a>u+c*(1-o)/2&&a<d-c*(1-o)/2)return Of(t)}return p=p||s,p&&(a<u+c*r/2||a>d-c*r/2)?a>u+c/2?1:-1:0}function Of(e){return et(x)<et(e)?1:-1}function If(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Mf(e){Yi.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Yi.push(i)}}function Ji(e){return setTimeout(e,0)}function fr(e){return clearTimeout(e)}Gi&&G(document,"touchmove",function(e){(B.active||dn)&&e.cancelable&&e.preventDefault()}),B.utils={on:G,off:K,css:F,find:Nl,is:function(t,n){return!!it(t,n,t,!1)},extend:pf,throttle:Fl,closest:it,toggleClass:Ge,clone:Vl,index:et,nextTick:Ji,cancelNextTick:fr,detectDirection:Kl,getChild:cn,expando:je},B.get=function(e){return e[je]},B.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(B.utils=ht(ht({},B.utils),i.utils)),Hn.mount(i)})},B.create=function(e,t){return new B(e,t)},B.version=df;var we=[],Yn,dr,hr=!1,pr,gr,Zi,Gn;function Rf(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?G(document,"dragover",this._handleAutoScroll):this.options.supportPointer?G(document,"pointermove",this._handleFallbackAutoScroll):i.touches?G(document,"touchmove",this._handleFallbackAutoScroll):G(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?K(document,"dragover",this._handleAutoScroll):(K(document,"pointermove",this._handleFallbackAutoScroll),K(document,"touchmove",this._handleFallbackAutoScroll),K(document,"mousemove",this._handleFallbackAutoScroll)),ql(),Qi(),gf()},nulling:function(){Zi=dr=Yn=hr=Gn=pr=gr=null,we.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,s);if(Zi=n,i||this.options.forceAutoScrollFallback||Bn||Ot||Vn){mr(n,this.options,l,i);var a=Lt(l,!0);hr&&(!Gn||r!==pr||s!==gr)&&(Gn&&ql(),Gn=setInterval(function(){var c=Lt(document.elementFromPoint(r,s),!0);c!==a&&(a=c,Qi()),mr(n,o.options,c,i)},10),pr=r,gr=s)}else{if(!this.options.bubbleScroll||Lt(l,!0)===pt()){Qi();return}mr(n,this.options,Lt(l,!1),!1)}}},At(e,{pluginName:"scroll",initializeByDefault:!0})}function Qi(){we.forEach(function(e){clearInterval(e.pid)}),we=[]}function ql(){clearInterval(Gn)}var mr=Fl(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,a=pt(),c=!1,u;dr!==n&&(dr=n,Qi(),Yn=t.scroll,u=t.scrollFn,Yn===!0&&(Yn=Lt(n,!0)));var d=0,p=Yn;do{var g=p,v=_e(g),b=v.top,T=v.bottom,P=v.left,M=v.right,U=v.width,I=v.height,Y=void 0,ee=void 0,re=g.scrollWidth,$=g.scrollHeight,N=F(g),z=g.scrollLeft,te=g.scrollTop;g===a?(Y=U<re&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),ee=I<$&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(Y=U<re&&(N.overflowX==="auto"||N.overflowX==="scroll"),ee=I<$&&(N.overflowY==="auto"||N.overflowY==="scroll"));var We=Y&&(Math.abs(M-o)<=s&&z+U<re)-(Math.abs(P-o)<=s&&!!z),Se=ee&&(Math.abs(T-r)<=s&&te+I<$)-(Math.abs(b-r)<=s&&!!te);if(!we[d])for(var qe=0;qe<=d;qe++)we[qe]||(we[qe]={});(we[d].vx!=We||we[d].vy!=Se||we[d].el!==g)&&(we[d].el=g,we[d].vx=We,we[d].vy=Se,clearInterval(we[d].pid),(We!=0||Se!=0)&&(c=!0,we[d].pid=setInterval(function(){i&&this.layer===0&&B.active._onTouchMove(Zi);var Bt=we[this.layer].vy?we[this.layer].vy*l:0,fe=we[this.layer].vx?we[this.layer].vx*l:0;typeof u=="function"&&u.call(B.dragged.parentNode[je],fe,Bt,e,Zi,we[this.layer].el)!=="continue"||Bl(we[this.layer].el,fe,Bt)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==a&&(p=Lt(p,!1)));hr=c}},30),Jl=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(n){var c=i||r;l();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);a(),c&&!c.el.contains(d)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function vr(){}vr.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=cn(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:Jl},At(vr,{pluginName:"revertOnSpill"});function yr(){}yr.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:Jl},At(yr,{pluginName:"removeOnSpill"}),B.mount(new Rf),B.mount(yr,vr);function $f(e,t,n={}){let i;const{document:o=zu,...r}=n,s={onUpdate:u=>{kf(t,u.oldIndex,u.newIndex,u)}},l=()=>{const u=typeof e=="string"?o?.querySelector(e):_l(e);!u||i!==void 0||(i=new B(u,{...s,...r}))},a=()=>{i?.destroy(),i=void 0},c=(u,d)=>{if(d!==void 0)i?.option(u,d);else return i?.option(u)};return Hu(l),Li(a),{stop:a,start:l,option:c}}function Nf(e,t,n){const i=e.children[n];e.insertBefore(t,i)}function Lf(e){e.parentNode&&e.parentNode.removeChild(e)}function kf(e,t,n,i=null){i!=null&&(Lf(i.item),Nf(i.from,i.item,t));const o=ye(e),r=o?[...xe(e)]:xe(e);if(n>=0&&n<r.length){const s=r.splice(t,1)[0];wn(()=>{r.splice(n,0,s),o&&(e.value=r)})}}const Ff=["data-align"],Bf=Pe({__name:"PvPopover",props:{alignment:{default:void 0,type:null},cssCustomProperties:{default:()=>({}),type:Object},cssCustomListProperties:{type:Object},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{expose:t,emit:n}){const i=Qe(null),o=Tn("popoverList"),r=e,s=n;return r.isSortable&&r.isList&&$f(o,[],{animation:150,onUpdate:()=>{const l=Array.from(o.value?.children||[]).map(a=>a.id);s("list-order-updated",l)}}),t({popoverRoot:i}),(l,a)=>(O(),j("div",{ref_key:"popoverRoot",ref:i,class:"pv-popover","data-testid":"pv-popover","data-align":e.alignment,style:_t(e.cssCustomProperties)},[e.isList?(O(),j("ul",{key:0,ref:"popoverList",role:"list",class:"pv-popover-list",style:_t(e.cssCustomListProperties)},[Tt(l.$slots,"default",{},void 0,!0)],4)):Tt(l.$slots,"default",{key:1},void 0,!0)],12,Ff))}}),Vf=".pv-popover-list[data-v-cda1af8c]{font-size:14px}",eo=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},jf=eo(Bf,[["styles",[Vf]],["__scopeId","data-v-cda1af8c"]]),Hf=Pe({__name:"PvMenu",props:{teleportLocation:{type:String},open:{type:Boolean},popoverPositionStyle:{type:Object},cssCustomListProperties:{type:Object},useTeleport:{type:Boolean,default:!1}},setup(e,{expose:t}){const n=Qe(null);return t({popoverRef:n}),(i,o)=>(O(),de(ic,{to:e.teleportLocation,disabled:!e.useTeleport},[be(jf,{ref_key:"popoverRef",ref:n,class:Ee({"pv-hide":!e.open}),"css-custom-list-properties":e.cssCustomListProperties,"css-custom-properties":{width:"auto",maxWidth:"260px",...e.popoverPositionStyle},isList:!0},{default:xn(()=>[Tt(i.$slots,"default")]),_:3},8,["class","css-custom-list-properties","css-custom-properties"])],8,["to","disabled"]))}}),to=eo(Pe({__name:"PvCounterBadge",props:{value:{type:Number},prefix:{default:"",type:String},variant:{default:"primary",type:null},size:{default:"sm",type:String},maxValue:{default:99,type:Number}},setup(e){const t=e,n=he(()=>t.size=="md"?"md":(t.size=="sm","sm")),i=he(()=>t.maxValue&&t.value&&t.value>t.maxValue?`${t.maxValue}+`:t.value!=null?`${t.prefix}${t.value}`:"-"),o=he(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-md":n.value=="md","pv-badge-sm pv-text-body-sm":n.value=="sm","pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface pv-bordered":t.variant=="secondary","pv-surface-lighten-5":t.variant=="tertiary","pv-text-secondary":t.variant=="ghost"||t.variant=="tertiary","pv-surface":t.variant=="ghost"}));return(r,s)=>(O(),j("div",{class:Ee(o.value),"data-testid":"pv-counter-badge"},Ve(i.value),3))}}),[["styles",[".pv-badge-md[data-v-fc3c1104]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-badge-sm[data-v-fc3c1104]{--inset-size: 0 2px;min-height:16px;max-height:16px;min-width:16px;font-weight:500}.pv-surface-lighten-5[data-v-fc3c1104]{background-color:#e0e5e4}.pv-text-secondary[data-v-fc3c1104]{color:#4b595c}"]],["__scopeId","data-v-fc3c1104"]]);function Wf(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}const zf=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Uf(e){return Array.from(e.match(zf)??[])}function Kf(e){const t=Uf(e);if(t.length===0)return"";const[n,...i]=t;return`${n.toLowerCase()}${i.map(o=>Wf(o)).join("")}`}const Yf={class:"pv-flex","data-testid":"pv-company-logo"},Gf=["src"],Zl=Pe({__name:"PvCompanyLogo",props:{basePath:{default:"https://static-assets.turquoise.health/shared-logos/prd/payers",type:String},name:{type:String},size:{default:"md",type:null},srcPathOverride:{type:String},toCamelCase:{type:Boolean,default:!0}},setup(e){const t=e,n=Qe(!0),i=he(()=>Ju[t.size]||"32px"),o=he(()=>({"pv-icon":n.value,[`pv-company-${t.size}`]:t.size&&!n.value})),r=he(()=>({width:i.value})),s=he(()=>t.toCamelCase?Kf(t.name)+".svg":t.name+".svg"),l=he(()=>t.srcPathOverride?t.srcPathOverride:`${t.basePath}/${s.value}`);return $t(l,()=>{n.value=!0}),(a,c)=>(O(),j("div",Yf,[n.value?(O(),j("div",{key:0,class:Ee(o.value),style:_t(r.value)},[ke("img",{src:l.value,alt:"",onError:c[0]||(c[0]=u=>n.value=!1)},null,40,Gf)],6)):(O(),j("div",{key:1,class:Ee(o.value)},null,2))]))}}),Xf=["data-position","aria-labelledby","data-style","data-static"],qf=["id"],Jf={key:1},Zf=Pe({__name:"PvTooltip",props:{variant:{default:"white",type:String},tooltipPosition:{default:"top-right",type:String},ariaLabelledBy:{default:"ariaLabelledById",type:String},size:{default:"md",type:String},interactive:{type:Boolean,default:!0},delay:{default:0,type:Number}},setup(e){return(t,n)=>t.$slots["tooltip-content"]?(O(),j("div",{key:0,"data-testid":"pv-tooltip",class:Ee(["pv-tooltip",{"pv-tooltip-small":e.size==="sm"}]),"data-position":e.tooltipPosition,"aria-labelledby":e.ariaLabelledBy,"data-style":e.variant==="white"?"white":"dark","data-static":e.interactive===!1?!0:void 0},[Tt(t.$slots,"label"),ke("div",{role:"tooltip",id:e.ariaLabelledBy,"data-testid":"pv-tooltip-content"},[Tt(t.$slots,"tooltip-content")],8,qf)],10,Xf)):(O(),j("div",Jf,[Tt(t.$slots,"label")]))}}),Qf=["disabled"],ed={class:"pv-flex"},td={key:0,"data-testid":"pv-select-prefix-label",class:"pv-border-right",style:{color:"#89989b","padding-right":"4px"}},nd={key:4},id=Pe({__name:"PvSelectButtonTrigger",props:{variant:{default:"secondary",type:String},size:{default:"lg",type:String},disabled:{type:Boolean},counterPosition:{type:String},counterValue:{type:Number},counterBadgeVariant:{type:null},prefixLabel:{type:String},label:{type:String},icon:{type:String},companyLogo:{type:String},showClear:{type:Boolean},showDropdown:{type:Boolean,default:!0},open:{type:Boolean},isLoading:{type:Boolean}},emits:["handle-toggle-dropdown","handle-clear"],setup(e,{expose:t}){const n={xl:"large",lg:void 0},i=Qe(null);return t({triggerRef:i}),(o,r)=>(O(),j("button",{ref_key:"triggerRef",ref:i,"data-testid":"pv-multi-select-button-trigger",class:Ee(["pv-flex","pv-space-between",{[`pv-button-${e.variant}`]:!0,[`pv-button-${n[e.size]}`]:!!e.size}]),style:{"--flex-gap":"0.25rem"},disabled:e.disabled||e.isLoading,onClick:r[1]||(r[1]=s=>o.$emit("handle-toggle-dropdown"))},[ke("div",ed,[e.prefixLabel?(O(),j("p",td,Ve(e.prefixLabel),1)):oe("v-if",!0),e.counterPosition==="left"&&e.counterValue?(O(),de(to,{key:1,"data-testid":"pv-multi-select-left-counter-badge",value:e.counterValue,variant:e.counterBadgeVariant,size:"sm"},null,8,["value","variant"])):oe("v-if",!0),e.icon?(O(),de(ln,{key:2,"data-testid":"pv-multi-select-button-icon",name:e.icon},null,8,["name"])):oe("v-if",!0),e.companyLogo?(O(),de(Zl,{key:3,name:e.companyLogo,size:"sm"},null,8,["name"])):oe("v-if",!0),e.isLoading||e.label?(O(),j("span",nd,Ve(e.isLoading?"Loading...":e.label),1)):oe("v-if",!0),e.counterPosition==="right"&&e.counterValue?(O(),de(to,{key:5,"data-testid":"pv-multi-select-right-counter-badge",value:e.counterValue,variant:e.counterBadgeVariant,size:"sm"},null,8,["value","variant"])):oe("v-if",!0)]),e.showDropdown?(O(),de(ln,{key:0,name:e.open?"chevron-up":"chevron-down"},null,8,["name"])):oe("v-if",!0),e.showClear?(O(),de(Zf,{key:1,size:"sm",variant:"dark","tooltip-position":"top-left"},{label:xn(()=>[be(ln,{name:"close",onClick:r[0]||(r[0]=Ru(s=>o.$emit("handle-clear"),["stop"]))})]),"tooltip-content":xn(()=>[...r[2]||(r[2]=[zo(" Clear Selections ",-1)])]),_:1})):oe("v-if",!0)],10,Qf))}}),od={},rd={class:"pv-text-subdued pv-text-center pv-text-body-md"};function sd(e,t){return O(),j("div",rd,"No Results Found")}const ld=eo(od,[["render",sd]]),ad=["src"],cd=Pe({__name:"PvAvatar",props:{size:{default:"lg",type:String},image:{type:String},initials:{type:String}},setup(e){const t={sm:"pv-avatar-16",md:"pv-avatar-20",lg:"pv-avatar-xs",xl:"pv-avatar-sm","2x":"pv-avatar-md"};return(n,i)=>(O(),j("div",{class:Ee(t[e.size]),"data-testid":"pv-avatar"},[e.initials?(O(),j(ge,{key:0},[zo(Ve(e.initials),1)],64)):e.image?(O(),j("img",{key:1,src:e.image},null,8,ad)):oe("v-if",!0)],2))}}),ud={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},fd=["title"],dd=["title"],hd={key:4,class:"pv-text-subdued pv-text-body-md"},no=eo(Pe({__name:"PvMenuItem",props:{id:{type:String},text:{type:String},subText:{type:String},secondaryText:{type:[Number,String]},counterBadgeVariant:{type:null},icon:{type:String},companyName:{type:String},avatar:{type:Object},disabled:{type:Boolean},renderer:{type:null},rendererProps:{type:null},classList:{type:Array},searchText:{type:String}},emits:["handle-selected"],setup(e){const t=e,n=he(()=>{const i=t.classList?[...t.classList]:[];return t.disabled?i.push("pv-menu-item-disabled"):i.push("pv-menu-item"),i});return(i,o)=>(O(),j("a",{class:Ee(["pv-flex",n.value]),"data-testid":"pv-menu-item",style:_t(e.disabled?"color: #7D898D;":""),role:"button",onClick:o[0]||(o[0]=r=>e.disabled?null:i.$emit("handle-selected"))},[e.renderer?(O(),de(Ao(e.renderer),si(Rn({key:0},i.$props)),null,16)):(O(),j(ge,{key:1},[e.avatar?(O(),de(cd,{key:0,initials:e.avatar.initials,image:e.avatar.image,size:"lg"},null,8,["initials","image"])):oe("v-if",!0),e.icon?(O(),de(ln,{key:1,class:"pv-text-subdued",name:e.icon},null,8,["name"])):oe("v-if",!0),e.companyName?(O(),de(Zl,{key:2,name:e.companyName,size:"sm"},null,8,["name"])):oe("v-if",!0),ke("div",ud,[ke("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:e.text},Ve(e.text),9,fd),e.subText?(O(),j("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:e.subText},Ve(e.subText),9,dd)):oe("v-if",!0)]),e.secondaryText&&typeof e.secondaryText=="number"?(O(),de(to,{key:3,value:e.secondaryText,variant:e.counterBadgeVariant},null,8,["value","variant"])):e.secondaryText&&typeof e.secondaryText=="string"?(O(),j("span",hd,Ve(e.secondaryText),1)):oe("v-if",!0)],64))],6))}}),[["styles",[".pv-menu-item-disabled[data-v-c2ce0e65]{pointer-events:none;background:#ececec}.pv-menu-item[data-v-c2ce0e65]{cursor:pointer}"]],["__scopeId","data-v-c2ce0e65"]]),pd=["checked","disabled"],gd={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},md=["title"],vd=["title"],yd={key:1,class:"pv-text-subdued pv-text-body-md"},bd=Pe({__name:"PvMenuCheckboxItem",props:{id:{type:String},text:{type:String},subText:{type:String},secondaryText:{type:[Number,String]},counterBadgeVariant:{type:null},value:{type:Boolean},disabled:{type:Boolean},renderer:{type:null},rendererProps:{type:null},classList:{type:Array}},emits:["handle-selected"],setup(e){return(t,n)=>(O(),j("label",{class:Ee(["pv-label pv-label-hover pv-flex",e.classList]),"data-testid":"pv-menu-checkbox-item",style:{cursor:"pointer"}},[ke("input",{type:"checkbox",name:"checkbox",checked:e.value,class:"pv-checkbox",onChange:n[0]||(n[0]=i=>t.$emit("handle-selected")),disabled:e.disabled},null,40,pd),e.renderer?(O(),de(Ao(e.renderer),si(Rn({key:0},t.$props)),null,16)):(O(),j(ge,{key:1},[ke("div",gd,[ke("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:e.text},Ve(e.text),9,md),e.subText?(O(),j("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:e.subText},Ve(e.subText),9,vd)):oe("v-if",!0)]),e.secondaryText&&typeof e.secondaryText=="number"?(O(),de(to,{key:0,value:e.secondaryText,variant:e.counterBadgeVariant},null,8,["value","variant"])):e.secondaryText&&typeof e.secondaryText=="string"?(O(),j("span",yd,Ve(e.secondaryText),1)):oe("v-if",!0)],64))],2))}}),Ql=Pe({__name:"PvMultiSelectMenuItem",props:{optionsVariant:{default:"checkbox",type:null},selected:{type:Boolean},option:{type:Object}},emits:["handle-select-item"],setup(e){const t={simple:no,icon:no,company:no,checkbox:bd,avatar:no};return(n,i)=>(O(),de(Ao(t[e.optionsVariant]),{id:e.option.id,value:e.selected,"secondary-text":e.option.secondaryText,icon:e.optionsVariant==="icon"?e.option.icon:void 0,avatar:e.optionsVariant==="avatar"?e.option.avatar:void 0,companyName:e.optionsVariant==="company"?e.option.companyName?e.option.companyName:e.option.text:void 0,text:e.option.text,subText:e.option.subText,disabled:e.option.disabled,renderer:e.option.renderer,rendererProps:e.option.rendererProps,classList:e.option.classList,onHandleSelected:i[0]||(i[0]=()=>n.$emit("handle-select-item",e.option))},null,40,["id","value","secondary-text","icon","avatar","companyName","text","subText","disabled","renderer","rendererProps","classList"]))}}),_d=({alignment:e,useTeleport:t=!0,popoverCssProperties:n}={})=>{const i=Qe(null),o=Qe(null),r=Qe(null),s=Qe(null),l=p=>{let g=p.parentElement;for(;g&&g!==document.body;){if(window.getComputedStyle(g).position!=="static")return g;g=g.parentElement}return null},a=he(()=>{if(!i.value||!o.value||!s.value?.popoverRoot)return 0;let p=i.value.left+window.scrollX;(e==="right"||e==="top right")&&(p=i.value.left+i.value.width+window.scrollX);const g=l(s.value.popoverRoot);if(g){const v=g.getBoundingClientRect();p-=v.left+window.scrollX-g.scrollLeft}return p}),c=he(()=>{if(!i.value||!o.value||!s.value?.popoverRoot)return 0;let p=i.value.top+window.scrollY;e==="top"||e==="top right"||(p+=i.value.height);const g=l(s.value.popoverRoot);if(g){const v=g.getBoundingClientRect();p-=v.top+window.scrollY-g.scrollTop}return p}),u=he(()=>{if(!t)return n;const p={position:"absolute",left:`${a.value}px`,top:`${c.value}px`,zIndex:10};return{...n,...p}});return{triggerRef:r,popoverRef:s,triggerRect:i,popoverRect:o,popoverPositionStyle:u,updateRects:()=>{r.value&&(i.value=r.value.getBoundingClientRect()),s.value?.popoverRoot&&(o.value=s.value.popoverRoot.getBoundingClientRect())}}},wd={class:"pv-relative",style:{width:"fit-content"}},Sd={key:1,class:"pv-text-body-sm",style:{color:"#89989b"}},xd={role:"list"},Ed=["data-active"],Td={key:2,class:"pv-border-top",style:{margin:"8px 0"}},Cd={key:1,role:"list"},Pd=["data-active"],Ad={key:2,class:"pv-flex pv-inset-block-8",style:{"justify-content":"center"}},Dd={class:"pv-sticky pv-surface pv-border-top",style:{"--flex-justify":"space-between","--bottom":"0","padding-top":"0.75rem","padding-bottom":"0.5rem"}},Od=Pe({__name:"PvMultiSelectButton",props:Mo({groupings:{type:Array},defaultOpen:{type:Boolean},disabled:{type:Boolean},teleportLocation:{default:"body",type:String},isLoading:{type:Boolean},variant:{default:"secondary",type:String},size:{default:"lg",type:String},alignment:{type:null},popoverCssProperties:{type:Object},prefixLabel:{type:String},label:{default:"Select",type:String},icon:{type:String},counterPosition:{default:"left",type:String},companyLogo:{type:String},showClear:{type:Boolean,default:!0},showDropdown:{type:Boolean,default:!0},showMenuAction:{type:Boolean,default:!0},showSearchInput:{type:Boolean,default:!0},searchPlaceholder:{type:String},overlayTrigger:{type:Boolean},optionsVariant:{default:"checkbox",type:null},options:{default:()=>[],type:Array},useTeleport:{type:Boolean,default:!1}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{},searchInput:{required:!1,default:""},searchInputModifiers:{}}),emits:Mo(["dropdown-open","dropdown-closed"],["update:modelValue","update:searchInput"]),setup(e,{emit:t}){const n=e,i=t,o={top:n.overlayTrigger?"0":"unset",...n.popoverCssProperties},{popoverPositionStyle:r,updateRects:s,triggerRef:l,popoverRef:a}=_d({alignment:n.alignment,popoverCssProperties:o,useTeleport:n.useTeleport}),c=Tn("select-menu-ref"),u=Tn("select-button-trigger-ref"),d=Tn("searchInputRef"),[p,g]=Wu(n.defaultOpen),v=jo(e,"modelValue"),b=jo(e,"searchInput"),T=()=>{b.value="",p.value=!1};$t(p,$=>{$?wn(()=>{n.overlayTrigger&&n.showSearchInput&&d.value?.input?.focus(),s(),i("dropdown-open")}):i("dropdown-closed")}),Pn(()=>{c.value?.popoverRef&&(a.value=c.value?.popoverRef),u.value?.triggerRef&&(l.value=u.value?.triggerRef)});const P=he(()=>b.value===""?n.options:n.options.filter($=>$.text.toLocaleLowerCase().includes(b.value.toLocaleLowerCase()))),M=$=>{const N=v.value,z=N.findIndex(We=>We.id===$.id);let te;z>-1?te=[...N.slice(0,z),...N.slice(z+1)]:te=[...N,{...$}],v.value=te},U=()=>{v.value=P.value.map($=>({id:$.id,text:$.text}))},I=()=>{v.value=[]},Y=he(()=>{if(!n.groupings)return;const $=new Map;n.groupings.forEach(N=>{$.set(N,[])}),$.set("other",[]);for(const N of n.options){const z=N.groupingLabel,te=z&&$.has(z)?z:"other";$.get(te).push(N)}for(const[N,z]of $)z.length===0&&$.delete(N);return Array.from($.entries())}),ee=he(()=>n.groupings&&b.value===""),re=$=>v.value.some(N=>N.id===$.id)?!0:null;return wl("Escape",()=>{p.value&&T()}),($,N)=>To((O(),j("div",wd,[be(id,{ref:"select-button-trigger-ref",variant:e.variant,size:e.size,disabled:e.disabled,counterPosition:e.counterPosition,prefixLabel:e.prefixLabel,label:e.label,icon:e.icon,companyLogo:e.companyLogo,showClear:e.showClear&&v.value.length>0,showDropdown:e.showDropdown&&v.value.length===0,open:at(p),"counter-value":v.value.length,onHandleClear:I,onHandleToggleDropdown:N[0]||(N[0]=z=>at(g)())},null,8,["variant","size","disabled","counterPosition","prefixLabel","label","icon","companyLogo","showClear","showDropdown","open","counter-value"]),be(Hf,{ref:"select-menu-ref",open:at(p),teleportLocation:e.teleportLocation,"use-teleport":e.useTeleport,"css-custom-list-properties":e.showMenuAction?{"padding-bottom":0}:{},popoverPositionStyle:at(r)},{default:xn(()=>[e.showSearchInput?(O(),j(ge,{key:0},[be(af,{ref:"searchInputRef","model-value":b.value,"onUpdate:modelValue":N[1]||(N[1]=z=>b.value=z),class:"pv-sticky pv-surface pv-stack-12",style:{"padding-top":"4px"},placeholder:e.searchPlaceholder},null,8,["model-value","placeholder"]),N[2]||(N[2]=ke("div",{class:"pv-border-top pv-stack-12"},null,-1))],64)):oe("v-if",!0),P.value.length>0?(O(),j(ge,{key:1},[ee.value?(O(!0),j(ge,{key:0},Do(Y.value,([z,te],We)=>(O(),j("div",{key:z},[$.$slots[z]?Tt($.$slots,z,{key:0}):z!=="other"?(O(),j("span",Sd,Ve(z),1)):oe("v-if",!0),ke("ul",xd,[(O(!0),j(ge,null,Do(te,Se=>To((O(),j("li",{key:Se.id,"data-active":re(Se),class:"pv-stack-4"},[be(Ql,{"data-testid":`pv-multiselect-${z}-item`,"options-variant":e.optionsVariant,selected:v.value.some(qe=>qe.id===Se.id),option:Se,onHandleSelectItem:M},null,8,["data-testid","options-variant","selected","option"])],8,Ed)),[[hu,re(Se)||!e.isLoading]])),128))]),Y.value&&We!==Y.value.length-1?(O(),j("div",Td)):oe("v-if",!0)]))),128)):(O(),j("ul",Cd,[(O(!0),j(ge,null,Do(P.value,z=>(O(),j("li",{key:z.id,"data-active":v.value.some(te=>te.id===z.id)?!0:null,class:"pv-stack-4"},[be(Ql,{"options-variant":e.optionsVariant,selected:v.value.some(te=>te.id===z.id),option:z,onHandleSelectItem:M},null,8,["options-variant","selected","option"])],8,Pd))),128))]))],64)):oe("v-if",!0),e.isLoading?(O(),j("div",Ad,[be(Cl,{variant:"dark"})])):P.value.length===0?(O(),j(ge,{key:3},[$.$slots["no-results"]?Tt($.$slots,"no-results",si(Rn({key:0},$.$props))):(O(),de(ld,{key:1}))],64)):oe("v-if",!0),ke("div",Dd,[$.$slots.footer?Tt($.$slots,"footer",si(Rn({key:0},$.$props))):oe("v-if",!0),e.showMenuAction?(O(),de(of,{key:1,disabled:e.isLoading,onHandleClearAll:I,onHandleSelectAll:U},null,8,["disabled"])):oe("v-if",!0)])]),_:3},8,["open","teleportLocation","use-teleport","css-custom-list-properties","popoverPositionStyle"])])),[[at(Yu),[T,{ignore:[".pv-popover"]}]]])}}),Id=new Set(["PvIcon"]);function Md(e){return!Id.has(e)}function br(e,t){const n=document.querySelector('link[href*="'+t+'"]');if(!e.shadowRoot)return!1;if(n&&e.shadowRoot){const i=n.href;if(e.shadowRoot.querySelector(`link[href="${i}"]`))return;const o=document.createElement("link");return o.rel="stylesheet",o.href=i,e.shadowRoot.prepend(o),!0}return!1}function Rd(e){if(!br(e,"pit-viper-v2")){if(br(e,"pit-viper")){br(e,"pit-viper-v2-scoped");return}console.warn("No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project.")}}const $d=e=>({shadowRoot:Md(e)});function Nd(e){const t=e.__name||e.name;if(!t)throw new Error("Component must have a __name or name property");const n=Pu(e,$d(t));class i extends n{connectedCallback(){super.connectedCallback?.(),Rd(this)}}return i}function Ld(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}function kd(e){const t=e.__name||e.name;if(!t)throw new Error("Component must have a __name or name property");const n=Ld(t),i=Nd(e);customElements.get(n)||customElements.define(n,i)}kd(Od)})();
25
+ */function Dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dl(Object(n),!0).forEach(function(i){cf(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Bi(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bi=function(t){return typeof t}:Bi=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}function cf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},At.apply(this,arguments)}function uf(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ff(e,t){if(e==null)return{};var n=uf(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var df="1.15.6";function Dt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ot=Dt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Bn=Dt(/Edge/i),Ol=Dt(/firefox/i),Vn=Dt(/safari/i)&&!Dt(/chrome/i)&&!Dt(/android/i),nr=Dt(/iP(ad|od|hone)/i),Il=Dt(/chrome/i)&&Dt(/android/i),Ml={capture:!1,passive:!1};function G(e,t,n){e.addEventListener(t,n,!Ot&&Ml)}function K(e,t,n){e.removeEventListener(t,n,!Ot&&Ml)}function Vi(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Rl(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function it(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Vi(e,t):Vi(e,t))||i&&e===n)return e;if(e===n)break}while(e=Rl(e))}return null}var $l=/\s+/g;function Ge(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace($l," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace($l," ")}}function F(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function an(e,t){var n="";if(typeof e=="string")n=e;else do{var i=F(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Nl(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function pt(){var e=document.scrollingElement;return e||document.documentElement}function _e(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,l,a,c,u,d;if(e!==window&&e.parentNode&&e!==pt()?(r=e.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,c=r.right,u=r.height,d=r.width):(s=0,l=0,a=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Ot))do if(o&&o.getBoundingClientRect&&(F(o,"transform")!=="none"||n&&F(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(F(o,"border-top-width")),l-=p.left+parseInt(F(o,"border-left-width")),a=s+r.height,c=l+r.width;break}while(o=o.parentNode);if(i&&e!==window){var g=an(o||e),v=g&&g.a,b=g&&g.d;g&&(s/=b,l/=v,d/=v,u/=b,a=s+u,c=l+d)}return{top:s,left:l,bottom:a,right:c,width:d,height:u}}}function Ll(e,t,n){for(var i=Lt(e,!0),o=_e(e)[t];i;){var r=_e(i)[n],s=void 0;if(s=o>=r,!s)return i;if(i===pt())break;i=Lt(i,!1)}return!1}function cn(e,t,n,i){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==B.ghost&&(i||s[r]!==B.dragged)&&it(s[r],n.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function ir(e,t){for(var n=e.lastElementChild;n&&(n===B.ghost||F(n,"display")==="none"||t&&!Vi(n,t));)n=n.previousElementSibling;return n||null}function et(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==B.clone&&(!t||Vi(e,t))&&n++;return n}function kl(e){var t=0,n=0,i=pt();if(e)do{var o=an(e),r=o.a,s=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}function hf(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Lt(e,t){if(!e||!e.getBoundingClientRect)return pt();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=F(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return pt();if(i||t)return n;i=!0}}while(n=n.parentNode);return pt()}function pf(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function or(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var jn;function Fl(e,t){return function(){if(!jn){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),jn=setTimeout(function(){jn=void 0},t)}}}function gf(){clearTimeout(jn),jn=void 0}function Bl(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Vl(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function jl(e,t,n){var i={};return Array.from(e.children).forEach(function(o){var r,s,l,a;if(!(!it(o,t.draggable,e,!1)||o.animated||o===n)){var c=_e(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,c.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,c.top),i.right=Math.max((l=i.right)!==null&&l!==void 0?l:-1/0,c.right),i.bottom=Math.max((a=i.bottom)!==null&&a!==void 0?a:-1/0,c.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var je="Sortable"+new Date().getTime();function mf(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(F(o,"display")==="none"||o===B.ghost)){e.push({target:o,rect:_e(o)});var r=ht({},e[e.length-1].rect);if(o.thisAnimationDuration){var s=an(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(hf(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;e.forEach(function(l){var a=0,c=l.target,u=c.fromRect,d=_e(c),p=c.prevFromRect,g=c.prevToRect,v=l.rect,b=an(c,!0);b&&(d.top-=b.f,d.left-=b.e),c.toRect=d,c.thisAnimationDuration&&or(p,d)&&!or(u,d)&&(v.top-d.top)/(v.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(a=yf(v,p,g,o.options)),or(d,u)||(c.prevFromRect=u,c.prevToRect=d,a||(a=o.options.animation),o.animate(c,v,d,a)),a&&(r=!0,s=Math.max(s,a),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},a),c.thisAnimationDuration=a)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),e=[]},animate:function(i,o,r,s){if(s){F(i,"transition",""),F(i,"transform","");var l=an(this.el),a=l&&l.a,c=l&&l.d,u=(o.left-r.left)/(a||1),d=(o.top-r.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,F(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=vf(i),F(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),F(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){F(i,"transition",""),F(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function vf(e){return e.offsetWidth}function yf(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var un=[],rr={initializeByDefault:!0},Hn={mount:function(t){for(var n in rr)rr.hasOwnProperty(n)&&!(n in t)&&(t[n]=rr[n]);un.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),un.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";un.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](ht({sortable:n},i)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](ht({sortable:n},i)))})},initializePlugins:function(t,n,i,o){un.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var c=new l(t,n,t.options);c.sortable=t,c.options=t.options,t[a]=c,At(i,c.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,n){var i={};return un.forEach(function(o){typeof o.eventProperties=="function"&&At(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return un.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(o=r.optionListeners[n].call(t[r.pluginName],i))}),o}};function bf(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,l=e.fromEl,a=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,g=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[je],!!t){var b,T=t.options,P="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Ot&&!Bn?b=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(i,!0,!0)),b.to=s||n,b.from=l||n,b.item=o||n,b.clone=r,b.oldIndex=a,b.newIndex=c,b.oldDraggableIndex=u,b.newDraggableIndex=d,b.originalEvent=p,b.pullMode=g?g.lastPutMode:void 0;var M=ht(ht({},v),Hn.getEventProperties(i,t));for(var U in M)b[U]=M[U];n&&n.dispatchEvent(b),T[P]&&T[P].call(t,b)}}var _f=["evt"],He=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=ff(i,_f);Hn.pluginEvent.bind(B)(t,n,ht({dragEl:x,parentEl:me,ghostEl:W,rootEl:ue,nextEl:Ut,lastDownEl:ji,cloneEl:pe,cloneHidden:kt,dragStarted:zn,putSortable:Ae,activeSortable:B.active,originalEvent:o,oldIndex:fn,oldDraggableIndex:Wn,newIndex:Xe,newDraggableIndex:Ft,hideGhostForTarget:Gl,unhideGhostForTarget:Xl,cloneNowHidden:function(){kt=!0},cloneNowShown:function(){kt=!1},dispatchSortableEvent:function(l){Fe({sortable:n,name:l,originalEvent:o})}},r))};function Fe(e){bf(ht({putSortable:Ae,cloneEl:pe,targetEl:x,rootEl:ue,oldIndex:fn,oldDraggableIndex:Wn,newIndex:Xe,newDraggableIndex:Ft},e))}var x,me,W,ue,Ut,ji,pe,kt,fn,Xe,Wn,Ft,Hi,Ae,dn=!1,Wi=!1,zi=[],Kt,ot,sr,lr,Hl,Wl,zn,hn,Un,Kn=!1,Ui=!1,Ki,Re,ar=[],cr=!1,Yi=[],Gi=typeof document<"u",Xi=nr,zl=Bn||Ot?"cssFloat":"float",wf=Gi&&!Il&&!nr&&"draggable"in document.createElement("div"),Ul=(function(){if(Gi){if(Ot)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),Kl=function(t,n){var i=F(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=cn(t,0,n),s=cn(t,1,n),l=r&&F(r),a=s&&F(s),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_e(r).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+_e(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return s&&(a.clear==="both"||a.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=o&&i[zl]==="none"||s&&i[zl]==="none"&&c+u>o)?"vertical":"horizontal"},Sf=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,l=i?n.left:n.top,a=i?n.right:n.bottom,c=i?n.width:n.height;return o===l||r===a||o+s/2===l+c/2},xf=function(t,n){var i;return zi.some(function(o){var r=o[je].options.emptyInsertThreshold;if(!(!r||ir(o))){var s=_e(o),l=t>=s.left-r&&t<=s.right+r,a=n>=s.top-r&&n<=s.bottom+r;if(l&&a)return i=o}}),i},Yl=function(t){function n(r,s){return function(l,a,c,u){var d=l.options.group.name&&a.options.group.name&&l.options.group.name===a.options.group.name;if(r==null&&(s||d))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,a,c,u),s)(l,a,c,u);var p=(s?l:a).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Bi(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},Gl=function(){!Ul&&W&&F(W,"display","none")},Xl=function(){!Ul&&W&&F(W,"display","")};Gi&&!Il&&document.addEventListener("click",function(e){if(Wi)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Wi=!1,!1},!0);var Yt=function(t){if(x){t=t.touches?t.touches[0]:t;var n=xf(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[je]._onDragOver(i)}}},Ef=function(t){x&&x.parentNode[je]._isOutsideThisEl(t.target)};function B(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=At({},t),e[je]=this;var n={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 Kl(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(s,l){s.setData("Text",l.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:B.supportPointer!==!1&&"PointerEvent"in window&&(!Vn||nr),emptyInsertThreshold:5};Hn.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Yl(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:wf,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?G(e,"pointerdown",this._onTapStart):(G(e,"mousedown",this._onTapStart),G(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(G(e,"dragover",this),G(e,"dragenter",this)),zi.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),At(this,mf())}B.prototype={constructor:B,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(hn=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,x):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=o.filter;if(Mf(i),!x&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Vn&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=it(a,o.draggable,i,!1),!(a&&a.animated)&&ji!==a)){if(fn=et(a),Wn=et(a,o.draggable),typeof u=="function"){if(u.call(this,t,a,this)){Fe({sortable:n,rootEl:c,name:"filter",targetEl:a,toEl:i,fromEl:i}),He("filter",n,{evt:t}),r&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=it(c,d.trim(),i,!1),d)return Fe({sortable:n,rootEl:d,name:"filter",targetEl:a,fromEl:i,toEl:i}),He("filter",n,{evt:t}),!0}),u)){r&&t.preventDefault();return}o.handle&&!it(c,o.handle,i,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,s=o.options,l=r.ownerDocument,a;if(i&&!x&&i.parentNode===r){var c=_e(i);if(ue=r,x=i,me=x.parentNode,Ut=x.nextSibling,ji=i,Hi=s.group,B.dragged=x,Kt={target:x,clientX:(n||t).clientX,clientY:(n||t).clientY},Hl=Kt.clientX-c.left,Wl=Kt.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,x.style["will-change"]="all",a=function(){if(He("delayEnded",o,{evt:t}),B.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ol&&o.nativeDraggable&&(x.draggable=!0),o._triggerDragStart(t,n),Fe({sortable:o,name:"choose",originalEvent:t}),Ge(x,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){Nl(x,u.trim(),ur)}),G(l,"dragover",Yt),G(l,"mousemove",Yt),G(l,"touchmove",Yt),s.supportPointer?(G(l,"pointerup",o._onDrop),!this.nativeDraggable&&G(l,"pointercancel",o._onDrop)):(G(l,"mouseup",o._onDrop),G(l,"touchend",o._onDrop),G(l,"touchcancel",o._onDrop)),Ol&&this.nativeDraggable&&(this.options.touchStartThreshold=4,x.draggable=!0),He("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Bn||Ot))){if(B.eventCanceled){this._onDrop();return}s.supportPointer?(G(l,"pointerup",o._disableDelayedDrag),G(l,"pointercancel",o._disableDelayedDrag)):(G(l,"mouseup",o._disableDelayedDrag),G(l,"touchend",o._disableDelayedDrag),G(l,"touchcancel",o._disableDelayedDrag)),G(l,"mousemove",o._delayedDragTouchMoveHandler),G(l,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&G(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(a,s.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){x&&ur(x),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._disableDelayedDrag),K(t,"touchend",this._disableDelayedDrag),K(t,"touchcancel",this._disableDelayedDrag),K(t,"pointerup",this._disableDelayedDrag),K(t,"pointercancel",this._disableDelayedDrag),K(t,"mousemove",this._delayedDragTouchMoveHandler),K(t,"touchmove",this._delayedDragTouchMoveHandler),K(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?G(document,"pointermove",this._onTouchMove):n?G(document,"touchmove",this._onTouchMove):G(document,"mousemove",this._onTouchMove):(G(x,"dragend",this),G(ue,"dragstart",this._onDragStart));try{document.selection?Ji(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(dn=!1,ue&&x){He("dragStarted",this,{evt:n}),this.nativeDraggable&&G(document,"dragover",Ef);var i=this.options;!t&&Ge(x,i.dragClass,!1),Ge(x,i.ghostClass,!0),B.active=this,t&&this._appendGhost(),Fe({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ot){this._lastX=ot.clientX,this._lastY=ot.clientY,Gl();for(var t=document.elementFromPoint(ot.clientX,ot.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ot.clientX,ot.clientY),t!==n);)n=t;if(x.parentNode[je]._isOutsideThisEl(t),n)do{if(n[je]){var i=void 0;if(i=n[je]._onDragOver({clientX:ot.clientX,clientY:ot.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=Rl(n));Xl()}},_onTouchMove:function(t){if(Kt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,s=W&&an(W,!0),l=W&&s&&s.a,a=W&&s&&s.d,c=Xi&&Re&&kl(Re),u=(r.clientX-Kt.clientX+o.x)/(l||1)+(c?c[0]-ar[0]:0)/(l||1),d=(r.clientY-Kt.clientY+o.y)/(a||1)+(c?c[1]-ar[1]:0)/(a||1);if(!B.active&&!dn){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(W){s?(s.e+=u-(sr||0),s.f+=d-(lr||0)):s={a:1,b:0,c:0,d:1,e:u,f:d};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");F(W,"webkitTransform",p),F(W,"mozTransform",p),F(W,"msTransform",p),F(W,"transform",p),sr=u,lr=d,ot=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!W){var t=this.options.fallbackOnBody?document.body:ue,n=_e(x,!0,Xi,!0,t),i=this.options;if(Xi){for(Re=t;F(Re,"position")==="static"&&F(Re,"transform")==="none"&&Re!==document;)Re=Re.parentNode;Re!==document.body&&Re!==document.documentElement?(Re===document&&(Re=pt()),n.top+=Re.scrollTop,n.left+=Re.scrollLeft):Re=pt(),ar=kl(Re)}W=x.cloneNode(!0),Ge(W,i.ghostClass,!1),Ge(W,i.fallbackClass,!0),Ge(W,i.dragClass,!0),F(W,"transition",""),F(W,"transform",""),F(W,"box-sizing","border-box"),F(W,"margin",0),F(W,"top",n.top),F(W,"left",n.left),F(W,"width",n.width),F(W,"height",n.height),F(W,"opacity","0.8"),F(W,"position",Xi?"absolute":"fixed"),F(W,"zIndex","100000"),F(W,"pointerEvents","none"),B.ghost=W,t.appendChild(W),F(W,"transform-origin",Hl/parseInt(W.style.width)*100+"% "+Wl/parseInt(W.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,r=i.options;if(He("dragStart",this,{evt:t}),B.eventCanceled){this._onDrop();return}He("setupClone",this),B.eventCanceled||(pe=Vl(x),pe.removeAttribute("id"),pe.draggable=!1,pe.style["will-change"]="",this._hideClone(),Ge(pe,this.options.chosenClass,!1),B.clone=pe),i.cloneId=Ji(function(){He("clone",i),!B.eventCanceled&&(i.options.removeCloneOnHide||ue.insertBefore(pe,x),i._hideClone(),Fe({sortable:i,name:"clone"}))}),!n&&Ge(x,r.dragClass,!0),n?(Wi=!0,i._loopId=setInterval(i._emulateDragOver,50)):(K(document,"mouseup",i._onDrop),K(document,"touchend",i._onDrop),K(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,x)),G(document,"drop",i),F(x,"transform","translateZ(0)")),dn=!0,i._dragStartId=Ji(i._dragStarted.bind(i,n,t)),G(document,"selectstart",i),zn=!0,window.getSelection().removeAllRanges(),Vn&&F(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,r,s,l=this.options,a=l.group,c=B.active,u=Hi===a,d=l.sort,p=Ae||c,g,v=this,b=!1;if(cr)return;function T(Z,It){He(Z,v,ht({evt:t,isOwner:u,axis:g?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:d,fromSortable:p,target:i,completed:M,onMove:function(gt,tt){return qi(ue,n,x,o,gt,_e(gt),t,tt)},changed:U},It))}function P(){T("dragOverAnimationCapture"),v.captureAnimationState(),v!==p&&p.captureAnimationState()}function M(Z){return T("dragOverCompleted",{insertion:Z}),Z&&(u?c._hideClone():c._showClone(v),v!==p&&(Ge(x,Ae?Ae.options.ghostClass:c.options.ghostClass,!1),Ge(x,l.ghostClass,!0)),Ae!==v&&v!==B.active?Ae=v:v===B.active&&Ae&&(Ae=null),p===v&&(v._ignoreWhileAnimating=i),v.animateAll(function(){T("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===x&&!x.animated||i===n&&!i.animated)&&(hn=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(x.parentNode[je]._isOutsideThisEl(t.target),!Z&&Yt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function U(){Xe=et(x),Ft=et(x,l.draggable),Fe({sortable:v,name:"change",toEl:n,newIndex:Xe,newDraggableIndex:Ft,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=it(i,l.draggable,n,!0),T("dragOver"),B.eventCanceled)return b;if(x.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||v._ignoreWhileAnimating===i)return M(!1);if(Wi=!1,c&&!l.disabled&&(u?d||(s=me!==ue):Ae===this||(this.lastPutMode=Hi.checkPull(this,c,x,t))&&a.checkPut(this,c,x,t))){if(g=this._getDirection(t,i)==="vertical",o=_e(x),T("dragOverValid"),B.eventCanceled)return b;if(s)return me=ue,P(),this._hideClone(),T("revert"),B.eventCanceled||(Ut?ue.insertBefore(x,Ut):ue.appendChild(x)),M(!0);var I=ir(n,l.draggable);if(!I||Af(t,g,this)&&!I.animated){if(I===x)return M(!1);if(I&&n===t.target&&(i=I),i&&(r=_e(i)),qi(ue,n,x,o,i,r,t,!!i)!==!1)return P(),I&&I.nextSibling?n.insertBefore(x,I.nextSibling):n.appendChild(x),me=n,U(),M(!0)}else if(I&&Pf(t,g,this)){var Y=cn(n,0,l,!0);if(Y===x)return M(!1);if(i=Y,r=_e(i),qi(ue,n,x,o,i,r,t,!1)!==!1)return P(),n.insertBefore(x,Y),me=n,U(),M(!0)}else if(i.parentNode===n){r=_e(i);var ee=0,re,$=x.parentNode!==n,N=!Sf(x.animated&&x.toRect||o,i.animated&&i.toRect||r,g),z=g?"top":"left",te=Ll(i,"top","top")||Ll(x,"top","top"),We=te?te.scrollTop:void 0;hn!==i&&(re=r[z],Kn=!1,Ui=!N&&l.invertSwap||$),ee=Df(t,i,r,g,N?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ui,hn===i);var Se;if(ee!==0){var qe=et(x);do qe-=ee,Se=me.children[qe];while(Se&&(F(Se,"display")==="none"||Se===W))}if(ee===0||Se===i)return M(!1);hn=i,Un=ee;var Bt=i.nextElementSibling,fe=!1;fe=ee===1;var ie=qi(ue,n,x,o,i,r,t,fe);if(ie!==!1)return(ie===1||ie===-1)&&(fe=ie===1),cr=!0,setTimeout(Cf,30),P(),fe&&!Bt?n.appendChild(x):i.parentNode.insertBefore(x,fe?Bt:i),te&&Bl(te,0,We-te.scrollTop),me=x.parentNode,re!==void 0&&!Ui&&(Ki=Math.abs(re-_e(i)[z])),U(),M(!0)}if(n.contains(x))return M(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){K(document,"mousemove",this._onTouchMove),K(document,"touchmove",this._onTouchMove),K(document,"pointermove",this._onTouchMove),K(document,"dragover",Yt),K(document,"mousemove",Yt),K(document,"touchmove",Yt)},_offUpEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._onDrop),K(t,"touchend",this._onDrop),K(t,"pointerup",this._onDrop),K(t,"pointercancel",this._onDrop),K(t,"touchcancel",this._onDrop),K(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(Xe=et(x),Ft=et(x,i.draggable),He("drop",this,{evt:t}),me=x&&x.parentNode,Xe=et(x),Ft=et(x,i.draggable),B.eventCanceled){this._nulling();return}dn=!1,Ui=!1,Kn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fr(this.cloneId),fr(this._dragStartId),this.nativeDraggable&&(K(document,"drop",this),K(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Vn&&F(document.body,"user-select",""),F(x,"transform",""),t&&(zn&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),W&&W.parentNode&&W.parentNode.removeChild(W),(ue===me||Ae&&Ae.lastPutMode!=="clone")&&pe&&pe.parentNode&&pe.parentNode.removeChild(pe),x&&(this.nativeDraggable&&K(x,"dragend",this),ur(x),x.style["will-change"]="",zn&&!dn&&Ge(x,Ae?Ae.options.ghostClass:this.options.ghostClass,!1),Ge(x,this.options.chosenClass,!1),Fe({sortable:this,name:"unchoose",toEl:me,newIndex:null,newDraggableIndex:null,originalEvent:t}),ue!==me?(Xe>=0&&(Fe({rootEl:me,name:"add",toEl:me,fromEl:ue,originalEvent:t}),Fe({sortable:this,name:"remove",toEl:me,originalEvent:t}),Fe({rootEl:me,name:"sort",toEl:me,fromEl:ue,originalEvent:t}),Fe({sortable:this,name:"sort",toEl:me,originalEvent:t})),Ae&&Ae.save()):Xe!==fn&&Xe>=0&&(Fe({sortable:this,name:"update",toEl:me,originalEvent:t}),Fe({sortable:this,name:"sort",toEl:me,originalEvent:t})),B.active&&((Xe==null||Xe===-1)&&(Xe=fn,Ft=Wn),Fe({sortable:this,name:"end",toEl:me,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){He("nulling",this),ue=x=me=W=Ut=pe=ji=kt=Kt=ot=zn=Xe=Ft=fn=Wn=hn=Un=Ae=Hi=B.dragged=B.ghost=B.clone=B.active=null,Yi.forEach(function(t){t.checked=!0}),Yi.length=sr=lr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":x&&(this._onDragOver(t),Tf(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)n=i[o],it(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||If(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(r,s){var l=o.children[s];it(l,this.options.draggable,o,!1)&&(i[r]=l)},this),n&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return it(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Hn.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&Yl(i)},destroy:function(){He("destroy",this);var t=this.el;t[je]=null,K(t,"mousedown",this._onTapStart),K(t,"touchstart",this._onTapStart),K(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(K(t,"dragover",this),K(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),zi.splice(zi.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!kt){if(He("hideClone",this),B.eventCanceled)return;F(pe,"display","none"),this.options.removeCloneOnHide&&pe.parentNode&&pe.parentNode.removeChild(pe),kt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(kt){if(He("showClone",this),B.eventCanceled)return;x.parentNode==ue&&!this.options.group.revertClone?ue.insertBefore(pe,x):Ut?ue.insertBefore(pe,Ut):ue.appendChild(pe),this.options.group.revertClone&&this.animate(x,pe),F(pe,"display",""),kt=!1}}};function Tf(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function qi(e,t,n,i,o,r,s,l){var a,c=e[je],u=c.options.onMove,d;return window.CustomEvent&&!Ot&&!Bn?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=e,a.dragged=n,a.draggedRect=i,a.related=o||t,a.relatedRect=r||_e(t),a.willInsertAfter=l,a.originalEvent=s,e.dispatchEvent(a),u&&(d=u.call(c,a,s)),d}function ur(e){e.draggable=!1}function Cf(){cr=!1}function Pf(e,t,n){var i=_e(cn(n.el,0,n.options,!0)),o=jl(n.el,n.options,W),r=10;return t?e.clientX<o.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<o.top-r||e.clientY<i.bottom&&e.clientX<i.left}function Af(e,t,n){var i=_e(ir(n.el,n.options.draggable)),o=jl(n.el,n.options,W),r=10;return t?e.clientX>o.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>o.bottom+r||e.clientX>i.right&&e.clientY>i.top}function Df(e,t,n,i,o,r,s,l){var a=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,p=!1;if(!s){if(l&&Ki<c*o){if(!Kn&&(Un===1?a>u+c*r/2:a<d-c*r/2)&&(Kn=!0),Kn)p=!0;else if(Un===1?a<u+Ki:a>d-Ki)return-Un}else if(a>u+c*(1-o)/2&&a<d-c*(1-o)/2)return Of(t)}return p=p||s,p&&(a<u+c*r/2||a>d-c*r/2)?a>u+c/2?1:-1:0}function Of(e){return et(x)<et(e)?1:-1}function If(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Mf(e){Yi.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Yi.push(i)}}function Ji(e){return setTimeout(e,0)}function fr(e){return clearTimeout(e)}Gi&&G(document,"touchmove",function(e){(B.active||dn)&&e.cancelable&&e.preventDefault()}),B.utils={on:G,off:K,css:F,find:Nl,is:function(t,n){return!!it(t,n,t,!1)},extend:pf,throttle:Fl,closest:it,toggleClass:Ge,clone:Vl,index:et,nextTick:Ji,cancelNextTick:fr,detectDirection:Kl,getChild:cn,expando:je},B.get=function(e){return e[je]},B.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(B.utils=ht(ht({},B.utils),i.utils)),Hn.mount(i)})},B.create=function(e,t){return new B(e,t)},B.version=df;var we=[],Yn,dr,hr=!1,pr,gr,Zi,Gn;function Rf(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?G(document,"dragover",this._handleAutoScroll):this.options.supportPointer?G(document,"pointermove",this._handleFallbackAutoScroll):i.touches?G(document,"touchmove",this._handleFallbackAutoScroll):G(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?K(document,"dragover",this._handleAutoScroll):(K(document,"pointermove",this._handleFallbackAutoScroll),K(document,"touchmove",this._handleFallbackAutoScroll),K(document,"mousemove",this._handleFallbackAutoScroll)),ql(),Qi(),gf()},nulling:function(){Zi=dr=Yn=hr=Gn=pr=gr=null,we.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,s);if(Zi=n,i||this.options.forceAutoScrollFallback||Bn||Ot||Vn){mr(n,this.options,l,i);var a=Lt(l,!0);hr&&(!Gn||r!==pr||s!==gr)&&(Gn&&ql(),Gn=setInterval(function(){var c=Lt(document.elementFromPoint(r,s),!0);c!==a&&(a=c,Qi()),mr(n,o.options,c,i)},10),pr=r,gr=s)}else{if(!this.options.bubbleScroll||Lt(l,!0)===pt()){Qi();return}mr(n,this.options,Lt(l,!1),!1)}}},At(e,{pluginName:"scroll",initializeByDefault:!0})}function Qi(){we.forEach(function(e){clearInterval(e.pid)}),we=[]}function ql(){clearInterval(Gn)}var mr=Fl(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,a=pt(),c=!1,u;dr!==n&&(dr=n,Qi(),Yn=t.scroll,u=t.scrollFn,Yn===!0&&(Yn=Lt(n,!0)));var d=0,p=Yn;do{var g=p,v=_e(g),b=v.top,T=v.bottom,P=v.left,M=v.right,U=v.width,I=v.height,Y=void 0,ee=void 0,re=g.scrollWidth,$=g.scrollHeight,N=F(g),z=g.scrollLeft,te=g.scrollTop;g===a?(Y=U<re&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),ee=I<$&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(Y=U<re&&(N.overflowX==="auto"||N.overflowX==="scroll"),ee=I<$&&(N.overflowY==="auto"||N.overflowY==="scroll"));var We=Y&&(Math.abs(M-o)<=s&&z+U<re)-(Math.abs(P-o)<=s&&!!z),Se=ee&&(Math.abs(T-r)<=s&&te+I<$)-(Math.abs(b-r)<=s&&!!te);if(!we[d])for(var qe=0;qe<=d;qe++)we[qe]||(we[qe]={});(we[d].vx!=We||we[d].vy!=Se||we[d].el!==g)&&(we[d].el=g,we[d].vx=We,we[d].vy=Se,clearInterval(we[d].pid),(We!=0||Se!=0)&&(c=!0,we[d].pid=setInterval(function(){i&&this.layer===0&&B.active._onTouchMove(Zi);var Bt=we[this.layer].vy?we[this.layer].vy*l:0,fe=we[this.layer].vx?we[this.layer].vx*l:0;typeof u=="function"&&u.call(B.dragged.parentNode[je],fe,Bt,e,Zi,we[this.layer].el)!=="continue"||Bl(we[this.layer].el,fe,Bt)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==a&&(p=Lt(p,!1)));hr=c}},30),Jl=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(n){var c=i||r;l();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);a(),c&&!c.el.contains(d)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function vr(){}vr.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=cn(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:Jl},At(vr,{pluginName:"revertOnSpill"});function yr(){}yr.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:Jl},At(yr,{pluginName:"removeOnSpill"}),B.mount(new Rf),B.mount(yr,vr);function $f(e,t,n={}){let i;const{document:o=zu,...r}=n,s={onUpdate:u=>{kf(t,u.oldIndex,u.newIndex,u)}},l=()=>{const u=typeof e=="string"?o?.querySelector(e):_l(e);!u||i!==void 0||(i=new B(u,{...s,...r}))},a=()=>{i?.destroy(),i=void 0},c=(u,d)=>{if(d!==void 0)i?.option(u,d);else return i?.option(u)};return Hu(l),Li(a),{stop:a,start:l,option:c}}function Nf(e,t,n){const i=e.children[n];e.insertBefore(t,i)}function Lf(e){e.parentNode&&e.parentNode.removeChild(e)}function kf(e,t,n,i=null){i!=null&&(Lf(i.item),Nf(i.from,i.item,t));const o=ye(e),r=o?[...xe(e)]:xe(e);if(n>=0&&n<r.length){const s=r.splice(t,1)[0];wn(()=>{r.splice(n,0,s),o&&(e.value=r)})}}const Ff=["data-align"],Bf=Pe({__name:"PvPopover",props:{alignment:{default:void 0,type:null},cssCustomProperties:{default:()=>({}),type:Object},cssCustomListProperties:{type:Object},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{expose:t,emit:n}){const i=Qe(null),o=Tn("popoverList"),r=e,s=n;return r.isSortable&&r.isList&&$f(o,[],{animation:150,onUpdate:()=>{const l=Array.from(o.value?.children||[]).map(a=>a.id);s("list-order-updated",l)}}),t({popoverRoot:i}),(l,a)=>(O(),j("div",{ref_key:"popoverRoot",ref:i,class:"pv-popover","data-testid":"pv-popover","data-align":e.alignment,style:_t(e.cssCustomProperties)},[e.isList?(O(),j("ul",{key:0,ref:"popoverList",role:"list",class:"pv-popover-list",style:_t(e.cssCustomListProperties)},[Tt(l.$slots,"default",{},void 0,!0)],4)):Tt(l.$slots,"default",{key:1},void 0,!0)],12,Ff))}}),Vf=".pv-popover-list[data-v-cda1af8c]{font-size:14px}",eo=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},jf=eo(Bf,[["styles",[Vf]],["__scopeId","data-v-cda1af8c"]]),Hf=Pe({__name:"PvMenu",props:{teleportLocation:{type:String},open:{type:Boolean},popoverPositionStyle:{type:Object},cssCustomListProperties:{type:Object},useTeleport:{type:Boolean,default:!1}},setup(e,{expose:t}){const n=Qe(null);return t({popoverRef:n}),(i,o)=>(O(),de(ic,{to:e.teleportLocation,disabled:!e.useTeleport},[be(jf,{ref_key:"popoverRef",ref:n,class:Ee({"pv-hide":!e.open}),"css-custom-list-properties":e.cssCustomListProperties,"css-custom-properties":{width:"auto",maxWidth:"260px",...e.popoverPositionStyle},isList:!0},{default:xn(()=>[Tt(i.$slots,"default")]),_:3},8,["class","css-custom-list-properties","css-custom-properties"])],8,["to","disabled"]))}}),to=eo(Pe({__name:"PvCounterBadge",props:{value:{type:Number},prefix:{default:"",type:String},variant:{default:"primary",type:null},size:{default:"sm",type:String},maxValue:{default:99,type:Number}},setup(e){const t=e,n=he(()=>t.size=="md"?"md":(t.size=="sm","sm")),i=he(()=>t.maxValue&&t.value&&t.value>t.maxValue?`${t.maxValue}+`:t.value!=null?`${t.prefix}${t.value}`:"-"),o=he(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-md":n.value=="md","pv-badge-sm pv-text-body-sm":n.value=="sm","pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface pv-bordered":t.variant=="secondary","pv-surface-lighten-5":t.variant=="tertiary","pv-text-secondary":t.variant=="ghost"||t.variant=="tertiary","pv-surface":t.variant=="ghost"}));return(r,s)=>(O(),j("div",{class:Ee(o.value),"data-testid":"pv-counter-badge"},Ve(i.value),3))}}),[["styles",[".pv-badge-md[data-v-fc3c1104]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-badge-sm[data-v-fc3c1104]{--inset-size: 0 2px;min-height:16px;max-height:16px;min-width:16px;font-weight:500}.pv-surface-lighten-5[data-v-fc3c1104]{background-color:#e0e5e4}.pv-text-secondary[data-v-fc3c1104]{color:#4b595c}"]],["__scopeId","data-v-fc3c1104"]]);function Wf(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}const zf=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Uf(e){return Array.from(e.match(zf)??[])}function Kf(e){const t=Uf(e);if(t.length===0)return"";const[n,...i]=t;return`${n.toLowerCase()}${i.map(o=>Wf(o)).join("")}`}const Yf={class:"pv-flex","data-testid":"pv-company-logo"},Gf=["src"],Zl=Pe({__name:"PvCompanyLogo",props:{basePath:{default:"https://static-assets.turquoise.health/shared-logos/prd/payers",type:String},name:{type:String},size:{default:"md",type:null},srcPathOverride:{type:String},toCamelCase:{type:Boolean,default:!0}},setup(e){const t=e,n=Qe(!0),i=he(()=>Ju[t.size]||"32px"),o=he(()=>({"pv-icon":n.value,[`pv-company-${t.size}`]:t.size&&!n.value})),r=he(()=>({width:i.value})),s=he(()=>t.toCamelCase?Kf(t.name)+".svg":t.name+".svg"),l=he(()=>t.srcPathOverride?t.srcPathOverride:`${t.basePath}/${s.value}`);return $t(l,()=>{n.value=!0}),(a,c)=>(O(),j("div",Yf,[n.value?(O(),j("div",{key:0,class:Ee(o.value),style:_t(r.value)},[ke("img",{src:l.value,alt:"",onError:c[0]||(c[0]=u=>n.value=!1)},null,40,Gf)],6)):(O(),j("div",{key:1,class:Ee(o.value)},null,2))]))}}),Xf=["data-position","aria-labelledby","data-style","data-static"],qf=["id"],Jf={key:1},Zf=Pe({__name:"PvTooltip",props:{variant:{default:"white",type:String},tooltipPosition:{default:"top-right",type:String},ariaLabelledBy:{default:"ariaLabelledById",type:String},size:{default:"md",type:String},interactive:{type:Boolean,default:!0},delay:{default:0,type:Number}},setup(e){return(t,n)=>t.$slots["tooltip-content"]?(O(),j("div",{key:0,"data-testid":"pv-tooltip",class:Ee(["pv-tooltip",{"pv-tooltip-small":e.size==="sm"}]),"data-position":e.tooltipPosition,"aria-labelledby":e.ariaLabelledBy,"data-style":e.variant==="white"?"white":"dark","data-static":e.interactive===!1?!0:void 0},[Tt(t.$slots,"label"),ke("div",{role:"tooltip",id:e.ariaLabelledBy,"data-testid":"pv-tooltip-content"},[Tt(t.$slots,"tooltip-content")],8,qf)],10,Xf)):(O(),j("div",Jf,[Tt(t.$slots,"label")]))}}),Qf=["disabled"],ed={class:"pv-flex"},td={key:0,"data-testid":"pv-select-prefix-label",class:"pv-border-right",style:{color:"#89989b","padding-right":"4px"}},nd={key:4},id=Pe({__name:"PvSelectButtonTrigger",props:{variant:{default:"secondary",type:String},size:{default:"lg",type:String},disabled:{type:Boolean},counterPosition:{type:String},counterValue:{type:Number},counterBadgeVariant:{type:null},prefixLabel:{type:String},label:{type:String},icon:{type:String},companyLogo:{type:String},showClear:{type:Boolean},showDropdown:{type:Boolean,default:!0},open:{type:Boolean},isLoading:{type:Boolean}},emits:["handle-toggle-dropdown","handle-clear"],setup(e,{expose:t}){const n={xl:"large",lg:void 0},i=Qe(null);return t({triggerRef:i}),(o,r)=>(O(),j("button",{ref_key:"triggerRef",ref:i,"data-testid":"pv-multi-select-button-trigger",class:Ee(["pv-flex","pv-space-between",{[`pv-button-${e.variant}`]:!0,[`pv-button-${n[e.size]}`]:!!e.size}]),style:{"--flex-gap":"0.25rem"},disabled:e.disabled||e.isLoading,onClick:r[1]||(r[1]=s=>o.$emit("handle-toggle-dropdown"))},[ke("div",ed,[e.prefixLabel?(O(),j("p",td,Ve(e.prefixLabel),1)):oe("v-if",!0),e.counterPosition==="left"&&e.counterValue?(O(),de(to,{key:1,"data-testid":"pv-multi-select-left-counter-badge",value:e.counterValue,variant:e.counterBadgeVariant,size:"sm"},null,8,["value","variant"])):oe("v-if",!0),e.icon?(O(),de(ln,{key:2,"data-testid":"pv-multi-select-button-icon",name:e.icon},null,8,["name"])):oe("v-if",!0),e.companyLogo?(O(),de(Zl,{key:3,name:e.companyLogo,size:"sm"},null,8,["name"])):oe("v-if",!0),e.isLoading||e.label?(O(),j("span",nd,Ve(e.isLoading?"Loading...":e.label),1)):oe("v-if",!0),e.counterPosition==="right"&&e.counterValue?(O(),de(to,{key:5,"data-testid":"pv-multi-select-right-counter-badge",value:e.counterValue,variant:e.counterBadgeVariant,size:"sm"},null,8,["value","variant"])):oe("v-if",!0)]),e.showDropdown?(O(),de(ln,{key:0,name:e.open?"chevron-up":"chevron-down"},null,8,["name"])):oe("v-if",!0),e.showClear?(O(),de(Zf,{key:1,size:"sm",variant:"dark","tooltip-position":"top-left"},{label:xn(()=>[be(ln,{name:"close",onClick:r[0]||(r[0]=Ru(s=>o.$emit("handle-clear"),["stop"]))})]),"tooltip-content":xn(()=>[...r[2]||(r[2]=[zo(" Clear Selections ",-1)])]),_:1})):oe("v-if",!0)],10,Qf))}}),od={},rd={class:"pv-text-subdued pv-text-center pv-text-body-md"};function sd(e,t){return O(),j("div",rd,"No Results Found")}const ld=eo(od,[["render",sd]]),ad=["src"],cd=Pe({__name:"PvAvatar",props:{size:{default:"lg",type:String},image:{type:String},initials:{type:String}},setup(e){const t={sm:"pv-avatar-16",md:"pv-avatar-20",lg:"pv-avatar-xs",xl:"pv-avatar-sm","2x":"pv-avatar-md"};return(n,i)=>(O(),j("div",{class:Ee(t[e.size]),"data-testid":"pv-avatar"},[e.initials?(O(),j(ge,{key:0},[zo(Ve(e.initials),1)],64)):e.image?(O(),j("img",{key:1,src:e.image},null,8,ad)):oe("v-if",!0)],2))}}),ud={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},fd=["title"],dd=["title"],hd={key:4,class:"pv-text-subdued pv-text-body-md"},no=eo(Pe({__name:"PvMenuItem",props:{id:{type:String},text:{type:String},subText:{type:String},secondaryText:{type:[Number,String]},counterBadgeVariant:{type:null},icon:{type:String},companyName:{type:String},avatar:{type:Object},disabled:{type:Boolean},renderer:{type:null},rendererProps:{type:null},classList:{type:Array},searchText:{type:String}},emits:["handle-selected"],setup(e){const t=e,n=he(()=>{const i=t.classList?[...t.classList]:[];return t.disabled?i.push("pv-menu-item-disabled"):i.push("pv-menu-item"),i});return(i,o)=>(O(),j("a",{class:Ee(["pv-flex",n.value]),"data-testid":"pv-menu-item",style:_t(e.disabled?"color: #7D898D;":""),role:"button",onClick:o[0]||(o[0]=r=>e.disabled?null:i.$emit("handle-selected"))},[e.renderer?(O(),de(Ao(e.renderer),si(Rn({key:0},i.$props)),null,16)):(O(),j(ge,{key:1},[e.avatar?(O(),de(cd,{key:0,initials:e.avatar.initials,image:e.avatar.image,size:"lg"},null,8,["initials","image"])):oe("v-if",!0),e.icon?(O(),de(ln,{key:1,class:"pv-text-subdued",name:e.icon},null,8,["name"])):oe("v-if",!0),e.companyName?(O(),de(Zl,{key:2,name:e.companyName,size:"sm"},null,8,["name"])):oe("v-if",!0),ke("div",ud,[ke("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:e.text},Ve(e.text),9,fd),e.subText?(O(),j("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:e.subText},Ve(e.subText),9,dd)):oe("v-if",!0)]),e.secondaryText&&typeof e.secondaryText=="number"?(O(),de(to,{key:3,value:e.secondaryText,variant:e.counterBadgeVariant},null,8,["value","variant"])):e.secondaryText&&typeof e.secondaryText=="string"?(O(),j("span",hd,Ve(e.secondaryText),1)):oe("v-if",!0)],64))],6))}}),[["styles",[".pv-menu-item-disabled[data-v-c2ce0e65]{pointer-events:none;background:#ececec}.pv-menu-item[data-v-c2ce0e65]{cursor:pointer}"]],["__scopeId","data-v-c2ce0e65"]]),pd=["checked","disabled"],gd={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},md=["title"],vd=["title"],yd={key:1,class:"pv-text-subdued pv-text-body-md"},bd=Pe({__name:"PvMenuCheckboxItem",props:{id:{type:String},text:{type:String},subText:{type:String},secondaryText:{type:[Number,String]},counterBadgeVariant:{type:null},value:{type:Boolean},disabled:{type:Boolean},renderer:{type:null},rendererProps:{type:null},classList:{type:Array}},emits:["handle-selected"],setup(e){return(t,n)=>(O(),j("label",{class:Ee(["pv-label pv-label-hover pv-flex",e.classList]),"data-testid":"pv-menu-checkbox-item",style:{cursor:"pointer"}},[ke("input",{type:"checkbox",name:"checkbox",checked:e.value,class:"pv-checkbox",onChange:n[0]||(n[0]=i=>t.$emit("handle-selected")),disabled:e.disabled},null,40,pd),e.renderer?(O(),de(Ao(e.renderer),si(Rn({key:0},t.$props)),null,16)):(O(),j(ge,{key:1},[ke("div",gd,[ke("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:e.text},Ve(e.text),9,md),e.subText?(O(),j("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:e.subText},Ve(e.subText),9,vd)):oe("v-if",!0)]),e.secondaryText&&typeof e.secondaryText=="number"?(O(),de(to,{key:0,value:e.secondaryText,variant:e.counterBadgeVariant},null,8,["value","variant"])):e.secondaryText&&typeof e.secondaryText=="string"?(O(),j("span",yd,Ve(e.secondaryText),1)):oe("v-if",!0)],64))],2))}}),Ql=Pe({__name:"PvMultiSelectMenuItem",props:{optionsVariant:{default:"checkbox",type:null},selected:{type:Boolean},option:{type:Object}},emits:["handle-select-item"],setup(e){const t={simple:no,icon:no,company:no,checkbox:bd,avatar:no};return(n,i)=>(O(),de(Ao(t[e.optionsVariant]),{id:e.option.id,value:e.selected,"secondary-text":e.option.secondaryText,icon:e.optionsVariant==="icon"?e.option.icon:void 0,avatar:e.optionsVariant==="avatar"?e.option.avatar:void 0,companyName:e.optionsVariant==="company"?e.option.companyName?e.option.companyName:e.option.text:void 0,text:e.option.text,subText:e.option.subText,disabled:e.option.disabled,renderer:e.option.renderer,rendererProps:e.option.rendererProps,classList:e.option.classList,onHandleSelected:i[0]||(i[0]=()=>n.$emit("handle-select-item",e.option))},null,40,["id","value","secondary-text","icon","avatar","companyName","text","subText","disabled","renderer","rendererProps","classList"]))}}),_d=({alignment:e,useTeleport:t=!0,popoverCssProperties:n}={})=>{const i=Qe(null),o=Qe(null),r=Qe(null),s=Qe(null),l=p=>{let g=p.parentElement;for(;g&&g!==document.body;){if(window.getComputedStyle(g).position!=="static")return g;g=g.parentElement}return null},a=he(()=>{if(!i.value||!o.value||!s.value?.popoverRoot)return 0;let p=i.value.left+window.scrollX;(e==="right"||e==="top right")&&(p=i.value.left+i.value.width+window.scrollX);const g=l(s.value.popoverRoot);if(g){const v=g.getBoundingClientRect();p-=v.left+window.scrollX-g.scrollLeft}return p}),c=he(()=>{if(!i.value||!o.value||!s.value?.popoverRoot)return 0;let p=i.value.top+window.scrollY;e==="top"||e==="top right"||(p+=i.value.height);const g=l(s.value.popoverRoot);if(g){const v=g.getBoundingClientRect();p-=v.top+window.scrollY-g.scrollTop}return p}),u=he(()=>{if(!t)return n;const p={position:"absolute",left:`${a.value}px`,top:`${c.value}px`,zIndex:10};return{...n,...p}});return{triggerRef:r,popoverRef:s,triggerRect:i,popoverRect:o,popoverPositionStyle:u,updateRects:()=>{r.value&&(i.value=r.value.getBoundingClientRect()),s.value?.popoverRoot&&(o.value=s.value.popoverRoot.getBoundingClientRect())}}},wd={class:"pv-relative",style:{width:"fit-content"}},Sd={key:1,class:"pv-text-body-sm",style:{color:"#89989b"}},xd={role:"list"},Ed=["data-active"],Td={key:2,class:"pv-border-top",style:{margin:"8px 0"}},Cd={key:1,role:"list"},Pd=["data-active"],Ad={key:2,class:"pv-flex pv-inset-block-8",style:{"justify-content":"center"}},Dd={class:"pv-sticky pv-surface pv-border-top",style:{"--flex-justify":"space-between","--bottom":"0","padding-top":"0.75rem","padding-bottom":"0.5rem"}},Od=Pe({__name:"PvMultiSelectButton",props:Mo({groupings:{type:Array},defaultOpen:{type:Boolean},disabled:{type:Boolean},teleportLocation:{default:"body",type:String},isLoading:{type:Boolean},variant:{default:"secondary",type:String},size:{default:"lg",type:String},alignment:{type:null},popoverCssProperties:{type:Object},prefixLabel:{type:String},label:{default:"Select",type:String},icon:{type:String},counterPosition:{default:"left",type:String},companyLogo:{type:String},showClear:{type:Boolean,default:!0},showDropdown:{type:Boolean,default:!0},showMenuAction:{type:Boolean,default:!0},showSearchInput:{type:Boolean,default:!0},searchPlaceholder:{type:String},overlayTrigger:{type:Boolean},optionsVariant:{default:"checkbox",type:null},options:{type:Array},useTeleport:{type:Boolean,default:!1}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{},searchInput:{required:!1,default:""},searchInputModifiers:{}}),emits:Mo(["dropdown-open","dropdown-closed"],["update:modelValue","update:searchInput"]),setup(e,{emit:t}){const n=e,i=t,o={top:n.overlayTrigger?"0":"unset",...n.popoverCssProperties},{popoverPositionStyle:r,updateRects:s,triggerRef:l,popoverRef:a}=_d({alignment:n.alignment,popoverCssProperties:o,useTeleport:n.useTeleport}),c=Tn("select-menu-ref"),u=Tn("select-button-trigger-ref"),d=Tn("searchInputRef"),[p,g]=Wu(n.defaultOpen),v=jo(e,"modelValue"),b=jo(e,"searchInput"),T=()=>{b.value="",p.value=!1};$t(p,$=>{$?wn(()=>{n.overlayTrigger&&n.showSearchInput&&d.value?.input?.focus(),s(),i("dropdown-open")}):i("dropdown-closed")}),Pn(()=>{c.value?.popoverRef&&(a.value=c.value?.popoverRef),u.value?.triggerRef&&(l.value=u.value?.triggerRef)});const P=he(()=>b.value===""?n.options:n.options?.filter($=>$.text.toLocaleLowerCase().includes(b.value.toLocaleLowerCase()))),M=$=>{const N=v.value,z=N.findIndex(We=>We.id===$.id);let te;z>-1?te=[...N.slice(0,z),...N.slice(z+1)]:te=[...N,{...$}],v.value=te},U=()=>{v.value=P.value?.map($=>({id:$.id,text:$.text}))??[]},I=()=>{v.value=[]},Y=he(()=>{if(!n.groupings)return;const $=new Map;n.groupings.forEach(N=>{$.set(N,[])}),$.set("other",[]);for(const N of n.options??[]){const z=N.groupingLabel,te=z&&$.has(z)?z:"other";$.get(te).push(N)}for(const[N,z]of $)z.length===0&&$.delete(N);return Array.from($.entries())}),ee=he(()=>n.groupings&&b.value===""),re=$=>v.value.some(N=>N.id===$.id)?!0:null;return wl("Escape",()=>{p.value&&T()}),($,N)=>To((O(),j("div",wd,[be(id,{ref:"select-button-trigger-ref",variant:e.variant,size:e.size,disabled:e.disabled,counterPosition:e.counterPosition,prefixLabel:e.prefixLabel,label:e.label,icon:e.icon,companyLogo:e.companyLogo,showClear:e.showClear&&v.value.length>0,showDropdown:e.showDropdown&&v.value.length===0,open:at(p),"counter-value":v.value.length,onHandleClear:I,onHandleToggleDropdown:N[0]||(N[0]=z=>at(g)())},null,8,["variant","size","disabled","counterPosition","prefixLabel","label","icon","companyLogo","showClear","showDropdown","open","counter-value"]),be(Hf,{ref:"select-menu-ref",open:at(p),teleportLocation:e.teleportLocation,"use-teleport":e.useTeleport,"css-custom-list-properties":e.showMenuAction?{"padding-bottom":0}:{},popoverPositionStyle:at(r)},{default:xn(()=>[e.showSearchInput?(O(),j(ge,{key:0},[be(af,{ref:"searchInputRef","model-value":b.value,"onUpdate:modelValue":N[1]||(N[1]=z=>b.value=z),class:"pv-sticky pv-surface pv-stack-12",style:{"padding-top":"4px"},placeholder:e.searchPlaceholder},null,8,["model-value","placeholder"]),N[2]||(N[2]=ke("div",{class:"pv-border-top pv-stack-12"},null,-1))],64)):oe("v-if",!0),(P.value?.length??0)>0?(O(),j(ge,{key:1},[ee.value?(O(!0),j(ge,{key:0},Do(Y.value,([z,te],We)=>(O(),j("div",{key:z},[$.$slots[z]?Tt($.$slots,z,{key:0}):z!=="other"?(O(),j("span",Sd,Ve(z),1)):oe("v-if",!0),ke("ul",xd,[(O(!0),j(ge,null,Do(te,Se=>To((O(),j("li",{key:Se.id,"data-active":re(Se),class:"pv-stack-4"},[be(Ql,{"data-testid":`pv-multiselect-${z}-item`,"options-variant":e.optionsVariant,selected:v.value.some(qe=>qe.id===Se.id),option:Se,onHandleSelectItem:M},null,8,["data-testid","options-variant","selected","option"])],8,Ed)),[[hu,re(Se)||!e.isLoading]])),128))]),Y.value&&We!==Y.value.length-1?(O(),j("div",Td)):oe("v-if",!0)]))),128)):(O(),j("ul",Cd,[(O(!0),j(ge,null,Do(P.value,z=>(O(),j("li",{key:z.id,"data-active":v.value.some(te=>te.id===z.id)?!0:null,class:"pv-stack-4"},[be(Ql,{"options-variant":e.optionsVariant,selected:v.value.some(te=>te.id===z.id),option:z,onHandleSelectItem:M},null,8,["options-variant","selected","option"])],8,Pd))),128))]))],64)):oe("v-if",!0),e.isLoading?(O(),j("div",Ad,[be(Cl,{variant:"dark"})])):(P.value?.length??0)===0?(O(),j(ge,{key:3},[$.$slots["no-results"]?Tt($.$slots,"no-results",si(Rn({key:0},$.$props))):(O(),de(ld,{key:1}))],64)):oe("v-if",!0),ke("div",Dd,[$.$slots.footer?Tt($.$slots,"footer",si(Rn({key:0},$.$props))):oe("v-if",!0),e.showMenuAction?(O(),de(of,{key:1,disabled:e.isLoading,onHandleClearAll:I,onHandleSelectAll:U},null,8,["disabled"])):oe("v-if",!0)])]),_:3},8,["open","teleportLocation","use-teleport","css-custom-list-properties","popoverPositionStyle"])])),[[at(Yu),[T,{ignore:[".pv-popover"]}]]])}}),Id=new Set(["PvIcon"]);function Md(e){return!Id.has(e)}function br(e,t){const n=document.querySelector('link[href*="'+t+'"]');if(!e.shadowRoot)return!1;if(n&&e.shadowRoot){const i=n.href;if(e.shadowRoot.querySelector(`link[href="${i}"]`))return;const o=document.createElement("link");return o.rel="stylesheet",o.href=i,e.shadowRoot.prepend(o),!0}return!1}function Rd(e){if(!br(e,"pit-viper-v2")){if(br(e,"pit-viper")){br(e,"pit-viper-v2-scoped");return}console.warn("No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project.")}}const $d=e=>({shadowRoot:Md(e)});function Nd(e){const t=e.__name||e.name;if(!t)throw new Error("Component must have a __name or name property");const n=Pu(e,$d(t));class i extends n{connectedCallback(){super.connectedCallback?.(),Rd(this)}}return i}function Ld(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}function kd(e){const t=e.__name||e.name;if(!t)throw new Error("Component must have a __name or name property");const n=Ld(t),i=Nd(e);customElements.get(n)||customElements.define(n,i)}kd(Od)})();