sogo/UI/WebServerResources/js/vendor/angular-file-upload.min.js
2016-11-30 02:47:47 -05:00

2 lines
23 KiB
JavaScript

!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports["angular-file-upload"]=b():a["angular-file-upload"]=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=c(1),f=d(e),g=c(2),h=d(g),i=c(3),j=d(i),k=c(4),l=d(k),m=c(5),n=d(m),o=c(6),p=d(o),q=c(7),r=d(q),s=c(8),t=d(s),u=c(9),v=d(u),w=c(10),x=d(w),y=c(11),z=d(y),A=c(12),B=d(A),C=c(13),D=d(C);angular.module(f.default.name,[]).value("fileUploaderOptions",h.default).factory("FileUploader",j.default).factory("FileLikeObject",l.default).factory("FileItem",n.default).factory("FileDirective",p.default).factory("FileSelect",r.default).factory("FileDrop",v.default).factory("FileOver",x.default).factory("Pipeline",t.default).directive("nvFileSelect",z.default).directive("nvFileDrop",B.default).directive("nvFileOver",D.default).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","Pipeline",function(a,b,c,d,e,f,g,h){a.FileLikeObject=b,a.FileItem=c,a.FileDirective=d,a.FileSelect=e,a.FileDrop=f,a.FileOver=g,a.Pipeline=h}])},function(a,b){a.exports={name:"angularFileUpload"}},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1,disableMultipart:!1}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d,f,h,i,t){var u=d.File,v=d.FormData,w=function(){function d(b){e(this,d);var c=k(a);l(this,c,b,{isUploading:!1,_nextIndex:0,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return d.prototype.addToQueue=function(a,b,c){var d=this,e=this.isArrayLikeObject(a)?Array.prototype.slice.call(a):[a],f=this._getFilters(c),j=this.queue.length,k=[],l=function a(){var c=e.shift();if(r(c))return m();var j=d.isFile(c)?c:new h(c),l=d._convertFiltersToPipes(f),n=new t(l),o=function(b){var c=b.pipe.originalFilter,e=g(b.args,2),f=e[0],h=e[1];d._onWhenAddingFileFailed(f,c,h),a()},p=function(b,c){var e=new i(d,b,c);k.push(e),d.queue.push(e),d._onAfterAddingFile(e),a()};n.onThrown=o,n.onSuccessful=p,n.exec(j,b)},m=function(){d.queue.length!==j&&(d._onAfterAddingAll(k),d.progress=d._getTotalProgress()),d._render(),d.autoUpload&&d.uploadAll()};l()},d.prototype.removeFromQueue=function(a){var b=this.getIndexOfItem(a),c=this.queue[b];c.isUploading&&c.cancel(),this.queue.splice(b,1),c._destroy(),this.progress=this._getTotalProgress()},d.prototype.clearQueue=function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0},d.prototype.uploadItem=function(a){var b=this.getIndexOfItem(a),c=this.queue[b],d=this.isHTML5?"_xhrTransport":"_iframeTransport";c._prepareToUploading(),this.isUploading||(this._onBeforeUploadItem(c),c.isCancel||(c.isUploading=!0,this.isUploading=!0,this[d](c),this._render()))},d.prototype.cancelItem=function(a){var b=this,c=this.getIndexOfItem(a),d=this.queue[c],e=this.isHTML5?"_xhr":"_form";d&&(d.isCancel=!0,d.isUploading?d[e].abort():!function(){var a=[void 0,0,{}],c=function(){b._onCancelItem.apply(b,[d].concat(a)),b._onCompleteItem.apply(b,[d].concat(a))};f(c)}())},d.prototype.uploadAll=function(){var a=this.getNotUploadedItems().filter(function(a){return!a.isUploading});a.length&&(m(a,function(a){return a._prepareToUploading()}),a[0].upload())},d.prototype.cancelAll=function(){var a=this.getNotUploadedItems();m(a,function(a){return a.cancel()})},d.prototype.isFile=function(a){return this.constructor.isFile(a)},d.prototype.isFileLikeObject=function(a){return this.constructor.isFileLikeObject(a)},d.prototype.isArrayLikeObject=function(a){return this.constructor.isArrayLikeObject(a)},d.prototype.getIndexOfItem=function(a){return o(a)?a:this.queue.indexOf(a)},d.prototype.getNotUploadedItems=function(){return this.queue.filter(function(a){return!a.isUploaded})},d.prototype.getReadyItems=function(){return this.queue.filter(function(a){return a.isReady&&!a.isUploading}).sort(function(a,b){return a.index-b.index})},d.prototype.destroy=function(){var a=this;m(this._directives,function(b){m(a._directives[b],function(a){a.destroy()})})},d.prototype.onAfterAddingAll=function(a){},d.prototype.onAfterAddingFile=function(a){},d.prototype.onWhenAddingFileFailed=function(a,b,c){},d.prototype.onBeforeUploadItem=function(a){},d.prototype.onProgressItem=function(a,b){},d.prototype.onProgressAll=function(a){},d.prototype.onSuccessItem=function(a,b,c,d){},d.prototype.onErrorItem=function(a,b,c,d){},d.prototype.onCancelItem=function(a,b,c,d){},d.prototype.onCompleteItem=function(a,b,c,d){},d.prototype.onCompleteAll=function(){},d.prototype._getTotalProgress=function(a){if(this.removeAfterUpload)return a||0;var b=this.getNotUploadedItems().length,c=b?this.queue.length-b:this.queue.length,d=100/this.queue.length,e=(a||0)*d/100;return Math.round(c*d+e)},d.prototype._getFilters=function(a){if(!a)return this.filters;if(q(a))return a;var b=a.match(/[^\s,]+/g);return this.filters.filter(function(a){return b.indexOf(a.name)!==-1})},d.prototype._convertFiltersToPipes=function(a){var b=this;return a.map(function(a){var c=j(b,a.fn);return c.isAsync=3===a.fn.length,c.originalFilter=a,c})},d.prototype._render=function(){b.$$phase||b.$apply()},d.prototype._folderFilter=function(a){return!(!a.size&&!a.type)},d.prototype._queueLimitFilter=function(){return this.queue.length<this.queueLimit},d.prototype._isSuccessCode=function(a){return a>=200&&a<300||304===a},d.prototype._transformResponse=function(a,b){var d=this._headersGetter(b);return m(c.defaults.transformResponse,function(b){a=b(a,d)}),a},d.prototype._parseHeaders=function(a){var b,c,d,e={};return a?(m(a.split("\n"),function(a){d=a.indexOf(":"),b=a.slice(0,d).trim().toLowerCase(),c=a.slice(d+1).trim(),b&&(e[b]=e[b]?e[b]+", "+c:c)}),e):e},d.prototype._headersGetter=function(a){return function(b){return b?a[b.toLowerCase()]||null:a}},d.prototype._xhrTransport=function(a){var b,c=this,d=a._xhr=new XMLHttpRequest;if(a.disableMultipart?b=a._file:(b=new v,m(a.formData,function(a){m(a,function(a,c){b.append(c,a)})}),b.append(a.alias,a._file,a.file.name)),"number"!=typeof a._file.size)throw new TypeError("The file specified is no longer valid");d.upload.onprogress=function(b){var d=Math.round(b.lengthComputable?100*b.loaded/b.total:0);c._onProgressItem(a,d)},d.onload=function(){var b=c._parseHeaders(d.getAllResponseHeaders()),e=c._transformResponse(d.response,b),f=c._isSuccessCode(d.status)?"Success":"Error",g="_on"+f+"Item";c[g](a,e,d.status,b),c._onCompleteItem(a,e,d.status,b)},d.onerror=function(){var b=c._parseHeaders(d.getAllResponseHeaders()),e=c._transformResponse(d.response,b);c._onErrorItem(a,e,d.status,b),c._onCompleteItem(a,e,d.status,b)},d.onabort=function(){var b=c._parseHeaders(d.getAllResponseHeaders()),e=c._transformResponse(d.response,b);c._onCancelItem(a,e,d.status,b),c._onCompleteItem(a,e,d.status,b)},d.open(a.method,a.url,!0),d.withCredentials=a.withCredentials,m(a.headers,function(a,b){d.setRequestHeader(b,a)}),d.send(b)},d.prototype._iframeTransport=function(a){var b=this,c=s('<form style="display: none;" />'),d=s('<iframe name="iframeTransport'+Date.now()+'">'),e=a._input;a._form&&a._form.replaceWith(e),a._form=c,e.prop("name",a.alias),m(a.formData,function(a){m(a,function(a,b){var d=s('<input type="hidden" name="'+b+'" />');d.val(a),c.append(d)})}),c.prop({action:a.url,method:"POST",target:d.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),d.bind("load",function(){var c="",e=200;try{c=d[0].contentDocument.body.innerHTML}catch(a){e=500}var f={response:c,status:e,dummy:!0},g={},h=b._transformResponse(f.response,g);b._onSuccessItem(a,h,f.status,g),b._onCompleteItem(a,h,f.status,g)}),c.abort=function(){var f,g={status:0,dummy:!0},h={};d.unbind("load").prop("src","javascript:false;"),c.replaceWith(e),b._onCancelItem(a,f,g.status,h),b._onCompleteItem(a,f,g.status,h)},e.after(c),c.append(e).append(d),c[0].submit()},d.prototype._onWhenAddingFileFailed=function(a,b,c){this.onWhenAddingFileFailed(a,b,c)},d.prototype._onAfterAddingFile=function(a){this.onAfterAddingFile(a)},d.prototype._onAfterAddingAll=function(a){this.onAfterAddingAll(a)},d.prototype._onBeforeUploadItem=function(a){a._onBeforeUpload(),this.onBeforeUploadItem(a)},d.prototype._onProgressItem=function(a,b){var c=this._getTotalProgress(b);this.progress=c,a._onProgress(b),this.onProgressItem(a,b),this.onProgressAll(c),this._render()},d.prototype._onSuccessItem=function(a,b,c,d){a._onSuccess(b,c,d),this.onSuccessItem(a,b,c,d)},d.prototype._onErrorItem=function(a,b,c,d){a._onError(b,c,d),this.onErrorItem(a,b,c,d)},d.prototype._onCancelItem=function(a,b,c,d){a._onCancel(b,c,d),this.onCancelItem(a,b,c,d)},d.prototype._onCompleteItem=function(a,b,c,d){a._onComplete(b,c,d),this.onCompleteItem(a,b,c,d);var e=this.getReadyItems()[0];return this.isUploading=!1,p(e)?void e.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),void this._render())},d.isFile=function(a){return u&&a instanceof u},d.isFileLikeObject=function(a){return a instanceof h},d.isArrayLikeObject=function(a){return n(a)&&"length"in a},d.inherit=function(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.super_=b},d}();return w.prototype.isHTML5=!(!u||!v),w.isHTML5=w.prototype.isHTML5,w}Object.defineProperty(b,"__esModule",{value:!0});var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b.default=f;var h=c(1),i=(d(h),angular),j=i.bind,k=i.copy,l=i.extend,m=i.forEach,n=i.isObject,o=i.isNumber,p=i.isDefined,q=i.isArray,r=i.isUndefined,s=i.element;f.$inject=["fileUploaderOptions","$rootScope","$http","$window","$timeout","FileLikeObject","FileItem","Pipeline"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(){return function(){function a(b){e(this,a);var c=j(b),d=c?b.value:b,f=k(d)?"FakePath":"Object",g="_createFrom"+f;this[g](d)}return a.prototype._createFromFakePath=function(a){this.lastModifiedDate=null,this.size=null,this.type="like/"+a.slice(a.lastIndexOf(".")+1).toLowerCase(),this.name=a.slice(a.lastIndexOf("/")+a.lastIndexOf("\\")+2)},a.prototype._createFromObject=function(a){this.lastModifiedDate=i(a.lastModifiedDate),this.size=a.size,this.type=a.type,this.name=a.name},a}()}Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var g=c(1),h=(d(g),angular),i=h.copy,j=h.isElement,k=h.isString},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){return function(){function c(a,d,f){e(this,c);var g=l(d),h=g?k(d):null,m=g?null:d;j(this,{url:a.url,alias:a.alias,headers:i(a.headers),formData:i(a.formData),removeAfterUpload:a.removeAfterUpload,withCredentials:a.withCredentials,disableMultipart:a.disableMultipart,method:a.method},f,{uploader:a,file:new b(d),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:m,_input:h}),h&&this._replaceNode(h)}return c.prototype.upload=function(){try{this.uploader.uploadItem(this)}catch(a){this.uploader._onCompleteItem(this,"",0,[]),this.uploader._onErrorItem(this,"",0,[])}},c.prototype.cancel=function(){this.uploader.cancelItem(this)},c.prototype.remove=function(){this.uploader.removeFromQueue(this)},c.prototype.onBeforeUpload=function(){},c.prototype.onProgress=function(a){},c.prototype.onSuccess=function(a,b,c){},c.prototype.onError=function(a,b,c){},c.prototype.onCancel=function(a,b,c){},c.prototype.onComplete=function(a,b,c){},c.prototype._onBeforeUpload=function(){this.isReady=!0,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()},c.prototype._onProgress=function(a){this.progress=a,this.onProgress(a)},c.prototype._onSuccess=function(a,b,c){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(a,b,c)},c.prototype._onError=function(a,b,c){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(a,b,c)},c.prototype._onCancel=function(a,b,c){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(a,b,c)},c.prototype._onComplete=function(a,b,c){this.onComplete(a,b,c),this.removeAfterUpload&&this.remove()},c.prototype._destroy=function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input},c.prototype._prepareToUploading=function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0},c.prototype._replaceNode=function(b){var c=a(b.clone())(b.scope());c.prop("value",null),b.css("display","none"),b.after(c)},c}()}Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var g=c(1),h=(d(g),angular),i=h.copy,j=h.extend,k=h.element,l=h.isElement;f.$inject=["$compile","FileLikeObject"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(){var a=function(){function a(b){e(this,a),i(this,b),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return a.prototype.bind=function(){for(var a in this.events){var b=this.events[a];this.element.bind(a,this[b])}},a.prototype.unbind=function(){for(var a in this.events)this.element.unbind(a,this.events[a])},a.prototype.destroy=function(){var a=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(a,1),this.unbind()},a.prototype._saveLinks=function(){for(var a in this.events){var b=this.events[a];this[b]=this[b].bind(this)}},a}();return a.prototype.events={},a}Object.defineProperty(b,"__esModule",{value:!0}),b.default=f;var g=c(1),h=(d(g),angular),i=h.extend},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)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 h(a,b){return function(b){function c(a){e(this,c);var d=k(a,{events:{$destroy:"destroy",change:"onChange"},prop:"select"}),g=f(this,b.call(this,d));return g.uploader.isHTML5||g.element.removeAttr("multiple"),g.element.prop("value",null),g}return g(c,b),c.prototype.getOptions=function(){},c.prototype.getFilters=function(){},c.prototype.isEmptyAfterSelection=function(){return!!this.element.attr("multiple")},c.prototype.onChange=function(){var b=this.uploader.isHTML5?this.element[0].files:this.element[0],c=this.getOptions(),d=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(b,c,d),this.isEmptyAfterSelection()&&(this.element.prop("value",null),this.element.replaceWith(a(this.element.clone())(this.scope)))},c}(b)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var i=c(1),j=(d(i),angular),k=j.extend;h.$inject=["$compile","FileDirective"]},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a){return function(){function b(){var a=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];d(this,b),this.pipes=a}return b.prototype.next=function(b){var d=this.pipes.shift();if(h(d))return void this.onSuccessful.apply(this,c(b));var e=new Error("The filter has not passed");if(e.pipe=d,e.args=b,d.isAsync){var f=a.defer(),i=g(this,this.next,b),j=g(this,this.onThrown,e);f.promise.then(i,j),d.apply(void 0,c(b).concat([f]))}else{var k=Boolean(d.apply(void 0,c(b)));k?this.next(b):this.onThrown(e)}},b.prototype.exec=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];this.next(b)},b.prototype.onThrown=function(a){},b.prototype.onSuccessful=function(){},b}()}Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var f=angular,g=f.bind,h=f.isUndefined;e.$inject=["$q"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)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 h(a){return function(a){function b(c){e(this,b);var d=k(c,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});return f(this,a.call(this,d))}return g(b,a),b.prototype.getOptions=function(){},b.prototype.getFilters=function(){},b.prototype.onDrop=function(a){var b=this._getTransfer(a);if(b){var c=this.getOptions(),d=this.getFilters();this._preventAndStop(a),l(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(b.files,c,d)}},b.prototype.onDragOver=function(a){var b=this._getTransfer(a);this._haveFiles(b.types)&&(b.dropEffect="copy",this._preventAndStop(a),l(this.uploader._directives.over,this._addOverClass,this))},b.prototype.onDragLeave=function(a){a.currentTarget!==this.element[0]&&(this._preventAndStop(a),l(this.uploader._directives.over,this._removeOverClass,this))},b.prototype._getTransfer=function(a){return a.dataTransfer?a.dataTransfer:a.originalEvent.dataTransfer},b.prototype._preventAndStop=function(a){a.preventDefault(),a.stopPropagation()},b.prototype._haveFiles=function(a){return!!a&&(a.indexOf?a.indexOf("Files")!==-1:!!a.contains&&a.contains("Files"))},b.prototype._addOverClass=function(a){a.addOverClass()},b.prototype._removeOverClass=function(a){a.removeOverClass()},b}(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var i=c(1),j=(d(i),angular),k=j.extend,l=j.forEach;h.$inject=["FileDirective"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)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 h(a){return function(a){function b(c){e(this,b);var d=k(c,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});return f(this,a.call(this,d))}return g(b,a),b.prototype.addOverClass=function(){this.element.addClass(this.getOverClass())},b.prototype.removeOverClass=function(){this.element.removeClass(this.getOverClass())},b.prototype.getOverClass=function(){return this.overClass},b}(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=h;var i=c(1),j=(d(i),angular),k=j.extend;h.$inject=["FileDirective"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return{link:function(d,e,f){var g=d.$eval(f.uploader);if(!(g instanceof b))throw new TypeError('"Uploader" must be an instance of FileUploader');var h=new c({uploader:g,element:e,scope:d});h.getOptions=a(f.options).bind(h,d),h.getFilters=function(){return f.filters}}}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var f=c(1);d(f);e.$inject=["$parse","FileUploader","FileSelect"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return{link:function(d,e,f){var g=d.$eval(f.uploader);if(!(g instanceof b))throw new TypeError('"Uploader" must be an instance of FileUploader');if(g.isHTML5){var h=new c({uploader:g,element:e});h.getOptions=a(f.options).bind(h,d),h.getFilters=function(){return f.filters}}}}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var f=c(1);d(f);e.$inject=["$parse","FileUploader","FileDrop"]},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){return{link:function(c,d,e){var f=c.$eval(e.uploader);if(!(f instanceof a))throw new TypeError('"Uploader" must be an instance of FileUploader');var g=new b({uploader:f,element:d});g.getOverClass=function(){return e.overClass||g.overClass}}}}Object.defineProperty(b,"__esModule",{value:!0}),b.default=e;var f=c(1);d(f);e.$inject=["FileUploader","FileOver"]}])}),function(){"use strict";function a(a,b){return a.prototype.onBeforeUploadItem=function(a){var c=b.get("XSRF-TOKEN");c&&(a.headers={"X-XSRF-TOKEN":c})},a}function b(a,b){return a.prototype.onDragOver=function(a){var c=this._getTransfer(a);this._haveFiles(c.types)&&(c.dropEffect="copy",this._preventAndStop(a),angular.forEach(this.uploader._directives.over,this._addOverClass,this),b.cancel(this.onDragLeaveTimer))},a.prototype.onDragLeave=function(a){var c=this;b.cancel(this.onDragLeaveTimer),this.onDragLeaveTimer=b(function(){c._preventAndStop(a),angular.forEach(c.uploader._directives.over,c._removeOverClass,c)},50)},a}angular.module("angularFileUpload").decorator("FileUploader",a).decorator("FileDrop",b),a.$inject=["$delegate","$cookies"],b.$inject=["$delegate","$timeout"]}();
//# sourceMappingURL=angular-file-upload.min.js.map