2 lines
21 KiB
JavaScript
2 lines
21 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";var d=function(a){return a&&a.__esModule?a["default"]:a},e=d(c(1)),f=d(c(2)),g=d(c(3)),h=d(c(4)),i=d(c(5)),j=d(c(6)),k=d(c(7)),l=d(c(8)),m=d(c(9)),n=d(c(10)),o=d(c(11)),p=d(c(12));angular.module(e.name,[]).value("fileUploaderOptions",f).factory("FileUploader",g).factory("FileLikeObject",h).factory("FileItem",i).factory("FileDirective",j).factory("FileSelect",k).factory("FileDrop",l).factory("FileOver",m).directive("nvFileSelect",n).directive("nvFileDrop",o).directive("nvFileOver",p).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver",function(a,b,c,d,e,f,g){a.FileLikeObject=b,a.FileItem=c,a.FileDirective=d,a.FileSelect=e,a.FileDrop=f,a.FileOver=g}])},function(a,b){a.exports={name:"angularFileUpload"}},function(a,b){"use strict";a.exports={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1}},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=(d(c(1)),angular.copy),h=angular.extend,i=angular.forEach,j=angular.isObject,k=angular.isNumber,l=angular.isDefined,m=angular.isArray,n=angular.element;a.exports=function(a,b,c,d,o,p){var q=d.File,r=d.FormData,s=function(){function d(b){f(this,d);var c=g(a);h(this,c,b,{isUploading:!1,_nextIndex:0,_failFilterIndex:-1,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return e(d,{addToQueue:{value:function(a,b,c){var d=this,e=this.isArrayLikeObject(a)?a:[a],f=this._getFilters(c),g=this.queue.length,h=[];i(e,function(a){var c=new o(a);if(d._isValidFile(c,f,b)){var e=new p(d,a,b);h.push(e),d.queue.push(e),d._onAfterAddingFile(e)}else{var g=f[d._failFilterIndex];d._onWhenAddingFileFailed(c,g,b)}}),this.queue.length!==g&&(this._onAfterAddingAll(h),this.progress=this._getTotalProgress()),this._render(),this.autoUpload&&this.uploadAll()}},removeFromQueue:{value: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()}},clearQueue:{value:function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}},uploadItem:{value:function(a){var b=this.getIndexOfItem(a),c=this.queue[b],d=this.isHTML5?"_xhrTransport":"_iframeTransport";c._prepareToUploading(),this.isUploading||(this.isUploading=!0,this[d](c))}},cancelItem:{value:function(a){var b=this.getIndexOfItem(a),c=this.queue[b],d=this.isHTML5?"_xhr":"_form";c&&c.isUploading&&c[d].abort()}},uploadAll:{value:function(){var a=this.getNotUploadedItems().filter(function(a){return!a.isUploading});a.length&&(i(a,function(a){return a._prepareToUploading()}),a[0].upload())}},cancelAll:{value:function(){var a=this.getNotUploadedItems();i(a,function(a){return a.cancel()})}},isFile:{value:function(a){return this.constructor.isFile(a)}},isFileLikeObject:{value:function(a){return this.constructor.isFileLikeObject(a)}},isArrayLikeObject:{value:function(a){return this.constructor.isArrayLikeObject(a)}},getIndexOfItem:{value:function(a){return k(a)?a:this.queue.indexOf(a)}},getNotUploadedItems:{value:function(){return this.queue.filter(function(a){return!a.isUploaded})}},getReadyItems:{value:function(){return this.queue.filter(function(a){return a.isReady&&!a.isUploading}).sort(function(a,b){return a.index-b.index})}},destroy:{value:function(){var a=this;i(this._directives,function(b){i(a._directives[b],function(a){a.destroy()})})}},onAfterAddingAll:{value:function(a){}},onAfterAddingFile:{value:function(a){}},onWhenAddingFileFailed:{value:function(a,b,c){}},onBeforeUploadItem:{value:function(a){}},onProgressItem:{value:function(a,b){}},onProgressAll:{value:function(a){}},onSuccessItem:{value:function(a,b,c,d){}},onErrorItem:{value:function(a,b,c,d){}},onCancelItem:{value:function(a,b,c,d){}},onCompleteItem:{value:function(a,b,c,d){}},onCompleteAll:{value:function(){}},_getTotalProgress:{value: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)}},_getFilters:{value:function(a){if(!a)return this.filters;if(m(a))return a;var b=a.match(/[^\s,]+/g);return this.filters.filter(function(a){return-1!==b.indexOf(a.name)})}},_render:{value:function(){b.$$phase||b.$apply()}},_folderFilter:{value:function(a){return!(!a.size&&!a.type)}},_queueLimitFilter:{value:function(){return this.queue.length<this.queueLimit}},_isValidFile:{value:function(a,b,c){var d=this;return this._failFilterIndex=-1,b.length?b.every(function(b){return d._failFilterIndex++,b.fn.call(d,a,c)}):!0}},_isSuccessCode:{value:function(a){return a>=200&&300>a||304===a}},_transformResponse:{value:function(a,b){var d=this._headersGetter(b);return i(c.defaults.transformResponse,function(b){a=b(a,d)}),a}},_parseHeaders:{value:function(a){var b,c,d,e={};return a?(i(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}},_headersGetter:{value:function(a){return function(b){return b?a[b.toLowerCase()]||null:a}}},_xhrTransport:{value:function(a){var b=this,c=a._xhr=new XMLHttpRequest,d=new r;if(this._onBeforeUploadItem(a),i(a.formData,function(a){i(a,function(a,b){d.append(b,a)})}),"number"!=typeof a._file.size)throw new TypeError("The file specified is no longer valid");d.append(a.alias,a._file,a.file.name),c.upload.onprogress=function(c){var d=Math.round(c.lengthComputable?100*c.loaded/c.total:0);b._onProgressItem(a,d)},c.onload=function(){var d=b._parseHeaders(c.getAllResponseHeaders()),e=b._transformResponse(c.response,d),f=b._isSuccessCode(c.status)?"Success":"Error",g="_on"+f+"Item";b[g](a,e,c.status,d),b._onCompleteItem(a,e,c.status,d)},c.onerror=function(){var d=b._parseHeaders(c.getAllResponseHeaders()),e=b._transformResponse(c.response,d);b._onErrorItem(a,e,c.status,d),b._onCompleteItem(a,e,c.status,d)},c.onabort=function(){var d=b._parseHeaders(c.getAllResponseHeaders()),e=b._transformResponse(c.response,d);b._onCancelItem(a,e,c.status,d),b._onCompleteItem(a,e,c.status,d)},c.open(a.method,a.url,!0),c.withCredentials=a.withCredentials,i(a.headers,function(a,b){c.setRequestHeader(b,a)}),c.send(d),this._render()}},_iframeTransport:{value:function(a){var b=this,c=n('<form style="display: none;" />'),d=n('<iframe name="iframeTransport'+Date.now()+'">'),e=a._input;a._form&&a._form.replaceWith(e),a._form=c,this._onBeforeUploadItem(a),e.prop("name",a.alias),i(a.formData,function(a){i(a,function(a,b){var d=n('<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(f){e=500}var g={response:c,status:e,dummy:!0},h={},i=b._transformResponse(g.response,h);b._onSuccessItem(a,i,g.status,h),b._onCompleteItem(a,i,g.status,h)}),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(),this._render()}},_onWhenAddingFileFailed:{value:function(a,b,c){this.onWhenAddingFileFailed(a,b,c)}},_onAfterAddingFile:{value:function(a){this.onAfterAddingFile(a)}},_onAfterAddingAll:{value:function(a){this.onAfterAddingAll(a)}},_onBeforeUploadItem:{value:function(a){a._onBeforeUpload(),this.onBeforeUploadItem(a)}},_onProgressItem:{value:function(a,b){var c=this._getTotalProgress(b);this.progress=c,a._onProgress(b),this.onProgressItem(a,b),this.onProgressAll(c),this._render()}},_onSuccessItem:{value:function(a,b,c,d){a._onSuccess(b,c,d),this.onSuccessItem(a,b,c,d)}},_onErrorItem:{value:function(a,b,c,d){a._onError(b,c,d),this.onErrorItem(a,b,c,d)}},_onCancelItem:{value:function(a,b,c,d){a._onCancel(b,c,d),this.onCancelItem(a,b,c,d)}},_onCompleteItem:{value: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,l(e)?void e.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),void this._render())}}},{isFile:{value:function(a){return q&&a instanceof q}},isFileLikeObject:{value:function(a){return a instanceof o}},isArrayLikeObject:{value:function(a){return j(a)&&"length"in a}},inherit:{value:function(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.super_=b}}}),d}();return s.prototype.isHTML5=!(!q||!r),s.isHTML5=s.prototype.isHTML5,s},a.exports.$inject=["fileUploaderOptions","$rootScope","$http","$window","FileLikeObject","FileItem"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=(d(c(1)),angular.copy),h=angular.isElement,i=angular.isString;a.exports=function(){var a=function(){function a(b){f(this,a);var c=h(b),d=c?b.value:b,e=i(d)?"FakePath":"Object",g="_createFrom"+e;this[g](d)}return e(a,{_createFromFakePath:{value: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)}},_createFromObject:{value:function(a){this.lastModifiedDate=g(a.lastModifiedDate),this.size=a.size,this.type=a.type,this.name=a.name}}}),a}();return a},a.exports.$inject=[]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=(d(c(1)),angular.copy),h=angular.extend,i=angular.element,j=angular.isElement;a.exports=function(a,b){var c=function(){function c(a,d,e){f(this,c);var k=j(d),l=k?i(d):null,m=k?null:d;h(this,{url:a.url,alias:a.alias,headers:g(a.headers),formData:g(a.formData),removeAfterUpload:a.removeAfterUpload,withCredentials:a.withCredentials,method:a.method},e,{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:l}),l&&this._replaceNode(l)}return e(c,{upload:{value:function(){try{this.uploader.uploadItem(this)}catch(a){this.uploader._onCompleteItem(this,"",0,[]),this.uploader._onErrorItem(this,"",0,[])}}},cancel:{value:function(){this.uploader.cancelItem(this)}},remove:{value:function(){this.uploader.removeFromQueue(this)}},onBeforeUpload:{value:function(){}},onProgress:{value:function(a){}},onSuccess:{value:function(a,b,c){}},onError:{value:function(a,b,c){}},onCancel:{value:function(a,b,c){}},onComplete:{value:function(a,b,c){}},_onBeforeUpload:{value:function(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}},_onProgress:{value:function(a){this.progress=a,this.onProgress(a)}},_onSuccess:{value: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)}},_onError:{value: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)}},_onCancel:{value: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)}},_onComplete:{value:function(a,b,c){this.onComplete(a,b,c),this.removeAfterUpload&&this.remove()}},_destroy:{value:function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input}},_prepareToUploading:{value:function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},_replaceNode:{value:function(b){var c=a(b.clone())(b.scope());c.prop("value",null),b.css("display","none"),b.after(c)}}}),c}();return c},a.exports.$inject=["$compile","FileLikeObject"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=(d(c(1)),angular.extend);a.exports=function(){var a=function(){function a(b){f(this,a),g(this,b),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return e(a,{bind:{value:function(){for(var a in this.events){var b=this.events[a];this.element.bind(a,this[b])}}},unbind:{value:function(){for(var a in this.events)this.element.unbind(a,this.events[a])}},destroy:{value:function(){var a=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(a,1),this.unbind()}},_saveLinks:{value:function(){for(var a in this.events){var b=this.events[a];this[b]=this[b].bind(this)}}}}),a}();return a.prototype.events={},a},a.exports.$inject=[]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function j(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:j(e,b,c)}if("value"in d&&d.writable)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},g=function(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&&(a.__proto__=b)},h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},i=(d(c(1)),angular.extend);a.exports=function(a){var b=function(a){function b(a){h(this,b);var c=i(a,{events:{$destroy:"destroy",change:"onChange"},prop:"select"});f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,c),this.uploader.isHTML5||this.element.removeAttr("multiple"),this.element.prop("value",null)}return g(b,a),e(b,{getOptions:{value:function(){}},getFilters:{value:function(){}},isEmptyAfterSelection:{value:function(){return!!this.element.attr("multiple")}},onChange:{value:function(){var a=this.uploader.isHTML5?this.element[0].files:this.element[0],b=this.getOptions(),c=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(a,b,c),this.isEmptyAfterSelection()&&(this.element.prop("value",null),this.element.replaceWith(this.element=this.element.clone(!0)))}}}),b}(a);return b},a.exports.$inject=["FileDirective"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function k(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:k(e,b,c)}if("value"in d&&d.writable)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},g=function(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&&(a.__proto__=b)},h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},i=(d(c(1)),angular.extend),j=angular.forEach;a.exports=function(a){var b=function(a){function b(a){h(this,b);var c=i(a,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,c)}return g(b,a),e(b,{getOptions:{value:function(){}},getFilters:{value:function(){}},onDrop:{value:function(a){var b=this._getTransfer(a);if(b){var c=this.getOptions(),d=this.getFilters();this._preventAndStop(a),j(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(b.files,c,d)}}},onDragOver:{value:function(a){var b=this._getTransfer(a);this._haveFiles(b.types)&&(b.dropEffect="copy",this._preventAndStop(a),j(this.uploader._directives.over,this._addOverClass,this))}},onDragLeave:{value:function(a){a.currentTarget!==this.element[0]&&(this._preventAndStop(a),j(this.uploader._directives.over,this._removeOverClass,this))}},_getTransfer:{value:function(a){return a.dataTransfer?a.dataTransfer:a.originalEvent.dataTransfer}},_preventAndStop:{value:function(a){a.preventDefault(),a.stopPropagation()}},_haveFiles:{value:function(a){return a?a.indexOf?-1!==a.indexOf("Files"):a.contains?a.contains("Files"):!1:!1}},_addOverClass:{value:function(a){a.addOverClass()}},_removeOverClass:{value:function(a){a.removeOverClass()}}}),b}(a);return b},a.exports.$inject=["FileDirective"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a},e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function j(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:j(e,b,c)}if("value"in d&&d.writable)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},g=function(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&&(a.__proto__=b)},h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},i=(d(c(1)),angular.extend);a.exports=function(a){var b=function(a){function b(a){h(this,b);var c=i(a,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,c)}return g(b,a),e(b,{addOverClass:{value:function(){this.element.addClass(this.getOverClass())}},removeOverClass:{value:function(){this.element.removeClass(this.getOverClass())}},getOverClass:{value:function(){return this.overClass}}}),b}(a);return b},a.exports.$inject=["FileDirective"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a};d(c(1));a.exports=function(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});h.getOptions=a(f.options).bind(h,d),h.getFilters=function(){return f.filters}}}},a.exports.$inject=["$parse","FileUploader","FileSelect"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a};d(c(1));a.exports=function(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}}}}},a.exports.$inject=["$parse","FileUploader","FileDrop"]},function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a["default"]:a};d(c(1));a.exports=function(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}}}},a.exports.$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}angular.module("angularFileUpload").decorator("FileUploader",a),a.$inject=["$delegate","$cookies"]}();
|
|
//# sourceMappingURL=angular-file-upload.min.js.map
|