sogo/UI/WebServerResources/js/vendor/angular-file-upload.min.js
2018-07-29 00:29:49 -04:00

2 lines
22 KiB
JavaScript

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