Comparing version 0.0.5 to 0.0.6
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("axios"),require("PropTypes"),require("TinperBee"),require("React")):"function"==typeof define&&define.amd?define(["axios","PropTypes","TinperBee","React"],e):"object"==typeof exports?exports["ac-upload"]=e(require("axios"),require("PropTypes"),require("TinperBee"),require("React")):t["ac-upload"]=e(t.axios,t.PropTypes,t.TinperBee,t.React)}(window,function(t,e,n,r){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=102)}([function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(39)("wks"),o=n(38),i=n(1).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(1),o=n(0),i=n(9),a=n(8),u=n(11),c=function(t,e,n){var s,f,l,p=t&c.F,h=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,m=t&c.W,g=h?o:o[e]||(o[e]={}),x=g.prototype,w=h?r:d?r[e]:(r[e]||{}).prototype;for(s in h&&(n=e),n)(f=!p&&w&&void 0!==w[s])&&u(g,s)||(l=f?w[s]:n[s],g[s]=h&&"function"!=typeof w[s]?n[s]:y&&f?i(l,r):m&&w[s]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[s]=l,t&c.R&&x&&!x[s]&&a(x,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(4),o=n(42),i=n(41),a=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(7),o=n(14);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(15);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports={}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(92),o=n(24);t.exports=function(t){return r(o(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(15);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){var r=n(24);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(7).f,o=n(11),i=n(2)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(39)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(25),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(4),o=n(6),i=n(16);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r,o,i,a=n(9),u=n(77),c=n(36),s=n(21),f=n(1),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},x=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){u("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n(12)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=x,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){var r=n(4),o=n(15),i=n(2)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){var r=n(12),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(31),o=n(2)("iterator"),i=n(10);t.exports=n(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(10),o=n(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(11),o=n(17),i=n(19)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(0),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(23)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(4),o=n(95),i=n(37),a=n(19)("IE_PROTO"),u=function(){},c=function(){var t,e=n(21)("iframe"),r=i.length;for(e.style.display="none",n(36).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=!n(5)&&!n(22)(function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(23),o=n(3),i=n(97),a=n(8),u=n(10),c=n(96),s=n(18),f=n(35),l=n(2)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var g,x,w,_=function(t){if(!p&&t in L)return L[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},b=e+" Iterator",E="values"==v,O=!1,L=t.prototype,j=L[l]||L["@@iterator"]||v&&L[v],S=j||_(v),P=v?E?_("entries"):S:void 0,T="Array"==e&&L.entries||j;if(T&&(w=f(T.call(new t)))!==Object.prototype&&w.next&&(s(w,b,!0),r||"function"==typeof w[l]||a(w,l,h)),E&&j&&"values"!==j.name&&(O=!0,S=function(){return j.call(this)}),r&&!m||!p&&!O&&L[l]||a(L,l,S),u[e]=S,u[b]=h,v)if(g={values:E?S:_("values"),keys:y?S:_("keys"),entries:P},m)for(x in g)x in L||i(L,x,g[x]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){"use strict";var r=n(98)(!0);n(43)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},,function(t,e,n){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.bytesToSize=function(t){if(0===t)return"0 B";var e=Math.floor(Math.log(t)/Math.log(1e3));return(t/Math.pow(1e3,e)).toPrecision(3)+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e,n){var r=n(3),o=n(0),i=n(22);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(17),o=n(35);n(52)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){n(53),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){t.exports={default:n(54),__esModule:!0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",s="object"==typeof t,f=e.regeneratorRuntime;if(f)s&&(t.exports=f);else{(f=e.regeneratorRuntime=s?t.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",v={},y={};y[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(k([])));g&&g!==r&&o.call(g,a)&&(y=g);var x=O.prototype=b.prototype=Object.create(y);E.prototype=x.constructor=O,O.constructor=E,O[c]=E.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},f.awrap=function(t){return{__await:t}},L(j.prototype),j.prototype[u]=function(){return this},f.AsyncIterator=j,f.async=function(t,e,n,r){var o=new j(w(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(x),x[c]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=k,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return F()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=_(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function b(){}function E(){}function O(){}function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function j(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var u=_(t[n],t,r);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(s).then(function(t){c.value=t,i(c)},a)}a(u.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function S(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,S(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:F}}function F(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(56),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e,n){t.exports=n(57)},function(t,e,n){var r=n(3);r(r.S,"Object",{create:n(40)})},function(t,e,n){n(59);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){t.exports={default:n(60),__esModule:!0}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(62),o=n(14),i=n(13),a=n(41),u=n(11),c=n(42),s=Object.getOwnPropertyDescriptor;e.f=n(5)?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(6),o=n(4),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(9)(Function.call,n(63).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(3);r(r.S,"Object",{setPrototypeOf:n(64).set})},function(t,e,n){n(65),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){t.exports={default:n(66),__esModule:!0}},function(t,e,n){var r=n(3);r(r.S+r.F*!n(5),"Object",{defineProperty:n(7).f})},function(t,e,n){n(68);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){t.exports={default:n(69),__esModule:!0}},function(t,e,n){"use strict";var r=n(3),o=n(16),i=n(27);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var r=n(3),o=n(0),i=n(1),a=n(29),u=n(26);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(1),o=n(0),i=n(7),a=n(5),u=n(2)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(8);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(1),o=n(28).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(12)(a);t.exports=function(){var t,e,n,s=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(9),o=n(34),i=n(33),a=n(4),u=n(20),c=n(32),s={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,v,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=u(t.length);h>x;x++)if((y=e?g(a(d=t[x])[0],d[1]):g(t[x]))===s||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===s||y===f)return y}).BREAK=s,e.RETURN=f},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var r,o,i,a,u=n(23),c=n(1),s=n(9),f=n(31),l=n(3),p=n(6),h=n(15),d=n(79),v=n(78),y=n(29),m=n(28).set,g=n(76)(),x=n(16),w=n(27),_=n(75),b=n(26),E=c.TypeError,O=c.process,L=O&&O.versions,j=L&&L.v8||"",S=c.Promise,P="process"==f(O),T=function(){},M=o=x.f,k=!!function(){try{var t=S.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(T,T)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==j.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),F=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},A=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,u=o?e.ok:e.fail,c=e.resolve,s=e.reject,f=e.domain;try{u?(o||(2==t._h&&C(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),a=!0)),n===e.promise?s(E("Promise-chain cycle")):(i=F(n))?i.call(n,c,s):c(n)):s(r)}catch(t){f&&!a&&f.exit(),s(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&N(t)})}},N=function(t){m.call(c,function(){var e,n,r,o=t._v,i=R(t);if(i&&(e=w(function(){P?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=P||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){m.call(c,function(){var e;P?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),A(e,!0))},G=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw E("Promise can't be resolved itself");(e=F(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,s(G,r,1),s(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,A(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};k||(S=function(t){d(this,S,"Promise","_h"),h(t),r.call(this);try{t(s(G,this,1),s(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(74)(S.prototype,{then:function(t,e){var n=M(y(this,S));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=P?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(G,t,1),this.reject=s(B,t,1)},x.f=M=function(t){return t===S||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!k,{Promise:S}),n(18)(S,"Promise"),n(73)("Promise"),a=n(0).Promise,l(l.S+l.F*!k,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!k),"Promise",{resolve:function(t){return b(u&&this===a?S:this,t)}}),l(l.S+l.F*!(k&&n(30)(function(t){S.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=M(e),r=n.resolve,o=n.reject,i=w(function(){var n=[],i=0,a=1;v(t,!1,function(t){var u=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[u]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=M(e),r=n.reject,o=w(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(82),o=n(81),i=n(10),a=n(13);t.exports=n(43)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){n(83);for(var r=n(1),o=n(8),i=n(10),a=n(2)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<u.length;c++){var s=u[c],f=r[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},function(t,e){},function(t,e,n){n(85),n(44),n(84),n(80),n(72),n(71),t.exports=n(0).Promise},function(t,e,n){t.exports={default:n(86),__esModule:!0}},function(t,e,n){"use strict";var r=n(7),o=n(14);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";var r=n(9),o=n(3),i=n(17),a=n(34),u=n(33),c=n(20),s=n(88),f=n(32);o(o.S+o.F*!n(30)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,g=f(p);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==g||h==Array&&u(g))for(n=new h(e=c(p.length));e>m;m++)s(n,m,y?v(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)s(n,m,y?a(l,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){var r=n(25),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(13),o=n(20),i=n(90);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(11),o=n(13),i=n(91)(!1),a=n(19)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(93),o=n(37);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(7),o=n(4),i=n(94);t.exports=n(5)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){"use strict";var r=n(40),o=n(14),i=n(18),a={};n(8)(a,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){t.exports=n(8)},function(t,e,n){var r=n(25),o=n(24);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){n(44),n(89),t.exports=n(0).Array.from},function(t,e,n){t.exports={default:n(99),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(n(100)),o=m(n(87)),i=m(n(70)),a=m(n(67)),u=m(n(61)),c=m(n(58)),s=m(n(55)),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(51),p=m(l),h=n(50),d=m(n(49)),v=m(n(48)),y=n(47);function m(t){return t&&t.__esModule?t:{default:t}}var g=h.Upload.Dragger,x={title:d.default.string,multiple:d.default.bool,action:d.default.string,showUploadList:d.default.bool,accept:d.default.string,name:d.default.string,data:d.default.object,onSuccess:d.default.func,onError:d.default.func},w=function(t){function e(t){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||(0,s.default)(e)).call(this,t));return i.getElement=function(){return document.querySelector(".ac-upload-modal")},i.onRemove=function(t){return function(){i.setState(function(e){var n=e.fileList,r=n.indexOf(t),o=n.slice();return o.splice(r,1),{fileList:o}})}},i.showModeHandler=function(t){t&&t.stopPropagation(),i.setState({show:!0,isView:!1})},i.hideModelHandler=function(){i.setState({show:!1,fileList:[]})},i.onEnter=function(){},i.startUploadClick=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,n){return function r(i,a){try{var u=e[i](a),c=u.value}catch(t){return void n(t)}if(!u.done)return o.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)});t(c)}("next")})}}(c.default.mark(function t(){var e,r,o,a,u;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(a in i.setState({uploading:!0}),e=i.state.fileList,r=new FormData,o=i.props.data,e.forEach(function(t){r.append(i.props.name,t)}),o)r.append(a,o[a]);return t.next=8,v.default.post(i.props.action,r).catch(function(t){i.setState({uploading:!1}),i.props.onError&&i.props.onError(t)});case 8:u=t.sent,i.setState(function(t){var e=t.hisFileList.slice();return{uploading:!1,hisFileList:e=e.concat(u.data.data)}}),u&&1==u.data.status&&(i.props.onSuccess&&i.props.onSuccess(u.data.data),i.setState({show:!1,fileList:[]}));case 11:case"end":return t.stop()}},t,n)})),i.viewFileHandler=function(){i.setState({isView:!0,show:!0})},i.state={show:!1,uploading:!1,isView:!1,hisFileList:[],fileList:[]},i.uploadProps={name:"file",multiple:t.multiple,showUploadList:t.showUploadList,action:t.action,accept:t.accept,beforeUpload:function(t){return i.state.fileList.find(function(e){return e.name==t.name})?h.Message.create({content:"重复选择文件",color:"warning"}):i.setState(function(e){var n=e.fileList;return{fileList:[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}(n),[t])}}),!1}},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=(0,u.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(a.default?(0,a.default)(t,e):t.__proto__=e)}(e,l.Component),f(e,[{key:"render",value:function(){var t=this;return p.default.createElement("div",{className:"ac-upload-wrap"},p.default.createElement(h.Loading,{container:this.getElement,loadingType:"line",show:this.state.uploading}),p.default.createElement("span",{onClick:this.showModeHandler},this.props.children),this.state.hisFileList.length>0&&p.default.createElement(h.Button,{onClick:this.viewFileHandler,style:{marginLeft:"10px"},colors:"info"},"查看"),p.default.createElement(h.Modal,{dialogClassName:"ac-upload-modal",backdrop:!1,autoFocus:!1,enforceFocus:!1,onEnter:this.onEnter,show:this.state.show,onHide:this.hideModelHandler},p.default.createElement(h.Modal.Header,{closeButton:!0},p.default.createElement(h.Modal.Title,null,this.props.title)),p.default.createElement(h.Modal.Body,null,p.default.createElement("div",{className:"ac-upload-wrap"},!this.state.isView&&p.default.createElement(g,this.uploadProps,p.default.createElement("div",{className:"opeat"},p.default.createElement(h.Icon,{type:"inbox",className:"uf-upload icon-upload"}),p.default.createElement("div",{className:"upload-tips"},"拖拽文件到此处或"),p.default.createElement("div",{className:"upload-tips"},"点击选择上传文件"))),p.default.createElement("div",{className:"file-list"},!this.state.isView&&p.default.createElement("ul",{className:"file-list-item"},this.state.fileList.map(function(e,n){return p.default.createElement("li",{className:"clearfix",key:n},"名称:「",e.name,"」 大小:「",(0,y.bytesToSize)(e.size),"」 ",p.default.createElement(h.Icon,{onClick:t.onRemove(e),className:"file-close",type:"uf-close-bold",title:"删除"+e.name}))})),this.state.isView&&p.default.createElement("ul",{className:"file-list-item"},this.state.hisFileList.map(function(t,e){return p.default.createElement("li",{className:"clearfix",key:e},p.default.createElement("a",{target:"_blank",href:t.accessAddress}," 名称:「",t.fileName,"」 ")," ")}))))),p.default.createElement(h.Modal.Footer,null,!this.state.isView&&p.default.createElement(h.Button,{onClick:this.startUploadClick,disabled:0==this.state.fileList.length,colors:"primary"}," 开始上传 "))))}}]),e}();w.propTypes=x,w.defaultProps={title:"文件上传",multiple:!1,action:"/upload",showUploadList:!0,accept:"",name:"files[]",data:{}},e.default=w},function(t,e,n){n(101),t.exports=n(46)}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("axios"),require("PropTypes"),require("TinperBee"),require("React")):"function"==typeof define&&define.amd?define(["axios","PropTypes","TinperBee","React"],e):"object"==typeof exports?exports["ac-upload"]=e(require("axios"),require("PropTypes"),require("TinperBee"),require("React")):t["ac-upload"]=e(t.axios,t.PropTypes,t.TinperBee,t.React)}(window,function(t,e,n,r){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=102)}([function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(39)("wks"),o=n(38),i=n(1).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(1),o=n(0),i=n(9),a=n(8),u=n(11),c=function(t,e,n){var s,f,l,p=t&c.F,h=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,m=t&c.W,g=h?o:o[e]||(o[e]={}),x=g.prototype,w=h?r:d?r[e]:(r[e]||{}).prototype;for(s in h&&(n=e),n)(f=!p&&w&&void 0!==w[s])&&u(g,s)||(l=f?w[s]:n[s],g[s]=h&&"function"!=typeof w[s]?n[s]:y&&f?i(l,r):m&&w[s]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[s]=l,t&c.R&&x&&!x[s]&&a(x,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(4),o=n(42),i=n(41),a=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(7),o=n(14);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(15);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports={}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(92),o=n(24);t.exports=function(t){return r(o(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(15);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){var r=n(24);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(7).f,o=n(11),i=n(2)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(39)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(25),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(4),o=n(6),i=n(16);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r,o,i,a=n(9),u=n(77),c=n(36),s=n(21),f=n(1),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},x=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){u("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n(12)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=x,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){var r=n(4),o=n(15),i=n(2)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){var r=n(12),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(31),o=n(2)("iterator"),i=n(10);t.exports=n(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(10),o=n(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(11),o=n(17),i=n(19)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(0),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(23)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(4),o=n(95),i=n(37),a=n(19)("IE_PROTO"),u=function(){},c=function(){var t,e=n(21)("iframe"),r=i.length;for(e.style.display="none",n(36).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=!n(5)&&!n(22)(function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(23),o=n(3),i=n(97),a=n(8),u=n(10),c=n(96),s=n(18),f=n(35),l=n(2)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var g,x,w,_=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},b=e+" Iterator",E="values"==v,L=!1,O=t.prototype,S=O[l]||O["@@iterator"]||v&&O[v],j=S||_(v),P=v?E?_("entries"):j:void 0,T="Array"==e&&O.entries||S;if(T&&(w=f(T.call(new t)))!==Object.prototype&&w.next&&(s(w,b,!0),r||"function"==typeof w[l]||a(w,l,h)),E&&S&&"values"!==S.name&&(L=!0,j=function(){return S.call(this)}),r&&!m||!p&&!L&&O[l]||a(O,l,j),u[e]=j,u[b]=h,v)if(g={values:E?j:_("values"),keys:y?j:_("keys"),entries:P},m)for(x in g)x in O||i(O,x,g[x]);else o(o.P+o.F*(p||L),e,g);return g}},function(t,e,n){"use strict";var r=n(98)(!0);n(43)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},,function(t,e,n){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.bytesToSize=function(t){if(0===t)return"0 B";var e=Math.floor(Math.log(t)/Math.log(1e3));return(t/Math.pow(1e3,e)).toPrecision(3)+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e,n){var r=n(3),o=n(0),i=n(22);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(17),o=n(35);n(52)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){n(53),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){t.exports={default:n(54),__esModule:!0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",s="object"==typeof t,f=e.regeneratorRuntime;if(f)s&&(t.exports=f);else{(f=e.regeneratorRuntime=s?t.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",v={},y={};y[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(k([])));g&&g!==r&&o.call(g,a)&&(y=g);var x=L.prototype=b.prototype=Object.create(y);E.prototype=x.constructor=L,L.constructor=E,L[c]=E.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,L):(t.__proto__=L,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},f.awrap=function(t){return{__await:t}},O(S.prototype),S.prototype[u]=function(){return this},f.AsyncIterator=S,f.async=function(t,e,n,r){var o=new S(w(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},O(x),x[c]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=k,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return F()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=j(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=_(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function b(){}function E(){}function L(){}function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var u=_(t[n],t,r);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(s).then(function(t){c.value=t,i(c)},a)}a(u.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function j(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:F}}function F(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(56),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e,n){t.exports=n(57)},function(t,e,n){var r=n(3);r(r.S,"Object",{create:n(40)})},function(t,e,n){n(59);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){t.exports={default:n(60),__esModule:!0}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(62),o=n(14),i=n(13),a=n(41),u=n(11),c=n(42),s=Object.getOwnPropertyDescriptor;e.f=n(5)?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(6),o=n(4),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(9)(Function.call,n(63).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(3);r(r.S,"Object",{setPrototypeOf:n(64).set})},function(t,e,n){n(65),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){t.exports={default:n(66),__esModule:!0}},function(t,e,n){var r=n(3);r(r.S+r.F*!n(5),"Object",{defineProperty:n(7).f})},function(t,e,n){n(68);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){t.exports={default:n(69),__esModule:!0}},function(t,e,n){"use strict";var r=n(3),o=n(16),i=n(27);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var r=n(3),o=n(0),i=n(1),a=n(29),u=n(26);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(1),o=n(0),i=n(7),a=n(5),u=n(2)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(8);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(1),o=n(28).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(12)(a);t.exports=function(){var t,e,n,s=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(9),o=n(34),i=n(33),a=n(4),u=n(20),c=n(32),s={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,v,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=u(t.length);h>x;x++)if((y=e?g(a(d=t[x])[0],d[1]):g(t[x]))===s||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===s||y===f)return y}).BREAK=s,e.RETURN=f},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var r,o,i,a,u=n(23),c=n(1),s=n(9),f=n(31),l=n(3),p=n(6),h=n(15),d=n(79),v=n(78),y=n(29),m=n(28).set,g=n(76)(),x=n(16),w=n(27),_=n(75),b=n(26),E=c.TypeError,L=c.process,O=L&&L.versions,S=O&&O.v8||"",j=c.Promise,P="process"==f(L),T=function(){},M=o=x.f,k=!!function(){try{var t=j.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(T,T)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==S.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),F=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},N=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,u=o?e.ok:e.fail,c=e.resolve,s=e.reject,f=e.domain;try{u?(o||(2==t._h&&C(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),a=!0)),n===e.promise?s(E("Promise-chain cycle")):(i=F(n))?i.call(n,c,s):c(n)):s(r)}catch(t){f&&!a&&f.exit(),s(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){m.call(c,function(){var e,n,r,o=t._v,i=A(t);if(i&&(e=w(function(){P?L.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=P||A(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){m.call(c,function(){var e;P?L.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),N(e,!0))},I=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw E("Promise can't be resolved itself");(e=F(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,s(I,r,1),s(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,N(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};k||(j=function(t){d(this,j,"Promise","_h"),h(t),r.call(this);try{t(s(I,this,1),s(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(74)(j.prototype,{then:function(t,e){var n=M(y(this,j));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=P?L.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(I,t,1),this.reject=s(B,t,1)},x.f=M=function(t){return t===j||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!k,{Promise:j}),n(18)(j,"Promise"),n(73)("Promise"),a=n(0).Promise,l(l.S+l.F*!k,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!k),"Promise",{resolve:function(t){return b(u&&this===a?j:this,t)}}),l(l.S+l.F*!(k&&n(30)(function(t){j.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=M(e),r=n.resolve,o=n.reject,i=w(function(){var n=[],i=0,a=1;v(t,!1,function(t){var u=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[u]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=M(e),r=n.reject,o=w(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(82),o=n(81),i=n(10),a=n(13);t.exports=n(43)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){n(83);for(var r=n(1),o=n(8),i=n(10),a=n(2)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<u.length;c++){var s=u[c],f=r[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},function(t,e){},function(t,e,n){n(85),n(44),n(84),n(80),n(72),n(71),t.exports=n(0).Promise},function(t,e,n){t.exports={default:n(86),__esModule:!0}},function(t,e,n){"use strict";var r=n(7),o=n(14);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";var r=n(9),o=n(3),i=n(17),a=n(34),u=n(33),c=n(20),s=n(88),f=n(32);o(o.S+o.F*!n(30)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,g=f(p);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==g||h==Array&&u(g))for(n=new h(e=c(p.length));e>m;m++)s(n,m,y?v(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)s(n,m,y?a(l,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){var r=n(25),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(13),o=n(20),i=n(90);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(11),o=n(13),i=n(91)(!1),a=n(19)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(93),o=n(37);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(7),o=n(4),i=n(94);t.exports=n(5)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){"use strict";var r=n(40),o=n(14),i=n(18),a={};n(8)(a,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){t.exports=n(8)},function(t,e,n){var r=n(25),o=n(24);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){n(44),n(89),t.exports=n(0).Array.from},function(t,e,n){t.exports={default:n(99),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(n(100)),o=m(n(87)),i=m(n(70)),a=m(n(67)),u=m(n(61)),c=m(n(58)),s=m(n(55)),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(51),p=m(l),h=n(50),d=m(n(49)),v=m(n(48)),y=n(47);function m(t){return t&&t.__esModule?t:{default:t}}var g=h.Upload.Dragger,x={title:d.default.string,multiple:d.default.bool,action:d.default.string,showUploadList:d.default.bool,accept:d.default.string,name:d.default.string,data:d.default.object,onSuccess:d.default.func,onError:d.default.func,maxSize:d.default.number},w=function(t){function e(t){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||(0,s.default)(e)).call(this,t));return i.hisFileColumns=function(){var t=i;return[{title:"序号",dataIndex:"fileName",width:25,render:function(t,e,n){return n+1}},{title:"文件名",dataIndex:"fileName",width:265,render:function(t,e,n){return p.default.createElement("span",{className:"table-link"},p.default.createElement("a",{target:"_blank",href:e.accessAddress},e.fileName))}},{title:"操作",dataIndex:"fileName",width:25,render:function(e,n,r){return p.default.createElement("span",{className:"table-link"},p.default.createElement("a",{onClick:t.handlerTableRemove(n,r),href:"javascript:;"},"删除"))}}]},i.getElement=function(){return document.querySelector(".ac-upload-modal")},i.onRemove=function(t){return function(){i.setState(function(e){var n=e.fileList,r=n.indexOf(t),o=n.slice();return o.splice(r,1),{fileList:o}})}},i.handlerTableRemove=function(t,e){return function(){i.setState(function(e){var n=e.hisFileList,r=n.indexOf(t),o=n.slice();return o.splice(r,1),i.props.onSuccess&&i.props.onSuccess(o),{hisFileList:o}})}},i.showModeHandler=function(t){t&&t.stopPropagation(),i.setState({show:!0,isView:!1})},i.hideModelHandler=function(){i.setState({show:!1,fileList:[]})},i.onEnter=function(){},i.startUploadClick=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,n){return function r(i,a){try{var u=e[i](a),c=u.value}catch(t){return void n(t)}if(!u.done)return o.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)});t(c)}("next")})}}(c.default.mark(function t(){var e,r,o,a,u;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(a in i.setState({uploading:!0}),e=i.state.fileList,r=new FormData,o=i.props.data,e.forEach(function(t){r.append(i.props.name,t)}),o)r.append(a,o[a]);return t.next=8,(0,v.default)({url:i.props.action,method:"post",data:r,timeout:5e4,onUploadProgress:function(t){console.log(t)}}).catch(function(t){i.setState({uploading:!1}),i.props.onError&&i.props.onError(t)});case 8:u=t.sent,i.setState(function(t){var e=t.hisFileList.slice();return{uploading:!1,hisFileList:e=e.concat(u.data.data)}}),u&&1==u.data.status&&(i.props.onSuccess&&i.props.onSuccess(u.data.data),i.setState({show:!1,fileList:[]}));case 11:case"end":return t.stop()}},t,n)})),i.viewFileHandler=function(){i.setState({isView:!0,show:!0})},i.state={show:!1,uploading:!1,isView:!1,hisFileList:[],fileList:[]},i.uploadProps={name:"file",multiple:t.multiple,showUploadList:t.showUploadList,action:t.action,accept:t.accept,beforeUpload:function(t){return t.size>i.props.maxSize?(h.Message.create({content:"文件大小超过默认值",color:"warning"}),!1):(i.state.fileList.find(function(e){return e.name==t.name})?h.Message.create({content:"重复选择文件",color:"warning"}):i.setState(function(e){var n=e.fileList;return{fileList:[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}(n),[t])}}),!1)}},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=(0,u.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(a.default?(0,a.default)(t,e):t.__proto__=e)}(e,l.Component),f(e,[{key:"render",value:function(){var t=this;return p.default.createElement("div",{className:"ac-upload-wrap"},p.default.createElement(h.Loading,{container:this.getElement,loadingType:"line",show:this.state.uploading}),p.default.createElement("span",{onClick:this.showModeHandler},this.props.children),this.state.hisFileList.length>0&&p.default.createElement(h.Button,{onClick:this.viewFileHandler,style:{marginLeft:"10px"},colors:"info"},"查看"),p.default.createElement(h.Modal,{dialogClassName:"ac-upload-modal",backdrop:!1,autoFocus:!1,enforceFocus:!1,onEnter:this.onEnter,show:this.state.show,onHide:this.hideModelHandler},p.default.createElement(h.Modal.Header,{closeButton:!0},p.default.createElement(h.Modal.Title,null,this.props.title)),p.default.createElement(h.Modal.Body,null,p.default.createElement("div",{className:"ac-upload-wrap"},!this.state.isView&&p.default.createElement(g,this.uploadProps,p.default.createElement("div",{className:"opeat"},p.default.createElement(h.Icon,{type:"inbox",className:"uf-upload icon-upload"}),p.default.createElement("div",{className:"upload-tips"},"拖拽文件到此处或"),p.default.createElement("div",{className:"upload-tips"},"点击选择上传文件"))),p.default.createElement("div",{className:"file-list"},!this.state.isView&&p.default.createElement("ul",{className:"file-list-item"},this.state.fileList.map(function(e,n){return p.default.createElement("li",{className:"clearfix",key:n},"名称:「",e.name,"」 大小:「",(0,y.bytesToSize)(e.size),"」 ",p.default.createElement(h.Icon,{onClick:t.onRemove(e),className:"file-close",type:"uf-close-bold",title:"删除"+e.name}))})),this.state.isView&&p.default.createElement("ul",{className:"file-list-item"},p.default.createElement(h.Table,{columns:this.hisFileColumns(),data:this.state.hisFileList,bordered:!0,scroll:{y:230},emptyText:function(){return p.default.createElement("span",null,"暂无附件")}}))))),p.default.createElement(h.Modal.Footer,null,!this.state.isView&&p.default.createElement(h.Button,{onClick:this.startUploadClick,disabled:0==this.state.fileList.length,colors:"primary"}," 开始上传 "))))}}]),e}();w.propTypes=x,w.defaultProps={title:"文件上传",multiple:!1,action:"/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload",showUploadList:!0,accept:"",name:"files[]",data:{},maxSize:1024e4},e.default=w},function(t,e,n){n(101),t.exports=n(46)}])}); |
@@ -72,3 +72,2 @@ 'use strict'; | ||
{ | ||
action: '/upload.do', | ||
multiple: true, | ||
@@ -75,0 +74,0 @@ onError: function onError(err) { |
114
lib/index.js
@@ -75,3 +75,4 @@ 'use strict'; | ||
onSuccess: _propTypes2.default.func, | ||
onError: _propTypes2.default.func | ||
onError: _propTypes2.default.func, | ||
maxSize: _propTypes2.default.number | ||
}; | ||
@@ -89,2 +90,44 @@ | ||
_this.hisFileColumns = function () { | ||
var self = _this; | ||
return [{ | ||
title: "序号", | ||
dataIndex: "fileName", | ||
width: 25, | ||
render: function render(text, record, index) { | ||
return index + 1; | ||
} | ||
}, { | ||
title: "文件名", | ||
dataIndex: "fileName", | ||
width: 265, | ||
render: function render(text, record, index) { | ||
return _react2.default.createElement( | ||
'span', | ||
{ className: 'table-link' }, | ||
_react2.default.createElement( | ||
'a', | ||
{ target: '_blank', href: record.accessAddress }, | ||
record.fileName | ||
) | ||
); | ||
} | ||
}, { | ||
title: "操作", | ||
dataIndex: "fileName", | ||
width: 25, | ||
render: function render(text, record, index) { | ||
return _react2.default.createElement( | ||
'span', | ||
{ className: 'table-link' }, | ||
_react2.default.createElement( | ||
'a', | ||
{ onClick: self.handlerTableRemove(record, index), href: 'javascript:;' }, | ||
'\u5220\u9664' | ||
) | ||
); | ||
} | ||
}]; | ||
}; | ||
_this.getElement = function () { | ||
@@ -109,2 +152,18 @@ return document.querySelector('.ac-upload-modal'); | ||
_this.handlerTableRemove = function (record, index) { | ||
return function () { | ||
_this.setState(function (_ref2) { | ||
var hisFileList = _ref2.hisFileList; | ||
var index = hisFileList.indexOf(record); | ||
var newFileList = hisFileList.slice(); | ||
newFileList.splice(index, 1); | ||
_this.props.onSuccess && _this.props.onSuccess(newFileList); | ||
return { | ||
hisFileList: newFileList | ||
}; | ||
}); | ||
}; | ||
}; | ||
_this.showModeHandler = function (e) { | ||
@@ -147,3 +206,11 @@ if (e) e.stopPropagation(); | ||
_context.next = 8; | ||
return _axios2.default.post(_this.props.action, formData).catch(function (err) { | ||
return (0, _axios2.default)({ | ||
url: _this.props.action, | ||
method: 'post', | ||
data: formData, | ||
timeout: 50000, | ||
onUploadProgress: function onUploadProgress(progressEvent) { | ||
console.log(progressEvent); | ||
} | ||
}).catch(function (err) { | ||
_this.setState({ | ||
@@ -158,4 +225,4 @@ uploading: false | ||
_this.setState(function (_ref3) { | ||
var hisFileList = _ref3.hisFileList; | ||
_this.setState(function (_ref4) { | ||
var hisFileList = _ref4.hisFileList; | ||
@@ -208,2 +275,6 @@ var newFileList = hisFileList.slice(); | ||
beforeUpload: function beforeUpload(file) { | ||
if (file.size > _this.props.maxSize) { | ||
_tinperBee.Message.create({ content: '文件大小超过默认值', color: 'warning' }); | ||
return false; | ||
} | ||
if (_this.state.fileList.find(function (item) { | ||
@@ -214,4 +285,4 @@ return item.name == file.name; | ||
} else { | ||
_this.setState(function (_ref4) { | ||
var fileList = _ref4.fileList; | ||
_this.setState(function (_ref5) { | ||
var fileList = _ref5.fileList; | ||
return { | ||
@@ -225,2 +296,3 @@ fileList: [].concat(_toConsumableArray(fileList), [file]) | ||
}; | ||
return _this; | ||
@@ -315,15 +387,14 @@ } | ||
{ className: 'file-list-item' }, | ||
this.state.hisFileList.map(function (file, index) { | ||
return _react2.default.createElement( | ||
'li', | ||
{ className: 'clearfix', key: index }, | ||
_react2.default.createElement( | ||
'a', | ||
{ target: '_blank', href: file.accessAddress }, | ||
' \u540D\u79F0:\u300C', | ||
file.fileName, | ||
'\u300D ' | ||
), | ||
' ' | ||
); | ||
_react2.default.createElement(_tinperBee.Table, { | ||
columns: this.hisFileColumns(), | ||
data: this.state.hisFileList, | ||
bordered: true, | ||
scroll: { y: 230 }, | ||
emptyText: function emptyText() { | ||
return _react2.default.createElement( | ||
'span', | ||
null, | ||
'\u6682\u65E0\u9644\u4EF6' | ||
); | ||
} | ||
}) | ||
@@ -355,8 +426,9 @@ ) | ||
multiple: false, | ||
action: "/upload", | ||
action: "/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload", | ||
showUploadList: true, | ||
accept: "", | ||
name: "files[]", | ||
data: {} | ||
data: {}, | ||
maxSize: 10240000 | ||
}; | ||
exports.default = AcUpload; |
{ | ||
"name": "ac-upload", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "tinper-bee ac upload components", | ||
"main": "./lib/index.js", | ||
"scripts": { | ||
"dev": "uba server", | ||
"dev": "uba server --port=5171", | ||
"dist": "uba build", | ||
@@ -9,0 +9,0 @@ "build": "rm -rf lib && rm -rf dist && babel src -d lib --no-comments", |
@@ -60,3 +60,4 @@ ## AC-Upload | ||
6|name|string|上传设置的参数file名字默认`files[]` | ||
7|onSuccess|function|上传成功后的回调,回调参数数组对象包含本次上传后的完成路径以及修改后的名称[{"accessAddress":"http://10.10.24.43:8080/wbalone/images/5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png","fileName":"5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png"}] | ||
8|onError|function|上传失败后的回调,用于处理后续失败操作 | ||
7|maxSize|number|上传附件大小限制,默认10MB | ||
8|onSuccess|function|上传成功后的回调,回调参数数组对象包含本次上传后的完成路径以及修改后的名称[{"accessAddress":"http://10.10.24.43:8080/wbalone/images/5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png","fileName":"5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png"}] | ||
9|onError|function|上传失败后的回调,用于处理后续失败操作 |
@@ -22,3 +22,2 @@ import React, { Component } from 'react'; | ||
<AcUpload | ||
action="/upload.do" | ||
multiple={true} | ||
@@ -25,0 +24,0 @@ onError={(err) => alert('上传报错了')} |
/** | ||
* 图片手动上传组件 | ||
* 手动上传组件 | ||
*/ | ||
import React, { Component } from 'react'; | ||
import { Modal, Button, Icon, Upload, Message, Loading } from 'tinper-bee'; | ||
import { Modal, Button, Icon, Upload, Message, Loading, Table, Popconfirm } from 'tinper-bee'; | ||
import PropTypes from 'prop-types'; | ||
@@ -21,3 +21,4 @@ import axios from 'axios'; | ||
onSuccess: PropTypes.func, | ||
onError: PropTypes.func | ||
onError: PropTypes.func, | ||
maxSize: PropTypes.number | ||
}; | ||
@@ -42,2 +43,6 @@ | ||
beforeUpload: (file) => { | ||
if (file.size > this.props.maxSize) { | ||
Message.create({ content: '文件大小超过默认值', color: 'warning' }); | ||
return false; | ||
} | ||
if (this.state.fileList.find(((item) => (item.name == file.name)))) { | ||
@@ -53,3 +58,31 @@ Message.create({ content: '重复选择文件', color: 'warning' }); | ||
}; | ||
} | ||
hisFileColumns = () => { | ||
let self = this; | ||
return [{ | ||
title: "序号", | ||
dataIndex: "fileName", | ||
width: 25, | ||
render(text, record, index) { | ||
return index + 1; | ||
} | ||
}, { | ||
title: "文件名", | ||
dataIndex: "fileName", | ||
width: 265, | ||
render(text, record, index) { | ||
return <span className="table-link"><a target="_blank" href={record.accessAddress}>{record.fileName}</a></span> | ||
} | ||
}, { | ||
title: "操作", | ||
dataIndex: "fileName", | ||
width: 25, | ||
render(text, record, index) { | ||
return (<span className="table-link"> | ||
<a onClick={self.handlerTableRemove(record, index)} href="javascript:;">删除</a> | ||
</span>) | ||
} | ||
}] | ||
} | ||
//获得加载dom | ||
@@ -70,2 +103,14 @@ getElement = () => { | ||
} | ||
//历史上传后的删除事件 | ||
handlerTableRemove = (record, index) => () => { | ||
this.setState(({ hisFileList }) => { | ||
const index = hisFileList.indexOf(record); | ||
const newFileList = hisFileList.slice(); | ||
newFileList.splice(index, 1); | ||
this.props.onSuccess && this.props.onSuccess(newFileList); | ||
return { | ||
hisFileList: newFileList, | ||
}; | ||
}); | ||
} | ||
//显示自身模态 | ||
@@ -104,3 +149,17 @@ showModeHandler = (e) => { | ||
} | ||
let result = await axios.post(this.props.action, formData).catch(err => { | ||
// let result = await axios.post(this.props.action, formData).catch(err => { | ||
// this.setState({ | ||
// uploading: false | ||
// }); | ||
// this.props.onError && this.props.onError(err); | ||
// }); | ||
let result = await axios({ | ||
url: this.props.action, | ||
method: 'post', | ||
data: formData, | ||
timeout: 50000, | ||
onUploadProgress: (progressEvent) => { | ||
console.log(progressEvent); | ||
} | ||
}).catch(err => { | ||
this.setState({ | ||
@@ -176,7 +235,15 @@ uploading: false | ||
{this.state.isView && <ul className="file-list-item"> | ||
{ | ||
<Table | ||
columns={this.hisFileColumns()} | ||
data={this.state.hisFileList} | ||
bordered | ||
scroll={{ y: 230 }} | ||
emptyText={() => <span>暂无附件</span>} | ||
> | ||
</Table> | ||
{/* { | ||
this.state.hisFileList.map((file, index) => ( | ||
<li className="clearfix" key={index}><a target="_blank" href={file.accessAddress}> 名称:「{file.fileName}」 </a> </li> | ||
)) | ||
} | ||
} */} | ||
</ul>} | ||
@@ -200,8 +267,9 @@ </div> | ||
multiple: false, | ||
action: "/upload", | ||
action: "/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload", | ||
showUploadList: true, | ||
accept: "", | ||
name: "files[]", | ||
data: {} | ||
data: {}, | ||
maxSize: 10240000 | ||
} | ||
export default AcUpload; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
248625
2157
62