text: (this.webpackJsonp=this.webpackJsonp||[]).push([[26],{1251:function(t,e,n){"use strict";n(42);var o=n(0),i=n.n(o),r=n(350),a=n(14),l=n(11),s=n(1);function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.togglePriorityButton,o=e.prioritizedLabels,a=e.otherLabels;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.togglePriorityButton=n||i()(".js-toggle-priority"),this.prioritizedLabels=o||i()(".js-prioritized-labels"),this.otherLabels=a||i()(".js-other-labels"),this.errorMessage=Object(s.a)("Unable to update label prioritization at this time"),this.emptyState=document.querySelector("#js-priority-labels-empty-state"),this.$badgeItemTemplate=i()("#js-badge-item-template"),"sortable"in this.prioritizedLabels.data()&&r.default.create(this.prioritizedLabels.get(0),{filter:".empty-message",forceFallback:!0,fallbackClass:"is-dragging",dataIdAttr:"data-id",onUpdate:this.onPrioritySortUpdate.bind(this)}),this.bindEvents()}var e,n,o;return e=t,(n=[{key:"bindEvents",value:function(){return this.prioritizedLabels.find(".btn-action").on("mousedown",this,this.onButtonActionClick),this.togglePriorityButton.on("click",this,this.onTogglePriorityClick)}},{key:"onTogglePriorityClick",value:function(t){t.preventDefault();var e=t.data,n=i()(t.currentTarget),o=i()("#".concat(n.data("domId"))),r=n.parents(".js-prioritized-labels").length?"remove":"add";i()("#".concat(n.find(".has-tooltip:visible").attr("aria-describedby"))).tooltip("dispose"),e.toggleLabelPriority(o,r),e.toggleEmptyState(o,n,r)}},{key:"onButtonActionClick",value:function(t){t.stopPropagation(),i()(t.currentTarget).tooltip("hide")}},{key:"toggleEmptyState",value:function(){this.emptyState.classList.toggle("hidden",Boolean(this.prioritizedLabels[0].querySelector(":scope > li")))}},{key:"toggleLabelPriority",value:function(t,e,n){null==n&&(n=!0);var o=t.find(".js-toggle-priority").data("url"),i=this.prioritizedLabels,r=this.otherLabels,a=this.rollbackLabelPosition.bind(this,t,e);"remove"===e&&(i=this.otherLabels,r=this.prioritizedLabels);var s=t.detach();this.toggleLabelPriorityBadge(s,e);var c=i.find("li.label-list-item");c.length?c.last().after(s):s.appendTo(i),r.find("li").length&&r.find(".empty-message").removeClass("hidden"),i.find("> li:not(.empty-message)").length&&i.find(".empty-message").addClass("hidden"),n&&("remove"===e?(l.a.delete(o).catch(a),r.find("li").length||r.find(".empty-message").removeClass("hidden")):this.savePrioritySort(t,e).catch(a))}},{key:"toggleLabelPriorityBadge",value:function(t,e){"remove"===e?i()(".js-priority-badge",t).remove():i()(".label-links",t).append(this.$badgeItemTemplate.clone().html())}},{key:"onPrioritySortUpdate",value:function(){var t=this;this.savePrioritySort().catch((function(){return Object(a.a)(t.errorMessage)}))}},{key:"savePrioritySort",value:function(){return l.a.post(this.prioritizedLabels.data("url"),{label_ids:this.getSortedLabelsIds()})}},{key:"rollbackLabelPosition",value:function(t,e){var n="remove"===e?"add":"remove";this.toggleLabelPriority(t,n,!1),Object(a.a)(this.errorMessage)}},{key:"getSortedLabelsIds",value:function(){var t=[];return this.prioritizedLabels.find("> li").each((function(){var e=i()(this).data("id");e&&t.push(e)})),t}}])&&c(e.prototype,n),o&&c(e,o),t}();function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var h={group:Object(s.a)("Unsubscribe at group level"),project:Object(s.a)("Unsubscribe at project level")},f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=i()(e);this.$dropdown=n.find(".dropdown"),this.$subscribeButtons=n.find(".js-subscribe-button"),this.$unsubscribeButtons=n.find(".js-unsubscribe-button"),this.$subscribeButtons.on("click",this.subscribe.bind(this)),this.$unsubscribeButtons.on("click",this.unsubscribe.bind(this))}var e,n,o;return e=t,o=[{key:"setNewTooltip",value:function(t){if(t.hasClass("js-subscribe-button")){var e=t.hasClass("js-group-level")?"group":"project",n=h[e];i()(".js-unsubscribe-button",t.closest(".label-actions-list")).tooltip("hide").attr("title",n).tooltip("_fixTitle")}}}],(n=[{key:"unsubscribe",value:function(t){var e=this;t.preventDefault();var n=this.$unsubscribeButtons.attr("data-url");l.a.post(n).then((function(){e.toggleSubscriptionButtons(),e.$unsubscribeButtons.removeAttr("data-url")})).catch((function(){return Object(a.a)(Object(s.a)("There was an error when unsubscribing from this label."))}))}},{key:"subscribe",value:function(e){var n=this;e.preventDefault();var o=i()(e.currentTarget),r=o.attr("data-url");this.$unsubscribeButtons.attr("data-url",r),l.a.post(r).then((function(){return t.setNewTooltip(o)})).then((function(){return n.toggleSubscriptionButtons()})).catch((function(){return Object(a.a)(Object(s.a)("There was an error when subscribing to this label."))}))}},{key:"toggleSubscriptionButtons",value:function(){this.$dropdown.toggleClass("hidden"),this.$subscribeButtons.toggleClass("hidden"),this.$unsubscribeButtons.toggleClass("hidden")}}])&&d(e.prototype,n),o&&d(e,o),t}();n(46);function p(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var g={group:{subscribed:Object(s.a)("Unsubscribe at group level"),unsubscribed:Object(s.a)("Subscribe at group level")},project:{subscribed:Object(s.a)("Unsubscribe at project level"),unsubscribed:Object(s.a)("Subscribe at project level")}},v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$container=i()(e),this.$buttons=this.$container.find(".js-subscribe-button"),this.$buttons.on("click",this.toggleSubscription.bind(this))}var e,n,o;return e=t,o=[{key:"setNewTitle",value:function(t,e,n){var o=/group/.test(e)?"group":"project",i=g[o][n];t.attr("title",i).tooltip("_fixTitle")}}],(n=[{key:"toggleSubscription",value:function(e){var n=this;e.preventDefault();var o=i()(e.currentTarget),r=o.attr("data-url"),c=o.attr("data-status");o.addClass("disabled"),l.a.post(r).then((function(){var e,r;if("unsubscribed"===c){var a=["subscribed",Object(s.a)("Unsubscribe")];e=a[0],r=a[1]}else{var l=["unsubscribed",Object(s.a)("Subscribe")];e=l[0],r=l[1]}o.removeClass("disabled"),n.$buttons.attr("data-status",e),n.$buttons.find("> span").text(r),n.$buttons.map((function(n,o){var a=i()(o),l=a.attr("data-original-title");return l&&t.setNewTitle(a,l,e,r),o}))})).catch((function(){return Object(a.a)(Object(s.a)("There was an error subscribing to this label."))}))}}])&&p(e.prototype,n),o&&p(e,o),t}();e.a=function(){i()(".prioritized-labels").length&&new u,i()(".label-subscription").each((function(t,e){var n=i()(e);n.find(".dropdown-group-label").length?new f(n):new v(n)}))}},350:function(t,e,n){"use strict";
  /**!
   * Sortable 1.10.2
   * @author	RubaXa   <trash@rubaxa.org>
   * @author	owenm    <owen23355@gmail.com>
   * @license MIT
   */
  function o(t){return(o="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})(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(e){i(t,e,n[e])}))}return t}function l(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function s(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.r(e),n.d(e,"MultiDrag",(function(){return ye})),n.d(e,"Sortable",(function(){return Yt})),n.d(e,"Swap",(function(){return se}));function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),h=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),g=c(/chrome/i)&&c(/android/i),v={capture:!1,passive:!1};function m(t,e,n){t.addEventListener(e,n,!u&&v)}function b(t,e,n){t.removeEventListener(e,n,!u&&v)}function y(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 w(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function E(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&y(t,e):y(t,e))||o&&t===n)return t;if(t===n)break}while(t=w(t))}return null}var D,S=/\s+/g;function _(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(S," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(S," ")}}function C(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function T(t,e){var n="";if("string"==typeof t)n=t;else do{var o=C(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function O(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function x(){var t=document.scrollingElement;return t||document.documentElement}function M(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,d,h;if(t!==window&&t!==x()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,d=r.height,h=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!u))do{if(i&&i.getBoundingClientRect&&("none"!==C(i,"transform")||n&&"static"!==C(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(C(i,"border-top-width")),l-=f.left+parseInt(C(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=T(i||t),g=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),c=(l/=g)+(h/=g))}return{top:a,left:l,bottom:s,right:c,width:h,height:d}}}function k(t,e,n){for(var o=j(t,!0),i=M(t)[e];o;){var r=M(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===x())break;o=j(o,!1)}return!1}function A(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Yt.ghost&&r[i]!==Yt.dragged&&E(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function N(t,e){for(var n=t.lastElementChild;n&&(n===Yt.ghost||"none"===C(n,"display")||e&&!y(n,e));)n=n.previousElementSibling;return n||null}function I(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Yt.clone||e&&!y(t,e)||n++;return n}function P(t){var e=0,n=0,o=x();if(t)do{var i=T(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function j(t,e){if(!t||!t.getBoundingClientRect)return x();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=C(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return x();if(o||e)return n;o=!0}}}while(n=n.parentNode);return x()}function B(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 L(t,e){return function(){if(!D){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),D=setTimeout((function(){D=void 0}),e)}}}function R(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function X(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Y(t,e){C(t,"position","absolute"),C(t,"top",e.top),C(t,"left",e.left),C(t,"width",e.width),C(t,"height",e.height)}function z(t){C(t,"position",""),C(t,"top",""),C(t,"left",""),C(t,"width",""),C(t,"height","")}var F="Sortable"+(new Date).getTime();function H(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==C(t,"display")&&t!==Yt.ghost){e.push({target:t,rect:M(t)});var n=a({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=T(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=M(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=T(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&B(s,l)&&!B(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,o.options)),B(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){C(t,"transition",""),C(t,"transform","");var i=T(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,C(t,"transform","translate3d("+l+"px,"+s+"px,0)"),function(t){t.offsetWidth}(t),C(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),C(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){C(t,"transition",""),C(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var $=[],K={initializeByDefault:!0},U={mount:function(t){for(var e in K)!K.hasOwnProperty(e)||e in t||(t[e]=K[e]);$.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";$.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](a({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](a({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in $.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[i]=a,r(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var a=this.modifyOption(t,i,t.options[i]);void 0!==a&&(t.options[i]=a)}},getEventProperties:function(t,e){var n={};return $.forEach((function(o){"function"==typeof o.eventProperties&&r(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return $.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function W(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,l=t.toEl,s=t.fromEl,c=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[F]){var b,y=e.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||u||d?(b=document.createEvent("Event")).initEvent(o,!0,!0):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=s||n,b.item=i||n,b.clone=r,b.oldIndex=c,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=a({},m,U.getEventProperties(o,e));for(var D in E)b[D]=E[D];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}var G=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=l(n,["evt"]);U.pluginEvent.bind(Yt)(t,e,a({dragEl:V,parentEl:J,ghostEl:Z,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:ot,dragStarted:vt,putSortable:ct,activeSortable:Yt.active,originalEvent:o,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt,hideGhostForTarget:Bt,unhideGhostForTarget:Lt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){q({sortable:e,name:t,originalEvent:o})}},i))};function q(t){W(a({putSortable:ct,cloneEl:nt,targetEl:V,rootEl:Q,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt},t))}var V,J,Z,Q,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,yt,wt,Et=!1,Dt=!1,St=[],_t=!1,Ct=!1,Tt=[],Ot=!1,xt=[],Mt="undefined"!=typeof document,kt=p,At=d||u?"cssFloat":"float",Nt=Mt&&!g&&!p&&"draggable"in document.createElement("div"),It=function(){if(Mt){if(u)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=C(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(t,0,e),r=A(t,1,e),a=i&&C(i),l=r&&C(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[At]||r&&"none"===n[At]&&s+c>o)?"vertical":"horizontal"},jt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Bt=function(){!It&&Z&&C(Z,"display","none")},Lt=function(){!It&&Z&&C(Z,"display","")};Mt&&document.addEventListener("click",(function(t){if(Dt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Dt=!1,!1}),!0);var Rt=function(t){if(V){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,St.some((function(t){if(!N(t)){var e=M(t),n=t[F].options.emptyInsertThreshold,o=i>=e.left-n&&i<=e.right+n,l=r>=e.top-n&&r<=e.bottom+n;return n&&o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[F]._onDragOver(n)}}var i,r,a},Xt=function(t){V&&V.parentNode[F]._isOutsideThisEl(t.target)};function Yt(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=r({},e),t[F]=this;var n={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 Pt(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!==Yt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in U.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in jt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Nt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?m(t,"pointerdown",this._onTapStart):(m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),St.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),r(this,H())}function zt(t,e,n,o,i,r,a,l){var s,c,h=t[F],f=h.options.onMove;return!window.CustomEvent||u||d?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||M(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(c=f.call(h,s,a)),c}function Ft(t){t.draggable=!1}function Ht(){Ot=!1}function $t(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Kt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}Yt.prototype={constructor:Yt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(mt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,V):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){xt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&xt.push(o)}}(n),!V&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled||s.isContentEditable||(l=E(l,o.draggable,n,!1))&&l.animated||et===l)){if(it=I(l),at=I(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return q({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=E(s,o.trim(),n,!1))return q({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!E(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!V&&n.parentNode===r){var s=M(n);if(Q=r,J=(V=n).parentNode,tt=V.nextSibling,et=n,st=a.group,Yt.dragged=V,ut={target:V,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ut.clientX-s.left,gt=ut.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,V.style["will-change"]="all",o=function(){G("delayEnded",i,{evt:t}),Yt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(t,e),q({sortable:i,name:"choose",originalEvent:t}),_(V,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){O(V,t.trim(),Ft)})),m(l,"dragover",Rt),m(l,"mousemove",Rt),m(l,"touchmove",Rt),m(l,"mouseup",i._onDrop),m(l,"touchend",i._onDrop),m(l,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),G("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(d||u))o();else{if(Yt.eventCanceled)return void this._onDrop();m(l,"mouseup",i._disableDelayedDrag),m(l,"touchend",i._disableDelayedDrag),m(l,"touchcancel",i._disableDelayedDrag),m(l,"mousemove",i._delayedDragTouchMoveHandler),m(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&m(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,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(){V&&Ft(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,e?"touchmove":"mousemove",this._onTouchMove):(m(V,"dragend",this),m(Q,"dragstart",this._onDragStart));try{document.selection?Kt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Et=!1,Q&&V){G("dragStarted",this,{evt:e}),this.nativeDraggable&&m(document,"dragover",Xt);var n=this.options;!t&&_(V,n.dragClass,!1),_(V,n.ghostClass,!0),Yt.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Bt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(V.parentNode[F]._isOutsideThisEl(t),e)do{if(e[F]){if(e[F]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Lt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Z&&T(Z,!0),a=Z&&r&&r.a,l=Z&&r&&r.d,s=kt&&wt&&P(wt),c=(i.clientX-ut.clientX+o.x)/(a||1)+(s?s[0]-Tt[0]:0)/(a||1),u=(i.clientY-ut.clientY+o.y)/(l||1)+(s?s[1]-Tt[1]:0)/(l||1);if(!Yt.active&&!Et){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Z){r?(r.e+=c-(ht||0),r.f+=u-(ft||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");C(Z,"webkitTransform",d),C(Z,"mozTransform",d),C(Z,"msTransform",d),C(Z,"transform",d),ht=c,ft=u,dt=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Z){var t=this.options.fallbackOnBody?document.body:Q,e=M(V,!0,kt,!0,t),n=this.options;if(kt){for(wt=t;"static"===C(wt,"position")&&"none"===C(wt,"transform")&&wt!==document;)wt=wt.parentNode;wt!==document.body&&wt!==document.documentElement?(wt===document&&(wt=x()),e.top+=wt.scrollTop,e.left+=wt.scrollLeft):wt=x(),Tt=P(wt)}_(Z=V.cloneNode(!0),n.ghostClass,!1),_(Z,n.fallbackClass,!0),_(Z,n.dragClass,!0),C(Z,"transition",""),C(Z,"transform",""),C(Z,"box-sizing","border-box"),C(Z,"margin",0),C(Z,"top",e.top),C(Z,"left",e.left),C(Z,"width",e.width),C(Z,"height",e.height),C(Z,"opacity","0.8"),C(Z,"position",kt?"absolute":"fixed"),C(Z,"zIndex","100000"),C(Z,"pointerEvents","none"),Yt.ghost=Z,t.appendChild(Z),C(Z,"transform-origin",pt/parseInt(Z.style.width)*100+"% "+gt/parseInt(Z.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;G("dragStart",this,{evt:t}),Yt.eventCanceled?this._onDrop():(G("setupClone",this),Yt.eventCanceled||((nt=X(V)).draggable=!1,nt.style["will-change"]="",this._hideClone(),_(nt,this.options.chosenClass,!1),Yt.clone=nt),n.cloneId=Kt((function(){G("clone",n),Yt.eventCanceled||(n.options.removeCloneOnHide||Q.insertBefore(nt,V),n._hideClone(),q({sortable:n,name:"clone"}))})),!e&&_(V,i.dragClass,!0),e?(Dt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,V)),m(document,"drop",n),C(V,"transform","translateZ(0)")),Et=!0,n._dragStartId=Kt(n._dragStarted.bind(n,e,t)),m(document,"selectstart",n),vt=!0,f&&C(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,l=t.target,s=this.options,c=s.group,u=Yt.active,d=st===c,h=s.sort,f=ct||u,p=this,g=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=E(l,s.draggable,r,!0),B("dragOver"),Yt.eventCanceled)return g;if(V.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return X(!1);if(Dt=!1,u&&!s.disabled&&(d?h||(o=!Q.contains(V)):ct===this||(this.lastPutMode=st.checkPull(this,u,V,t))&&c.checkPut(this,u,V,t))){if(i="vertical"===this._getDirection(t,l),e=M(V),B("dragOverValid"),Yt.eventCanceled)return g;if(o)return J=Q,L(),this._hideClone(),B("revert"),Yt.eventCanceled||(tt?Q.insertBefore(V,tt):Q.appendChild(V)),X(!0);var v=N(r,s.draggable);if(!v||function(t,e,n){var o=M(N(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,i,this)&&!v.animated){if(v===V)return X(!1);if(v&&r===t.target&&(l=v),l&&(n=M(l)),!1!==zt(Q,r,V,e,l,n,t,!!l))return L(),r.appendChild(V),J=r,Y(),X(!0)}else if(l.parentNode===r){n=M(l);var m,b,y,w=V.parentNode!==r,D=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}(V.animated&&V.toRect||e,l.animated&&l.toRect||n,i),S=i?"top":"left",T=k(l,"top","top")||k(V,"top","top"),O=T?T.scrollTop:void 0;if(mt!==l&&(b=n[S],_t=!1,Ct=!D&&s.invertSwap||w),0!==(m=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&yt<c*i){if(!_t&&(1===bt?s>u+c*r/2:s<d-c*r/2)&&(_t=!0),_t)h=!0;else if(1===bt?s<u+yt:s>d-yt)return-bt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return I(V)<I(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,n,i,D?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,mt===l))){var x=I(V);do{x-=m,y=J.children[x]}while(y&&("none"===C(y,"display")||y===Z))}if(0===m||y===l)return X(!1);mt=l,bt=m;var A=l.nextElementSibling,P=!1,j=zt(Q,r,V,e,l,n,t,P=1===m);if(!1!==j)return 1!==j&&-1!==j||(P=1===j),Ot=!0,setTimeout(Ht,30),L(),P&&!A?r.appendChild(V):l.parentNode.insertBefore(V,P?A:l),T&&R(T,0,O-T.scrollTop),J=V.parentNode,void 0===b||Ct||(yt=Math.abs(b-M(l)[S])),Y(),X(!0)}if(r.contains(V))return X(!1)}return!1}function B(s,c){G(s,p,a({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:X,onMove:function(n,o){return zt(Q,r,V,e,n,M(n),t,o)},changed:Y},c))}function L(){B("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function X(e){return B("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(_(V,ct?ct.options.ghostClass:u.options.ghostClass,!1),_(V,s.ghostClass,!0)),ct!==p&&p!==Yt.active?ct=p:p===Yt.active&&ct&&(ct=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){B("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===V&&!V.animated||l===r&&!l.animated)&&(mt=null),s.dragoverBubble||t.rootEl||l===document||(V.parentNode[F]._isOutsideThisEl(t.target),!e&&Rt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function Y(){rt=I(V),lt=I(V,s.draggable),q({sortable:p,name:"change",toEl:r,newIndex:rt,newDraggableIndex:lt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Rt),b(document,"mousemove",Rt),b(document,"touchmove",Rt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rt=I(V),lt=I(V,n.draggable),G("drop",this,{evt:t}),J=V&&V.parentNode,rt=I(V),lt=I(V,n.draggable),Yt.eventCanceled?this._nulling():(Et=!1,Ct=!1,_t=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ut(this.cloneId),Ut(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&C(document.body,"user-select",""),C(V,"transform",""),t&&(vt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(Q===J||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),V&&(this.nativeDraggable&&b(V,"dragend",this),Ft(V),V.style["will-change"]="",vt&&!Et&&_(V,ct?ct.options.ghostClass:this.options.ghostClass,!1),_(V,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==J?(rt>=0&&(q({rootEl:J,name:"add",toEl:J,fromEl:Q,originalEvent:t}),q({sortable:this,name:"remove",toEl:J,originalEvent:t}),q({rootEl:J,name:"sort",toEl:J,fromEl:Q,originalEvent:t}),q({sortable:this,name:"sort",toEl:J,originalEvent:t})),ct&&ct.save()):rt!==it&&rt>=0&&(q({sortable:this,name:"update",toEl:J,originalEvent:t}),q({sortable:this,name:"sort",toEl:J,originalEvent:t})),Yt.active&&(null!=rt&&-1!==rt||(rt=it,lt=at),q({sortable:this,name:"end",toEl:J,originalEvent:t}),this.save()))),this._nulling())},_nulling:function(){G("nulling",this),Q=V=J=Z=tt=nt=et=ot=ut=dt=vt=rt=lt=it=at=mt=bt=ct=st=Yt.dragged=Yt.ghost=Yt.clone=Yt.active=null,xt.forEach((function(t){t.checked=!0})),xt.length=ht=ft=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":V&&(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=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)E(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||$t(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];E(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return E(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=U.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&jt(n)},destroy:function(){G("destroy",this);var t=this.el;t[F]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),St.splice(St.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if(G("hideClone",this),Yt.eventCanceled)return;C(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if(G("showClone",this),Yt.eventCanceled)return;Q.contains(V)&&!this.options.group.revertClone?Q.insertBefore(nt,V):tt?Q.insertBefore(nt,tt):Q.appendChild(nt),this.options.group.revertClone&&this.animate(V,nt),C(nt,"display",""),ot=!1}}else this._hideClone()}},Mt&&m(document,"touchmove",(function(t){(Yt.active||Et)&&t.cancelable&&t.preventDefault()})),Yt.utils={on:m,off:b,css:C,find:O,is:function(t,e){return!!E(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:L,closest:E,toggleClass:_,clone:X,index:I,nextTick:Kt,cancelNextTick:Ut,detectDirection:Pt,getChild:A},Yt.get=function(t){return t[F]},Yt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];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&&(Yt.utils=a({},Yt.utils,t.utils)),U.mount(t)}))},Yt.create=function(t,e){return new Yt(t,e)},Yt.version="1.10.2";var Wt,Gt,qt,Vt,Jt,Zt,Qt=[],te=!1;function ee(){Qt.forEach((function(t){clearInterval(t.pid)})),Qt=[]}function ne(){clearInterval(Zt)}var oe,ie=L((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=x(),u=!1;Gt!==n&&(Gt=n,ee(),Wt=e.scroll,i=e.scrollFn,!0===Wt&&(Wt=j(n,!0)));var d=0,h=Wt;do{var f=h,p=M(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,T=C(f),O=f.scrollLeft,k=f.scrollTop;f===c?(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),D=w<_&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX),D=w<_&&("auto"===T.overflowY||"scroll"===T.overflowY));var A=E&&(Math.abs(b-r)<=l&&O+y<S)-(Math.abs(m-r)<=l&&!!O),N=D&&(Math.abs(v-a)<=l&&k+w<_)-(Math.abs(g-a)<=l&&!!k);if(!Qt[d])for(var I=0;I<=d;I++)Qt[I]||(Qt[I]={});Qt[d].vx==A&&Qt[d].vy==N&&Qt[d].el===f||(Qt[d].el=f,Qt[d].vx=A,Qt[d].vy=N,clearInterval(Qt[d].pid),0==A&&0==N||(u=!0,Qt[d].pid=setInterval(function(){o&&0===this.layer&&Yt.active._onTouchMove(Jt);var e=Qt[this.layer].vy?Qt[this.layer].vy*s:0,n=Qt[this.layer].vx?Qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Yt.dragged.parentNode[F],n,e,t,Jt,Qt[this.layer].el)||R(Qt[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=j(h,!1)));te=u}}),30),re=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function ae(){}function le(){}function se(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;oe=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=oe;!1!==o(n)?(_(n,s.swapClass,!0),oe=n):oe=null,c&&c!==oe&&_(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;oe&&_(oe,r.swapClass,!1),oe&&(r.swap||n&&n.options.swap)&&o!==oe&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=I(t),o=I(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,oe),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){oe=null}},r(t,{pluginName:"swap",eventProperties:function(){return{swapItem:oe}}})}ae.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=A(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:re},r(ae,{pluginName:"revertOnSpill"}),le.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:re},r(le,{pluginName:"removeOnSpill"});var ce,ue,de,he,fe,pe=[],ge=[],ve=!1,me=!1,be=!1;function ye(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.supportPointer?m(document,"pointerup",this._deselectMultiDrag):(m(document,"mouseup",this._deselectMultiDrag),m(document,"touchend",this._deselectMultiDrag)),m(document,"keydown",this._checkKeyDown),m(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(e,n){var o="";pe.length&&ue===t?pe.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;de=e},delayEnded:function(){this.isMultiDrag=~pe.indexOf(de)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<pe.length;o++)ge.push(X(pe[o])),ge[o].sortableIndex=pe[o].sortableIndex,ge[o].draggable=!1,ge[o].style["will-change"]="",_(ge[o],this.options.selectedClass,!1),pe[o]===de&&_(ge[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&ue===e&&(we(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(we(!1,n),ge.forEach((function(t){C(t,"display","")})),e(),fe=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){C(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),fe=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ue&&ue.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=I(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),be=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==de&&C(t,"position","absolute")}));var o=M(de,!1,!0,!0);pe.forEach((function(t){t!==de&&Y(t,o)})),me=!0,ve=!0}n.animateAll((function(){me=!1,ve=!1,e.options.animation&&pe.forEach((function(t){z(t)})),e.options.sort&&Ee()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;me&&~pe.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;pe.length>1&&(pe.forEach((function(t){o.addAnimationState({target:t,rect:me?M(t):i}),z(t),t.fromRect=i,e.removeAnimationState(t)})),me=!1,function(t,e){pe.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),ve=!1,l.animation&&pe.length>1&&(me||!n&&!i.options.sort&&!a)){var s=M(de,!1,!0,!0);pe.forEach((function(t){t!==de&&(Y(t,s),r.appendChild(t))})),me=!0}if(!n)if(me||Ee(),pe.length>1){var c=fe;i._showClone(e),i.options.animation&&!fe&&c&&ge.forEach((function(t){i.addAnimationState({target:t,rect:he}),t.fromRect=he,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){he=r({},e);var i=T(de,!0);he.top-=i.f,he.left-=i.e}},dragOverAnimationComplete:function(){me&&(me=!1,Ee())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!be)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),_(de,c.selectedClass,!~pe.indexOf(de)),~pe.indexOf(de))pe.splice(pe.indexOf(de),1),ce=null,W({sortable:i,rootEl:n,name:"deselect",targetEl:de,originalEvt:e});else{if(pe.push(de),W({sortable:i,rootEl:n,name:"select",targetEl:de,originalEvt:e}),e.shiftKey&&ce&&i.el.contains(ce)){var d,h,f=I(ce),p=I(de);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~pe.indexOf(u[h])||(_(u[h],c.selectedClass,!0),pe.push(u[h]),W({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvt:e}))}else ce=de;ue=s}if(be&&this.isMultiDrag){if((o[F].options.sort||o!==n)&&pe.length>1){var g=M(de),v=I(de,":not(."+this.options.selectedClass+")");if(!ve&&c.animation&&(de.thisAnimationDuration=null),s.captureAnimationState(),!ve&&(c.animation&&(de.fromRect=g,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==de){var e=me?M(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),Ee(),pe.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===I(de))){var m=!1;pe.forEach((function(t){t.sortableIndex===I(t)||(m=!0)})),m&&r("update")}pe.forEach((function(t){z(t)})),s.animateAll()}ue=s}(n===o||l&&"clone"!==l.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=be=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==be&&be||ue!==this.sortable||t&&E(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];_(e,this.options.selectedClass,!1),pe.shift(),W({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[F];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(ue&&ue!==e&&(ue.multiDrag._deselectMultiDrag(),ue=e),_(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[F],n=pe.indexOf(t);e&&e.options.multiDrag&&~n&&(_(t,e.options.selectedClass,!1),pe.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return pe.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=me&&o!==de?-1:me?I(o,":not(."+t.options.selectedClass+")"):I(o),n.push({multiDragElement:o,index:i})})),{items:s(pe),clones:[].concat(ge),oldIndicies:e,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}}})}function we(t,e){ge.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function Ee(){pe.forEach((function(t){t!==de&&t.parentNode&&t.parentNode.removeChild(t)}))}Yt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,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?m(document,"dragover",this._handleAutoScroll):this.options.supportPointer?m(document,"pointermove",this._handleFallbackAutoScroll):e.touches?m(document,"touchmove",this._handleFallbackAutoScroll):m(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(D),D=void 0},nulling:function(){Jt=Gt=Wt=te=Zt=qt=Vt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Jt=t,e||d||u||f){ie(t,this.options,r,e);var a=j(r,!0);!te||Zt&&o===qt&&i===Vt||(Zt&&ne(),Zt=setInterval((function(){var r=j(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ee()),ie(t,n.options,r,e)}),10),qt=o,Vt=i)}else{if(!this.options.bubbleScroll||j(r,!0)===x())return void ee();ie(t,this.options,j(r,!1),!1)}}},r(t,{pluginName:"scroll",initializeByDefault:!0})}),Yt.mount(le,ae),e.default=Yt}}]);
  //# sourceMappingURL=commons~pages.groups.labels.index~pages.projects.labels.index.097f0ebe.chunk.js.map