rb-document-form-constructor 0.8.53 → 0.8.54
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.
|
@@ -11424,6 +11424,7 @@ var __vue_render__$3 = function () {
|
|
|
11424
11424
|
ref: "inputContainer",
|
|
11425
11425
|
refInFor: true,
|
|
11426
11426
|
attrs: {
|
|
11427
|
+
"data-field": field.name,
|
|
11427
11428
|
"state": _vm.validationState[field.name],
|
|
11428
11429
|
"invalid-feedback": _vm.validationState[field.name + "__feedback"]
|
|
11429
11430
|
},
|
|
@@ -5,4 +5,4 @@ var RbDocumentFormConstructor=function(Vue,crypto){"use strict";function _intero
|
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_defineProperty(e,t,n[t])}))}return e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var version="1.10.2";function userAgent(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(e,t,n){e.addEventListener(t,n,!IE11OrLess&&captureMode)}function off(e,t,n){e.removeEventListener(t,n,!IE11OrLess&&captureMode)}function matches(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&matches(e,t):matches(e,t))||r&&e===n)return e;if(e===n)break}while(e=getParentOrHost(e))}return null}var R_SPACE=/\s+/g,_throttleTimeout;function toggleClass(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R_SPACE," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R_SPACE," ")}}function css(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function matrix(e,t){var n="";if("string"==typeof e)n=e;else do{var r=css(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function getWindowScrollingElement(){var e=document.scrollingElement;return e||document.documentElement}function getRect(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,l,s,c,u,p;if(e!==window&&e!==getWindowScrollingElement()?(a=(i=e.getBoundingClientRect()).top,l=i.left,s=i.bottom,c=i.right,u=i.height,p=i.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!IE11OrLess))do{if(o&&o.getBoundingClientRect&&("none"!==css(o,"transform")||n&&"static"!==css(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(css(o,"border-top-width")),l-=f.left+parseInt(css(o,"border-left-width")),s=a+i.height,c=l+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var d=matrix(o||e),h=d&&d.a,m=d&&d.d;d&&(s=(a/=m)+(u/=m),c=(l/=h)+(p/=h))}return{top:a,left:l,bottom:s,right:c,width:p,height:u}}}function isScrolledPast(e,t,n){for(var r=getParentAutoScrollElement(e,!0),o=getRect(e)[t];r;){var i=getRect(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,!1)}return!1}function getChild(e,t,n){for(var r=0,o=0,i=e.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Sortable.ghost&&i[o]!==Sortable.dragged&&closest(i[o],n.draggable,e,!1)){if(r===t)return i[o];r++}o++}return null}function lastChild(e,t){for(var n=e.lastElementChild;n&&(n===Sortable.ghost||"none"===css(n,"display")||t&&!matches(n,t));)n=n.previousElementSibling;return n||null}function index(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Sortable.clone||t&&!matches(e,t)||n++;return n}function getRelativeScrollOffset(e){var t=0,n=0,r=getWindowScrollingElement();if(e)do{var o=matrix(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function indexOfObject(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}function getParentAutoScrollElement(e,t){if(!e||!e.getBoundingClientRect)return getWindowScrollingElement();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||t)return n;r=!0}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function isRectEqual(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function throttle(e,t){return function(){if(!_throttleTimeout){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),_throttleTimeout=setTimeout((function(){_throttleTimeout=void 0}),t)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function clone(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var expando="Sortable"+(new Date).getTime();function AnimationStateManager(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==css(e,"display")&&e!==Sortable.ghost){t.push({target:e,rect:getRect(e)});var n=_objectSpread({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(indexOfObject(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,i=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=getRect(n),s=n.prevFromRect,c=n.prevToRect,u=e.rect,p=matrix(n,!0);p&&(l.top-=p.f,l.left-=p.e),n.toRect=l,n.thisAnimationDuration&&isRectEqual(s,l)&&!isRectEqual(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(t=calculateRealTime(u,s,c,r.options)),isRectEqual(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=r.options.animation),r.animate(n,u,l,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){css(e,"transition",""),css(e,"transform","");var o=matrix(this.el),i=o&&o.a,a=o&&o.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,css(e,"transform","translate3d("+l+"px,"+s+"px,0)"),repaint(e),css(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),css(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){css(e,"transition",""),css(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}}function repaint(e){return e.offsetWidth}function calculateRealTime(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function(e){for(var t in defaults)defaults.hasOwnProperty(t)&&!(t in e)&&(e[t]=defaults[t]);plugins.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";plugins.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](_objectSpread({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](_objectSpread({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in plugins.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,_extends(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return plugins.forEach((function(r){"function"==typeof r.eventProperties&&_extends(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return plugins.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};function dispatchEvent(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,p=e.newDraggableIndex,f=e.originalEvent,d=e.putSortable,h=e.extraEventProperties;if(t=t||n&&n[expando]){var m,v=t.options,g="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||IE11OrLess||Edge?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=l||n,m.item=o||n,m.clone=i,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=p,m.originalEvent=f,m.pullMode=d?d.lastPutMode:void 0;var b=_objectSpread({},h,PluginManager.getEventProperties(r,t));for(var _ in b)m[_]=b[_];n&&n.dispatchEvent(m),v[g]&&v[g].call(t,m)}}var pluginEvent=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=_objectWithoutProperties(n,["evt"]);PluginManager.pluginEvent.bind(Sortable)(e,t,_objectSpread({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:r,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(e){_dispatchEvent({sortable:t,name:e,originalEvent:r})}},o))};function _dispatchEvent(e){dispatchEvent(_objectSpread({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},e))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists="undefined"!=typeof document,PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),_detectDirection=function(e,t){var n=css(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=getChild(e,0,t),i=getChild(e,1,t),a=o&&css(o),l=i&&css(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+getRect(i).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(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[CSSFloatProperty]||i&&"none"===n[CSSFloatProperty]&&s+c>r)?"vertical":"horizontal"},_dragElInRowColumn=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return r===a||o===l||r+i/2===a+s/2},_detectNearestEmptySortable=function(e,t){var n;return sortables.some((function(r){if(!lastChild(r)){var o=getRect(r),i=r[expando].options.emptyInsertThreshold,a=e>=o.left-i&&e<=o.right+i,l=t>=o.top-i&&t<=o.bottom+i;return i&&a&&l?n=r:void 0}})),n},_prepareGroup=function(e){function t(e,n){return function(r,o,i,a){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var s=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},r=e.group;r&&"object"==_typeof$1(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&document.addEventListener("click",(function(e){if(ignoreNextClick)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick=!1,!1}),!0);var nearestEmptyInsertDetectEvent=function(e){if(dragEl){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[expando]._onDragOver(n)}}},_checkOutsideTargetEl=function(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_extends({},t),e[expando]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Sortable.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in PluginManager.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in _prepareGroup(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?on(e,"pointerdown",this._onTapStart):(on(e,"mousedown",this._onTapStart),on(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(e,"dragover",this),on(e,"dragenter",this)),sortables.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_extends(this,AnimationStateManager())}function _globalDragOver(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _onMove(e,t,n,r,o,i,a,l){var s,c,u=e[expando],p=u.options.onMove;return!window.CustomEvent||IE11OrLess||Edge?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=o||t,s.relatedRect=i||getRect(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),p&&(c=p.call(u,s,a)),c}function _disableDraggable(e){e.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsLast(e,t,n){var r=getRect(lastChild(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}function _getSwapDirection(e,t,n,r,o,i,a,l){var s=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,p=r?n.bottom:n.right,f=!1;if(!a)if(l&&targetMoveDistance<c*o){if(!pastFirstInvertThresh&&(1===lastDirection?s>u+c*i/2:s<p-c*i/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)f=!0;else if(1===lastDirection?s<u+targetMoveDistance:s>p-targetMoveDistance)return-lastDirection}else if(s>u+c*(1-o)/2&&s<p-c*(1-o)/2)return _getInsertDirection(t);return(f=f||a)&&(s<u+c*i/2||s>p-c*i/2)?s>u+c/2?1:-1:0}function _getInsertDirection(e){return index(dragEl)<index(e)?1:-1}function _generateId(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState(e){savedInputChecked.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(e){return setTimeout(e,0)}function _cancelNextTick(e){return clearTimeout(e)}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(lastTarget=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,dragEl):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=r.filter;if(_saveInputCheckedState(n),!dragEl&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled||s.isContentEditable||(l=closest(l,r.draggable,n,!1))&&l.animated||lastDownEl===l)){if(oldIndex=index(l),oldDraggableIndex=index(l,r.draggable),"function"==typeof c){if(c.call(this,e,l,this))return _dispatchEvent({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),pluginEvent("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=closest(s,r.trim(),n,!1))return _dispatchEvent({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),pluginEvent("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!closest(s,r.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!dragEl&&n.parentNode===i){var s=getRect(n);if(rootEl=i,parentEl=(dragEl=n).parentNode,nextEl=dragEl.nextSibling,lastDownEl=n,activeGroup=a.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(t||e).clientX,clientY:(t||e).clientY},tapDistanceLeft=tapEvt.clientX-s.left,tapDistanceTop=tapEvt.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,dragEl.style["will-change"]="all",r=function(){pluginEvent("delayEnded",o,{evt:e}),Sortable.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!FireFox&&o.nativeDraggable&&(dragEl.draggable=!0),o._triggerDragStart(e,t),_dispatchEvent({sortable:o,name:"choose",originalEvent:e}),toggleClass(dragEl,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){find(dragEl,e.trim(),_disableDraggable)})),on(l,"dragover",nearestEmptyInsertDetectEvent),on(l,"mousemove",nearestEmptyInsertDetectEvent),on(l,"touchmove",nearestEmptyInsertDetectEvent),on(l,"mouseup",o._onDrop),on(l,"touchend",o._onDrop),on(l,"touchcancel",o._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Edge||IE11OrLess))r();else{if(Sortable.eventCanceled)return void this._onDrop();on(l,"mouseup",o._disableDelayedDrag),on(l,"touchend",o._disableDelayedDrag),on(l,"touchcancel",o._disableDelayedDrag),on(l,"mousemove",o._delayedDragTouchMoveHandler),on(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&on(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):on(document,t?"touchmove":"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var n=this.options;!e&&toggleClass(dragEl,n.dragClass,!1),toggleClass(dragEl,n.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY))!==t;)t=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),t)do{if(t[expando]){if(t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(e){if(tapEvt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=ghostEl&&matrix(ghostEl,!0),a=ghostEl&&i&&i.a,l=ghostEl&&i&&i.d,s=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),c=(o.clientX-tapEvt.clientX+r.x)/(a||1)+(s?s[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),u=(o.clientY-tapEvt.clientY+r.y)/(l||1)+(s?s[1]-ghostRelativeParentInitialScroll[1]:0)/(l||1);if(!Sortable.active&&!awaitingDragStarted){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ghostEl){i?(i.e+=c-(lastDx||0),i.f+=u-(lastDy||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");css(ghostEl,"webkitTransform",p),css(ghostEl,"mozTransform",p),css(ghostEl,"msTransform",p),css(ghostEl,"transform",p),lastDx=c,lastDy=u,touchEvt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,t=getRect(dragEl,!0,PositionGhostAbsolutely,!0,e),n=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=e;"static"===css(ghostRelativeParent,"position")&&"none"===css(ghostRelativeParent,"transform")&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),t.top+=ghostRelativeParent.scrollTop,t.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}toggleClass(ghostEl=dragEl.cloneNode(!0),n.ghostClass,!1),toggleClass(ghostEl,n.fallbackClass,!0),toggleClass(ghostEl,n.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",t.top),css(ghostEl,"left",t.left),css(ghostEl,"width",t.width),css(ghostEl,"height",t.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,e.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;pluginEvent("dragStart",this,{evt:e}),Sortable.eventCanceled?this._onDrop():(pluginEvent("setupClone",this),Sortable.eventCanceled||((cloneEl=clone(dragEl)).draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),n.cloneId=_nextTick((function(){pluginEvent("clone",n),Sortable.eventCanceled||(n.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),n._hideClone(),_dispatchEvent({sortable:n,name:"clone"}))})),!t&&toggleClass(dragEl,o.dragClass,!0),t?(ignoreNextClick=!0,n._loopId=setInterval(n._emulateDragOver,50)):(off(document,"mouseup",n._onDrop),off(document,"touchend",n._onDrop),off(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,dragEl)),on(document,"drop",n),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,n._dragStartId=_nextTick(n._dragStarted.bind(n,t,e)),on(document,"selectstart",n),moved=!0,Safari&&css(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,a=e.target,l=this.options,s=l.group,c=Sortable.active,u=activeGroup===s,p=l.sort,f=putSortable||c,d=this,h=!1;if(!_silent){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=closest(a,l.draggable,i,!0),O("dragOver"),Sortable.eventCanceled)return h;if(dragEl.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||d._ignoreWhileAnimating===a)return k(!1);if(ignoreNextClick=!1,c&&!l.disabled&&(u?p||(r=!rootEl.contains(dragEl)):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,c,dragEl,e))&&s.checkPut(this,c,dragEl,e))){if(o="vertical"===this._getDirection(e,a),t=getRect(dragEl),O("dragOverValid"),Sortable.eventCanceled)return h;if(r)return parentEl=rootEl,F(),this._hideClone(),O("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),k(!0);var m=lastChild(i,l.draggable);if(!m||_ghostIsLast(e,o,this)&&!m.animated){if(m===dragEl)return k(!1);if(m&&i===e.target&&(a=m),a&&(n=getRect(a)),!1!==_onMove(rootEl,i,dragEl,t,a,n,e,!!a))return F(),i.appendChild(dragEl),parentEl=i,P(),k(!0)}else if(a.parentNode===i){n=getRect(a);var v,g,b,_=dragEl.parentNode!==i,y=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||t,a.animated&&a.toRect||n,o),E=o?"top":"left",x=isScrolledPast(a,"top","top")||isScrolledPast(dragEl,"top","top"),S=x?x.scrollTop:void 0;if(lastTarget!==a&&(g=n[E],pastFirstInvertThresh=!1,isCircumstantialInvert=!y&&l.invertSwap||_),0!==(v=_getSwapDirection(e,a,n,o,y?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,isCircumstantialInvert,lastTarget===a))){var w=index(dragEl);do{w-=v,b=parentEl.children[w]}while(b&&("none"===css(b,"display")||b===ghostEl))}if(0===v||b===a)return k(!1);lastTarget=a,lastDirection=v;var C=a.nextElementSibling,I=!1,D=_onMove(rootEl,i,dragEl,t,a,n,e,I=1===v);if(!1!==D)return 1!==D&&-1!==D||(I=1===D),_silent=!0,setTimeout(_unsilent,30),F(),I&&!C?i.appendChild(dragEl):a.parentNode.insertBefore(dragEl,I?C:a),x&&scrollBy(x,0,S-x.scrollTop),parentEl=dragEl.parentNode,void 0===g||isCircumstantialInvert||(targetMoveDistance=Math.abs(g-getRect(a)[E])),P(),k(!0)}if(i.contains(dragEl))return k(!1)}return!1}function O(l,s){pluginEvent(l,d,_objectSpread({evt:e,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:a,completed:k,onMove:function(n,r){return _onMove(rootEl,i,dragEl,t,n,getRect(n),e,r)},changed:P},s))}function F(){O("dragOverAnimationCapture"),d.captureAnimationState(),d!==f&&f.captureAnimationState()}function k(t){return O("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(d),d!==f&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:c.options.ghostClass,!1),toggleClass(dragEl,l.ghostClass,!0)),putSortable!==d&&d!==Sortable.active?putSortable=d:d===Sortable.active&&putSortable&&(putSortable=null),f===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){O("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===dragEl&&!dragEl.animated||a===i&&!a.animated)&&(lastTarget=null),l.dragoverBubble||e.rootEl||a===document||(dragEl.parentNode[expando]._isOutsideThisEl(e.target),!t&&nearestEmptyInsertDetectEvent(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function P(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,l.draggable),_dispatchEvent({sortable:d,name:"change",toEl:i,newIndex:newIndex,newDraggableIndex:newDraggableIndex,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop),off(e,"touchend",this._onDrop),off(e,"pointerup",this._onDrop),off(e,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),pluginEvent("drop",this,{evt:e}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),Sortable.eventCanceled||(awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),e&&(moved&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&"clone"!==putSortable.lastPutMode)&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&(null!=newIndex&&-1!==newIndex||(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach((function(e){e.checked=!0})),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)closest(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||_generateId(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,r){var o=n.children[r];closest(o,this.options.draggable,n,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return closest(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=PluginManager.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&_prepareGroup(n)},destroy:function(){pluginEvent("destroy",this);var e=this.el;e[expando]=null,off(e,"mousedown",this._onTapStart),off(e,"touchstart",this._onTapStart),off(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(e,"dragover",this),off(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;rootEl.contains(dragEl)&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}else this._hideClone()}},documentExists&&on(document,"touchmove",(function(e){(Sortable.active||awaitingDragStarted)&&e.cancelable&&e.preventDefault()})),Sortable.utils={on:on,off:off,css:css,find:find,is:function(e,t){return!!closest(e,t,e,!1)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild:getChild},Sortable.get=function(e){return e[expando]},Sortable.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Sortable.utils=_objectSpread({},Sortable.utils,e.utils)),PluginManager.mount(e)}))},Sortable.create=function(e,t){return new Sortable(e,t)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):t.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(touchEvt$1=e,t||Edge||IE11OrLess||Safari){autoScroll(e,this.options,i,t);var a=getParentAutoScrollElement(i,!0);!scrolling||pointerElemChangedInterval&&r===lastAutoScrollX&&o===lastAutoScrollY||(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval((function(){var i=getParentAutoScrollElement(document.elementFromPoint(r,o),!0);i!==a&&(a=i,clearAutoScrolls()),autoScroll(e,n.options,i,t)}),10),lastAutoScrollX=r,lastAutoScrollY=o)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(i,!0)===getWindowScrollingElement())return void clearAutoScrolls();autoScroll(e,this.options,getParentAutoScrollElement(i,!1),!1)}}},_extends(e,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach((function(e){clearInterval(e.pid)})),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle((function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=getWindowScrollingElement(),u=!1;scrollRootEl!==n&&(scrollRootEl=n,clearAutoScrolls(),scrollEl=t.scroll,o=t.scrollFn,!0===scrollEl&&(scrollEl=getParentAutoScrollElement(n,!0)));var p=0,f=scrollEl;do{var d=f,h=getRect(d),m=h.top,v=h.bottom,g=h.left,b=h.right,_=h.width,y=h.height,E=void 0,x=void 0,S=d.scrollWidth,w=d.scrollHeight,C=css(d),I=d.scrollLeft,D=d.scrollTop;d===c?(E=_<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),x=y<w&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=_<S&&("auto"===C.overflowX||"scroll"===C.overflowX),x=y<w&&("auto"===C.overflowY||"scroll"===C.overflowY));var O=E&&(Math.abs(b-i)<=l&&I+_<S)-(Math.abs(g-i)<=l&&!!I),F=x&&(Math.abs(v-a)<=l&&D+y<w)-(Math.abs(m-a)<=l&&!!D);if(!autoScrolls[p])for(var k=0;k<=p;k++)autoScrolls[k]||(autoScrolls[k]={});autoScrolls[p].vx==O&&autoScrolls[p].vy==F&&autoScrolls[p].el===d||(autoScrolls[p].el=d,autoScrolls[p].vx=O,autoScrolls[p].vy=F,clearInterval(autoScrolls[p].pid),0==O&&0==F||(u=!0,autoScrolls[p].pid=setInterval(function(){r&&0===this.layer&&Sortable.active._onTouchMove(touchEvt$1);var t=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*s:0,n=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Sortable.dragged.parentNode[expando],n,t,e,touchEvt$1,autoScrolls[this.layer].el)||scrollBy(autoScrolls[this.layer].el,n,t)}.bind({layer:p}),24))),p++}while(t.bubbleScroll&&f!==c&&(f=getParentAutoScrollElement(f,!1)));scrolling=u}}),30),drop=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Revert(){}function Remove(){}Revert.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=getChild(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:drop},_extends(Revert,{pluginName:"revertOnSpill"}),Remove.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);var vuedraggable_umd=createCommonjsModule((function(e,t){var n;"undefined"!=typeof self&&self,n=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"01f9":function(e,t,n){var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),l=n("84f2"),s=n("41a0"),c=n("7f20"),u=n("38fd"),p=n("2b4c")("iterator"),f=!([].keys&&"next"in[].keys()),d="keys",h="values",m=function(){return this};e.exports=function(e,t,n,v,g,b,_){s(n,t,v);var y,E,x,S=function(e){if(!f&&e in D)return D[e];switch(e){case d:case h:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",C=g==h,I=!1,D=e.prototype,O=D[p]||D["@@iterator"]||g&&D[g],F=O||S(g),k=g?C?S("entries"):F:void 0,P="Array"==t&&D.entries||O;if(P&&(x=u(P.call(new e)))!==Object.prototype&&x.next&&(c(x,w,!0),r||"function"==typeof x[p]||a(x,p,m)),C&&O&&O.name!==h&&(I=!0,F=function(){return O.call(this)}),r&&!_||!f&&!I&&D[p]||a(D,p,F),l[t]=F,l[w]=m,g)if(y={values:C?F:S(h),keys:b?F:S(d),entries:k},_)for(E in y)E in D||i(D,E,y[E]);else o(o.P+o.F*(f||I),t,y);return y}},"02f4":function(e,t,n){var r=n("4588"),o=n("be13");e.exports=function(e){return function(t,n){var i,a,l=String(o(t)),s=r(n),c=l.length;return s<0||s>=c?e?"":void 0:(i=l.charCodeAt(s))<55296||i>56319||s+1===c||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):i:e?l.slice(s,s+2):a-56320+(i-55296<<10)+65536}}},"0390":function(e,t,n){var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"0bfb":function(e,t,n){var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var r=n("ce10"),o=n("e11e");e.exports=Object.keys||function(e){return r(e,o)}},1495:function(e,t,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),l=a.length,s=0;l>s;)r.f(e,n=a[s++],t[n]);return e}},"214f":function(e,t,n){n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),l=n("2b4c"),s=n("520a"),c=l("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=l(e),d=!i((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),h=d?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!t})):void 0;if(!d||!h||"replace"===e&&!u||"split"===e&&!p){var m=/./[f],v=n(a,f,""[e],(function(e,t,n,r,o){return t.exec===s?d&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=v[0],b=v[1];r(String.prototype,e,g),o(RegExp.prototype,f,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"230e":function(e,t,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"23c6":function(e,t,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},2621:function(e,t){t.f=Object.getOwnPropertySymbols},"2aba":function(e,t,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),l=n("fa5b"),s="toString",c=(""+l).split(s);n("8378").inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||l.call(this)}))},"2aeb":function(e,t,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),l=function(){},s=function(){var e,t=n("230e")("iframe"),r=i.length;for(t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},"2b4c":function(e,t,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(e){return!!~o(this,e,i).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(e,t,n){var r=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"38fd":function(e,t,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"41a0":function(e,t,n){var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},"456d":function(e,t,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(e){return o(r(e))}}))},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},5147:function(e,t,n){var r=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},"520a":function(e,t,n){var r,o,i=n("0bfb"),a=RegExp.prototype.exec,l=String.prototype.replace,s=a,c=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(s=function(e){var t,n,r,o,s=this;return u&&(n=new RegExp("^"+s.source+"$(?!\\s)",i.call(s))),c&&(t=s.lastIndex),r=a.call(s,e),c&&r&&(s.lastIndex=s.global?r.index+r[0].length:t),u&&r&&r.length>1&&l.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=s},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),l=n("9b43"),s=function(e,t,n){var c,u,p,f,d=e&s.F,h=e&s.G,m=e&s.S,v=e&s.P,g=e&s.B,b=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,_=h?o:o[t]||(o[t]={}),y=_.prototype||(_.prototype={});for(c in h&&(n=t),n)p=((u=!d&&b&&void 0!==b[c])?b:n)[c],f=g&&u?l(p,r):v&&"function"==typeof p?l(Function.call,p):p,b&&a(b,c,p,e&s.U),_[c]!=p&&i(_,c,f),v&&y[c]!=p&&(y[c]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},"5eda":function(e,t,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},"5f1b":function(e,t,n){var r=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"613b":function(e,t,n){var r=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return r[e]||(r[e]=o(e))}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},6762:function(e,t,n){var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var r=n("626a"),o=n("be13");e.exports=function(e){return r(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var r=n("d3f4");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(e,t,n){var r=n("0d58"),o=n("2621"),i=n("52a7"),a=n("4bf8"),l=n("626a"),s=Object.assign;e.exports=!s||n("79e5")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r}))?function(e,t){for(var n=a(e),s=arguments.length,c=1,u=o.f,p=i.f;s>c;)for(var f,d=l(arguments[c++]),h=u?r(d).concat(u(d)):r(d),m=h.length,v=0;m>v;)p.call(d,f=h[v++])&&(n[f]=d[f]);return n}:s},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var r=n("4588"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7f20":function(e,t,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"9b43":function(e,t,n){var r=n("d8e8");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),o=Array.prototype;null==o[r]&&n("32e9")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"9def":function(e,t,n){var r=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(t,n){t.exports=e},a481:function(e,t,n){var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),l=n("0390"),s=n("5f1b"),c=Math.max,u=Math.min,p=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var p=r(e),f=String(this),d="function"==typeof t;d||(t=String(t));var v=p.global;if(v){var g=p.unicode;p.lastIndex=0}for(var b=[];;){var _=s(p,f);if(null===_)break;if(b.push(_),!v)break;""===String(_[0])&&(p.lastIndex=l(f,i(p.lastIndex),g))}for(var y,E="",x=0,S=0;S<b.length;S++){_=b[S];for(var w=String(_[0]),C=c(u(a(_.index),f.length),0),I=[],D=1;D<_.length;D++)I.push(void 0===(y=_[D])?y:String(y));var O=_.groups;if(d){var F=[w].concat(I,C,f);void 0!==O&&F.push(O);var k=String(t.apply(void 0,F))}else k=m(w,f,C,I,O,t);C>=x&&(E+=f.slice(x,C)+k,x=C+w.length)}return E+f.slice(x)}];function m(e,t,r,i,a,l){var s=r+e.length,c=i.length,u=d;return void 0!==a&&(a=o(a),u=f),n.call(l,u,(function(n,o){var l;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(s);case"<":l=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var f=p(u/10);return 0===f?n:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):n}l=i[u-1]}return void 0===l?"":l}))}}))},aae3:function(e,t,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},ac6a:function(e,t,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),l=n("32e9"),s=n("84f2"),c=n("2b4c"),u=c("iterator"),p=c("toStringTag"),f=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),m=0;m<h.length;m++){var v,g=h[m],b=d[g],_=a[g],y=_&&_.prototype;if(y&&(y[u]||l(y,u,f),y[p]||l(y,p,g),s[g]=f,b))for(v in r)y[v]||i(y,v,r[v],!0)}},b0c5:function(e,t,n){var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},be13:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,n){var r=n("6821"),o=n("9def"),i=n("77f1");e.exports=function(e){return function(t,n,a){var l,s=r(t),c=o(s.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}}},c649:function(e,t,n){(function(e){n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return s})),n("a481");var r,o,i="undefined"!=typeof window?window.console:e.console,a=/-(\w)/g,l=(r=function(e){return e.replace(a,(function(e,t){return t?t.toUpperCase():""}))},o=Object.create(null),function(e){return o[e]||(o[e]=r(e))});function s(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,n){var r=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}}).call(this,n("c8ba"))},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},cadf:function(e,t,n){var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");e.exports=n("01f9")(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(e,t,n){var r=n("d3f4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ce10:function(e,t,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");e.exports=function(e,t){var n,l=o(e),s=0,c=[];for(n in l)n!=a&&r(l,n)&&c.push(n);for(;t.length>s;)r(l,n=t[s++])&&(~i(c,n)||c.push(n));return c}},d2c8:function(e,t,n){var r=n("aae3"),o=n("be13");e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(e,t,n){var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",l="".startsWith;r(r.P+r.F*n("5147")(a),"String",{startsWith:function(e){var t=i(this,e,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return l?l.call(t,r,n):t.slice(n,n+r.length)===r}})},f6fd:function(e,t){!function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})}(document)},f751:function(e,t,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var r=n("7726").document;e.exports=r&&r.documentElement},fb15:function(e,t,n){var r;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||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.")}()}n.r(t),"undefined"!=typeof window&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1])),n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb");var s=n("a352"),c=n.n(s),u=n("c649");function p(e,t){var n=this;this.$nextTick((function(){return n.$emit(e.toLowerCase(),t)}))}function f(e){var t=this;return function(n){null!==t.realList&&t["onDrag"+e](n),p.call(t,e,n)}}function d(e){return["transition-group","TransitionGroup"].includes(e)}function h(e,t,n){return e[n]||(t[n]?t[n]():void 0)}var m=["Start","Add","Remove","Update","End"],v=["Choose","Unchoose","Sort","Filter","Clone"],g=["Move"].concat(m,v).map((function(e){return"on"+e})),b=null,_={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;var t=a(e,1)[0].componentOptions;return!!t&&d(t.tag)}(t);var n=function(e,t,n){var r=0,o=0,i=h(t,n,"header");i&&(r=i.length,e=e?[].concat(l(i),l(e)):l(i));var a=h(t,n,"footer");return a&&(o=a.length,e=e?[].concat(l(e),l(a)):l(a)),{children:e,headerOffset:r,footerOffset:o}}(t,this.$slots,this.$scopedSlots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var s=function(e,t){var n=null,r=function(e,t){n=function(e,t,n){return void 0===n||((e=e||{})[t]=n),e}(n,e,t)};if(r("attrs",Object.keys(e).filter((function(e){return"id"===e||e.startsWith("data-")})).reduce((function(t,n){return t[n]=e[n],t}),{})),!t)return n;var o=t.on,i=t.props,a=t.attrs;return r("on",o),r("props",i),Object.assign(n.attrs,a),n}(this.$attrs,this.componentData);return e(this.getTag(),s,r)},created:function(){null!==this.list&&null!==this.value&&u.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&u.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&u.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};m.forEach((function(n){t["on"+n]=f.call(e,n)})),v.forEach((function(n){t["on"+n]=p.bind(e,n)}));var n=Object.keys(this.$attrs).reduce((function(t,n){return t[Object(u.a)(n)]=e.$attrs[n],t}),{}),r=Object.assign({},this.options,n,t,{onMove:function(t,n){return e.onDragMove(t,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new c.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var e=this._vnode.fnOptions;return e&&e.functional},getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var n=Object(u.a)(t);-1===g.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick((function(){e.visibleIndexes=function(e,t,n,r){if(!e)return[];var o=e.map((function(e){return e.elm})),i=t.length-r,a=l(t).map((function(e,t){return t>=i?o.length:o.indexOf(e)}));return n?a.filter((function(e){return-1!==e})):a}(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)}))},getUnderlyingVm:function(e){var t=function(e,t){return e.map((function(e){return e.elm})).indexOf(t)}(this.getChildrenNodes()||[],e);return-1===t?null:{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&d(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t},emitChanges:function(e){var t=this;this.$nextTick((function(){t.$emit("change",e)}))},alterList:function(e){if(this.list)e(this.list);else{var t=l(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,l(e))};this.alterList(t)},updatePosition:function(e,t){var n=function(n){return n.splice(t,0,n.splice(e,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,r=this.getUnderlyingPotencialDraggableComponent(t);if(!r)return{component:r};var o=r.realList,i={list:o,component:r};if(t!==n&&o&&r.getUnderlyingVm){var a=r.getUnderlyingVm(n);if(a)return Object.assign(a,i)}return i},getVmIndex:function(e){var t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[e].data=null;var t=this.getComponent();t.children=[],t.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),b=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(u.d)(e.item);var n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();var r={element:t,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(e){if(Object(u.c)(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})}else Object(u.d)(e.clone)},onDragUpdate:function(e){Object(u.d)(e.item),Object(u.c)(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);var r={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=l(t.to.children).filter((function(e){return"none"!==e.style.display})),r=n.indexOf(t.related),o=e.component.getVmIndex(r);return-1===n.indexOf(b)&&t.willInsertAfter?o+1:o},onDragMove:function(e,t){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(r,e);return Object.assign(o,{futureIndex:i}),n(Object.assign({},e,{relatedContext:r,draggedContext:o}),t)},onDragEnd:function(){this.computeIndexes(),b=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",_);var y=_;t.default=y}}).default},e.exports=n(Sortable)})),script$4={name:"DocTemplateFacetList",components:{draggable:vuedraggable_umd},props:{facets:{type:Array,default:function(){return[]}}},data:function(){return{allFacets:[],innerFacets:[],facetSearchStr:null}},computed:{iconExpandFacet:function(){return UtFormConstructor.config.icons.iconExpandFacet},iconCollapseFacet:function(){return UtFormConstructor.config.icons.iconCollapseFacet}},watch:{facetSearchStr:function(){this.findInFacets(this.facetSearchStr)},facets:function(){this.handleFacetsProp()}},methods:{onFieldCloned:function(e){var t=JSON.parse(JSON.stringify(e));return t.input=UtFormConstructor.getDefaultInput(t),t},onFieldMoveEnd:function(e){this.$emit("fieldMoveEnd",e)},findInFacets:function(e){(e=e.toLowerCase())&&0!==e.length||(this.innerFacets=this.allFacets);var t=JSON.parse(JSON.stringify(this.allFacets));t=t.filter((function(t){var n=!1;return t.fields=t.fields.filter((function(t){var r=t.labelRu.toLowerCase().indexOf(e)>=0;return r&&(n=!0),r})),n})),this.innerFacets=t},handleFacetsProp:function(){var e=this.facets.map((function(e){return _objectSpread2(_objectSpread2({},e),{},{expanded:!1})}));e&&e.forEach((function(e){e.fields=e.fields.filter((function(e){return!e.hiddenOnFormConfig}))})),this.innerFacets=JSON.parse(JSON.stringify(e)),this.allFacets=JSON.parse(JSON.stringify(e))}},created:function(){this.handleFacetsProp()}},__vue_script__$4=script$4,__vue_render__$4=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rb-facets-sidebar"},[n("h4",[e._v("Компоненты")]),e._v(" "),n("b-form",[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",[n("b-form-input",{attrs:{placeholder:"Название поля"},model:{value:e.facetSearchStr,callback:function(t){e.facetSearchStr=t},expression:"facetSearchStr"}})],1)],1)],1)],1),e._v(" "),n("div",{staticClass:"rb-facet-list"},e._l(e.innerFacets,(function(t){return t.fields.length>0?n("div",{key:t.name,staticClass:"rb-facet"},[n("h6",{staticClass:"rb-facet-label d-flex cursor-pointer",on:{click:function(e){t.expanded=!t.expanded}}},[n("rb-text",{staticClass:"flex-fill"},[e._v(e._s(t.labelRu))]),e._v(" "),n("rb-icon",{attrs:{icon:t.expanded?e.iconCollapseFacet:e.iconExpandFacet}})],1),e._v(" "),t.expanded?n("b-list-group",[n("draggable",{attrs:{clone:e.onFieldCloned,animation:200,group:{name:"fields",pull:"clone",put:!1},"ghost-class":"rb-facet-field-moving"},on:{end:function(t){return e.onFieldMoveEnd(t)}},model:{value:t.fields,callback:function(n){e.$set(t,"fields",n)},expression:"facet.fields"}},e._l(t.fields,(function(t){return n("b-list-group-item",{key:t.name,staticClass:"cursor-pointer",attrs:{id:t.name+"Sidebar"}},[n("rb-text",[e._v(e._s(t.labelRu))])],1)})),1)],1):e._e()],1):e._e()})),0)],1)},__vue_staticRenderFns__$4=[],__vue_inject_styles__$4=void 0,__vue_scope_id__$4=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$4=!1,__vue_component__$5=normalizeComponent({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$4,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$4,!1,void 0,void 0,void 0),DocTemplateFacetList=__vue_component__$5;const rnds8Pool=new Uint8Array(256);let poolPtr=rnds8Pool.length;function rng(){return poolPtr>rnds8Pool.length-16&&(crypto__default.default.randomFillSync(rnds8Pool),poolPtr=0),rnds8Pool.slice(poolPtr,poolPtr+=16)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&®EX.test(e)}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).substr(1));function stringify(e,t=0){const n=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(!validate(n))throw TypeError("Stringified UUID is invalid");return n}function v4(e,t,n){const r=(e=e||{}).random||(e.rng||rng)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return stringify(r)}var toString=Object.prototype.toString,_typeof=function(e){var t=typeof e;return"undefined"===t?"undefined":(e?t=e.constructor.name:"object"===t&&(t=toString.call(e).slice(8,-1)),t.toLowerCase())},script$3={name:"DocForm",props:{formConfig:Object,applyDefaultValues:{type:Boolean,default:!0},doc:{type:Object,default:function(){return{}}},refSuffix:{type:String,default:"Id"},editable:{type:Boolean,default:!0},displayField:{type:String,default:"labelRu"},showRequiredInLabel:{type:Boolean,default:!0}},data:function(){return{validationState:{}}},watch:{formConfig:function(){this.validationState={},this.execApplyDefaultValues(),this.execApplyDefaultValRule()}},methods:{getResolveValueName:function(e){return!e.dict&&!e.ref||e.multiple?e.name:e.name.substring(0,e.name.length-2)},getResolveValue:function(e){return this.doc[this.getResolveValueName(e)]?this.doc[this.getResolveValueName(e)]:null},setResolveValue:function(e){var t=e.field;e.multiple,this.getResolveValue(t)},getDisplayField:function(e){return e[this.displayField]?e[this.displayField]:e.labelRu},onEventFired:function(e,t,n){var r=this;if("input"===e&&n.ref&&!n.multiple){var o=null;n.name.lastIndexOf(this.refSuffix)>=0&&(o=n.name.substring(0,n.name.lastIndexOf(this.refSuffix))),o&&o.length>0&&(this.doc[o]=null)}n.rules&&n.rules.forEach((function(n){n.event===e&&n.script&&r.runRule(n,{event:t,eventName:e})}))},onGlobalEventFired:function(e,t){var n=this;UtFormConfig.getFields(this.formConfig).forEach((function(r){r.rules&&r.rules.forEach((function(r){r.event===e&&n.runRule(r,{event:t,eventName:e})}))}))},createRuleContext:function(e){return Object.assign(_objectSpread2({form:this,doc:this.doc},e),UtFormConstructor.getRuleContext())},runRule:function(e,t){UtFormConstructor.runRule(this.createRuleContext(t),e.script)},isValueEmpty:function(e){var t;return null==this.doc[e]||(!(!Array.isArray(this.doc[e])||null!==(t=this.doc[e])&&void 0!==t&&t.length)||!(!_typeof("string"===this.doc[e])||""!==this.doc[e]))},isValueLessThanMax:function(e,t){var n;return!(!this.doc[e]||!t)&&(null===(n=this.doc[e])||void 0===n?void 0:n.length)>parseInt(t)},isValueLessThanMin:function(e,t){return!(!this.doc[e]||!t)&&parseInt(this.doc[e])<parseInt(t)},validate:function(){var e=this;for(var t in this.formConfig.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){var n,r,o="";(t.required&&e.isValueEmpty(t.name)&&(o+='Поле "'.concat(e.getDisplayField(t),'" обязательно')),"integer"===t.type&&e.isValueLessThanMin(t.name,t.input.propsData.min)&&(o+="\nМинимальное значение для этого поля ".concat(t.input.propsData.min)),"b-form-textarea"===t.input.type&&e.isValueLessThanMax(t.name,null===(n=t.input.propsData)||void 0===n?void 0:n.max))&&(o+="\nМаксимальное значение для этого поля ".concat(null===(r=t.input.propsData)||void 0===r?void 0:r.max));o?(Vue__default.default.set(e.validationState,t.name,!1),Vue__default.default.set(e.validationState,"".concat(t.name,"__feedback"),o)):Vue__default.default.set(e.validationState,t.name,null),e.onEventFired("validate",{validationState:e.validationState,doc:e.doc},t)}))}))})),this.validationState)if(!1===this.validationState[t])return!1;return!0},getColumnSize:function(e){return e&&e.columnCount?Math.floor(12/e.columnCount):12},execApplyDefaultValues:function(){var e=this;this.applyDefaultValues&&this.formConfig.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){var n;t.defaultValue&&(n=e.defaultValue&&"function"===_typeof(t.defaultValue)?t.defaultValue():null==t.defaultValue?null:t.defaultValue,e.$set(e.doc,t.name,t.defaultValue=n))}))}))}))},execApplyDefaultValRule:function execApplyDefaultValRule(){var _this5=this;this.formConfig.sections.forEach((function(el){el.columns.forEach((function(c){c.fields.forEach((function(f){if(f.rules&&!f.defaultValue){var rule=f.rules.find((function(e){return"defaultValue"===e.event}));rule&&!_this5.doc[f.name]&&_this5.$set(_this5.doc,f.name,f.defaultValue=eval(rule.script))}}))}))}))}},mounted:function(){this.execApplyDefaultValues(),this.execApplyDefaultValRule(),this.onGlobalEventFired("form-mounted",this)},activated:function(){this.execApplyDefaultValues(),this.execApplyDefaultValRule(),this.onGlobalEventFired("form-activated",this)}},__vue_script__$3=script$3,__vue_render__$3=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.formConfig?n("b-form",{staticClass:"rb-doc-form"},e._l(e.formConfig.sections,(function(t){return e.formConfig&&e.formConfig.sections?n("b-container",{key:t.labelRu,staticClass:"rb-form-section"},[n("b-row",[n("b-col",{attrs:{lg:"12"}},[n("h4",[e._v(e._s(e.getDisplayField(t)))])]),e._v(" "),e._l(t.columns,(function(r){return[n("b-col",{key:r.index,attrs:{lg:e.getColumnSize(t),sm:12}},[e._l(r.fields,(function(t){return[e._v("\n "+e._s(t.valueName)+"\n "),t.visible?n("b-form-row",{key:t.name},[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{ref:"inputContainer",refInFor:!0,attrs:{state:e.validationState[t.name],"invalid-feedback":e.validationState[t.name+"__feedback"]},scopedSlots:e._u([{key:"label",fn:function(){return[n("span",{attrs:{title:e.getDisplayField(t)}},[e._v(e._s(e.getDisplayField(t)))]),e._v(" "),e.showRequiredInLabel&&t.required?n("span",{staticClass:"text-danger"},[e._v("*")]):e._e()]},proxy:!0}],null,!0)},[n(t.input.type,e._b({ref:t.ref?t.ref:t.name,refInFor:!0,tag:"component",attrs:{"resolve-value":e.getResolveValue(t),disabled:!e.editable||!t.editable,id:t.name,state:e.validationState[t.name],required:t.required},on:{"hook:created":function(n){return e.onEventFired("created",n,t)},"hook:destroyed":function(n){return e.onEventFired("destroyed",n,t)},"hook:activated":function(n){return e.onEventFired("activated",n,t)},"hook:mounted":function(n){return e.onEventFired("mounted",n,t)},input:function(n){return e.onEventFired("input",n,t)},change:function(n){return e.onEventFired("change",n,t)},click:function(n){return e.onEventFired("click",n,t)},"set-resolve-value":e.setResolveValue},model:{value:e.doc[t.name],callback:function(n){e.$set(e.doc,t.name,n)},expression:"doc[field.name]"}},"component",t.input.propsData,!1))],1)],1)],1):e._e()]}))],2)]}))],2)],1):e._e()})),1):e._e()},__vue_staticRenderFns__$3=[],__vue_inject_styles__$3=void 0,__vue_scope_id__$3=void 0,__vue_module_identifier__$3=void 0,__vue_is_functional_template__$3=!1,__vue_component__$4=normalizeComponent({render:__vue_render__$3,staticRenderFns:__vue_staticRenderFns__$3},__vue_inject_styles__$3,__vue_script__$3,__vue_scope_id__$3,__vue_is_functional_template__$3,__vue_module_identifier__$3,!1,void 0,void 0,void 0),DocForm=__vue_component__$4,script$2={name:"FieldRuleFormModal",components:{DocForm:DocForm},props:{field:Object,rule:Object,formConfig:Object,mode:{type:String,default:"ins"},onAfterOk:Function},data:function(){return{id:"rb-field-rule-form-modal",state:this.getDefaultState(),innerFormConfig:null,innerRule:null}},computed:{title:function(){return"ins"===this.mode?"Добавление правила":"Редактирование правила"},fields:function(){return UtFormConfig.getFields(this.formConfig)},rulePresets:function(){return UtFormConstructor.getAvailableFieldRules(this.field)}},watch:{formConfig:function(){this.copyToInnerFormConfig()},rule:function(){this.rule?this.innerRule=this.rule:this.innerRule=this.getDefaultRule()}},methods:{validateFields:function(e){var t=this;(e?[e]:["name","event","script"]).forEach((function(e){t.innerRule[e]?(t.state[e]=!0,t.state["".concat(e,"_feedback")]=null):(t.state[e]=!1,t.state["".concat(e,"_feedback")]="Заполните название")}))},copyToInnerFormConfig:function(){this.innerFormConfig=JSON.parse(JSON.stringify(this.formConfig))},applyRuleToInnerFormConfig:function(){if(this.innerFormConfig){var e=UtFormConfig.findRule(this.innerRule.id,this.innerFormConfig);if(e)Object.assign(e,this.innerRule);else{var t=UtFormConfig.findField(this.field.name,this.innerFormConfig);t&&(t.rules=t.rules?t.rules:[],t.rules.push(this.rule))}}},onActivateTab:function(e){e>0&&(this.copyToInnerFormConfig(),this.applyRuleToInnerFormConfig())},getDefaultState:function(){return{name:null,event:null,script:null}},getDefaultRule:function(){return{id:v4(),name:null,event:null,script:null}},resetModal:function(){this.state=this.getDefaultState(),this.innerRule=null},addVariableToScript:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript(e,t)},addSetVariableToScript:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript("doc['".concat(e.name,"'] = Значение;"),t)},addCallInputFunction:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript("form.$refs['".concat(e.name,"'][0].Название функции();"),t)},insertTextToScript:function(e,t){t=null!=t?t:this.script.length,this.innerRule.script=null!=this.innerRule.script?this.innerRule.script:"";var n=this.innerRule.script.split("");n.splice(t,0,e),this.innerRule.script=n.join("")},onRuleSelected:function(e){var t=this.rulePresets.find((function(t){return t.name===e}));t&&(Object.assign(this.innerRule,t),this.innerRule.script=this.innerRule.script.trim())},onOk:function(){var e=this;this.validateFields(),this.state.name&&this.state.script&&(this.onAfterOk&&this.onAfterOk(this.innerRule),this.$nextTick((function(){e.resetModal(),e.$bvModal.hide(e.id)})))}},created:function(){this.copyToInnerFormConfig()}},__vue_script__$2=script$2,__vue_render__$2=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:e.id,title:e.title,"modal-class":"rb-field-rule-form-modal",size:"lg","ok-title":"Сохранить правило","cancel-variant":"outline-gray","cancel-title":"Отмена"},on:{ok:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-card",{attrs:{"no-body":""}},[n("b-tabs",{attrs:{card:""},on:{"activate-tab":e.onActivateTab}},[n("b-tab",{attrs:{title:"Правило",active:""}},[e.innerRule?n("b-form",[n("b-form-row",[n("b-col",{attrs:{log:"12"}},[e.rulePresets.length>0?n("b-form-group",{attrs:{label:"Выбрать"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Выберите готовое правило из списка и если нужно, измените\n ")]},proxy:!0}],null,!1,1926378271)},[e._v(" "),n("b-form-select",{on:{input:function(t){return e.onRuleSelected(t)}}},e._l(e.rulePresets,(function(t){return n("b-form-select-option",{key:t.name,attrs:{value:t.name}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")])})),1)],1):e._e()],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Название"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Задайте уникальное название, чтобы отличать правило в списке\n ")]},proxy:!0}],null,!1,2943614562)},[e._v(" "),n("b-form-input",{attrs:{state:e.state.name,"invalid-feedback":e.state.name_feedback},model:{value:e.innerRule.name,callback:function(t){e.$set(e.innerRule,"name",t)},expression:"innerRule.name"}})],1)],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Событие"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n При возникновении этого события будет выполняться правило\n ")]},proxy:!0}],null,!1,2258732973)},[e._v(" "),n("b-form-select",{attrs:{state:e.state.event,"invalid-feedback":e.state.event_feedback},model:{value:e.innerRule.event,callback:function(t){e.$set(e.innerRule,"event",t)},expression:"innerRule.event"}},[n("b-form-select-option",{attrs:{value:"input"}},[e._v("\n Ввод значения\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"change"}},[e._v("\n Изменение значения\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"click"}},[e._v("\n Клик\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"validate"}},[e._v("\n Валидация\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"defaultValue"}},[e._v("\n Установить значение по умолчанию\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"created"}},[e._v("\n Инпут создан\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"mounted"}},[e._v("\n Инпут подключен\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"activated"}},[e._v("\n Инпут активирован\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"form-mounted"}},[e._v("\n Форма создана\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"form-activated"}},[e._v("\n Форма показана\n ")])],1)],1)],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Скрипт"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Здесь указывается скрипт правила. Скрипт должен быть написан на языке\n javascript\n ")]},proxy:!0}],null,!1,2149825091)},[e._v(" "),n("div",{staticClass:"rb-script-input"},[n("b-button-toolbar",[n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Переменные",variant:"outline-secondary",size:"sm"}},[n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("doc")}}},[e._v("\n Документ\n ")]),e._v(" "),n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("form")}}},[e._v("\n Форма\n ")]),e._v(" "),n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("event")}}},[e._v("\n Значение события\n ")])],1),e._v(" "),n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Задать значение",variant:"outline-secondary",size:"sm"}},e._l(e.fields,(function(t){return e.fields?n("b-dropdown-item",{key:t.name,on:{click:function(n){return e.addSetVariableToScript(t)}}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")]):e._e()})),1),e._v(" "),n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Вызвать функцию инпута",variant:"outline-secondary",size:"sm"}},e._l(e.fields,(function(t){return e.fields?n("b-dropdown-item",{key:t.name,on:{click:function(n){return e.addCallInputFunction(t)}}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")]):e._e()})),1)],1),e._v(" "),n("b-form-textarea",{ref:"scriptInput",attrs:{state:e.state.script,"invalid-feedback":e.state.script_feedback,rows:"8"},model:{value:e.innerRule.script,callback:function(t){e.$set(e.innerRule,"script",t)},expression:"innerRule.script"}})],1)])],1)],1)],1):e._e()],1),e._v(" "),e.innerFormConfig?n("b-tab",{attrs:{title:"Протестировать правило"}},[n("doc-form",{attrs:{"form-config":e.innerFormConfig}})],1):e._e()],1)],1)],1)},__vue_staticRenderFns__$2=[],__vue_inject_styles__$2=void 0,__vue_scope_id__$2=void 0,__vue_module_identifier__$2=void 0,__vue_is_functional_template__$2=!1,__vue_component__$3=normalizeComponent({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$2,__vue_scope_id__$2,__vue_is_functional_template__$2,__vue_module_identifier__$2,!1,void 0,void 0,void 0),FieldRuleFormModal=__vue_component__$3,script$1={name:"DocTemplateFieldSidebar",components:{FieldRuleFormModal:FieldRuleFormModal},props:{value:{type:Object,default:null},visible:{type:Boolean,default:null},formConfig:Object},data:function(){return{innerVisible:null,field:null,currentInputName:null,modalId:"rb-field-rule-form-modal",ruleModalCfg:{rule:{},mode:"ins"},rulesHash:v4()}},computed:{inputOptions:function(){return this.field?UtFormConstructor.getInputTypes(this.field):[]},iconCloseSidebar:function(){return UtFormConstructor.config.icons.iconCloseFieldSidebar},iconOpenSidebar:function(){return UtFormConstructor.config.icons.iconOpenFieldSidebar},iconAdd:function(){return UtFormConstructor.config.icons.iconAdd},rules:function(){return UtFormConstructor.getAvailableFieldRules(this.field)},hasMultipleInputTypes:function(){return UtFormConstructor.hasMultipleInputTypes(this.field)},multiple:function(){return this.field&&this.field.multiple}},watch:{visible:function(){this.innerVisible=this.visible},value:function(){this.field=this.value,this.field&&this.field.input&&(this.currentInputName=this.field.input.name)},field:{handler:function(){this.$emit("input",this.field),this.$emit("change",this.field)},deep:!0},currentInputName:function(e){this.field.input=UtFormConstructor.getInputTypeByName(this.currentInputName,this.field)},multiple:function(){var e=UtFormConstructor.getDefaultInput(this.field);this.field.multiple&&(this.currentInputName=e.name)}},methods:{hide:function(){this.innerVisible=!1,this.$emit("hide")},getPropInputType:function(e,t){return["string","number"].includes(e.type)?"b-form-input":["date"].includes(e.type)?"rb-date-picker-input":"rb-boolean-single-option-input"},getPropInputPropData:function(e,t){return"string"===e.type?{type:"text"}:"number"===e.type?{type:"number"}:{}},addRule:function(){var e=this;this.ruleModalCfg={mode:"ins",rule:{name:null,script:null},onAfterOk:function(t){e.field.rules=e.field.rules?e.field.rules:[],e.field.rules.push(_objectSpread2({},t)),e.rulesHash=v4()}},this.$bvModal.show(this.modalId)},editRule:function(e,t){t.target.classList&&t.target.classList.contains("rb-remove-rule")||(this.ruleModalCfg={mode:"upd",rule:_objectSpread2({},e),onAfterOk:function(t){Object.assign(e,t)}},this.$bvModal.show(this.modalId))},removeRule:function(e){var t=this.field.rules.findIndex((function(t){return t.id===e.id}));t>=0&&this.field.rules.splice(t,1),this.rulesHash=v4()}},created:function(){this.value&&(this.innerVisible=this.visible,this.field=this.value,this.field&&this.field.input&&(this.currentInputName=this.field.input.name))}},__vue_script__$1=script$1,__vue_render__$1=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-sidebar",{staticClass:"rb-doc-template-field-sidebar",attrs:{right:"","bg-variant":"white",shadow:""},scopedSlots:e._u([{key:"header",fn:function(){return[n("b-button",{staticClass:"rb-sidebar-close-btn",attrs:{variant:"secondary"},on:{click:e.hide}},[n("rb-icon",{attrs:{icon:e.innerVisible?e.iconCloseSidebar:e.iconOpenSidebar}})],1),e._v(" "),n("h4",[e._v("Редактор свойств")])]},proxy:!0}]),model:{value:e.innerVisible,callback:function(t){e.innerVisible=t},expression:"innerVisible"}},[e._v(" "),e.field?n("b-form",[n("div",{staticClass:"rb-form-section"},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Название"}},[n("rb-text",[e._v(e._s(e.field.name))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Тип"}},[n("rb-text",[e._v(e._s(e.field.type))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Тэг для файла шаблона"}},[n("rb-text",[e._v(e._s(e.field.tag))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Заголовок"}},[n("rb-multi-lang-input",{model:{value:e.field,callback:function(t){e.field=t},expression:"field"}})],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.visible,callback:function(t){e.$set(e.field,"visible",t)},expression:"field.visible"}},[e._v("Отображаемое")])],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.editable,callback:function(t){e.$set(e.field,"editable",t)},expression:"field.editable"}},[e._v("Редактируемое")])],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.required,callback:function(t){e.$set(e.field,"required",t)},expression:"field.required"}},[e._v("Обязательное")])],1)],1)],1),e._v(" "),n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("\n Настройки ввода\n ")]),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Тип инпута"}},[n("rb-dropdown-input",{attrs:{items:e.inputOptions,"display-field":"text","value-field":"name",block:""},model:{value:e.currentInputName,callback:function(t){e.currentInputName=t},expression:"currentInputName"}})],1),e._v(" "),e._l(e.field.input.props,(function(t,r){return[t.visible?n("b-form-group",{key:r,attrs:{label:t.label}},[n(e.getPropInputType(t,r),e._b({tag:"component",model:{value:e.field.input.propsData[r],callback:function(t){e.$set(e.field.input.propsData,r,t)},expression:"field.input.propsData[propName]"}},"component",e.getPropInputPropData(t,r),!1))],1):e._e()]}))],2)],1)],1),e._v(" "),e.field.input?n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("Значение по-умолчанию")]),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{ref:"inputContainer",attrs:{label:e.field.labelRu}},[n(e.field.input.type,e._b({tag:"component",model:{value:e.field.defaultValue,callback:function(t){e.$set(e.field,"defaultValue",t)},expression:"field.defaultValue"}},"component",e.field.input.propsData,!1))],1)],1)],1)],1):e._e(),e._v(" "),n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("Правила")]),e._v(" "),n("b-list-group",{attrs:{"data-hash":e.rulesHash}},[e._l(e.field.rules,(function(t){return n("b-list-group-item",{key:t.id,staticClass:"cursor-pointer d-flex justify-content-between align-items-center",attrs:{"data-hash":e.rulesHash},on:{click:function(n){return e.editRule(t,n)}}},[n("rb-text",[e._v(e._s(t.name))]),e._v(" "),n("rb-icon",{staticClass:"rb-remove-rule",attrs:{icon:"icon-close"},on:{click:function(n){return e.removeRule(t)}}})],1)})),e._v(" "),n("b-list-group-item",{staticClass:"cursor-pointer",on:{click:e.addRule}},[n("rb-icon",{attrs:{icon:e.iconAdd}}),e._v(" "),n("rb-text",[e._v("Добавить правило ...")])],1)],2)],1)]):e._e(),e._v(" "),n("field-rule-form-modal",{attrs:{rule:e.ruleModalCfg.rule,"form-config":e.formConfig,field:e.field,mode:e.ruleModalCfg.mode,"on-after-ok":e.ruleModalCfg.onAfterOk}})],1)},__vue_staticRenderFns__$1=[],__vue_inject_styles__$1=void 0,__vue_scope_id__$1=void 0,__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1,__vue_component__$2=normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,!1,void 0,void 0,void 0),DocTemplateFieldSidebar=__vue_component__$2,script={name:"DocTemplateConstructor",components:{DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateSectionModal:DocTemplateSectionModal,draggable:vuedraggable_umd},props:{formConfig:{type:Object,default:function(){return{sections:[]}}},facets:{type:Array,default:function(){return[]}}},data:function(){return{sidebarVisible:!1,sidebarField:null,columnTo:!1,hash:"",sectionModalCfg:{id:"rb-doc-template-section-modal",mode:"ins",section:null,onAfterOk:function(){}}}},computed:{iconAdd:function(){return UtFormConstructor.config.icons.iconAdd},iconEdit:function(){return UtFormConstructor.config.icons.iconEdit},iconDelete:function(){return UtFormConstructor.config.icons.iconDelete},iconDrag:function(){return UtFormConstructor.config.icons.iconDrag}},methods:{showProperties:function(e,t){t.target.classList&&t.target.classList.contains("rb-remove-field")||(this.sidebarVisible=!0,this.sidebarField=e)},addSection:function(e){var t=this,n={labelRu:null,columnCount:e};this.sectionModalCfg.mode="ins",this.sectionModalCfg.section=n,this.sectionModalCfg.onAfterOk=function(){n.columns=[];for(var r=0;r<e;r++)n.columns.push({index:r,fields:[]});t.formConfig.sections.push(n)},this.$bvModal.show(this.sectionModalCfg.id)},editSection:function(e){this.sectionModalCfg.mode="update",this.sectionModalCfg.section=e,this.sectionModalCfg.onAfterOk=function(){},this.$bvModal.show(this.sectionModalCfg.id)},removeSection:function(e,t){this.formConfig.sections.splice(t,1)},multipleFieldAreOnFormConfig:function(e){var t=0;return this.formConfig.sections.forEach((function(n){n.columns.forEach((function(n){n.fields.forEach((function(n){n.name===e.name&&t++}))}))})),t>1},removeFieldFromColumn:function(e,t,n){var r=null!=n?n:-1;r<0&&(r=t.fields.findIndex((function(t){return e.name===t.name}))),r>=0&&t.fields.splice(r,1)},onRemoveField:function(e,t,n){e.preventDefault(),this.removeFieldFromColumn(t,n)},onFieldAddedToColumn:function(e,t,n){this.columnTo=t},onFieldMoveEnd:function(e){var t=e.newIndex,n=e.item._underlying_vm_;n.hasOwnProperty("defaultValue")||this.$set(n,"defaultValue",void 0),this.multipleFieldAreOnFormConfig(n)&&(this.removeFieldFromColumn(n,this.columnTo,t),this.resetDragVariables(),this.$bvModal.msgBoxOk("На форме уже есть это поле",{title:"Ошибка",headerClass:"rb-error-msg-box__header",bodyClass:"rb-error-msg-box__body",footerClass:"rb-error-msg-box__footer",centered:!0,noCloseOnBackdrop:!0,noCloseOnEsc:!0})),this.resetDragVariables(),this.hash=(Math.random()+1).toString(36).substring(7)},getFieldExtendedPropsData:function(e){return _objectSpread2(_objectSpread2({},e.input.propsData),{},{placeholder:e.tag,disabled:!0})},resetDragVariables:function(){this.columnTo=null}}},__vue_script__=script,__vue_render__=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rb-doc-template-constructor d-flex"},[n("doc-template-facet-list",{attrs:{facets:e.facets},on:{fieldMoveEnd:e.onFieldMoveEnd}}),e._v(" "),n("div",{staticClass:"rb-form-constructor flex-fill"},[n("div",{staticClass:"rb-constructor-toolbar d-flex flex-row"},[n("h4",[e._v("Добавить секцию: ")]),e._v(" "),n("div",{staticClass:"rb-layout-buttons"},[n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(1)}}},[n("rb-text",[e._v("Секция с 1 колонкой")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1),e._v(" "),n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(2)}}},[n("rb-text",[e._v("Секция с 2 колонками")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1),e._v(" "),n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(3)}}},[n("rb-text",[e._v("Секция с 3 колонками")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1)],1)]),e._v(" "),n("div",{staticClass:"rb-constructor-body"},[n("draggable",{attrs:{animation:200,group:"section","ghost-class":"rb-form-card-moving",handle:".rb-row-drag-handle"},model:{value:e.formConfig.section,callback:function(t){e.$set(e.formConfig,"section",t)},expression:"formConfig.section"}},e._l(e.formConfig.sections,(function(t,r){return n("b-card",{key:t.labelRu,staticClass:"rb-form-card",attrs:{"data-hash":e.hash},scopedSlots:e._u([{key:"header",fn:function(){return[n("rb-icon",{staticClass:"cursor-pointer rb-row-drag-handle",attrs:{icon:e.iconDrag}}),e._v(" "),n("rb-text",{staticClass:"flex-fill",on:{click:function(n){return e.editSection(t)}}},[e._v("\n "+e._s(t.labelRu)+"\n ")]),e._v(" "),n("span",{staticClass:"rb-actions"},[n("rb-icon",{staticClass:"cursor-pointer",attrs:{icon:e.iconEdit},on:{click:function(n){return e.editSection(t)}}}),e._v(" "),n("rb-icon",{staticClass:"cursor-pointer",attrs:{icon:e.iconDelete},on:{click:function(n){return e.removeSection(t,r)}}})],1)]},proxy:!0}],null,!0)},[e._v(" "),n("div",{staticClass:"d-flex flex-row"},e._l(t.columns,(function(r){return n("draggable",{key:r.index,staticClass:"rb-form-column",class:{"rb-single-column":1===t.columnCount},attrs:{tag:"b-form",animation:200,group:"fields","ghost-class":"rb-moving-item",handle:".rb-field-drag-handle"},on:{add:function(n){return e.onFieldAddedToColumn(n,r,t)}},model:{value:r.fields,callback:function(t){e.$set(r,"fields",t)},expression:"column.fields"}},e._l(r.fields,(function(t){return n("b-form-row",{key:t.name,staticClass:"cursor-pointer",on:{click:function(n){return e.showProperties(t,n)}}},[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:t.labelRu},scopedSlots:e._u([{key:"label",fn:function(){return[n("rb-icon",{staticClass:"rb-field-drag-handle",attrs:{icon:e.iconDrag}}),e._v(" "),n("rb-text",[e._v(e._s(t.labelRu))]),e._v(" "),n("rb-icon",{staticClass:"rb-remove-field",attrs:{icon:e.iconDelete},on:{click:function(n){return n.preventDefault(),e.onRemoveField(n,t,r)}}})]},proxy:!0}],null,!0)},[e._v(" "),t.input?n(t.input.type,e._b({tag:"component",staticClass:"cursor-pointer",attrs:{id:t.name,disabled:""}},"component",e.getFieldExtendedPropsData(t),!1)):e._e()],1)],1)],1)})),1)})),1)])})),1)],1),e._v(" "),n("doc-template-field-sidebar",{attrs:{visible:e.sidebarVisible,"form-config":e.formConfig},on:{hide:function(t){e.sidebarVisible=!1}},model:{value:e.sidebarField,callback:function(t){e.sidebarField=t},expression:"sidebarField"}}),e._v(" "),n("doc-template-section-modal",{attrs:{mode:e.sectionModalCfg.mode,section:e.sectionModalCfg.section,"on-after-ok":e.sectionModalCfg.onAfterOk}})],1)],1)},__vue_staticRenderFns__=[],__vue_inject_styles__=void 0,__vue_scope_id__=void 0,__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,__vue_component__=normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,!1,void 0,void 0,void 0),__vue_component__$1=__vue_component__,components$1=Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm}),install=function(e){Object.entries(components$1).forEach((function(t){var n=_slicedToArray(t,2),r=n[0],o=n[1];e.component(r,o)}))},components=Object.freeze({__proto__:null,default:install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});return Object.entries(components).forEach((function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];"default"!==n&&(install[n]=r)})),install}(Vue,crypto);
|
|
8
|
+
function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_defineProperty(e,t,n[t])}))}return e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var version="1.10.2";function userAgent(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(e,t,n){e.addEventListener(t,n,!IE11OrLess&&captureMode)}function off(e,t,n){e.removeEventListener(t,n,!IE11OrLess&&captureMode)}function matches(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&matches(e,t):matches(e,t))||r&&e===n)return e;if(e===n)break}while(e=getParentOrHost(e))}return null}var R_SPACE=/\s+/g,_throttleTimeout;function toggleClass(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R_SPACE," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R_SPACE," ")}}function css(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function matrix(e,t){var n="";if("string"==typeof e)n=e;else do{var r=css(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function getWindowScrollingElement(){var e=document.scrollingElement;return e||document.documentElement}function getRect(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,l,s,c,u,p;if(e!==window&&e!==getWindowScrollingElement()?(a=(i=e.getBoundingClientRect()).top,l=i.left,s=i.bottom,c=i.right,u=i.height,p=i.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!IE11OrLess))do{if(o&&o.getBoundingClientRect&&("none"!==css(o,"transform")||n&&"static"!==css(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(css(o,"border-top-width")),l-=f.left+parseInt(css(o,"border-left-width")),s=a+i.height,c=l+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var d=matrix(o||e),h=d&&d.a,m=d&&d.d;d&&(s=(a/=m)+(u/=m),c=(l/=h)+(p/=h))}return{top:a,left:l,bottom:s,right:c,width:p,height:u}}}function isScrolledPast(e,t,n){for(var r=getParentAutoScrollElement(e,!0),o=getRect(e)[t];r;){var i=getRect(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,!1)}return!1}function getChild(e,t,n){for(var r=0,o=0,i=e.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Sortable.ghost&&i[o]!==Sortable.dragged&&closest(i[o],n.draggable,e,!1)){if(r===t)return i[o];r++}o++}return null}function lastChild(e,t){for(var n=e.lastElementChild;n&&(n===Sortable.ghost||"none"===css(n,"display")||t&&!matches(n,t));)n=n.previousElementSibling;return n||null}function index(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Sortable.clone||t&&!matches(e,t)||n++;return n}function getRelativeScrollOffset(e){var t=0,n=0,r=getWindowScrollingElement();if(e)do{var o=matrix(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function indexOfObject(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}function getParentAutoScrollElement(e,t){if(!e||!e.getBoundingClientRect)return getWindowScrollingElement();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||t)return n;r=!0}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function isRectEqual(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function throttle(e,t){return function(){if(!_throttleTimeout){var n=arguments,r=this;1===n.length?e.call(r,n[0]):e.apply(r,n),_throttleTimeout=setTimeout((function(){_throttleTimeout=void 0}),t)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function clone(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var expando="Sortable"+(new Date).getTime();function AnimationStateManager(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==css(e,"display")&&e!==Sortable.ghost){t.push({target:e,rect:getRect(e)});var n=_objectSpread({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(indexOfObject(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,i=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=getRect(n),s=n.prevFromRect,c=n.prevToRect,u=e.rect,p=matrix(n,!0);p&&(l.top-=p.f,l.left-=p.e),n.toRect=l,n.thisAnimationDuration&&isRectEqual(s,l)&&!isRectEqual(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(t=calculateRealTime(u,s,c,r.options)),isRectEqual(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=r.options.animation),r.animate(n,u,l,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){css(e,"transition",""),css(e,"transform","");var o=matrix(this.el),i=o&&o.a,a=o&&o.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,css(e,"transform","translate3d("+l+"px,"+s+"px,0)"),repaint(e),css(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),css(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){css(e,"transition",""),css(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}}function repaint(e){return e.offsetWidth}function calculateRealTime(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function(e){for(var t in defaults)defaults.hasOwnProperty(t)&&!(t in e)&&(e[t]=defaults[t]);plugins.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";plugins.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](_objectSpread({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](_objectSpread({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in plugins.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,_extends(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return plugins.forEach((function(r){"function"==typeof r.eventProperties&&_extends(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return plugins.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};function dispatchEvent(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,p=e.newDraggableIndex,f=e.originalEvent,d=e.putSortable,h=e.extraEventProperties;if(t=t||n&&n[expando]){var m,v=t.options,g="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||IE11OrLess||Edge?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=l||n,m.item=o||n,m.clone=i,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=p,m.originalEvent=f,m.pullMode=d?d.lastPutMode:void 0;var b=_objectSpread({},h,PluginManager.getEventProperties(r,t));for(var _ in b)m[_]=b[_];n&&n.dispatchEvent(m),v[g]&&v[g].call(t,m)}}var pluginEvent=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=_objectWithoutProperties(n,["evt"]);PluginManager.pluginEvent.bind(Sortable)(e,t,_objectSpread({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:r,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(e){_dispatchEvent({sortable:t,name:e,originalEvent:r})}},o))};function _dispatchEvent(e){dispatchEvent(_objectSpread({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},e))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists="undefined"!=typeof document,PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),_detectDirection=function(e,t){var n=css(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=getChild(e,0,t),i=getChild(e,1,t),a=o&&css(o),l=i&&css(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+getRect(i).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(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[CSSFloatProperty]||i&&"none"===n[CSSFloatProperty]&&s+c>r)?"vertical":"horizontal"},_dragElInRowColumn=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return r===a||o===l||r+i/2===a+s/2},_detectNearestEmptySortable=function(e,t){var n;return sortables.some((function(r){if(!lastChild(r)){var o=getRect(r),i=r[expando].options.emptyInsertThreshold,a=e>=o.left-i&&e<=o.right+i,l=t>=o.top-i&&t<=o.bottom+i;return i&&a&&l?n=r:void 0}})),n},_prepareGroup=function(e){function t(e,n){return function(r,o,i,a){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var s=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},r=e.group;r&&"object"==_typeof$1(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&document.addEventListener("click",(function(e){if(ignoreNextClick)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick=!1,!1}),!0);var nearestEmptyInsertDetectEvent=function(e){if(dragEl){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[expando]._onDragOver(n)}}},_checkOutsideTargetEl=function(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_extends({},t),e[expando]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Sortable.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in PluginManager.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in _prepareGroup(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?on(e,"pointerdown",this._onTapStart):(on(e,"mousedown",this._onTapStart),on(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(e,"dragover",this),on(e,"dragenter",this)),sortables.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_extends(this,AnimationStateManager())}function _globalDragOver(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _onMove(e,t,n,r,o,i,a,l){var s,c,u=e[expando],p=u.options.onMove;return!window.CustomEvent||IE11OrLess||Edge?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=o||t,s.relatedRect=i||getRect(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),p&&(c=p.call(u,s,a)),c}function _disableDraggable(e){e.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsLast(e,t,n){var r=getRect(lastChild(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}function _getSwapDirection(e,t,n,r,o,i,a,l){var s=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,p=r?n.bottom:n.right,f=!1;if(!a)if(l&&targetMoveDistance<c*o){if(!pastFirstInvertThresh&&(1===lastDirection?s>u+c*i/2:s<p-c*i/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)f=!0;else if(1===lastDirection?s<u+targetMoveDistance:s>p-targetMoveDistance)return-lastDirection}else if(s>u+c*(1-o)/2&&s<p-c*(1-o)/2)return _getInsertDirection(t);return(f=f||a)&&(s<u+c*i/2||s>p-c*i/2)?s>u+c/2?1:-1:0}function _getInsertDirection(e){return index(dragEl)<index(e)?1:-1}function _generateId(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState(e){savedInputChecked.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(e){return setTimeout(e,0)}function _cancelNextTick(e){return clearTimeout(e)}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(lastTarget=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,dragEl):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=r.filter;if(_saveInputCheckedState(n),!dragEl&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled||s.isContentEditable||(l=closest(l,r.draggable,n,!1))&&l.animated||lastDownEl===l)){if(oldIndex=index(l),oldDraggableIndex=index(l,r.draggable),"function"==typeof c){if(c.call(this,e,l,this))return _dispatchEvent({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),pluginEvent("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=closest(s,r.trim(),n,!1))return _dispatchEvent({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),pluginEvent("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!closest(s,r.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!dragEl&&n.parentNode===i){var s=getRect(n);if(rootEl=i,parentEl=(dragEl=n).parentNode,nextEl=dragEl.nextSibling,lastDownEl=n,activeGroup=a.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(t||e).clientX,clientY:(t||e).clientY},tapDistanceLeft=tapEvt.clientX-s.left,tapDistanceTop=tapEvt.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,dragEl.style["will-change"]="all",r=function(){pluginEvent("delayEnded",o,{evt:e}),Sortable.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!FireFox&&o.nativeDraggable&&(dragEl.draggable=!0),o._triggerDragStart(e,t),_dispatchEvent({sortable:o,name:"choose",originalEvent:e}),toggleClass(dragEl,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){find(dragEl,e.trim(),_disableDraggable)})),on(l,"dragover",nearestEmptyInsertDetectEvent),on(l,"mousemove",nearestEmptyInsertDetectEvent),on(l,"touchmove",nearestEmptyInsertDetectEvent),on(l,"mouseup",o._onDrop),on(l,"touchend",o._onDrop),on(l,"touchcancel",o._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Edge||IE11OrLess))r();else{if(Sortable.eventCanceled)return void this._onDrop();on(l,"mouseup",o._disableDelayedDrag),on(l,"touchend",o._disableDelayedDrag),on(l,"touchcancel",o._disableDelayedDrag),on(l,"mousemove",o._delayedDragTouchMoveHandler),on(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&on(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):on(document,t?"touchmove":"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var n=this.options;!e&&toggleClass(dragEl,n.dragClass,!1),toggleClass(dragEl,n.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY))!==t;)t=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),t)do{if(t[expando]){if(t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(e){if(tapEvt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=ghostEl&&matrix(ghostEl,!0),a=ghostEl&&i&&i.a,l=ghostEl&&i&&i.d,s=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),c=(o.clientX-tapEvt.clientX+r.x)/(a||1)+(s?s[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),u=(o.clientY-tapEvt.clientY+r.y)/(l||1)+(s?s[1]-ghostRelativeParentInitialScroll[1]:0)/(l||1);if(!Sortable.active&&!awaitingDragStarted){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ghostEl){i?(i.e+=c-(lastDx||0),i.f+=u-(lastDy||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");css(ghostEl,"webkitTransform",p),css(ghostEl,"mozTransform",p),css(ghostEl,"msTransform",p),css(ghostEl,"transform",p),lastDx=c,lastDy=u,touchEvt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,t=getRect(dragEl,!0,PositionGhostAbsolutely,!0,e),n=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=e;"static"===css(ghostRelativeParent,"position")&&"none"===css(ghostRelativeParent,"transform")&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),t.top+=ghostRelativeParent.scrollTop,t.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}toggleClass(ghostEl=dragEl.cloneNode(!0),n.ghostClass,!1),toggleClass(ghostEl,n.fallbackClass,!0),toggleClass(ghostEl,n.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",t.top),css(ghostEl,"left",t.left),css(ghostEl,"width",t.width),css(ghostEl,"height",t.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,e.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;pluginEvent("dragStart",this,{evt:e}),Sortable.eventCanceled?this._onDrop():(pluginEvent("setupClone",this),Sortable.eventCanceled||((cloneEl=clone(dragEl)).draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),n.cloneId=_nextTick((function(){pluginEvent("clone",n),Sortable.eventCanceled||(n.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),n._hideClone(),_dispatchEvent({sortable:n,name:"clone"}))})),!t&&toggleClass(dragEl,o.dragClass,!0),t?(ignoreNextClick=!0,n._loopId=setInterval(n._emulateDragOver,50)):(off(document,"mouseup",n._onDrop),off(document,"touchend",n._onDrop),off(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,dragEl)),on(document,"drop",n),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,n._dragStartId=_nextTick(n._dragStarted.bind(n,t,e)),on(document,"selectstart",n),moved=!0,Safari&&css(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,a=e.target,l=this.options,s=l.group,c=Sortable.active,u=activeGroup===s,p=l.sort,f=putSortable||c,d=this,h=!1;if(!_silent){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=closest(a,l.draggable,i,!0),O("dragOver"),Sortable.eventCanceled)return h;if(dragEl.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||d._ignoreWhileAnimating===a)return k(!1);if(ignoreNextClick=!1,c&&!l.disabled&&(u?p||(r=!rootEl.contains(dragEl)):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,c,dragEl,e))&&s.checkPut(this,c,dragEl,e))){if(o="vertical"===this._getDirection(e,a),t=getRect(dragEl),O("dragOverValid"),Sortable.eventCanceled)return h;if(r)return parentEl=rootEl,F(),this._hideClone(),O("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),k(!0);var m=lastChild(i,l.draggable);if(!m||_ghostIsLast(e,o,this)&&!m.animated){if(m===dragEl)return k(!1);if(m&&i===e.target&&(a=m),a&&(n=getRect(a)),!1!==_onMove(rootEl,i,dragEl,t,a,n,e,!!a))return F(),i.appendChild(dragEl),parentEl=i,P(),k(!0)}else if(a.parentNode===i){n=getRect(a);var v,g,b,_=dragEl.parentNode!==i,y=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||t,a.animated&&a.toRect||n,o),E=o?"top":"left",x=isScrolledPast(a,"top","top")||isScrolledPast(dragEl,"top","top"),S=x?x.scrollTop:void 0;if(lastTarget!==a&&(g=n[E],pastFirstInvertThresh=!1,isCircumstantialInvert=!y&&l.invertSwap||_),0!==(v=_getSwapDirection(e,a,n,o,y?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,isCircumstantialInvert,lastTarget===a))){var w=index(dragEl);do{w-=v,b=parentEl.children[w]}while(b&&("none"===css(b,"display")||b===ghostEl))}if(0===v||b===a)return k(!1);lastTarget=a,lastDirection=v;var C=a.nextElementSibling,I=!1,D=_onMove(rootEl,i,dragEl,t,a,n,e,I=1===v);if(!1!==D)return 1!==D&&-1!==D||(I=1===D),_silent=!0,setTimeout(_unsilent,30),F(),I&&!C?i.appendChild(dragEl):a.parentNode.insertBefore(dragEl,I?C:a),x&&scrollBy(x,0,S-x.scrollTop),parentEl=dragEl.parentNode,void 0===g||isCircumstantialInvert||(targetMoveDistance=Math.abs(g-getRect(a)[E])),P(),k(!0)}if(i.contains(dragEl))return k(!1)}return!1}function O(l,s){pluginEvent(l,d,_objectSpread({evt:e,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:p,fromSortable:f,target:a,completed:k,onMove:function(n,r){return _onMove(rootEl,i,dragEl,t,n,getRect(n),e,r)},changed:P},s))}function F(){O("dragOverAnimationCapture"),d.captureAnimationState(),d!==f&&f.captureAnimationState()}function k(t){return O("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(d),d!==f&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:c.options.ghostClass,!1),toggleClass(dragEl,l.ghostClass,!0)),putSortable!==d&&d!==Sortable.active?putSortable=d:d===Sortable.active&&putSortable&&(putSortable=null),f===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){O("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===dragEl&&!dragEl.animated||a===i&&!a.animated)&&(lastTarget=null),l.dragoverBubble||e.rootEl||a===document||(dragEl.parentNode[expando]._isOutsideThisEl(e.target),!t&&nearestEmptyInsertDetectEvent(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function P(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,l.draggable),_dispatchEvent({sortable:d,name:"change",toEl:i,newIndex:newIndex,newDraggableIndex:newDraggableIndex,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop),off(e,"touchend",this._onDrop),off(e,"pointerup",this._onDrop),off(e,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),pluginEvent("drop",this,{evt:e}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),Sortable.eventCanceled||(awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),e&&(moved&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&"clone"!==putSortable.lastPutMode)&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&(null!=newIndex&&-1!==newIndex||(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach((function(e){e.checked=!0})),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)closest(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||_generateId(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,r){var o=n.children[r];closest(o,this.options.draggable,n,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return closest(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=PluginManager.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&_prepareGroup(n)},destroy:function(){pluginEvent("destroy",this);var e=this.el;e[expando]=null,off(e,"mousedown",this._onTapStart),off(e,"touchstart",this._onTapStart),off(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(e,"dragover",this),off(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;rootEl.contains(dragEl)&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}else this._hideClone()}},documentExists&&on(document,"touchmove",(function(e){(Sortable.active||awaitingDragStarted)&&e.cancelable&&e.preventDefault()})),Sortable.utils={on:on,off:off,css:css,find:find,is:function(e,t){return!!closest(e,t,e,!1)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild:getChild},Sortable.get=function(e){return e[expando]},Sortable.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Sortable.utils=_objectSpread({},Sortable.utils,e.utils)),PluginManager.mount(e)}))},Sortable.create=function(e,t){return new Sortable(e,t)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):t.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(touchEvt$1=e,t||Edge||IE11OrLess||Safari){autoScroll(e,this.options,i,t);var a=getParentAutoScrollElement(i,!0);!scrolling||pointerElemChangedInterval&&r===lastAutoScrollX&&o===lastAutoScrollY||(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval((function(){var i=getParentAutoScrollElement(document.elementFromPoint(r,o),!0);i!==a&&(a=i,clearAutoScrolls()),autoScroll(e,n.options,i,t)}),10),lastAutoScrollX=r,lastAutoScrollY=o)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(i,!0)===getWindowScrollingElement())return void clearAutoScrolls();autoScroll(e,this.options,getParentAutoScrollElement(i,!1),!1)}}},_extends(e,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach((function(e){clearInterval(e.pid)})),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle((function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=getWindowScrollingElement(),u=!1;scrollRootEl!==n&&(scrollRootEl=n,clearAutoScrolls(),scrollEl=t.scroll,o=t.scrollFn,!0===scrollEl&&(scrollEl=getParentAutoScrollElement(n,!0)));var p=0,f=scrollEl;do{var d=f,h=getRect(d),m=h.top,v=h.bottom,g=h.left,b=h.right,_=h.width,y=h.height,E=void 0,x=void 0,S=d.scrollWidth,w=d.scrollHeight,C=css(d),I=d.scrollLeft,D=d.scrollTop;d===c?(E=_<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),x=y<w&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=_<S&&("auto"===C.overflowX||"scroll"===C.overflowX),x=y<w&&("auto"===C.overflowY||"scroll"===C.overflowY));var O=E&&(Math.abs(b-i)<=l&&I+_<S)-(Math.abs(g-i)<=l&&!!I),F=x&&(Math.abs(v-a)<=l&&D+y<w)-(Math.abs(m-a)<=l&&!!D);if(!autoScrolls[p])for(var k=0;k<=p;k++)autoScrolls[k]||(autoScrolls[k]={});autoScrolls[p].vx==O&&autoScrolls[p].vy==F&&autoScrolls[p].el===d||(autoScrolls[p].el=d,autoScrolls[p].vx=O,autoScrolls[p].vy=F,clearInterval(autoScrolls[p].pid),0==O&&0==F||(u=!0,autoScrolls[p].pid=setInterval(function(){r&&0===this.layer&&Sortable.active._onTouchMove(touchEvt$1);var t=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*s:0,n=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Sortable.dragged.parentNode[expando],n,t,e,touchEvt$1,autoScrolls[this.layer].el)||scrollBy(autoScrolls[this.layer].el,n,t)}.bind({layer:p}),24))),p++}while(t.bubbleScroll&&f!==c&&(f=getParentAutoScrollElement(f,!1)));scrolling=u}}),30),drop=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Revert(){}function Remove(){}Revert.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=getChild(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:drop},_extends(Revert,{pluginName:"revertOnSpill"}),Remove.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);var vuedraggable_umd=createCommonjsModule((function(e,t){var n;"undefined"!=typeof self&&self,n=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"01f9":function(e,t,n){var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),l=n("84f2"),s=n("41a0"),c=n("7f20"),u=n("38fd"),p=n("2b4c")("iterator"),f=!([].keys&&"next"in[].keys()),d="keys",h="values",m=function(){return this};e.exports=function(e,t,n,v,g,b,_){s(n,t,v);var y,E,x,S=function(e){if(!f&&e in D)return D[e];switch(e){case d:case h:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",C=g==h,I=!1,D=e.prototype,O=D[p]||D["@@iterator"]||g&&D[g],F=O||S(g),k=g?C?S("entries"):F:void 0,P="Array"==t&&D.entries||O;if(P&&(x=u(P.call(new e)))!==Object.prototype&&x.next&&(c(x,w,!0),r||"function"==typeof x[p]||a(x,p,m)),C&&O&&O.name!==h&&(I=!0,F=function(){return O.call(this)}),r&&!_||!f&&!I&&D[p]||a(D,p,F),l[t]=F,l[w]=m,g)if(y={values:C?F:S(h),keys:b?F:S(d),entries:k},_)for(E in y)E in D||i(D,E,y[E]);else o(o.P+o.F*(f||I),t,y);return y}},"02f4":function(e,t,n){var r=n("4588"),o=n("be13");e.exports=function(e){return function(t,n){var i,a,l=String(o(t)),s=r(n),c=l.length;return s<0||s>=c?e?"":void 0:(i=l.charCodeAt(s))<55296||i>56319||s+1===c||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):i:e?l.slice(s,s+2):a-56320+(i-55296<<10)+65536}}},"0390":function(e,t,n){var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"0bfb":function(e,t,n){var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var r=n("ce10"),o=n("e11e");e.exports=Object.keys||function(e){return r(e,o)}},1495:function(e,t,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),l=a.length,s=0;l>s;)r.f(e,n=a[s++],t[n]);return e}},"214f":function(e,t,n){n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),l=n("2b4c"),s=n("520a"),c=l("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=l(e),d=!i((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),h=d?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!t})):void 0;if(!d||!h||"replace"===e&&!u||"split"===e&&!p){var m=/./[f],v=n(a,f,""[e],(function(e,t,n,r,o){return t.exec===s?d&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=v[0],b=v[1];r(String.prototype,e,g),o(RegExp.prototype,f,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"230e":function(e,t,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"23c6":function(e,t,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},2621:function(e,t){t.f=Object.getOwnPropertySymbols},"2aba":function(e,t,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),l=n("fa5b"),s="toString",c=(""+l).split(s);n("8378").inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||l.call(this)}))},"2aeb":function(e,t,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),l=function(){},s=function(){var e,t=n("230e")("iframe"),r=i.length;for(t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},"2b4c":function(e,t,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(e){return!!~o(this,e,i).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(e,t,n){var r=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"38fd":function(e,t,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"41a0":function(e,t,n){var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},"456d":function(e,t,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(e){return o(r(e))}}))},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},5147:function(e,t,n){var r=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},"520a":function(e,t,n){var r,o,i=n("0bfb"),a=RegExp.prototype.exec,l=String.prototype.replace,s=a,c=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(s=function(e){var t,n,r,o,s=this;return u&&(n=new RegExp("^"+s.source+"$(?!\\s)",i.call(s))),c&&(t=s.lastIndex),r=a.call(s,e),c&&r&&(s.lastIndex=s.global?r.index+r[0].length:t),u&&r&&r.length>1&&l.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=s},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),l=n("9b43"),s=function(e,t,n){var c,u,p,f,d=e&s.F,h=e&s.G,m=e&s.S,v=e&s.P,g=e&s.B,b=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,_=h?o:o[t]||(o[t]={}),y=_.prototype||(_.prototype={});for(c in h&&(n=t),n)p=((u=!d&&b&&void 0!==b[c])?b:n)[c],f=g&&u?l(p,r):v&&"function"==typeof p?l(Function.call,p):p,b&&a(b,c,p,e&s.U),_[c]!=p&&i(_,c,f),v&&y[c]!=p&&(y[c]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},"5eda":function(e,t,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},"5f1b":function(e,t,n){var r=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"613b":function(e,t,n){var r=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return r[e]||(r[e]=o(e))}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},6762:function(e,t,n){var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var r=n("626a"),o=n("be13");e.exports=function(e){return r(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var r=n("d3f4");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(e,t,n){var r=n("0d58"),o=n("2621"),i=n("52a7"),a=n("4bf8"),l=n("626a"),s=Object.assign;e.exports=!s||n("79e5")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r}))?function(e,t){for(var n=a(e),s=arguments.length,c=1,u=o.f,p=i.f;s>c;)for(var f,d=l(arguments[c++]),h=u?r(d).concat(u(d)):r(d),m=h.length,v=0;m>v;)p.call(d,f=h[v++])&&(n[f]=d[f]);return n}:s},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var r=n("4588"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7f20":function(e,t,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"9b43":function(e,t,n){var r=n("d8e8");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),o=Array.prototype;null==o[r]&&n("32e9")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"9def":function(e,t,n){var r=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(t,n){t.exports=e},a481:function(e,t,n){var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),l=n("0390"),s=n("5f1b"),c=Math.max,u=Math.min,p=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var p=r(e),f=String(this),d="function"==typeof t;d||(t=String(t));var v=p.global;if(v){var g=p.unicode;p.lastIndex=0}for(var b=[];;){var _=s(p,f);if(null===_)break;if(b.push(_),!v)break;""===String(_[0])&&(p.lastIndex=l(f,i(p.lastIndex),g))}for(var y,E="",x=0,S=0;S<b.length;S++){_=b[S];for(var w=String(_[0]),C=c(u(a(_.index),f.length),0),I=[],D=1;D<_.length;D++)I.push(void 0===(y=_[D])?y:String(y));var O=_.groups;if(d){var F=[w].concat(I,C,f);void 0!==O&&F.push(O);var k=String(t.apply(void 0,F))}else k=m(w,f,C,I,O,t);C>=x&&(E+=f.slice(x,C)+k,x=C+w.length)}return E+f.slice(x)}];function m(e,t,r,i,a,l){var s=r+e.length,c=i.length,u=d;return void 0!==a&&(a=o(a),u=f),n.call(l,u,(function(n,o){var l;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(s);case"<":l=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var f=p(u/10);return 0===f?n:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):n}l=i[u-1]}return void 0===l?"":l}))}}))},aae3:function(e,t,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},ac6a:function(e,t,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),l=n("32e9"),s=n("84f2"),c=n("2b4c"),u=c("iterator"),p=c("toStringTag"),f=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),m=0;m<h.length;m++){var v,g=h[m],b=d[g],_=a[g],y=_&&_.prototype;if(y&&(y[u]||l(y,u,f),y[p]||l(y,p,g),s[g]=f,b))for(v in r)y[v]||i(y,v,r[v],!0)}},b0c5:function(e,t,n){var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},be13:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,n){var r=n("6821"),o=n("9def"),i=n("77f1");e.exports=function(e){return function(t,n,a){var l,s=r(t),c=o(s.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}}},c649:function(e,t,n){(function(e){n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return s})),n("a481");var r,o,i="undefined"!=typeof window?window.console:e.console,a=/-(\w)/g,l=(r=function(e){return e.replace(a,(function(e,t){return t?t.toUpperCase():""}))},o=Object.create(null),function(e){return o[e]||(o[e]=r(e))});function s(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,n){var r=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}}).call(this,n("c8ba"))},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},cadf:function(e,t,n){var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");e.exports=n("01f9")(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(e,t,n){var r=n("d3f4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ce10:function(e,t,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");e.exports=function(e,t){var n,l=o(e),s=0,c=[];for(n in l)n!=a&&r(l,n)&&c.push(n);for(;t.length>s;)r(l,n=t[s++])&&(~i(c,n)||c.push(n));return c}},d2c8:function(e,t,n){var r=n("aae3"),o=n("be13");e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(e,t,n){var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",l="".startsWith;r(r.P+r.F*n("5147")(a),"String",{startsWith:function(e){var t=i(this,e,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return l?l.call(t,r,n):t.slice(n,n+r.length)===r}})},f6fd:function(e,t){!function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})}(document)},f751:function(e,t,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var r=n("7726").document;e.exports=r&&r.documentElement},fb15:function(e,t,n){var r;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||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.")}()}n.r(t),"undefined"!=typeof window&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1])),n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb");var s=n("a352"),c=n.n(s),u=n("c649");function p(e,t){var n=this;this.$nextTick((function(){return n.$emit(e.toLowerCase(),t)}))}function f(e){var t=this;return function(n){null!==t.realList&&t["onDrag"+e](n),p.call(t,e,n)}}function d(e){return["transition-group","TransitionGroup"].includes(e)}function h(e,t,n){return e[n]||(t[n]?t[n]():void 0)}var m=["Start","Add","Remove","Update","End"],v=["Choose","Unchoose","Sort","Filter","Clone"],g=["Move"].concat(m,v).map((function(e){return"on"+e})),b=null,_={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;var t=a(e,1)[0].componentOptions;return!!t&&d(t.tag)}(t);var n=function(e,t,n){var r=0,o=0,i=h(t,n,"header");i&&(r=i.length,e=e?[].concat(l(i),l(e)):l(i));var a=h(t,n,"footer");return a&&(o=a.length,e=e?[].concat(l(e),l(a)):l(a)),{children:e,headerOffset:r,footerOffset:o}}(t,this.$slots,this.$scopedSlots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var s=function(e,t){var n=null,r=function(e,t){n=function(e,t,n){return void 0===n||((e=e||{})[t]=n),e}(n,e,t)};if(r("attrs",Object.keys(e).filter((function(e){return"id"===e||e.startsWith("data-")})).reduce((function(t,n){return t[n]=e[n],t}),{})),!t)return n;var o=t.on,i=t.props,a=t.attrs;return r("on",o),r("props",i),Object.assign(n.attrs,a),n}(this.$attrs,this.componentData);return e(this.getTag(),s,r)},created:function(){null!==this.list&&null!==this.value&&u.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&u.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&u.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};m.forEach((function(n){t["on"+n]=f.call(e,n)})),v.forEach((function(n){t["on"+n]=p.bind(e,n)}));var n=Object.keys(this.$attrs).reduce((function(t,n){return t[Object(u.a)(n)]=e.$attrs[n],t}),{}),r=Object.assign({},this.options,n,t,{onMove:function(t,n){return e.onDragMove(t,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new c.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var e=this._vnode.fnOptions;return e&&e.functional},getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var n=Object(u.a)(t);-1===g.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick((function(){e.visibleIndexes=function(e,t,n,r){if(!e)return[];var o=e.map((function(e){return e.elm})),i=t.length-r,a=l(t).map((function(e,t){return t>=i?o.length:o.indexOf(e)}));return n?a.filter((function(e){return-1!==e})):a}(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)}))},getUnderlyingVm:function(e){var t=function(e,t){return e.map((function(e){return e.elm})).indexOf(t)}(this.getChildrenNodes()||[],e);return-1===t?null:{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&d(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t},emitChanges:function(e){var t=this;this.$nextTick((function(){t.$emit("change",e)}))},alterList:function(e){if(this.list)e(this.list);else{var t=l(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,l(e))};this.alterList(t)},updatePosition:function(e,t){var n=function(n){return n.splice(t,0,n.splice(e,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,r=this.getUnderlyingPotencialDraggableComponent(t);if(!r)return{component:r};var o=r.realList,i={list:o,component:r};if(t!==n&&o&&r.getUnderlyingVm){var a=r.getUnderlyingVm(n);if(a)return Object.assign(a,i)}return i},getVmIndex:function(e){var t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[e].data=null;var t=this.getComponent();t.children=[],t.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),b=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(u.d)(e.item);var n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();var r={element:t,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(e){if(Object(u.c)(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})}else Object(u.d)(e.clone)},onDragUpdate:function(e){Object(u.d)(e.item),Object(u.c)(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);var r={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=l(t.to.children).filter((function(e){return"none"!==e.style.display})),r=n.indexOf(t.related),o=e.component.getVmIndex(r);return-1===n.indexOf(b)&&t.willInsertAfter?o+1:o},onDragMove:function(e,t){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(r,e);return Object.assign(o,{futureIndex:i}),n(Object.assign({},e,{relatedContext:r,draggedContext:o}),t)},onDragEnd:function(){this.computeIndexes(),b=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",_);var y=_;t.default=y}}).default},e.exports=n(Sortable)})),script$4={name:"DocTemplateFacetList",components:{draggable:vuedraggable_umd},props:{facets:{type:Array,default:function(){return[]}}},data:function(){return{allFacets:[],innerFacets:[],facetSearchStr:null}},computed:{iconExpandFacet:function(){return UtFormConstructor.config.icons.iconExpandFacet},iconCollapseFacet:function(){return UtFormConstructor.config.icons.iconCollapseFacet}},watch:{facetSearchStr:function(){this.findInFacets(this.facetSearchStr)},facets:function(){this.handleFacetsProp()}},methods:{onFieldCloned:function(e){var t=JSON.parse(JSON.stringify(e));return t.input=UtFormConstructor.getDefaultInput(t),t},onFieldMoveEnd:function(e){this.$emit("fieldMoveEnd",e)},findInFacets:function(e){(e=e.toLowerCase())&&0!==e.length||(this.innerFacets=this.allFacets);var t=JSON.parse(JSON.stringify(this.allFacets));t=t.filter((function(t){var n=!1;return t.fields=t.fields.filter((function(t){var r=t.labelRu.toLowerCase().indexOf(e)>=0;return r&&(n=!0),r})),n})),this.innerFacets=t},handleFacetsProp:function(){var e=this.facets.map((function(e){return _objectSpread2(_objectSpread2({},e),{},{expanded:!1})}));e&&e.forEach((function(e){e.fields=e.fields.filter((function(e){return!e.hiddenOnFormConfig}))})),this.innerFacets=JSON.parse(JSON.stringify(e)),this.allFacets=JSON.parse(JSON.stringify(e))}},created:function(){this.handleFacetsProp()}},__vue_script__$4=script$4,__vue_render__$4=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rb-facets-sidebar"},[n("h4",[e._v("Компоненты")]),e._v(" "),n("b-form",[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",[n("b-form-input",{attrs:{placeholder:"Название поля"},model:{value:e.facetSearchStr,callback:function(t){e.facetSearchStr=t},expression:"facetSearchStr"}})],1)],1)],1)],1),e._v(" "),n("div",{staticClass:"rb-facet-list"},e._l(e.innerFacets,(function(t){return t.fields.length>0?n("div",{key:t.name,staticClass:"rb-facet"},[n("h6",{staticClass:"rb-facet-label d-flex cursor-pointer",on:{click:function(e){t.expanded=!t.expanded}}},[n("rb-text",{staticClass:"flex-fill"},[e._v(e._s(t.labelRu))]),e._v(" "),n("rb-icon",{attrs:{icon:t.expanded?e.iconCollapseFacet:e.iconExpandFacet}})],1),e._v(" "),t.expanded?n("b-list-group",[n("draggable",{attrs:{clone:e.onFieldCloned,animation:200,group:{name:"fields",pull:"clone",put:!1},"ghost-class":"rb-facet-field-moving"},on:{end:function(t){return e.onFieldMoveEnd(t)}},model:{value:t.fields,callback:function(n){e.$set(t,"fields",n)},expression:"facet.fields"}},e._l(t.fields,(function(t){return n("b-list-group-item",{key:t.name,staticClass:"cursor-pointer",attrs:{id:t.name+"Sidebar"}},[n("rb-text",[e._v(e._s(t.labelRu))])],1)})),1)],1):e._e()],1):e._e()})),0)],1)},__vue_staticRenderFns__$4=[],__vue_inject_styles__$4=void 0,__vue_scope_id__$4=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$4=!1,__vue_component__$5=normalizeComponent({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$4,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$4,!1,void 0,void 0,void 0),DocTemplateFacetList=__vue_component__$5;const rnds8Pool=new Uint8Array(256);let poolPtr=rnds8Pool.length;function rng(){return poolPtr>rnds8Pool.length-16&&(crypto__default.default.randomFillSync(rnds8Pool),poolPtr=0),rnds8Pool.slice(poolPtr,poolPtr+=16)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&®EX.test(e)}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).substr(1));function stringify(e,t=0){const n=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(!validate(n))throw TypeError("Stringified UUID is invalid");return n}function v4(e,t,n){const r=(e=e||{}).random||(e.rng||rng)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return stringify(r)}var toString=Object.prototype.toString,_typeof=function(e){var t=typeof e;return"undefined"===t?"undefined":(e?t=e.constructor.name:"object"===t&&(t=toString.call(e).slice(8,-1)),t.toLowerCase())},script$3={name:"DocForm",props:{formConfig:Object,applyDefaultValues:{type:Boolean,default:!0},doc:{type:Object,default:function(){return{}}},refSuffix:{type:String,default:"Id"},editable:{type:Boolean,default:!0},displayField:{type:String,default:"labelRu"},showRequiredInLabel:{type:Boolean,default:!0}},data:function(){return{validationState:{}}},watch:{formConfig:function(){this.validationState={},this.execApplyDefaultValues(),this.execApplyDefaultValRule()}},methods:{getResolveValueName:function(e){return!e.dict&&!e.ref||e.multiple?e.name:e.name.substring(0,e.name.length-2)},getResolveValue:function(e){return this.doc[this.getResolveValueName(e)]?this.doc[this.getResolveValueName(e)]:null},setResolveValue:function(e){var t=e.field;e.multiple,this.getResolveValue(t)},getDisplayField:function(e){return e[this.displayField]?e[this.displayField]:e.labelRu},onEventFired:function(e,t,n){var r=this;if("input"===e&&n.ref&&!n.multiple){var o=null;n.name.lastIndexOf(this.refSuffix)>=0&&(o=n.name.substring(0,n.name.lastIndexOf(this.refSuffix))),o&&o.length>0&&(this.doc[o]=null)}n.rules&&n.rules.forEach((function(n){n.event===e&&n.script&&r.runRule(n,{event:t,eventName:e})}))},onGlobalEventFired:function(e,t){var n=this;UtFormConfig.getFields(this.formConfig).forEach((function(r){r.rules&&r.rules.forEach((function(r){r.event===e&&n.runRule(r,{event:t,eventName:e})}))}))},createRuleContext:function(e){return Object.assign(_objectSpread2({form:this,doc:this.doc},e),UtFormConstructor.getRuleContext())},runRule:function(e,t){UtFormConstructor.runRule(this.createRuleContext(t),e.script)},isValueEmpty:function(e){var t;return null==this.doc[e]||(!(!Array.isArray(this.doc[e])||null!==(t=this.doc[e])&&void 0!==t&&t.length)||!(!_typeof("string"===this.doc[e])||""!==this.doc[e]))},isValueLessThanMax:function(e,t){var n;return!(!this.doc[e]||!t)&&(null===(n=this.doc[e])||void 0===n?void 0:n.length)>parseInt(t)},isValueLessThanMin:function(e,t){return!(!this.doc[e]||!t)&&parseInt(this.doc[e])<parseInt(t)},validate:function(){var e=this;for(var t in this.formConfig.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){var n,r,o="";(t.required&&e.isValueEmpty(t.name)&&(o+='Поле "'.concat(e.getDisplayField(t),'" обязательно')),"integer"===t.type&&e.isValueLessThanMin(t.name,t.input.propsData.min)&&(o+="\nМинимальное значение для этого поля ".concat(t.input.propsData.min)),"b-form-textarea"===t.input.type&&e.isValueLessThanMax(t.name,null===(n=t.input.propsData)||void 0===n?void 0:n.max))&&(o+="\nМаксимальное значение для этого поля ".concat(null===(r=t.input.propsData)||void 0===r?void 0:r.max));o?(Vue__default.default.set(e.validationState,t.name,!1),Vue__default.default.set(e.validationState,"".concat(t.name,"__feedback"),o)):Vue__default.default.set(e.validationState,t.name,null),e.onEventFired("validate",{validationState:e.validationState,doc:e.doc},t)}))}))})),this.validationState)if(!1===this.validationState[t])return!1;return!0},getColumnSize:function(e){return e&&e.columnCount?Math.floor(12/e.columnCount):12},execApplyDefaultValues:function(){var e=this;this.applyDefaultValues&&this.formConfig.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){var n;t.defaultValue&&(n=e.defaultValue&&"function"===_typeof(t.defaultValue)?t.defaultValue():null==t.defaultValue?null:t.defaultValue,e.$set(e.doc,t.name,t.defaultValue=n))}))}))}))},execApplyDefaultValRule:function execApplyDefaultValRule(){var _this5=this;this.formConfig.sections.forEach((function(el){el.columns.forEach((function(c){c.fields.forEach((function(f){if(f.rules&&!f.defaultValue){var rule=f.rules.find((function(e){return"defaultValue"===e.event}));rule&&!_this5.doc[f.name]&&_this5.$set(_this5.doc,f.name,f.defaultValue=eval(rule.script))}}))}))}))}},mounted:function(){this.execApplyDefaultValues(),this.execApplyDefaultValRule(),this.onGlobalEventFired("form-mounted",this)},activated:function(){this.execApplyDefaultValues(),this.execApplyDefaultValRule(),this.onGlobalEventFired("form-activated",this)}},__vue_script__$3=script$3,__vue_render__$3=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.formConfig?n("b-form",{staticClass:"rb-doc-form"},e._l(e.formConfig.sections,(function(t){return e.formConfig&&e.formConfig.sections?n("b-container",{key:t.labelRu,staticClass:"rb-form-section"},[n("b-row",[n("b-col",{attrs:{lg:"12"}},[n("h4",[e._v(e._s(e.getDisplayField(t)))])]),e._v(" "),e._l(t.columns,(function(r){return[n("b-col",{key:r.index,attrs:{lg:e.getColumnSize(t),sm:12}},[e._l(r.fields,(function(t){return[e._v("\n "+e._s(t.valueName)+"\n "),t.visible?n("b-form-row",{key:t.name},[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{ref:"inputContainer",refInFor:!0,attrs:{"data-field":t.name,state:e.validationState[t.name],"invalid-feedback":e.validationState[t.name+"__feedback"]},scopedSlots:e._u([{key:"label",fn:function(){return[n("span",{attrs:{title:e.getDisplayField(t)}},[e._v(e._s(e.getDisplayField(t)))]),e._v(" "),e.showRequiredInLabel&&t.required?n("span",{staticClass:"text-danger"},[e._v("*")]):e._e()]},proxy:!0}],null,!0)},[n(t.input.type,e._b({ref:t.ref?t.ref:t.name,refInFor:!0,tag:"component",attrs:{"resolve-value":e.getResolveValue(t),disabled:!e.editable||!t.editable,id:t.name,state:e.validationState[t.name],required:t.required},on:{"hook:created":function(n){return e.onEventFired("created",n,t)},"hook:destroyed":function(n){return e.onEventFired("destroyed",n,t)},"hook:activated":function(n){return e.onEventFired("activated",n,t)},"hook:mounted":function(n){return e.onEventFired("mounted",n,t)},input:function(n){return e.onEventFired("input",n,t)},change:function(n){return e.onEventFired("change",n,t)},click:function(n){return e.onEventFired("click",n,t)},"set-resolve-value":e.setResolveValue},model:{value:e.doc[t.name],callback:function(n){e.$set(e.doc,t.name,n)},expression:"doc[field.name]"}},"component",t.input.propsData,!1))],1)],1)],1):e._e()]}))],2)]}))],2)],1):e._e()})),1):e._e()},__vue_staticRenderFns__$3=[],__vue_inject_styles__$3=void 0,__vue_scope_id__$3=void 0,__vue_module_identifier__$3=void 0,__vue_is_functional_template__$3=!1,__vue_component__$4=normalizeComponent({render:__vue_render__$3,staticRenderFns:__vue_staticRenderFns__$3},__vue_inject_styles__$3,__vue_script__$3,__vue_scope_id__$3,__vue_is_functional_template__$3,__vue_module_identifier__$3,!1,void 0,void 0,void 0),DocForm=__vue_component__$4,script$2={name:"FieldRuleFormModal",components:{DocForm:DocForm},props:{field:Object,rule:Object,formConfig:Object,mode:{type:String,default:"ins"},onAfterOk:Function},data:function(){return{id:"rb-field-rule-form-modal",state:this.getDefaultState(),innerFormConfig:null,innerRule:null}},computed:{title:function(){return"ins"===this.mode?"Добавление правила":"Редактирование правила"},fields:function(){return UtFormConfig.getFields(this.formConfig)},rulePresets:function(){return UtFormConstructor.getAvailableFieldRules(this.field)}},watch:{formConfig:function(){this.copyToInnerFormConfig()},rule:function(){this.rule?this.innerRule=this.rule:this.innerRule=this.getDefaultRule()}},methods:{validateFields:function(e){var t=this;(e?[e]:["name","event","script"]).forEach((function(e){t.innerRule[e]?(t.state[e]=!0,t.state["".concat(e,"_feedback")]=null):(t.state[e]=!1,t.state["".concat(e,"_feedback")]="Заполните название")}))},copyToInnerFormConfig:function(){this.innerFormConfig=JSON.parse(JSON.stringify(this.formConfig))},applyRuleToInnerFormConfig:function(){if(this.innerFormConfig){var e=UtFormConfig.findRule(this.innerRule.id,this.innerFormConfig);if(e)Object.assign(e,this.innerRule);else{var t=UtFormConfig.findField(this.field.name,this.innerFormConfig);t&&(t.rules=t.rules?t.rules:[],t.rules.push(this.rule))}}},onActivateTab:function(e){e>0&&(this.copyToInnerFormConfig(),this.applyRuleToInnerFormConfig())},getDefaultState:function(){return{name:null,event:null,script:null}},getDefaultRule:function(){return{id:v4(),name:null,event:null,script:null}},resetModal:function(){this.state=this.getDefaultState(),this.innerRule=null},addVariableToScript:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript(e,t)},addSetVariableToScript:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript("doc['".concat(e.name,"'] = Значение;"),t)},addCallInputFunction:function(e){var t=this.$refs.scriptInput.selectionStart;this.insertTextToScript("form.$refs['".concat(e.name,"'][0].Название функции();"),t)},insertTextToScript:function(e,t){t=null!=t?t:this.script.length,this.innerRule.script=null!=this.innerRule.script?this.innerRule.script:"";var n=this.innerRule.script.split("");n.splice(t,0,e),this.innerRule.script=n.join("")},onRuleSelected:function(e){var t=this.rulePresets.find((function(t){return t.name===e}));t&&(Object.assign(this.innerRule,t),this.innerRule.script=this.innerRule.script.trim())},onOk:function(){var e=this;this.validateFields(),this.state.name&&this.state.script&&(this.onAfterOk&&this.onAfterOk(this.innerRule),this.$nextTick((function(){e.resetModal(),e.$bvModal.hide(e.id)})))}},created:function(){this.copyToInnerFormConfig()}},__vue_script__$2=script$2,__vue_render__$2=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:e.id,title:e.title,"modal-class":"rb-field-rule-form-modal",size:"lg","ok-title":"Сохранить правило","cancel-variant":"outline-gray","cancel-title":"Отмена"},on:{ok:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-card",{attrs:{"no-body":""}},[n("b-tabs",{attrs:{card:""},on:{"activate-tab":e.onActivateTab}},[n("b-tab",{attrs:{title:"Правило",active:""}},[e.innerRule?n("b-form",[n("b-form-row",[n("b-col",{attrs:{log:"12"}},[e.rulePresets.length>0?n("b-form-group",{attrs:{label:"Выбрать"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Выберите готовое правило из списка и если нужно, измените\n ")]},proxy:!0}],null,!1,1926378271)},[e._v(" "),n("b-form-select",{on:{input:function(t){return e.onRuleSelected(t)}}},e._l(e.rulePresets,(function(t){return n("b-form-select-option",{key:t.name,attrs:{value:t.name}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")])})),1)],1):e._e()],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Название"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Задайте уникальное название, чтобы отличать правило в списке\n ")]},proxy:!0}],null,!1,2943614562)},[e._v(" "),n("b-form-input",{attrs:{state:e.state.name,"invalid-feedback":e.state.name_feedback},model:{value:e.innerRule.name,callback:function(t){e.$set(e.innerRule,"name",t)},expression:"innerRule.name"}})],1)],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Событие"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n При возникновении этого события будет выполняться правило\n ")]},proxy:!0}],null,!1,2258732973)},[e._v(" "),n("b-form-select",{attrs:{state:e.state.event,"invalid-feedback":e.state.event_feedback},model:{value:e.innerRule.event,callback:function(t){e.$set(e.innerRule,"event",t)},expression:"innerRule.event"}},[n("b-form-select-option",{attrs:{value:"input"}},[e._v("\n Ввод значения\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"change"}},[e._v("\n Изменение значения\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"click"}},[e._v("\n Клик\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"validate"}},[e._v("\n Валидация\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"defaultValue"}},[e._v("\n Установить значение по умолчанию\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"created"}},[e._v("\n Инпут создан\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"mounted"}},[e._v("\n Инпут подключен\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"activated"}},[e._v("\n Инпут активирован\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"form-mounted"}},[e._v("\n Форма создана\n ")]),e._v(" "),n("b-form-select-option",{attrs:{value:"form-activated"}},[e._v("\n Форма показана\n ")])],1)],1)],1),e._v(" "),n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Скрипт"},scopedSlots:e._u([{key:"description",fn:function(){return[e._v("\n Здесь указывается скрипт правила. Скрипт должен быть написан на языке\n javascript\n ")]},proxy:!0}],null,!1,2149825091)},[e._v(" "),n("div",{staticClass:"rb-script-input"},[n("b-button-toolbar",[n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Переменные",variant:"outline-secondary",size:"sm"}},[n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("doc")}}},[e._v("\n Документ\n ")]),e._v(" "),n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("form")}}},[e._v("\n Форма\n ")]),e._v(" "),n("b-dropdown-item",{on:{click:function(t){return e.addVariableToScript("event")}}},[e._v("\n Значение события\n ")])],1),e._v(" "),n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Задать значение",variant:"outline-secondary",size:"sm"}},e._l(e.fields,(function(t){return e.fields?n("b-dropdown-item",{key:t.name,on:{click:function(n){return e.addSetVariableToScript(t)}}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")]):e._e()})),1),e._v(" "),n("b-dropdown",{staticClass:"mx-1",attrs:{text:"Вызвать функцию инпута",variant:"outline-secondary",size:"sm"}},e._l(e.fields,(function(t){return e.fields?n("b-dropdown-item",{key:t.name,on:{click:function(n){return e.addCallInputFunction(t)}}},[e._v("\n "+e._s(t.labelRu)+" ("+e._s(t.name)+")\n ")]):e._e()})),1)],1),e._v(" "),n("b-form-textarea",{ref:"scriptInput",attrs:{state:e.state.script,"invalid-feedback":e.state.script_feedback,rows:"8"},model:{value:e.innerRule.script,callback:function(t){e.$set(e.innerRule,"script",t)},expression:"innerRule.script"}})],1)])],1)],1)],1):e._e()],1),e._v(" "),e.innerFormConfig?n("b-tab",{attrs:{title:"Протестировать правило"}},[n("doc-form",{attrs:{"form-config":e.innerFormConfig}})],1):e._e()],1)],1)],1)},__vue_staticRenderFns__$2=[],__vue_inject_styles__$2=void 0,__vue_scope_id__$2=void 0,__vue_module_identifier__$2=void 0,__vue_is_functional_template__$2=!1,__vue_component__$3=normalizeComponent({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$2,__vue_scope_id__$2,__vue_is_functional_template__$2,__vue_module_identifier__$2,!1,void 0,void 0,void 0),FieldRuleFormModal=__vue_component__$3,script$1={name:"DocTemplateFieldSidebar",components:{FieldRuleFormModal:FieldRuleFormModal},props:{value:{type:Object,default:null},visible:{type:Boolean,default:null},formConfig:Object},data:function(){return{innerVisible:null,field:null,currentInputName:null,modalId:"rb-field-rule-form-modal",ruleModalCfg:{rule:{},mode:"ins"},rulesHash:v4()}},computed:{inputOptions:function(){return this.field?UtFormConstructor.getInputTypes(this.field):[]},iconCloseSidebar:function(){return UtFormConstructor.config.icons.iconCloseFieldSidebar},iconOpenSidebar:function(){return UtFormConstructor.config.icons.iconOpenFieldSidebar},iconAdd:function(){return UtFormConstructor.config.icons.iconAdd},rules:function(){return UtFormConstructor.getAvailableFieldRules(this.field)},hasMultipleInputTypes:function(){return UtFormConstructor.hasMultipleInputTypes(this.field)},multiple:function(){return this.field&&this.field.multiple}},watch:{visible:function(){this.innerVisible=this.visible},value:function(){this.field=this.value,this.field&&this.field.input&&(this.currentInputName=this.field.input.name)},field:{handler:function(){this.$emit("input",this.field),this.$emit("change",this.field)},deep:!0},currentInputName:function(e){this.field.input=UtFormConstructor.getInputTypeByName(this.currentInputName,this.field)},multiple:function(){var e=UtFormConstructor.getDefaultInput(this.field);this.field.multiple&&(this.currentInputName=e.name)}},methods:{hide:function(){this.innerVisible=!1,this.$emit("hide")},getPropInputType:function(e,t){return["string","number"].includes(e.type)?"b-form-input":["date"].includes(e.type)?"rb-date-picker-input":"rb-boolean-single-option-input"},getPropInputPropData:function(e,t){return"string"===e.type?{type:"text"}:"number"===e.type?{type:"number"}:{}},addRule:function(){var e=this;this.ruleModalCfg={mode:"ins",rule:{name:null,script:null},onAfterOk:function(t){e.field.rules=e.field.rules?e.field.rules:[],e.field.rules.push(_objectSpread2({},t)),e.rulesHash=v4()}},this.$bvModal.show(this.modalId)},editRule:function(e,t){t.target.classList&&t.target.classList.contains("rb-remove-rule")||(this.ruleModalCfg={mode:"upd",rule:_objectSpread2({},e),onAfterOk:function(t){Object.assign(e,t)}},this.$bvModal.show(this.modalId))},removeRule:function(e){var t=this.field.rules.findIndex((function(t){return t.id===e.id}));t>=0&&this.field.rules.splice(t,1),this.rulesHash=v4()}},created:function(){this.value&&(this.innerVisible=this.visible,this.field=this.value,this.field&&this.field.input&&(this.currentInputName=this.field.input.name))}},__vue_script__$1=script$1,__vue_render__$1=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-sidebar",{staticClass:"rb-doc-template-field-sidebar",attrs:{right:"","bg-variant":"white",shadow:""},scopedSlots:e._u([{key:"header",fn:function(){return[n("b-button",{staticClass:"rb-sidebar-close-btn",attrs:{variant:"secondary"},on:{click:e.hide}},[n("rb-icon",{attrs:{icon:e.innerVisible?e.iconCloseSidebar:e.iconOpenSidebar}})],1),e._v(" "),n("h4",[e._v("Редактор свойств")])]},proxy:!0}]),model:{value:e.innerVisible,callback:function(t){e.innerVisible=t},expression:"innerVisible"}},[e._v(" "),e.field?n("b-form",[n("div",{staticClass:"rb-form-section"},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Название"}},[n("rb-text",[e._v(e._s(e.field.name))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Тип"}},[n("rb-text",[e._v(e._s(e.field.type))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{staticClass:"rb-immutable",attrs:{label:"Тэг для файла шаблона"}},[n("rb-text",[e._v(e._s(e.field.tag))])],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Заголовок"}},[n("rb-multi-lang-input",{model:{value:e.field,callback:function(t){e.field=t},expression:"field"}})],1)],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.visible,callback:function(t){e.$set(e.field,"visible",t)},expression:"field.visible"}},[e._v("Отображаемое")])],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.editable,callback:function(t){e.$set(e.field,"editable",t)},expression:"field.editable"}},[e._v("Редактируемое")])],1)],1),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-checkbox",{attrs:{size:"lg"},model:{value:e.field.required,callback:function(t){e.$set(e.field,"required",t)},expression:"field.required"}},[e._v("Обязательное")])],1)],1)],1),e._v(" "),n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("\n Настройки ввода\n ")]),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Тип инпута"}},[n("rb-dropdown-input",{attrs:{items:e.inputOptions,"display-field":"text","value-field":"name",block:""},model:{value:e.currentInputName,callback:function(t){e.currentInputName=t},expression:"currentInputName"}})],1),e._v(" "),e._l(e.field.input.props,(function(t,r){return[t.visible?n("b-form-group",{key:r,attrs:{label:t.label}},[n(e.getPropInputType(t,r),e._b({tag:"component",model:{value:e.field.input.propsData[r],callback:function(t){e.$set(e.field.input.propsData,r,t)},expression:"field.input.propsData[propName]"}},"component",e.getPropInputPropData(t,r),!1))],1):e._e()]}))],2)],1)],1),e._v(" "),e.field.input?n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("Значение по-умолчанию")]),e._v(" "),n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{ref:"inputContainer",attrs:{label:e.field.labelRu}},[n(e.field.input.type,e._b({tag:"component",model:{value:e.field.defaultValue,callback:function(t){e.$set(e.field,"defaultValue",t)},expression:"field.defaultValue"}},"component",e.field.input.propsData,!1))],1)],1)],1)],1):e._e(),e._v(" "),n("div",{staticClass:"rb-form-section"},[n("div",{staticClass:"rb-title"},[e._v("Правила")]),e._v(" "),n("b-list-group",{attrs:{"data-hash":e.rulesHash}},[e._l(e.field.rules,(function(t){return n("b-list-group-item",{key:t.id,staticClass:"cursor-pointer d-flex justify-content-between align-items-center",attrs:{"data-hash":e.rulesHash},on:{click:function(n){return e.editRule(t,n)}}},[n("rb-text",[e._v(e._s(t.name))]),e._v(" "),n("rb-icon",{staticClass:"rb-remove-rule",attrs:{icon:"icon-close"},on:{click:function(n){return e.removeRule(t)}}})],1)})),e._v(" "),n("b-list-group-item",{staticClass:"cursor-pointer",on:{click:e.addRule}},[n("rb-icon",{attrs:{icon:e.iconAdd}}),e._v(" "),n("rb-text",[e._v("Добавить правило ...")])],1)],2)],1)]):e._e(),e._v(" "),n("field-rule-form-modal",{attrs:{rule:e.ruleModalCfg.rule,"form-config":e.formConfig,field:e.field,mode:e.ruleModalCfg.mode,"on-after-ok":e.ruleModalCfg.onAfterOk}})],1)},__vue_staticRenderFns__$1=[],__vue_inject_styles__$1=void 0,__vue_scope_id__$1=void 0,__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1,__vue_component__$2=normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,!1,void 0,void 0,void 0),DocTemplateFieldSidebar=__vue_component__$2,script={name:"DocTemplateConstructor",components:{DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateSectionModal:DocTemplateSectionModal,draggable:vuedraggable_umd},props:{formConfig:{type:Object,default:function(){return{sections:[]}}},facets:{type:Array,default:function(){return[]}}},data:function(){return{sidebarVisible:!1,sidebarField:null,columnTo:!1,hash:"",sectionModalCfg:{id:"rb-doc-template-section-modal",mode:"ins",section:null,onAfterOk:function(){}}}},computed:{iconAdd:function(){return UtFormConstructor.config.icons.iconAdd},iconEdit:function(){return UtFormConstructor.config.icons.iconEdit},iconDelete:function(){return UtFormConstructor.config.icons.iconDelete},iconDrag:function(){return UtFormConstructor.config.icons.iconDrag}},methods:{showProperties:function(e,t){t.target.classList&&t.target.classList.contains("rb-remove-field")||(this.sidebarVisible=!0,this.sidebarField=e)},addSection:function(e){var t=this,n={labelRu:null,columnCount:e};this.sectionModalCfg.mode="ins",this.sectionModalCfg.section=n,this.sectionModalCfg.onAfterOk=function(){n.columns=[];for(var r=0;r<e;r++)n.columns.push({index:r,fields:[]});t.formConfig.sections.push(n)},this.$bvModal.show(this.sectionModalCfg.id)},editSection:function(e){this.sectionModalCfg.mode="update",this.sectionModalCfg.section=e,this.sectionModalCfg.onAfterOk=function(){},this.$bvModal.show(this.sectionModalCfg.id)},removeSection:function(e,t){this.formConfig.sections.splice(t,1)},multipleFieldAreOnFormConfig:function(e){var t=0;return this.formConfig.sections.forEach((function(n){n.columns.forEach((function(n){n.fields.forEach((function(n){n.name===e.name&&t++}))}))})),t>1},removeFieldFromColumn:function(e,t,n){var r=null!=n?n:-1;r<0&&(r=t.fields.findIndex((function(t){return e.name===t.name}))),r>=0&&t.fields.splice(r,1)},onRemoveField:function(e,t,n){e.preventDefault(),this.removeFieldFromColumn(t,n)},onFieldAddedToColumn:function(e,t,n){this.columnTo=t},onFieldMoveEnd:function(e){var t=e.newIndex,n=e.item._underlying_vm_;n.hasOwnProperty("defaultValue")||this.$set(n,"defaultValue",void 0),this.multipleFieldAreOnFormConfig(n)&&(this.removeFieldFromColumn(n,this.columnTo,t),this.resetDragVariables(),this.$bvModal.msgBoxOk("На форме уже есть это поле",{title:"Ошибка",headerClass:"rb-error-msg-box__header",bodyClass:"rb-error-msg-box__body",footerClass:"rb-error-msg-box__footer",centered:!0,noCloseOnBackdrop:!0,noCloseOnEsc:!0})),this.resetDragVariables(),this.hash=(Math.random()+1).toString(36).substring(7)},getFieldExtendedPropsData:function(e){return _objectSpread2(_objectSpread2({},e.input.propsData),{},{placeholder:e.tag,disabled:!0})},resetDragVariables:function(){this.columnTo=null}}},__vue_script__=script,__vue_render__=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rb-doc-template-constructor d-flex"},[n("doc-template-facet-list",{attrs:{facets:e.facets},on:{fieldMoveEnd:e.onFieldMoveEnd}}),e._v(" "),n("div",{staticClass:"rb-form-constructor flex-fill"},[n("div",{staticClass:"rb-constructor-toolbar d-flex flex-row"},[n("h4",[e._v("Добавить секцию: ")]),e._v(" "),n("div",{staticClass:"rb-layout-buttons"},[n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(1)}}},[n("rb-text",[e._v("Секция с 1 колонкой")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1),e._v(" "),n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(2)}}},[n("rb-text",[e._v("Секция с 2 колонками")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1),e._v(" "),n("b-button",{attrs:{pill:"",variant:"outline-gray"},on:{click:function(t){return e.addSection(3)}}},[n("rb-text",[e._v("Секция с 3 колонками")]),e._v(" "),n("rb-icon",{attrs:{icon:e.iconAdd}})],1)],1)]),e._v(" "),n("div",{staticClass:"rb-constructor-body"},[n("draggable",{attrs:{animation:200,group:"section","ghost-class":"rb-form-card-moving",handle:".rb-row-drag-handle"},model:{value:e.formConfig.section,callback:function(t){e.$set(e.formConfig,"section",t)},expression:"formConfig.section"}},e._l(e.formConfig.sections,(function(t,r){return n("b-card",{key:t.labelRu,staticClass:"rb-form-card",attrs:{"data-hash":e.hash},scopedSlots:e._u([{key:"header",fn:function(){return[n("rb-icon",{staticClass:"cursor-pointer rb-row-drag-handle",attrs:{icon:e.iconDrag}}),e._v(" "),n("rb-text",{staticClass:"flex-fill",on:{click:function(n){return e.editSection(t)}}},[e._v("\n "+e._s(t.labelRu)+"\n ")]),e._v(" "),n("span",{staticClass:"rb-actions"},[n("rb-icon",{staticClass:"cursor-pointer",attrs:{icon:e.iconEdit},on:{click:function(n){return e.editSection(t)}}}),e._v(" "),n("rb-icon",{staticClass:"cursor-pointer",attrs:{icon:e.iconDelete},on:{click:function(n){return e.removeSection(t,r)}}})],1)]},proxy:!0}],null,!0)},[e._v(" "),n("div",{staticClass:"d-flex flex-row"},e._l(t.columns,(function(r){return n("draggable",{key:r.index,staticClass:"rb-form-column",class:{"rb-single-column":1===t.columnCount},attrs:{tag:"b-form",animation:200,group:"fields","ghost-class":"rb-moving-item",handle:".rb-field-drag-handle"},on:{add:function(n){return e.onFieldAddedToColumn(n,r,t)}},model:{value:r.fields,callback:function(t){e.$set(r,"fields",t)},expression:"column.fields"}},e._l(r.fields,(function(t){return n("b-form-row",{key:t.name,staticClass:"cursor-pointer",on:{click:function(n){return e.showProperties(t,n)}}},[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:t.labelRu},scopedSlots:e._u([{key:"label",fn:function(){return[n("rb-icon",{staticClass:"rb-field-drag-handle",attrs:{icon:e.iconDrag}}),e._v(" "),n("rb-text",[e._v(e._s(t.labelRu))]),e._v(" "),n("rb-icon",{staticClass:"rb-remove-field",attrs:{icon:e.iconDelete},on:{click:function(n){return n.preventDefault(),e.onRemoveField(n,t,r)}}})]},proxy:!0}],null,!0)},[e._v(" "),t.input?n(t.input.type,e._b({tag:"component",staticClass:"cursor-pointer",attrs:{id:t.name,disabled:""}},"component",e.getFieldExtendedPropsData(t),!1)):e._e()],1)],1)],1)})),1)})),1)])})),1)],1),e._v(" "),n("doc-template-field-sidebar",{attrs:{visible:e.sidebarVisible,"form-config":e.formConfig},on:{hide:function(t){e.sidebarVisible=!1}},model:{value:e.sidebarField,callback:function(t){e.sidebarField=t},expression:"sidebarField"}}),e._v(" "),n("doc-template-section-modal",{attrs:{mode:e.sectionModalCfg.mode,section:e.sectionModalCfg.section,"on-after-ok":e.sectionModalCfg.onAfterOk}})],1)],1)},__vue_staticRenderFns__=[],__vue_inject_styles__=void 0,__vue_scope_id__=void 0,__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,__vue_component__=normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,!1,void 0,void 0,void 0),__vue_component__$1=__vue_component__,components$1=Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm}),install=function(e){Object.entries(components$1).forEach((function(t){var n=_slicedToArray(t,2),r=n[0],o=n[1];e.component(r,o)}))},components=Object.freeze({__proto__:null,default:install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});return Object.entries(components).forEach((function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];"default"!==n&&(install[n]=r)})),install}(Vue,crypto);
|
|
@@ -11430,6 +11430,7 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
11430
11430
|
ref: "inputContainer",
|
|
11431
11431
|
refInFor: true,
|
|
11432
11432
|
attrs: {
|
|
11433
|
+
"data-field": field.name,
|
|
11433
11434
|
"state": _vm.validationState[field.name],
|
|
11434
11435
|
"invalid-feedback": _vm.validationState[field.name + "__feedback"]
|
|
11435
11436
|
},
|
|
@@ -11503,7 +11504,7 @@ var __vue_inject_styles__$3 = undefined;
|
|
|
11503
11504
|
var __vue_scope_id__$3 = undefined;
|
|
11504
11505
|
/* module identifier */
|
|
11505
11506
|
|
|
11506
|
-
var __vue_module_identifier__$3 = "data-v-
|
|
11507
|
+
var __vue_module_identifier__$3 = "data-v-65d5941a";
|
|
11507
11508
|
/* functional template */
|
|
11508
11509
|
|
|
11509
11510
|
var __vue_is_functional_template__$3 = false;
|