vue2-dropzone
Advanced tools
Comparing version 3.5.2 to 3.5.3
@@ -1,2 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.vue2Dropzone=t()}(this,function(){"use strict";var n={getSignedURL:function(o,s){var a={filePath:o.name,contentType:o.type};return new Promise(function(e,t){var n=new FormData,r=new XMLHttpRequest,i="function"==typeof s.signingURL?s.signingURL(o):s.signingURL;r.open("POST",i),r.onload=function(){200==r.status?e(JSON.parse(r.response)):t(r.statusText)},r.onerror=function(e){console.error("Network Error : Could not send request to AWS (Maybe CORS errors)"),t(e)},!0===s.withCredentials&&(r.withCredentials=!0),Object.entries(s.headers||{}).forEach(function(e){var t=e[0],i=e[1];r.setRequestHeader(t,i)}),a=Object.assign(a,s.params||{}),Object.entries(a).forEach(function(e){var t=e[0],i=e[1];n.append(t,i)}),r.send(n)})},sendFile:function(t,e,i){var n=i?this.setResponseHandler:this.sendS3Handler;return this.getSignedURL(t,e).then(function(e){return n(e,t)}).catch(function(e){return e})},setResponseHandler:function(e,t){t.s3Signature=e.signature,t.s3Url=e.postEndpoint},sendS3Handler:function(e,t){var o=new FormData,i=e.signature;return Object.keys(i).forEach(function(e){o.append(e,i[e])}),o.append("file",t),new Promise(function(i,n){var r=new XMLHttpRequest;r.open("POST",e.postEndpoint),r.onload=function(){if(201==r.status){var e=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[0].innerHTML;i({success:!0,message:e})}else{var t=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[0].innerHTML;n({success:!1,message:t+". Request is marked as resolved when returns as status 201"})}},r.onerror=function(e){var t=(new window.DOMParser).parseFromString(r.response,"text/xml").firstChild.children[1].innerHTML;n({success:!1,message:t})},r.send(o)})}};var e,t=(function(e){var t=function(){function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}}();function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(){l(this,e)}return t(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 i=arguments.length,n=Array(1<i?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(var o=0,s=s=t;;){if(o>=s.length)break;s[o++].apply(this,n)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var i=this._callbacks[e];if(!i)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var n=0;n<i.length;n++){if(i[n]===t){i.splice(n,1);break}}return this}}]),e}(),r=function(e){function b(e,t){l(this,b);var i,n=a(this,(b.__proto__||Object.getPrototypeOf(b)).call(this)),r=void 0;if(n.element=e,n.version=b.version,n.defaultOptions.previewTemplate=n.defaultOptions.previewTemplate.replace(/\n*/g,""),n.clickableElements=[],n.listeners=[],n.files=[],"string"==typeof n.element&&(n.element=document.querySelector(n.element)),!n.element||null==n.element.nodeType)throw new Error("Invalid dropzone element.");if(n.element.dropzone)throw new Error("Dropzone already attached.");b.instances.push(n),n.element.dropzone=n;var o,s=null!=(i=b.optionsForElement(n.element))?i:{};if(n.options=b.extend({},n.defaultOptions,s,null!=t?t:{}),n.options.forceFallback||!b.isBrowserSupported())return o=n.options.fallback.call(n),a(n,o);if(null==n.options.url&&(n.options.url=n.element.getAttribute("action")),!n.options.url)throw new Error("No URL provided.");if(n.options.acceptedFiles&&n.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(n.options.uploadMultiple&&n.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return n.options.acceptedMimeTypes&&(n.options.acceptedFiles=n.options.acceptedMimeTypes,delete n.options.acceptedMimeTypes),null!=n.options.renameFilename&&(n.options.renameFile=function(e){return n.options.renameFilename.call(n,e.name,e)}),n.options.method=n.options.method.toUpperCase(),(r=n.getExistingFallback())&&r.parentNode&&r.parentNode.removeChild(r),!1!==n.options.previewsContainer&&(n.options.previewsContainer?n.previewsContainer=b.getElement(n.options.previewsContainer,"previewsContainer"):n.previewsContainer=n.element),n.options.clickable&&(!0===n.options.clickable?n.clickableElements=[n.element]:n.clickableElements=b.getElements(n.options.clickable,"clickable")),n.init(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(b,i),t(b,null,[{key:"initClass",value:function(){this.prototype.Emitter=i,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,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept:function(e,t){return t()},chunksUploaded:function(e,t){t()},fallback:function(){var e=void 0;this.element.className=this.element.className+" dz-browser-not-supported";for(var t=0,i=i=this.element.getElementsByTagName("div");;){if(t>=i.length)break;var n=i[t++];if(/(^| )dz-message($| )/.test(n.className)){(e=n).className="dz-message";break}}e||(e=b.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));var r=e.getElementsByTagName("span")[0];return r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,i,n){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},o=e.width/e.height;null==t&&null==i?(t=r.srcWidth,i=r.srcHeight):null==t?t=i*o:null==i&&(i=t/o);var s=(t=Math.min(t,r.srcWidth))/(i=Math.min(i,r.srcHeight));if(r.srcWidth>t||r.srcHeight>i)if("crop"===n)s<o?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");s<o?i=t/o:t=i*o}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=i,r},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" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Check</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\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" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></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" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Error</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" 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" id="Oval-2" sketch:type="MSShapeGroup"></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(t){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=b.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);for(var e=0,n=n=t.previewElement.querySelectorAll("[data-dz-name]");;){if(e>=n.length)break;var r=n[e++];r.textContent=t.name}for(var o=0,s=s=t.previewElement.querySelectorAll("[data-dz-size]");!(o>=s.length);)(r=s[o++]).innerHTML=this.filesize(t.size);this.options.addRemoveLinks&&(t._removeLink=b.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink));for(var a=function(e){return e.preventDefault(),e.stopPropagation(),t.status===b.UPLOADING?b.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?b.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)},l=0,u=u=t.previewElement.querySelectorAll("[data-dz-remove]");;){if(l>=u.length)break;u[l++].addEventListener("click",a)}}},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");for(var i=0,n=n=e.previewElement.querySelectorAll("[data-dz-thumbnail]");;){if(i>=n.length)break;var r=n[i++];r.alt=e.name,r.src=t}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);for(var i=0,n=n=e.previewElement.querySelectorAll("[data-dz-errormessage]");;){if(i>=n.length)break;n[i++].textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,i){if(e.previewElement)for(var n=0,r=r=e.previewElement.querySelectorAll("[data-dz-uploadprogress]");;){if(n>=r.length)break;var o=r[n++];"PROGRESS"===o.nodeName?o.value=t:o.style.width=t+"%"}},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.textContent=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,i=Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];for(var r=0,o=o=i;;){if(r>=o.length)break;var s=o[r++];for(var a in s){var l=s[a];e[a]=l}}return e}}]),t(b,[{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(t){return this.files.filter(function(e){return e.status===t}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(b.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(b.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(b.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===b.UPLOADING||e.status===b.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var o=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(b.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length){!function r(){return o.hiddenFileInput&&o.hiddenFileInput.parentNode.removeChild(o.hiddenFileInput),o.hiddenFileInput=document.createElement("input"),o.hiddenFileInput.setAttribute("type","file"),(null===o.options.maxFiles||1<o.options.maxFiles)&&o.hiddenFileInput.setAttribute("multiple","multiple"),o.hiddenFileInput.className="dz-hidden-input",null!==o.options.acceptedFiles&&o.hiddenFileInput.setAttribute("accept",o.options.acceptedFiles),null!==o.options.capture&&o.hiddenFileInput.setAttribute("capture",o.options.capture),o.hiddenFileInput.style.visibility="hidden",o.hiddenFileInput.style.position="absolute",o.hiddenFileInput.style.top="0",o.hiddenFileInput.style.left="0",o.hiddenFileInput.style.height="0",o.hiddenFileInput.style.width="0",document.querySelector(o.options.hiddenInputContainer).appendChild(o.hiddenFileInput),o.hiddenFileInput.addEventListener("change",function(){var e=o.hiddenFileInput.files;if(e.length)for(var t=0,i=i=e;!(t>=i.length);){var n=i[t++];o.addFile(n)}return o.emit("addedfiles",e),r()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(var e=0,t=t=this.events;;){if(e>=t.length)break;var i=t[e++];this.on(i,this.options[i])}this.on("uploadprogress",function(){return o.updateTotalUploadProgress()}),this.on("removedfile",function(){return o.updateTotalUploadProgress()}),this.on("canceled",function(e){return o.emit("complete",e)}),this.on("complete",function(e){if(0===o.getAddedFiles().length&&0===o.getUploadingFiles().length&&0===o.getQueuedFiles().length)return setTimeout(function(){return o.emit("queuecomplete")},0)});var n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return o.emit("dragstart",e)},dragenter:function(e){return n(e),o.emit("dragenter",e)},dragover:function(e){var t=void 0;try{t=e.dataTransfer.effectAllowed}catch(e){}return e.dataTransfer.dropEffect="move"===t||"linkMove"===t?"move":"copy",n(e),o.emit("dragover",e)},dragleave:function(e){return o.emit("dragleave",e)},drop:function(e){return n(e),o.drop(e)},dragend:function(e){return o.emit("dragend",e)}}}],this.clickableElements.forEach(function(t){return o.listeners.push({element:t,events:{click:function(e){return(t!==o.element||e.target===o.element||b.elementInside(e.target,o.element.querySelector(".dz-message")))&&o.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,b.instances.splice(b.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,i=0;if(this.getActiveFiles().length){for(var n=0,r=r=this.getActiveFiles();;){if(n>=r.length)break;var o=r[n++];t+=o.upload.bytesSent,i+=o.upload.total}e=100*t/i}else e=100;return this.emit("totaluploadprogress",e,i,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,t=void 0;if(e=this.getExistingFallback())return e;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>';var n=b.createElement(i);return"FORM"!==this.element.tagName?(t=b.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(n):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:n}},{key:"getExistingFallback",value:function(){for(var e=function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];if(/(^| )fallback($| )/.test(n.className))return n}},t=["div","form"],i=0;i<t.length;i++){var n,r=t[i];if(n=e(this.element.getElementsByTagName(r)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(n){return function(){var e=[];for(var t in n.events){var i=n.events[t];e.push(n.element.addEventListener(t,i,!1))}return e}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(n){return function(){var e=[];for(var t in n.events){var i=n.events[t];e.push(n.element.removeEventListener(t,i,!1))}return e}()})}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(e){return t.cancelUpload(e)})}},{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,i="b";if(0<e){for(var n=["tb","gb","mb","kb","b"],r=0;r<n.length;r++){var o=n[r];if(Math.pow(this.options.filesizeBase,4-r)/10<=e){t=e/Math.pow(this.options.filesizeBase,4-r),i=o;break}}t=Math.round(10*t)/10}return"<strong>"+t+"</strong> "+this.options.dictFileSizeUnits[i]}},{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=[],i=0;i<e.dataTransfer.files.length;i++)t[i]=e.dataTransfer.files[i];if(this.emit("addedfiles",t),t.length){var n=e.dataTransfer.items;n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)}}}},{key:"paste",value:function(e){if(null!=(t=null!=e?e.clipboardData:void 0,i=function(e){return e.items},null!=t?i(t):void 0)){var t,i;this.emit("paste",e);var n=e.clipboardData.items;return n.length?this._addFilesFromItems(n):void 0}}},{key:"handleFiles",value:function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];this.addFile(n)}}},{key:"_addFilesFromItems",value:function(o){var s=this;return function(){for(var e=[],t=0,i=i=o;;){if(t>=i.length)break;var n,r=i[t++];null!=r.webkitGetAsEntry&&(n=r.webkitGetAsEntry())?n.isFile?e.push(s.addFile(r.getAsFile())):n.isDirectory?e.push(s._addFilesFromDirectory(n,n.name)):e.push(void 0):null!=r.getAsFile&&(null==r.kind||"file"===r.kind)?e.push(s.addFile(r.getAsFile())):e.push(void 0)}return e}()}},{key:"_addFilesFromDirectory",value:function(e,o){var s=this,t=e.createReader(),i=function(t){return e=console,i="log",n=function(e){return e.log(t)},null!=e&&"function"==typeof e[i]?n(e,i):void 0;var e,i,n};return function r(){return t.readEntries(function(e){if(0<e.length){for(var t=0,i=i=e;!(t>=i.length);){var n=i[t++];n.isFile?n.file(function(e){if(!s.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=o+"/"+e.name,s.addFile(e)}):n.isDirectory&&s._addFilesFromDirectory(n,o+"/"+n.name)}r()}return null},i)}()}},{key:"accept",value:function(e,t){return e.size>1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var i=this;return t.upload={uuid:b.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t),chunked:this.options.chunking&&(this.options.forceChunking||t.size>this.options.chunkSize),totalChunkCount:Math.ceil(t.size/this.options.chunkSize)},this.files.push(t),t.status=b.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return e?(t.accepted=!1,i._errorProcessing([t],e)):(t.accepted=!0,i.options.autoQueue&&i.enqueueFile(t)),i._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];this.enqueueFile(n)}return null}},{key:"enqueueFile",value:function(e){var t=this;if(e.status!==b.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=b.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return t.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 t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var i=this._thumbnailQueue.shift();return this.createThumbnail(i,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(e){return t.emit("thumbnail",i,e),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===b.UPLOADING&&this.cancelUpload(e),this.files=n(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var t=0,i=i=this.files.slice();;){if(t>=i.length)break;var n=i[t++];(n.status!==b.UPLOADING||e)&&this.removeFile(n)}return null}},{key:"resizeImage",value:function(r,e,t,i,o){var s=this;return this.createThumbnail(r,e,t,i,!1,function(e,t){if(null==t)return o(r);var i=s.options.resizeMimeType;null==i&&(i=r.type);var n=t.toDataURL(i,s.options.resizeQuality);return"image/jpeg"!==i&&"image/jpg"!==i||(n=u.restore(r.dataURL,n)),o(b.dataURItoBlob(n))})}},{key:"createThumbnail",value:function(e,t,i,n,r,o){var s=this,a=new FileReader;return a.onload=function(){if(e.dataURL=a.result,"image/svg+xml"!==e.type)return s.createThumbnailFromUrl(e,t,i,n,r,o);null!=o&&o(a.result)},a.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(o,s,a,l,t,u,e){var d=this,c=document.createElement("img");return e&&(c.crossOrigin=e),c.onload=function(){var e=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&t&&(e=function(e){return EXIF.getData(c,function(){return e(EXIF.getTag(this,"Orientation"))})}),e(function(e){o.width=c.width,o.height=c.height;var t=d.options.resize.call(d,o,s,a,l),i=document.createElement("canvas"),n=i.getContext("2d");switch(i.width=t.trgWidth,i.height=t.trgHeight,4<e&&(i.width=t.trgHeight,i.height=t.trgWidth),e){case 2:n.translate(i.width,0),n.scale(-1,1);break;case 3:n.translate(i.width,i.height),n.rotate(Math.PI);break;case 4:n.translate(0,i.height),n.scale(1,-1);break;case 5:n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:n.rotate(.5*Math.PI),n.translate(0,-i.height);break;case 7:n.rotate(.5*Math.PI),n.translate(i.width,-i.height),n.scale(-1,1);break;case 8:n.rotate(-.5*Math.PI),n.translate(-i.width,0)}p(n,c,null!=t.srcX?t.srcX:0,null!=t.srcY?t.srcY:0,t.srcWidth,t.srcHeight,null!=t.trgX?t.trgX:0,null!=t.trgY?t.trgY:0,t.trgWidth,t.trgHeight);var r=i.toDataURL("image/png");if(null!=u)return u(r,i)})},null!=u&&(c.onerror=u),c.src=o.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,i=t;if(!(e<=t)){var n=this.getQueuedFiles();if(0<n.length){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-t));for(;i<e;){if(!n.length)return;this.processFile(n.shift()),i++}}}}},{key:"processFile",value:function(e){return this.processFiles([e])}},{key:"processFiles",value:function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];n.processing=!0,n.status=b.UPLOADING,this.emit("processing",n)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter(function(e){return e.xhr===t}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===b.UPLOADING){for(var t=this._getFilesWithXhr(e.xhr),i=0,n=n=t;;){if(i>=n.length)break;n[i++].status=b.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var r=0,o=o=t;;){if(r>=o.length)break;var s=o[r++];this.emit("canceled",s)}this.options.uploadMultiple&&this.emit("canceledmultiple",t)}else e.status!==b.ADDED&&e.status!==b.QUEUED||(e.status=b.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,i=Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return e.apply(this,i)}return e}},{key:"uploadFile",value:function(e){return this.uploadFiles([e])}},{key:"uploadFiles",value:function(a){var l=this;this._transformFiles(a,function(e){if(a[0].upload.chunked){var r=a[0],o=e[0];r.upload.chunks=[];var n=function(){for(var e=0;void 0!==r.upload.chunks[e];)e++;if(!(e>=r.upload.totalChunkCount)){0;var t=e*l.options.chunkSize,i=Math.min(t+l.options.chunkSize,r.size),n={name:l._getParamName(0),data:o.webkitSlice?o.webkitSlice(t,i):o.slice(t,i),filename:r.upload.filename,chunkIndex:e};r.upload.chunks[e]={file:r,index:e,dataBlock:n,status:b.UPLOADING,progress:0,retries:0},l._uploadData(a,[n])}};if(r.upload.finishedChunkUpload=function(e){var t=!0;e.status=b.SUCCESS,e.dataBlock=null;for(var i=0;i<r.upload.totalChunkCount;i++){if(void 0===r.upload.chunks[i])return n();r.upload.chunks[i].status!==b.SUCCESS&&(t=!1)}t&&l.options.chunksUploaded(r,function(){l._finished(a,"",null)})},l.options.parallelChunkUploads)for(var t=0;t<r.upload.totalChunkCount;t++)n();else n()}else{for(var i=[],s=0;s<a.length;s++)i[s]={name:l._getParamName(s),data:e[s],filename:a[s].upload.filename};l._uploadData(a,i)}})}},{key:"_getChunk",value:function(e,t){for(var i=0;i<e.upload.totalChunkCount;i++)if(void 0!==e.upload.chunks[i]&&e.upload.chunks[i].xhr===t)return e.upload.chunks[i]}},{key:"_uploadData",value:function(t,e){for(var i=this,n=new XMLHttpRequest,r=0,o=o=t;;){if(r>=o.length)break;o[r++].xhr=n}t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=n);var s=this.resolveOption(this.options.method,t),a=this.resolveOption(this.options.url,t);n.open(s,a,!0),n.timeout=this.resolveOption(this.options.timeout,t),n.withCredentials=!!this.options.withCredentials,n.onload=function(e){i._finishedUploading(t,n,e)},n.onerror=function(){i._handleUploadError(t,n)},(null!=n.upload?n.upload:n).onprogress=function(e){return i._updateFilesUploadProgress(t,n,e)};var l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var u in this.options.headers&&b.extend(l,this.options.headers),l){var d=l[u];d&&n.setRequestHeader(u,d)}var c=new FormData;if(this.options.params){var p=this.options.params;for(var h in"function"==typeof p&&(p=p.call(this,t,n,t[0].upload.chunked?this._getChunk(t[0],n):null)),p){var f=p[h];c.append(h,f)}}for(var m=0,v=v=t;;){if(m>=v.length)break;var g=v[m++];this.emit("sending",g,n,c)}this.options.uploadMultiple&&this.emit("sendingmultiple",t,n,c),this._addFormElementData(c);for(var k=0;k<e.length;k++){var y=e[k];c.append(y.name,y.data,y.filename)}this.submitRequest(n,c,t)}},{key:"_transformFiles",value:function(i,n){for(var e=this,r=[],o=0,t=function(t){e.options.transformFile.call(e,i[t],function(e){r[t]=e,++o===i.length&&n(r)})},s=0;s<i.length;s++)t(s)}},{key:"_addFormElementData",value:function(e){if("FORM"===this.element.tagName)for(var t=0,i=i=this.element.querySelectorAll("input, textarea, select, button");;){if(t>=i.length)break;var n=i[t++],r=n.getAttribute("name"),o=n.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=r)if("SELECT"===n.tagName&&n.hasAttribute("multiple"))for(var s=0,a=a=n.options;;){if(s>=a.length)break;var l=a[s++];l.selected&&e.append(r,l.value)}else(!o||"checkbox"!==o&&"radio"!==o||n.checked)&&e.append(r,n.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,i){var n=void 0;if(void 0!==i){if(n=100*i.loaded/i.total,e[0].upload.chunked){var r=e[0],o=this._getChunk(r,t);o.progress=n,o.total=i.total,o.bytesSent=i.loaded;r.upload.progress=0,r.upload.total=0;for(var s=r.upload.bytesSent=0;s<r.upload.totalChunkCount;s++)void 0!==r.upload.chunks[s]&&void 0!==r.upload.chunks[s].progress&&(r.upload.progress+=r.upload.chunks[s].progress,r.upload.total+=r.upload.chunks[s].total,r.upload.bytesSent+=r.upload.chunks[s].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount}else for(var a=0,l=l=e;;){if(a>=l.length)break;var u=l[a++];u.upload.progress=n,u.upload.total=i.total,u.upload.bytesSent=i.loaded}for(var d=0,c=c=e;;){if(d>=c.length)break;var p=c[d++];this.emit("uploadprogress",p,p.upload.progress,p.upload.bytesSent)}}else{var h=!0;n=100;for(var f=0,m=m=e;;){if(f>=m.length)break;var v=m[f++];100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(h=!1),v.upload.progress=n,v.upload.bytesSent=v.upload.total}if(h)return;for(var g=0,k=k=e;;){if(g>=k.length)break;var y=k[g++];this.emit("uploadprogress",y,n,y.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,t,i){var n=void 0;if(e[0].status!==b.CANCELED&&4===t.readyState){if("arraybuffer"!==t.responseType&&"blob"!==t.responseType&&(n=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{n=JSON.parse(n)}catch(e){i=e,n="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t)):this._finished(e,n,i):this._handleUploadError(e,t,n)}}},{key:"_handleUploadError",value:function(e,t,i){if(e[0].status!==b.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var n=this._getChunk(e[0],t);if(n.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[n.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}for(var r=0,o=o=e;;){if(r>=o.length)break;o[r++];this._errorProcessing(e,i||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}}},{key:"submitRequest",value:function(e,t,i){e.send(t)}},{key:"_finished",value:function(e,t,i){for(var n=0,r=r=e;;){if(n>=r.length)break;var o=r[n++];o.status=b.SUCCESS,this.emit("success",o,t,i),this.emit("complete",o)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,t,i){for(var n=0,r=r=e;;){if(n>=r.length)break;var o=r[n++];o.status=b.ERROR,this.emit("error",o,t,i),this.emit("complete",o)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,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)})}}]),b}();r.initClass(),r.version="5.4.0",r.options={},r.optionsForElement=function(e){return e.getAttribute("id")?r.options[o(e.getAttribute("id"))]:void 0},r.instances=[],r.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},r.autoDiscover=!0,r.discover=function(){var o=void 0;if(document.querySelectorAll)o=document.querySelectorAll(".dropzone");else{o=[];var e=function(r){return function(){for(var e=[],t=0,i=i=r;;){if(t>=i.length)break;var n=i[t++];/(^| )dropzone($| )/.test(n.className)?e.push(o.push(n)):e.push(void 0)}return e}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){for(var e=[],t=0,i=i=o;;){if(t>=i.length)break;var n=i[t++];!1!==r.optionsForElement(n)?e.push(new r(n)):e.push(void 0)}return e}()},r.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],r.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=0,i=i=r.blacklistedBrowsers;;){if(t>=i.length)break;i[t++].test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},r.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),o=0,s=t.length,a=0<=s;a?o<=s:s<=o;a?o++:o--)r[o]=t.charCodeAt(o);return new Blob([n],{type:i})};var n=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},o=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};r.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},r.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},r.getElement=function(e,t){var i=void 0;if("string"==typeof e?i=document.querySelector(e):null!=e.nodeType&&(i=e),null==i)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},r.getElements=function(e,t){var i=void 0,n=void 0;if(e instanceof Array){n=[];try{for(var r=0,o=o=e;!(r>=o.length);)i=o[r++],n.push(this.getElement(i,t))}catch(e){n=null}}else if("string"==typeof e){n=[];for(var s=0,a=a=document.querySelectorAll(e);!(s>=a.length);)i=a[s++],n.push(i)}else null!=e.nodeType&&(n=[e]);if(null==n||!n.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},r.confirm=function(e,t,i){return window.confirm(e)?t():null!=i?i():void 0},r.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var i=e.type,n=i.replace(/\/.*$/,""),r=0,o=o=t;;){if(r>=o.length)break;var s=o[r++];if("."===(s=s.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(s.toLowerCase(),e.name.length-s.length))return!0}else if(/\/\*$/.test(s)){if(n===s.replace(/\/.*$/,""))return!0}else if(i===s)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new r(this,e)})}),null!==e?e.exports=r:window.Dropzone=r,r.ADDED="added",r.QUEUED="queued",r.ACCEPTED=r.QUEUED,r.UPLOADING="uploading",r.PROCESSING=r.UPLOADING,r.CANCELED="canceled",r.ERROR="error",r.SUCCESS="success";var p=function(e,t,i,n,r,o,s,a,l,u){var d=function(e){e.naturalWidth;var t=e.naturalHeight,i=document.createElement("canvas");i.width=1,i.height=t;var n=i.getContext("2d");n.drawImage(e,0,0);for(var r=n.getImageData(1,0,1,t).data,o=0,s=t,a=t;o<a;)0===r[4*(a-1)+3]?s=a:o=a,a=s+o>>1;var l=a/t;return 0===l?1:l}(t);return e.drawImage(t,i,n,r,o,s,a,l,u/d)},u=function(){function e(){l(this,e)}return t(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",i=void 0,n=void 0,r="",o=void 0,s=void 0,a=void 0,l="",u=0;o=(i=e[u++])>>2,s=(3&i)<<4|(n=e[u++])>>4,a=(15&n)<<2|(r=e[u++])>>6,l=63&r,isNaN(n)?a=l=64:isNaN(r)&&(l=64),t=t+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l),i=n=r="",o=s=a=l="",u<e.length;);return t}},{key:"restore",value:function(e,t){if(!e.match("data:image/jpeg;base64,"))return t;var i=this.decode64(e.replace("data:image/jpeg;base64,","")),n=this.slice2Segments(i),r=this.exifManipulation(t,n);return"data:image/jpeg;base64,"+this.encode64(r)}},{key:"exifManipulation",value:function(e,t){var i=this.getExifArray(t),n=this.insertExif(e,i);return new Uint8Array(n)}},{key:"getExifArray",value:function(e){for(var t=void 0,i=0;i<e.length;){if(255===(t=e[i])[0]&225===t[1])return t;i++}return[]}},{key:"insertExif",value:function(e,t){var i=e.replace("data:image/jpeg;base64,",""),n=this.decode64(i),r=n.indexOf(255,3),o=n.slice(0,r),s=n.slice(r),a=o;return a=(a=a.concat(t)).concat(s)}},{key:"slice2Segments",value:function(e){for(var t=0,i=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var n=t+(256*e[t+2]+e[t+3])+2,r=e.slice(t,n);i.push(r),t=n}if(t>e.length)break}return i}},{key:"decode64",value:function(e){var t=void 0,i=void 0,n="",r=void 0,o=void 0,s="",a=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(a++))<<2|(r=this.KEY_STR.indexOf(e.charAt(a++)))>>4,i=(15&r)<<4|(o=this.KEY_STR.indexOf(e.charAt(a++)))>>2,n=(3&o)<<6|(s=this.KEY_STR.indexOf(e.charAt(a++))),l.push(t),64!==o&&l.push(i),64!==s&&l.push(n),t=i=n="",r=o=s="",a<e.length;);return l}}]),e}();u.initClass();r._autoDiscoverFunction=function(){if(r.autoDiscover)return r.discover()},function(i,n){var r=!1,e=!0,o=i.document,s=o.documentElement,t=o.addEventListener?"addEventListener":"attachEvent",a=o.addEventListener?"removeEventListener":"detachEvent",l=o.addEventListener?"":"on",u=function e(t){if("readystatechange"!==t.type||"complete"===o.readyState)return("load"===t.type?i:o)[a](l+t.type,e,!1),!r&&(r=!0)?n.call(i,t.type||t):void 0};if("complete"!==o.readyState){if(o.createEventObject&&s.doScroll){try{e=!i.frameElement}catch(e){}e&&function t(){try{s.doScroll("left")}catch(e){return void setTimeout(t,50)}return u("poll")}()}o[t](l+"DOMContentLoaded",u,!1),o[t](l+"readystatechange",u,!1),i[t](l+"load",u,!1)}}(window,r._autoDiscoverFunction)}(e={exports:{}},e.exports),e.exports);return t.autoDiscover=!1,{render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"dropzoneElement",class:{"vue-dropzone dropzone":e.includeStyling},attrs:{id:e.id}},[e.useCustomSlot?i("div",{staticClass:"dz-message"},[e._t("default",[e._v("Drop files here to upload")])],2):e._e()])},staticRenderFns:[],props:{id:{type:String,required:!0,default:"dropzone"},options:{type:Object,required:!0},includeStyling:{type:Boolean,default:!0,required:!1},awss3:{type:Object,required:!1,default:null},destroyDropzone:{type:Boolean,default:!0,required:!1},duplicateCheck:{type:Boolean,default:!1,required:!1},useCustomSlot:{type:Boolean,default:!1,required:!1}},data:function(){return{isS3:!1,isS3OverridesServerPropagation:!1,wasQueueAutoProcess:!0}},computed:{dropzoneSettings:function(){var t={thumbnailWidth:200,thumbnailHeight:200};return Object.keys(this.options).forEach(function(e){t[e]=this.options[e]},this),null!==this.awss3&&(t.autoProcessQueue=!1,this.isS3=!0,this.isS3OverridesServerPropagation=!1===this.awss3.sendFileToServer,void 0!==this.options.autoProcessQueue&&(this.wasQueueAutoProcess=this.options.autoProcessQueue),this.isS3OverridesServerPropagation&&(t.url=function(e){return e[0].s3Url})),t}},methods:{manuallyAddFile:function(e,t){if(e.manuallyAdded=!0,this.dropzone.emit("addedfile",e),this.dropzone.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.dropzone.options.maxThumbnailFilesize*1024){t&&this.dropzone.emit("thumbnail",e,t);for(var i=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),n=0;n<i.length;n++)i[n].style.width=this.dropzoneSettings.thumbnailWidth+"px",i[n].style.height=this.dropzoneSettings.thumbnailHeight+"px",i[n].style["object-fit"]="contain"}this.dropzone.emit("complete",e),this.dropzone.options.maxFiles&&this.dropzone.options.maxFiles--,this.dropzone.files.push(e),this.$emit("vdropzone-file-added-manually",e)},setOption:function(e,t){this.dropzone.options[e]=t},removeAllFiles:function(e){this.dropzone.removeAllFiles(e)},processQueue:function(){var t=this,e=this.dropzone;this.isS3&&!this.wasQueueAutoProcess?this.getQueuedFiles().forEach(function(e){t.getSignedAndUploadToS3(e)}):this.dropzone.processQueue(),this.dropzone.on("success",function(){e.options.autoProcessQueue=!0}),this.dropzone.on("queuecomplete",function(){e.options.autoProcessQueue=!1})},init:function(){return this.dropzone.init()},destroy:function(){return this.dropzone.destroy()},updateTotalUploadProgress:function(){return this.dropzone.updateTotalUploadProgress()},getFallbackForm:function(){return this.dropzone.getFallbackForm()},getExistingFallback:function(){return this.dropzone.getExistingFallback()},setupEventListeners:function(){return this.dropzone.setupEventListeners()},removeEventListeners:function(){return this.dropzone.removeEventListeners()},disable:function(){return this.dropzone.disable()},enable:function(){return this.dropzone.enable()},filesize:function(e){return this.dropzone.filesize(e)},accept:function(e,t){return this.dropzone.accept(e,t)},addFile:function(e){return this.dropzone.addFile(e)},removeFile:function(e){this.dropzone.removeFile(e)},getAcceptedFiles:function(){return this.dropzone.getAcceptedFiles()},getRejectedFiles:function(){return this.dropzone.getRejectedFiles()},getFilesWithStatus:function(){return this.dropzone.getFilesWithStatus()},getQueuedFiles:function(){return this.dropzone.getQueuedFiles()},getUploadingFiles:function(){return this.dropzone.getUploadingFiles()},getAddedFiles:function(){return this.dropzone.getAddedFiles()},getActiveFiles:function(){return this.dropzone.getActiveFiles()},getSignedAndUploadToS3:function(t){var i=this,e=n.sendFile(t,this.awss3,this.isS3OverridesServerPropagation);this.isS3OverridesServerPropagation?e.then(function(){setTimeout(function(){return i.dropzone.processFile(t)})}):e.then(function(e){e.success?(t.s3ObjectLocation=e.message,setTimeout(function(){return i.dropzone.processFile(t)}),i.$emit("vdropzone-s3-upload-success",e.message)):void 0!==e.message?i.$emit("vdropzone-s3-upload-error",e.message):i.$emit("vdropzone-s3-upload-error","Network Error : Could not send request to AWS. (Maybe CORS error)")}),e.catch(function(e){alert(e)})},setAWSSigningURL:function(e){this.isS3&&(this.awss3.signingURL=e)}},mounted:function(){if(!this.$isServer||!this.hasBeenMounted){this.hasBeenMounted=!0,this.dropzone=new t(this.$refs.dropzoneElement,this.dropzoneSettings);var r=this;this.dropzone.on("thumbnail",function(e,t){r.$emit("vdropzone-thumbnail",e,t)}),this.dropzone.on("addedfile",function(e){var t,i;if(r.duplicateCheck&&this.files.length)for(t=0,i=this.files.length;t<i-1;t++)this.files[t].name===e.name&&this.files[t].size===e.size&&this.files[t].lastModifiedDate.toString()===e.lastModifiedDate.toString()&&(this.removeFile(e),!0,r.$emit("vdropzone-duplicate-file",e));r.$emit("vdropzone-file-added",e),r.isS3&&r.wasQueueAutoProcess&&r.getSignedAndUploadToS3(e)}),this.dropzone.on("addedfiles",function(e){r.$emit("vdropzone-files-added",e)}),this.dropzone.on("removedfile",function(e){r.$emit("vdropzone-removed-file",e),e.manuallyAdded&&r.dropzone.options.maxFiles++}),this.dropzone.on("success",function(e,t){if(r.$emit("vdropzone-success",e,t),r.isS3){if(r.isS3OverridesServerPropagation){var i=(new window.DOMParser).parseFromString(t,"text/xml").firstChild.children[0].innerHTML;r.$emit("vdropzone-s3-upload-success",i)}r.wasQueueAutoProcess&&r.setOption("autoProcessQueue",!1)}}),this.dropzone.on("successmultiple",function(e,t){r.$emit("vdropzone-success-multiple",e,t)}),this.dropzone.on("error",function(e,t,i){r.$emit("vdropzone-error",e,t,i),this.isS3&&r.$emit("vdropzone-s3-upload-error")}),this.dropzone.on("errormultiple",function(e,t,i){r.$emit("vdropzone-error-multiple",e,t,i)}),this.dropzone.on("sending",function(e,t,i){if(r.isS3)if(r.isS3OverridesServerPropagation){var n=e.s3Signature;Object.keys(n).forEach(function(e){i.append(e,n[e])})}else i.append("s3ObjectLocation",e.s3ObjectLocation);r.$emit("vdropzone-sending",e,t,i)}),this.dropzone.on("sendingmultiple",function(e,t,i){r.$emit("vdropzone-sending-multiple",e,t,i)}),this.dropzone.on("complete",function(e){r.$emit("vdropzone-complete",e)}),this.dropzone.on("completemultiple",function(e){r.$emit("vdropzone-complete-multiple",e)}),this.dropzone.on("canceled",function(e){r.$emit("vdropzone-canceled",e)}),this.dropzone.on("canceledmultiple",function(e){r.$emit("vdropzone-canceled-multiple",e)}),this.dropzone.on("maxfilesreached",function(e){r.$emit("vdropzone-max-files-reached",e)}),this.dropzone.on("maxfilesexceeded",function(e){r.$emit("vdropzone-max-files-exceeded",e)}),this.dropzone.on("processing",function(e){r.$emit("vdropzone-processing",e)}),this.dropzone.on("processing",function(e){r.$emit("vdropzone-processing",e)}),this.dropzone.on("processingmultiple",function(e){r.$emit("vdropzone-processing-multiple",e)}),this.dropzone.on("uploadprogress",function(e,t,i){r.$emit("vdropzone-upload-progress",e,t,i)}),this.dropzone.on("totaluploadprogress",function(e,t,i){r.$emit("vdropzone-total-upload-progress",e,t,i)}),this.dropzone.on("reset",function(){r.$emit("vdropzone-reset")}),this.dropzone.on("queuecomplete",function(){r.$emit("vdropzone-queue-complete")}),this.dropzone.on("drop",function(e){r.$emit("vdropzone-drop",e)}),this.dropzone.on("dragstart",function(e){r.$emit("vdropzone-drag-start",e)}),this.dropzone.on("dragend",function(e){r.$emit("vdropzone-drag-end",e)}),this.dropzone.on("dragenter",function(e){r.$emit("vdropzone-drag-enter",e)}),this.dropzone.on("dragover",function(e){r.$emit("vdropzone-drag-over",e)}),this.dropzone.on("dragleave",function(e){r.$emit("vdropzone-drag-leave",e)}),r.$emit("vdropzone-mounted")}},beforeDestroy:function(){this.destroyDropzone&&this.dropzone.destroy()}}}); | ||
//# sourceMappingURL=vue2Dropzone.js.map | ||
!function(a,b){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define(b):(a=a||self, a.vue2Dropzone=b())}(this,function(){'use strict';function a(a,b){return b={exports:{}}, a(b,b.exports), b.exports}var b=a(function(a){var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value" in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}();function d(a,b){if(!a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return b&&(typeof b==="object"||typeof b==="function")?b:a}function f(a,b){if(typeof b!=="function"&&b!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof b)}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}var h=function(){function a(){g(this,a)}b(a,[{key:"on",value:function c(a,b){this._callbacks=this._callbacks||{};this._callbacks[a]||(this._callbacks[a]=[]);this._callbacks[a].push(b);return this}},{key:"emit",value:function b(a){this._callbacks=this._callbacks||{};var c=this._callbacks[a];if(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];for();;){if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}callback.apply(this,args)}}return this}},{key:"off",value:function c(a,b){if(!this._callbacks||arguments.length===0){this._callbacks={};return this}var d=this._callbacks[a];if(!d){return this}if(arguments.length===1){delete this._callbacks[a];return this}for(var e=0;e<d.length;e++){var f=d[e];if(f===b){d.splice(e,1);break}}return this}}]);return a}(),i=function(a){f(i,a);b(i,null,[{key:"initClass",value:function a(){this.prototype.Emitter=h;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:30000,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2000000,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:0.8,resizeMethod:'contain',filesizeBase:1000,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 a(){},params:function d(a,b,c){if(c){return{dzuuid:c.file.upload.uuid,dzchunkindex:c.index,dztotalfilesize:c.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:c.file.upload.totalChunkCount,dzchunkbyteoffset:c.index*this.options.chunkSize}}},accept:function c(a,b){return b()},chunksUploaded:function c(a,b){b()},fallback:function a(){var b=void 0;this.element.className=this.element.className+" dz-browser-not-supported";for();;){if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}if(/(^| )dz-message($| )/.test(child.className)){messageElement=child;child.className="dz-message";break}}b||(b=i.createElement("<div class=\"dz-message\"><span></span></div>"),this.element.appendChild(b));var h=b.getElementsByTagName("span")[0];h&&(h.textContent!=null?(h.textContent=this.options.dictFallbackMessage):h.innerText!=null&&(h.innerText=this.options.dictFallbackMessage));return this.element.appendChild(this.getFallbackForm())},resize:function e(a,b,c,d){var f={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},g=a.width/a.height;b==null&&c==null?(b=f.srcWidth,c=f.srcHeight):b==null?(b=c*g):c==null&&(c=b/g);b=Math.min(b,f.srcWidth);c=Math.min(c,f.srcHeight);var h=b/c;if(f.srcWidth>b||f.srcHeight>c){if(d==='crop')g>h?(f.srcHeight=a.height,f.srcWidth=f.srcHeight*h):(f.srcWidth=a.width,f.srcHeight=f.srcWidth/h);else if(d==='contain')g>h?(c=b/g):(b=c*g);else{throw new Error("Unknown resizeMethod '"+d+"'")}}f.srcX=(a.width-f.srcWidth)/2;f.srcY=(a.height-f.srcHeight)/2;f.trgWidth=b;f.trgHeight=c;return f},transformFile:function c(a,b){if((this.options.resizeWidth||this.options.resizeHeight)&&a.type.match(/image.*/)){return this.resizeImage(a,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,b)}else{return b(a)}},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\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Check</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\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\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></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\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Error</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" 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\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>",drop:function b(a){return this.element.classList.remove("dz-drag-hover")},dragstart:function b(a){},dragend:function b(a){return this.element.classList.remove("dz-drag-hover")},dragenter:function b(a){return this.element.classList.add("dz-drag-hover")},dragover:function b(a){return this.element.classList.add("dz-drag-hover")},dragleave:function b(a){return this.element.classList.remove("dz-drag-hover")},paste:function b(a){},reset:function a(){return this.element.classList.remove("dz-started")},addedfile:function b(a){this.element===this.previewsContainer&&this.element.classList.add("dz-started");if(this.previewsContainer){a.previewElement=i.createElement(this.options.previewTemplate.trim());a.previewTemplate=a.previewElement;this.previewsContainer.appendChild(a.previewElement);for();;){if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}node.textContent=file.name}for();;){if(_isArray4){if(_i4>=_iterator4.length)break;node=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;node=_i4.value}node.innerHTML=this.filesize(file.size)}this.options.addRemoveLinks&&(a._removeLink=i.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>"+this.options.dictRemoveFile+"</a>"),a.previewElement.appendChild(a._removeLink));for();;){if(_isArray5){if(_i5>=_iterator5.length)break;_ref4=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref4=_i5.value}removeLink.addEventListener("click",removeFileEvent)}}},removedfile:function b(a){a.previewElement!=null&&a.previewElement.parentNode!=null&&a.previewElement.parentNode.removeChild(a.previewElement);return this._updateMaxFilesReachedClass()},thumbnail:function c(a,b){if(a.previewElement){a.previewElement.classList.remove("dz-file-preview");for();;){if(_isArray6){if(_i6>=_iterator6.length)break;_ref5=_iterator6[_i6++]}else{_i6=_iterator6.next();if(_i6.done)break;_ref5=_i6.value}thumbnailElement.alt=file.name;thumbnailElement.src=dataUrl}return setTimeout(function(){return a.previewElement.classList.add("dz-image-preview")},1)}},error:function c(a,b){if(a.previewElement){a.previewElement.classList.add("dz-error");typeof b!=="String"&&b.error&&(b=b.error);for();;){if(_isArray7){if(_i7>=_iterator7.length)break;_ref6=_iterator7[_i7++]}else{_i7=_iterator7.next();if(_i7.done)break;_ref6=_i7.value}node.textContent=message}}},errormultiple:function a(){},processing:function b(a){if(a.previewElement){a.previewElement.classList.add("dz-processing");if(a._removeLink){return a._removeLink.innerHTML=this.options.dictCancelUpload}}},processingmultiple:function a(){},uploadprogress:function d(a,b,c){if(a.previewElement){for();;){if(_isArray8){if(_i8>=_iterator8.length)break;_ref7=_iterator8[_i8++]}else{_i8=_iterator8.next();if(_i8.done)break;_ref7=_i8.value}node.nodeName==='PROGRESS'?node.value=progress:node.style.width=progress+"%"}}},totaluploadprogress:function a(){},sending:function a(){},sendingmultiple:function a(){},success:function b(a){if(a.previewElement){return a.previewElement.classList.add("dz-success")}},successmultiple:function a(){},canceled:function b(a){return this.emit("error",a,this.options.dictUploadCanceled)},canceledmultiple:function a(){},complete:function b(a){a._removeLink&&(a._removeLink.innerHTML=this.options.dictRemoveFile);if(a.previewElement){return a.previewElement.classList.add("dz-complete")}},completemultiple:function a(){},maxfilesexceeded:function a(){},maxfilesreached:function a(){},queuecomplete:function a(){},addedfiles:function a(){}};this.prototype._thumbnailQueue=[];this.prototype._processingThumbnail=!1}},{key:"extend",value:function b(a){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];for();;){if(_isArray9){if(_i9>=_iterator9.length)break;_ref8=_iterator9[_i9++]}else{_i9=_iterator9.next();if(_i9.done)break;_ref8=_i9.value}for(y in object)target[key]=val}return a}}]);function i(a,b){g(this,i);var c=d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this)),e=void 0,f=void 0;c.element=a;c.version=i.version;c.defaultOptions.previewTemplate=c.defaultOptions.previewTemplate.replace(/\n*/g,"");c.clickableElements=[];c.listeners=[];c.files=[];typeof c.element==="string"&&(c.element=document.querySelector(c.element));if(!c.element||c.element.nodeType==null){throw new Error("Invalid dropzone element.")}if(c.element.dropzone){throw new Error("Dropzone already attached.")}i.instances.push(c);c.element.dropzone=c;var h=(f=i.optionsForElement(c.element))!=null?f:{};c.options=i.extend({},c.defaultOptions,h,b!=null?b:{});if(c.options.forceFallback||!i.isBrowserSupported()){var j;return j=c.options.fallback.call(c), d(c,j)}c.options.url==null&&(c.options.url=c.element.getAttribute("action"));if(!c.options.url){throw new Error("No URL provided.")}if(c.options.acceptedFiles&&c.options.acceptedMimeTypes){throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.")}if(c.options.uploadMultiple&&c.options.chunking){throw new Error('You cannot set both: uploadMultiple and chunking.')}c.options.acceptedMimeTypes&&(c.options.acceptedFiles=c.options.acceptedMimeTypes,delete c.options.acceptedMimeTypes);c.options.renameFilename!=null&&(c.options.renameFile=function(a){return c.options.renameFilename.call(c,a.name,a)});c.options.method=c.options.method.toUpperCase();(e=c.getExistingFallback())&&e.parentNode&&e.parentNode.removeChild(e);c.options.previewsContainer!==!1&&(c.options.previewsContainer?(c.previewsContainer=i.getElement(c.options.previewsContainer,"previewsContainer")):(c.previewsContainer=c.element));c.options.clickable&&(c.options.clickable===!0?(c.clickableElements=[c.element]):(c.clickableElements=i.getElements(c.options.clickable,"clickable")));c.init();return c}b(i,[{key:"getAcceptedFiles",value:function a(){return this.files.filter(function(a){return a.accepted}).map(function(a){return a})}},{key:"getRejectedFiles",value:function a(){return this.files.filter(function(a){return!a.accepted}).map(function(a){return a})}},{key:"getFilesWithStatus",value:function b(a){return this.files.filter(function(b){return b.status===a}).map(function(a){return a})}},{key:"getQueuedFiles",value:function a(){return this.getFilesWithStatus(i.QUEUED)}},{key:"getUploadingFiles",value:function a(){return this.getFilesWithStatus(i.UPLOADING)}},{key:"getAddedFiles",value:function a(){return this.getFilesWithStatus(i.ADDED)}},{key:"getActiveFiles",value:function a(){return this.files.filter(function(a){return a.status===i.UPLOADING||a.status===i.QUEUED}).map(function(a){return a})}},{key:"init",value:function a(){var b=this;this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data");this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(i.createElement("<div class=\"dz-default dz-message\"><span>"+this.options.dictDefaultMessage+"</span></div>"));if(this.clickableElements.length){var c=function a(){b.hiddenFileInput&&b.hiddenFileInput.parentNode.removeChild(b.hiddenFileInput);b.hiddenFileInput=document.createElement("input");b.hiddenFileInput.setAttribute("type","file");(b.options.maxFiles===null||b.options.maxFiles>1)&&b.hiddenFileInput.setAttribute("multiple","multiple");b.hiddenFileInput.className="dz-hidden-input";b.options.acceptedFiles!==null&&b.hiddenFileInput.setAttribute("accept",b.options.acceptedFiles);b.options.capture!==null&&b.hiddenFileInput.setAttribute("capture",b.options.capture);b.hiddenFileInput.style.visibility="hidden";b.hiddenFileInput.style.position="absolute";b.hiddenFileInput.style.top="0";b.hiddenFileInput.style.left="0";b.hiddenFileInput.style.height="0";b.hiddenFileInput.style.width="0";i.getElement(b.options.hiddenInputContainer,'hiddenInputContainer').appendChild(b.hiddenFileInput);return b.hiddenFileInput.addEventListener("change",function(){var c=b.hiddenFileInput.files;if(c.length){for();;){if(_isArray10){if(_i10>=_iterator10.length)break;_ref9=_iterator10[_i10++]}else{_i10=_iterator10.next();if(_i10.done)break;_ref9=_i10.value}_this3.addFile(file)}}b.emit("addedfiles",c);return a()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;for();;){if(_isArray11){if(_i11>=_iterator11.length)break;_ref10=_iterator11[_i11++]}else{_i11=_iterator11.next();if(_i11.done)break;_ref10=_i11.value}this.on(eventName,this.options[eventName])}this.on("uploadprogress",function(){return b.updateTotalUploadProgress()});this.on("removedfile",function(){return b.updateTotalUploadProgress()});this.on("canceled",function(a){return b.emit("complete",a)});this.on("complete",function(a){if(b.getAddedFiles().length===0&&b.getUploadingFiles().length===0&&b.getQueuedFiles().length===0){return setTimeout(function(){return b.emit("queuecomplete")},0)}});var k=function b(a){a.stopPropagation();if(a.preventDefault){return a.preventDefault()}else{return a.returnValue=!1}};this.listeners=[{element:this.element,events:{"dragstart":function c(a){return b.emit("dragstart",a)},"dragenter":function c(a){k(a);return b.emit("dragenter",a)},"dragover":function c(a){var d=void 0;try{d=a.dataTransfer.effectAllowed}catch(a){};a.dataTransfer.dropEffect='move'===d||'linkMove'===d?'move':'copy';k(a);return b.emit("dragover",a)},"dragleave":function c(a){return b.emit("dragleave",a)},"drop":function c(a){k(a);return b.drop(a)},"dragend":function c(a){return b.emit("dragend",a)}}}];this.clickableElements.forEach(function(a){return b.listeners.push({element:a,events:{"click":function d(c){(a!==b.element||c.target===b.element||i.elementInside(c.target,b.element.querySelector(".dz-message")))&&b.hiddenFileInput.click();return !0}}})});this.enable();return this.options.init.call(this)}},{key:"destroy",value:function a(){this.disable();this.removeAllFiles(!0);(this.hiddenFileInput!=null?this.hiddenFileInput.parentNode:undefined)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null);delete this.element.dropzone;return i.instances.splice(i.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function a(){var b=void 0,c=0,d=0,e=this.getActiveFiles();if(e.length){for();;){if(_isArray12){if(_i12>=_iterator12.length)break;_ref11=_iterator12[_i12++]}else{_i12=_iterator12.next();if(_i12.done)break;_ref11=_i12.value}totalBytesSent+=file.upload.bytesSent;totalBytes+=file.upload.total}b=100*c/d}else b=100;return this.emit("totaluploadprogress",b,d,c)}},{key:"_getParamName",value:function b(a){if(typeof this.options.paramName==="function"){return this.options.paramName(a)}else{return""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")}}},{key:"_renameFile",value:function b(a){if(typeof this.options.renameFile!=="function"){return a.name}return this.options.renameFile(a)}},{key:"getFallbackForm",value:function a(){var b=void 0,c=void 0;if(b=this.getExistingFallback()){return b}var d="<div class=\"dz-fallback\">";this.options.dictFallbackText&&(d+="<p>"+this.options.dictFallbackText+"</p>");d+="<input type=\"file\" name=\""+this._getParamName(0)+"\" "+(this.options.uploadMultiple?'multiple="multiple"':undefined)+" /><input type=\"submit\" value=\"Upload!\"></div>";var e=i.createElement(d);this.element.tagName!=="FORM"?(c=i.createElement("<form action=\""+this.options.url+"\" enctype=\"multipart/form-data\" method=\""+this.options.method+"\"></form>"),c.appendChild(e)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method));return c!=null?c:e}},{key:"getExistingFallback",value:function a(){var b=function b(a){for();;){if(_isArray13){if(_i13>=_iterator13.length)break;_ref12=_iterator13[_i13++]}else{_i13=_iterator13.next();if(_i13.done)break;_ref12=_i13.value}if(/(^| )fallback($| )/.test(el.className)){return el}}},c=["div","form"];for(var d=0;d<c.length;d++){var e=c[d],f;if(f=b(this.element.getElementsByTagName(e))){return f}}}},{key:"setupEventListeners",value:function a(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.addEventListener(c,d,!1))}return b}()})}},{key:"removeEventListeners",value:function a(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.removeEventListener(c,d,!1))}return b}()})}},{key:"disable",value:function a(){var b=this;this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")});this.removeEventListeners();this.disabled=!0;return this.files.map(function(a){return b.cancelUpload(a)})}},{key:"enable",value:function a(){delete this.disabled;this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")});return this.setupEventListeners()}},{key:"filesize",value:function b(a){var c=0,d="b";if(a>0){var e=['tb','gb','mb','kb','b'];for(var f=0;f<e.length;f++){var g=e[f],h=Math.pow(this.options.filesizeBase,4-f)/10;if(a>=h){c=a/Math.pow(this.options.filesizeBase,4-f);d=g;break}}c=Math.round(10*c)/10}return"<strong>"+c+"</strong> "+this.options.dictFileSizeUnits[d]}},{key:"_updateMaxFilesReachedClass",value:function a(){if(this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles){this.getAcceptedFiles().length===this.options.maxFiles&&this.emit('maxfilesreached',this.files);return this.element.classList.add("dz-max-files-reached")}else{return this.element.classList.remove("dz-max-files-reached")}}},{key:"drop",value:function b(a){if(!a.dataTransfer){return}this.emit("drop",a);var c=[];for(var d=0;d<a.dataTransfer.files.length;d++)c[d]=a.dataTransfer.files[d];this.emit("addedfiles",c);if(c.length){var e=a.dataTransfer.items;e&&e.length&&e[0].webkitGetAsEntry!=null?this._addFilesFromItems(e):this.handleFiles(c)}}},{key:"paste",value:function b(a){if(r(a!=null?a.clipboardData:undefined,function(a){return a.items})==null){return}this.emit("paste",a);var c=a.clipboardData.items;if(c.length){return this._addFilesFromItems(c)}}},{key:"handleFiles",value:function b(a){for();;){if(_isArray14){if(_i15>=_iterator14.length)break;_ref13=_iterator14[_i15++]}else{_i15=_iterator14.next();if(_i15.done)break;_ref13=_i15.value}this.addFile(file)}}},{key:"_addFilesFromItems",value:function b(a){return function(){var a=[];for();;){if(_isArray15){if(_i16>=_iterator15.length)break;_ref14=_iterator15[_i16++]}else{_i16=_iterator15.next();if(_i16.done)break;_ref14=_i16.value}item.webkitGetAsEntry!=null&&(entry=item.webkitGetAsEntry())?(entry.isFile?result.push(_this5.addFile(item.getAsFile())):entry.isDirectory?result.push(_this5._addFilesFromDirectory(entry,entry.name)):result.push(undefined)):item.getAsFile!=null?(item.kind==null||item.kind==="file"?result.push(_this5.addFile(item.getAsFile())):result.push(undefined)):result.push(undefined)}return a}()}},{key:"_addFilesFromDirectory",value:function c(a,b){var e=a.createReader(),f=function b(a){return s(console,'log',function(b){return b.log(a)})},g=function a(){return e.readEntries(function(b){if(b.length>0){for();;){if(_isArray16){if(_i17>=_iterator16.length)break;_ref15=_iterator16[_i17++]}else{_i17=_iterator16.next();if(_i17.done)break;_ref15=_i17.value}entry.isFile?entry.file(function(a){if(_this6.options.ignoreHiddenFiles&&a.name.substring(0,1)==='.'){return}a.fullPath=path+"/"+a.name;return _this6.addFile(a)}):entry.isDirectory&&_this6._addFilesFromDirectory(entry,path+"/"+entry.name)}a()}return null},f)};return g()}},{key:"accept",value:function c(a,b){if(this.options.maxFilesize&&a.size>this.options.maxFilesize*1024*1024){return b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize))}else if(!i.isValidFile(a,this.options.acceptedFiles)){return b(this.options.dictInvalidFileType)}else if(this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles){b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles));return this.emit("maxfilesexceeded",a)}else{return this.options.accept.call(this,a,b)}}},{key:"addFile",value:function b(a){var c=this;a.upload={uuid:i.uuidv4(),progress:0,total:a.size,bytesSent:0,filename:this._renameFile(a),chunked:this.options.chunking&&(this.options.forceChunking||a.size>this.options.chunkSize),totalChunkCount:Math.ceil(a.size/this.options.chunkSize)};this.files.push(a);a.status=i.ADDED;this.emit("addedfile",a);this._enqueueThumbnail(a);return this.accept(a,function(b){b?(a.accepted=!1,c._errorProcessing([a],b)):(a.accepted=!0,c.options.autoQueue&&c.enqueueFile(a));return c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function b(a){for();;){if(_isArray17){if(_i18>=_iterator17.length)break;_ref16=_iterator17[_i18++]}else{_i18=_iterator17.next();if(_i18.done)break;_ref16=_i18.value}this.enqueueFile(file)}return null}},{key:"enqueueFile",value:function b(a){var c=this;if(a.status===i.ADDED&&a.accepted===!0){a.status=i.QUEUED;if(this.options.autoProcessQueue){return setTimeout(function(){return c.processQueue()},0)}}else{throw new Error("This file can't be queued because it has already been processed or was rejected.")}}},{key:"_enqueueThumbnail",value:function b(a){var c=this;if(this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=this.options.maxThumbnailFilesize*1024*1024){this._thumbnailQueue.push(a);return setTimeout(function(){return c._processThumbnailQueue()},0)}}},{key:"_processThumbnailQueue",value:function a(){var b=this;if(this._processingThumbnail||this._thumbnailQueue.length===0){return}this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(a){b.emit("thumbnail",c,a);b._processingThumbnail=!1;return b._processThumbnailQueue()})}},{key:"removeFile",value:function b(a){a.status===i.UPLOADING&&this.cancelUpload(a);this.files=j(this.files,a);this.emit("removedfile",a);if(this.files.length===0){return this.emit("reset")}}},{key:"removeAllFiles",value:function b(a){a==null&&(a=!1);for();;){if(_isArray18){if(_i19>=_iterator18.length)break;_ref17=_iterator18[_i19++]}else{_i19=_iterator18.next();if(_i19.done)break;_ref17=_i19.value}(file.status!==Dropzone.UPLOADING||cancelIfNecessary)&&this.removeFile(file)}return null}},{key:"resizeImage",value:function f(a,b,c,d,e){var g=this;return this.createThumbnail(a,b,c,d,!0,function(b,c){if(c==null){return e(a)}else{var d=g.options.resizeMimeType;d==null&&(d=a.type);var f=c.toDataURL(d,g.options.resizeQuality);(d==='image/jpeg'||d==='image/jpg')&&(f=p.restore(a.dataURL,f));return e(i.dataURItoBlob(f))}})}},{key:"createThumbnail",value:function g(a,b,c,d,e,f){var h=this,i=new FileReader();i.onload=function(){a.dataURL=i.result;if(a.type==="image/svg+xml"){f!=null&&f(i.result);return}return h.createThumbnailFromUrl(a,b,c,d,e,f)};return i.readAsDataURL(a)}},{key:"createThumbnailFromUrl",value:function h(a,b,c,d,e,f,g){var i=this,j=document.createElement("img");g&&(j.crossOrigin=g);j.onload=function(){var g=function b(a){return a(1)};typeof EXIF!=='undefined'&&EXIF!==null&&e&&(g=function b(a){return EXIF.getData(j,function(){return a(EXIF.getTag(this,'Orientation'))})});return g(function(e){a.width=j.width;a.height=j.height;var g=i.options.resize.call(i,a,b,c,d),h=document.createElement("canvas"),k=h.getContext("2d");h.width=g.trgWidth;h.height=g.trgHeight;e>4&&(h.width=g.trgHeight,h.height=g.trgWidth);switch(e){case 2:k.translate(h.width,0);k.scale(-1,1);break;case 3:k.translate(h.width,h.height);k.rotate(Math.PI);break;case 4:k.translate(0,h.height);k.scale(1,-1);break;case 5:k.rotate(0.5*Math.PI);k.scale(1,-1);break;case 6:k.rotate(0.5*Math.PI);k.translate(0,-h.width);break;case 7:k.rotate(0.5*Math.PI);k.translate(h.height,-h.width);k.scale(-1,1);break;case 8:k.rotate(-0.5*Math.PI);k.translate(-h.height,0);break};m(k,j,g.srcX!=null?g.srcX:0,g.srcY!=null?g.srcY:0,g.srcWidth,g.srcHeight,g.trgX!=null?g.trgX:0,g.trgY!=null?g.trgY:0,g.trgWidth,g.trgHeight);var l=h.toDataURL("image/png");if(f!=null){return f(l,h)}})};f!=null&&(j.onerror=f);return j.src=a.dataURL}},{key:"processQueue",value:function a(){var b=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=b){return}var e=this.getQueuedFiles();if(!(e.length>0)){return}if(this.options.uploadMultiple){return this.processFiles(e.slice(0,b-c))}else{while(d<b){if(!e.length){return}this.processFile(e.shift());d++}}}},{key:"processFile",value:function b(a){return this.processFiles([a])}},{key:"processFiles",value:function b(a){for();;){if(_isArray19){if(_i20>=_iterator19.length)break;_ref18=_iterator19[_i20++]}else{_i20=_iterator19.next();if(_i20.done)break;_ref18=_i20.value}file.processing=!0;file.status=Dropzone.UPLOADING;this.emit("processing",file)}this.options.uploadMultiple&&this.emit("processingmultiple",a);return this.uploadFiles(a)}},{key:"_getFilesWithXhr",value:function b(a){var c=void 0;return c=this.files.filter(function(b){return b.xhr===a}).map(function(a){return a})}},{key:"cancelUpload",value:function b(a){if(a.status===i.UPLOADING){var c=this._getFilesWithXhr(a.xhr);for();;){if(_isArray20){if(_i21>=_iterator20.length)break;_ref19=_iterator20[_i21++]}else{_i21=_iterator20.next();if(_i21.done)break;_ref19=_i21.value}groupedFile.status=Dropzone.CANCELED}typeof a.xhr!=='undefined'&&a.xhr.abort();for();;){if(_isArray21){if(_i22>=_iterator21.length)break;_ref20=_iterator21[_i22++]}else{_i22=_iterator21.next();if(_i22.done)break;_ref20=_i22.value}this.emit("canceled",_groupedFile)}this.options.uploadMultiple&&this.emit("canceledmultiple",c)}else (a.status===i.ADDED||a.status===i.QUEUED)&&(a.status=i.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));if(this.options.autoProcessQueue){return this.processQueue()}}},{key:"resolveOption",value:function b(a){if(typeof a==='function'){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];return a.apply(this,d)}return a}},{key:"uploadFile",value:function b(a){return this.uploadFiles([a])}},{key:"uploadFiles",value:function b(a){var c=this;this._transformFiles(a,function(b){if(a[0].upload.chunked){var d=a[0],e=b[0];d.upload.chunks=[];var f=function b(){var f=0;while(d.upload.chunks[f]!==undefined)f++;if(f>=d.upload.totalChunkCount)return;var g=f*c.options.chunkSize,h=Math.min(g+c.options.chunkSize,d.size),j={name:c._getParamName(0),data:e.webkitSlice?e.webkitSlice(g,h):e.slice(g,h),filename:d.upload.filename,chunkIndex:f};d.upload.chunks[f]={file:d,index:f,dataBlock:j,status:i.UPLOADING,progress:0,retries:0};c._uploadData(a,[j])};d.upload.finishedChunkUpload=function(b){var e=!0;b.status=i.SUCCESS;b.dataBlock=null;b.xhr=null;for(var g=0;g<d.upload.totalChunkCount;g++){if(d.upload.chunks[g]===undefined){return f()}d.upload.chunks[g].status!==i.SUCCESS&&(e=!1)}e&&c.options.chunksUploaded(d,function(){c._finished(a,'',null)})};if(c.options.parallelChunkUploads){for(var g=0;g<d.upload.totalChunkCount;g++)f()}else f()}else{var h=[];for(var j=0;j<a.length;j++)h[j]={name:c._getParamName(j),data:b[j],filename:a[j].upload.filename};c._uploadData(a,h)}})}},{key:"_getChunk",value:function c(a,b){for(var d=0;d<a.upload.totalChunkCount;d++){if(a.upload.chunks[d]!==undefined&&a.upload.chunks[d].xhr===b){return a.upload.chunks[d]}}}},{key:"_uploadData",value:function c(a,b){var d=this,f=new XMLHttpRequest();for();;){if(_isArray22){if(_i24>=_iterator22.length)break;_ref21=_iterator22[_i24++]}else{_i24=_iterator22.next();if(_i24.done)break;_ref21=_i24.value}file.xhr=xhr}a[0].upload.chunked&&(a[0].upload.chunks[b[0].chunkIndex].xhr=f);var m=this.resolveOption(this.options.method,a),n=this.resolveOption(this.options.url,a);f.open(m,n,!0);f.timeout=this.resolveOption(this.options.timeout,a);f.withCredentials=!!this.options.withCredentials;f.onload=function(b){d._finishedUploading(a,f,b)};f.onerror=function(){d._handleUploadError(a,f)};var o=f.upload!=null?f.upload:f;o.onprogress=function(b){return d._updateFilesUploadProgress(a,f,b)};var p={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&i.extend(p,this.options.headers);for(var q in p){var r=p[q];r&&f.setRequestHeader(q,r)}var s=new FormData();if(this.options.params){var t=this.options.params;typeof t==='function'&&(t=t.call(this,a,f,a[0].upload.chunked?this._getChunk(a[0],f):null));for(var u in t){var v=t[u];s.append(u,v)}}for();;){if(_isArray23){if(_i25>=_iterator23.length)break;_ref22=_iterator23[_i25++]}else{_i25=_iterator23.next();if(_i25.done)break;_ref22=_i25.value}this.emit("sending",_file,xhr,formData)}this.options.uploadMultiple&&this.emit("sendingmultiple",a,f,s);this._addFormElementData(s);for(var B=0;B<b.length;B++){var C=b[B];s.append(C.name,C.data,C.filename)}this.submitRequest(f,s,a)}},{key:"_transformFiles",value:function c(a,b){var d=this,e=[],f=0,g=function g(c){d.options.transformFile.call(d,a[c],function(d){e[c]=d;++f===a.length&&b(e)})};for(var h=0;h<a.length;h++)g(h)}},{key:"_addFormElementData",value:function b(a){if(this.element.tagName==="FORM"){for();;){if(_isArray24){if(_i26>=_iterator24.length)break;_ref23=_iterator24[_i26++]}else{_i26=_iterator24.next();if(_i26.done)break;_ref23=_i26.value}inputType&&(inputType=inputType.toLowerCase());if(typeof inputName==='undefined'||inputName===null)continue;if(input.tagName==="SELECT"&&input.hasAttribute("multiple")){for();;){if(_isArray25){if(_i27>=_iterator25.length)break;_ref24=_iterator25[_i27++]}else{_i27=_iterator25.next();if(_i27.done)break;_ref24=_i27.value}option.selected&&formData.append(inputName,option.value)}}else (!inputType||inputType!=="checkbox"&&inputType!=="radio"||input.checked)&&formData.append(inputName,input.value)}}}},{key:"_updateFilesUploadProgress",value:function d(a,b,c){var e=void 0;if(typeof c!=='undefined'){e=100*c.loaded/c.total;if(a[0].upload.chunked){var f=a[0],g=this._getChunk(f,b);g.progress=e;g.total=c.total;g.bytesSent=c.loaded;f.upload.progress=0;f.upload.total=0;f.upload.bytesSent=0;for(var h=0;h<f.upload.totalChunkCount;h++)f.upload.chunks[h]!==undefined&&f.upload.chunks[h].progress!==undefined&&(f.upload.progress+=f.upload.chunks[h].progress,f.upload.total+=f.upload.chunks[h].total,f.upload.bytesSent+=f.upload.chunks[h].bytesSent);f.upload.progress=f.upload.progress/f.upload.totalChunkCount}else{for();;){if(_isArray26){if(_i28>=_iterator26.length)break;_ref25=_iterator26[_i28++]}else{_i28=_iterator26.next();if(_i28.done)break;_ref25=_i28.value}_file2.upload.progress=progress;_file2.upload.total=e.total;_file2.upload.bytesSent=e.loaded}}for();;){if(_isArray27){if(_i29>=_iterator27.length)break;_ref26=_iterator27[_i29++]}else{_i29=_iterator27.next();if(_i29.done)break;_ref26=_i29.value}this.emit("uploadprogress",_file3,_file3.upload.progress,_file3.upload.bytesSent)}}else{var s=!0;e=100;for();;){if(_isArray28){if(_i30>=_iterator28.length)break;_ref27=_iterator28[_i30++]}else{_i30=_iterator28.next();if(_i30.done)break;_ref27=_i30.value}(_file4.upload.progress!==100||_file4.upload.bytesSent!==_file4.upload.total)&&(allFilesFinished=!1);_file4.upload.progress=progress;_file4.upload.bytesSent=_file4.upload.total}if(s){return}for();;){if(_isArray29){if(_i31>=_iterator29.length)break;_ref28=_iterator29[_i31++]}else{_i31=_iterator29.next();if(_i31.done)break;_ref28=_i31.value}this.emit("uploadprogress",_file5,progress,_file5.upload.bytesSent)}}}},{key:"_finishedUploading",value:function d(a,b,c){var e=void 0;if(a[0].status===i.CANCELED){return}if(b.readyState!==4){return}if(b.responseType!=='arraybuffer'&&b.responseType!=='blob'){e=b.responseText;if(b.getResponseHeader("content-type")&&~b.getResponseHeader("content-type").indexOf("application/json")){try{e=JSON.parse(e)}catch(a){c=a,e="Invalid JSON response from server."}}}this._updateFilesUploadProgress(a);(200<=b.status&&b.status<300)?a[0].upload.chunked?a[0].upload.finishedChunkUpload(this._getChunk(a[0],b)):this._finished(a,e,c):this._handleUploadError(a,b,e)}},{key:"_handleUploadError",value:function d(a,b,c){if(a[0].status===i.CANCELED){return}if(a[0].upload.chunked&&this.options.retryChunks){var e=this._getChunk(a[0],b);if(e.retries++<this.options.retryChunksLimit){this._uploadData(a,[e.dataBlock]);return}else console.warn('Retried this chunk too often. Giving up.')}for();;){if(_isArray30){if(_i32>=_iterator30.length)break;_ref29=_iterator30[_i32++]}else{_i32=_iterator30.next();if(_i32.done)break;_ref29=_i32.value}this._errorProcessing(files,response||this.options.dictResponseError.replace("{{statusCode}}",xhr.status),xhr)}}},{key:"submitRequest",value:function d(a,b,c){a.send(b)}},{key:"_finished",value:function d(a,b,c){for();;){if(_isArray31){if(_i33>=_iterator31.length)break;_ref30=_iterator31[_i33++]}else{_i33=_iterator31.next();if(_i33.done)break;_ref30=_i33.value}file.status=Dropzone.SUCCESS;this.emit("success",file,responseText,e);this.emit("complete",file)}this.options.uploadMultiple&&(this.emit("successmultiple",a,b,c),this.emit("completemultiple",a));if(this.options.autoProcessQueue){return this.processQueue()}}},{key:"_errorProcessing",value:function d(a,b,c){for();;){if(_isArray32){if(_i34>=_iterator32.length)break;_ref31=_iterator32[_i34++]}else{_i34=_iterator32.next();if(_i34.done)break;_ref31=_i34.value}file.status=Dropzone.ERROR;this.emit("error",file,message,xhr);this.emit("complete",file)}this.options.uploadMultiple&&(this.emit("errormultiple",a,b,c),this.emit("completemultiple",a));if(this.options.autoProcessQueue){return this.processQueue()}}}],[{key:"uuidv4",value:function a(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=Math.random()*16|0,c=a==='x'?b:b&0x3|0x8;return c.toString(16)})}}]);return i}(h);i.initClass();i.version="5.5.1";i.options={};i.optionsForElement=function(a){if(a.getAttribute("id")){return i.options[k(a.getAttribute("id"))]}else{return undefined}};i.instances=[];i.forElement=function(a){typeof a==="string"&&(a=document.querySelector(a));if((a!=null?a.dropzone:undefined)==null){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 a.dropzone};i.autoDiscover=!0;i.discover=function(){var a=void 0;if(document.querySelectorAll)a=document.querySelectorAll(".dropzone");else{a=[];var b=function b(a){return function(){var a=[];for();;){if(_isArray33){if(_i35>=_iterator33.length)break;_ref32=_iterator33[_i35++]}else{_i35=_iterator33.next();if(_i35.done)break;_ref32=_i35.value}/(^| )dropzone($| )/.test(el.className)?result.push(dropzones.push(el)):result.push(undefined)}return a}()};b(document.getElementsByTagName("div"));b(document.getElementsByTagName("form"))}return function(){var a=[];for();;){if(_isArray34){if(_i36>=_iterator34.length)break;_ref33=_iterator34[_i36++]}else{_i36=_iterator34.next();if(_i36.done)break;_ref33=_i36.value}Dropzone.optionsForElement(dropzone)!==!1?result.push(new Dropzone(dropzone)):result.push(undefined)}return a}()};i.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i];i.isBrowserSupported=function(){var a=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector){if(!("classList" in document.createElement("a")))a=!1;else{for();;){if(_isArray35){if(_i37>=_iterator35.length)break;_ref34=_iterator35[_i37++]}else{_i37=_iterator35.next();if(_i37.done)break;_ref34=_i37.value}if(regex.test(navigator.userAgent)){capableBrowser=!1;continue}}}}else a=!1;return a};i.dataURItoBlob=function(a){var b=atob(a.split(',')[1]),c=a.split(',')[0].split(':')[1].split(';')[0],d=new ArrayBuffer(b.length),e=new Uint8Array(d);for(var f=0,g=b.length,h=0<=g;h?f<=g:f>=g;h?f++:f--)e[f]=b.charCodeAt(f);return new Blob([d],{type:c})};var j=function c(a,b){return a.filter(function(a){return a!==b}).map(function(a){return a})},k=function b(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})};i.createElement=function(a){var b=document.createElement("div");b.innerHTML=a;return b.childNodes[0]};i.elementInside=function(a,b){if(a===b){return !0}while(a=a.parentNode){if(a===b){return !0}}return !1};i.getElement=function(a,b){var c=void 0;typeof a==="string"?(c=document.querySelector(a)):a.nodeType!=null&&(c=a);if(c==null){throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.")}return c};i.getElements=function(a,b){var d=void 0;if(a instanceof Array){d=[];try{for();;){if(_isArray36){if(_i38>=_iterator36.length)break;el=_iterator36[_i38++]}else{_i38=_iterator36.next();if(_i38.done)break;el=_i38.value}elements.push(this.getElement(el,name))}}catch(a){d=null}}else if(typeof a==="string"){d=[];for();;){if(_isArray37){if(_i39>=_iterator37.length)break;el=_iterator37[_i39++]}else{_i39=_iterator37.next();if(_i39.done)break;el=_i39.value}elements.push(el)}}else a.nodeType!=null&&(d=[a]);if(d==null||!d.length){throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.")}return d};i.confirm=function(a,b,c){if(window.confirm(a)){return b()}else if(c!=null){return c()}};i.isValidFile=function(a,b){if(!b){return !0}b=b.split(",");for();;){if(_isArray38){if(_i40>=_iterator38.length)break;_ref35=_iterator38[_i40++]}else{_i40=_iterator38.next();if(_i40.done)break;_ref35=_i40.value}validType=validType.trim();if(validType.charAt(0)==="."){if(file.name.toLowerCase().indexOf(validType.toLowerCase(),file.name.length-validType.length)!==-1){return !0}}else if(/\/\*$/.test(validType)){if(baseMimeType===validType.replace(/\/.*$/,"")){return !0}}else{if(mimeType===validType){return !0}}}return !1};typeof jQuery!=='undefined'&&jQuery!==null&&(jQuery.fn.dropzone=function(a){return this.each(function(){return new i(this,a)})});a!==null?(a.exports=i):(window.Dropzone=i);i.ADDED="added";i.QUEUED="queued";i.ACCEPTED=i.QUEUED;i.UPLOADING="uploading";i.PROCESSING=i.UPLOADING;i.CANCELED="canceled";i.ERROR="error";i.SUCCESS="success";var l=function b(a){var d=a.naturalHeight,e=document.createElement("canvas");e.width=1;e.height=d;var f=e.getContext("2d");f.drawImage(a,0,0);var g=f.getImageData(1,0,1,d),h=g.data,i=0,j=d,k=d;while(k>i){var l=h[(k-1)*4+3];l===0?(j=k):(i=k);k=j+i>>1}var m=k/d;if(m===0){return 1}else{return m}},m=function k(a,b,c,d,e,f,g,h,i,j){var m=l(b);return a.drawImage(b,c,d,e,f,g,h,i,j/m)},p=function(){function a(){g(this,a)}b(a,null,[{key:"initClass",value:function a(){this.KEY_STR='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='}},{key:"encode64",value:function b(a){var c='',d=undefined,e=undefined,f='',g=undefined,h=undefined,i=undefined,j='',k=0;while(!0){d=a[k++];e=a[k++];f=a[k++];g=d>>2;h=(d&3)<<4|e>>4;i=(e&15)<<2|f>>6;j=f&63;isNaN(e)?(i=j=64):isNaN(f)&&(j=64);c=c+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(j);d=e=f='';g=h=i=j='';if(!(k<a.length)){break}}return c}},{key:"restore",value:function c(a,b){if(!a.match('data:image/jpeg;base64,')){return b}var d=this.decode64(a.replace('data:image/jpeg;base64,','')),e=this.slice2Segments(d),f=this.exifManipulation(b,e);return"data:image/jpeg;base64,"+this.encode64(f)}},{key:"exifManipulation",value:function c(a,b){var d=this.getExifArray(b),e=this.insertExif(a,d),f=new Uint8Array(e);return f}},{key:"getExifArray",value:function b(a){var c=undefined,d=0;while(d<a.length){c=a[d];if(c[0]===255&c[1]===225){return c}d++}return[]}},{key:"insertExif",value:function c(a,b){var d=a.replace('data:image/jpeg;base64,',''),e=this.decode64(d),f=e.indexOf(255,3),g=e.slice(0,f),h=e.slice(f),i=g;i=i.concat(b);i=i.concat(h);return i}},{key:"slice2Segments",value:function b(a){var c=0,d=[];while(!0){var e;if(a[c]===255&a[c+1]===218){break}if(a[c]===255&a[c+1]===216)c+=2;else{e=a[c+2]*256+a[c+3];var f=c+e+2,g=a.slice(c,f);d.push(g);c=f}if(c>a.length){break}}return d}},{key:"decode64",value:function b(a){var c=undefined,d=undefined,e='',f=undefined,g=undefined,h=undefined,i='',j=0,k=[],l=/[^A-Za-z0-9\+\/\=]/g;l.exec(a)&&console.warn('There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, \'+\', \'/\',and \'=\'\nExpect errors in decoding.');a=a.replace(/[^A-Za-z0-9\+\/\=]/g,'');while(!0){f=this.KEY_STR.indexOf(a.charAt(j++));g=this.KEY_STR.indexOf(a.charAt(j++));h=this.KEY_STR.indexOf(a.charAt(j++));i=this.KEY_STR.indexOf(a.charAt(j++));c=f<<2|g>>4;d=(g&15)<<4|h>>2;e=(h&3)<<6|i;k.push(c);h!==64&&k.push(d);i!==64&&k.push(e);c=d=e='';f=g=h=i='';if(!(j<a.length)){break}}return k}}]);return a}();p.initClass();var q=function c(a,b){var d=!1,f=!0,g=a.document,h=g.documentElement,i=g.addEventListener?"addEventListener":"attachEvent",j=g.addEventListener?"removeEventListener":"detachEvent",k=g.addEventListener?"":"on",l=function e(c){if(c.type==="readystatechange"&&g.readyState!=="complete"){return}(c.type==="load"?a:g)[j](k+c.type,e,!1);if(!d&&(d=!0)){return b.call(a,c.type||c)}},m=function a(){try{h.doScroll("left")}catch(b){setTimeout(a,50);return};return l("poll")};if(g.readyState!=="complete"){if(g.createEventObject&&h.doScroll){try{f=!a.frameElement}catch(a){};f&&m()}g[i](k+"DOMContentLoaded",l,!1);g[i](k+"readystatechange",l,!1);return a[i](k+"load",l,!1)}};i._autoDiscoverFunction=function(){if(i.autoDiscover){return i.discover()}};q(window,i._autoDiscoverFunction);function r(a,b){return typeof a!=='undefined'&&a!==null?b(a):undefined}function s(a,b,c){if(typeof a!=='undefined'&&a!==null&&typeof a[b]==='function'){return c(a,b)}else{return undefined}}}),d={getSignedURL:function c(a,b){var d={filePath:a.name,contentType:a.type};return new Promise(function(c,e){var f=new FormData(),g=new XMLHttpRequest(),h=typeof b.signingURL==="function"?b.signingURL(a):b.signingURL;g.open("POST",h);g.onload=function(){g.status==200?c(JSON.parse(g.response)):e(g.statusText)};g.onerror=function(a){console.error("Network Error : Could not send request to AWS (Maybe CORS errors)");e(a)};b.withCredentials===!0&&(g.withCredentials=!0);Object.entries(b.headers||{}).forEach(function(a){var b=a[0],c=a[1];g.setRequestHeader(b,c)});d=Object.assign(d,b.params||{});Object.entries(d).forEach(function(a){var b=a[0],c=a[1];f.append(b,c)});g.send(f)})},sendFile:function d(a,b,c){var e=c?this.setResponseHandler:this.sendS3Handler;return this.getSignedURL(a,b).then(function(b){return e(b,a)}).catch(function(a){return a})},setResponseHandler:function c(a,b){b.s3Signature=a.signature;b.s3Url=a.postEndpoint},sendS3Handler:function c(a,b){var d=new FormData(),e=a.signature;Object.keys(e).forEach(function(a){d.append(a,e[a])});d.append('file',b);return new Promise(function(b,c){var e=new XMLHttpRequest();e.open('POST',a.postEndpoint);e.onload=function(){if(e.status==201){var a=(new window.DOMParser()).parseFromString(e.response,"text/xml"),d=a.firstChild.children[0].innerHTML;b({'success':!0,'message':d})}else{a=(new window.DOMParser()).parseFromString(e.response,"text/xml"),f=a.firstChild.children[0].innerHTML;c({'success':!1,'message':f+". Request is marked as resolved when returns as status 201"})}};e.onerror=function(a){var b=(new window.DOMParser()).parseFromString(e.response,"text/xml"),d=b.firstChild.children[1].innerHTML;c({'success':!1,'message':d})};e.send(d)})}};b.autoDiscover=!1;var f={props:{id:{type:String,required:!0,default:'dropzone'},options:{type:Object,required:!0},includeStyling:{type:Boolean,default:!0,required:!1},awss3:{type:Object,required:!1,default:null},destroyDropzone:{type:Boolean,default:!0,required:!1},duplicateCheck:{type:Boolean,default:!1,required:!1},useCustomSlot:{type:Boolean,default:!1,required:!1}},data:function a(){return{isS3:!1,isS3OverridesServerPropagation:!1,wasQueueAutoProcess:!0}},computed:{dropzoneSettings:function a(){var b={thumbnailWidth:200,thumbnailHeight:200};Object.keys(this.options).forEach(function(a){b[a]=this.options[a]},this);this.awss3!==null&&(b.autoProcessQueue=!1,this.isS3=!0,this.isS3OverridesServerPropagation=this.awss3.sendFileToServer===!1,this.options.autoProcessQueue!==undefined&&(this.wasQueueAutoProcess=this.options.autoProcessQueue),this.isS3OverridesServerPropagation&&(b.url=function(a){return a[0].s3Url}));return b}},mounted:function a(){if(this.$isServer&&this.hasBeenMounted){return}this.hasBeenMounted=!0;this.dropzone=new b(this.$refs.dropzoneElement,this.dropzoneSettings);var c=this;this.dropzone.on('thumbnail',function(a,b){c.$emit('vdropzone-thumbnail',a,b)});this.dropzone.on('addedfile',function(a){if(c.duplicateCheck){if(this.files.length){var b,d;for(b=0, d=this.files.length;b<d-1;b++)this.files[b].name===a.name&&this.files[b].size===a.size&&this.files[b].lastModifiedDate.toString()===a.lastModifiedDate.toString()&&(this.removeFile(a),c.$emit('vdropzone-duplicate-file',a))}}c.$emit('vdropzone-file-added',a);c.isS3&&c.wasQueueAutoProcess&&c.getSignedAndUploadToS3(a)});this.dropzone.on('addedfiles',function(a){c.$emit('vdropzone-files-added',a)});this.dropzone.on('removedfile',function(a){c.$emit('vdropzone-removed-file',a);a.manuallyAdded&&c.dropzone.options.maxFiles++});this.dropzone.on('success',function(a,b){c.$emit('vdropzone-success',a,b);if(c.isS3){if(c.isS3OverridesServerPropagation){var d=(new window.DOMParser()).parseFromString(b,"text/xml"),e=d.firstChild.children[0].innerHTML;c.$emit('vdropzone-s3-upload-success',e)}c.wasQueueAutoProcess&&c.setOption('autoProcessQueue',!1)}});this.dropzone.on('successmultiple',function(a,b){c.$emit('vdropzone-success-multiple',a,b)});this.dropzone.on('error',function(a,b,d){c.$emit('vdropzone-error',a,b,d);this.isS3&&c.$emit('vdropzone-s3-upload-error')});this.dropzone.on('errormultiple',function(a,b,d){c.$emit('vdropzone-error-multiple',a,b,d)});this.dropzone.on('sending',function(a,b,d){if(c.isS3){if(c.isS3OverridesServerPropagation){var e=a.s3Signature;Object.keys(e).forEach(function(a){d.append(a,e[a])})}else d.append('s3ObjectLocation',a.s3ObjectLocation)}c.$emit('vdropzone-sending',a,b,d)});this.dropzone.on('sendingmultiple',function(a,b,d){c.$emit('vdropzone-sending-multiple',a,b,d)});this.dropzone.on('complete',function(a){c.$emit('vdropzone-complete',a)});this.dropzone.on('completemultiple',function(a){c.$emit('vdropzone-complete-multiple',a)});this.dropzone.on('canceled',function(a){c.$emit('vdropzone-canceled',a)});this.dropzone.on('canceledmultiple',function(a){c.$emit('vdropzone-canceled-multiple',a)});this.dropzone.on('maxfilesreached',function(a){c.$emit('vdropzone-max-files-reached',a)});this.dropzone.on('maxfilesexceeded',function(a){c.$emit('vdropzone-max-files-exceeded',a)});this.dropzone.on('processing',function(a){c.$emit('vdropzone-processing',a)});this.dropzone.on('processingmultiple',function(a){c.$emit('vdropzone-processing-multiple',a)});this.dropzone.on('uploadprogress',function(a,b,d){c.$emit('vdropzone-upload-progress',a,b,d)});this.dropzone.on('totaluploadprogress',function(a,b,d){c.$emit('vdropzone-total-upload-progress',a,b,d)});this.dropzone.on('reset',function(){c.$emit('vdropzone-reset')});this.dropzone.on('queuecomplete',function(){c.$emit('vdropzone-queue-complete')});this.dropzone.on('drop',function(a){c.$emit('vdropzone-drop',a)});this.dropzone.on('dragstart',function(a){c.$emit('vdropzone-drag-start',a)});this.dropzone.on('dragend',function(a){c.$emit('vdropzone-drag-end',a)});this.dropzone.on('dragenter',function(a){c.$emit('vdropzone-drag-enter',a)});this.dropzone.on('dragover',function(a){c.$emit('vdropzone-drag-over',a)});this.dropzone.on('dragleave',function(a){c.$emit('vdropzone-drag-leave',a)});c.$emit('vdropzone-mounted')},beforeDestroy:function a(){this.destroyDropzone&&this.dropzone.destroy()},methods:{manuallyAddFile:function(a,b){a.manuallyAdded=!0;this.dropzone.emit("addedfile",a);var c=!1;(b.indexOf('.png')>-1||b.indexOf('.jpg')>-1||b.indexOf('.jpeg')>-1)&&(c=!0);if(this.dropzone.options.createImageThumbnails&&c&&a.size<=this.dropzone.options.maxThumbnailFilesize*1024*1024){b&&this.dropzone.emit("thumbnail",a,b);var d=a.previewElement.querySelectorAll('[data-dz-thumbnail]');for(var e=0;e<d.length;e++)d[e].style.width=this.dropzoneSettings.thumbnailWidth+'px',d[e].style.height=this.dropzoneSettings.thumbnailHeight+'px',d[e].style['object-fit']='contain'}this.dropzone.emit("complete",a);this.dropzone.options.maxFiles&&this.dropzone.options.maxFiles--;this.dropzone.files.push(a);this.$emit('vdropzone-file-added-manually',a)},setOption:function(a,b){this.dropzone.options[a]=b},removeAllFiles:function(a){this.dropzone.removeAllFiles(a)},processQueue:function(){var a=this,b=this.dropzone;this.isS3&&!this.wasQueueAutoProcess?this.getQueuedFiles().forEach(function(b){a.getSignedAndUploadToS3(b)}):this.dropzone.processQueue();this.dropzone.on("success",function(){b.options.autoProcessQueue=!0});this.dropzone.on('queuecomplete',function(){b.options.autoProcessQueue=!1})},init:function(){return this.dropzone.init()},destroy:function(){return this.dropzone.destroy()},updateTotalUploadProgress:function(){return this.dropzone.updateTotalUploadProgress()},getFallbackForm:function(){return this.dropzone.getFallbackForm()},getExistingFallback:function(){return this.dropzone.getExistingFallback()},setupEventListeners:function(){return this.dropzone.setupEventListeners()},removeEventListeners:function(){return this.dropzone.removeEventListeners()},disable:function(){return this.dropzone.disable()},enable:function(){return this.dropzone.enable()},filesize:function(a){return this.dropzone.filesize(a)},accept:function(a,b){return this.dropzone.accept(a,b)},addFile:function(a){return this.dropzone.addFile(a)},removeFile:function(a){this.dropzone.removeFile(a)},getAcceptedFiles:function(){return this.dropzone.getAcceptedFiles()},getRejectedFiles:function(){return this.dropzone.getRejectedFiles()},getFilesWithStatus:function(){return this.dropzone.getFilesWithStatus()},getQueuedFiles:function(){return this.dropzone.getQueuedFiles()},getUploadingFiles:function(){return this.dropzone.getUploadingFiles()},getAddedFiles:function(){return this.dropzone.getAddedFiles()},getActiveFiles:function(){return this.dropzone.getActiveFiles()},getSignedAndUploadToS3:function b(a){var c=this,e=d.sendFile(a,this.awss3,this.isS3OverridesServerPropagation);this.isS3OverridesServerPropagation?e.then(function(){setTimeout(function(){return c.dropzone.processFile(a)})}):e.then(function(b){b.success?(a.s3ObjectLocation=b.message,setTimeout(function(){return c.dropzone.processFile(a)}),c.$emit('vdropzone-s3-upload-success',b.message)):'undefined'!==typeof b.message?c.$emit('vdropzone-s3-upload-error',b.message):c.$emit('vdropzone-s3-upload-error',"Network Error : Could not send request to AWS. (Maybe CORS error)")});e.catch(function(a){alert(a)})},setAWSSigningURL:function b(a){this.isS3&&(this.awss3.signingURL=a)}}};function g(a,b,c,d,e,f,g,i,j,k){typeof g!=='boolean'&&(j=i,i=g,g=!1);var l=typeof c==='function'?c.options:c;a&&a.render&&(l.render=a.render,l.staticRenderFns=a.staticRenderFns,l._compiled=!0,e&&(l.functional=!0));d&&(l._scopeId=d);var m;f?(m=function c(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext;!a&&typeof __VUE_SSR_CONTEXT__!=='undefined'&&(a=__VUE_SSR_CONTEXT__);b&&b.call(this,j(a));a&&a._registeredComponents&&a._registeredComponents.add(f)},l._ssrRegister=m):b&&(m=g?function(){b.call(this,k(this.$root.$options.shadowRoot))}:function(a){b.call(this,i(a))});if(m){if(l.functional){var n=l.render;l.render=function c(a,b){m.call(b);return n(a,b)}}else{var o=l.beforeCreate;l.beforeCreate=o?[].concat(o,m):[m]}}return c}var i=g,j=f,k=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c('div',{ref:"dropzoneElement",class:{'vue-dropzone dropzone':a.includeStyling},attrs:{"id":a.id}},[a.useCustomSlot?c('div',{staticClass:"dz-message"},[a._t("default",[a._v("Drop files here to upload")])],2):a._e()])},l=[],m=undefined,p=undefined,q=undefined,r=!1,s=i({render:k,staticRenderFns:l},m,j,p,r,q,undefined,undefined);return s}) |
@@ -9,44 +9,46 @@ { | ||
], | ||
"version": "3.5.2", | ||
"version": "3.5.3", | ||
"main": "./dist/vue2Dropzone.js", | ||
"repository": "git@github.com:rowanwins/vue-dropzone.git", | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.4", | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.2.0", | ||
"babel-loader": "^8.0.4", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"cross-env": "^5.1.3", | ||
"css-loader": "^0.28.10", | ||
"file-loader": "^0.11.2", | ||
"html-webpack-plugin": "^2.30.1", | ||
"less-loader": "^4.0.6", | ||
"marked": "^0.3.17", | ||
"prismjs": "^1.11.0", | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.46.0", | ||
"rollup-plugin-buble": "^0.15.0", | ||
"rollup-plugin-commonjs": "^8.4.1", | ||
"rollup-plugin-less": "^0.1.4", | ||
"rollup-plugin-node-resolve": "^3.0.3", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"rollup-plugin-vue": "^2.4.1", | ||
"serve": "^6.5.2", | ||
"cross-env": "^5.2.0", | ||
"css-loader": "^2.0.1", | ||
"file-loader": "^2.0.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"less-loader": "^4.1.0", | ||
"marked": "^0.5.2", | ||
"prismjs": "^1.15.0", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.68.0", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-butternut": "^0.1.0", | ||
"rollup-plugin-commonjs": "^9.2.0", | ||
"rollup-plugin-css-only": "^1.0.0", | ||
"rollup-plugin-less": "^0.1.5", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-vue": "^4.7.2", | ||
"serve": "^10.1.1", | ||
"uglifycss": "0.0.29", | ||
"vue": "^2.5.16", | ||
"vue-loader": "^13.7.1", | ||
"vue-router": "^2.7.0", | ||
"vue-style-loader": "^3.1.2", | ||
"vue-template-compiler": "^2.5.16", | ||
"webpack": "^3.11.0", | ||
"webpack-dev-server": "^2.11.2" | ||
"uglifyjs-webpack-plugin": "^2.0.1", | ||
"vue": "^2.5.21", | ||
"vue-loader": "^15.4.2", | ||
"vue-router": "^3.0.2", | ||
"vue-style-loader": "^4.1.2", | ||
"vue-template-compiler": "^2.5.21", | ||
"webpack": "^4.27.1", | ||
"webpack-cli": "^3.1.2", | ||
"webpack-dev-server": "^3.1.10" | ||
}, | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production rollup -c && npm run minify-css", | ||
"build-docs": "npm run clean-docs && cross-env NODE_ENV=production webpack --progress --hide-modules", | ||
"build": "cross-env NODE_ENV=production rollup -c", | ||
"build-docs": "npm run clean-docs && cross-env NODE_ENV=production webpack --mode production --progress --hide-modules", | ||
"clean-docs": "rimraf docs/dist", | ||
"dev": "rollup -c -w", | ||
"minify-css": "uglifycss dist/vue2Dropzone.css --output dist/vue2Dropzone.min.css", | ||
"prepublishOnly": "npm run build", | ||
"start": "cross-env NODE_ENV=development webpack-dev-server --open --hot" | ||
"start": "cross-env NODE_ENV=development webpack-dev-server --mode development --open --hot" | ||
}, | ||
@@ -57,4 +59,4 @@ "files": [ | ||
"dependencies": { | ||
"dropzone": "^5.5.0" | ||
"dropzone": "^5.5.1" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # vue-dropzone |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
78466
32
6
220
2
Updateddropzone@^5.5.1