"use strict";(self.webpackChunkgrav_plugin_form=self.webpackChunkgrav_plugin_form||[]).push([["vendor"],{"./node_modules/dropzone/dist/dropzone.js":(e,t,n)=>{function i(e){return i="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},i(e)}function o(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?a(e):t}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n1?n-1:0),o=1;o'),this.element.appendChild(e));var s=e.getElementsByTagName("span")[0];return s&&(null!=s.textContent?s.textContent=this.options.dictFallbackMessage:null!=s.innerText&&(s.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,i){var o={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},r=e.width/e.height;null==t&&null==n?(t=o.srcWidth,n=o.srcHeight):null==t?t=n*r:null==n&&(n=t/r);var a=(t=Math.min(t,o.srcWidth))/(n=Math.min(n,o.srcHeight));if(o.srcWidth>t||o.srcHeight>n)if("crop"===i)r>a?(o.srcHeight=e.height,o.srcWidth=o.srcHeight*a):(o.srcWidth=e.width,o.srcHeight=o.srcWidth/a);else{if("contain"!==i)throw new Error("Unknown resizeMethod '".concat(i,"'"));r>a?n=t/r:t=n*r}return o.srcX=(e.width-o.srcWidth)/2,o.srcY=(e.height-o.srcHeight)/2,o.trgWidth=t,o.trgHeight=n,o},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);var i=!0,o=!1,r=void 0;try{for(var a,l=e.previewElement.querySelectorAll("[data-dz-name]")[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var s=a.value;s.textContent=e.name}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}var u=!0,c=!1,d=void 0;try{for(var h,p=e.previewElement.querySelectorAll("[data-dz-size]")[Symbol.iterator]();!(u=(h=p.next()).done);u=!0)(s=h.value).innerHTML=this.filesize(e.size)}catch(e){c=!0,d=e}finally{try{u||null==p.return||p.return()}finally{if(c)throw d}}this.options.addRemoveLinks&&(e._removeLink=t.createElement(''.concat(this.options.dictRemoveFile,"")),e.previewElement.appendChild(e._removeLink));var f=function(i){return i.preventDefault(),i.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,(function(){return n.removeFile(e)})):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,(function(){return n.removeFile(e)})):n.removeFile(e)},v=!0,m=!1,g=void 0;try{for(var y,b=e.previewElement.querySelectorAll("[data-dz-remove]")[Symbol.iterator]();!(v=(y=b.next()).done);v=!0){y.value.addEventListener("click",f)}}catch(e){m=!0,g=e}finally{try{v||null==b.return||b.return()}finally{if(m)throw g}}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");var n=!0,i=!1,o=void 0;try{for(var r,a=e.previewElement.querySelectorAll("[data-dz-thumbnail]")[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;l.alt=e.name,l.src=t}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return setTimeout((function(){return e.previewElement.classList.add("dz-image-preview")}),1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);var n=!0,i=!1,o=void 0;try{for(var r,a=e.previewElement.querySelectorAll("[data-dz-errormessage]")[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){r.value.textContent=t}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement){var i=!0,o=!1,r=void 0;try{for(var a,l=e.previewElement.querySelectorAll("[data-dz-uploadprogress]")[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var s=a.value;"PROGRESS"===s.nodeName?s.value=t:s.style.width="".concat(t,"%")}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i"))),this.clickableElements.length){!function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",(function(){var t=e.hiddenFileInput.files;if(t.length){var i=!0,o=!1,r=void 0;try{for(var a,l=t[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var s=a.value;e.addFile(s)}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}}return e.emit("addedfiles",t),n()}))}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var n=!0,i=!1,o=void 0;try{for(var r,a=this.events[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;this.on(l,this.options[l])}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}this.on("uploadprogress",(function(){return e.updateTotalUploadProgress()})),this.on("removedfile",(function(){return e.updateTotalUploadProgress()})),this.on("canceled",(function(t){return e.emit("complete",t)})),this.on("complete",(function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout((function(){return e.emit("queuecomplete")}),0)}));var s=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t")),i+='');var o=t.createElement(i);return"FORM"!==this.element.tagName?(n=t.createElement('
'))).appendChild(o):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:o}},{key:"getExistingFallback",value:function(){for(var e=function(e){var t=!0,n=!1,i=void 0;try{for(var o,r=e[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value;if(/(^| )fallback($| )/.test(a.className))return a}}catch(e){n=!0,i=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw i}}},t=0,n=["div","form"];t0){for(var i=["tb","gb","mb","kb","b"],o=0;o=Math.pow(this.options.filesizeBase,4-o)/10){t=e/Math.pow(this.options.filesizeBase,4-o),n=r;break}}t=Math.round(10*t)/10}return"".concat(t," ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n0){var o=!0,r=!1,a=void 0;try{for(var l,s=i[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var u=l.value;u.isFile?u.file((function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath="".concat(t,"/").concat(e.name),n.addFile(e)})):u.isDirectory&&n._addFilesFromDirectory(u,"".concat(t,"/").concat(u.name))}}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}e()}return null}),o)}()}},{key:"accept",value:function(e,n){this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(function(t){t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(e){var t=!0,n=!1,i=void 0;try{for(var o,r=e[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value;this.enqueueFile(a)}}catch(e){n=!0,i=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw i}}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return n.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout((function(){return t._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()}))}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=p(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);var n=!0,i=!1,o=void 0;try{for(var r,a=this.files.slice()[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;(l.status!==t.UPLOADING||e)&&this.removeFile(l)}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return null}},{key:"resizeImage",value:function(e,n,i,o,r){var a=this;return this.createThumbnail(e,n,i,o,!0,(function(n,i){if(null==i)return r(e);var o=a.options.resizeMimeType;null==o&&(o=e.type);var l=i.toDataURL(o,a.options.resizeQuality);return r(t.dataURItoBlob(l))}))}},{key:"createThumbnail",value:function(e,t,n,i,o,r){var a=this,l=new FileReader;l.onload=function(){e.dataURL=l.result,"image/svg+xml"!==e.type?a.createThumbnailFromUrl(e,t,n,i,o,r):null!=r&&r(l.result)},l.readAsDataURL(e)}},{key:"displayExistingFile",value:function(e,t,n,i){var o=this,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",e),this.emit("complete",e),r){e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,(function(t){o.emit("thumbnail",e,t),n&&n()}),i)}else this.emit("thumbnail",e,t),n&&n()}},{key:"createThumbnailFromUrl",value:function(e,t,n,i,o,r,a){var l=this,s=document.createElement("img");return a&&(s.crossOrigin=a),s.onload=function(){var a=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(a=function(e){return EXIF.getData(s,(function(){return e(EXIF.getTag(this,"Orientation"))}))}),a((function(o){e.width=s.width,e.height=s.height;var a=l.options.resize.call(l,e,t,n,i),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,o>4&&(u.width=a.trgHeight,u.height=a.trgWidth),o){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}v(c,s,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var d=u.toDataURL("image/png");if(null!=r)return r(d,u)}))},null!=r&&(s.onerror=r),s.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-t));for(;n1?t-1:0),i=1;in.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(o.size/n.options.chunkSize)}if(e[0].upload.chunked){var r=e[0],a=i[0];r.upload.chunks=[];var l=function(){for(var i=0;void 0!==r.upload.chunks[i];)i++;if(!(i>=r.upload.totalChunkCount)){0;var o=i*n.options.chunkSize,l=Math.min(o+n.options.chunkSize,r.size),s={name:n._getParamName(0),data:a.webkitSlice?a.webkitSlice(o,l):a.slice(o,l),filename:r.upload.filename,chunkIndex:i};r.upload.chunks[i]={file:r,index:i,dataBlock:s,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[s])}};if(r.upload.finishedChunkUpload=function(i){var o=!0;i.status=t.SUCCESS,i.dataBlock=null,i.xhr=null;for(var a=0;a=a;l?r++:r--)o[r]=t.charCodeAt(r);return new Blob([i],{type:n})};var p=function(e,t){return e.filter((function(e){return e!==t})).map((function(e){return e}))},f=function(e){return e.replace(/[\-_](\w)/g,(function(e){return e.charAt(1).toUpperCase()}))};h.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},h.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},h.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},h.getElements=function(e,t){var n,i;if(e instanceof Array){i=[];try{var o=!0,r=!1,a=void 0;try{for(var l,s=e[Symbol.iterator]();!(o=(l=s.next()).done);o=!0)n=l.value,i.push(this.getElement(n,t))}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}}catch(e){i=null}}else if("string"==typeof e){i=[];var u=!0,c=!1,d=void 0;try{for(var h,p=document.querySelectorAll(e)[Symbol.iterator]();!(u=(h=p.next()).done);u=!0)n=h.value,i.push(n)}catch(e){c=!0,d=e}finally{try{u||null==p.return||p.return()}finally{if(c)throw d}}}else null!=e.nodeType&&(i=[e]);if(null==i||!i.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},h.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},h.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");var n=e.type,i=n.replace(/\/.*$/,""),o=!0,r=!1,a=void 0;try{for(var l,s=t[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var u=l.value;if("."===(u=u.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(u.toLowerCase(),e.name.length-u.length))return!0}else if(/\/\*$/.test(u)){if(i===u.replace(/\/.*$/,""))return!0}else if(n===u)return!0}}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new h(this,e)}))}),null!==e?e.exports=h:window.Dropzone=h,h.ADDED="added",h.QUEUED="queued",h.ACCEPTED=h.QUEUED,h.UPLOADING="uploading",h.PROCESSING=h.UPLOADING,h.CANCELED="canceled",h.ERROR="error",h.SUCCESS="success";var v=function(e,t,n,i,o,r,a,l,s,u){var c=function(e){e.naturalWidth;var t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;var i=n.getContext("2d");i.drawImage(e,0,0);for(var o=i.getImageData(1,0,1,t).data,r=0,a=t,l=t;l>r;)0===o[4*(l-1)+3]?a=l:r=l,l=a+r>>1;var s=l/t;return 0===s?1:s}(t);return e.drawImage(t,n,i,o,r,a,l,s,u/c)};(function(){function e(){s(this,e)}return c(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,i=void 0,o="",r=void 0,a=void 0,l=void 0,s="",u=0;r=(n=e[u++])>>2,a=(3&n)<<4|(i=e[u++])>>4,l=(15&i)<<2|(o=e[u++])>>6,s=63&o,isNaN(i)?l=s=64:isNaN(o)&&(s=64),t=t+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(s),n=i=o="",r=a=l=s="",ue.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,i="",o=void 0,r=void 0,a="",l=0,s=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(l++))<<2|(o=this.KEY_STR.indexOf(e.charAt(l++)))>>4,n=(15&o)<<4|(r=this.KEY_STR.indexOf(e.charAt(l++)))>>2,i=(3&r)<<6|(a=this.KEY_STR.indexOf(e.charAt(l++))),s.push(t),64!==r&&s.push(n),64!==a&&s.push(i),t=n=i="",o=r=a="",l{function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(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.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nSt,Sortable:()=>je,Swap:()=>ht,default:()=>Dt});function d(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var h=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=d(/Edge/i),f=d(/firefox/i),v=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),m=d(/iP(ad|od|hone)/i),g=d(/chrome/i)&&d(/android/i),y={capture:!1,passive:!1};function b(e,t,n){e.addEventListener(t,n,!h&&y)}function w(e,t,n){e.removeEventListener(t,n,!h&&y)}function E(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 k(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function S(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&E(e,t):E(e,t))||i&&e===n)return e;if(e===n)break}while(e=k(e))}return null}var C,x=/\s+/g;function D(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(x," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(x," ")}}function _(e,t,n){var i=e&&e.style;if(i){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 i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function F(e,t){var n="";if("string"==typeof e)n=e;else do{var i=_(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function T(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o=r:o<=r))return i;if(i===A())break;i=P(i,!1)}return!1}function I(e,t,n,i){for(var o=0,r=0,a=e.children;r2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,r=s(n,Z);K.pluginEvent.bind(je)(e,t,o({dragEl:ee,parentEl:te,ghostEl:ne,rootEl:ie,nextEl:oe,lastDownEl:re,cloneEl:ae,cloneHidden:le,dragStarted:we,putSortable:pe,activeSortable:je.active,originalEvent:i,oldIndex:se,oldDraggableIndex:ce,newIndex:ue,newDraggableIndex:de,hideGhostForTarget:Be,unhideGhostForTarget:Ye,cloneNowHidden:function(){le=!0},cloneNowShown:function(){le=!1},dispatchSortableEvent:function(e){J({sortable:t,name:e,originalEvent:i})}},r))};function J(e){V(o({putSortable:pe,cloneEl:ae,targetEl:ee,rootEl:ie,oldIndex:se,oldDraggableIndex:ce,newIndex:ue,newDraggableIndex:de},e))}var ee,te,ne,ie,oe,re,ae,le,se,ue,ce,de,he,pe,fe,ve,me,ge,ye,be,we,Ee,ke,Se,Ce,xe=!1,De=!1,_e=[],Fe=!1,Te=!1,Ae=[],Me=!1,ze=[],Ie="undefined"!=typeof document,Oe=m,Ne=p||h?"cssFloat":"float",Le=Ie&&!g&&!m&&"draggable"in document.createElement("div"),Pe=function(){if(Ie){if(h)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Re=function(e,t){var n=_(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=I(e,0,t),r=I(e,1,t),a=o&&_(o),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=i&&"none"===n[Ne]||r&&"none"===n[Ne]&&s+u>i)?"vertical":"horizontal"},Ue=function(e){function t(e,n){return function(i,o,r,a){var l=i.options.group.name&&o.options.group.name&&i.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(i,o,r,a),n)(i,o,r,a);var s=(n?i:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},i=e.group;i&&"object"==r(i)||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Be=function(){!Pe&&ne&&_(ne,"display","none")},Ye=function(){!Pe&&ne&&_(ne,"display","")};Ie&&!g&&document.addEventListener("click",(function(e){if(De)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),De=!1,!1}),!0);var He=function(e){if(ee){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,r=e.clientY,_e.some((function(e){var t=e[W].options.emptyInsertThreshold;if(t&&!O(e)){var n=M(e),i=o>=n.left-t&&o<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return i&&l?a=e:void 0}})),a);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[W]._onDragOver(n)}}var o,r,a},Xe=function(e){ee&&ee.parentNode[W]._isOutsideThisEl(e.target)};function je(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[W]=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 Re(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!==je.supportPointer&&"PointerEvent"in window&&!v,emptyInsertThreshold:5};for(var i in K.initializePlugins(this,e,n),n)!(i in t)&&(t[i]=n[i]);for(var o in Ue(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&Le,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?b(e,"pointerdown",this._onTapStart):(b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),_e.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,q())}function We(e,t,n,i,o,r,a,l){var s,u,c=e[W],d=c.options.onMove;return!window.CustomEvent||h||p?(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=i,s.related=o||t,s.relatedRect=r||M(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function qe(e){e.draggable=!1}function Qe(){Me=!1}function Ge(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Ke(e){return setTimeout(e,0)}function Ve(e){return clearTimeout(e)}je.prototype={constructor:je,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ee=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,ee):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=i.filter;if(function(e){ze.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var i=t[n];i.checked&&ze.push(i)}}(n),!ee&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!v||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=S(l,i.draggable,n,!1))&&l.animated||re===l)){if(se=N(l),ce=N(l,i.draggable),"function"==typeof u){if(u.call(this,e,l,this))return J({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),$("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(i){if(i=S(s,i.trim(),n,!1))return J({sortable:t,rootEl:i,name:"filter",targetEl:l,fromEl:n,toEl:n}),$("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!S(s,i.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var i,o=this,r=o.el,a=o.options,l=r.ownerDocument;if(n&&!ee&&n.parentNode===r){var s=M(n);if(ie=r,te=(ee=n).parentNode,oe=ee.nextSibling,re=n,he=a.group,je.dragged=ee,fe={target:ee,clientX:(t||e).clientX,clientY:(t||e).clientY},ye=fe.clientX-s.left,be=fe.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,ee.style["will-change"]="all",i=function(){$("delayEnded",o,{evt:e}),je.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!f&&o.nativeDraggable&&(ee.draggable=!0),o._triggerDragStart(e,t),J({sortable:o,name:"choose",originalEvent:e}),D(ee,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){T(ee,e.trim(),qe)})),b(l,"dragover",He),b(l,"mousemove",He),b(l,"touchmove",He),b(l,"mouseup",o._onDrop),b(l,"touchend",o._onDrop),b(l,"touchcancel",o._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ee.draggable=!0),$("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||h))i();else{if(je.eventCanceled)return void this._onDrop();b(l,"mouseup",o._disableDelayedDrag),b(l,"touchend",o._disableDelayedDrag),b(l,"touchcancel",o._disableDelayedDrag),b(l,"mousemove",o._delayedDragTouchMoveHandler),b(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&b(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,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(){ee&&qe(ee),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"mousemove",this._delayedDragTouchMoveHandler),w(e,"touchmove",this._delayedDragTouchMoveHandler),w(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,t?"touchmove":"mousemove",this._onTouchMove):(b(ee,"dragend",this),b(ie,"dragstart",this._onDragStart));try{document.selection?Ke((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(xe=!1,ie&&ee){$("dragStarted",this,{evt:t}),this.nativeDraggable&&b(document,"dragover",Xe);var n=this.options;!e&&D(ee,n.dragClass,!1),D(ee,n.ghostClass,!0),je.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ve){this._lastX=ve.clientX,this._lastY=ve.clientY,Be();for(var e=document.elementFromPoint(ve.clientX,ve.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ve.clientX,ve.clientY))!==t;)t=e;if(ee.parentNode[W]._isOutsideThisEl(e),t)do{if(t[W]){if(t[W]._onDragOver({clientX:ve.clientX,clientY:ve.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ye()}},_onTouchMove:function(e){if(fe){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=ne&&F(ne,!0),a=ne&&r&&r.a,l=ne&&r&&r.d,s=Oe&&Ce&&L(Ce),u=(o.clientX-fe.clientX+i.x)/(a||1)+(s?s[0]-Ae[0]:0)/(a||1),c=(o.clientY-fe.clientY+i.y)/(l||1)+(s?s[1]-Ae[1]:0)/(l||1);if(!je.active&&!xe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))o.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>o.bottom+r||e.clientX>i.right&&e.clientY>i.top}(e,r,this)&&!m.animated){if(m===ee)return Y(!1);if(m&&a===e.target&&(l=m),l&&(n=M(l)),!1!==We(ie,a,ee,t,l,n,e,!!l))return U(),m&&m.nextSibling?a.insertBefore(ee,m.nextSibling):a.appendChild(ee),te=a,H(),Y(!0)}else if(m&&function(e,t,n){var i=M(I(n.el,0,n.options,!0)),o=j(n.el,n.options,ne),r=10;return t?e.clientXc+u*r/2:sd-Se)return-ke}else if(s>c+u*(1-o)/2&&sd-u*r/2))return s>c+u/2?1:-1;return 0}(e,l,n,r,k?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Te,Ee===l),0!==y){var T=N(ee);do{T-=y,w=te.children[T]}while(w&&("none"===_(w,"display")||w===ne))}if(0===y||w===l)return Y(!1);Ee=l,ke=y;var A=l.nextElementSibling,L=!1,P=We(ie,a,ee,t,l,n,e,L=1===y);if(!1!==P)return 1!==P&&-1!==P||(L=1===P),Me=!0,setTimeout(Qe,30),U(),L&&!A?a.appendChild(ee):l.parentNode.insertBefore(ee,L?A:l),x&&B(x,0,F-x.scrollTop),te=ee.parentNode,void 0===b||Te||(Se=Math.abs(b-M(l)[C])),H(),Y(!0)}if(a.contains(ee))return Y(!1)}return!1}function R(s,u){$(s,f,o({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:h,fromSortable:p,target:l,completed:Y,onMove:function(n,i){return We(ie,a,ee,t,n,M(n),e,i)},changed:H},u))}function U(){R("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function Y(t){return R("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(f),f!==p&&(D(ee,pe?pe.options.ghostClass:c.options.ghostClass,!1),D(ee,s.ghostClass,!0)),pe!==f&&f!==je.active?pe=f:f===je.active&&pe&&(pe=null),p===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){R("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===ee&&!ee.animated||l===a&&!l.animated)&&(Ee=null),s.dragoverBubble||e.rootEl||l===document||(ee.parentNode[W]._isOutsideThisEl(e.target),!t&&He(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function H(){ue=N(ee),de=N(ee,s.draggable),J({sortable:f,name:"change",toEl:a,newIndex:ue,newDraggableIndex:de,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",He),w(document,"mousemove",He),w(document,"touchmove",He)},_offUpEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"pointerup",this._onDrop),w(e,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ue=N(ee),de=N(ee,n.draggable),$("drop",this,{evt:e}),te=ee&&ee.parentNode,ue=N(ee),de=N(ee,n.draggable),je.eventCanceled||(xe=!1,Te=!1,Fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ve(this.cloneId),Ve(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),v&&_(document.body,"user-select",""),_(ee,"transform",""),e&&(we&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ne&&ne.parentNode&&ne.parentNode.removeChild(ne),(ie===te||pe&&"clone"!==pe.lastPutMode)&&ae&&ae.parentNode&&ae.parentNode.removeChild(ae),ee&&(this.nativeDraggable&&w(ee,"dragend",this),qe(ee),ee.style["will-change"]="",we&&!xe&&D(ee,pe?pe.options.ghostClass:this.options.ghostClass,!1),D(ee,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:te,newIndex:null,newDraggableIndex:null,originalEvent:e}),ie!==te?(ue>=0&&(J({rootEl:te,name:"add",toEl:te,fromEl:ie,originalEvent:e}),J({sortable:this,name:"remove",toEl:te,originalEvent:e}),J({rootEl:te,name:"sort",toEl:te,fromEl:ie,originalEvent:e}),J({sortable:this,name:"sort",toEl:te,originalEvent:e})),pe&&pe.save()):ue!==se&&ue>=0&&(J({sortable:this,name:"update",toEl:te,originalEvent:e}),J({sortable:this,name:"sort",toEl:te,originalEvent:e})),je.active&&(null!=ue&&-1!==ue||(ue=se,de=ce),J({sortable:this,name:"end",toEl:te,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),ie=ee=te=ne=oe=ae=re=le=fe=ve=we=ue=de=se=ce=Ee=ke=pe=he=je.dragged=je.ghost=je.clone=je.active=null,ze.forEach((function(e){e.checked=!0})),ze.length=me=ge=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ee&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,r=this.options;i1&&(yt.forEach((function(e){i.addAnimationState({target:e,rect:Et?M(e):o}),X(e),e.fromRect=o,t.removeAnimationState(e)})),Et=!1,function(e,t){yt.forEach((function(n,i){var o=t.children[n.sortableIndex+(e?Number(i):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,i=e.insertion,o=e.activeSortable,r=e.parentEl,a=e.putSortable,l=this.options;if(i){if(n&&o._hideClone(),wt=!1,l.animation&&yt.length>1&&(Et||!n&&!o.options.sort&&!a)){var s=M(vt,!1,!0,!0);yt.forEach((function(e){e!==vt&&(H(e,s),r.appendChild(e))})),Et=!0}if(!n)if(Et||xt(),yt.length>1){var u=gt;o._showClone(t),o.options.animation&&!gt&&u&&bt.forEach((function(e){o.addAnimationState({target:e,rect:mt}),e.fromRect=mt,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,i=e.activeSortable;if(yt.forEach((function(e){e.thisAnimationDuration=null})),i.options.animation&&!n&&i.multiDrag.isMultiDrag){mt=l({},t);var o=F(vt,!0);mt.top-=o.f,mt.left-=o.e}},dragOverAnimationComplete:function(){Et&&(Et=!1,xt())},drop:function(e){var t=e.originalEvent,n=e.rootEl,i=e.parentEl,o=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var u=this.options,c=i.children;if(!kt)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(vt,u.selectedClass,!~yt.indexOf(vt)),~yt.indexOf(vt))yt.splice(yt.indexOf(vt),1),pt=null,V({sortable:o,rootEl:n,name:"deselect",targetEl:vt,originalEvent:t});else{if(yt.push(vt),V({sortable:o,rootEl:n,name:"select",targetEl:vt,originalEvent:t}),t.shiftKey&&pt&&o.el.contains(pt)){var d,h,p=N(pt),f=N(vt);if(~p&&~f&&p!==f)for(f>p?(h=p,d=f):(h=f,d=p+1);h1){var v=M(vt),m=N(vt,":not(."+this.options.selectedClass+")");if(!wt&&u.animation&&(vt.thisAnimationDuration=null),s.captureAnimationState(),!wt&&(u.animation&&(vt.fromRect=v,yt.forEach((function(e){if(e.thisAnimationDuration=null,e!==vt){var t=Et?M(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),xt(),yt.forEach((function(e){c[m]?i.insertBefore(e,c[m]):i.appendChild(e),m++})),a===N(vt))){var g=!1;yt.forEach((function(e){e.sortableIndex===N(e)||(g=!0)})),g&&(r("update"),r("sort"))}yt.forEach((function(e){X(e)})),s.animateAll()}ft=s}(n===i||l&&"clone"!==l.lastPutMode)&&bt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=kt=!1,bt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),w(document,"pointerup",this._deselectMultiDrag),w(document,"mouseup",this._deselectMultiDrag),w(document,"touchend",this._deselectMultiDrag),w(document,"keydown",this._checkKeyDown),w(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==kt&&kt||ft!==this.sortable||e&&S(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;yt.length;){var t=yt[0];D(t,this.options.selectedClass,!1),yt.shift(),V({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[W];t&&t.options.multiDrag&&!~yt.indexOf(e)&&(ft&&ft!==t&&(ft.multiDrag._deselectMultiDrag(),ft=t),D(e,t.options.selectedClass,!0),yt.push(e))},deselect:function(e){var t=e.parentNode[W],n=yt.indexOf(e);t&&t.options.multiDrag&&~n&&(D(e,t.options.selectedClass,!1),yt.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return yt.forEach((function(i){var o;t.push({multiDragElement:i,index:i.sortableIndex}),o=Et&&i!==vt?-1:Et?N(i,":not(."+e.options.selectedClass+")"):N(i),n.push({multiDragElement:i,index:o})})),{items:u(yt),clones:[].concat(bt),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Ct(e,t){bt.forEach((function(n,i){var o=t.children[n.sortableIndex+(e?Number(i):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function xt(){yt.forEach((function(e){e!==vt&&e.parentNode&&e.parentNode.removeChild(e)}))}je.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):t.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):(w(document,"pointermove",this._handleFallbackAutoScroll),w(document,"touchmove",this._handleFallbackAutoScroll),w(document,"mousemove",this._handleFallbackAutoScroll)),at(),rt(),clearTimeout(C),C=void 0},nulling:function(){tt=$e=Ze=ot=nt=Je=et=null,it.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(i,o);if(tt=e,t||this.options.forceAutoScrollFallback||p||h||v){st(e,this.options,r,t);var a=P(r,!0);!ot||nt&&i===Je&&o===et||(nt&&at(),nt=setInterval((function(){var r=P(document.elementFromPoint(i,o),!0);r!==a&&(a=r,rt()),st(e,n.options,r,t)}),10),Je=i,et=o)}else{if(!this.options.bubbleScroll||P(r,!0)===A())return void rt();st(e,this.options,P(r,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),je.mount(dt,ct);const Dt=je}}]);