@sankhyalabs/ezui 7.2.0-dev.1 → 7.2.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-grid.cjs.entry.js +42 -6
- package/dist/cjs/ez-popup.cjs.entry.js +0 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +97 -112
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +20 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/gridColumnDefaultWidths.js +23 -0
- package/dist/collection/components/ez-grid/utils/index.js +1 -0
- package/dist/collection/components/ez-popup/ez-popup.js +0 -1
- package/dist/custom-elements/index.js +138 -118
- package/dist/esm/ez-grid.entry.js +42 -6
- package/dist/esm/ez-popup.entry.js +0 -1
- package/dist/esm/ez-sortable-list.entry.js +97 -112
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-5a74d132.entry.js → p-bea06aae.entry.js} +1 -1
- package/dist/ezui/p-bf2a7f94.entry.js +7 -0
- package/dist/ezui/p-f969b65d.entry.js +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/gridColumnDefaultWidths.d.ts +4 -0
- package/dist/types/components/ez-grid/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ezui/p-b8078832.entry.js +0 -1
- package/dist/ezui/p-ce0a0036.entry.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,g as n}from"./p-23a36bb6.js";import{ArrayUtils as r}from"@sankhyalabs/core";import{i as o}from"./p-c178730b.js";
|
|
2
|
+
/**!
|
|
3
|
+
* Sortable 1.15.7
|
|
4
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
5
|
+
* @author owenm <owen23355@gmail.com>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},l.apply(null,arguments)}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function h(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)-1===e.indexOf(i=o[n])&&{}.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var v=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),m=f(/Edge/i),b=f(/firefox/i),p=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),g=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),y={capture:!1,passive:!1};function x(t,e,i){t.addEventListener(e,i,!v&&y)}function _(t,e,i){t.removeEventListener(e,i,!v&&y)}function E(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function z(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function k(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&E(t,e):E(t,e))||n&&t===i)return t;if(t===i)break}while(t=z(t))}return null}var S,I=/\s+/g;function D(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(I," ")}}function T(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=T(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function M(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function O(){return document.scrollingElement||document.documentElement}function A(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,h;if(t!==window&&t.parentNode&&t!==O()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!v))do{if(r&&r.getBoundingClientRect&&("none"!==T(r,"transform")||i&&"static"!==T(r,"position"))){var d=r.getBoundingClientRect();a-=d.top+parseInt(T(r,"border-top-width")),s-=d.left+parseInt(T(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(n&&t!==window){var f=C(r||t),m=f&&f.a,b=f&&f.d;f&&(l=(a/=b)+(c/=b),u=(s/=m)+(h/=m))}return{top:a,left:s,bottom:l,right:u,width:h,height:c}}}function j(t,e,i){for(var n=L(t,!0),r=A(t)[e];n;){var o=A(n)[i];if(!("top"===i||"left"===i?r>=o:r<=o))return n;if(n===O())break;n=L(n,!1)}return!1}function F(t,e,i,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ut.ghost&&(n||a[o]!==Ut.dragged)&&k(a[o],i.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function $(t,e){for(var i=t.lastElementChild;i&&(i===Ut.ghost||"none"===T(i,"display")||e&&!E(i,e));)i=i.previousElementSibling;return i||null}function B(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ut.clone||e&&!E(t,e)||i++;return i}function N(t){var e=0,i=0,n=O();if(t)do{var r=C(t);e+=t.scrollLeft*r.a,i+=t.scrollTop*r.d}while(t!==n&&(t=t.parentNode));return[e,i]}function L(t,e){if(!t||!t.getBoundingClientRect)return O();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=T(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return O();if(n||e)return i;n=!0}}}while(i=i.parentNode);return O()}function P(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function G(t,e){return function(){if(!S){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),S=setTimeout((function(){S=void 0}),e)}}}function H(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function K(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function R(t,e){T(t,"position","absolute"),T(t,"top",e.top),T(t,"left",e.left),T(t,"width",e.width),T(t,"height",e.height)}function U(t){T(t,"position",""),T(t,"top",""),T(t,"left",""),T(t,"width",""),T(t,"height","")}function W(t,e,i){var n={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(k(r,e.draggable,t,!1)&&!r.animated&&r!==i){var u=A(r);n.left=Math.min(null!==(o=n.left)&&void 0!==o?o:1/0,u.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,u.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,u.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Y="Sortable"+(new Date).getTime();var X=[],V={initializeByDefault:!0},Z={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);X.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";X.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](c({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](c({sortable:e},i)))}))},initializePlugins:function(t,e,i){for(var n in X.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,l(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var i={};return X.forEach((function(n){"function"==typeof n.eventProperties&&l(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return X.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function q(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,h=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,b=t.putSortable,p=t.extraEventProperties;if(e=e||i&&i[Y]){var g,w=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||v||m?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=s||i,g.item=r||i,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=b?b.lastPutMode:void 0;var x=c(c({},p),Z.getEventProperties(n,e));for(var _ in x)g[_]=x[_];i&&i.dispatchEvent(g),w[y]&&w[y].call(e,g)}}var J=["evt"],Q=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=h(i,J);Z.pluginEvent.bind(Ut)(t,e,c({dragEl:et,parentEl:it,ghostEl:nt,rootEl:rt,nextEl:ot,lastDownEl:at,cloneEl:st,cloneHidden:lt,dragStarted:xt,putSortable:vt,activeSortable:Ut.active,originalEvent:n,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt,hideGhostForTarget:Gt,unhideGhostForTarget:Ht,cloneNowHidden:function(){lt=!0},cloneNowShown:function(){lt=!1},dispatchSortableEvent:function(t){tt({sortable:e,name:t,originalEvent:n})}},r))};function tt(t){q(c({putSortable:vt,cloneEl:st,targetEl:et,rootEl:rt,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt},t))}var et,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,ft,vt,mt,bt,pt,gt,wt,yt,xt,_t,Et,zt,kt,St=!1,It=!1,Dt=[],Tt=!1,Ct=!1,Mt=[],Ot=!1,At=[],jt="undefined"!=typeof document,Ft=g,$t=m||v?"cssFloat":"float",Bt=jt&&!w&&!g&&"draggable"in document.createElement("div"),Nt=function(){if(jt){if(v)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var i=T(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=F(t,0,e),o=F(t,1,e),a=r&&T(r),s=o&&T(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&a.float&&"none"!==a.float?!o||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[$t]||o&&"none"===i[$t]&&l+u>n)?"vertical":"horizontal"},Pt=function(t){function e(t,i){return function(n,r,o,a){if(null==t&&(i||n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,a),i)(n,r,o,a);var s=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==d(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Gt=function(){!Nt&&nt&&T(nt,"display","none")},Ht=function(){!Nt&&nt&&T(nt,"display","")};jt&&!w&&document.addEventListener("click",(function(t){if(It)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),It=!1,!1}),!0);var Kt=function(t){if(et){var e=(r=(t=t.touches?t.touches[0]:t).clientX,o=t.clientY,Dt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!$(t)){var i=A(t);return r>=i.left-e&&r<=i.right+e&&o>=i.top-e&&o<=i.bottom+e?a=t:void 0}})),a);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var r,o,a},Rt=function(t){et&&et.parentNode[Y]._isOutsideThisEl(t.target)};function Ut(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=l({},e),t[Y]=this;var i,n,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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!==Ut.supportPointer&&"PointerEvent"in window&&(!p||g),emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,r),r)!(o in e)&&(e[o]=r[o]);for(var a in Pt(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Bt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?x(t,"pointerdown",this._onTapStart):(x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),l(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==T(t,"display")&&t!==Ut.ghost){n.push({target:t,rect:A(t)});var e=c({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof t&&t());var r=!1,o=0;n.forEach((function(t){var i=0,n=t.target,a=n.fromRect,s=A(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=C(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&P(l,s)&&!P(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(i=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,e.options)),P(s,a)||(n.prevFromRect=a,n.prevToRect=s,i||(i=e.options.animation),e.animate(n,c,s,i)),i&&(r=!0,o=Math.max(o,i),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),i),n.thisAnimationDuration=i)})),clearTimeout(i),r?i=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),n=[]},animate:function(t,e,i,n){if(n){T(t,"transition",""),T(t,"transform","");var r=C(this.el),o=(e.left-i.left)/(r&&r.a||1),a=(e.top-i.top)/(r&&r.d||1);t.animatingX=!!o,t.animatingY=!!a,T(t,"transform","translate3d("+o+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),T(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),T(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){T(t,"transition",""),T(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Wt(t,e,i,n,r,o,a,s){var l,u,c=t[Y],h=c.options.onMove;return!window.CustomEvent||v||m?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(u=h.call(c,l,a)),u}function Yt(t){t.draggable=!1}function Xt(){Ot=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Zt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(_t=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,et):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=n.filter;if(function(t){At.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&At.push(n)}}(i),!et&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=k(s,n.draggable,i,!1))&&s.animated||at===s)){if(ut=B(s),ht=B(s,n.draggable),"function"==typeof u){if(u.call(this,t,s,this))return tt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),Q("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=k(l,n.trim(),i,!1))return tt({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),Q("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());n.handle&&!k(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(i&&!et&&i.parentNode===o){var l=A(i);if(rt=o,it=(et=i).parentNode,ot=et.nextSibling,at=i,ft=a.group,Ut.dragged=et,wt=(mt={target:et,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,yt=mt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,et.style["will-change"]="all",n=function(){Q("delayEnded",r,{evt:t}),Ut.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(et.draggable=!0),r._triggerDragStart(t,e),tt({sortable:r,name:"choose",originalEvent:t}),D(et,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){M(et,t.trim(),Yt)})),x(s,"dragover",Kt),x(s,"mousemove",Kt),x(s,"touchmove",Kt),a.supportPointer?(x(s,"pointerup",r._onDrop),!this.nativeDraggable&&x(s,"pointercancel",r._onDrop)):(x(s,"mouseup",r._onDrop),x(s,"touchend",r._onDrop),x(s,"touchcancel",r._onDrop)),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,et.draggable=!0),Q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(m||v))n();else{if(Ut.eventCanceled)return void this._onDrop();a.supportPointer?(x(s,"pointerup",r._disableDelayedDrag),x(s,"pointercancel",r._disableDelayedDrag)):(x(s,"mouseup",r._disableDelayedDrag),x(s,"touchend",r._disableDelayedDrag),x(s,"touchcancel",r._disableDelayedDrag)),x(s,"mousemove",r._delayedDragTouchMoveHandler),x(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&x(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){et&&Yt(et),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"pointerup",this._disableDelayedDrag),_(t,"pointercancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?x(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(x(et,"dragend",this),x(rt,"dragstart",this._onDragStart));try{document.selection?Zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,rt&&et){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&x(document,"dragover",Rt);var i=this.options;!t&&D(et,i.dragClass,!1),D(et,i.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(bt){this._lastX=bt.clientX,this._lastY=bt.clientY,Gt();for(var t=document.elementFromPoint(bt.clientX,bt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(bt.clientX,bt.clientY))!==e;)e=t;if(et.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:bt.clientX,clientY:bt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=z(e));Ht()}},_onTouchMove:function(t){if(mt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=nt&&C(nt,!0),a=nt&&o&&o.a,s=nt&&o&&o.d,l=Ft&&kt&&N(kt),u=(r.clientX-mt.clientX+n.x)/(a||1)+(l?l[0]-Mt[0]:0)/(a||1),c=(r.clientY-mt.clientY+n.y)/(s||1)+(l?l[1]-Mt[1]:0)/(s||1);if(!Ut.active&&!St){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(nt){o?(o.e+=u-(pt||0),o.f+=c-(gt||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");T(nt,"webkitTransform",h),T(nt,"mozTransform",h),T(nt,"msTransform",h),T(nt,"transform",h),pt=u,gt=c,bt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!nt){var t=this.options.fallbackOnBody?document.body:rt,e=A(et,!0,Ft,!0,t),i=this.options;if(Ft){for(kt=t;"static"===T(kt,"position")&&"none"===T(kt,"transform")&&kt!==document;)kt=kt.parentNode;kt!==document.body&&kt!==document.documentElement?(kt===document&&(kt=O()),e.top+=kt.scrollTop,e.left+=kt.scrollLeft):kt=O(),Mt=N(kt)}D(nt=et.cloneNode(!0),i.ghostClass,!1),D(nt,i.fallbackClass,!0),D(nt,i.dragClass,!0),T(nt,"transition",""),T(nt,"transform",""),T(nt,"box-sizing","border-box"),T(nt,"margin",0),T(nt,"top",e.top),T(nt,"left",e.left),T(nt,"width",e.width),T(nt,"height",e.height),T(nt,"opacity","0.8"),T(nt,"position",Ft?"absolute":"fixed"),T(nt,"zIndex","100000"),T(nt,"pointerEvents","none"),Ut.ghost=nt,t.appendChild(nt),T(nt,"transform-origin",wt/parseInt(nt.style.width)*100+"% "+yt/parseInt(nt.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;Q("dragStart",this,{evt:t}),Ut.eventCanceled?this._onDrop():(Q("setupClone",this),Ut.eventCanceled||((st=K(et)).removeAttribute("id"),st.draggable=!1,st.style["will-change"]="",this._hideClone(),D(st,this.options.chosenClass,!1),Ut.clone=st),i.cloneId=Zt((function(){Q("clone",i),Ut.eventCanceled||(i.options.removeCloneOnHide||rt.insertBefore(st,et),i._hideClone(),tt({sortable:i,name:"clone"}))})),!e&&D(et,r.dragClass,!0),e?(It=!0,i._loopId=setInterval(i._emulateDragOver,50)):(_(document,"mouseup",i._onDrop),_(document,"touchend",i._onDrop),_(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,et)),x(document,"drop",i),T(et,"transform","translateZ(0)")),St=!0,i._dragStartId=Zt(i._dragStarted.bind(i,e,t)),x(document,"selectstart",i),xt=!0,window.getSelection().removeAllRanges(),p&&T(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,a=t.target,s=this.options,l=s.group,u=Ut.active,h=ft===l,d=s.sort,f=vt||u,v=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=k(a,s.draggable,o,!0),N("dragOver"),Ut.eventCanceled)return m;if(et.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return P(!1);if(It=!1,u&&!s.disabled&&(h?d||(n=it!==rt):vt===this||(this.lastPutMode=ft.checkPull(this,u,et,t))&&l.checkPut(this,u,et,t))){if(r="vertical"===this._getDirection(t,a),e=A(et),N("dragOverValid"),Ut.eventCanceled)return m;if(n)return it=rt,L(),this._hideClone(),N("revert"),Ut.eventCanceled||(ot?rt.insertBefore(et,ot):rt.appendChild(et)),P(!0);var b=$(o,s.draggable);if(!b||function(t,e,i){var n=A($(i.el,i.options.draggable)),r=W(i.el,i.options,nt);return e?t.clientX>r.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,r,this)&&!b.animated){if(b===et)return P(!1);if(b&&o===t.target&&(a=b),a&&(i=A(a)),!1!==Wt(rt,o,et,e,a,i,t,!!a))return L(),b&&b.nextSibling?o.insertBefore(et,b.nextSibling):o.appendChild(et),it=o,G(),P(!0)}else if(b&&function(t,e,i){var n=A(F(i.el,0,i.options,!0)),r=W(i.el,i.options,nt);return e?t.clientX<r.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var p=F(o,0,s,!0);if(p===et)return P(!1);if(i=A(a=p),!1!==Wt(rt,o,et,e,a,i,t,!1))return L(),o.insertBefore(et,p),it=o,G(),P(!0)}else if(a.parentNode===o){i=A(a);var g,w,y,x=et.parentNode!==o,_=!function(t,e,i){var n=i?t.left:t.top,r=i?e.left:e.top;return n===r||(i?t.right:t.bottom)===(i?e.right:e.bottom)||n+(i?t.width:t.height)/2===r+(i?e.width:e.height)/2}(et.animated&&et.toRect||e,a.animated&&a.toRect||i,r),E=r?"top":"left",z=j(a,"top","top")||j(et,"top","top"),S=z?z.scrollTop:void 0;if(_t!==a&&(w=i[E],Tt=!1,Ct=!_&&s.invertSwap||x),g=function(t,e,i,n,r,o,a,s){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!a)if(s&&zt<u*r){if(!Tt&&(1===Et?l>c+u*o/2:l<h-u*o/2)&&(Tt=!0),Tt)d=!0;else if(1===Et?l<c+zt:l>h-zt)return-Et}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return B(et)<B(t)?1:-1}(e);return(d=d||a)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(t,a,i,r,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,_t===a),0!==g){var I=B(et);do{y=it.children[I-=g]}while(y&&("none"===T(y,"display")||y===nt))}if(0===g||y===a)return P(!1);_t=a,Et=g;var C=a.nextElementSibling,M=!1,O=Wt(rt,o,et,e,a,i,t,M=1===g);if(!1!==O)return 1!==O&&-1!==O||(M=1===O),Ot=!0,setTimeout(Xt,30),L(),M&&!C?o.appendChild(et):a.parentNode.insertBefore(et,M?C:a),z&&H(z,0,S-z.scrollTop),it=et.parentNode,void 0===w||Ct||(zt=Math.abs(w-A(a)[E])),G(),P(!0)}if(o.contains(et))return P(!1)}return!1}function N(s,l){Q(s,v,c({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:f,target:a,completed:P,onMove:function(i,n){return Wt(rt,o,et,e,i,A(i),t,n)},changed:G},l))}function L(){N("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function P(e){return N("dragOverCompleted",{insertion:e}),e&&(h?u._hideClone():u._showClone(v),v!==f&&(D(et,vt?vt.options.ghostClass:u.options.ghostClass,!1),D(et,s.ghostClass,!0)),vt!==v&&v!==Ut.active?vt=v:v===Ut.active&&vt&&(vt=null),f===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){N("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===et&&!et.animated||a===o&&!a.animated)&&(_t=null),s.dragoverBubble||t.rootEl||a===document||(et.parentNode[Y]._isOutsideThisEl(t.target),!e&&Kt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function G(){ct=B(et),dt=B(et,s.draggable),tt({sortable:v,name:"change",toEl:o,newIndex:ct,newDraggableIndex:dt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Kt),_(document,"mousemove",Kt),_(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"pointercancel",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ct=B(et),dt=B(et,i.draggable),Q("drop",this,{evt:t}),it=et&&et.parentNode,ct=B(et),dt=B(et,i.draggable),Ut.eventCanceled||(St=!1,Ct=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&T(document.body,"user-select",""),T(et,"transform",""),t&&(xt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(rt===it||vt&&"clone"!==vt.lastPutMode)&&st&&st.parentNode&&st.parentNode.removeChild(st),et&&(this.nativeDraggable&&_(et,"dragend",this),Yt(et),et.style["will-change"]="",xt&&!St&&D(et,vt?vt.options.ghostClass:this.options.ghostClass,!1),D(et,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:it,newIndex:null,newDraggableIndex:null,originalEvent:t}),rt!==it?(ct>=0&&(tt({rootEl:it,name:"add",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"remove",toEl:it,originalEvent:t}),tt({rootEl:it,name:"sort",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),vt&&vt.save()):ct!==ut&&ct>=0&&(tt({sortable:this,name:"update",toEl:it,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),Ut.active&&(null!=ct&&-1!==ct||(ct=ut,dt=ht),tt({sortable:this,name:"end",toEl:it,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),rt=et=it=nt=ot=st=at=lt=mt=bt=xt=ct=dt=ut=ht=_t=Et=vt=ft=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null;var t=this.el;At.forEach((function(e){t.contains(e)&&(e.checked=!0)})),At.length=pt=gt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":et&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)k(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Vt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];k(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return k(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Z.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Pt(i)},destroy:function(){Q("destroy",this);var t=this.el;t[Y]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Dt.splice(Dt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lt){if(Q("hideClone",this),Ut.eventCanceled)return;T(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),lt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lt){if(Q("showClone",this),Ut.eventCanceled)return;et.parentNode!=rt||this.options.group.revertClone?ot?rt.insertBefore(st,ot):rt.appendChild(st):rt.insertBefore(st,et),this.options.group.revertClone&&this.animate(et,st),T(st,"display",""),lt=!1}}else this._hideClone()}},jt&&x(document,"touchmove",(function(t){(Ut.active||St)&&t.cancelable&&t.preventDefault()})),Ut.utils={on:x,off:_,css:T,find:M,is:function(t,e){return!!k(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:G,closest:k,toggleClass:D,clone:K,index:B,nextTick:Zt,cancelNextTick:qt,detectDirection:Lt,getChild:F,expando:Y},Ut.get=function(t){return t[Y]},Ut.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ut.utils=c(c({},Ut.utils),t.utils)),Z.mount(t)}))},Ut.create=function(t,e){return new Ut(t,e)},Ut.version="1.15.7";var Jt,Qt,te,ee,ie,ne,re=[],oe=!1;function ae(){re.forEach((function(t){clearInterval(t.pid)})),re=[]}function se(){clearInterval(ne)}var le=G((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=O(),c=!1;Qt!==i&&(Qt=i,ae(),r=e.scrollFn,!0===(Jt=e.scroll)&&(Jt=L(i,!0)));var h=0,d=Jt;do{var f=d,v=A(f),m=v.top,b=v.bottom,p=v.left,g=v.right,w=v.width,y=v.height,x=void 0,_=void 0,E=f.scrollWidth,z=f.scrollHeight,k=T(f),S=f.scrollLeft,I=f.scrollTop;f===u?(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=x&&(Math.abs(g-o)<=s&&S+w<E)-(Math.abs(p-o)<=s&&!!S),C=_&&(Math.abs(b-a)<=s&&I+y<z)-(Math.abs(m-a)<=s&&!!I);if(!re[h])for(var M=0;M<=h;M++)re[M]||(re[M]={});re[h].vx==D&&re[h].vy==C&&re[h].el===f||(re[h].el=f,re[h].vx=D,re[h].vy=C,clearInterval(re[h].pid),0==D&&0==C||(c=!0,re[h].pid=setInterval(function(){n&&0===this.layer&&Ut.active._onTouchMove(ie);var e=re[this.layer].vy?re[this.layer].vy*l:0,i=re[this.layer].vx?re[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Ut.dragged.parentNode[Y],i,e,t,ie,re[this.layer].el)||H(re[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=L(d,!1)));oe=c}}),30),ue=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.dispatchSortableEvent,o=t.unhideGhostForTarget;if(e){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(s.clientX,s.clientY);o(),a&&!a.el.contains(l)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ce(){}function he(){}ce.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=F(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:ue},l(ce,{pluginName:"revertOnSpill"}),he.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:ue},l(he,{pluginName:"removeOnSpill"});var de,fe,ve,me,be,pe=[],ge=[],we=!1,ye=!1,xe=!1;function _e(t,e){ge.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function Ee(){pe.forEach((function(t){t!==ve&&t.parentNode&&t.parentNode.removeChild(t)}))}Ut.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):x(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),se(),ae(),clearTimeout(S),S=void 0},nulling:function(){ie=Qt=Jt=oe=ne=te=ee=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(ie=t,e||this.options.forceAutoScrollFallback||m||v||p){le(t,this.options,o,e);var a=L(o,!0);!oe||ne&&n===te&&r===ee||(ne&&se(),ne=setInterval((function(){var o=L(document.elementFromPoint(n,r),!0);o!==a&&(a=o,ae()),le(t,i.options,o,e)}),10),te=n,ee=r)}else{if(!this.options.bubbleScroll||L(o,!0)===O())return void ae();le(t,this.options,L(o,!1),!1)}}},l(t,{pluginName:"scroll",initializeByDefault:!0})}),Ut.mount(he,ce),Ut.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?x(document,"pointerup",this._deselectMultiDrag):(x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag))),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";pe.length&&fe===t?pe.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){ve=t.dragEl},delayEnded:function(){this.isMultiDrag=~pe.indexOf(ve)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<pe.length;n++)ge.push(K(pe[n])),ge[n].sortableIndex=pe[n].sortableIndex,ge[n].draggable=!1,ge[n].style["will-change"]="",D(ge[n],this.options.selectedClass,!1),pe[n]===ve&&D(ge[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&fe===t.sortable&&(_e(!0,t.rootEl),e("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,i=t.cancel;this.isMultiDrag&&(_e(!1,t.rootEl),ge.forEach((function(t){T(t,"display","")})),e(),be=!1,i())},hideClone:function(t){var e=this,i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){T(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),be=!0,n())},dragStartGlobal:function(){!this.isMultiDrag&&fe&&fe.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=B(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),xe=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==ve&&T(t,"position","absolute")}));var n=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&R(t,n)})),ye=!0,we=!0}i.animateAll((function(){ye=!1,we=!1,e.options.animation&&pe.forEach((function(t){U(t)})),e.options.sort&&Ee()}))}},dragOver:function(t){var e=t.completed,i=t.cancel;ye&&~pe.indexOf(t.target)&&(e(!1),i())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;pe.length>1&&(pe.forEach((function(t){n.addAnimationState({target:t,rect:ye?A(t):r}),U(t),t.fromRect=r,e.removeAnimationState(t)})),ye=!1,function(t,e){pe.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.activeSortable,r=t.parentEl,o=t.putSortable,a=this.options;if(t.insertion){if(i&&n._hideClone(),we=!1,a.animation&&pe.length>1&&(ye||!i&&!n.options.sort&&!o)){var s=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&(R(t,s),r.appendChild(t))})),ye=!0}if(!i)if(ye||Ee(),pe.length>1){var l=be;n._showClone(e),n.options.animation&&!be&&l&&ge.forEach((function(t){n.addAnimationState({target:t,rect:me}),t.fromRect=me,t.thisAnimationDuration=null}))}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){me=l({},e);var r=C(ve,!0);me.top-=r.f,me.left-=r.e}},dragOverAnimationComplete:function(){ye&&(ye=!1,Ee())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var u=this.options,c=n.children;if(!xe)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(ve,u.selectedClass,!~pe.indexOf(ve)),~pe.indexOf(ve))pe.splice(pe.indexOf(ve),1),de=null,q({sortable:r,rootEl:i,name:"deselect",targetEl:ve,originalEvent:e});else{if(pe.push(ve),q({sortable:r,rootEl:i,name:"select",targetEl:ve,originalEvent:e}),e.shiftKey&&de&&r.el.contains(de)){var h=B(de),d=B(ve);~h&&~d&&h!==d&&function(){var t,o;d>h?(o=h,t=d):(o=d,t=h+1);for(var a=u.filter;o<t;o++)~pe.indexOf(c[o])||k(c[o],u.draggable,n,!1)&&(a&&("function"==typeof a?a.call(r,e,c[o],r):a.split(",").some((function(t){return k(c[o],t.trim(),n,!1)})))||(D(c[o],u.selectedClass,!0),pe.push(c[o]),q({sortable:r,rootEl:i,name:"select",targetEl:c[o],originalEvent:e})))}()}else de=ve;fe=l}if(xe&&this.isMultiDrag){if(ye=!1,(n[Y].options.sort||n!==i)&&pe.length>1){var f=A(ve),v=B(ve,":not(."+this.options.selectedClass+")");if(!we&&u.animation&&(ve.thisAnimationDuration=null),l.captureAnimationState(),!we&&(u.animation&&(ve.fromRect=f,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==ve){var e=ye?A(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),Ee(),pe.forEach((function(t){c[v]?n.insertBefore(t,c[v]):n.appendChild(t),v++})),a===B(ve))){var m=!1;pe.forEach((function(t){t.sortableIndex===B(t)||(m=!0)})),m&&(o("update"),o("sort"))}pe.forEach((function(t){U(t)})),l.animateAll()}fe=l}(i===n||s&&"clone"!==s.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=xe=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),_(document,"pointerup",this._deselectMultiDrag),_(document,"mouseup",this._deselectMultiDrag),_(document,"touchend",this._deselectMultiDrag),_(document,"keydown",this._checkKeyDown),_(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==xe&&xe||fe!==this.sortable||t&&k(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];D(e,this.options.selectedClass,!1),pe.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(fe&&fe!==e&&(fe.multiDrag._deselectMultiDrag(),fe=e),D(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[Y],i=pe.indexOf(t);e&&e.options.multiDrag&&~i&&(D(t,e.options.selectedClass,!1),pe.splice(i,1))}},eventProperties:function(){var t,e=this,i=[],n=[];return pe.forEach((function(t){var r;i.push({multiDragElement:t,index:t.sortableIndex}),r=ye&&t!==ve?-1:ye?B(t,":not(."+e.options.selectedClass+")"):B(t),n.push({multiDragElement:t,index:r})})),{items:(t=pe,function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ge),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const ze=class{constructor(i){t(this,i),this.itemsReordered=e(this,"itemsReordered",7),this.ezSelectItens=e(this,"ezSelectItens",7),this.ezDoubleClick=e(this,"ezDoubleClick",7),this.ezChoose=e(this,"ezChoose",7),this.filterTerm="",this.title=void 0,this.hideHeader=!1,this.hideTotalizer=!1,this.group="default",this.dataSource=[],this.idSortableList="DEFAULT_LIST",this.entityLabel=void 0,this.entityLabelPlural=void 0,this.emptyMessage=void 0,this.hoverFeedback=!0,this.enableMultipleSelection=!1,this.removeItensMoved=!1,this.itemRightSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.selectedItems=new Set}async clearSelection(){this.selectedItems.clear(),this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(Ut.utils.deselect(i),t.selected=!1)})),this.ezSelectItens.emit([])}async componentWillLoad(){this.i18n=await o(),this.emptyMessage=this.i18n("ez-sortable-list.emptyMessage"),this.entityLabel=this.i18n("ez-sortable-list.entityLabel"),this.entityLabelPlural=this.i18n("ez-sortable-list.entityLabelPlural")}componentDidLoad(){this.initSortable()}componentDidRender(){this.selectPredefinedItens()}initSortable(){this._sortableInstance&&this._sortableInstance.destroy(),this._sortableInstance=new Ut(this.el.shadowRoot.querySelector(`#${this.idSortableList}`),{group:{name:this.group,pull:!0,put:!0},ghostClass:"ghost",dragClass:"dragging",animation:15,multiDrag:this.enableMultipleSelection,avoidImplicitDeselect:this.enableMultipleSelection,selectedClass:"selected",filter:".filtered",swapThreshold:.5,multiDragKey:"Control",removeCloneOnHide:!0,onEnd:t=>this.handleReorderEvent(t),onSelect:t=>this.handleSelect(t),onDeselect:t=>this.handleDeselect(t),onSort:t=>this.handleSortItem(t),onChoose:t=>this.ezChoose.emit(t)})}selectPredefinedItens(){this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(this.selectedItems.has(t.id)||!0===t.selected?Ut.utils.select(i):Ut.utils.deselect(i))}))}handleSortItem(t){var e;if(!this.removeItensMoved)return;const i=t.from.getAttribute("id");t.to.getAttribute("id")!==i?((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).forEach((t=>t.remove())):t.items=this.removeDuplicateElements(t.items)}removeDuplicateElements(t){const e=new Set;return t.filter((t=>{const i=t.getAttribute("data-key");if(i){if(e.has(i))return t.remove(),!1;e.add(i)}return!0}))}handleSelect(t){this.updateSelection(t.item,!0)}handleDeselect(t){this.updateSelection(t.item,!1)}updateSelection(t,e){const i=t.getAttribute("data-key");if(!i)return;const n=this.dataSource.find((t=>t.id===i));n&&(n.selected=e,e?this.selectedItems.add(i):this.selectedItems.delete(i),this.emitSelectedItems())}emitSelectedItems(){this.ezSelectItens.emit(Array.from(this.selectedItems).map((t=>this.dataSource.find((e=>e.id===t)))).filter(Boolean))}handleReorderEvent(t){var e;const i=((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).map((t=>t.getAttribute("data-key"))).filter(Boolean);this.itemsReordered.emit({dataSource:this.dataSource,selectItens:i,from:t.from,to:t.to,newIndex:t.newIndex,newIndicies:t.newIndicies})}handleDoubleClick(t){var e;const i=this.dataSource.find((e=>e.id===t));i&&(null===(e=this.ezDoubleClick)||void 0===e||e.emit(i))}getContainerItemBuilder(t,e,n){var r,o;const a="left"===t?null===(r=this.itemLeftSlotBuilder)||void 0===r?void 0:r.call(this,e):null===(o=this.itemRightSlotBuilder)||void 0===o?void 0:o.call(this,e);if(null!=a)return"string"!=typeof a?i("div",{class:n},a):i("div",{class:n,innerHTML:a})}disconnectedCallback(){this._sortableInstance&&(this._sortableInstance.destroy(),this._sortableInstance=null)}buildTotalizer(){return`${this.i18n("ez-sortable-list.total")} ${this.dataSource.length} ${1===this.dataSource.length?this.entityLabel:this.entityLabelPlural}`}renderItems(){return r.applyStringFilter(this.filterTerm,this.dataSource).map((t=>i("div",{id:`ID_${t.id}`,key:`KEY_${t.id}`,class:{"sortable-item":!0,"hover-feedback":this.hoverFeedback},"data-key":t.id,onDblClick:()=>this.handleDoubleClick(t.id)},!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),i("div",{class:"item-content"},i("span",{class:"draggable-icon"}),t.label),!!this.itemRightSlotBuilder&&this.getContainerItemBuilder("right",t))))}handleFilterChanged(t){t.stopPropagation(),t.preventDefault(),this.filterTerm=t.detail}renderTotalizer(){if(!this.hideTotalizer)return i("div",{class:"sortable-totalizer"},this.buildTotalizer())}renderHeader(){if(!this.hideHeader)return i("div",{class:"sortable-header"},i("span",{class:"sortable-label"},this.title),i("ez-filter-input",{label:`${this.i18n("ez-sortable-list.search")} ${this.entityLabel}`,mode:"slim",onEzChange:t=>this.handleFilterChanged(t)}))}render(){return i("div",{class:"sortable-content"},this.renderHeader(),i("div",{class:`sortable-list ${this.dataSource.length<1?"empty-content":""} list-scroller--fix`,"data-content":this.emptyMessage,style:{"--empty-content":`"${this.emptyMessage}"`},id:this.idSortableList,key:this.idSortableList},this.renderItems()),this.renderTotalizer())}get el(){return n(this)}};ze.style=':host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, "Roboto");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:290px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}';export{ze as ez_sortable_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as o,H as e,g as l}from"./p-23a36bb6.js";import{KeyboardManager as s,FloatingManager as n}from"@sankhyalabs/core";import{i as a}from"./p-c178730b.js";const p=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this.ezPopupAction=i(this,"ezPopupAction",7),this.handleFooterSlotChange=t=>{this._hasFooterSlotContent=t.target.assignedElements().length>0},this._hasFooterSlotContent=!1,this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0,this.enabledScroll=!0,this.autoClose=!0,this.footerButtons=[]}observeConfig(){this.manageOverflow()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){this.popUpFocus(),this._keyboardManager=new s({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezPopupAction.emit.bind("OK")).bind("Escape",(()=>this.closePopup())).bind("Esc",(()=>this.closePopup()))}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}closePopup(){this.opened=!1,this.manageOverflow(),this.ezClosePopup.emit()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=n.subscribeOverlayControl(this._popupRef):n.unsubscribeOverlayControl(this._popupRef||this._overlayId)}popUpFocus(){this.opened&&this._popupRef&&this._popupRef.focus()}getGridSize(){var t;const i={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small",auto:""};return this.size&&i.hasOwnProperty(this.size)&&null!==(t=i[this.size])&&void 0!==t?t:i.medium}getDialogClass(){let t="popup__container";return"auto"===this.heightMode&&(t+=" popup__container--auto"),t+=` ${this.getGridSize()}`,t}componentDidRender(){this.manageOverlay()}handleAutoClose(t){if(!this.opened||!this._popupRef||!this.autoClose)return;if(this._popupRef.contains(t.target))return;const i=this._popupRef.querySelector("slot");if(i&&i.assignedElements().length>0){const o=i.assignedElements();for(const i of o)if(i.contains(t.target))return}this._popupRef.shadowRoot&&this._popupRef.shadowRoot.contains(t.target)||this.closePopup()}handleDefaultPropsButtonsByIndex(t){switch(t){case 0:return{label:this.i18n?this.i18n("app.confirm"):"Confirmar",variant:"primary",size:"small",onClick:()=>{this.closePopup(),this.ezPopupAction.emit("OK")}};case 1:return{label:this.i18n?this.i18n("app.cancel"):"Cancelar",variant:"secondary",size:"small",onClick:()=>{this.closePopup()}};case 2:return{label:this.i18n?this.i18n("app.close"):"Fechar",variant:"tertiary",size:"small",onClick:()=>{this.closePopup()}}}}renderFooterButtons(){return this.footerButtons.slice(0,3).map(((t,i)=>o("ez-button",Object.assign({key:i},this.handleDefaultPropsButtonsByIndex(i),t))))}render(){return o(e,null,this.opened&&o("div",{class:"overlay",tabIndex:-1,onClick:this.handleAutoClose.bind(this)},o("dialog",{ref:t=>this._popupRef=t,class:this.getDialogClass()},this.useHeader&&o("header",{class:"popup__header"},!!this.ezTitle&&o("h1",{class:"popup__title"},this.ezTitle),o("ez-button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",variant:"tertiary",mode:"icon",iconName:"close",size:"small",onClick:this.closePopup.bind(this)})),o("main",{class:{"popup__expandable-content":!0,"popup__overflow-y--auto":this.enabledScroll}},o("slot",null)),o("footer",{class:{popup__footer:!0,"popup_margin-top":this.footerButtons.length>0||this._hasFooterSlotContent}},this.footerButtons.length>0&&this.renderFooterButtons(),o("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange})))))}get _element(){return l(this)}static get watchers(){return{opened:["observeConfig"]}}};p.style=':host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, "Roboto");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:auto;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{flex-grow:1;box-sizing:border-box;width:100%;font-family:var(--font--pattern, "Roboto");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400)}.popup__header{flex-shrink:0;width:100%;display:flex;align-items:center;margin-bottom:var(--space--16, 16px)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{flex-shrink:0;display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.popup_margin-top{margin-top:var(--space--16, 16px)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{p as ez_popup}
|
|
@@ -153,6 +153,8 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
153
153
|
resetPaginationState(): void;
|
|
154
154
|
stopEdit(): void;
|
|
155
155
|
private getColumnWidth;
|
|
156
|
+
private getInitialColumnWidth;
|
|
157
|
+
private getDefaultWidthByUserInterface;
|
|
156
158
|
private getColumnWidthByLabel;
|
|
157
159
|
private getCodeColFromDescriptionCol;
|
|
158
160
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as e,g as l}from"./p-23a36bb6.js";import{KeyboardManager as s,FloatingManager as n}from"@sankhyalabs/core";import{i as a}from"./p-c178730b.js";const p=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this.ezPopupAction=i(this,"ezPopupAction",7),this.handleFooterSlotChange=t=>{this._hasFooterSlotContent=t.target.assignedElements().length>0},this._hasFooterSlotContent=!1,this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0,this.enabledScroll=!0,this.autoClose=!0,this.footerButtons=[]}observeConfig(){this.manageOverflow()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){this.popUpFocus(),this._keyboardManager=new s({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezPopupAction.emit.bind("OK")).bind("Escape",(()=>this.closePopup())).bind("Esc",(()=>this.closePopup()))}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}closePopup(){this.opened=!1,this.manageOverflow(),this.ezClosePopup.emit()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=n.subscribeOverlayControl(this._popupRef):n.unsubscribeOverlayControl(this._popupRef||this._overlayId)}popUpFocus(){this.opened&&this._popupRef&&this._popupRef.focus()}getGridSize(){var t;const i={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small",auto:""};return this.size&&i.hasOwnProperty(this.size)&&null!==(t=i[this.size])&&void 0!==t?t:i.medium}getDialogClass(){let t="popup__container";return"auto"===this.heightMode&&(t+=" popup__container--auto"),t+=` ${this.getGridSize()}`,t}componentDidRender(){this.manageOverlay(),this.popUpFocus()}handleAutoClose(t){if(!this.opened||!this._popupRef||!this.autoClose)return;if(this._popupRef.contains(t.target))return;const i=this._popupRef.querySelector("slot");if(i&&i.assignedElements().length>0){const o=i.assignedElements();for(const i of o)if(i.contains(t.target))return}this._popupRef.shadowRoot&&this._popupRef.shadowRoot.contains(t.target)||this.closePopup()}handleDefaultPropsButtonsByIndex(t){switch(t){case 0:return{label:this.i18n?this.i18n("app.confirm"):"Confirmar",variant:"primary",size:"small",onClick:()=>{this.closePopup(),this.ezPopupAction.emit("OK")}};case 1:return{label:this.i18n?this.i18n("app.cancel"):"Cancelar",variant:"secondary",size:"small",onClick:()=>{this.closePopup()}};case 2:return{label:this.i18n?this.i18n("app.close"):"Fechar",variant:"tertiary",size:"small",onClick:()=>{this.closePopup()}}}}renderFooterButtons(){return this.footerButtons.slice(0,3).map(((t,i)=>o("ez-button",Object.assign({key:i},this.handleDefaultPropsButtonsByIndex(i),t))))}render(){return o(e,null,this.opened&&o("div",{class:"overlay",tabIndex:-1,onClick:this.handleAutoClose.bind(this)},o("dialog",{ref:t=>this._popupRef=t,class:this.getDialogClass()},this.useHeader&&o("header",{class:"popup__header"},!!this.ezTitle&&o("h1",{class:"popup__title"},this.ezTitle),o("ez-button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",variant:"tertiary",mode:"icon",iconName:"close",size:"small",onClick:this.closePopup.bind(this)})),o("main",{class:{"popup__expandable-content":!0,"popup__overflow-y--auto":this.enabledScroll}},o("slot",null)),o("footer",{class:{popup__footer:!0,"popup_margin-top":this.footerButtons.length>0||this._hasFooterSlotContent}},this.footerButtons.length>0&&this.renderFooterButtons(),o("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange})))))}get _element(){return l(this)}static get watchers(){return{opened:["observeConfig"]}}};p.style=':host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, "Roboto");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:auto;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{flex-grow:1;box-sizing:border-box;width:100%;font-family:var(--font--pattern, "Roboto");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400)}.popup__header{flex-shrink:0;width:100%;display:flex;align-items:center;margin-bottom:var(--space--16, 16px)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{flex-shrink:0;display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.popup_margin-top{margin-top:var(--space--16, 16px)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{p as ez_popup}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as n}from"./p-23a36bb6.js";import{ArrayUtils as r}from"@sankhyalabs/core";import{i as o}from"./p-c178730b.js";
|
|
2
|
-
/**!
|
|
3
|
-
* Sortable 1.15.6
|
|
4
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
5
|
-
* @author owenm <owen23355@gmail.com>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},c.apply(this,arguments)}function h(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function f(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var v=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),m=f(/Edge/i),b=f(/firefox/i),p=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),g=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),y={capture:!1,passive:!1};function x(t,e,i){t.addEventListener(e,i,!v&&y)}function _(t,e,i){t.removeEventListener(e,i,!v&&y)}function E(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function z(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function k(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&E(t,e):E(t,e))||n&&t===i)return t;if(t===i)break}while(t=z(t))}return null}var S,I=/\s+/g;function D(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(I," ")}}function T(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=T(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function O(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function M(){return document.scrollingElement||document.documentElement}function A(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,h;if(t!==window&&t.parentNode&&t!==M()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!v))do{if(r&&r.getBoundingClientRect&&("none"!==T(r,"transform")||i&&"static"!==T(r,"position"))){var d=r.getBoundingClientRect();a-=d.top+parseInt(T(r,"border-top-width")),s-=d.left+parseInt(T(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(n&&t!==window){var f=C(r||t),m=f&&f.a,b=f&&f.d;f&&(l=(a/=b)+(c/=b),u=(s/=m)+(h/=m))}return{top:a,left:s,bottom:l,right:u,width:h,height:c}}}function j(t,e,i){for(var n=L(t,!0),r=A(t)[e];n;){var o=A(n)[i];if(!("top"===i||"left"===i?r>=o:r<=o))return n;if(n===M())break;n=L(n,!1)}return!1}function F(t,e,i,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ut.ghost&&(n||a[o]!==Ut.dragged)&&k(a[o],i.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function $(t,e){for(var i=t.lastElementChild;i&&(i===Ut.ghost||"none"===T(i,"display")||e&&!E(i,e));)i=i.previousElementSibling;return i||null}function B(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ut.clone||e&&!E(t,e)||i++;return i}function N(t){var e=0,i=0,n=M();if(t)do{var r=C(t);e+=t.scrollLeft*r.a,i+=t.scrollTop*r.d}while(t!==n&&(t=t.parentNode));return[e,i]}function L(t,e){if(!t||!t.getBoundingClientRect)return M();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=T(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return M();if(n||e)return i;n=!0}}}while(i=i.parentNode);return M()}function P(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function G(t,e){return function(){if(!S){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),S=setTimeout((function(){S=void 0}),e)}}}function H(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function K(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function R(t,e){T(t,"position","absolute"),T(t,"top",e.top),T(t,"left",e.left),T(t,"width",e.width),T(t,"height",e.height)}function U(t){T(t,"position",""),T(t,"top",""),T(t,"left",""),T(t,"width",""),T(t,"height","")}function W(t,e,i){var n={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(k(r,e.draggable,t,!1)&&!r.animated&&r!==i){var u=A(r);n.left=Math.min(null!==(o=n.left)&&void 0!==o?o:1/0,u.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,u.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,u.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Y="Sortable"+(new Date).getTime();var X=[],V={initializeByDefault:!0},Z={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);X.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";X.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](s({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](s({sortable:e},i)))}))},initializePlugins:function(t,e,i){for(var n in X.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,c(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var i={};return X.forEach((function(n){"function"==typeof n.eventProperties&&c(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return X.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function q(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,a=t.toEl,l=t.fromEl,u=t.oldIndex,c=t.newIndex,h=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,b=t.putSortable,p=t.extraEventProperties;if(e=e||i&&i[Y]){var g,w=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||v||m?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=l||i,g.item=r||i,g.clone=o,g.oldIndex=u,g.newIndex=c,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=b?b.lastPutMode:void 0;var x=s(s({},p),Z.getEventProperties(n,e));for(var _ in x)g[_]=x[_];i&&i.dispatchEvent(g),w[y]&&w[y].call(e,g)}}var J=["evt"],Q=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=h(i,J);Z.pluginEvent.bind(Ut)(t,e,s({dragEl:et,parentEl:it,ghostEl:nt,rootEl:rt,nextEl:ot,lastDownEl:at,cloneEl:st,cloneHidden:lt,dragStarted:xt,putSortable:vt,activeSortable:Ut.active,originalEvent:n,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt,hideGhostForTarget:Gt,unhideGhostForTarget:Ht,cloneNowHidden:function(){lt=!0},cloneNowShown:function(){lt=!1},dispatchSortableEvent:function(t){tt({sortable:e,name:t,originalEvent:n})}},r))};function tt(t){q(s({putSortable:vt,cloneEl:st,targetEl:et,rootEl:rt,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt},t))}var et,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,ft,vt,mt,bt,pt,gt,wt,yt,xt,_t,Et,zt,kt,St=!1,It=!1,Dt=[],Tt=!1,Ct=!1,Ot=[],Mt=!1,At=[],jt="undefined"!=typeof document,Ft=g,$t=m||v?"cssFloat":"float",Bt=jt&&!w&&!g&&"draggable"in document.createElement("div"),Nt=function(){if(jt){if(v)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var i=T(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=F(t,0,e),o=F(t,1,e),a=r&&T(r),s=o&&T(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&a.float&&"none"!==a.float?!o||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[$t]||o&&"none"===i[$t]&&l+u>n)?"vertical":"horizontal"},Pt=function(t){function e(t,i){return function(n,r,o,a){if(null==t&&(i||n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,a),i)(n,r,o,a);var s=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==l(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Gt=function(){!Nt&&nt&&T(nt,"display","none")},Ht=function(){!Nt&&nt&&T(nt,"display","")};jt&&!w&&document.addEventListener("click",(function(t){if(It)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),It=!1,!1}),!0);var Kt=function(t){if(et){var e=(r=(t=t.touches?t.touches[0]:t).clientX,o=t.clientY,Dt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!$(t)){var i=A(t);return r>=i.left-e&&r<=i.right+e&&o>=i.top-e&&o<=i.bottom+e?a=t:void 0}})),a);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var r,o,a},Rt=function(t){et&&et.parentNode[Y]._isOutsideThisEl(t.target)};function Ut(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=c({},e),t[Y]=this;var i,n,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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!==Ut.supportPointer&&"PointerEvent"in window&&(!p||g),emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,r),r)!(o in e)&&(e[o]=r[o]);for(var a in Pt(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Bt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?x(t,"pointerdown",this._onTapStart):(x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),c(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==T(t,"display")&&t!==Ut.ghost){n.push({target:t,rect:A(t)});var e=s({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof t&&t());var r=!1,o=0;n.forEach((function(t){var i=0,n=t.target,a=n.fromRect,s=A(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=C(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&P(l,s)&&!P(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(i=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,e.options)),P(s,a)||(n.prevFromRect=a,n.prevToRect=s,i||(i=e.options.animation),e.animate(n,c,s,i)),i&&(r=!0,o=Math.max(o,i),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),i),n.thisAnimationDuration=i)})),clearTimeout(i),r?i=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),n=[]},animate:function(t,e,i,n){if(n){T(t,"transition",""),T(t,"transform","");var r=C(this.el),o=(e.left-i.left)/(r&&r.a||1),a=(e.top-i.top)/(r&&r.d||1);t.animatingX=!!o,t.animatingY=!!a,T(t,"transform","translate3d("+o+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),T(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),T(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){T(t,"transition",""),T(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Wt(t,e,i,n,r,o,a,s){var l,u,c=t[Y],h=c.options.onMove;return!window.CustomEvent||v||m?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(u=h.call(c,l,a)),u}function Yt(t){t.draggable=!1}function Xt(){Mt=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Zt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(_t=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,et):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=n.filter;if(function(t){At.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&At.push(n)}}(i),!et&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=k(s,n.draggable,i,!1))&&s.animated||at===s)){if(ut=B(s),ht=B(s,n.draggable),"function"==typeof u){if(u.call(this,t,s,this))return tt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),Q("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=k(l,n.trim(),i,!1))return tt({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),Q("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());n.handle&&!k(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(i&&!et&&i.parentNode===o){var l=A(i);if(rt=o,it=(et=i).parentNode,ot=et.nextSibling,at=i,ft=a.group,Ut.dragged=et,wt=(mt={target:et,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,yt=mt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,et.style["will-change"]="all",n=function(){Q("delayEnded",r,{evt:t}),Ut.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(et.draggable=!0),r._triggerDragStart(t,e),tt({sortable:r,name:"choose",originalEvent:t}),D(et,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){O(et,t.trim(),Yt)})),x(s,"dragover",Kt),x(s,"mousemove",Kt),x(s,"touchmove",Kt),a.supportPointer?(x(s,"pointerup",r._onDrop),!this.nativeDraggable&&x(s,"pointercancel",r._onDrop)):(x(s,"mouseup",r._onDrop),x(s,"touchend",r._onDrop),x(s,"touchcancel",r._onDrop)),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,et.draggable=!0),Q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(m||v))n();else{if(Ut.eventCanceled)return void this._onDrop();a.supportPointer?(x(s,"pointerup",r._disableDelayedDrag),x(s,"pointercancel",r._disableDelayedDrag)):(x(s,"mouseup",r._disableDelayedDrag),x(s,"touchend",r._disableDelayedDrag),x(s,"touchcancel",r._disableDelayedDrag)),x(s,"mousemove",r._delayedDragTouchMoveHandler),x(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&x(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){et&&Yt(et),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"pointerup",this._disableDelayedDrag),_(t,"pointercancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?x(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(x(et,"dragend",this),x(rt,"dragstart",this._onDragStart));try{document.selection?Zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,rt&&et){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&x(document,"dragover",Rt);var i=this.options;!t&&D(et,i.dragClass,!1),D(et,i.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(bt){this._lastX=bt.clientX,this._lastY=bt.clientY,Gt();for(var t=document.elementFromPoint(bt.clientX,bt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(bt.clientX,bt.clientY))!==e;)e=t;if(et.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:bt.clientX,clientY:bt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=z(e));Ht()}},_onTouchMove:function(t){if(mt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=nt&&C(nt,!0),a=nt&&o&&o.a,s=nt&&o&&o.d,l=Ft&&kt&&N(kt),u=(r.clientX-mt.clientX+n.x)/(a||1)+(l?l[0]-Ot[0]:0)/(a||1),c=(r.clientY-mt.clientY+n.y)/(s||1)+(l?l[1]-Ot[1]:0)/(s||1);if(!Ut.active&&!St){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(nt){o?(o.e+=u-(pt||0),o.f+=c-(gt||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");T(nt,"webkitTransform",h),T(nt,"mozTransform",h),T(nt,"msTransform",h),T(nt,"transform",h),pt=u,gt=c,bt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!nt){var t=this.options.fallbackOnBody?document.body:rt,e=A(et,!0,Ft,!0,t),i=this.options;if(Ft){for(kt=t;"static"===T(kt,"position")&&"none"===T(kt,"transform")&&kt!==document;)kt=kt.parentNode;kt!==document.body&&kt!==document.documentElement?(kt===document&&(kt=M()),e.top+=kt.scrollTop,e.left+=kt.scrollLeft):kt=M(),Ot=N(kt)}D(nt=et.cloneNode(!0),i.ghostClass,!1),D(nt,i.fallbackClass,!0),D(nt,i.dragClass,!0),T(nt,"transition",""),T(nt,"transform",""),T(nt,"box-sizing","border-box"),T(nt,"margin",0),T(nt,"top",e.top),T(nt,"left",e.left),T(nt,"width",e.width),T(nt,"height",e.height),T(nt,"opacity","0.8"),T(nt,"position",Ft?"absolute":"fixed"),T(nt,"zIndex","100000"),T(nt,"pointerEvents","none"),Ut.ghost=nt,t.appendChild(nt),T(nt,"transform-origin",wt/parseInt(nt.style.width)*100+"% "+yt/parseInt(nt.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;Q("dragStart",this,{evt:t}),Ut.eventCanceled?this._onDrop():(Q("setupClone",this),Ut.eventCanceled||((st=K(et)).removeAttribute("id"),st.draggable=!1,st.style["will-change"]="",this._hideClone(),D(st,this.options.chosenClass,!1),Ut.clone=st),i.cloneId=Zt((function(){Q("clone",i),Ut.eventCanceled||(i.options.removeCloneOnHide||rt.insertBefore(st,et),i._hideClone(),tt({sortable:i,name:"clone"}))})),!e&&D(et,r.dragClass,!0),e?(It=!0,i._loopId=setInterval(i._emulateDragOver,50)):(_(document,"mouseup",i._onDrop),_(document,"touchend",i._onDrop),_(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,et)),x(document,"drop",i),T(et,"transform","translateZ(0)")),St=!0,i._dragStartId=Zt(i._dragStarted.bind(i,e,t)),x(document,"selectstart",i),xt=!0,window.getSelection().removeAllRanges(),p&&T(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,a=t.target,l=this.options,u=l.group,c=Ut.active,h=ft===u,d=l.sort,f=vt||c,v=this,m=!1;if(!Mt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=k(a,l.draggable,o,!0),N("dragOver"),Ut.eventCanceled)return m;if(et.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return P(!1);if(It=!1,c&&!l.disabled&&(h?d||(n=it!==rt):vt===this||(this.lastPutMode=ft.checkPull(this,c,et,t))&&u.checkPut(this,c,et,t))){if(r="vertical"===this._getDirection(t,a),e=A(et),N("dragOverValid"),Ut.eventCanceled)return m;if(n)return it=rt,L(),this._hideClone(),N("revert"),Ut.eventCanceled||(ot?rt.insertBefore(et,ot):rt.appendChild(et)),P(!0);var b=$(o,l.draggable);if(!b||function(t,e,i){var n=A($(i.el,i.options.draggable)),r=W(i.el,i.options,nt);return e?t.clientX>r.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,r,this)&&!b.animated){if(b===et)return P(!1);if(b&&o===t.target&&(a=b),a&&(i=A(a)),!1!==Wt(rt,o,et,e,a,i,t,!!a))return L(),b&&b.nextSibling?o.insertBefore(et,b.nextSibling):o.appendChild(et),it=o,G(),P(!0)}else if(b&&function(t,e,i){var n=A(F(i.el,0,i.options,!0)),r=W(i.el,i.options,nt);return e?t.clientX<r.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var p=F(o,0,l,!0);if(p===et)return P(!1);if(i=A(a=p),!1!==Wt(rt,o,et,e,a,i,t,!1))return L(),o.insertBefore(et,p),it=o,G(),P(!0)}else if(a.parentNode===o){i=A(a);var g,w,y,x=et.parentNode!==o,_=!function(t,e,i){var n=i?t.left:t.top,r=i?e.left:e.top;return n===r||(i?t.right:t.bottom)===(i?e.right:e.bottom)||n+(i?t.width:t.height)/2===r+(i?e.width:e.height)/2}(et.animated&&et.toRect||e,a.animated&&a.toRect||i,r),E=r?"top":"left",z=j(a,"top","top")||j(et,"top","top"),S=z?z.scrollTop:void 0;if(_t!==a&&(w=i[E],Tt=!1,Ct=!_&&l.invertSwap||x),g=function(t,e,i,n,r,o,a,s){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!a)if(s&&zt<u*r){if(!Tt&&(1===Et?l>c+u*o/2:l<h-u*o/2)&&(Tt=!0),Tt)d=!0;else if(1===Et?l<c+zt:l>h-zt)return-Et}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return B(et)<B(t)?1:-1}(e);return(d=d||a)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(t,a,i,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ct,_t===a),0!==g){var I=B(et);do{y=it.children[I-=g]}while(y&&("none"===T(y,"display")||y===nt))}if(0===g||y===a)return P(!1);_t=a,Et=g;var C=a.nextElementSibling,O=!1,M=Wt(rt,o,et,e,a,i,t,O=1===g);if(!1!==M)return 1!==M&&-1!==M||(O=1===M),Mt=!0,setTimeout(Xt,30),L(),O&&!C?o.appendChild(et):a.parentNode.insertBefore(et,O?C:a),z&&H(z,0,S-z.scrollTop),it=et.parentNode,void 0===w||Ct||(zt=Math.abs(w-A(a)[E])),G(),P(!0)}if(o.contains(et))return P(!1)}return!1}function N(l,u){Q(l,v,s({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:f,target:a,completed:P,onMove:function(i,n){return Wt(rt,o,et,e,i,A(i),t,n)},changed:G},u))}function L(){N("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function P(e){return N("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(v),v!==f&&(D(et,vt?vt.options.ghostClass:c.options.ghostClass,!1),D(et,l.ghostClass,!0)),vt!==v&&v!==Ut.active?vt=v:v===Ut.active&&vt&&(vt=null),f===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){N("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===et&&!et.animated||a===o&&!a.animated)&&(_t=null),l.dragoverBubble||t.rootEl||a===document||(et.parentNode[Y]._isOutsideThisEl(t.target),!e&&Kt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function G(){ct=B(et),dt=B(et,l.draggable),tt({sortable:v,name:"change",toEl:o,newIndex:ct,newDraggableIndex:dt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Kt),_(document,"mousemove",Kt),_(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"pointercancel",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ct=B(et),dt=B(et,i.draggable),Q("drop",this,{evt:t}),it=et&&et.parentNode,ct=B(et),dt=B(et,i.draggable),Ut.eventCanceled||(St=!1,Ct=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&T(document.body,"user-select",""),T(et,"transform",""),t&&(xt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(rt===it||vt&&"clone"!==vt.lastPutMode)&&st&&st.parentNode&&st.parentNode.removeChild(st),et&&(this.nativeDraggable&&_(et,"dragend",this),Yt(et),et.style["will-change"]="",xt&&!St&&D(et,vt?vt.options.ghostClass:this.options.ghostClass,!1),D(et,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:it,newIndex:null,newDraggableIndex:null,originalEvent:t}),rt!==it?(ct>=0&&(tt({rootEl:it,name:"add",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"remove",toEl:it,originalEvent:t}),tt({rootEl:it,name:"sort",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),vt&&vt.save()):ct!==ut&&ct>=0&&(tt({sortable:this,name:"update",toEl:it,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),Ut.active&&(null!=ct&&-1!==ct||(ct=ut,dt=ht),tt({sortable:this,name:"end",toEl:it,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),rt=et=it=nt=ot=st=at=lt=mt=bt=xt=ct=dt=ut=ht=_t=Et=vt=ft=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null,At.forEach((function(t){t.checked=!0})),At.length=pt=gt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":et&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)k(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Vt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];k(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return k(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Z.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Pt(i)},destroy:function(){Q("destroy",this);var t=this.el;t[Y]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Dt.splice(Dt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lt){if(Q("hideClone",this),Ut.eventCanceled)return;T(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),lt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lt){if(Q("showClone",this),Ut.eventCanceled)return;et.parentNode!=rt||this.options.group.revertClone?ot?rt.insertBefore(st,ot):rt.appendChild(st):rt.insertBefore(st,et),this.options.group.revertClone&&this.animate(et,st),T(st,"display",""),lt=!1}}else this._hideClone()}},jt&&x(document,"touchmove",(function(t){(Ut.active||St)&&t.cancelable&&t.preventDefault()})),Ut.utils={on:x,off:_,css:T,find:O,is:function(t,e){return!!k(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:G,closest:k,toggleClass:D,clone:K,index:B,nextTick:Zt,cancelNextTick:qt,detectDirection:Lt,getChild:F,expando:Y},Ut.get=function(t){return t[Y]},Ut.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ut.utils=s(s({},Ut.utils),t.utils)),Z.mount(t)}))},Ut.create=function(t,e){return new Ut(t,e)},Ut.version="1.15.6";var Jt,Qt,te,ee,ie,ne,re=[],oe=!1;function ae(){re.forEach((function(t){clearInterval(t.pid)})),re=[]}function se(){clearInterval(ne)}var le=G((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=M(),c=!1;Qt!==i&&(Qt=i,ae(),r=e.scrollFn,!0===(Jt=e.scroll)&&(Jt=L(i,!0)));var h=0,d=Jt;do{var f=d,v=A(f),m=v.top,b=v.bottom,p=v.left,g=v.right,w=v.width,y=v.height,x=void 0,_=void 0,E=f.scrollWidth,z=f.scrollHeight,k=T(f),S=f.scrollLeft,I=f.scrollTop;f===u?(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=x&&(Math.abs(g-o)<=s&&S+w<E)-(Math.abs(p-o)<=s&&!!S),C=_&&(Math.abs(b-a)<=s&&I+y<z)-(Math.abs(m-a)<=s&&!!I);if(!re[h])for(var O=0;O<=h;O++)re[O]||(re[O]={});re[h].vx==D&&re[h].vy==C&&re[h].el===f||(re[h].el=f,re[h].vx=D,re[h].vy=C,clearInterval(re[h].pid),0==D&&0==C||(c=!0,re[h].pid=setInterval(function(){n&&0===this.layer&&Ut.active._onTouchMove(ie);var e=re[this.layer].vy?re[this.layer].vy*l:0,i=re[this.layer].vx?re[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Ut.dragged.parentNode[Y],i,e,t,ie,re[this.layer].el)||H(re[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=L(d,!1)));oe=c}}),30),ue=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.dispatchSortableEvent,o=t.unhideGhostForTarget;if(e){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(s.clientX,s.clientY);o(),a&&!a.el.contains(l)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ce(){}function he(){}ce.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=F(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:ue},c(ce,{pluginName:"revertOnSpill"}),he.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:ue},c(he,{pluginName:"removeOnSpill"});var de,fe,ve,me,be,pe=[],ge=[],we=!1,ye=!1,xe=!1;function _e(t,e){ge.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function Ee(){pe.forEach((function(t){t!==ve&&t.parentNode&&t.parentNode.removeChild(t)}))}Ut.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):x(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),se(),ae(),clearTimeout(S),S=void 0},nulling:function(){ie=Qt=Jt=oe=ne=te=ee=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(ie=t,e||this.options.forceAutoScrollFallback||m||v||p){le(t,this.options,o,e);var a=L(o,!0);!oe||ne&&n===te&&r===ee||(ne&&se(),ne=setInterval((function(){var o=L(document.elementFromPoint(n,r),!0);o!==a&&(a=o,ae()),le(t,i.options,o,e)}),10),te=n,ee=r)}else{if(!this.options.bubbleScroll||L(o,!0)===M())return void ae();le(t,this.options,L(o,!1),!1)}}},c(t,{pluginName:"scroll",initializeByDefault:!0})}),Ut.mount(he,ce),Ut.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?x(document,"pointerup",this._deselectMultiDrag):(x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag))),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";pe.length&&fe===t?pe.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){ve=t.dragEl},delayEnded:function(){this.isMultiDrag=~pe.indexOf(ve)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<pe.length;n++)ge.push(K(pe[n])),ge[n].sortableIndex=pe[n].sortableIndex,ge[n].draggable=!1,ge[n].style["will-change"]="",D(ge[n],this.options.selectedClass,!1),pe[n]===ve&&D(ge[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&fe===t.sortable&&(_e(!0,t.rootEl),e("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,i=t.cancel;this.isMultiDrag&&(_e(!1,t.rootEl),ge.forEach((function(t){T(t,"display","")})),e(),be=!1,i())},hideClone:function(t){var e=this,i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){T(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),be=!0,n())},dragStartGlobal:function(){!this.isMultiDrag&&fe&&fe.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=B(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),xe=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==ve&&T(t,"position","absolute")}));var n=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&R(t,n)})),ye=!0,we=!0}i.animateAll((function(){ye=!1,we=!1,e.options.animation&&pe.forEach((function(t){U(t)})),e.options.sort&&Ee()}))}},dragOver:function(t){var e=t.completed,i=t.cancel;ye&&~pe.indexOf(t.target)&&(e(!1),i())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;pe.length>1&&(pe.forEach((function(t){n.addAnimationState({target:t,rect:ye?A(t):r}),U(t),t.fromRect=r,e.removeAnimationState(t)})),ye=!1,function(t,e){pe.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.activeSortable,r=t.parentEl,o=t.putSortable,a=this.options;if(t.insertion){if(i&&n._hideClone(),we=!1,a.animation&&pe.length>1&&(ye||!i&&!n.options.sort&&!o)){var s=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&(R(t,s),r.appendChild(t))})),ye=!0}if(!i)if(ye||Ee(),pe.length>1){var l=be;n._showClone(e),n.options.animation&&!be&&l&&ge.forEach((function(t){n.addAnimationState({target:t,rect:me}),t.fromRect=me,t.thisAnimationDuration=null}))}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){me=c({},e);var r=C(ve,!0);me.top-=r.f,me.left-=r.e}},dragOverAnimationComplete:function(){ye&&(ye=!1,Ee())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var u=this.options,c=n.children;if(!xe)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(ve,u.selectedClass,!~pe.indexOf(ve)),~pe.indexOf(ve))pe.splice(pe.indexOf(ve),1),de=null,q({sortable:r,rootEl:i,name:"deselect",targetEl:ve,originalEvent:e});else{if(pe.push(ve),q({sortable:r,rootEl:i,name:"select",targetEl:ve,originalEvent:e}),e.shiftKey&&de&&r.el.contains(de)){var h=B(de),d=B(ve);~h&&~d&&h!==d&&function(){var t,o;d>h?(o=h,t=d):(o=d,t=h+1);for(var a=u.filter;o<t;o++)~pe.indexOf(c[o])||k(c[o],u.draggable,n,!1)&&(a&&("function"==typeof a?a.call(r,e,c[o],r):a.split(",").some((function(t){return k(c[o],t.trim(),n,!1)})))||(D(c[o],u.selectedClass,!0),pe.push(c[o]),q({sortable:r,rootEl:i,name:"select",targetEl:c[o],originalEvent:e})))}()}else de=ve;fe=l}if(xe&&this.isMultiDrag){if(ye=!1,(n[Y].options.sort||n!==i)&&pe.length>1){var f=A(ve),v=B(ve,":not(."+this.options.selectedClass+")");if(!we&&u.animation&&(ve.thisAnimationDuration=null),l.captureAnimationState(),!we&&(u.animation&&(ve.fromRect=f,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==ve){var e=ye?A(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),Ee(),pe.forEach((function(t){c[v]?n.insertBefore(t,c[v]):n.appendChild(t),v++})),a===B(ve))){var m=!1;pe.forEach((function(t){t.sortableIndex===B(t)||(m=!0)})),m&&(o("update"),o("sort"))}pe.forEach((function(t){U(t)})),l.animateAll()}fe=l}(i===n||s&&"clone"!==s.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=xe=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),_(document,"pointerup",this._deselectMultiDrag),_(document,"mouseup",this._deselectMultiDrag),_(document,"touchend",this._deselectMultiDrag),_(document,"keydown",this._checkKeyDown),_(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==xe&&xe||fe!==this.sortable||t&&k(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];D(e,this.options.selectedClass,!1),pe.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},c(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(fe&&fe!==e&&(fe.multiDrag._deselectMultiDrag(),fe=e),D(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[Y],i=pe.indexOf(t);e&&e.options.multiDrag&&~i&&(D(t,e.options.selectedClass,!1),pe.splice(i,1))}},eventProperties:function(){var t,e=this,i=[],n=[];return pe.forEach((function(t){var r;i.push({multiDragElement:t,index:t.sortableIndex}),r=ye&&t!==ve?-1:ye?B(t,":not(."+e.options.selectedClass+")"):B(t),n.push({multiDragElement:t,index:r})})),{items:(t=pe,function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ge),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const ze=class{constructor(i){t(this,i),this.itemsReordered=e(this,"itemsReordered",7),this.ezSelectItens=e(this,"ezSelectItens",7),this.ezDoubleClick=e(this,"ezDoubleClick",7),this.ezChoose=e(this,"ezChoose",7),this.filterTerm="",this.title=void 0,this.hideHeader=!1,this.hideTotalizer=!1,this.group="default",this.dataSource=[],this.idSortableList="DEFAULT_LIST",this.entityLabel=void 0,this.entityLabelPlural=void 0,this.emptyMessage=void 0,this.hoverFeedback=!0,this.enableMultipleSelection=!1,this.removeItensMoved=!1,this.itemRightSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.selectedItems=new Set}async clearSelection(){this.selectedItems.clear(),this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(Ut.utils.deselect(i),t.selected=!1)})),this.ezSelectItens.emit([])}async componentWillLoad(){this.i18n=await o(),this.emptyMessage=this.i18n("ez-sortable-list.emptyMessage"),this.entityLabel=this.i18n("ez-sortable-list.entityLabel"),this.entityLabelPlural=this.i18n("ez-sortable-list.entityLabelPlural")}componentDidLoad(){this.initSortable()}componentDidRender(){this.selectPredefinedItens()}initSortable(){this._sortableInstance&&this._sortableInstance.destroy(),this._sortableInstance=new Ut(this.el.shadowRoot.querySelector(`#${this.idSortableList}`),{group:{name:this.group,pull:!0,put:!0},ghostClass:"ghost",dragClass:"dragging",animation:15,multiDrag:this.enableMultipleSelection,avoidImplicitDeselect:this.enableMultipleSelection,selectedClass:"selected",filter:".filtered",swapThreshold:.5,multiDragKey:"Control",removeCloneOnHide:!0,onEnd:t=>this.handleReorderEvent(t),onSelect:t=>this.handleSelect(t),onDeselect:t=>this.handleDeselect(t),onSort:t=>this.handleSortItem(t),onChoose:t=>this.ezChoose.emit(t)})}selectPredefinedItens(){this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(this.selectedItems.has(t.id)||!0===t.selected?Ut.utils.select(i):Ut.utils.deselect(i))}))}handleSortItem(t){var e;if(!this.removeItensMoved)return;const i=t.from.getAttribute("id");t.to.getAttribute("id")!==i?((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).forEach((t=>t.remove())):t.items=this.removeDuplicateElements(t.items)}removeDuplicateElements(t){const e=new Set;return t.filter((t=>{const i=t.getAttribute("data-key");if(i){if(e.has(i))return t.remove(),!1;e.add(i)}return!0}))}handleSelect(t){this.updateSelection(t.item,!0)}handleDeselect(t){this.updateSelection(t.item,!1)}updateSelection(t,e){const i=t.getAttribute("data-key");if(!i)return;const n=this.dataSource.find((t=>t.id===i));n&&(n.selected=e,e?this.selectedItems.add(i):this.selectedItems.delete(i),this.emitSelectedItems())}emitSelectedItems(){this.ezSelectItens.emit(Array.from(this.selectedItems).map((t=>this.dataSource.find((e=>e.id===t)))).filter(Boolean))}handleReorderEvent(t){var e;const i=((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).map((t=>t.getAttribute("data-key"))).filter(Boolean);this.itemsReordered.emit({dataSource:this.dataSource,selectItens:i,from:t.from,to:t.to,newIndex:t.newIndex,newIndicies:t.newIndicies})}handleDoubleClick(t){var e;const i=this.dataSource.find((e=>e.id===t));i&&(null===(e=this.ezDoubleClick)||void 0===e||e.emit(i))}getContainerItemBuilder(t,e,n){var r,o;const a="left"===t?null===(r=this.itemLeftSlotBuilder)||void 0===r?void 0:r.call(this,e):null===(o=this.itemRightSlotBuilder)||void 0===o?void 0:o.call(this,e);if(null!=a)return"string"!=typeof a?i("div",{class:n},a):i("div",{class:n,innerHTML:a})}disconnectedCallback(){this._sortableInstance&&(this._sortableInstance.destroy(),this._sortableInstance=null)}buildTotalizer(){return`${this.i18n("ez-sortable-list.total")} ${this.dataSource.length} ${1===this.dataSource.length?this.entityLabel:this.entityLabelPlural}`}renderItems(){return r.applyStringFilter(this.filterTerm,this.dataSource).map((t=>i("div",{id:`ID_${t.id}`,key:`KEY_${t.id}`,class:{"sortable-item":!0,"hover-feedback":this.hoverFeedback},"data-key":t.id,onDblClick:()=>this.handleDoubleClick(t.id)},!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),i("div",{class:"item-content"},i("span",{class:"draggable-icon"}),t.label),!!this.itemRightSlotBuilder&&this.getContainerItemBuilder("right",t))))}handleFilterChanged(t){t.stopPropagation(),t.preventDefault(),this.filterTerm=t.detail}renderTotalizer(){if(!this.hideTotalizer)return i("div",{class:"sortable-totalizer"},this.buildTotalizer())}renderHeader(){if(!this.hideHeader)return i("div",{class:"sortable-header"},i("span",{class:"sortable-label"},this.title),i("ez-filter-input",{label:`${this.i18n("ez-sortable-list.search")} ${this.entityLabel}`,mode:"slim",onEzChange:t=>this.handleFilterChanged(t)}))}render(){return i("div",{class:"sortable-content"},this.renderHeader(),i("div",{class:`sortable-list ${this.dataSource.length<1?"empty-content":""} list-scroller--fix`,"data-content":this.emptyMessage,style:{"--empty-content":`"${this.emptyMessage}"`},id:this.idSortableList,key:this.idSortableList},this.renderItems()),this.renderTotalizer())}get el(){return n(this)}};ze.style=':host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, "Roboto");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:290px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}';export{ze as ez_sortable_list}
|