1234567891011 |
- /* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as e,P as t,r as n,_ as o,o as i,l as r,w as a,c as l,F as s,y as u,H as c,aO as d,m as h,p,x as f,e as v,a as m,f as g,b3 as b,b as y,b4 as w,G as x,t as _,ao as S,z as E,b5 as D,aD as C,J as I,a2 as T,a3 as A,ab as k,ac as M,Y as O,S as N,av as P,aw as j}from"./index-b85d10da.js";/* empty css *//* empty css *//* empty css *//*!
- * vue-draggable-next v2.2.0
- * (c) 2023 Anish George
- * @license MIT
- */
- /**!
- * Sortable 1.14.0
- * @author RubaXa <trash@rubaxa.org>
- * @author owenm <owen23355@gmail.com>
- * @license MIT
- */function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},L.apply(this,arguments)}function B(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var U=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$=V(/Edge/i),H=V(/firefox/i),z=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),W=V(/iP(ad|od|hone)/i),G=V(/chrome/i)&&V(/android/i),q={capture:!1,passive:!1};function Z(e,t,n){e.addEventListener(t,n,!U&&q)}function J(e,t,n){e.removeEventListener(t,n,!U&&q)}function K(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(n){return!1}return!1}}function Q(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ee(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&K(e,t):K(e,t))||o&&e===n)return e;if(e===n)break}while(e=Q(e))}return null}var te,ne=/\s+/g;function oe(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ne," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(ne," ")}}function ie(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function re(e,t){var n="";if("string"==typeof e)n=e;else do{var o=ie(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ae(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function le(){var e=document.scrollingElement;return e||document.documentElement}function se(e,t,n,o,i){if(e.getBoundingClientRect||e===window){var r,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==le()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!U))do{if(i&&i.getBoundingClientRect&&("none"!==ie(i,"transform")||n&&"static"!==ie(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(ie(i,"border-top-width")),l-=h.left+parseInt(ie(i,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&e!==window){var p=re(i||e),f=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(c/=v),u=(l/=f)+(d/=f))}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function ue(e,t,n){for(var o=fe(e,!0),i=se(e)[t];o;){var r=se(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===le())break;o=fe(o,!1)}return!1}function ce(e,t,n,o){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==gt.ghost&&(o||a[r]!==gt.dragged)&&ee(a[r],n.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function de(e,t){for(var n=e.lastElementChild;n&&(n===gt.ghost||"none"===ie(n,"display")||t&&!K(n,t));)n=n.previousElementSibling;return n||null}function he(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===gt.clone||t&&!K(e,t)||n++;return n}function pe(e){var t=0,n=0,o=le();if(e)do{var i=re(e),r=i.a,a=i.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function fe(e,t){if(!e||!e.getBoundingClientRect)return le();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ie(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return le();if(o||t)return n;o=!0}}}while(n=n.parentNode);return le()}function ve(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)}function me(e,t){return function(){if(!te){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),te=setTimeout((function(){te=void 0}),t)}}}function ge(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function be(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)}var ye="Sortable"+(new Date).getTime();function we(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==ie(e,"display")&&e!==gt.ghost){t.push({target:e,rect:se(e)});var n=R({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=re(e,!0);o&&(n.top-=o.f,n.left-=o.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var i=!1,r=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=se(n),s=n.prevFromRect,u=n.prevToRect,c=e.rect,d=re(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&ve(s,l)&&!ve(a,l)&&(c.top-l.top)/(c.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(t=function(e,t,n,o){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))*o.animation}(c,s,u,o.options)),ve(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=o.options.animation),o.animate(n,c,l,t)),t&&(i=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),i?e=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,o){if(o){ie(e,"transition",""),ie(e,"transform","");var i=re(this.el),r=i&&i.a,a=i&&i.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,ie(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),ie(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),ie(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){ie(e,"transition",""),ie(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}}var xe=[],_e={initializeByDefault:!0},Se={mount:function(e){for(var t in _e)_e.hasOwnProperty(t)&&!(t in e)&&(e[t]=_e[t]);xe.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),xe.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=e+"Global";xe.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][i]&&t[o.pluginName][i](R({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](R({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var i in xe.forEach((function(o){var i=o.pluginName;if(e.options[i]||o.initializeByDefault){var r=new o(e,t,e.options);r.sortable=e,r.options=e.options,e[i]=r,L(n,r.defaults)}})),e.options)if(e.options.hasOwnProperty(i)){var r=this.modifyOption(e,i,e.options[i]);void 0!==r&&(e.options[i]=r)}},getEventProperties:function(e,t){var n={};return xe.forEach((function(o){"function"==typeof o.eventProperties&&L(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return xe.forEach((function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(o=i.optionListeners[t].call(e[i.pluginName],n))})),o}};var Ee=["evt"],De=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=B(n,Ee);Se.pluginEvent.bind(gt)(e,t,R({dragEl:Ie,parentEl:Te,ghostEl:Ae,rootEl:ke,nextEl:Me,lastDownEl:Oe,cloneEl:Ne,cloneHidden:Pe,dragStarted:We,putSortable:Le,activeSortable:gt.active,originalEvent:o,oldIndex:je,oldDraggableIndex:Re,newIndex:Xe,newDraggableIndex:Ye,hideGhostForTarget:pt,unhideGhostForTarget:ft,cloneNowHidden:function(){Pe=!0},cloneNowShown:function(){Pe=!1},dispatchSortableEvent:function(e){Ce({sortable:t,name:e,originalEvent:o})}},i))};function Ce(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[ye]){var v,m=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||U||$?(v=document.createEvent("Event")).initEvent(o,!0,!0):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=l||n,v.item=i||n,v.clone=r,v.oldIndex=s,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=d,v.originalEvent=h,v.pullMode=p?p.lastPutMode:void 0;var b=R(R({},f),Se.getEventProperties(o,t));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),m[g]&&m[g].call(t,v)}}(R({putSortable:Le,cloneEl:Ne,targetEl:Ie,rootEl:ke,oldIndex:je,oldDraggableIndex:Re,newIndex:Xe,newDraggableIndex:Ye},e))}var Ie,Te,Ae,ke,Me,Oe,Ne,Pe,je,Xe,Re,Ye,Fe,Le,Be,Ve,Ue,$e,He,ze,We,Ge,qe,Ze,Je,Ke=!1,Qe=!1,et=[],tt=!1,nt=!1,ot=[],it=!1,rt=[],at="undefined"!=typeof document,lt=W,st=$||U?"cssFloat":"float",ut=at&&!G&&!W&&"draggable"in document.createElement("div"),ct=function(){if(at){if(U)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),dt=function(e,t){var n=ie(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=ce(e,0,t),r=ce(e,1,t),a=i&&ie(i),l=r&&ie(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+se(i).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+se(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[st]||r&&"none"===n[st]&&s+u>o)?"vertical":"horizontal"},ht=function(e){function t(e,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},pt=function(){!ct&&Ae&&ie(Ae,"display","none")},ft=function(){!ct&&Ae&&ie(Ae,"display","")};at&&document.addEventListener("click",(function(e){if(Qe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Qe=!1,!1}),!0);var vt=function(e){if(Ie){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,et.some((function(e){var t=e[ye].options.emptyInsertThreshold;if(t&&!de(e)){var n=se(e),o=i>=n.left-t&&i<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return o&&l?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ye]._onDragOver(n)}}var i,r,a},mt=function(e){Ie&&Ie.parentNode[ye]._isOutsideThisEl(e.target)};function gt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=L({},t),e[ye]=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 dt(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(e,t){e.setData("Text",t.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:!1!==gt.supportPointer&&"PointerEvent"in window&&!z,emptyInsertThreshold:5};for(var o in Se.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var i in ht(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Z(e,"pointerdown",this._onTapStart):(Z(e,"mousedown",this._onTapStart),Z(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Z(e,"dragover",this),Z(e,"dragenter",this)),et.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),L(this,we())}function bt(e,t,n,o,i,r,a,l){var s,u,c=e[ye],d=c.options.onMove;return!window.CustomEvent||U||$?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||se(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function yt(e){e.draggable=!1}function wt(){it=!1}function xt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function _t(e){return setTimeout(e,0)}function St(e){return clearTimeout(e)}gt.prototype={constructor:gt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ge=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ie):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,i=o.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(function(e){rt.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&rt.push(o)}}(n),!Ie&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!z||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=ee(l,o.draggable,n,!1))&&l.animated||Oe===l)){if(je=he(l),Re=he(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return Ce({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),De("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=ee(s,o.trim(),n,!1))return Ce({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),De("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());o.handle&&!ee(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!Ie&&n.parentNode===r){var s=se(n);if(ke=r,Te=(Ie=n).parentNode,Me=Ie.nextSibling,Oe=n,Fe=a.group,gt.dragged=Ie,Be={target:Ie,clientX:(t||e).clientX,clientY:(t||e).clientY},He=Be.clientX-s.left,ze=Be.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ie.style["will-change"]="all",o=function(){De("delayEnded",i,{evt:e}),gt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!H&&i.nativeDraggable&&(Ie.draggable=!0),i._triggerDragStart(e,t),Ce({sortable:i,name:"choose",originalEvent:e}),oe(Ie,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){ae(Ie,e.trim(),yt)})),Z(l,"dragover",vt),Z(l,"mousemove",vt),Z(l,"touchmove",vt),Z(l,"mouseup",i._onDrop),Z(l,"touchend",i._onDrop),Z(l,"touchcancel",i._onDrop),H&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ie.draggable=!0),De("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&($||U))o();else{if(gt.eventCanceled)return void this._onDrop();Z(l,"mouseup",i._disableDelayedDrag),Z(l,"touchend",i._disableDelayedDrag),Z(l,"touchcancel",i._disableDelayedDrag),Z(l,"mousemove",i._delayedDragTouchMoveHandler),Z(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Z(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ie&&yt(Ie),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;J(e,"mouseup",this._disableDelayedDrag),J(e,"touchend",this._disableDelayedDrag),J(e,"touchcancel",this._disableDelayedDrag),J(e,"mousemove",this._delayedDragTouchMoveHandler),J(e,"touchmove",this._delayedDragTouchMoveHandler),J(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Z(document,"pointermove",this._onTouchMove):Z(document,t?"touchmove":"mousemove",this._onTouchMove):(Z(Ie,"dragend",this),Z(ke,"dragstart",this._onDragStart));try{document.selection?_t((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Ke=!1,ke&&Ie){De("dragStarted",this,{evt:t}),this.nativeDraggable&&Z(document,"dragover",mt);var n=this.options;!e&&oe(Ie,n.dragClass,!1),oe(Ie,n.ghostClass,!0),gt.active=this,e&&this._appendGhost(),Ce({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ve){this._lastX=Ve.clientX,this._lastY=Ve.clientY,pt();for(var e=document.elementFromPoint(Ve.clientX,Ve.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ve.clientX,Ve.clientY))!==t;)t=e;if(Ie.parentNode[ye]._isOutsideThisEl(e),t)do{if(t[ye]){if(t[ye]._onDragOver({clientX:Ve.clientX,clientY:Ve.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);ft()}},_onTouchMove:function(e){if(Be){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Ae&&re(Ae,!0),a=Ae&&r&&r.a,l=Ae&&r&&r.d,s=lt&&Je&&pe(Je),u=(i.clientX-Be.clientX+o.x)/(a||1)+(s?s[0]-ot[0]:0)/(a||1),c=(i.clientY-Be.clientY+o.y)/(l||1)+(s?s[1]-ot[1]:0)/(l||1);if(!gt.active&&!Ke){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Ae){r?(r.e+=u-(Ue||0),r.f+=c-($e||0)):r={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");ie(Ae,"webkitTransform",d),ie(Ae,"mozTransform",d),ie(Ae,"msTransform",d),ie(Ae,"transform",d),Ue=u,$e=c,Ve=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Ae){var e=this.options.fallbackOnBody?document.body:ke,t=se(Ie,!0,lt,!0,e),n=this.options;if(lt){for(Je=e;"static"===ie(Je,"position")&&"none"===ie(Je,"transform")&&Je!==document;)Je=Je.parentNode;Je!==document.body&&Je!==document.documentElement?(Je===document&&(Je=le()),t.top+=Je.scrollTop,t.left+=Je.scrollLeft):Je=le(),ot=pe(Je)}oe(Ae=Ie.cloneNode(!0),n.ghostClass,!1),oe(Ae,n.fallbackClass,!0),oe(Ae,n.dragClass,!0),ie(Ae,"transition",""),ie(Ae,"transform",""),ie(Ae,"box-sizing","border-box"),ie(Ae,"margin",0),ie(Ae,"top",t.top),ie(Ae,"left",t.left),ie(Ae,"width",t.width),ie(Ae,"height",t.height),ie(Ae,"opacity","0.8"),ie(Ae,"position",lt?"absolute":"fixed"),ie(Ae,"zIndex","100000"),ie(Ae,"pointerEvents","none"),gt.ghost=Ae,e.appendChild(Ae),ie(Ae,"transform-origin",He/parseInt(Ae.style.width)*100+"% "+ze/parseInt(Ae.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,i=n.options;De("dragStart",this,{evt:e}),gt.eventCanceled?this._onDrop():(De("setupClone",this),gt.eventCanceled||((Ne=be(Ie)).draggable=!1,Ne.style["will-change"]="",this._hideClone(),oe(Ne,this.options.chosenClass,!1),gt.clone=Ne),n.cloneId=_t((function(){De("clone",n),gt.eventCanceled||(n.options.removeCloneOnHide||ke.insertBefore(Ne,Ie),n._hideClone(),Ce({sortable:n,name:"clone"}))})),!t&&oe(Ie,i.dragClass,!0),t?(Qe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(J(document,"mouseup",n._onDrop),J(document,"touchend",n._onDrop),J(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Ie)),Z(document,"drop",n),ie(Ie,"transform","translateZ(0)")),Ke=!0,n._dragStartId=_t(n._dragStarted.bind(n,t,e)),Z(document,"selectstart",n),We=!0,z&&ie(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,i,r=this.el,a=e.target,l=this.options,s=l.group,u=gt.active,c=Fe===s,d=l.sort,h=Le||u,p=this,f=!1;if(!it){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=ee(a,l.draggable,r,!0),A("dragOver"),gt.eventCanceled)return f;if(Ie.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return M(!1);if(Qe=!1,u&&!l.disabled&&(c?d||(o=Te!==ke):Le===this||(this.lastPutMode=Fe.checkPull(this,u,Ie,e))&&s.checkPut(this,u,Ie,e))){if(i="vertical"===this._getDirection(e,a),t=se(Ie),A("dragOverValid"),gt.eventCanceled)return f;if(o)return Te=ke,k(),this._hideClone(),A("revert"),gt.eventCanceled||(Me?ke.insertBefore(Ie,Me):ke.appendChild(Ie)),M(!0);var v=de(r,l.draggable);if(!v||function(e,t,n){var o=se(de(n.el,n.options.draggable)),i=10;return t?e.clientX>o.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}(e,i,this)&&!v.animated){if(v===Ie)return M(!1);if(v&&r===e.target&&(a=v),a&&(n=se(a)),!1!==bt(ke,r,Ie,t,a,n,e,!!a))return k(),r.appendChild(Ie),Te=r,O(),M(!0)}else if(v&&function(e,t,n){var o=se(ce(n.el,0,n.options,!0)),i=10;return t?e.clientX<o.left-i||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-i||e.clientY<o.bottom&&e.clientX<o.left}(e,i,this)){var m=ce(r,0,l,!0);if(m===Ie)return M(!1);if(n=se(a=m),!1!==bt(ke,r,Ie,t,a,n,e,!1))return k(),r.insertBefore(Ie,m),Te=r,O(),M(!0)}else if(a.parentNode===r){n=se(a);var g,b,y,w=Ie.parentNode!==r,x=!function(e,t,n){var o=n?e.left:e.top,i=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===a||i===l||o+r/2===a+s/2}(Ie.animated&&Ie.toRect||t,a.animated&&a.toRect||n,i),_=i?"top":"left",S=ue(a,"top","top")||ue(Ie,"top","top"),E=S?S.scrollTop:void 0;if(Ge!==a&&(b=n[_],tt=!1,nt=!x&&l.invertSwap||w),g=function(e,t,n,o,i,r,a,l){var s=o?e.clientY:e.clientX,u=o?n.height:n.width,c=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&Ze<u*i){if(!tt&&(1===qe?s>c+u*r/2:s<d-u*r/2)&&(tt=!0),tt)h=!0;else if(1===qe?s<c+Ze:s>d-Ze)return-qe}else if(s>c+u*(1-i)/2&&s<d-u*(1-i)/2)return function(e){return he(Ie)<he(e)?1:-1}(t);if((h=h||a)&&(s<c+u*r/2||s>d-u*r/2))return s>c+u/2?1:-1;return 0}(e,a,n,i,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,nt,Ge===a),0!==g){var D=he(Ie);do{D-=g,y=Te.children[D]}while(y&&("none"===ie(y,"display")||y===Ae))}if(0===g||y===a)return M(!1);Ge=a,qe=g;var C=a.nextElementSibling,I=!1,T=bt(ke,r,Ie,t,a,n,e,I=1===g);if(!1!==T)return 1!==T&&-1!==T||(I=1===T),it=!0,setTimeout(wt,30),k(),I&&!C?r.appendChild(Ie):a.parentNode.insertBefore(Ie,I?C:a),S&&ge(S,0,E-S.scrollTop),Te=Ie.parentNode,void 0===b||nt||(Ze=Math.abs(b-se(a)[_])),O(),M(!0)}if(r.contains(Ie))return M(!1)}return!1}function A(l,s){De(l,p,R({evt:e,isOwner:c,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:a,completed:M,onMove:function(n,o){return bt(ke,r,Ie,t,n,se(n),e,o)},changed:O},s))}function k(){A("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function M(t){return A("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(p),p!==h&&(oe(Ie,Le?Le.options.ghostClass:u.options.ghostClass,!1),oe(Ie,l.ghostClass,!0)),Le!==p&&p!==gt.active?Le=p:p===gt.active&&Le&&(Le=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){A("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===Ie&&!Ie.animated||a===r&&!a.animated)&&(Ge=null),l.dragoverBubble||e.rootEl||a===document||(Ie.parentNode[ye]._isOutsideThisEl(e.target),!t&&vt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function O(){Xe=he(Ie),Ye=he(Ie,l.draggable),Ce({sortable:p,name:"change",toEl:r,newIndex:Xe,newDraggableIndex:Ye,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){J(document,"mousemove",this._onTouchMove),J(document,"touchmove",this._onTouchMove),J(document,"pointermove",this._onTouchMove),J(document,"dragover",vt),J(document,"mousemove",vt),J(document,"touchmove",vt)},_offUpEvents:function(){var e=this.el.ownerDocument;J(e,"mouseup",this._onDrop),J(e,"touchend",this._onDrop),J(e,"pointerup",this._onDrop),J(e,"touchcancel",this._onDrop),J(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Xe=he(Ie),Ye=he(Ie,n.draggable),De("drop",this,{evt:e}),Te=Ie&&Ie.parentNode,Xe=he(Ie),Ye=he(Ie,n.draggable),gt.eventCanceled||(Ke=!1,nt=!1,tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),St(this.cloneId),St(this._dragStartId),this.nativeDraggable&&(J(document,"drop",this),J(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),z&&ie(document.body,"user-select",""),ie(Ie,"transform",""),e&&(We&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Ae&&Ae.parentNode&&Ae.parentNode.removeChild(Ae),(ke===Te||Le&&"clone"!==Le.lastPutMode)&&Ne&&Ne.parentNode&&Ne.parentNode.removeChild(Ne),Ie&&(this.nativeDraggable&&J(Ie,"dragend",this),yt(Ie),Ie.style["will-change"]="",We&&!Ke&&oe(Ie,Le?Le.options.ghostClass:this.options.ghostClass,!1),oe(Ie,this.options.chosenClass,!1),Ce({sortable:this,name:"unchoose",toEl:Te,newIndex:null,newDraggableIndex:null,originalEvent:e}),ke!==Te?(Xe>=0&&(Ce({rootEl:Te,name:"add",toEl:Te,fromEl:ke,originalEvent:e}),Ce({sortable:this,name:"remove",toEl:Te,originalEvent:e}),Ce({rootEl:Te,name:"sort",toEl:Te,fromEl:ke,originalEvent:e}),Ce({sortable:this,name:"sort",toEl:Te,originalEvent:e})),Le&&Le.save()):Xe!==je&&Xe>=0&&(Ce({sortable:this,name:"update",toEl:Te,originalEvent:e}),Ce({sortable:this,name:"sort",toEl:Te,originalEvent:e})),gt.active&&(null!=Xe&&-1!==Xe||(Xe=je,Ye=Re),Ce({sortable:this,name:"end",toEl:Te,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){De("nulling",this),ke=Ie=Te=Ae=Me=Ne=Oe=Pe=Be=Ve=We=Xe=Ye=je=Re=Ge=qe=Le=Fe=gt.dragged=gt.ghost=gt.clone=gt.active=null,rt.forEach((function(e){e.checked=!0})),rt.length=Ue=$e=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ie&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)ee(e=n[o],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||xt(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var i=o.children[t];ee(i,this.options.draggable,o,!1)&&(n[e]=i)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ee(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Se.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&ht(n)},destroy:function(){De("destroy",this);var e=this.el;e[ye]=null,J(e,"mousedown",this._onTapStart),J(e,"touchstart",this._onTapStart),J(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(J(e,"dragover",this),J(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),et.splice(et.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Pe){if(De("hideClone",this),gt.eventCanceled)return;ie(Ne,"display","none"),this.options.removeCloneOnHide&&Ne.parentNode&&Ne.parentNode.removeChild(Ne),Pe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Pe){if(De("showClone",this),gt.eventCanceled)return;Ie.parentNode!=ke||this.options.group.revertClone?Me?ke.insertBefore(Ne,Me):ke.appendChild(Ne):ke.insertBefore(Ne,Ie),this.options.group.revertClone&&this.animate(Ie,Ne),ie(Ne,"display",""),Pe=!1}}else this._hideClone()}},at&&Z(document,"touchmove",(function(e){(gt.active||Ke)&&e.cancelable&&e.preventDefault()})),gt.utils={on:Z,off:J,css:ie,find:ae,is:function(e,t){return!!ee(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:me,closest:ee,toggleClass:oe,clone:be,index:he,nextTick:_t,cancelNextTick:St,detectDirection:dt,getChild:ce},gt.get=function(e){return e[ye]},gt.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(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(gt.utils=R(R({},gt.utils),e.utils)),Se.mount(e)}))},gt.create=function(e,t){return new gt(e,t)},gt.version="1.14.0";var Et,Dt,Ct,It,Tt,At,kt=[],Mt=!1;function Ot(){kt.forEach((function(e){clearInterval(e.pid)})),kt=[]}function Nt(){clearInterval(At)}var Pt=me((function(e,t,n,o){if(t.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,u=le(),c=!1;Dt!==n&&(Dt=n,Ot(),Et=t.scroll,i=t.scrollFn,!0===Et&&(Et=fe(n,!0)));var d=0,h=Et;do{var p=h,f=se(p),v=f.top,m=f.bottom,g=f.left,b=f.right,y=f.width,w=f.height,x=void 0,_=void 0,S=p.scrollWidth,E=p.scrollHeight,D=ie(p),C=p.scrollLeft,I=p.scrollTop;p===u?(x=y<S&&("auto"===D.overflowX||"scroll"===D.overflowX||"visible"===D.overflowX),_=w<E&&("auto"===D.overflowY||"scroll"===D.overflowY||"visible"===D.overflowY)):(x=y<S&&("auto"===D.overflowX||"scroll"===D.overflowX),_=w<E&&("auto"===D.overflowY||"scroll"===D.overflowY));var T=x&&(Math.abs(b-r)<=l&&C+y<S)-(Math.abs(g-r)<=l&&!!C),A=_&&(Math.abs(m-a)<=l&&I+w<E)-(Math.abs(v-a)<=l&&!!I);if(!kt[d])for(var k=0;k<=d;k++)kt[k]||(kt[k]={});kt[d].vx==T&&kt[d].vy==A&&kt[d].el===p||(kt[d].el=p,kt[d].vx=T,kt[d].vy=A,clearInterval(kt[d].pid),0==T&&0==A||(c=!0,kt[d].pid=setInterval(function(){o&&0===this.layer&>.active._onTouchMove(Tt);var t=kt[this.layer].vy?kt[this.layer].vy*s:0,n=kt[this.layer].vx?kt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(gt.dragged.parentNode[ye],n,t,e,Tt,kt[this.layer].el)||ge(kt[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==u&&(h=fe(h,!1)));Mt=c}}),30),jt=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||i;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(c)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Xt(){}function Rt(){}Xt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=ce(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:jt},L(Xt,{pluginName:"revertOnSpill"}),Rt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:jt},L(Rt,{pluginName:"removeOnSpill"}),gt.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?Z(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Z(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Z(document,"touchmove",this._handleFallbackAutoScroll):Z(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?J(document,"dragover",this._handleAutoScroll):(J(document,"pointermove",this._handleFallbackAutoScroll),J(document,"touchmove",this._handleFallbackAutoScroll),J(document,"mousemove",this._handleFallbackAutoScroll)),Nt(),Ot(),clearTimeout(te),te=void 0},nulling:function(){Tt=Dt=Et=Mt=At=Ct=It=null,kt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,i);if(Tt=e,t||this.options.forceAutoScrollFallback||$||U||z){Pt(e,this.options,r,t);var a=fe(r,!0);!Mt||At&&o===Ct&&i===It||(At&&Nt(),At=setInterval((function(){var r=fe(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Ot()),Pt(e,n.options,r,t)}),10),Ct=o,It=i)}else{if(!this.options.bubbleScroll||fe(r,!0)===le())return void Ot();Pt(e,this.options,fe(r,!1),!1)}}},L(e,{pluginName:"scroll",initializeByDefault:!0})}),gt.mount(Rt,Xt);const Yt="undefined"!=typeof window?window.console:global.console;const Ft=/-(\w)/g,Lt=function(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}((e=>e.replace(Ft,((e,t)=>t?t.toUpperCase():""))));function Bt(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function Vt(e,t,n){const o=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}function Ut(e,t){this.$nextTick((()=>this.$emit(e.toLowerCase(),t)))}function $t(e){return t=>{null!==this.realList&&this["onDrag"+e](t),Ut.call(this,e,t)}}const Ht=["Start","Add","Remove","Update","End"],zt=["Choose","Unchoose","Sort","Filter","Clone"],Wt=["Move",...Ht,...zt].map((e=>"on"+e));let Gt=null;const qt={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}},Zt=e({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Ht.map((e=>e.toLowerCase())),...zt.map((e=>e.toLowerCase()))],props:qt,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const e=this.$slots.default?this.$slots.default():null,n=(o=this.$attrs,(i=this.componentData)?{...i.props,...i.attrs}:o);var o,i;return e?(this.transitionMode=function(e){if(!e||1!==e.length)return!1;const[{type:t}]=e;return!!t&&(n=t.name,["transition-group","TransitionGroup"].includes(n));var n}(e),t(this.getTag(),n,e)):t(this.getTag(),n,[])},created(){null!==this.list&&null!==this.modelValue&&Yt.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Ht.forEach((t=>{e["on"+t]=$t.call(this,t)})),zt.forEach((t=>{e["on"+t]=Ut.bind(this,t)}));const t=Object.keys(this.$attrs).reduce(((e,t)=>(e[Lt(t)]=this.$attrs[t],e)),{}),n=Object.assign({},t,e,{onMove:(e,t)=>this.onDragMove(e,t)});!("draggable"in n)&&(n.draggable=">*");const o=1===this.$el.nodeType?this.$el:this.$el.parentElement;this._sortable=new gt(o,n),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{void 0!==this._sortable&&this._sortable.destroy()}catch(e){}},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?n(this.component):this.tag},updateOptions(e){for(var t in e){const n=Lt(t);-1===Wt.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(e,t,n,o){if(!e)return[];const i=Object.values(e),r=t.length-o;return[...t].map(((e,t)=>t>=r?i.length:i.indexOf(e)))}(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(e){const t=function(e,t){return Object.values(e).indexOf(t)}(this.getChildrenNodes()||[],e);if(-1===t)return null;return{index:t,element:this.realList[t]}},emitChanges(e){this.$nextTick((()=>{this.$emit("change",e)}))},alterList(e){if(this.list)return void e(this.list);const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){this.alterList((e=>e.splice(...arguments)))},updatePosition(e,t){this.alterList((n=>n.splice(t,0,n.splice(e,1)[0])))},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;this.getChildrenNodes()[e].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Gt=e.item)},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Bt(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(Vt(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void Bt(e.clone);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){Bt(e.item),Vt(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});return n(Object.assign({},e,{relatedContext:o,draggedContext:i}),t)},onDragEnd(){this.computeIndexes(),Gt=null},getTrargetedComponent:e=>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 e=n.getUnderlyingVm(t);if(e)return Object.assign(e,i)}return i},computeFutureIndex(e,t){const n=[...t.to.children].filter((e=>"none"!==e.style.display));if(0===n.length)return 0;const o=n.indexOf(t.related),i=e.component.getVmIndex(o);return-1!==n.indexOf(Gt)||!t.willInsertAfter?i:i+1}}});const Jt=o(e({components:{draggable:Zt},props:{headerText:{type:String,default:"header"},list:{type:Array,default:()=>[]},classString:{type:String,default:"board-column-content"},disabled:{type:Boolean,default:!1},options:{type:Object,default:()=>null}},setup:(e,{emit:t})=>({onEnd:e=>{t("end",e)}})}),[["render",function(e,t,o,h,p,f){const v=n("draggable");return i(),r(v,d({list:e.list},e.$attrs,{class:e.classString,disabled:e.disabled,onEnd:e.onEnd}),{default:a((()=>[(i(!0),l(s,null,u(e.list,((t,n)=>c(e.$slots,"default",{key:t.id,item:t,index:n},void 0,!0))),128))])),_:3},16,["list","class","disabled","onEnd"])}],["__scopeId","data-v-1b54743e"]]),Kt=e=>(P("data-v-14d84d1b"),e=e(),j(),e),Qt={class:"custom-menu"},en={class:"menu-container"},tn={class:"device-wrap"},nn={class:"device device-iphone-x"},on={class:"device-frame"},rn={class:"device-content"},an={class:"wechat-header"},ln={class:"header-inner"},sn={class:"wechat-menu"},un=["onClick"],cn={key:0,class:"children-menu-items"},dn=["onClick"],hn=D('<div class="device-stripe" data-v-14d84d1b></div><div class="device-header" data-v-14d84d1b></div><div class="device-sensors" data-v-14d84d1b></div><div class="device-btns" data-v-14d84d1b></div><div class="device-power" data-v-14d84d1b></div>',5),pn={class:"edit-wrap"},fn={key:0},vn={class:"edit-content-wrap"},mn={class:"edit-title"},gn={key:0,class:"notice-text"},bn={class:"edit-form"},yn={key:0},wn={key:1},xn=Kt((()=>v("span",{style:{color:"#fd555d","padding-left":"10px"}},"受微信限制,如您发现微信显示有问题,请减少内容",-1))),_n={key:0},Sn={key:1},En=[Kt((()=>v("p",{class:"no-init"},"点击左侧菜单进行编辑操作",-1)))],Dn={class:"menu-save"},Cn=o(e({__name:"index",setup(e){const t=h(3),n=h({curActiveIndex:null,curSubActiveIndex:null,clickSubMenu:!1,init:!1,buttons:[]}),o=e=>e.showChildMenu,s=p((()=>{var e,t,o,i,r,a,l,s,u,c;return(null==(r=null==(i=null==(t=n.value)?void 0:t.buttons[null==(e=n.value)?void 0:e.curActiveIndex])?void 0:i.sub_button[null==(o=n.value)?void 0:o.curSubActiveIndex])?void 0:r.name)||(null==(c=null==(u=null==(l=n.value)?void 0:l.buttons[null==(a=n.value)?void 0:a.curActiveIndex])?void 0:u.sub_button[null==(s=n.value)?void 0:s.curSubActiveIndex])?void 0:c.type)})),u=h(!0),c=e=>{n.value.init=!0,n.value.clickSubMenu=!1,n.value.curSubActiveIndex=null,n.value.curActiveIndex=e.newDraggableIndex,n.value.buttons.forEach((e=>e.showChildMenu=!1)),n.value.buttons[e.newDraggableIndex].showChildMenu=!0},d=e=>{n.value.curSubActiveIndex=e.newDraggableIndex},D=()=>{n.value.init=!0,n.value.clickSubMenu=!0;let e=n.value.curActiveIndex;n.value.buttons[e].sub_button.push({name:"子菜单名称",url:"",url2:"",key:"",type:"link",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:""}),n.value.curSubActiveIndex=n.value.buttons[e].sub_button.length-1,n.value.buttons[e].hasChild=!0},P=()=>{n.value.curActiveIndex=null,n.value.curSubActiveIndex=null,n.value.init=!1};return f((()=>{n.value={curActiveIndex:0,curSubActiveIndex:null,clickSubMenu:!1,init:!0,buttons:[{name:"签到",hasChild:!1,showChildMenu:!0,type:"link",url:"",url2:"",key:"daily_sign",sub_button:[],keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template"},{name:"最近阅读",hasChild:!1,showChildMenu:!1,type:"event",url:"",url2:"",key:"recent_read",sub_button:[],keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template"},{name:"菜单名称3",hasChild:!0,showChildMenu:!1,type:"link",url:"",url2:"",key:"",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:"",sub_button:[{key:"",type:"link",name:"子菜单名称",url:"http://sitexyvz5mexll52mzn4.pre.aizhuishu.com/recent",url2:"",keyword:"",linkcontent:"",sendMsgType:"template",imgUrl:""}]}]}})),(e,h)=>{var p,f,j,X,R,Y,F;const L=I,B=Jt,V=T,U=A,$=k,H=M,z=O,W=N;return i(),l("div",Qt,[v("div",en,[v("div",tn,[v("div",nn,[v("div",on,[v("div",rn,[v("div",an,[v("div",ln,[m(L,{class:"ml-3"},{default:a((()=>[m(g(b))])),_:1}),y(" 公众号 "),m(L,{class:"mr-3"},{default:a((()=>[m(g(w))])),_:1})])]),v("div",sn,[m(B,{list:g(n).buttons,classString:"flex-warpper",onEnd:c},{default:a((({item:e,index:r})=>{var s;return[(i(),l("div",{class:"wechat-menu-item",key:r},[v("p",{class:x(["menu-name",{"cur-menu":r===g(n).curActiveIndex}]),onClick:e=>(e=>{n.value.init=!0,n.value.clickSubMenu=!1,n.value.curSubActiveIndex=null;let o=n.value.buttons;if(e===n.value.curActiveIndex)return;if(null!==n.value.curActiveIndex&&n.value.buttons[n.value.curActiveIndex]&&(n.value.buttons[n.value.curActiveIndex].showChildMenu=!1),n.value.curActiveIndex=e,o[e])return void(n.value.buttons[n.value.curActiveIndex]&&(n.value.buttons[n.value.curActiveIndex].showChildMenu=!0));if(o.length>=t.value)return;n.value.buttons.push({name:"菜单名称",hasChild:!1,showChildMenu:!0,type:"link",url:"",url2:"",key:"",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:"",sub_button:[]})})(r)},_(e.name),11,un),o(e)?(i(),l("div",cn,[m(B,{list:e.sub_button,onEnd:d},{default:a((({item:e,index:t})=>[(i(),l("div",{class:"children-menu-item",key:t,onClick:e=>{var o;(o=t)!==n.value.curSubActiveIndex&&(n.value.init=!0,n.value.clickSubMenu=!0,n.value.curSubActiveIndex=o)}},[v("p",{class:x(["menu-name",{"cur-name":g(n).curSubActiveIndex===t}])},_(e.name),3)],8,dn))])),_:2},1032,["list"]),(null==(s=null==e?void 0:e.sub_button)?void 0:s.length)<5?(i(),l("div",{key:0,class:"children-menu-item",onClick:D},[m(L,null,{default:a((()=>[m(g(S))])),_:1})])):E("",!0)])):E("",!0)]))]})),_:1},8,["list"])])])]),hn])]),v("div",pn,[g(n).init?(i(),l("div",fn,[v("div",vn,[v("p",mn,[y(_(g(n).clickSubMenu?null==(j=null==(f=null==(p=g(n))?void 0:p.buttons[g(n).curActiveIndex])?void 0:f.sub_button[g(n).curSubActiveIndex])?void 0:j.name:null==(R=null==(X=g(n))?void 0:X.buttons[g(n).curActiveIndex])?void 0:R.name)+" ",1),v("span",{class:"del-menu",onClick:h[0]||(h[0]=e=>(e=>{let t=n.value.curActiveIndex,o=n.value.curSubActiveIndex;C.confirm(e?"删除后“子菜单名称”菜单下设置的内容将被删除":"删除后“菜单名称”菜单下设置的内容将被删除","温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{e?(n.value.buttons[t].sub_button.splice(o,1),n.value.buttons[t].hasChild=n.value.buttons[t].sub_button.length>0,n.value.curSubActiveIndex=null,n.value.init=!1):(n.value.buttons.splice(t,1),n.value.buttons.length||(u.value=!0),P())})).catch((()=>{}))})(g(n).clickSubMenu))}," 删除"+_(g(n).clickSubMenu?"子菜单":"菜单"),1)]),g(n).buttons[g(n).curActiveIndex].hasChild&&!g(n).clickSubMenu?(i(),l("p",gn," 已添加子菜单,仅可设置菜单名称。 ")):E("",!0),v("div",bn,[g(n).clickSubMenu?(i(),l("div",yn,[m(z,{model:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[g(s)?(i(),r(U,{key:0,label:"子菜单名称",prop:"title"},{default:a((()=>[m(V,{modelValue:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].name,"onUpdate:modelValue":h[1]||(h[1]=e=>g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].name=e),style:{width:"260px"}},null,8,["modelValue"])])),_:1})):E("",!0),g(s)?(i(),r(U,{key:1,label:"子菜单内容"},{default:a((()=>[m(H,{modelValue:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].type,"onUpdate:modelValue":h[2]||(h[2]=e=>g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].type=e)},{default:a((()=>[m($,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m($,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m($,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})):E("",!0)])),_:1},8,["model"])])):(i(),l("div",wn,[m(z,{model:null==(F=g(n))?void 0:F.buttons[null==(Y=g(n))?void 0:Y.curActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[m(U,{label:"菜单名称",prop:"title"},{default:a((()=>[m(V,{modelValue:g(n).buttons[g(n).curActiveIndex].name,"onUpdate:modelValue":h[3]||(h[3]=e=>g(n).buttons[g(n).curActiveIndex].name=e),style:{width:"260px"},maxlength:10,placeholder:"请输入菜单名称(最多10个字符)"},null,8,["modelValue"]),xn])),_:1}),g(n).buttons[g(n).curActiveIndex].sub_button.length?E("",!0):(i(),l("div",_n,[m(U,{label:"菜单内容"},{default:a((()=>[m(H,{modelValue:g(n).buttons[g(n).curActiveIndex].type,"onUpdate:modelValue":h[4]||(h[4]=e=>g(n).buttons[g(n).curActiveIndex].type=e)},{default:a((()=>[m($,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m($,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m($,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})]))])),_:1},8,["model"])]))])])])):(i(),l("div",Sn,En))])]),v("div",Dn,[m(W,{type:"primary",disabled:g(u)},{default:a((()=>[y("保存")])),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-14d84d1b"]]);export{Cn as default};
|