cvs
Version:
A basic canvas framework for 2d drawing.
1 lines • 107 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cvs=e():t.cvs=e()}(this,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=91)}([function(t,e){var r=t.exports={version:"2.6.0"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(4),i=r(0),a=r(13),o=r(14),u=r(16),s=function(t,e,r){var c,f,l,h=t&s.F,d=t&s.G,v=t&s.S,p=t&s.P,y=t&s.B,m=t&s.W,g=d?i:i[e]||(i[e]={}),b=g.prototype,x=d?n:v?n[e]:(n[e]||{}).prototype;for(c in d&&(r=e),r)(f=!h&&x&&void 0!==x[c])&&u(g,c)||(l=f?x[c]:r[c],g[c]=d&&"function"!=typeof x[c]?r[c]:y&&f?a(l,n):m&&x[c]==l?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):p&&"function"==typeof l?a(Function.call,l):l,p&&((g.virtual||(g.virtual={}))[c]=l,t&s.R&&b&&!b[c]&&o(b,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(112));e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(t,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(51)("wks"),i=r(41),a=r(4).Symbol,o="function"==typeof a;(t.exports=function(t){return n[t]||(n[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMobile=e.cancelAnim=e.animFrame=e.tolerance=e.period=void 0;var n=s(r(7)),i=s(r(36)),a=s(r(19)),o=s(r(86));e.remove=function(t,e){var r=t.findIndex(function(t){return t.id===e.id});r>-1&&t.splice(r,1)},e.getItem=function(t,e){var r=t.findIndex(function(t){return t.id===e});return t[r]},e.error=function(t){throw Error("cvs: "+t)},e.getValInObj=c,e.arrSort=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.length?(t.sort(function(t,n){return r?c(n,e)-c(t,e):c(t,e)-c(n,e)}),t):t},e.arrSort2=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.length?(t.sort(function(t,n){return r?n.attr(e)-t.attr(e):t.attr(e)-n.attr(e)}),t):t},e.createCtx=function(t,e){var r=l.cloneNode();t&&(r.width=t);e&&(r.height=e);return r.getContext("2d")},e.forArr=function(t,e,r){var n=t.length;if(r)for(var i=n-1;i>-1;i--)e(t[i],i);else for(var a=0;a<n;a++)e(t[a],a)},e.forObj=function(t,e){(0,o.default)(t).forEach(function(t){var r=(0,a.default)(t,2),n=r[0],i=r[1];e(n,i)})},e.getMatrix=function(t){var e=new u.default;Array.isArray(t)?e.multiply(t):"object"===(void 0===t?"undefined":(0,i.default)(t))&&(0,o.default)(t).forEach(function(t){var r=(0,a.default)(t,2),i=r[0],o=r[1];/\b(scale|translate|skew)\b/.test(i)?e[i].apply(e,(0,n.default)(h(o))):"rotate"===i?e[i](o):"transform"===i&&e.multiply(o)});return e.m},e.oneOrTwoValues=h,e.getRelativePos=function(t,e,r,n){return{x:t-r,y:e-n}},e.getFloatNum=function(t){return t.split("%")[0]/100};var u=s(r(63));function s(t){return t&&t.__esModule?t:{default:t}}function c(t,e){return e.split(".").reduce(function(t,e){return t[e]},t)}var f=e.period=16,l=(e.tolerance=50,e.animFrame=requestAnimationFrame||webkitRequestAnimationFrame||mozRequestAnimationFrame||oRequestAnimationFrame||msRequestAnimationFrame||function(t){setTimeout(t,f)},e.cancelAnim=cancelAnimationFrame||webkitCancelAnimationFrame||mozCancelAnimationFrame||msCancelAnimationFrame||function(t){clearTimeout(t)},e.isMobile=!!navigator.userAgent.match(/\b(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),document.createElement("canvas"));function h(t){return Array.isArray(t)?1===t.length?[t[0],t[0]]:t:[t,t]}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(85));e.default=function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return(0,n.default)(t)}},function(t,e,r){var n=r(11),i=r(66),a=r(46),o=Object.defineProperty;e.f=r(12)?Object.defineProperty:function(t,e,r){if(n(t),e=a(e,!0),n(r),i)try{return o(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){t.exports={default:r(93),__esModule:!0}},function(t,e,r){var n=r(9);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(26);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(8),i=r(27);t.exports=r(12)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(47),i=r(48);t.exports=function(t){return n(i(t))}},function(t,e,r){t.exports={default:r(115),__esModule:!0}},function(t,e,r){"use strict";e.__esModule=!0;var n=a(r(126)),i=a(r(129));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,n.default)(Object(t)))return function(t,e){var r=[],n=!0,a=!1,o=void 0;try{for(var u,s=(0,i.default)(t);!(n=(u=s.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,r){t.exports={default:r(161),__esModule:!0}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(36));e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,n.default)(e))&&"function"!=typeof e?t:e}},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(164)),i=o(r(168)),a=o(r(36));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,a.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n.default?(0,n.default)(t,e):t.__proto__=e)}},function(t,e,r){"use strict";var n=r(101)(!0);r(55)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e){t.exports={}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=v(r(36)),i=v(r(10)),a=v(r(37)),o=v(r(2)),u=v(r(3)),s=v(r(18)),c=v(r(149)),f=v(r(90)),l=v(r(39)),h=v(r(172)),d=r(6);function v(t){return t&&t.__esModule?t:{default:t}}var p=(0,s.default)("keyframeArr"),y=(0,s.default)("trackArr"),m=(0,s.default)("attribute"),g=(0,s.default)("events"),b=(0,s.default)("collisionState"),x=["lineCap","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],_=["transform","translate","scale","skew","rotate","stroke","fill","transformOrigin"],w=0,M=function(){function t(e){var r=this;(0,o.default)(this,t),this[m]=new c.default,"string"==typeof e.id?(this.id=e.id,delete e.id):this.id=w++,(0,d.forObj)(e,function(t,e){r[m][t]=e}),this[p]=[],this[y]=[],this[g]=new a.default,this[b]=!1,this.needUpdate=!1}return(0,u.default)(t,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new(0,this.constructor)((0,i.default)({},this.attr(),t))}},{key:"changeState",value:function(t){var e=this.attr();for(var r in e){var n=e[r];"stroke"===r?t.strokeStyle=n:"fill"===r?t.fillStyle=n:"opacity"===r?t.globalAlpha=n:x.indexOf(r)>-1&&(t[r]=n)}}},{key:"attr",value:function(t){var e=this;return t?"string"==typeof t?this[m].get(t):(this.needUpdate=!1,void(0,d.forObj)(t,function(t,r){!/\b(x|y)\b/.test(t)&&(x.indexOf(t)>-1||_.indexOf(t)>-1)&&(e.needUpdate=!0),"function"==typeof r?e[m][t]=r(e[m].get(t)):"object"===(void 0===r?"undefined":(0,n.default)(r))?e[m][t]=(0,i.default)({},e[m].get(t)||{},r):e[m][t]=r})):this[m]}},{key:"isCollision",value:function(t){var e=t.x,r=t.y;return this.outline.isPointInPath(e-this.attr("x"),r-this.attr("y"))}},{key:"on",value:function(t,e){this[g].set(t,e)}},{key:"off",value:function(t){this[g].delete(t)}},{key:"emit",value:function(t){if(this.attr("visible")&&("mousemove"===t.type||this[g].has(t.type))&&("mousemove"!==t.type||this[g].has(t.type)||this[g].has("mouseenter")||this[g].has("mouseleave"))){var e=this.isCollision(t);"mousemove"===t.type&&(e&&!this[b]?(this[b]=!0,this[g].has("mouseenter")&&this[g].get("mouseenter")(t)):!e&&this[b]&&(this[b]=!1,this[g].has("mouseleave")&&this[g].get("mouseleave")(t))),e&&this[g].has(t.type)&&this[g].get(t.type)(t)}}},{key:"keyframe",value:function(t,e,r){return this[p].push(new h.default(this,t,e,r)),this}},{key:"track",value:function(t,e){/\b(line|bezier|round|ellipse|custom)\b/.test(t)||(0,d.error)("the type of track must be line, bezier, round or ellipse.");var r=null;return"bezier"===t&&(r=new f.default(e)),"custom"===t&&(r=new l.default(e)),r.$ele=this,this[y].push(r),this}},{key:"animate",value:function(){var t=this.timeline.currentTime;this[p].forEach(function(e){e.run(t)})}},{key:"getCurTrack",value:function(t){var e={},r=0,n=0;return this[y].some(function(i,a){return r+=i.delay,n=r+i.duration*i.iterationCount,t<r?(e.index=a,e.cycle=-1,!0):t>=r&&t<=n?(e.index=a,i.duration===1/0?(e.cycle=0,e.time=t-r):(e.cycle=Math.floor((t-r)/i.duration),e.time=t-r-e.cycle*i.duration),!0):void(r=n)}),e}},{key:"size",get:function(){if("boolean"!=typeof this.isVirtual||!this.isVirtual)return this.outline||this.setOutline(),this.outline.size.slice()}},{key:"center",get:function(){if("boolean"!=typeof this.isVirtual||!this.isVirtual){this.outline||this.setOutline();var t=this.attr("x"),e=this.attr("y");return this.outline.center.map(function(r,n){return n%2?r+e:r+t})}}},{key:"bounds",get:function(){if("boolean"!=typeof this.isVirtual||!this.isVirtual){this.outline||this.setOutline();var t=this.attr("x"),e=this.attr("y");return this.outline.bounds.map(function(r,n){return n%2?r+e:r+t})}}},{key:"_ctx",set:function(t){this.ctx=t,this.children&&this.children.length>0&&this.children.forEach(function(e){e._ctx=t})}},{key:"_layer",set:function(t){this.layer=t,this.children&&this.children.length>0&&this.children.forEach(function(e){e._layer=t})}},{key:"_timeline",set:function(t){this.timeline=t,this.children&&this.children.length>0&&this.children.forEach(function(e){e._timeline=t})}},{key:"animatable",get:function(){return this[y].length>0||this[p].length>0}}]),t}();e.default=M},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(67),i=r(52);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(48);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(8).f,i=r(16),a=r(5)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,a)&&n(t,a,{configurable:!0,value:e})}},function(t,e,r){r(104);for(var n=r(4),i=r(14),a=r(24),o=r(5)("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(","),s=0;s<u.length;s++){var c=u[s],f=n[c],l=f&&f.prototype;l&&!l[o]&&i(l,o,c),a[c]=a.Array}},function(t,e,r){var n=r(13),i=r(73),a=r(74),o=r(11),u=r(40),s=r(57),c={},f={};(e=t.exports=function(t,e,r,l,h){var d,v,p,y,m=h?function(){return t}:s(t),g=n(r,l,e?2:1),b=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(a(m)){for(d=u(t.length);d>b;b++)if((y=e?g(o(v=t[b])[0],v[1]):g(t[b]))===c||y===f)return y}else for(p=m.call(t);!(v=p.next()).done;)if((y=i(p,g,v.value,e))===c||y===f)return y}).BREAK=c,e.RETURN=f},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(124)),i=o(r(18)),a="function"==typeof i.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function o(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===a(n.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,e,r){t.exports={default:r(135),__esModule:!0}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s(r(19)),i=s(r(7)),a=s(r(36));e.default=function(t){if("string"==typeof t)return new u.default(t);if("object"===(void 0===t?"undefined":(0,a.default)(t))){var e="";t.path?e=t.path:"rect"===t.type?e=function(t){if(t.borderRadius){var e=[],r=t.borderRadius,n=t.x||0,i=t.y||0,a=t.w,o=t.h;r instanceof Array?r.length>=4?e=r.slice(0,4):3===r.length?(e[1]=e[3]=r[1],e[0]=r[0],e[2]=r[2]):2===r.length&&(e[0]=e[2]=r[0],e[1]=e[3]=r[1]):e=new Array(4).fill(r);var u=e.map(function(t,e){return 0===e?"a "+t+" "+t+" 0 0 1 "+t+" -"+t:1===e?"a "+t+" "+t+" 0 0 1 "+t+" "+t:2===e?"a "+t+" "+t+" 0 0 1 -"+t+" "+t:3===e?"a "+t+" "+t+" 0 0 1 -"+t+" -"+t:void 0}),s=e.map(function(t,r){return 0===r?"h "+(a-e[0]-e[1]):1===r?"v "+(o-e[1]-e[2]):2===r?"h "+-1*(a-e[2]-e[3]):void 0});return"M "+n+" "+(i+e[0])+" "+u[0]+" "+s[0]+" "+u[1]+" "+s[1]+" "+u[2]+" "+s[2]+" "+u[3]+" z"}return"M "+(t.x||0)+" "+(t.y||0)+" h "+t.w+" v "+t.h+" h -"+t.w+" z"}(t):"circle"===t.type?e=function(t){var e=(0,o.oneOrTwoValues)(t.r),r=(0,n.default)(e,2),i=r[0],a=r[1],u=t.cx,s=void 0===u?i:u,c=t.cy,f=void 0===c?a:c,l=t.rotate,h=void 0===l?0:l,d=function(t){var e=t.cx,r=t.cy,n=t.rx,i=t.ry,a=t.rotate;return function(t){var o=n*Math.cos(t*Math.PI/180),u=i*Math.sin(t*Math.PI/180),s=e+o*Math.cos(a*Math.PI/180)-u*Math.sin(a*Math.PI/180),c=r+o*Math.sin(a*Math.PI/180)+u*Math.cos(a*Math.PI/180);return{x:s,y:c}}}({cx:s,cy:f,rx:i,ry:a,rotate:h}),v=d(0),p=d(-1);return"M "+v.x+" "+v.y+" A "+i+" "+a+" "+h+" 1 1 "+p.x+" "+p.y+" z"}(t):(0,o.error)("unexpected type of path.");var r=new u.default(e),s=(0,o.getMatrix)(t);return r.transform.apply(r,(0,i.default)(s)),r}};var o=r(6),u=s(r(150));function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=f(r(7)),i=f(r(10)),a=f(r(2)),o=f(r(3)),u=f(r(18)),s=r(6),c=r(65);function f(t){return t&&t.__esModule?t:{default:t}}var l=0,h=(0,u.default)("easing"),d=function(){function t(e){(0,a.default)(this,t),this.id=l++,this.delay=0,this.duration=0,this.retrace=!1,this.iterationCount=1,this.easing="linear",(0,i.default)(this,e);var r=this.easing;"string"==typeof r?this[h]=c.Easings[r]:Array.isArray(r)&&4===r.length?this[h]=c.getBezierEasing.apply(void 0,(0,n.default)(r)):(0,s.error)("easing must be a string or an array has four items")}return(0,o.default)(t,[{key:"calculatePercentage",value:function(t){return t>1?1:this[h](t)}}]),t}();e.default=d},function(t,e,r){var n=r(49),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){t.exports={default:r(100),__esModule:!0}},function(t,e,r){var n=r(11),i=r(103),a=r(52),o=r(50)("IE_PROTO"),u=function(){},s=function(){var t,e=r(45)("iframe"),n=a.length;for(e.style.display="none",r(70).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;n--;)delete s.prototype[a[n]];return s()};t.exports=Object.create||function(t,e){var r;return null!==t?(u.prototype=n(t),r=new u,u.prototype=null,r[o]=t):r=s(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(29),i=r(5)("toStringTag"),a="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?n(e):"Object"==(o=n(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,r){var n=r(9),i=r(4).document,a=n(i)&&n(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,r){var n=r(9);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(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){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(51)("keys"),i=r(41);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e,r){var n=r(0),i=r(4),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(30)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){},function(t,e,r){"use strict";var n=r(30),i=r(1),a=r(69),o=r(14),u=r(24),s=r(102),c=r(33),f=r(71),l=r(5)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,r,v,p,y,m){s(r,e,v);var g,b,x,_=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},w=e+" Iterator",M="values"==p,k=!1,P=t.prototype,O=P[l]||P["@@iterator"]||p&&P[p],E=O||_(p),T=p?M?_("entries"):E:void 0,j="Array"==e&&P.entries||O;if(j&&(x=f(j.call(new t)))!==Object.prototype&&x.next&&(c(x,w,!0),n||"function"==typeof x[l]||o(x,l,d)),M&&O&&"values"!==O.name&&(k=!0,E=function(){return O.call(this)}),n&&!m||!h&&!k&&P[l]||o(P,l,E),u[e]=E,u[w]=d,p)if(g={values:M?E:_("values"),keys:y?E:_("keys"),entries:T},m)for(b in g)b in P||a(P,b,g[b]);else i(i.P+i.F*(h||k),e,g);return g}},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){var n=r(44),i=r(5)("iterator"),a=r(24);t.exports=r(0).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||a[n(t)]}},function(t,e,r){"use strict";var n=r(26);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e,r){var n=r(14);t.exports=function(t,e,r){for(var i in e)r&&t[i]?t[i]=e[i]:n(t,i,e[i]);return t}},function(t,e,r){var n=r(41)("meta"),i=r(9),a=r(16),o=r(8).f,u=0,s=Object.isExtensible||function(){return!0},c=!r(15)(function(){return s(Object.preventExtensions({}))}),f=function(t){o(t,n,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,n)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[n].i},getWeak:function(t,e){if(!a(t,n)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[n].w},onFreeze:function(t){return c&&l.NEED&&s(t)&&!a(t,n)&&f(t),t}}},function(t,e,r){e.f=r(5)},function(t,e,r){var n=r(4),i=r(0),a=r(30),o=r(61),u=r(8).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:o.f(t)})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(2)),i=a(r(3));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(e){(0,n.default)(this,t),e=e||[1,0,0,1,0,0],this.m=[e[0],e[1],e[2],e[3],e[4],e[5]]}return(0,i.default)(t,[{key:"unit",value:function(){return this.m=[1,0,0,1,0,0],this}},{key:"multiply",value:function(e){var r=this.m,n=void 0;n=e instanceof t?e.m:e;var i=r[0]*n[0]+r[2]*n[1],a=r[1]*n[0]+r[3]*n[1],o=r[0]*n[2]+r[2]*n[3],u=r[1]*n[2]+r[3]*n[3],s=r[0]*n[4]+r[2]*n[5]+r[4],c=r[1]*n[4]+r[3]*n[5]+r[5];return r[0]=i,r[1]=a,r[2]=o,r[3]=u,r[4]=s,r[5]=c,this}},{key:"inverse",value:function(){var e=new t(this.m),r=e.m,n=1/(r[0]*r[3]-r[1]*r[2]),i=r[3]*n,a=-r[1]*n,o=-r[2]*n,u=r[0]*n,s=n*(r[2]*r[5]-r[3]*r[4]),c=n*(r[1]*r[4]-r[0]*r[5]);return r[0]=i,r[1]=a,r[2]=o,r[3]=u,r[4]=s,r[5]=c,e}},{key:"translate",value:function(t,e){return this.multiply([1,0,0,1,t,e])}},{key:"rotate",value:function(t){var e=t*Math.PI/180,r=Math.cos(e),n=Math.sin(e);return this.multiply([r,n,-n,r,0,0])}},{key:"skew",value:function(t,e){e|=0;var r=t*Math.PI/180,n=e*Math.PI/180,i=Math.tan(r),a=Math.tan(n);return this.multiply([1,a,i,1,0,0])}},{key:"scale",value:function(t,e){return this.multiply([t,0,0,e,0,0])}},{key:"transformPoint",value:function(t,e){var r=t,n=e;return[t=r*this.m[0]+n*this.m[2]+this.m[4],e=r*this.m[1]+n*this.m[3]+this.m[5]]}},{key:"transformVector",value:function(t,e){var r=t,n=e;return[t=r*this.m[0]+n*this.m[2],e=r*this.m[1]+n*this.m[3]]}}]),t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadedPromise=e.loadedResources=void 0;var n=a(r(42)),i=a(r(37));function a(t){return t&&t.__esModule?t:{default:t}}e.loadTexture=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e4;if(o.has(t))return u.get(t);var i=new n.default(function(n,i){var a=setTimeout(function(){i(new Error("load image timeout"))},r);s(e).then(function(e){n(e),o.set(t,e),clearTimeout(a)})});return u.set(t,i),i},e.loadImage=s;var o=e.loadedResources=new i.default,u=e.loadedPromise=new i.default;function s(t){return new n.default(function(e,r){var n=new Image;n.onload=function(){e(n)},n.onerror=function(){r(new Error("Could not load image at "+t))},n.src=t})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBezierEasing=e.Easings=void 0;var n=a(r(37)),i=a(r(171));function a(t){return t&&t.__esModule?t:{default:t}}var o=new n.default;function u(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=o.get(e);return n||(n=i.default.apply(void 0,e),o.set(e,n),n)}var s={linear:function(t){return t},ease:u(.25,.1,.25,1),"ease-in":u(.42,0,1,1),"ease-out":u(0,0,.58,1),"ease-in-out":u(.42,0,.58,1)};e.Easings=s,e.getBezierEasing=u},function(t,e,r){t.exports=!r(12)&&!r(15)(function(){return 7!=Object.defineProperty(r(45)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(16),i=r(17),a=r(96)(!1),o=r(50)("IE_PROTO");t.exports=function(t,e){var r,u=i(t),s=0,c=[];for(r in u)r!=o&&n(u,r)&&c.push(r);for(;e.length>s;)n(u,r=e[s++])&&(~a(c,r)||c.push(r));return c}},function(t,e,r){t.exports=r(98)},function(t,e,r){t.exports=r(14)},function(t,e,r){var n=r(4).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(16),i=r(32),a=r(50)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){var n=r(11);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var a=t.return;throw void 0!==a&&n(a.call(t)),e}}},function(t,e,r){var n=r(24),i=r(5)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||a[i]===t)}},function(t,e,r){var n=r(11),i=r(26),a=r(5)("species");t.exports=function(t,e){var r,o=n(t).constructor;return void 0===o||void 0==(r=n(o)[a])?e:i(r)}},function(t,e,r){var n,i,a,o=r(13),u=r(107),s=r(70),c=r(45),f=r(4),l=f.process,h=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,p=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){g.call(t.data)};h&&d||(h=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return m[++y]=function(){u("function"==typeof t?t:Function(t),e)},n(y),y},d=function(t){delete m[t]},"process"==r(29)(l)?n=function(t){l.nextTick(o(g,t,1))}:p&&p.now?n=function(t){p.now(o(g,t,1))}:v?(a=(i=new v).port2,i.port1.onmessage=b,n=o(a.postMessage,a,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):n="onreadystatechange"in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),g.call(t)}}:function(t){setTimeout(o(g,t,1),0)}),t.exports={set:h,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,r){var n=r(11),i=r(9),a=r(58);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=a.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){"use strict";var n=r(4),i=r(0),a=r(8),o=r(12),u=r(5)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:n[t];o&&e&&!e[u]&&a.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(5)("iterator"),i=!1;try{var a=[7][n]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var a=[7],o=a[n]();o.next=function(){return{done:r=!0}},a[n]=function(){return o},t(a)}catch(t){}return r}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(42));e.default=function(t){return function(){var e=t.apply(this,arguments);return new n.default(function(t,r){return function i(a,o){try{var u=e[a](o),s=u.value}catch(t){return void r(t)}if(!u.done)return n.default.resolve(s).then(function(t){i("next",t)},function(t){i("throw",t)});t(s)}("next")})}}},function(t,e,r){var n=r(29);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(67),i=r(52).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},function(t,e,r){var n=r(31),i=r(27),a=r(17),o=r(46),u=r(16),s=r(66),c=Object.getOwnPropertyDescriptor;e.f=r(12)?c:function(t,e){if(t=a(t),e=o(e,!0),s)try{return c(t,e)}catch(t){}if(u(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){t.exports={default:r(121),__esModule:!0}},function(t,e,r){t.exports={default:r(132),__esModule:!0}},function(t,e,r){var n=r(9);t.exports=function(t,e){if(!n(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=h(r(68)),i=h(r(42)),a=h(r(81)),o=h(r(10)),u=h(r(2)),s=h(r(3)),c=h(r(25)),f=r(6),l=r(64);function h(t){return t&&t.__esModule?t:{default:t}}var d=0,v=function(){function t(e){(0,u.default)(this,t),this.id=d++,this.children=[],this.stop=null,this.initAnimateTime=0,this.pauseTime=0,this.finishedAinmCount=0,this.isPause=!1,(0,o.default)(this,{zIndex:0,handleEvent:!0},e),this.init()}return(0,s.default)(t,[{key:"preload",value:function(){var t=(0,a.default)(n.default.mark(function t(e){var r,a,o,u;return n.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(u in r=[],a={},o=function(t){r.push((0,l.loadTexture)(t,e[t]).then(function(e){a[t]=e}))},e)o(u);return t.next=5,i.default.all(r);case 5:return t.abrupt("return",a);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"init",value:function(){this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.ctx=(0,f.createCtx)(this.width,this.height),this.ctx.canvas.style.cssText="position: absolute; top: 0px; left: 0px;z-index:"+this.zIndex,this.container.appendChild(this.ctx.canvas)}},{key:"element",value:function(t){return(0,f.getItem)(this.children,t)}},{key:"emitEvent",value:function(t,e){var r=this;(0,f.forArr)(t,function(t){t.emit&&t.emit(e),t.children&&t.children.length>0&&(e.x-=t.attr("x"),e.y-=t.attr("y"),r.emitEvent(t.children,e))},!0)}},{key:"dispatchEvent",value:function(t){var e=t.originalEvent,r=e.target.getBoundingClientRect(),n=r.left,i=r.top,a=e.changedTouches?e.changedTouches[0]:e,u=a.clientX,s=a.clientY;this.emitEvent(this.children,(0,o.default)(t,{x:Math.round((0|u)-n),y:Math.round((0|s)-i)}))}},{key:"append",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach(function(e){e instanceof c.default||(0,f.error)("Function add only accept the instance of Element."),e._layer=t,e._ctx=t.ctx,e._timeline=t.timeline.fork(),t.children.push(e),(0,f.arrSort2)(t.children,"zIndex")}),this}},{key:"remove",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];r.length?r.forEach(function(e){(0,f.remove)(t.children,e)}):this.children=[]}},{key:"draw",value:function(){var t=this;this.children.forEach(function(e){e.attr("visible")&&e.render.call(e,t.ctx)})}},{key:"clear",value:function(){this.ctx.clearRect(0,0,this.width,this.height)}},{key:"animate",value:function(){var t=this;(0,f.animFrame)(function e(){t.stop=(0,f.animFrame)(e),t.clear(),(0,f.forArr)(t.children,function(t){t.animatable&&t.animate()}),t.draw()})}},{key:"cancelAnimate",value:function(){this.stop&&(0,f.cancelAnim)(this.stop)}}]),t}();e.default=v},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(r(19));e.default=function(t){for(var e,r=[],a=0,s=0,c=0,f=0,l=null,h=null,d=0,v=0,p=0,y=t.length;p<y;p++){var m=t[p],g=m[0];switch(g){case"M":c=m[1],f=m[2];break;case"A":var b=(0,i.default)(d,v,m[6],m[7],m[4],m[5],m[1],m[2],m[3]);if(!b.length)continue;b=b.map(function(t){var e=(0,n.default)(t,8),r=(e[0],e[1],e[2]),i=e[3],a=e[4],o=e[5],u=e[6],s=e[7];return{x1:r,y1:i,x2:a,y2:o,x:u,y:s}});for(var x,_=0;_<b.length;_++)x=b[_],m=["C",x.x1,x.y1,x.x2,x.y2,x.x,x.y],_<b.length-1&&r.push(m);break;case"S":var w=d,M=v;"C"!=e&&"S"!=e||(w+=w-a,M+=M-s),m=["C",w,M,m[1],m[2],m[3],m[4]];break;case"T":"Q"==e||"T"==e?(l=2*d-l,h=2*v-h):(l=d,h=v),m=u(d,v,l,h,m[1],m[2]);break;case"Q":l=m[1],h=m[2],m=u(d,v,m[1],m[2],m[3],m[4]);break;case"L":m=o(d,v,m[1],m[2]);break;case"H":m=o(d,v,m[1],v);break;case"V":m=o(d,v,d,m[1]);break;case"Z":m=o(d,v,c,f)}e=g,d=m[m.length-2],v=m[m.length-1],m.length>4?(a=m[m.length-4],s=m[m.length-3]):(a=d,s=v),r.push(m)}return r};var i=a(r(154));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e,r,n){return["C",t,e,r,n,r,n]}function u(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=f(r(20)),i=f(r(2)),a=f(r(3)),o=f(r(21)),u=f(r(22)),s=f(r(39)),c=r(6);function f(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){return(0,i.default)(this,e),(0,o.default)(this,(e.__proto__||(0,n.default)(e)).call(this,t))}return(0,u.default)(e,t),(0,a.default)(e,[{key:"loop",value:function(t){var e=t/this.duration;if(!(e>1)){var r=0;if(this.retrace)if(e<=.5)r=this.calculatePercentage(2*e);else{var n=1-2*(e-.5);(1-e)*this.duration<c.tolerance&&(n=0),r=this.calculatePercentage(n)}else r=this.calculatePercentage(e);this.drawnode(r)}}},{key:"drawnode",value:function(t){this.$ele.attr(function(t,e){var r=0,n=0,i=t.length-1;return t.forEach(function(t,a){var o=function t(e,r){return 0===r?1:e===r?1:t(e-1,r-1)+t(e-1,r)}(i,a),u=Math.pow(1-e,i-a),s=Math.pow(e,a);r+=o*t.x*u*s,n+=o*t.y*u*s}),{x:r,y:n}}(this.points,t))}}]),e}(s.default);e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.easing=e.Ellipse=e.Round=e.Bezier=e.Track=e.Path=e.Text=e.Image=e.Group=e.Element=e.Layer=e.Scene=void 0;var n=p(r(92)),i=p(r(88)),a=p(r(25)),o=p(r(178)),u=p(r(179)),s=p(r(180)),c=p(r(181)),f=p(r(39)),l=p(r(90)),h=p(r(183)),d=p(r(184)),v=p(r(65));function p(t){return t&&t.__esModule?t:{default:t}}e.Scene=n.default,e.Layer=i.default,e.Element=a.default,e.Group=o.default,e.Image=s.default,e.Text=c.default,e.Path=u.default,e.Track=f.default,e.Bezier=l.default,e.Round=h.default,e.Ellipse=d.default,e.easing=v.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=v(r(10)),i=v(r(68)),a=v(r(42)),o=v(r(81)),u=v(r(2)),s=v(r(3)),c=v(r(18)),f=r(6),l=r(64),h=v(r(88)),d=v(r(177));function v(t){return t&&t.__esModule?t:{default:t}}var p=["mousedown","mouseup","mousemove","touchstart","touchend","touchmove","click"],y=(0,c.default)("layers"),m=function(){function t(e){var r=this;(0,u.default)(this,t),this.container=document.getElementById(e.containerId),this[y]=[],this.timeline=new d.default,p.forEach(function(t){return r.delegateEvent(t)})}return(0,s.default)(t,[{key:"preload",value:function(){var t=(0,o.default)(i.default.mark(function t(e){var r,n;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],n={},(0,f.forObj)(e,function(t,e){r.push((0,l.loadTexture)(t,e).then(function(e){n[t]=e}))}),t.next=4,a.default.all(r);case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"delegateEvent",value:function(t){var e=this;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container).addEventListener(t,function(r){var n={type:t,originalEvent:r,stopDispatch:function(){this.terminated=!0}};e[y].forEach(function(t){t.handleEvent&&t.dispatchEvent(n)})}),!0}},{key:"layer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.default)(t,{container:this.container});var e=new h.default(t);return e.timeline=this.timeline.fork(),this[y].push(e),(0,f.arrSort)(this[y],"zIndex"),e}},{key:"remove",value:function(t){t?(0,f.remove)(this[y],t):this[y]=[]}}]),t}();e.default=m},function(t,e,r){r(94),t.exports=r(0).Object.assign},function(t,e,r){var n=r(1);n(n.S+n.F,"Object",{assign:r(95)})},function(t,e,r){"use strict";var n=r(28),i=r(53),a=r(31),o=r(32),u=r(47),s=Object.assign;t.exports=!s||r(15)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n})?function(t,e){for(var r=o(t),s=arguments.length,c=1,f=i.f,l=a.f;s>c;)for(var h,d=u(arguments[c++]),v=f?n(d).concat(f(d)):n(d),p=v.length,y=0;p>y;)l.call(d,h=v[y++])&&(r[h]=d[h]);return r}:s},function(t,e,r){var n=r(17),i=r(40),a=r(97);t.exports=function(t){return function(e,r,o){var u,s=n(e),c=i(s.length),f=a(o,c);if(t&&r!=r){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){var n=r(49),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=n(t))<0?i(t+e,0):a(t,e)}},function(t,e,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(99),i)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",c="object"==typeof t,f=e.regeneratorRuntime;if(f)c&&(t.exports=f);else{(f=e.regeneratorRuntime=c?t.exports:{}).wrap=x;var l="suspendedStart",h="suspendedYield",d="executing",v="completed",p={},y={};y[o]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==n&&i.call(g,o)&&(y=g);var b=k.prototype=w.prototype=Object.create(y);M.prototype=b.constructor=k,k.constructor=M,k[s]=M.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===M||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},f.awrap=function(t){return{__await:t}},P(O.prototype),O.prototype[u]=function(){return this},f.AsyncIterator=O,f.async=function(t,e,r,n){var i=new O(x(t,e,r,n));return f.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},P(b),b[s]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},f.values=A,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 n(n,i){return u.type="throw",u.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;j(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),p}}}function x(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),o=new S(n||[]);return a._invoke=function(t,e,r){var n=l;return function(i,a){if(n===d)throw new Error("Generator is already running");if(n===v){if("throw"===i)throw a;return C()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var u=E(o,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var s=_(t,e,r);if("normal"===s.type){if(n=r.done?v:h,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(t,r,o),a}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function w(){}function M(){}function k(){}function P(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(r,n){function a(){return new Promise(function(e,a){!function e(r,n,a,o){var u=_(t[r],t,n);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,a,o)},function(t){e("throw",t,a,o)}):Promise.resolve(c).then(function(t){s.value=t,a(s)},o)}o(u.arg)}(r,n,e,a)})}return e=e?e.then(a,a):a()}}function E(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=_(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function T(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:C}}function C(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,r){r(54),r(23),r(34),r(106),r(110),r(111),t.exports=r(0).Promise},function(t,e,r){var n=r(49),i=r(48);t.exports=function(t){return function(e,r){var a,o,u=String(i(e)),s=n(r),c=u.length;return s<0||s>=c?t?"":void 0:(a=u.charCodeAt(s))<55296||a>56319||s+1===c||(o=u.charCodeAt(s+1))<56320||o>57343?t?u.charAt(s):a:t?u.slice(s,s+2):o-56320+(a-55296<<10)+65536}}},function(t,e,r){"use strict";var n=r(43),i=r(27),a=r(33),o={};r(14)(o,r(5)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(o,{next:i(1,r)}),a(t,e+" Iterator")}},function(t,e,r){var n=r(8),i=r(11),a=r(28);t.exports=r(12)?Object.defineProperties:function(t,e){i(t);for(var r,o=a(e),u=o.length,s=0;u>s;)n.f(t,r=o[s++],e[r]);return t}},function(t,e,r){"use strict";var n=r(105),i=r(72),a=r(24),o=r(17);t.exports=r(55)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n,i,a,o,u=r(30),s=r(4),c=r(13),f=r(44),l=r(1),h=r(9),d=r(26),v=r(56),p=r(35),y=r(75),m=r(76).set,g=r(108)(),b=r(58),x=r(77),_=r(109),w=r(78),M=s.TypeError,k=s.process,P=k&&k.versions,O=P&&P.v8||"",E=s.Promise,T="process"==f(k),j=function(){},S=i=b.f,A=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[r(5)("species")]=function(t){t(j,j)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(j)instanceof e&&0!==O.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),C=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var r=t._c;g(function(){for(var n=t._v,i=1==t._s,a=0,o=function(e){var r,a,o,u=i?e.ok:e.fail,s=e.resolve,c=e.reject,f=e.domain;try{u?(i||(2==t._h&&z(t),t._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&(f.exit(),o=!0)),r===e.promise?c(M("Promise-chain cycle")):(a=C(r))?a.call(r,s,c):s(r)):c(n)}catch(t){f&&!o&&f.exit(),c(t)}};r.length>a;)o(r[a++]);t._c=[],t._n=!1,e&&!t._h&&F(t)})}},F=function(t){m.call(s,function(){var e,r,n,i=t._v,a=L(t);if(a&&(e=x(function(){T?k.emit("unhandledRejection",i,t):(r=s.onunhandledrejection)?r({promise:t,reason:i}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=T||L(t)?2:1),t._a=void 0,a&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},z=function(t){m.call(s,function(){var e;T?k.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=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()),I(e,!0))},N=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw M("Promise can't be resolved itself");(e=C(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,c(N,n,1),c(R,n,1))}catch(t){R.call(n,t)}}):(r._v=t,r._s=1,I(r,!1))}catch(t){R.call({_w:r,_d:!1},t)}}};A||(E=function(t){v(this,E,"Promise","_h"),d(t),n.call(this);try{t(c(N,this,1),c(R,this,1))}catch(t){R.call(this,t)}},(n=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=r(59)(E.prototype,{then:function(t,e){var r=S(y(this,E));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=T?k.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&I(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new n;this.promise=t,this.resolve=c(N,t,1),this.reject=c(R,t,1)},b.f=S=function(t){return t===E||t===o?new a(t):i(t)}),l(l.G+l.W+l.F*!A,{Promise:E}),r(33)(E,"Promise"),r(79)("Promise"),o=r(0).Promise,l(l.S+l.F*!A,"Promise",{reject:function(t){var e=S(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!A),"Promise",{resolve:function(t){return w(u&&this===o?E:this,t)}}),l(l.S+l.F*!(A&&r(80)(function(t){E.all(t).catch(j)})),"Promise",{all:function(t){var e=this,r=S(e),n=r.resolve,i=r.reject,a=x(function(){var r=[],a=0,o=1;p(t,!1,function(t){var u=a++,s=!1;r.push(void 0),o++,e.resolve(t).then(function(t){s||(s=!0,r[u]=t,--o||n(r))},i)}),--o||n(r)});return a.e&&i(a.v),r.promise},race:function(t){var e=this,r=S(e),n=r.reject,i=x(function(){p(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(4),i=r(76).set,a=n.MutationObserver||n.WebKitMutationObserver,o=n.process,u=n.Promise,s="process"==r(29)(o);t.exports=function(){var t,e,r,c=function(){var n,i;for(s&&(n=o.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(s)r=function(){o.nextTick(c)};else if(!a||n.navigator&&n.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);r=function(){f.then(c)}}else r=function(){i.call(n,c)};else{var l=!0,h=document.createTextNode("");new a(c).observe(h,{characterData:!0}),r=function(){h.data=l=!l}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e,r){var n=r(4).navigator;t.exports=n&&n.userAgent||""},function(t,e,r){"use strict";var n=r(1),i=r(0),a=r(4),o=r(75),u=r(78);n(n.P+n.R,"Promise",{finally:function(t){var e=o(this,i.Promise||a.Promise),r="function"==typeof t;return this.then(r?function(r){return u(e,t()).then(function(){return r})}:t,r?function(r){return u(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){"use strict";var n=r(1),i=r(58),a=r(77);n(n.S,"Promise",{try:function(t){var e=i.f(this),r=a(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){t.exports={default:r(113),__esModule:!0}},function(t,e,r){r(114);var n=r(0).Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},function(t,e,r){var n=r(1);n(n.S+n.F*!r(12),"Object",{defineProperty:r(8).f})},function(t,e,r){r(116),r(54),r(119),r(120),t.exports=r(0).Symbol},function(t,e,r){"use strict";var n=r(4),i=r(16),a=r(12),o=r(1),u=r(69),s=r(60).KEY,c=r(15),f=r(51),l=r(33),h=r(41),d=r(5),v=r(61),p=r(62),y=r(117),m=r(82),g=r(11),b=r(9),x=r(17),_=r(46),w=r(27),M=r(43),k=r(118),P=r(84),O=r(8),E=r(28),T=P.f,j=O.f,S=k.f,A=n.Symbol,C=n.JSON,I=C&&C.stringify,F=d("_hidden"),L=d("toPrimitive"),z={}.propertyIsEnumerable,R=f("symbol-registry"),N=f("symbols"),q=f("op-symbols"),D=Ob