Files
intotheeast-com-content/plugins/form/assets/form.vendor.js
T

1 line
90 KiB
JavaScript

"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;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}e=n.nmd(e);var d=function(){function e(){s(this,e)}return c(e,[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(e){this._callbacks=this._callbacks||{};var t=this._callbacks[e];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var r=!0,a=!1,l=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){s.value.apply(this,i)}}catch(e){a=!0,l=e}finally{try{r||null==u.return||u.return()}finally{if(a)throw l}}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var i=0;i<n.length;i++){if(n[i]===t){n.splice(i,1);break}}return this}}]),e}(),h=function(e){function t(e,n){var i,l,u;if(s(this,t),(i=o(this,r(t).call(this))).element=e,i.version=t.version,i.defaultOptions.previewTemplate=i.defaultOptions.previewTemplate.replace(/\n*/g,""),i.clickableElements=[],i.listeners=[],i.files=[],"string"==typeof i.element&&(i.element=document.querySelector(i.element)),!i.element||null==i.element.nodeType)throw new Error("Invalid dropzone element.");if(i.element.dropzone)throw new Error("Dropzone already attached.");t.instances.push(a(i)),i.element.dropzone=a(i);var c=null!=(u=t.optionsForElement(i.element))?u:{};if(i.options=t.extend({},i.defaultOptions,c,null!=n?n:{}),i.options.forceFallback||!t.isBrowserSupported())return o(i,i.options.fallback.call(a(i)));if(null==i.options.url&&(i.options.url=i.element.getAttribute("action")),!i.options.url)throw new Error("No URL provided.");if(i.options.acceptedFiles&&i.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(i.options.uploadMultiple&&i.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return i.options.acceptedMimeTypes&&(i.options.acceptedFiles=i.options.acceptedMimeTypes,delete i.options.acceptedMimeTypes),null!=i.options.renameFilename&&(i.options.renameFile=function(e){return i.options.renameFilename.call(a(i),e.name,e)}),i.options.method=i.options.method.toUpperCase(),(l=i.getExistingFallback())&&l.parentNode&&l.parentNode.removeChild(l),!1!==i.options.previewsContainer&&(i.options.previewsContainer?i.previewsContainer=t.getElement(i.options.previewsContainer,"previewsContainer"):i.previewsContainer=i.element),i.options.clickable&&(!0===i.options.clickable?i.clickableElements=[i.element]:i.clickableElements=t.getElements(i.options.clickable,"clickable")),i.init(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,e),c(t,null,[{key:"initClass",value:function(){this.prototype.Emitter=d,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(e,t){return t()},chunksUploaded:function(e,t){t()},fallback:function(){var e;this.element.className="".concat(this.element.className," dz-browser-not-supported");var n=!0,i=!1,o=void 0;try{for(var r,a=this.element.getElementsByTagName("div")[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;if(/(^| )dz-message($| )/.test(l.className)){e=l,l.className="dz-message";break}}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}e||(e=t.createElement('<div class="dz-message"><span></span></div>'),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:'<div class="dz-preview dz-file-preview">\n <div class="dz-image"><img data-dz-thumbnail /></div>\n <div class="dz-details">\n <div class="dz-size"><span data-dz-size></span></div>\n <div class="dz-filename"><span data-dz-name></span></div>\n </div>\n <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n <div class="dz-error-message"><span data-dz-errormessage></span></div>\n <div class="dz-success-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Check</title>\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path>\n </g>\n </svg>\n </div>\n <div class="dz-error-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Error</title>\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>',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('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),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<t;i++)n[i-1]=arguments[i];for(var o=0,r=n;o<r.length;o++){var a=r[o];for(var l in a){var s=a[l];e[l]=s}}return e}}]),c(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(e){return e.accepted})).map((function(e){return e}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(e){return!e.accepted})).map((function(e){return e}))}},{key:"getFilesWithStatus",value:function(e){return this.files.filter((function(t){return t.status===e})).map((function(e){return e}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(e){return e.status===t.UPLOADING||e.status===t.QUEUED})).map((function(e){return e}))}},{key:"init",value:function(){var e=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),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<e.dataTransfer.types.length;t++)if("Files"===e.dataTransfer.types[t])return!0;return!1}(e))return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return s(t),e.emit("dragenter",t)},dragover:function(t){var n;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",s(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return s(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach((function(n){return e.listeners.push({element:n,events:{click:function(i){return(n!==e.element||i.target===e.element||t.elementInside(i.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e,t=0,n=0;if(this.getActiveFiles().length){var i=!0,o=!1,r=void 0;try{for(var a,l=this.getActiveFiles()[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var s=a.value;t+=s.upload.bytesSent,n+=s.upload.total}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(e,"]"):"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,n;if(e=this.getExistingFallback())return e;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>".concat(this.options.dictFallbackText,"</p>")),i+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var o=t.createElement(i);return"FORM"!==this.element.tagName?(n=t.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).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"];t<n.length;t++){var i,o=n[t];if(i=e(this.element.getElementsByTagName(o)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var i=e.events[n];t.push(e.element.addEventListener(n,i,!1))}return t}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var i=e.events[n];t.push(e.element.removeEventListener(n,i,!1))}return t}()}))}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach((function(e){return e.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(t){return e.cancelUpload(t)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(e){return e.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var i=["tb","gb","mb","kb","b"],o=0;o<i.length;o++){var r=i[o];if(e>=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"<strong>".concat(t,"</strong> ").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;n<e.dataTransfer.files.length;n++)t[n]=e.dataTransfer.files[n];if(t.length){var i=e.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(t)}this.emit("addedfiles",t)}}},{key:"paste",value:function(e){if(null!=(t=null!=e?e.clipboardData:void 0,n=function(e){return e.items},null!=t?n(t):void 0)){var t,n;this.emit("paste",e);var i=e.clipboardData.items;return i.length?this._addFilesFromItems(i):void 0}}},{key:"handleFiles",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.addFile(a)}}catch(e){n=!0,i=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw i}}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){var n=[],i=!0,o=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var s,u=a.value;null!=u.webkitGetAsEntry&&(s=u.webkitGetAsEntry())?s.isFile?n.push(t.addFile(u.getAsFile())):s.isDirectory?n.push(t._addFilesFromDirectory(s,s.name)):n.push(void 0):null!=u.getAsFile&&(null==u.kind||"file"===u.kind)?n.push(t.addFile(u.getAsFile())):n.push(void 0)}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}return n}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,i=e.createReader(),o=function(e){return t=console,n="log",i=function(t){return t.log(e)},null!=t&&"function"==typeof t[n]?i(t,n):void 0;var t,n,i};return function e(){return i.readEntries((function(i){if(i.length>0){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(;n<e;){if(!i.length)return;this.processFile(i.shift()),n++}}}}},{key:"processFile",value:function(e){return this.processFiles([e])}},{key:"processFiles",value:function(e){var n=!0,i=!1,o=void 0;try{for(var r,a=e[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;l.processing=!0,l.status=t.UPLOADING,this.emit("processing",l)}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter((function(t){return t.xhr===e})).map((function(e){return e}))}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){var n=this._getFilesWithXhr(e.xhr),i=!0,o=!1,r=void 0;try{for(var a,l=n[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){a.value.status=t.CANCELED}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}void 0!==e.xhr&&e.xhr.abort();var s=!0,u=!1,c=void 0;try{for(var d,h=n[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var p=d.value;this.emit("canceled",p)}}catch(e){u=!0,c=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw c}}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.apply(this,n)}return e}},{key:"uploadFile",value:function(e){return this.uploadFiles([e])}},{key:"uploadFiles",value:function(e){var n=this;this._transformFiles(e,(function(i){if(n.options.chunking){var o=i[0];e[0].upload.chunked=n.options.chunking&&(n.options.forceChunking||o.size>n.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<r.upload.totalChunkCount;a++){if(void 0===r.upload.chunks[a])return l();r.upload.chunks[a].status!==t.SUCCESS&&(o=!1)}o&&n.options.chunksUploaded(r,(function(){n._finished(e,"",null)}))},n.options.parallelChunkUploads)for(var s=0;s<r.upload.totalChunkCount;s++)l();else l()}else{for(var u=[],c=0;c<e.length;c++)u[c]={name:n._getParamName(c),data:i[c],filename:e[c].upload.filename};n._uploadData(e,u)}}))}},{key:"_getChunk",value:function(e,t){for(var n=0;n<e.upload.totalChunkCount;n++)if(void 0!==e.upload.chunks[n]&&e.upload.chunks[n].xhr===t)return e.upload.chunks[n]}},{key:"_uploadData",value:function(e,n){var i=this,o=new XMLHttpRequest,r=!0,a=!1,l=void 0;try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){s.value.xhr=o}}catch(e){a=!0,l=e}finally{try{r||null==u.return||u.return()}finally{if(a)throw l}}e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=o);var c=this.resolveOption(this.options.method,e),d=this.resolveOption(this.options.url,e);o.open(c,d,!0),o.timeout=this.resolveOption(this.options.timeout,e),o.withCredentials=!!this.options.withCredentials,o.onload=function(t){i._finishedUploading(e,o,t)},o.ontimeout=function(){i._handleUploadError(e,o,"Request timedout after ".concat(i.options.timeout," seconds"))},o.onerror=function(){i._handleUploadError(e,o)},(null!=o.upload?o.upload:o).onprogress=function(t){return i._updateFilesUploadProgress(e,o,t)};var h={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var p in this.options.headers&&t.extend(h,this.options.headers),h){var f=h[p];f&&o.setRequestHeader(p,f)}var v=new FormData;if(this.options.params){var m=this.options.params;for(var g in"function"==typeof m&&(m=m.call(this,e,o,e[0].upload.chunked?this._getChunk(e[0],o):null)),m){var y=m[g];v.append(g,y)}}var b=!0,w=!1,E=void 0;try{for(var k,S=e[Symbol.iterator]();!(b=(k=S.next()).done);b=!0){var C=k.value;this.emit("sending",C,o,v)}}catch(e){w=!0,E=e}finally{try{b||null==S.return||S.return()}finally{if(w)throw E}}this.options.uploadMultiple&&this.emit("sendingmultiple",e,o,v),this._addFormElementData(v);for(var x=0;x<n.length;x++){var D=n[x];v.append(D.name,D.data,D.filename)}this.submitRequest(o,v,e)}},{key:"_transformFiles",value:function(e,t){for(var n=this,i=[],o=0,r=function(r){n.options.transformFile.call(n,e[r],(function(n){i[r]=n,++o===e.length&&t(i)}))},a=0;a<e.length;a++)r(a)}},{key:"_addFormElementData",value:function(e){if("FORM"===this.element.tagName){var t=!0,n=!1,i=void 0;try{for(var o,r=this.element.querySelectorAll("input, textarea, select, button")[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,l=a.getAttribute("name"),s=a.getAttribute("type");if(s&&(s=s.toLowerCase()),null!=l)if("SELECT"===a.tagName&&a.hasAttribute("multiple")){var u=!0,c=!1,d=void 0;try{for(var h,p=a.options[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var f=h.value;f.selected&&e.append(l,f.value)}}catch(e){c=!0,d=e}finally{try{u||null==p.return||p.return()}finally{if(c)throw d}}}else(!s||"checkbox"!==s&&"radio"!==s||a.checked)&&e.append(l,a.value)}}catch(e){n=!0,i=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw i}}}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var i;if(void 0!==n){if(i=100*n.loaded/n.total,e[0].upload.chunked){var o=e[0],r=this._getChunk(o,t);r.progress=i,r.total=n.total,r.bytesSent=n.loaded;o.upload.progress=0,o.upload.total=0,o.upload.bytesSent=0;for(var a=0;a<o.upload.totalChunkCount;a++)void 0!==o.upload.chunks[a]&&void 0!==o.upload.chunks[a].progress&&(o.upload.progress+=o.upload.chunks[a].progress,o.upload.total+=o.upload.chunks[a].total,o.upload.bytesSent+=o.upload.chunks[a].bytesSent);o.upload.progress=o.upload.progress/o.upload.totalChunkCount}else{var l=!0,s=!1,u=void 0;try{for(var c,d=e[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;h.upload.progress=i,h.upload.total=n.total,h.upload.bytesSent=n.loaded}}catch(e){s=!0,u=e}finally{try{l||null==d.return||d.return()}finally{if(s)throw u}}}var p=!0,f=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.emit("uploadprogress",y,y.upload.progress,y.upload.bytesSent)}}catch(e){f=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(f)throw v}}}else{var b=!0;i=100;var w=!0,E=!1,k=void 0;try{for(var S,C=e[Symbol.iterator]();!(w=(S=C.next()).done);w=!0){var x=S.value;100===x.upload.progress&&x.upload.bytesSent===x.upload.total||(b=!1),x.upload.progress=i,x.upload.bytesSent=x.upload.total}}catch(e){E=!0,k=e}finally{try{w||null==C.return||C.return()}finally{if(E)throw k}}if(b)return;var D=!0,_=!1,F=void 0;try{for(var T,A=e[Symbol.iterator]();!(D=(T=A.next()).done);D=!0){var M=T.value;this.emit("uploadprogress",M,i,M.upload.bytesSent)}}catch(e){_=!0,F=e}finally{try{D||null==A.return||A.return()}finally{if(_)throw F}}}}},{key:"_finishedUploading",value:function(e,n,i){var o;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(o=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{o=JSON.parse(o)}catch(e){i=e,o="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,o,i):this._handleUploadError(e,n,o)}}},{key:"_handleUploadError",value:function(e,n,i){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var o=this._getChunk(e[0],n);if(o.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[o.dataBlock])}this._errorProcessing(e,i||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,n,i){var o=!0,r=!1,a=void 0;try{for(var l,s=e[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var u=l.value;u.status=t.SUCCESS,this.emit("success",u,n,i),this.emit("complete",u)}}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,i){var o=!0,r=!1,a=void 0;try{for(var l,s=e[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var u=l.value;u.status=t.ERROR,this.emit("error",u,n,i),this.emit("complete",u)}}catch(e){r=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}}]),t}(d);h.initClass(),h.version="5.7.1",h.options={},h.optionsForElement=function(e){return e.getAttribute("id")?h.options[f(e.getAttribute("id"))]:void 0},h.instances=[],h.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},h.autoDiscover=!0,h.discover=function(){var e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){var n=[],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;/(^| )dropzone($| )/.test(s.className)?n.push(e.push(s)):n.push(void 0)}}catch(e){o=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw r}}return n}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){var t=[],n=!0,i=!1,o=void 0;try{for(var r,a=e[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var l=r.value;!1!==h.optionsForElement(l)?t.push(new h(l)):t.push(void 0)}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return t}()},h.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],h.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){var t=!0,n=!1,i=void 0;try{for(var o,r=h.blacklistedBrowsers[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){o.value.test(navigator.userAgent)&&(e=!1)}}catch(e){n=!0,i=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw i}}}else e=!1;else e=!1;return e},h.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(t.length),o=new Uint8Array(i),r=0,a=t.length,l=0<=a;l?r<=a:r>=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="",u<e.length;);return t}},{key:"restore",value:function(e,t){if(!e.match("data:image/jpeg;base64,"))return t;var n=this.decode64(e.replace("data:image/jpeg;base64,","")),i=this.slice2Segments(n),o=this.exifManipulation(t,i);return"data:image/jpeg;base64,".concat(this.encode64(o))}},{key:"exifManipulation",value:function(e,t){var n=this.getExifArray(t),i=this.insertExif(e,n);return new Uint8Array(i)}},{key:"getExifArray",value:function(e){for(var t=void 0,n=0;n<e.length;){if(255===(t=e[n])[0]&225===t[1])return t;n++}return[]}},{key:"insertExif",value:function(e,t){var n=e.replace("data:image/jpeg;base64,",""),i=this.decode64(n),o=i.indexOf(255,3),r=i.slice(0,o),a=i.slice(o),l=r;return l=(l=l.concat(t)).concat(a)}},{key:"slice2Segments",value:function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var i=t+(256*e[t+2]+e[t+3])+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.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<e.length;);return s}}]),e})().initClass();h._autoDiscoverFunction=function(){if(h.autoDiscover)return h.discover()},function(e,t){var n=!1,i=!0,o=e.document,r=o.documentElement,a=o.addEventListener?"addEventListener":"attachEvent",l=o.addEventListener?"removeEventListener":"detachEvent",s=o.addEventListener?"":"on",u=function i(r){if("readystatechange"!==r.type||"complete"===o.readyState)return("load"===r.type?e:o)[l](s+r.type,i,!1),!n&&(n=!0)?t.call(e,r.type||r):void 0};if("complete"!==o.readyState){if(o.createEventObject&&r.doScroll){try{i=!e.frameElement}catch(e){}i&&function e(){try{r.doScroll("left")}catch(t){return void setTimeout(e,50)}return u("poll")}()}o[a](s+"DOMContentLoaded",u,!1),o[a](s+"readystatechange",u,!1),e[a](s+"load",u,!1)}}(window,h._autoDiscoverFunction)},"./node_modules/sortablejs/modular/sortable.esm.js":(e,t,n)=>{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<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e){return r="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},r(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=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);n<t;n++)i[n]=e[n];return i}n.r(t),n.d(t,{MultiDrag:()=>St,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++)n(i[o],o);return i}return[]}function A(){var e=document.scrollingElement;return e||document.documentElement}function M(e,t,n,i,o){if(e.getBoundingClientRect||e===window){var r,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==A()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!h))do{if(o&&o.getBoundingClientRect&&("none"!==_(o,"transform")||n&&"static"!==_(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(_(o,"border-top-width")),l-=p.left+parseInt(_(o,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(o=o.parentNode);if(i&&e!==window){var f=F(o||e),v=f&&f.a,m=f&&f.d;f&&(s=(a/=m)+(c/=m),u=(l/=v)+(d/=v))}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function z(e,t,n){for(var i=P(e,!0),o=M(e)[t];i;){var r=M(i)[n];if(!("top"===n||"left"===n?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;r<a.length;){if("none"!==a[r].style.display&&a[r]!==je.ghost&&(i||a[r]!==je.dragged)&&S(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function O(e,t){for(var n=e.lastElementChild;n&&(n===je.ghost||"none"===_(n,"display")||t&&!E(n,t));)n=n.previousElementSibling;return n||null}function N(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===je.clone||t&&!E(e,t)||n++;return n}function L(e){var t=0,n=0,i=A();if(e)do{var o=F(e),r=o.a,a=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[t,n]}function P(e,t){if(!e||!e.getBoundingClientRect)return A();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=_(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 A();if(i||t)return n;i=!0}}}while(n=n.parentNode);return A()}function R(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 U(e,t){return function(){if(!C){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),C=setTimeout((function(){C=void 0}),t)}}}function B(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Y(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)}function H(e,t){_(e,"position","absolute"),_(e,"top",t.top),_(e,"left",t.left),_(e,"width",t.width),_(e,"height",t.height)}function X(e){_(e,"position",""),_(e,"top",""),_(e,"left",""),_(e,"width",""),_(e,"height","")}function j(e,t,n){var i={};return Array.from(e.children).forEach((function(o){var r,a,l,s;if(S(o,t.draggable,e,!1)&&!o.animated&&o!==n){var u=M(o);i.left=Math.min(null!==(r=i.left)&&void 0!==r?r:1/0,u.left),i.top=Math.min(null!==(a=i.top)&&void 0!==a?a:1/0,u.top),i.right=Math.max(null!==(l=i.right)&&void 0!==l?l:-1/0,u.right),i.bottom=Math.max(null!==(s=i.bottom)&&void 0!==s?s:-1/0,u.bottom)}})),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var W="Sortable"+(new Date).getTime();function q(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==_(e,"display")&&e!==je.ghost){t.push({target:e,rect:M(e)});var n=o({},t[t.length-1].rect);if(e.thisAnimationDuration){var i=F(e,!0);i&&(n.top-=i.f,n.left-=i.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var i=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,r=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=M(n),s=n.prevFromRect,u=n.prevToRect,c=e.rect,d=F(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&R(s,l)&&!R(a,l)&&(c.top-l.top)/(c.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(t=function(e,t,n,i){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))*i.animation}(c,s,u,i.options)),R(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=i.options.animation),i.animate(n,c,l,t)),t&&(o=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,i){if(i){_(e,"transition",""),_(e,"transform","");var o=F(this.el),r=o&&o.a,a=o&&o.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,_(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),_(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){_(e,"transition",""),_(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i)}}}}var Q=[],G={initializeByDefault:!0},K={mount:function(e){for(var t in G)G.hasOwnProperty(t)&&!(t in e)&&(e[t]=G[t]);Q.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Q.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=e+"Global";Q.forEach((function(i){t[i.pluginName]&&(t[i.pluginName][r]&&t[i.pluginName][r](o({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,i){for(var o in Q.forEach((function(i){var o=i.pluginName;if(e.options[o]||i.initializeByDefault){var r=new i(e,t,e.options);r.sortable=e,r.options=e.options,e[o]=r,l(n,r.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var r=this.modifyOption(e,o,e.options[o]);void 0!==r&&(e.options[o]=r)}},getEventProperties:function(e,t){var n={};return Q.forEach((function(i){"function"==typeof i.eventProperties&&l(n,i.eventProperties.call(t[i.pluginName],e))})),n},modifyOption:function(e,t,n){var i;return Q.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))})),i}};function V(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,a=e.cloneEl,l=e.toEl,s=e.fromEl,u=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,f=e.newDraggableIndex,v=e.originalEvent,m=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[W]){var y,b=t.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||h||p?(y=document.createEvent("Event")).initEvent(i,!0,!0):y=new CustomEvent(i,{bubbles:!0,cancelable:!0}),y.to=l||n,y.from=s||n,y.item=r||n,y.clone=a,y.oldIndex=u,y.newIndex=c,y.oldDraggableIndex=d,y.newDraggableIndex=f,y.originalEvent=v,y.pullMode=m?m.lastPutMode:void 0;var E=o(o({},g),K.getEventProperties(i,t));for(var k in E)y[k]=E[k];n&&n.dispatchEvent(y),b[w]&&b[w].call(t,y)}}var Z=["evt"],$=function(e,t){var n=arguments.length>2&&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))<n)return;this._onDragStart(e,!0)}if(ne){r?(r.e+=u-(me||0),r.f+=c-(ge||0)):r={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(ne,"webkitTransform",d),_(ne,"mozTransform",d),_(ne,"msTransform",d),_(ne,"transform",d),me=u,ge=c,ve=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ne){var e=this.options.fallbackOnBody?document.body:ie,t=M(ee,!0,Oe,!0,e),n=this.options;if(Oe){for(Ce=e;"static"===_(Ce,"position")&&"none"===_(Ce,"transform")&&Ce!==document;)Ce=Ce.parentNode;Ce!==document.body&&Ce!==document.documentElement?(Ce===document&&(Ce=A()),t.top+=Ce.scrollTop,t.left+=Ce.scrollLeft):Ce=A(),Ae=L(Ce)}D(ne=ee.cloneNode(!0),n.ghostClass,!1),D(ne,n.fallbackClass,!0),D(ne,n.dragClass,!0),_(ne,"transition",""),_(ne,"transform",""),_(ne,"box-sizing","border-box"),_(ne,"margin",0),_(ne,"top",t.top),_(ne,"left",t.left),_(ne,"width",t.width),_(ne,"height",t.height),_(ne,"opacity","0.8"),_(ne,"position",Oe?"absolute":"fixed"),_(ne,"zIndex","100000"),_(ne,"pointerEvents","none"),je.ghost=ne,e.appendChild(ne),_(ne,"transform-origin",ye/parseInt(ne.style.width)*100+"% "+be/parseInt(ne.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;$("dragStart",this,{evt:e}),je.eventCanceled?this._onDrop():($("setupClone",this),je.eventCanceled||((ae=Y(ee)).removeAttribute("id"),ae.draggable=!1,ae.style["will-change"]="",this._hideClone(),D(ae,this.options.chosenClass,!1),je.clone=ae),n.cloneId=Ke((function(){$("clone",n),je.eventCanceled||(n.options.removeCloneOnHide||ie.insertBefore(ae,ee),n._hideClone(),J({sortable:n,name:"clone"}))})),!t&&D(ee,o.dragClass,!0),t?(De=!0,n._loopId=setInterval(n._emulateDragOver,50)):(w(document,"mouseup",n._onDrop),w(document,"touchend",n._onDrop),w(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,ee)),b(document,"drop",n),_(ee,"transform","translateZ(0)")),xe=!0,n._dragStartId=Ke(n._dragStarted.bind(n,t,e)),b(document,"selectstart",n),we=!0,v&&_(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,i,r,a=this.el,l=e.target,s=this.options,u=s.group,c=je.active,d=he===u,h=s.sort,p=pe||c,f=this,v=!1;if(!Me){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=S(l,s.draggable,a,!0),R("dragOver"),je.eventCanceled)return v;if(ee.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return Y(!1);if(De=!1,c&&!s.disabled&&(d?h||(i=te!==ie):pe===this||(this.lastPutMode=he.checkPull(this,c,ee,e))&&u.checkPut(this,c,ee,e))){if(r="vertical"===this._getDirection(e,l),t=M(ee),R("dragOverValid"),je.eventCanceled)return v;if(i)return te=ie,U(),this._hideClone(),R("revert"),je.eventCanceled||(oe?ie.insertBefore(ee,oe):ie.appendChild(ee)),Y(!0);var m=O(a,s.draggable);if(!m||function(e,t,n){var i=M(O(n.el,n.options.draggable)),o=j(n.el,n.options,ne),r=10;return t?e.clientX>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.clientX<o.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<o.top-r||e.clientY<i.bottom&&e.clientX<i.left}(e,r,this)){var g=I(a,0,s,!0);if(g===ee)return Y(!1);if(n=M(l=g),!1!==We(ie,a,ee,t,l,n,e,!1))return U(),a.insertBefore(ee,g),te=a,H(),Y(!0)}else if(l.parentNode===a){n=M(l);var y,b,w,E=ee.parentNode!==a,k=!function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return i===a||o===l||i+r/2===a+s/2}(ee.animated&&ee.toRect||t,l.animated&&l.toRect||n,r),C=r?"top":"left",x=z(l,"top","top")||z(ee,"top","top"),F=x?x.scrollTop:void 0;if(Ee!==l&&(b=n[C],Fe=!1,Te=!k&&s.invertSwap||E),y=function(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!a)if(l&&Se<u*o){if(!Fe&&(1===ke?s>c+u*r/2:s<d-u*r/2)&&(Fe=!0),Fe)h=!0;else if(1===ke?s<c+Se:s>d-Se)return-ke}else if(s>c+u*(1-o)/2&&s<d-u*(1-o)/2)return function(e){return N(ee)<N(e)?1:-1}(t);if((h=h||a)&&(s<c+u*r/2||s>d-u*r/2))return s>c+u/2?1:-1;return 0}(e,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;i<o;i++)S(e=n[i],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Ge(e));return t},sort:function(e,t){var n={},i=this.el;this.toArray().forEach((function(e,t){var o=i.children[t];S(o,this.options.draggable,i,!1)&&(n[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(i.removeChild(n[e]),i.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return S(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var i=K.modifyOption(this,e,t);n[e]=void 0!==i?i:t,"group"===e&&Ue(n)},destroy:function(){$("destroy",this);var e=this.el;e[W]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),w(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_e.splice(_e.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!le){if($("hideClone",this),je.eventCanceled)return;_(ae,"display","none"),this.options.removeCloneOnHide&&ae.parentNode&&ae.parentNode.removeChild(ae),le=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(le){if($("showClone",this),je.eventCanceled)return;ee.parentNode!=ie||this.options.group.revertClone?oe?ie.insertBefore(ae,oe):ie.appendChild(ae):ie.insertBefore(ae,ee),this.options.group.revertClone&&this.animate(ee,ae),_(ae,"display",""),le=!1}}else this._hideClone()}},Ie&&b(document,"touchmove",(function(e){(je.active||xe)&&e.cancelable&&e.preventDefault()})),je.utils={on:b,off:w,css:_,find:T,is:function(e,t){return!!S(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:U,closest:S,toggleClass:D,clone:Y,index:N,nextTick:Ke,cancelNextTick:Ve,detectDirection:Re,getChild:I},je.get=function(e){return e[W]},je.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&&(je.utils=o(o({},je.utils),e.utils)),K.mount(e)}))},je.create=function(e,t){return new je(e,t)},je.version="1.15.2";var Ze,$e,Je,et,tt,nt,it=[],ot=!1;function rt(){it.forEach((function(e){clearInterval(e.pid)})),it=[]}function at(){clearInterval(nt)}var lt,st=U((function(e,t,n,i){if(t.scroll){var o,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,u=A(),c=!1;$e!==n&&($e=n,rt(),Ze=t.scroll,o=t.scrollFn,!0===Ze&&(Ze=P(n,!0)));var d=0,h=Ze;do{var p=h,f=M(p),v=f.top,m=f.bottom,g=f.left,y=f.right,b=f.width,w=f.height,E=void 0,k=void 0,S=p.scrollWidth,C=p.scrollHeight,x=_(p),D=p.scrollLeft,F=p.scrollTop;p===u?(E=b<S&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),k=w<C&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(E=b<S&&("auto"===x.overflowX||"scroll"===x.overflowX),k=w<C&&("auto"===x.overflowY||"scroll"===x.overflowY));var T=E&&(Math.abs(y-r)<=l&&D+b<S)-(Math.abs(g-r)<=l&&!!D),z=k&&(Math.abs(m-a)<=l&&F+w<C)-(Math.abs(v-a)<=l&&!!F);if(!it[d])for(var I=0;I<=d;I++)it[I]||(it[I]={});it[d].vx==T&&it[d].vy==z&&it[d].el===p||(it[d].el=p,it[d].vx=T,it[d].vy=z,clearInterval(it[d].pid),0==T&&0==z||(c=!0,it[d].pid=setInterval(function(){i&&0===this.layer&&je.active._onTouchMove(tt);var t=it[this.layer].vy?it[this.layer].vy*s:0,n=it[this.layer].vx?it[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(je.dragged.parentNode[W],n,t,e,tt,it[this.layer].el)||B(it[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==u&&(h=P(h,!1)));ot=c}}),30),ut=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(c)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function ct(){}function dt(){}function ht(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;lt=t},dragOverValid:function(e){var t=e.completed,n=e.target,i=e.onMove,o=e.activeSortable,r=e.changed,a=e.cancel;if(o.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var u=lt;!1!==i(n)?(D(n,s.swapClass,!0),lt=n):lt=null,u&&u!==lt&&D(u,s.swapClass,!1)}r(),t(!0),a()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,i=e.dragEl,o=n||this.sortable,r=this.options;lt&&D(lt,r.swapClass,!1),lt&&(r.swap||n&&n.options.swap)&&i!==lt&&(o.captureAnimationState(),o!==t&&t.captureAnimationState(),function(e,t){var n,i,o=e.parentNode,r=t.parentNode;if(!o||!r||o.isEqualNode(t)||r.isEqualNode(e))return;n=N(e),i=N(t),o.isEqualNode(r)&&n<i&&i++;o.insertBefore(t,o.children[n]),r.insertBefore(e,r.children[i])}(i,lt),o.animateAll(),o!==t&&t.animateAll())},nulling:function(){lt=null}},l(e,{pluginName:"swap",eventProperties:function(){return{swapItem:lt}}})}ct.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 i=I(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:ut},l(ct,{pluginName:"revertOnSpill"}),dt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ut},l(dt,{pluginName:"removeOnSpill"});var pt,ft,vt,mt,gt,yt=[],bt=[],wt=!1,Et=!1,kt=!1;function St(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?b(document,"pointerup",this._deselectMultiDrag):(b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag))),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var i="";yt.length&&ft===e?yt.forEach((function(e,t){i+=(t?", ":"")+e.textContent})):i=n.textContent,t.setData("Text",i)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;vt=t},delayEnded:function(){this.isMultiDrag=~yt.indexOf(vt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var i=0;i<yt.length;i++)bt.push(Y(yt[i])),bt[i].sortableIndex=yt[i].sortableIndex,bt[i].draggable=!1,bt[i].style["will-change"]="",D(bt[i],this.options.selectedClass,!1),yt[i]===vt&&D(bt[i],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,i=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||yt.length&&ft===t&&(Ct(!0,n),i("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,i=e.cancel;this.isMultiDrag&&(Ct(!1,n),bt.forEach((function(e){_(e,"display","")})),t(),gt=!1,i())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),i=e.cancel;this.isMultiDrag&&(bt.forEach((function(e){_(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),gt=!0,i())},dragStartGlobal:function(e){e.sortable;!this.isMultiDrag&&ft&&ft.multiDrag._deselectMultiDrag(),yt.forEach((function(e){e.sortableIndex=N(e)})),yt=yt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),kt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){yt.forEach((function(e){e!==vt&&_(e,"position","absolute")}));var i=M(vt,!1,!0,!0);yt.forEach((function(e){e!==vt&&H(e,i)})),Et=!0,wt=!0}n.animateAll((function(){Et=!1,wt=!1,t.options.animation&&yt.forEach((function(e){X(e)})),t.options.sort&&xt()}))}},dragOver:function(e){var t=e.target,n=e.completed,i=e.cancel;Et&&~yt.indexOf(t)&&(n(!1),i())},revert:function(e){var t=e.fromSortable,n=e.rootEl,i=e.sortable,o=e.dragRect;yt.length>1&&(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);h<d;h++)~yt.indexOf(c[h])||(D(c[h],u.selectedClass,!0),yt.push(c[h]),V({sortable:o,rootEl:n,name:"select",targetEl:c[h],originalEvent:t}))}else pt=vt;ft=s}if(kt&&this.isMultiDrag){if(Et=!1,(i[W].options.sort||i!==n)&&yt.length>1){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}}]);