-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.js
11 lines (11 loc) · 45.9 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=37)}([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(28)("wks"),o=n(29),i=n(0).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(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(11),o=n(26);t.exports=n(6)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(25)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports={}},function(t,e,n){var r=n(0),o=n(3),i=n(9),a=n(4),u=function(t,e,n){var c,s,f,l=t&u.F,p=t&u.G,d=t&u.S,h=t&u.P,v=t&u.B,m=t&u.W,y=p?o:o[e]||(o[e]={}),g=y.prototype,b=p?r:d?r[e]:(r[e]||{}).prototype;p&&(n=e);for(c in n)(s=!l&&b&&void 0!==b[c])&&c in y||(f=s?b[c]:n[c],y[c]=p&&"function"!=typeof b[c]?n[c]:v&&s?i(f,r):m&&b[c]==f?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}(f):h&&"function"==typeof f?i(Function.call,f):f,h&&((y.virtual||(y.virtual={}))[c]=f,t&u.R&&g&&!g[c]&&a(g,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(10);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){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(2),o=n(48),i=n(49),a=Object.defineProperty;e.f=n(6)?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){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){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(5),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(56),o=n(15);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(28)("keys"),o=n(29);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(11).f,o=n(12),i=n(1)("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){"use strict";function r(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=o(e),this.reject=o(n)}var o=n(10);t.exports.f=function(t){return new r(t)}},function(t,e,n){"use strict";var r=n(22),o=n.n(r),i=n(78),a=n.n(i),u=n(81),c=n.n(u),s=n(84);n(82),e.a={data:function(){return{files:[],formData:new FormData,loading:!1}},props:{componentId:{type:String,default:"cid"+Math.floor(1e4*Math.random()),validator:function(t){return!/\W/.test(t)}},initialImg:{type:Array,default:function(){return[]}},tbstyle:{type:Object},autoUpload:{type:Boolean,default:!0},compressQuality:{type:Number,default:.6},maxSize:{type:Number,default:10485760},max:{type:Number,default:9},uploadURL:{type:String}},mounted:function(){this.handleInitialImg()},watch:{initialImg:function(t){this.handleInitialImg()}},methods:{handleInitialImg:function(){var t=this;return c()(a.a.mark(function e(){var n,r,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.initialImg.length>0)){e.next=14;break}n=0;case 2:if(!(t.initialImg.length>n)){e.next=14;break}return r=t.initialImg[n],console.log(r),e.next=7,t.url2BlobKai(r);case 7:o=e.sent,console.log(o),t.files.push({name:"preset"+n,src:r}),t.autoUpload||(t.formData.append("preset"+n,o,"preset"+n),t.$emit("update:formData",t.formData));case 11:n++,e.next=2;break;case 14:case"end":return e.stop()}},e,t)}))()},url2Blob:function(t){return new o.a(function(e,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){e(r.response)},r.open("GET",t),r.send()})},url2BlobKai:function(t){return new o.a(function(e,n){console.log("改!");var r=document.createElement("canvas"),o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.src=t,o.onload=function(){r.width=o.width,r.height=o.height,r.getContext("2d").drawImage(o,0,0),r.toBlob(function(t){e(t)})}})},getFile:function(t){var e=this;return c()(a.a.mark(function n(){var r,o,i,u,c,s;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading=!0,r=t.target.files[0],o=r.name,console.log(r),document.querySelector("#"+e.componentId).value=null,n.next=7,e.imgCompress(r);case 7:return i=n.sent,n.next=10,e.getDataURL(i);case 10:u=n.sent,e.files.push({name:o,src:u}),c=e.files.length-1,e.autoUpload?(s=new FormData,s.append("img",i,o),e.uploader(s)):(e.formData.append(o,i,o),e.$emit("update:formData",e.formData)),e.loading=!1;case 15:case"end":return n.stop()}},n,e)}))()},deleteImg:function(t,e){console.log(t,e),this.files.splice(e,1),this.formData.delete(t),this.$emit("update:formData",this.formData)},getDataURL:function(t){return new o.a(function(e,n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(t){return e(t.target.result)},r.onerror=function(t){return n(t)}})},imgCompress:function(t){var e=this;return new o.a(function(n,r){new s.a(t,{quality:e.compressQuality,success:function(t){n(t)},error:function(t){r(t)}})})},uploader:function(t){console.log(t);var e=this,n=new XMLHttpRequest;n.open("POST",this.uploadURL),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&200==n.status&&e.$emit("uploaded",n.response)},n.send(t),n.upload.addEventListener("progress",function(t){console.log(t.loaded,t.total)},!1)}}}},function(t,e,n){t.exports={default:n(44),__esModule:!0}},function(t,e,n){"use strict";var r=n(24),o=n(8),i=n(50),a=n(4),u=n(12),c=n(7),s=n(51),f=n(19),l=n(59),p=n(1)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,v,m,y,g){s(n,e,v);var b,w,x,_=function(t){if(!d&&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)}},S=e+" Iterator",j="values"==m,L=!1,O=t.prototype,E=O[p]||O["@@iterator"]||m&&O[m],M=!d&&E||_(m),k=m?j?_("entries"):M:void 0,T="Array"==e?O.entries||E:E;if(T&&(x=l(T.call(new t)))!==Object.prototype&&x.next&&(f(x,S,!0),r||u(x,p)||a(x,p,h)),j&&E&&"values"!==E.name&&(L=!0,M=function(){return E.call(this)}),r&&!g||!d&&!L&&O[p]||a(O,p,M),c[e]=M,c[S]=h,m)if(b={values:j?M:_("values"),keys:y?M:_("keys"),entries:k},g)for(w in b)w in O||i(O,w,b[w]);else o(o.P+o.F*(d||L),e,b);return b}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(14),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},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){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(13),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e,n){var r=n(2),o=n(10),i=n(1)("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,o,i,a=n(9),u=n(71),c=n(31),s=n(16),f=n(0),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,m=0,y={},g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},b=function(t){g.call(t.data)};p&&d||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++m]=function(){u("function"==typeof t?t:Function(t),e)},r(m),m},d=function(t){delete y[t]},"process"==n(13)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!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:d}},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=n(2),o=n(5),i=n(20);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,n){"use strict";function r(t){n(38)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(21),i=n(85),a=n(43),u=r,c=a(o.a,i.a,!1,u,"data-v-43527416",null);e.default=c.exports},function(t,e,n){var r=n(39);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(41)("0623d752",r,!0,{})},function(t,e,n){e=t.exports=n(40)(!1),e.push([t.i,"#vue-img-uploader[data-v-43527416]{display:flex;flex-wrap:wrap}.vue-thumbnail-wrapper[data-v-43527416]{position:relative;margin-right:10px}.del-button[data-v-43527416]{position:absolute;margin:5px;top:0;right:0;border-radius:50%;background:#fff;height:15px;width:15px;line-height:15px;text-align:center}img[data-v-43527416]{display:block;height:100px;width:100px;object-fit:cover}.loading[data-v-43527416]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;border:1px solid #ccc;height:100px;width:100px;margin-right:10px}@keyframes donut-spin-data-v-43527416{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.donut[data-v-43527416]{display:inline-block;border:4px solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:30px;height:30px;animation:donut-spin-data-v-43527416 1.2s linear infinite}label>.default[data-v-43527416]{box-sizing:border-box;display:flex;justify-content:center;align-items:center;font-size:25px;height:100px;width:100px;border:1px solid #333;color:#333}input[data-v-43527416]{position:absolute;top:-100px;left:0}",""])},function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=f[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(i(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],o=0;o<n.parts.length;o++)a.push(i(n.parts[o]));f[n.id]={id:n.id,refs:1,parts:a}}}}function o(){var t=document.createElement("style");return t.type="text/css",l.appendChild(t),t}function i(t){var e,n,r=document.querySelector("style["+y+'~="'+t.id+'"]');if(r){if(h)return v;r.parentNode.removeChild(r)}if(g){var i=d++;r=p||(p=o()),e=a.bind(null,r,i,!1),n=a.bind(null,r,i,!0)}else r=o(),e=u.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function u(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),m.ssrId&&t.setAttribute(y,e.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s=n(42),f={},l=c&&(document.head||document.getElementsByTagName("head")[0]),p=null,d=0,h=!1,v=function(){},m=null,y="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,o){h=n,m=o||{};var i=s(t,e);return r(i),function(e){for(var n=[],o=0;o<i.length;o++){var a=i[o],u=f[a.id];u.refs--,n.push(u)}e?(i=s(t,e),r(i)):i=[];for(var o=0;o<n.length;o++){var u=n[o];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete f[u.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],u=i[1],c=i[2],s=i[3],f={id:t+":"+o,css:u,media:c,sourceMap:s};r[a]?r[a].parts.push(f):n.push(r[a]={id:a,parts:[f]})}return n}},function(t,e){t.exports=function(t,e,n,r,o,i){var a,u=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(a=t,u=t.default);var s="function"==typeof u?u.options:u;e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns,s._compiled=!0),n&&(s.functional=!0),o&&(s._scopeId=o);var f;if(i?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},s._ssrRegister=f):r&&(f=r),f){var l=s.functional,p=l?s.render:s.beforeCreate;l?(s._injectStyles=f,s.render=function(t,e){return f.call(e),p(t,e)}):s.beforeCreate=p?[].concat(p,f):[f]}return{esModule:a,exports:u,options:s}}},function(t,e,n){n(45),n(46),n(61),n(65),n(76),n(77),t.exports=n(3).Promise},function(t,e){},function(t,e,n){"use strict";var r=n(47)(!0);n(23)(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){var r=n(14),o=n(15);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),i<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){t.exports=!n(6)&&!n(25)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5);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(4)},function(t,e,n){"use strict";var r=n(52),o=n(26),i=n(19),a={};n(4)(a,n(1)("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){var r=n(2),o=n(53),i=n(30),a=n(18)("IE_PROTO"),u=function(){},c=function(){var t,e=n(16)("iframe"),r=i.length;for(e.style.display="none",n(31).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.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(11),o=n(2),i=n(54);t.exports=n(6)?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){var r=n(55),o=n(30);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(12),o=n(17),i=n(57)(!1),a=n(18)("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(13);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(17),o=n(27),i=n(58);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(14),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(12),o=n(60),i=n(18)("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(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(62);for(var r=n(0),o=n(4),i=n(7),a=n(1)("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,n){"use strict";var r=n(63),o=n(64),i=n(7),a=n(17);t.exports=n(23)(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)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,o,i,a,u=n(24),c=n(0),s=n(9),f=n(32),l=n(8),p=n(5),d=n(10),h=n(66),v=n(67),m=n(33),y=n(34).set,g=n(72)(),b=n(20),w=n(35),x=n(36),_=c.TypeError,S=c.process,j=c.Promise,L="process"==f(S),O=function(){},E=o=b.f,M=!!function(){try{var t=j.resolve(1),e=(t.constructor={})[n(1)("species")]=function(t){t(O,O)};return(L||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e}catch(t){}}(),k=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},T=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;n.length>i;)!function(e){var n,i,a=o?e.ok:e.fail,u=e.resolve,c=e.reject,s=e.domain;try{a?(o||(2==t._h&&C(t),t._h=1),!0===a?n=r:(s&&s.enter(),n=a(r),s&&s.exit()),n===e.promise?c(_("Promise-chain cycle")):(i=k(n))?i.call(n,u,c):u(n)):c(r)}catch(t){c(t)}}(n[i++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){y.call(c,function(){var e,n,r,o=t._v,i=P(t);if(i&&(e=w(function(){L?S.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=L||P(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){y.call(c,function(){var e;L?S.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},U=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),T(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw _("Promise can't be resolved itself");(e=k(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,s(B,r,1),s(U,r,1))}catch(t){U.call(r,t)}}):(n._v=t,n._s=1,T(n,!1))}catch(t){U.call({_w:n,_d:!1},t)}}};M||(j=function(t){h(this,j,"Promise","_h"),d(t),r.call(this);try{t(s(B,this,1),s(U,this,1))}catch(t){U.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},r.prototype=n(73)(j.prototype,{then:function(t,e){var n=E(m(this,j));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=L?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(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(B,t,1),this.reject=s(U,t,1)},b.f=E=function(t){return t===j||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!M,{Promise:j}),n(19)(j,"Promise"),n(74)("Promise"),a=n(3).Promise,l(l.S+l.F*!M,"Promise",{reject:function(t){var e=E(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!M),"Promise",{resolve:function(t){return x(u&&this===a?j:this,t)}}),l(l.S+l.F*!(M&&n(75)(function(t){j.all(t).catch(O)})),"Promise",{all:function(t){var e=this,n=E(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=E(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,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(9),o=n(68),i=n(69),a=n(2),u=n(27),c=n(70),s={},f={},e=t.exports=function(t,e,n,l,p){var d,h,v,m,y=p?function(){return t}:c(t),g=r(n,l,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(d=u(t.length);d>b;b++)if((m=e?g(a(h=t[b])[0],h[1]):g(t[b]))===s||m===f)return m}else for(v=y.call(t);!(h=v.next()).done;)if((m=o(v,g,h.value,e))===s||m===f)return m};e.BREAK=s,e.RETURN=f},function(t,e,n){var r=n(2);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(7),o=n(1)("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(32),o=n(1)("iterator"),i=n(7);t.exports=n(3).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},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(0),o=n(34).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(13)(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();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,n){var r=n(4);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){"use strict";var r=n(0),o=n(3),i=n(11),a=n(6),u=n(1)("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(1)("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){"use strict";var r=n(8),o=n(3),i=n(0),a=n(33),u=n(36);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(8),o=n(20),i=n(35);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){t.exports=n(79)},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(80),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function n(t,e,n,r){var i=e&&e.prototype instanceof o?e:o,a=Object.create(i.prototype),u=new d(r||[]);return a._invoke=s(t,n,u),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function o(){}function i(){}function a(){}function u(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(t){function e(n,o,i,a){var u=r(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&g.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)}function n(t,n){function r(){return new Promise(function(r,o){e(t,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function s(t,e,n){var o=L;return function(i,a){if(o===E)throw new Error("Generator is already running");if(o===M){if("throw"===i)throw a;return v()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=f(u,n);if(c){if(c===k)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===L)throw o=M,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var s=r(t,e,n);if("normal"===s.type){if(o=n.done?M:O,s.arg===k)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=M,n.method="throw",n.arg=s.arg)}}}function f(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,f(t,e),"throw"===e.method))return k;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var o=r(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,k;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=m),e.delegate=null,k):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,k)}function l(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 p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function h(t){if(t){var e=t[w];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=m,e.done=!0,e};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",_=b.toStringTag||"@@toStringTag",S="object"==typeof t,j=e.regeneratorRuntime;if(j)return void(S&&(t.exports=j));j=e.regeneratorRuntime=S?t.exports:{},j.wrap=n;var L="suspendedStart",O="suspendedYield",E="executing",M="completed",k={},T={};T[w]=function(){return this};var R=Object.getPrototypeOf,P=R&&R(R(h([])));P&&P!==y&&g.call(P,w)&&(T=P);var C=a.prototype=o.prototype=Object.create(T);i.prototype=C.constructor=a,a.constructor=i,a[_]=i.displayName="GeneratorFunction",j.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},j.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,_ in t||(t[_]="GeneratorFunction")),t.prototype=Object.create(C),t},j.awrap=function(t){return{__await:t}},u(c.prototype),c.prototype[x]=function(){return this},j.AsyncIterator=c,j.async=function(t,e,r,o){var i=new c(n(t,e,r,o));return j.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},u(C),C[_]="Generator",C[w]=function(){return this},C.toString=function(){return"[object Generator]"},j.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}},j.values=h,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&g.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return i.type="throw",i.arg=t,n.next=e,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=g.call(o,"catchLoc"),u=g.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.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&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},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),k},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),p(n),k}},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;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:h(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),k}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";e.__esModule=!0;var r=n(22),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,n){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)}return r("next")})}}},function(t,e,n){(function(t){function e(){e=function(){},c.Symbol||(c.Symbol=s)}function n(){e();var t=c.Symbol.iterator;t||(t=c.Symbol.iterator=c.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&u(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return r(this)}}),n=function(){}}function r(t){var e=0;return o(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})}function o(t){return n(),t={next:t},t[c.Symbol.iterator]=function(){return this},t}function i(t){n(),e(),n();var o=t[Symbol.iterator];return o?o.call(t):r(t)}var a,u="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},c="undefined"!=typeof window&&window===this?this:void 0!==t&&null!=t?t:this,s=function(){var t=0;return function(e){return"jscomp_symbol_"+(e||"")+t++}}();if(!window.FormData||!window.FormData.prototype.keys){var f=function(t,e,n){if(2>arguments.length)throw new TypeError("2 arguments required, but only "+arguments.length+" present.");return e instanceof Blob?[t+"",e,void 0!==n?n+"":"string"==typeof e.name?e.name:"Blob"]:[t+"",e+""]},l=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");return[t+""]},p=function(t){var e=i(t);return t=e.next().value,e=e.next().value,t instanceof Blob&&(t=new File([t],e,{type:t.type,lastModified:t.lastModified})),t},d=window.FormData,h=window.XMLHttpRequest.prototype.send,v=window.Request&&window.fetch;e();var m=window.Symbol&&Symbol.toStringTag,y=new WeakMap,g=Array.from||function(t){return[].slice.call(t)};m&&(Blob.prototype[m]||(Blob.prototype[m]="Blob"),"File"in window&&!File.prototype[m]&&(File.prototype[m]="File"));try{new File([],"")}catch(t){window.File=function(t,e,n){return t=new Blob(t,n),n=n&&void 0!==n.lastModified?new Date(n.lastModified):new Date,Object.defineProperties(t,{name:{value:e},lastModifiedDate:{value:n},lastModified:{value:+n},toString:{value:function(){return"[object File]"}}}),m&&Object.defineProperty(t,m,{value:"File"}),t}}var b=function(t){if(y.set(this,Object.create(null)),!t)return this;t=i(g(t.elements));for(var e=t.next();!e.done;e=t.next())if(e=e.value,e.name&&!e.disabled)if("file"===e.type)for(var n=i(e.files),r=n.next();!r.done;r=n.next())this.append(e.name,r.value);else if("select-multiple"===e.type||"select-one"===e.type)for(n=i(g(e.options)),r=n.next();!r.done;r=n.next())r=r.value,r.selected&&this.append(e.name,r.value);else"checkbox"===e.type||"radio"===e.type?e.checked&&this.append(e.name,e.value):this.append(e.name,e.value)};if(a=b.prototype,a.append=function(t,e,n){var r=y.get(this);r[t]||(r[t]=[]),r[t].push([e,n])},a.delete=function(t){delete y.get(this)[t]},a.entries=function(){function t(t,n,h){for(;;)switch(l){case 0:f=y.get(d),s=[],u=f;for(a in u)s.push(a);c=0;case 1:if(!(c<s.length)){l=3;break}if((a=s[c])in u){l=4;break}l=2;break;case 4:o=i(f[a]),r=o.next();case 5:if(r.done){l=7;break}return e=r.value,l=8,{value:[a,p(e)],done:!1};case 8:if(1!=t){l=9;break}throw l=-1,h;case 9:case 6:r=o.next(),l=5;break;case 7:case 2:c++,l=1;break;case 3:l=-1;default:return{value:void 0,done:!0}}}var e,r,o,a,u,c,s,f,l=0,d=this,h={next:function(e){return t(0,e,void 0)},throw:function(e){return t(1,void 0,e)},return:function(){throw Error("Not yet implemented")}};return n(),h[Symbol.iterator]=function(){return this},h},a.forEach=function(t,e){for(var n=i(this),r=n.next();!r.done;r=n.next()){var o=i(r.value);r=o.next().value,o=o.next().value,t.call(e,o,r,this)}},a.get=function(t){var e=y.get(this);return e[t]?p(e[t][0]):null},a.getAll=function(t){return(y.get(this)[t]||[]).map(p)},a.has=function(t){return t in y.get(this)},a.keys=function(){function t(t,n,f){for(;;)switch(c){case 0:u=i(s),a=u.next();case 1:if(a.done){c=3;break}return o=a.value,r=i(o),e=r.next().value,c=4,{value:e,done:!1};case 4:if(1!=t){c=5;break}throw c=-1,f;case 5:case 2:a=u.next(),c=1;break;case 3:c=-1;default:return{value:void 0,done:!0}}}var e,r,o,a,u,c=0,s=this,f={next:function(e){return t(0,e,void 0)},throw:function(e){return t(1,void 0,e)},return:function(){throw Error("Not yet implemented")}};return n(),f[Symbol.iterator]=function(){return this},f},a.set=function(t,e,n){y.get(this)[t]=[[e,n]]},a.values=function(){function t(t,n,f){for(;;)switch(c){case 0:u=i(s),a=u.next();case 1:if(a.done){c=3;break}return o=a.value,r=i(o),r.next(),e=r.next().value,c=4,{value:e,done:!1};case 4:if(1!=t){c=5;break}throw c=-1,f;case 5:case 2:a=u.next(),c=1;break;case 3:c=-1;default:return{value:void 0,done:!0}}}var e,r,o,a,u,c=0,s=this,f={next:function(e){return t(0,e,void 0)},throw:function(e){return t(1,void 0,e)},return:function(){throw Error("Not yet implemented")}};return n(),f[Symbol.iterator]=function(){return this},f},b.prototype._asNative=function(){for(var t=new d,e=i(this),n=e.next();!n.done;n=e.next()){var r=i(n.value);n=r.next().value,r=r.next().value,t.append(n,r)}return t},b.prototype._blob=function(){for(var t="----formdata-polyfill-"+Math.random(),e=[],n=i(this),r=n.next();!r.done;r=n.next()){var o=i(r.value);r=o.next().value,o=o.next().value,e.push("--"+t+"\r\n"),o instanceof Blob?e.push('Content-Disposition: form-data; name="'+r+'"; filename="'+o.name+'"\r\n',"Content-Type: "+(o.type||"application/octet-stream")+"\r\n\r\n",o,"\r\n"):e.push('Content-Disposition: form-data; name="'+r+'"\r\n\r\n'+o+"\r\n")}return e.push("--"+t+"--"),new Blob(e,{type:"multipart/form-data; boundary="+t})},e(),n(),b.prototype[Symbol.iterator]=function(){return this.entries()},b.prototype.toString=function(){return"[object FormData]"},m&&(b.prototype[m]="FormData"),[["append",f],["delete",l],["get",l],["getAll",l],["has",l],["set",f]].forEach(function(t){var e=b.prototype[t[0]];b.prototype[t[0]]=function(){return e.apply(this,t[1].apply(this,g(arguments)))}}),XMLHttpRequest.prototype.send=function(t){t instanceof b&&(t=t._blob(),this.setRequestHeader("Content-Type",t.type)),h.call(this,t)},v){var w=window.fetch;window.fetch=function(t,e){return e&&e.body&&e.body instanceof b&&(e.body=e.body._blob()),w(t,e)}}window.FormData=b}}).call(e,n(83))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return d.test(t)}function o(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=r(t)?t.substr(6):"";return"jpeg"===n&&(n="jpg"),n&&e&&(n="."+n),n}function i(t,e,n){var r="",o=void 0;for(n+=e,o=e;o<n;o+=1)r+=h(t.getUint8(o));return r}function a(t,e){var n=new Uint8Array(t),r=n.length,o="",i=void 0;for(i=0;i<r;i+=1)o+=h(n[i]);return"data:"+e+";base64,"+m(o)}function u(t){var e=new DataView(t),n=void 0,r=void 0,o=void 0,a=void 0;if(255===e.getUint8(0)&&216===e.getUint8(1))for(var u=e.byteLength,c=2;c<u;){if(255===e.getUint8(c)&&225===e.getUint8(c+1)){o=c;break}c+=1}if(o){var s=o+4,f=o+10;if("Exif"===i(e,s,4)){var l=e.getUint16(f);if(((r=18761===l)||19789===l)&&42===e.getUint16(f+2,r)){var p=e.getUint32(f+4,r);p>=8&&(a=f+p)}}}if(a){var d=e.getUint16(a,r),h=void 0,v=void 0;for(v=0;v<d;v+=1)if(h=a+12*v+2,274===e.getUint16(h,r)){h+=8,n=e.getUint16(h,r),e.setUint16(h,1,r);break}}return n}function c(t){var e=0,n=1,r=1;switch(t){case 2:n=-1;break;case 3:e=-180;break;case 4:r=-1;break;case 5:e=90,r=-1;break;case 6:e=90;break;case 7:e=90,n=-1;break;case 8:e=-90}return{rotate:e,scaleX:n,scaleY:r}}var s=/*!
* Image Compressor v1.1.1
* https://github.com/xkeshi/image-compressor
*
* Copyright (c) 2017-2018 Xkeshi
* Released under the MIT license
*
* Date: 2018-02-28T02:34:44.169Z
*/
function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){!function(e){var n=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,r=e.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),o=r&&e.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),i=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,a=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,u=(r||i)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(t){var e,n,u,c,s,f,l,p,d;if(!(e=t.match(a)))throw new Error("invalid data URI");for(n=e[2]?e[1]:"text/plain"+(e[3]||";charset=US-ASCII"),u=!!e[4],c=t.slice(e[0].length),s=u?atob(c):decodeURIComponent(c),f=new ArrayBuffer(s.length),l=new Uint8Array(f),p=0;p<s.length;p+=1)l[p]=s.charCodeAt(p);return r?new Blob([o?l:f],{type:n}):(d=new i,d.append(f),d.getBlob(n))};e.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(t,e,r){var o=this;setTimeout(function(){t(r&&n.toDataURL&&u?u(o.toDataURL(e,r)):o.mozGetAsFile("blob",e))})}:n.toDataURL&&u&&(n.toBlob=function(t,e,n){var r=this;setTimeout(function(){t(u(r.toDataURL(e,n)))})})),t.exports?t.exports=u:e.dataURLtoBlob=u}(window)}),f=Object.prototype.toString,l=function(t){return t instanceof Blob||"[object Blob]"===f.call(t)},p={checkOrientation:!0,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,quality:.8,mimeType:"auto",convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},d=/^image\/.+$/,h=String.fromCharCode,v=window,m=v.btoa,y=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},g=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),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},w=window,x=w.ArrayBuffer,_=w.FileReader,S=window.URL||window.webkitURL,j=/\.\w+$/,L=function(){function t(e,n){y(this,t),this.result=null,e&&this.compress(e,n)}return g(t,[{key:"compress",value:function(t,e){var n=this,i=new Image;return e=b({},p,e),x||(e.checkOrientation=!1),new Promise(function(n,o){if(!l(t))return void o(new Error("The first argument must be a File or Blob object."));var i=t.type;if(!r(i))return void o(new Error("The first argument must be an image File or Blob object."));if(!S&&!_)return void o(new Error("The current browser does not support image compression."));if(S&&!e.checkOrientation)n(S.createObjectURL(t));else if(_){var s=new _,f=e.checkOrientation&&"image/jpeg"===i;s.onload=function(t){var e=t.target,r=e.result;n(f?b({url:a(r,i)},c(u(r))):{url:r})},s.onabort=o,s.onerror=o,f?s.readAsArrayBuffer(t):s.readAsDataURL(t)}}).then(function(e){return new Promise(function(n,r){i.onload=function(){return n(b({},e,{naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight}))},i.onabort=r,i.onerror=r,i.alt=t.name,i.src=e.url})}).then(function(o){var a=o.naturalWidth,u=o.naturalHeight,c=o.rotate,f=void 0===c?0:c,l=o.scaleX,p=void 0===l?1:l,d=o.scaleY,h=void 0===d?1:d;return new Promise(function(o){var c=document.createElement("canvas"),l=c.getContext("2d"),d=a/u,v=Math.max(e.maxWidth,0)||1/0,m=Math.max(e.maxHeight,0)||1/0,y=Math.max(e.minWidth,0)||0,g=Math.max(e.minHeight,0)||0,b=a,w=u;if(v<1/0&&m<1/0?m*d>v?m=v/d:v=m*d:v<1/0?m=v/d:m<1/0&&(v=m*d),y>0&&g>0?g*d>y?g=y/d:y=g*d:y>0?g=y/d:g>0&&(y=g*d),e.width>0){b=e.width,w=b/d}else if(e.height>0){var x=e;w=x.height,b=w*d}b=Math.min(Math.max(b,y),v),w=Math.min(Math.max(w,g),m);var _=-b/2,S=-w/2,j=b,L=w;if(Math.abs(f)%180==90){var O={width:w,height:b};b=O.width,w=O.height}c.width=b,c.height=w,r(e.mimeType)||(e.mimeType=t.type);var E="transparent";t.size>e.convertSize&&"image/png"===e.mimeType&&(E="#fff",e.mimeType="image/jpeg"),l.fillStyle=E,l.fillRect(0,0,b,w),l.save(),l.translate(b/2,w/2),l.rotate(f*Math.PI/180),l.scale(p,h),e.beforeDraw&&e.beforeDraw.call(n,l,c),l.drawImage(i,Math.floor(_),Math.floor(S),Math.floor(j),Math.floor(L)),e.drew&&e.drew.call(n,l,c),l.restore();var M=function(t){o({naturalWidth:a,naturalHeight:u,result:t})};c.toBlob?c.toBlob(M,e.mimeType,e.quality):M(s(c.toDataURL(e.mimeType,e.quality)))})}).then(function(r){var a=r.naturalWidth,u=r.naturalHeight,c=r.result;if(S&&S.revokeObjectURL(i.src),c)if(c.size>t.size&&e.mimeType===t.type&&!(e.width>a||e.height>u||e.minWidth>a||e.minHeight>u))c=t;else{var s=new Date;c.lastModified=s.getTime(),c.lastModifiedDate=s,c.name=t.name,c.name&&c.type!==t.type&&(c.name=c.name.replace(j,o(c.type)))}else c=t;return n.result=c,e.success&&e.success.call(n,c),Promise.resolve(c)}).catch(function(t){if(!e.error)throw t;e.error.call(n,t)})}}]),t}();e.a=L},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"vue-img-uploader"}},[n("input",{attrs:{type:"file",accept:"image/*",id:t.componentId},on:{change:t.getFile}}),t._v(" "),t.files.length>0?t._l(t.files,function(e,r){return n("div",{key:e.name+r,staticClass:"vue-thumbnail-wrapper"},[n("div",{staticClass:"del-button",on:{click:function(n){t.deleteImg(e.name,r)}}},[t._v("×")]),t._v(" "),n("img",{directives:[{name:"gallery",rawName:"v-gallery:vueImgUploader",arg:"vueImgUploader"}],staticClass:"vue-img-thumbnail",style:t.tbstyle,attrs:{"data-index":r,src:e.src}})])}):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"loading",style:t.tbstyle},[n("div",{staticClass:"donut"})]),t._v(" "),t.files.length<t.max&&!t.loading?n("label",{attrs:{for:t.componentId}},[t._t("addButton"),t._v(" "),t.$slots.addButton?t._e():n("div",{staticClass:"default"},[t._v("+")])],2):t._e()],2)},o=[],i={render:r,staticRenderFns:o};e.a=i}])});
//# sourceMappingURL=index.js.map