import{d as De,h as Ae,r as Ue,_ as Se,o as V,c as H,a as u,u as cn,b as fn,e as pt,f as C,g as Pe,F as ee,i as ne,w as L,j as P,t as it,k as hn,l as Ne,m as jt,v as Bt}from"./index-B9UwUtN4.js";import{_ as pn}from"./carousel1-Bss7QVmV.js";import{S as mn}from"./sweetalert2.all-CHWuQ1TO.js";import{I as gn,a as Me}from"./icon-trash-lines-CGSXD_f0.js";import{I as vn}from"./icon-calendar-DJbMyRZR.js";import{N as oe,o as bt,V as ie,_ as re,I as ae,f as se}from"./icon-x-BRhHfXux.js";import"./micro-task-bStVletN.js";/*! * vue-draggable-next v2.1.0 * (c) 2021 Anish George * @license MIT *//**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function ot(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function yn(e,t){if(e==null)return{};var n=_n(e,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var wn="1.14.0";function rt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var st=rt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$t=rt(/Edge/i),Le=rt(/firefox/i),Ot=rt(/safari/i)&&!rt(/chrome/i)&&!rt(/android/i),qe=rt(/iP(ad|od|hone)/i),xn=rt(/chrome/i)&&rt(/android/i),Je={capture:!1,passive:!1};function T(e,t,n){e.addEventListener(t,n,!st&&Je)}function E(e,t,n){e.removeEventListener(t,n,!st&&Je)}function qt(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 Cn(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function et(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&qt(e,t):qt(e,t))||o&&e===n)return e;if(e===n)break}while(e=Cn(e))}return null}var Fe=/\s+/g;function z(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(Fe," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(Fe," ")}}function m(e,t,n){var o=e&&e.style;if(o){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 o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function Ct(e,t){var n="";if(typeof e=="string")n=e;else do{var o=m(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Ze(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i=r,!a)return o;if(o===nt())break;o=ct(o,!1)}return!1}function Et(e,t,n,o){for(var i=0,r=0,a=e.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=yn(o,An);Lt.pluginEvent.bind(g)(t,n,ot({dragEl:c,parentEl:I,ghostEl:b,rootEl:k,nextEl:vt,lastDownEl:Wt,cloneEl:O,cloneHidden:ut,dragStarted:Tt,putSortable:j,activeSortable:g.active,originalEvent:i,oldIndex:xt,oldDraggableIndex:Pt,newIndex:G,newDraggableIndex:dt,hideGhostForTarget:rn,unhideGhostForTarget:an,cloneNowHidden:function(){ut=!0},cloneNowShown:function(){ut=!1},dispatchSortableEvent:function(s){Y({sortable:n,name:s,originalEvent:i})}},r))};function Y(e){On(ot({putSortable:j,cloneEl:O,targetEl:c,rootEl:k,oldIndex:xt,oldDraggableIndex:Pt,newIndex:G,newDraggableIndex:dt},e))}var c,I,b,k,vt,Wt,O,ut,xt,G,Pt,dt,Xt,j,wt=!1,Jt=!1,Zt=[],mt,K,ue,ce,Xe,Ye,Tt,yt,Nt,Mt=!1,Yt=!1,zt,X,fe=[],_e=!1,Kt=[],te=typeof document<"u",Rt=qe,Re=$t||st?"cssFloat":"float",Pn=te&&!xn&&!qe&&"draggable"in document.createElement("div"),en=function(){if(te){if(st)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),nn=function(t,n){var o=m(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=Et(t,0,n),a=Et(t,1,n),s=r&&m(r),l=a&&m(a),d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+$(r).width,p=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+$(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return r&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||d>=i&&o[Re]==="none"||a&&o[Re]==="none"&&d+p>i)?"vertical":"horizontal"},Nn=function(t,n,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,s=o?n.left:n.top,l=o?n.right:n.bottom,d=o?n.width:n.height;return i===s||r===l||i+a/2===s+d/2},Mn=function(t,n){var o;return Zt.some(function(i){var r=i[U].options.emptyInsertThreshold;if(!(!r||Te(i))){var a=$(i),s=t>=a.left-r&&t<=a.right+r,l=n>=a.top-r&&n<=a.bottom+r;if(s&&l)return o=i}}),o},on=function(t){function n(r,a){return function(s,l,d,p){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(r==null&&(a||f))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(s,l,d,p),a)(s,l,d,p);var y=(a?s:l).options.group.name;return r===!0||typeof r=="string"&&r===y||r.join&&r.indexOf(y)>-1}}var o={},i=t.group;(!i||Ht(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,t.group=o},rn=function(){!en&&b&&m(b,"display","none")},an=function(){!en&&b&&m(b,"display","")};te&&document.addEventListener("click",function(e){if(Jt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Jt=!1,!1},!0);var gt=function(t){if(c){t=t.touches?t.touches[0]:t;var n=Mn(t.clientX,t.clientY);if(n){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[U]._onDragOver(o)}}},$n=function(t){c&&c.parentNode[U]._isOutsideThisEl(t.target)};function g(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[U]=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 nn(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(a,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:g.supportPointer!==!1&&"PointerEvent"in window&&!Ot,emptyInsertThreshold:5};Lt.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);on(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:Pn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?T(e,"pointerdown",this._onTapStart):(T(e,"mousedown",this._onTapStart),T(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(e,"dragover",this),T(e,"dragenter",this)),Zt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),at(this,Tn())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(yt=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,c):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,p=i.filter;if(Vn(o),!c&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ot&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=et(l,i.draggable,o,!1),!(l&&l.animated)&&Wt!==l)){if(xt=J(l),Pt=J(l,i.draggable),typeof p=="function"){if(p.call(this,t,l,this)){Y({sortable:n,rootEl:d,name:"filter",targetEl:l,toEl:o,fromEl:o}),R("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(p&&(p=p.split(",").some(function(f){if(f=et(d,f.trim(),o,!1),f)return Y({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:o,toEl:o}),R("filter",n,{evt:t}),!0}),p)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!et(d,i.handle,o,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,o){var i=this,r=i.el,a=i.options,s=r.ownerDocument,l;if(o&&!c&&o.parentNode===r){var d=$(o);if(k=r,c=o,I=c.parentNode,vt=c.nextSibling,Wt=o,Xt=a.group,g.dragged=c,mt={target:c,clientX:(n||t).clientX,clientY:(n||t).clientY},Xe=mt.clientX-d.left,Ye=mt.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,c.style["will-change"]="all",l=function(){if(R("delayEnded",i,{evt:t}),g.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Le&&i.nativeDraggable&&(c.draggable=!0),i._triggerDragStart(t,n),Y({sortable:i,name:"choose",originalEvent:t}),z(c,a.chosenClass,!0)},a.ignore.split(",").forEach(function(p){Ze(c,p.trim(),he)}),T(s,"dragover",gt),T(s,"mousemove",gt),T(s,"touchmove",gt),T(s,"mouseup",i._onDrop),T(s,"touchend",i._onDrop),T(s,"touchcancel",i._onDrop),Le&&this.nativeDraggable&&(this.options.touchStartThreshold=4,c.draggable=!0),R("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!($t||st))){if(g.eventCanceled){this._onDrop();return}T(s,"mouseup",i._disableDelayedDrag),T(s,"touchend",i._disableDelayedDrag),T(s,"touchcancel",i._disableDelayedDrag),T(s,"mousemove",i._delayedDragTouchMoveHandler),T(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&T(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,a.delay)}else l()}},_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(){c&&he(c),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):n?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(c,"dragend",this),T(k,"dragstart",this._onDragStart));try{document.selection?Gt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(wt=!1,k&&c){R("dragStarted",this,{evt:n}),this.nativeDraggable&&T(document,"dragover",$n);var o=this.options;!t&&z(c,o.dragClass,!1),z(c,o.ghostClass,!0),g.active=this,t&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(K){this._lastX=K.clientX,this._lastY=K.clientY,rn();for(var t=document.elementFromPoint(K.clientX,K.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(K.clientX,K.clientY),t!==n);)n=t;if(c.parentNode[U]._isOutsideThisEl(t),n)do{if(n[U]){var o=void 0;if(o=n[U]._onDragOver({clientX:K.clientX,clientY:K.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);an()}},_onTouchMove:function(t){if(mt){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=b&&Ct(b,!0),s=b&&a&&a.a,l=b&&a&&a.d,d=Rt&&X&&Be(X),p=(r.clientX-mt.clientX+i.x)/(s||1)+(d?d[0]-fe[0]:0)/(s||1),f=(r.clientY-mt.clientY+i.y)/(l||1)+(d?d[1]-fe[1]:0)/(l||1);if(!g.active&&!wt){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(Y({rootEl:I,name:"add",toEl:I,fromEl:k,originalEvent:t}),Y({sortable:this,name:"remove",toEl:I,originalEvent:t}),Y({rootEl:I,name:"sort",toEl:I,fromEl:k,originalEvent:t}),Y({sortable:this,name:"sort",toEl:I,originalEvent:t})),j&&j.save()):G!==xt&&G>=0&&(Y({sortable:this,name:"update",toEl:I,originalEvent:t}),Y({sortable:this,name:"sort",toEl:I,originalEvent:t})),g.active&&((G==null||G===-1)&&(G=xt,dt=Pt),Y({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){R("nulling",this),k=c=I=b=vt=O=Wt=ut=mt=K=Tt=G=dt=xt=Pt=yt=Nt=j=Xt=g.dragged=g.ghost=g.clone=g.active=null,Kt.forEach(function(t){t.checked=!0}),Kt.length=ue=ce=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":c&&(this._onDragOver(t),Ln(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,i=0,r=o.length,a=this.options;io.right+i||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+i}function Xn(e,t,n,o,i,r,a,s){var l=o?e.clientY:e.clientX,d=o?n.height:n.width,p=o?n.top:n.left,f=o?n.bottom:n.right,y=!1;if(!a){if(s&&ztp+d*r/2:lf-zt)return-Nt}else if(l>p+d*(1-i)/2&&lf-d*r/2)?l>p+d/2?1:-1:0}function Yn(e){return J(c)e.replace(Un,(t,n)=>n?n.toUpperCase():""));function ve(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function We(e,t,n){const o=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}function qn(e,t){return Object.values(e).indexOf(t)}function Jn(e,t,n,o){if(!e)return[];const i=Object.values(e),r=t.length-o;return[...t].map((s,l)=>l>=r?i.length:i.indexOf(s))}function ln(e,t){this.$nextTick(()=>this.$emit(e.toLowerCase(),t))}function Zn(e){return t=>{this.realList!==null&&this["onDrag"+e](t),ln.call(this,e,t)}}function Kn(e){return["transition-group","TransitionGroup"].includes(e)}function Qn(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?Kn(t.name):!1}function to(e,t){return t?{...t.props,...t.attrs}:e}const Ce=["Start","Add","Remove","Update","End"],Ee=["Choose","Unchoose","Sort","Filter","Clone"],eo=["Move",...Ce,...Ee].map(e=>"on"+e);let be=null;const no={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},oo=De({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Ce.map(e=>e.toLowerCase()),...Ee.map(e=>e.toLowerCase())],props:no,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,t=to(this.$attrs,this.componentData);return e?(this.transitionMode=Qn(e),Ae(this.getTag(),t,e)):Ae(this.getTag(),t,[])},created(){this.list!==null&&this.modelValue!==null&&zn.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Ce.forEach(i=>{e["on"+i]=Zn.call(this,i)}),Ee.forEach(i=>{e["on"+i]=ln.bind(this,i)});const t=Object.keys(this.$attrs).reduce((i,r)=>(i[He(r)]=this.$attrs[r],i),{}),n=Object.assign({},t,e,{onMove:(i,r)=>this.onDragMove(i,r)});!("draggable"in n)&&(n.draggable=">*");const o=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new g(o,n),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?Ue(this.component):this.tag},updateOptions(e){for(var t in e){const n=He(t);eo.indexOf(n)===-1&&this._sortable.option(n,e[t])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Jn(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const t=qn(this.getChildrenNodes()||[],e);if(t===-1)return null;const n=this.realList[t];return{index:t,element:n}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){const e=t=>t.splice(...arguments);this.alterList(e)},updatePosition(e,t){const n=o=>o.splice(t,0,o.splice(e,1)[0]);this.alterList(n)},getVmIndex(e){const t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;var t=this.getChildrenNodes();t[e].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(e){this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),be=e.item)},onDragAdd(e){const t=e.item._underlying_vm_;if(t===void 0)return;ve(e.item);const n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();const o={element:t,newIndex:n};this.emitChanges({added:o})},onDragRemove(e){if(We(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){ve(e.clone);return}if(!this.context)return;const t=this.context.index;this.spliceList(t,1);const n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})},onDragUpdate(e){ve(e.item),We(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);const o={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:o})},updateProperty(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},onDragMove(e,t){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(e),i=this.context,r=this.computeFutureIndex(o,e);Object.assign(i,{futureIndex:r});const a=Object.assign({},e,{relatedContext:o,draggedContext:i});return n(a,t)},onDragEnd(){this.computeIndexes(),be=null},getTrargetedComponent(e){return e.__draggable_component__},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getTrargetedComponent(e);if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(e!==t&&o&&n.getUnderlyingVm){const r=n.getUnderlyingVm(t);if(r)return Object.assign(r,i)}return i},computeFutureIndex(e,t){const n=[...t.to.children].filter(a=>a.style.display!=="none");if(n.length===0)return 0;const o=n.indexOf(t.related),i=e.component.getVmIndex(o);return n.indexOf(be)!==-1||!t.willInsertAfter?i:i+1}}}),io={},ro={width:"20",height:"20",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ao=u("line",{x1:"12",y1:"5",x2:"12",y2:"19"},null,-1),so=u("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),lo=[ao,so];function uo(e,t){return V(),H("svg",ro,lo)}const ze=Se(io,[["render",uo]]),co={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fo=u("path",{d:"M12.75 9C12.75 8.58579 12.4142 8.25 12 8.25C11.5858 8.25 11.25 8.58579 11.25 9L11.25 11.25H9C8.58579 11.25 8.25 11.5858 8.25 12C8.25 12.4142 8.58579 12.75 9 12.75H11.25V15C11.25 15.4142 11.5858 15.75 12 15.75C12.4142 15.75 12.75 15.4142 12.75 15L12.75 12.75H15C15.4142 12.75 15.75 12.4142 15.75 12C15.75 11.5858 15.4142 11.25 15 11.25H12.75V9Z",fill:"currentColor"},null,-1),ho=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12Z",fill:"currentColor"},null,-1),po=[fo,ho],mo={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},go=u("circle",{opacity:"0.5",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"1.5"},null,-1),vo=u("path",{d:"M15 12L12 12M12 12L9 12M12 12L12 9M12 12L12 15",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),bo=[go,vo],_o=De({__name:"icon-plus-circle",props:{duotone:{type:Boolean,default:!0}},setup(e){return(t,n)=>e.duotone?(V(),H("svg",mo,bo)):(V(),H("svg",co,po))}}),yo={},wo={width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xo=u("path",{d:"M4.72848 16.1369C3.18295 14.5914 2.41018 13.8186 2.12264 12.816C1.83509 11.8134 2.08083 10.7485 2.57231 8.61875L2.85574 7.39057C3.26922 5.59881 3.47597 4.70292 4.08944 4.08944C4.70292 3.47597 5.59881 3.26922 7.39057 2.85574L8.61875 2.57231C10.7485 2.08083 11.8134 1.83509 12.816 2.12264C13.8186 2.41018 14.5914 3.18295 16.1369 4.72848L17.9665 6.55812C20.6555 9.24711 22 10.5916 22 12.2623C22 13.933 20.6555 15.2775 17.9665 17.9665C15.2775 20.6555 13.933 22 12.2623 22C10.5916 22 9.24711 20.6555 6.55812 17.9665L4.72848 16.1369Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),Co=u("circle",{opacity:"0.5",cx:"8.60699",cy:"8.87891",r:"2",transform:"rotate(-45 8.60699 8.87891)",stroke:"currentColor","stroke-width":"1.5"},null,-1),Eo=u("path",{opacity:"0.5",d:"M11.5417 18.5L18.5208 11.5208",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),Do=[xo,Co,Eo];function So(e,t){return V(),H("svg",wo,Do)}const Ge=Se(yo,[["render",So]]),To={},ko={width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Io=u("path",{opacity:"0.5",d:"M22 10.5V12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),Oo=u("path",{d:"M17.3009 2.80624L16.652 3.45506L10.6872 9.41993C10.2832 9.82394 10.0812 10.0259 9.90743 10.2487C9.70249 10.5114 9.52679 10.7957 9.38344 11.0965C9.26191 11.3515 9.17157 11.6225 8.99089 12.1646L8.41242 13.9L8.03811 15.0229C7.9492 15.2897 8.01862 15.5837 8.21744 15.7826C8.41626 15.9814 8.71035 16.0508 8.97709 15.9619L10.1 15.5876L11.8354 15.0091C12.3775 14.8284 12.6485 14.7381 12.9035 14.6166C13.2043 14.4732 13.4886 14.2975 13.7513 14.0926C13.9741 13.9188 14.1761 13.7168 14.5801 13.3128L20.5449 7.34795L21.1938 6.69914C22.2687 5.62415 22.2687 3.88124 21.1938 2.80624C20.1188 1.73125 18.3759 1.73125 17.3009 2.80624Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),Ao=u("path",{opacity:"0.5",d:"M16.6522 3.45508C16.6522 3.45508 16.7333 4.83381 17.9499 6.05034C19.1664 7.26687 20.5451 7.34797 20.5451 7.34797M10.1002 15.5876L8.4126 13.9",stroke:"currentColor","stroke-width":"1.5"},null,-1),Po=[Io,Oo,Ao];function No(e,t){return V(),H("svg",ko,Po)}const Mo=Se(To,[["render",No]]),$o={class:"relative pt-5"},Lo={class:"h-full -mx-2"},Fo={class:"overflow-x-auto flex items-start flex-nowrap gap-5 px-2 pb-2"},jo={class:"flex justify-between mb-5"},Bo={class:"text-base font-semibold"},Xo={class:"flex items-center"},Yo=["onClick"],Ro={class:"dropdown"},Vo={type:"button",class:"hover:text-primary"},Ho=["onClick"],Wo=["onClick"],zo=["onClick"],Go=["onClick"],Uo={class:"shadow bg-[#f4f4f4] dark:bg-white-dark/20 p-3 pb-5 rounded-md mb-5 space-y-3 cursor-move"},qo={key:0,src:pn,alt:"images",class:"h-32 w-full object-cover rounded-md"},Jo={class:"text-base font-medium"},Zo={class:"break-all"},Ko={class:"flex gap-2 items-center flex-wrap"},Qo={class:"ltr:ml-2 rtl:mr-2"},ti={key:1,class:"btn px-2 py-1 flex text-white-dark dark:border-white-dark/50 shadow-none"},ei=u("span",{class:"ltr:ml-2 rtl:mr-2"},"No Tags",-1),ni={class:"flex items-center justify-between"},oi={class:"font-medium flex items-center hover:text-primary"},ii={class:"flex items-center"},ri=["onClick"],ai=["onClick"],si={class:"pt-3"},li=["onClick"],di={class:"fixed inset-0 overflow-y-auto"},ui={class:"flex min-h-full items-center justify-center px-4 py-8"},ci={class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"},fi={class:"p-5"},hi={class:"grid gap-5"},pi=u("label",{for:"title"},"Name",-1),mi={class:"flex justify-end items-center mt-8"},gi={type:"submit",class:"btn btn-primary ltr:ml-4 rtl:mr-4"},vi={class:"fixed inset-0 overflow-y-auto"},bi={class:"flex min-h-full items-center justify-center px-4 py-8"},_i={class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"},yi={class:"p-5"},wi={class:"grid gap-5"},xi=u("label",{for:"taskTitle"},"Name",-1),Ci=u("label",{for:"taskTag"},"Tag",-1),Ei=u("label",{for:"taskdesc"},"Description",-1),Di={class:"flex justify-end items-center mt-8"},Si={type:"submit",class:"btn btn-primary ltr:ml-4 rtl:mr-4"},Ti={class:"fixed inset-0 overflow-y-auto"},ki={class:"flex min-h-full items-center justify-center px-4 py-8"},Ii=u("div",{class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"}," Delete Task ",-1),Oi={class:"p-5 text-center"},Ai={class:"text-white bg-danger ring-4 ring-danger/30 p-4 rounded-full w-fit mx-auto"},Pi=u("div",{class:"text-base sm:w-3/4 mx-auto mt-5"},"Are you sure you want to delete Task?",-1),Ni={class:"flex justify-center items-center mt-8"},Ri=De({__name:"scrumboard",setup(e){cn({title:"Scrumboard"});const t=fn(),n=pt({id:null,title:""}),o=pt({projectId:null,id:null,title:"",description:"",tags:""}),i=pt(null),r=pt(!1),a=pt(!1),s=pt(!1),l=pt([{id:1,title:"In Progress",tasks:[{projectId:1,id:1,title:"Creating a new Portfolio on Dribble",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit.",image:!0,date:" 08 Aug, 2020",tags:["designing"]},{projectId:1,id:2,title:"Singapore Team Meet",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit.",date:" 09 Aug, 2020",tags:["meeting"]}]},{id:2,title:"Pending",tasks:[{projectId:2,id:1,title:"Plan a trip to another country",description:"",date:" 10 Sep, 2020"}]},{id:3,title:"Complete",tasks:[{projectId:3,id:1,title:"Dinner with Kelly Young",description:"",date:" 08 Aug, 2020"},{projectId:3,id:2,title:"Launch New SEO Wordpress Theme ",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",date:" 09 Aug, 2020"}]},{id:4,title:"Working",tasks:[]}]),d=(_=null)=>{setTimeout(()=>{n.value={id:null,title:""},_&&(n.value=JSON.parse(JSON.stringify(_))),r.value=!0})},p=()=>{if(!n.value.title)return B("Title is required.","error"),!1;if(n.value.id){const _=l.value.find(h=>h.id===n.value.id);_.title=n.value.title}else{const h={id:(l.value.length?l.value.reduce((M,v)=>v.id>M?v.id:M,l.value[0].id):0)+1,title:n.value.title,tasks:[]};l.value.push(h)}B("Project has been saved successfully."),r.value=!1},f=_=>{l.value=l.value.filter(h=>h.id!=_.id),B("Project has been deleted successfully.")},y=_=>{_.tasks=[]},D=(_,h=null)=>{o.value={projectId:null,id:null,title:"",description:"",tags:""},h&&(o.value=JSON.parse(JSON.stringify(h)),o.value.tags=o.value.tags?o.value.tags.toString():""),o.value.projectId=_,a.value=!0},w=()=>{var h,M,v;if(!o.value.title)return B("Title is required.","error"),!1;const _=l.value.find(x=>x.id===o.value.projectId);if(o.value.id){const x=_.tasks.find(A=>A.id===o.value.id);x.title=o.value.title,x.description=o.value.description,x.tags=((h=o.value.tags)==null?void 0:h.length)>0?o.value.tags.split(","):[]}else{let x=0;(M=_.tasks)!=null&&M.length&&(x=_.tasks.reduce((q,tt)=>tt.id>q?tt.id:q,_.tasks[0].id));const A=new Date,Z=String(A.getDate()).padStart(2,"0"),F=String(A.getMonth()),ft=A.getFullYear(),Q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht={projectId:o.value.projectId,id:x+1,title:o.value.title,description:o.value.description,date:Z+" "+Q[F]+", "+ft,tags:((v=o.value.tags)==null?void 0:v.length)>0?o.value.tags.split(","):[]};_.tasks.push(ht)}B("Task has been saved successfully."),a.value=!1},S=(_,h=null)=>{i.value=h,setTimeout(()=>{s.value=!0},10)},W=()=>{let _=l.value.find(h=>h.id===i.value.projectId);_.tasks=_.tasks.filter(h=>h.id!=i.value.id),B("Task has been deleted successfully."),s.value=!1},B=(_="",h="success")=>{mn.mixin({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,customClass:{container:"toast"}}).fire({icon:h,title:_,padding:"10px 20px"})};return(_,h)=>{const M=Ue("Popper");return V(),H("div",null,[u("div",null,[u("button",{type:"button",class:"btn btn-primary flex",onClick:h[0]||(h[0]=v=>d())},[C(ze,{class:"w-5 h-5 ltr:mr-3 rtl:ml-3"}),Pe(" Add Project ")])]),u("div",$o,[u("div",Lo,[u("div",Fo,[(V(!0),H(ee,null,ne(l.value,v=>(V(),H("div",{key:v.id,class:"panel w-80 flex-none"},[u("div",jo,[u("h4",Bo,it(v.title),1),u("div",Xo,[u("button",{type:"button",class:"hover:text-primary ltr:mr-2 rtl:ml-2",onClick:x=>D(v.id)},[C(_o)],8,Yo),u("div",Ro,[C(M,{placement:P(t).rtlClass==="rtl"?"bottom-start":"bottom-end",offsetDistance:"0"},{content:L(({close:x})=>[u("ul",{onClick:A=>x(),class:"text-black dark:text-white-dark whitespace-nowrap"},[u("li",null,[u("a",{href:"javascript:;",onClick:A=>d(v)},"Edit ",8,Wo)]),u("li",null,[u("a",{href:"javascript:;",onClick:A=>f(v)},"Delete ",8,zo)]),u("li",null,[u("a",{href:"javascript:;",onClick:A=>y(v)},"Clear All ",8,Go)])],8,Ho)]),default:L(()=>[u("button",Vo,[C(gn,{class:"opacity-70 hover:opacity-100"})])]),_:2},1032,["placement"])])])]),C(P(oo),{class:"connect-sorting-content min-h-[150px]",group:"default","ghost-class":"sortable-ghost","drag-class":"sortable-drag",animation:200},{default:L(()=>[(V(!0),H(ee,null,ne(v.tasks,x=>{var A;return V(),H("div",{class:"sortable-list",key:v.id+""+x.id},[u("div",Uo,[x.image?(V(),H("img",qo)):hn("",!0),u("div",Jo,it(x.title),1),u("p",Zo,it(x.description),1),u("div",Ko,[(A=x.tags)!=null&&A.length?(V(!0),H(ee,{key:0},ne(x.tags,(Z,F)=>(V(),H("div",{key:F,class:"btn px-2 py-1 flex btn-outline-primary"},[C(Ge,{class:"shrink-0"}),u("span",Qo,it(Z),1)]))),128)):(V(),H("div",ti,[C(Ge,{class:"shrink-0"}),ei]))]),u("div",ni,[u("div",oi,[C(vn,{class:"ltr:mr-3 rtl:ml-3 shrink-0"}),u("span",null,it(x.date),1)]),u("div",ii,[u("button",{type:"button",class:"hover:text-info",onClick:Z=>D(v.id,x)},[C(Mo,{class:"ltr:mr-3 rtl:ml-3"})],8,ri),u("button",{type:"button",class:"hover:text-danger",onClick:Z=>S(v.id,x)},[C(Me)],8,ai)])])])])}),128))]),_:2},1024),u("div",si,[u("button",{type:"button",class:"btn btn-primary mx-auto",onClick:x=>D(v.id)},[C(ze),Pe(" Add Task ")],8,li)])]))),128))])])]),C(P(se),{appear:"",show:r.value,as:"template"},{default:L(()=>[C(P(oe),{as:"div",onClose:h[4]||(h[4]=v=>r.value=!1),class:"relative z-[51]"},{default:L(()=>[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:L(()=>[C(P(ie),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),u("div",di,[u("div",ui,[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:L(()=>[C(P(re),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:L(()=>[u("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[1]||(h[1]=v=>r.value=!1)},[C(ae)]),u("div",ci,it(n.value.id?"Edit Project":"Add Project"),1),u("div",fi,[u("form",{onSubmit:Ne(p,["prevent"])},[u("div",hi,[u("div",null,[pi,jt(u("input",{id:"title","onUpdate:modelValue":h[2]||(h[2]=v=>n.value.title=v),type:"text",class:"form-input mt-1",placeholder:"Enter Name"},null,512),[[Bt,n.value.title]])])]),u("div",mi,[u("button",{type:"button",class:"btn btn-outline-danger",onClick:h[3]||(h[3]=v=>r.value=!1)},"Cancel"),u("button",gi,it(n.value.id?"Update":"Add"),1)])],32)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]),C(P(se),{appear:"",show:a.value,as:"template"},{default:L(()=>[C(P(oe),{as:"div",onClose:h[10]||(h[10]=v=>a.value=!1),class:"relative z-[51]"},{default:L(()=>[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:L(()=>[C(P(ie),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),u("div",vi,[u("div",bi,[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:L(()=>[C(P(re),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:L(()=>[u("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[5]||(h[5]=v=>a.value=!1)},[C(ae)]),u("div",_i,it(o.value.id?"Edit Task":"Add Task"),1),u("div",yi,[u("form",{onSubmit:Ne(w,["prevent"])},[u("div",wi,[u("div",null,[xi,jt(u("input",{id:"taskTitle","onUpdate:modelValue":h[6]||(h[6]=v=>o.value.title=v),type:"text",class:"form-input",placeholder:"Enter Name"},null,512),[[Bt,o.value.title]])]),u("div",null,[Ci,jt(u("input",{id:"taskTag","onUpdate:modelValue":h[7]||(h[7]=v=>o.value.tags=v),type:"text",class:"form-input",placeholder:"Enter Tag"},null,512),[[Bt,o.value.tags]])]),u("div",null,[Ei,jt(u("textarea",{id:"taskdesc","onUpdate:modelValue":h[8]||(h[8]=v=>o.value.description=v),class:"form-textarea min-h-[130px]",placeholder:"Enter Description"},null,512),[[Bt,o.value.description]])])]),u("div",Di,[u("button",{type:"button",class:"btn btn-outline-danger",onClick:h[9]||(h[9]=v=>a.value=!1)},"Cancel"),u("button",Si,it(o.value.id?"Update":"Add"),1)])],32)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]),C(P(se),{appear:"",show:s.value,as:"template"},{default:L(()=>[C(P(oe),{as:"div",onClose:h[14]||(h[14]=v=>s.value=!1),class:"relative z-[51]"},{default:L(()=>[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:L(()=>[C(P(ie),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),u("div",Ti,[u("div",ki,[C(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:L(()=>[C(P(re),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:L(()=>[u("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[11]||(h[11]=v=>s.value=!1)},[C(ae)]),Ii,u("div",Oi,[u("div",Ai,[C(Me)]),Pi,u("div",Ni,[u("button",{type:"button",class:"btn btn-outline-danger",onClick:h[12]||(h[12]=v=>s.value=!1)},"Cancel"),u("button",{type:"button",class:"btn btn-primary ltr:ml-4 rtl:mr-4",onClick:h[13]||(h[13]=v=>W())},"Delete")])])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"])])}}});export{Ri as default};