vue-painting
Version:
A image tailor and painting component for Vue.
33 lines • 270 kB
JavaScript
webpackJsonp([0],{"+E39":function(t,e,n){t.exports=!n("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+ZMJ":function(t,e,n){var i=n("lOnJ");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},"+tPU":function(t,e,n){n("xGkn");for(var i=n("7KvD"),r=n("hJx8"),a=n("/bQp"),o=n("dSzd")("toStringTag"),s="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<s.length;c++){var h=s[c],l=i[h],u=l&&l.prototype;u&&!u[o]&&r(u,o,h),a[h]=a.Array}},"//Fk":function(t,e,n){t.exports={default:n("U5ju"),__esModule:!0}},"/bQp":function(t,e){t.exports={}},"1kS7":function(t,e){e.f=Object.getOwnPropertySymbols},"2KxR":function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},"3Eo+":function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},"3fs2":function(t,e,n){var i=n("RY/4"),r=n("dSzd")("iterator"),a=n("/bQp");t.exports=n("FeBl").getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||a[i(t)]}},"4mcu":function(t,e){t.exports=function(){}},"52gC":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"7+uW":function(t,e,n){"use strict";(function(t){
/*!
* Vue.js v2.5.16
* (c) 2014-2018 Evan You
* Released under the MIT License.
*/
var n=Object.freeze({});function i(t){return void 0===t||null===t}function r(t){return void 0!==t&&null!==t}function a(t){return!0===t}function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function h(t){return"[object Object]"===c.call(t)}function l(t){return"[object RegExp]"===c.call(t)}function u(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),i=t.split(","),r=0;r<i.length;r++)n[i[r]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var p=v("slot,component",!0),g=v("key,ref,slot,slot-scope,is");function m(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function _(t,e){return y.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,S=b(function(t){return t.replace(x,function(t,e){return e?e.toUpperCase():""})}),w=b(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),C=/\B([A-Z])/g,K=b(function(t){return t.replace(C,"-$1").toLowerCase()});var T=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function k(t,e){e=e||0;for(var n=t.length-e,i=new Array(n);n--;)i[n]=t[n+e];return i}function A(t,e){for(var n in e)t[n]=e[n];return t}function F(t){for(var e={},n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function P(t,e,n){}var M=function(t,e,n){return!1},O=function(t){return t};function L(t,e){if(t===e)return!0;var n=s(t),i=s(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{var r=Array.isArray(t),a=Array.isArray(e);if(r&&a)return t.length===e.length&&t.every(function(t,n){return L(t,e[n])});if(r||a)return!1;var o=Object.keys(t),c=Object.keys(e);return o.length===c.length&&o.every(function(n){return L(t[n],e[n])})}catch(t){return!1}}function R(t,e){for(var n=0;n<t.length;n++)if(L(t[n],e))return n;return-1}function D(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var E="data-server-rendered",G=["component","directive","filter"],N=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],I={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:M,isReservedAttr:M,isUnknownElement:M,getTagNamespace:P,parsePlatformTagName:O,mustUseProp:M,_lifecycleHooks:N};function U(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function $(t,e,n,i){Object.defineProperty(t,e,{value:n,enumerable:!!i,writable:!0,configurable:!0})}var j=/[^\w.$]/;var B,H="__proto__"in{},z="undefined"!=typeof window,W="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,X=W&&WXEnvironment.platform.toLowerCase(),q=z&&window.navigator.userAgent.toLowerCase(),Y=q&&/msie|trident/.test(q),V=q&&q.indexOf("msie 9.0")>0,J=q&&q.indexOf("edge/")>0,Q=(q&&q.indexOf("android"),q&&/iphone|ipad|ipod|ios/.test(q)||"ios"===X),Z=(q&&/chrome\/\d+/.test(q),{}.watch),tt=!1;if(z)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(t){}var nt=function(){return void 0===B&&(B=!z&&!W&&void 0!==t&&"server"===t.process.env.VUE_ENV),B},it=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,ot="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);at="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=P,ct=0,ht=function(){this.id=ct++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){m(this.subs,t)},ht.prototype.depend=function(){ht.target&&ht.target.addDep(this)},ht.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},ht.target=null;var lt=[];function ut(t){ht.target&<.push(ht.target),ht.target=t}function ft(){ht.target=lt.pop()}var dt=function(t,e,n,i,r,a,o,s){this.tag=t,this.data=e,this.children=n,this.text=i,this.elm=r,this.ns=void 0,this.context=a,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=o,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},vt={child:{configurable:!0}};vt.child.get=function(){return this.componentInstance},Object.defineProperties(dt.prototype,vt);var pt=function(t){void 0===t&&(t="");var e=new dt;return e.text=t,e.isComment=!0,e};function gt(t){return new dt(void 0,void 0,void 0,String(t))}function mt(t){var e=new dt(t.tag,t.data,t.children,t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.isCloned=!0,e}var yt=Array.prototype,_t=Object.create(yt);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=yt[t];$(_t,t,function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];var r,a=e.apply(this,n),o=this.__ob__;switch(t){case"push":case"unshift":r=n;break;case"splice":r=n.slice(2)}return r&&o.observeArray(r),o.dep.notify(),a})});var bt=Object.getOwnPropertyNames(_t),xt=!0;function St(t){xt=t}var wt=function(t){(this.value=t,this.dep=new ht,this.vmCount=0,$(t,"__ob__",this),Array.isArray(t))?((H?Ct:Kt)(t,_t,bt),this.observeArray(t)):this.walk(t)};function Ct(t,e,n){t.__proto__=e}function Kt(t,e,n){for(var i=0,r=n.length;i<r;i++){var a=n[i];$(t,a,e[a])}}function Tt(t,e){var n;if(s(t)&&!(t instanceof dt))return _(t,"__ob__")&&t.__ob__ instanceof wt?n=t.__ob__:xt&&!nt()&&(Array.isArray(t)||h(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new wt(t)),e&&n&&n.vmCount++,n}function kt(t,e,n,i,r){var a=new ht,o=Object.getOwnPropertyDescriptor(t,e);if(!o||!1!==o.configurable){var s=o&&o.get;s||2!==arguments.length||(n=t[e]);var c=o&&o.set,h=!r&&Tt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return ht.target&&(a.depend(),h&&(h.dep.depend(),Array.isArray(e)&&function t(e){for(var n=void 0,i=0,r=e.length;i<r;i++)(n=e[i])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&t(n)}(e))),e},set:function(e){var i=s?s.call(t):n;e===i||e!=e&&i!=i||(c?c.call(t,e):n=e,h=!r&&Tt(e),a.notify())}})}}function At(t,e,n){if(Array.isArray(t)&&u(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var i=t.__ob__;return t._isVue||i&&i.vmCount?n:i?(kt(i.value,e,n),i.dep.notify(),n):(t[e]=n,n)}function Ft(t,e){if(Array.isArray(t)&&u(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||_(t,e)&&(delete t[e],n&&n.dep.notify())}}wt.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)kt(t,e[n])},wt.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Tt(t[e])};var Pt=I.optionMergeStrategies;function Mt(t,e){if(!e)return t;for(var n,i,r,a=Object.keys(e),o=0;o<a.length;o++)i=t[n=a[o]],r=e[n],_(t,n)?h(i)&&h(r)&&Mt(i,r):At(t,n,r);return t}function Ot(t,e,n){return n?function(){var i="function"==typeof e?e.call(n,n):e,r="function"==typeof t?t.call(n,n):t;return i?Mt(i,r):r}:e?t?function(){return Mt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Lt(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function Rt(t,e,n,i){var r=Object.create(t||null);return e?A(r,e):r}Pt.data=function(t,e,n){return n?Ot(t,e,n):e&&"function"!=typeof e?t:Ot(t,e)},N.forEach(function(t){Pt[t]=Lt}),G.forEach(function(t){Pt[t+"s"]=Rt}),Pt.watch=function(t,e,n,i){if(t===Z&&(t=void 0),e===Z&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var r={};for(var a in A(r,t),e){var o=r[a],s=e[a];o&&!Array.isArray(o)&&(o=[o]),r[a]=o?o.concat(s):Array.isArray(s)?s:[s]}return r},Pt.props=Pt.methods=Pt.inject=Pt.computed=function(t,e,n,i){if(!t)return e;var r=Object.create(null);return A(r,t),e&&A(r,e),r},Pt.provide=Ot;var Dt=function(t,e){return void 0===e?t:e};function Et(t,e,n){"function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var i,r,a={};if(Array.isArray(n))for(i=n.length;i--;)"string"==typeof(r=n[i])&&(a[S(r)]={type:null});else if(h(n))for(var o in n)r=n[o],a[S(o)]=h(r)?r:{type:r};t.props=a}}(e),function(t,e){var n=t.inject;if(n){var i=t.inject={};if(Array.isArray(n))for(var r=0;r<n.length;r++)i[n[r]]={from:n[r]};else if(h(n))for(var a in n){var o=n[a];i[a]=h(o)?A({from:a},o):{from:o}}}}(e),function(t){var e=t.directives;if(e)for(var n in e){var i=e[n];"function"==typeof i&&(e[n]={bind:i,update:i})}}(e);var i=e.extends;if(i&&(t=Et(t,i,n)),e.mixins)for(var r=0,a=e.mixins.length;r<a;r++)t=Et(t,e.mixins[r],n);var o,s={};for(o in t)c(o);for(o in e)_(t,o)||c(o);function c(i){var r=Pt[i]||Dt;s[i]=r(t[i],e[i],n,i)}return s}function Gt(t,e,n,i){if("string"==typeof n){var r=t[e];if(_(r,n))return r[n];var a=S(n);if(_(r,a))return r[a];var o=w(a);return _(r,o)?r[o]:r[n]||r[a]||r[o]}}function Nt(t,e,n,i){var r=e[t],a=!_(n,t),o=n[t],s=$t(Boolean,r.type);if(s>-1)if(a&&!_(r,"default"))o=!1;else if(""===o||o===K(t)){var c=$t(String,r.type);(c<0||s<c)&&(o=!0)}if(void 0===o){o=function(t,e,n){if(!_(e,"default"))return;var i=e.default;0;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return"function"==typeof i&&"Function"!==It(e.type)?i.call(t):i}(i,r,t);var h=xt;St(!0),Tt(o),St(h)}return o}function It(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Ut(t,e){return It(t)===It(e)}function $t(t,e){if(!Array.isArray(e))return Ut(e,t)?0:-1;for(var n=0,i=e.length;n<i;n++)if(Ut(e[n],t))return n;return-1}function jt(t,e,n){if(e)for(var i=e;i=i.$parent;){var r=i.$options.errorCaptured;if(r)for(var a=0;a<r.length;a++)try{if(!1===r[a].call(i,t,e,n))return}catch(t){Bt(t,i,"errorCaptured hook")}}Bt(t,e,n)}function Bt(t,e,n){if(I.errorHandler)try{return I.errorHandler.call(null,t,e,n)}catch(t){Ht(t,null,"config.errorHandler")}Ht(t,e,n)}function Ht(t,e,n){if(!z&&!W||"undefined"==typeof console)throw t;console.error(t)}var zt,Wt,Xt=[],qt=!1;function Yt(){qt=!1;var t=Xt.slice(0);Xt.length=0;for(var e=0;e<t.length;e++)t[e]()}var Vt=!1;if("undefined"!=typeof setImmediate&&rt(setImmediate))Wt=function(){setImmediate(Yt)};else if("undefined"==typeof MessageChannel||!rt(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Wt=function(){setTimeout(Yt,0)};else{var Jt=new MessageChannel,Qt=Jt.port2;Jt.port1.onmessage=Yt,Wt=function(){Qt.postMessage(1)}}if("undefined"!=typeof Promise&&rt(Promise)){var Zt=Promise.resolve();zt=function(){Zt.then(Yt),Q&&setTimeout(P)}}else zt=Wt;function te(t,e){var n;if(Xt.push(function(){if(t)try{t.call(e)}catch(t){jt(t,e,"nextTick")}else n&&n(e)}),qt||(qt=!0,Vt?Wt():zt()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){n=t})}var ee=new at;function ne(t){!function t(e,n){var i,r;var a=Array.isArray(e);if(!a&&!s(e)||Object.isFrozen(e)||e instanceof dt)return;if(e.__ob__){var o=e.__ob__.dep.id;if(n.has(o))return;n.add(o)}if(a)for(i=e.length;i--;)t(e[i],n);else for(r=Object.keys(e),i=r.length;i--;)t(e[r[i]],n)}(t,ee),ee.clear()}var ie,re=b(function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),i="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=i?t.slice(1):t,once:n,capture:i,passive:e}});function ae(t){function e(){var t=arguments,n=e.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var i=n.slice(),r=0;r<i.length;r++)i[r].apply(null,t)}return e.fns=t,e}function oe(t,e,n,r,a){var o,s,c,h;for(o in t)s=t[o],c=e[o],h=re(o),i(s)||(i(c)?(i(s.fns)&&(s=t[o]=ae(s)),n(h.name,s,h.once,h.capture,h.passive,h.params)):s!==c&&(c.fns=s,t[o]=c));for(o in e)i(t[o])&&r((h=re(o)).name,e[o],h.capture)}function se(t,e,n){var o;t instanceof dt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){n.apply(this,arguments),m(o.fns,c)}i(s)?o=ae([c]):r(s.fns)&&a(s.merged)?(o=s).fns.push(c):o=ae([s,c]),o.merged=!0,t[e]=o}function ce(t,e,n,i,a){if(r(e)){if(_(e,n))return t[n]=e[n],a||delete e[n],!0;if(_(e,i))return t[n]=e[i],a||delete e[i],!0}return!1}function he(t){return o(t)?[gt(t)]:Array.isArray(t)?function t(e,n){var s=[];var c,h,l,u;for(c=0;c<e.length;c++)i(h=e[c])||"boolean"==typeof h||(l=s.length-1,u=s[l],Array.isArray(h)?h.length>0&&(le((h=t(h,(n||"")+"_"+c))[0])&&le(u)&&(s[l]=gt(u.text+h[0].text),h.shift()),s.push.apply(s,h)):o(h)?le(u)?s[l]=gt(u.text+h):""!==h&&s.push(gt(h)):le(h)&&le(u)?s[l]=gt(u.text+h.text):(a(e._isVList)&&r(h.tag)&&i(h.key)&&r(n)&&(h.key="__vlist"+n+"_"+c+"__"),s.push(h)));return s}(t):void 0}function le(t){return r(t)&&r(t.text)&&!1===t.isComment}function ue(t,e){return(t.__esModule||ot&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function fe(t){return t.isComment&&t.asyncFactory}function de(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(r(n)&&(r(n.componentOptions)||fe(n)))return n}}function ve(t,e,n){n?ie.$once(t,e):ie.$on(t,e)}function pe(t,e){ie.$off(t,e)}function ge(t,e,n){ie=t,oe(e,n||{},ve,pe),ie=void 0}function me(t,e){var n={};if(!t)return n;for(var i=0,r=t.length;i<r;i++){var a=t[i],o=a.data;if(o&&o.attrs&&o.attrs.slot&&delete o.attrs.slot,a.context!==e&&a.fnContext!==e||!o||null==o.slot)(n.default||(n.default=[])).push(a);else{var s=o.slot,c=n[s]||(n[s]=[]);"template"===a.tag?c.push.apply(c,a.children||[]):c.push(a)}}for(var h in n)n[h].every(ye)&&delete n[h];return n}function ye(t){return t.isComment&&!t.asyncFactory||" "===t.text}function _e(t,e){e=e||{};for(var n=0;n<t.length;n++)Array.isArray(t[n])?_e(t[n],e):e[t[n].key]=t[n].fn;return e}var be=null;function xe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Se(t,e){if(e){if(t._directInactive=!1,xe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Se(t.$children[n]);we(t,"activated")}}function we(t,e){ut();var n=t.$options[e];if(n)for(var i=0,r=n.length;i<r;i++)try{n[i].call(t)}catch(n){jt(n,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e),ft()}var Ce=[],Ke=[],Te={},ke=!1,Ae=!1,Fe=0;function Pe(){var t,e;for(Ae=!0,Ce.sort(function(t,e){return t.id-e.id}),Fe=0;Fe<Ce.length;Fe++)e=(t=Ce[Fe]).id,Te[e]=null,t.run();var n=Ke.slice(),i=Ce.slice();Fe=Ce.length=Ke.length=0,Te={},ke=Ae=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Se(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],i=n.vm;i._watcher===n&&i._isMounted&&we(i,"updated")}}(i),it&&I.devtools&&it.emit("flush")}var Me=0,Oe=function(t,e,n,i,r){this.vm=t,r&&(t._watcher=this),t._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Me,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new at,this.newDepIds=new at,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!j.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};Oe.prototype.get=function(){var t;ut(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;jt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ne(t),ft(),this.cleanupDeps()}return t},Oe.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},Oe.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Oe.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==Te[e]){if(Te[e]=!0,Ae){for(var n=Ce.length-1;n>Fe&&Ce[n].id>t.id;)n--;Ce.splice(n+1,0,t)}else Ce.push(t);ke||(ke=!0,te(Pe))}}(this)},Oe.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){jt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Oe.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Oe.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Oe.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var Le={enumerable:!0,configurable:!0,get:P,set:P};function Re(t,e,n){Le.get=function(){return this[e][n]},Le.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Le)}function De(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},i=t._props={},r=t.$options._propKeys=[];t.$parent&&St(!1);var a=function(a){r.push(a);var o=Nt(a,e,n,t);kt(i,a,o),a in t||Re(t,"_props",a)};for(var o in e)a(o);St(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?P:T(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;h(e=t._data="function"==typeof e?function(t,e){ut();try{return t.call(e,e)}catch(t){return jt(t,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});var n=Object.keys(e),i=t.$options.props,r=(t.$options.methods,n.length);for(;r--;){var a=n[r];0,i&&_(i,a)||U(a)||Re(t,"_data",a)}Tt(e,!0)}(t):Tt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),i=nt();for(var r in e){var a=e[r],o="function"==typeof a?a:a.get;0,i||(n[r]=new Oe(t,o||P,P,Ee)),r in t||Ge(t,r,a)}}(t,e.computed),e.watch&&e.watch!==Z&&function(t,e){for(var n in e){var i=e[n];if(Array.isArray(i))for(var r=0;r<i.length;r++)Ie(t,n,i[r]);else Ie(t,n,i)}}(t,e.watch)}var Ee={lazy:!0};function Ge(t,e,n){var i=!nt();"function"==typeof n?(Le.get=i?Ne(e):n,Le.set=P):(Le.get=n.get?i&&!1!==n.cache?Ne(e):n.get:P,Le.set=n.set?n.set:P),Object.defineProperty(t,e,Le)}function Ne(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ht.target&&e.depend(),e.value}}function Ie(t,e,n,i){return h(n)&&(i=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,i)}function Ue(t,e){if(t){for(var n=Object.create(null),i=ot?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),r=0;r<i.length;r++){for(var a=i[r],o=t[a].from,s=e;s;){if(s._provided&&_(s._provided,o)){n[a]=s._provided[o];break}s=s.$parent}if(!s)if("default"in t[a]){var c=t[a].default;n[a]="function"==typeof c?c.call(e):c}else 0}return n}}function $e(t,e){var n,i,a,o,c;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),i=0,a=t.length;i<a;i++)n[i]=e(t[i],i);else if("number"==typeof t)for(n=new Array(t),i=0;i<t;i++)n[i]=e(i+1,i);else if(s(t))for(o=Object.keys(t),n=new Array(o.length),i=0,a=o.length;i<a;i++)c=o[i],n[i]=e(t[c],c,i);return r(n)&&(n._isVList=!0),n}function je(t,e,n,i){var r,a=this.$scopedSlots[t];if(a)n=n||{},i&&(n=A(A({},i),n)),r=a(n)||e;else{var o=this.$slots[t];o&&(o._rendered=!0),r=o||e}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},r):r}function Be(t){return Gt(this.$options,"filters",t)||O}function He(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function ze(t,e,n,i,r){var a=I.keyCodes[e]||n;return r&&i&&!I.keyCodes[e]?He(r,i):a?He(a,t):i?K(i)!==e:void 0}function We(t,e,n,i,r){if(n)if(s(n)){var a;Array.isArray(n)&&(n=F(n));var o=function(o){if("class"===o||"style"===o||g(o))a=t;else{var s=t.attrs&&t.attrs.type;a=i||I.mustUseProp(e,s,o)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}o in a||(a[o]=n[o],r&&((t.on||(t.on={}))["update:"+o]=function(t){n[o]=t}))};for(var c in n)o(c)}else;return t}function Xe(t,e){var n=this._staticTrees||(this._staticTrees=[]),i=n[t];return i&&!e?i:(Ye(i=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),i)}function qe(t,e,n){return Ye(t,"__once__"+e+(n?"_"+n:""),!0),t}function Ye(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]&&"string"!=typeof t[i]&&Ve(t[i],e+"_"+i,n);else Ve(t,e,n)}function Ve(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Je(t,e){if(e)if(h(e)){var n=t.on=t.on?A({},t.on):{};for(var i in e){var r=n[i],a=e[i];n[i]=r?[].concat(r,a):a}}else;return t}function Qe(t){t._o=qe,t._n=d,t._s=f,t._l=$e,t._t=je,t._q=L,t._i=R,t._m=Xe,t._f=Be,t._k=ze,t._b=We,t._v=gt,t._e=pt,t._u=_e,t._g=Je}function Ze(t,e,i,r,o){var s,c=o.options;_(r,"_uid")?(s=Object.create(r))._original=r:(s=r,r=r._original);var h=a(c._compiled),l=!h;this.data=t,this.props=e,this.children=i,this.parent=r,this.listeners=t.on||n,this.injections=Ue(c.inject,r),this.slots=function(){return me(i,r)},h&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||n),c._scopeId?this._c=function(t,e,n,i){var a=cn(s,t,e,n,i,l);return a&&!Array.isArray(a)&&(a.fnScopeId=c._scopeId,a.fnContext=r),a}:this._c=function(t,e,n,i){return cn(s,t,e,n,i,l)}}function tn(t,e,n,i){var r=mt(t);return r.fnContext=n,r.fnOptions=i,e.slot&&((r.data||(r.data={})).slot=e.slot),r}function en(t,e){for(var n in e)t[S(n)]=e[n]}Qe(Ze.prototype);var nn={init:function(t,e,n,i){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var a=t;nn.prepatch(a,a)}else{(t.componentInstance=function(t,e,n,i){var a={_isComponent:!0,parent:e,_parentVnode:t,_parentElm:n||null,_refElm:i||null},o=t.data.inlineTemplate;r(o)&&(a.render=o.render,a.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(a)}(t,be,n,i)).$mount(e?t.elm:void 0,e)}},prepatch:function(t,e){var i=e.componentOptions;!function(t,e,i,r,a){var o=!!(a||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==n);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=a,t.$attrs=r.data.attrs||n,t.$listeners=i||n,e&&t.$options.props){St(!1);for(var s=t._props,c=t.$options._propKeys||[],h=0;h<c.length;h++){var l=c[h],u=t.$options.props;s[l]=Nt(l,u,e,t)}St(!0),t.$options.propsData=e}i=i||n;var f=t.$options._parentListeners;t.$options._parentListeners=i,ge(t,i,f),o&&(t.$slots=me(a,r.context),t.$forceUpdate())}(e.componentInstance=t.componentInstance,i.propsData,i.listeners,e,i.children)},insert:function(t){var e,n=t.context,i=t.componentInstance;i._isMounted||(i._isMounted=!0,we(i,"mounted")),t.data.keepAlive&&(n._isMounted?((e=i)._inactive=!1,Ke.push(e)):Se(i,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?function t(e,n){if(!(n&&(e._directInactive=!0,xe(e))||e._inactive)){e._inactive=!0;for(var i=0;i<e.$children.length;i++)t(e.$children[i]);we(e,"deactivated")}}(e,!0):e.$destroy())}},rn=Object.keys(nn);function an(t,e,o,c,h){if(!i(t)){var l=o.$options._base;if(s(t)&&(t=l.extend(t)),"function"==typeof t){var u;if(i(t.cid)&&void 0===(t=function(t,e,n){if(a(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;if(a(t.loading)&&r(t.loadingComp))return t.loadingComp;if(!r(t.contexts)){var o=t.contexts=[n],c=!0,h=function(){for(var t=0,e=o.length;t<e;t++)o[t].$forceUpdate()},l=D(function(n){t.resolved=ue(n,e),c||h()}),u=D(function(e){r(t.errorComp)&&(t.error=!0,h())}),f=t(l,u);return s(f)&&("function"==typeof f.then?i(t.resolved)&&f.then(l,u):r(f.component)&&"function"==typeof f.component.then&&(f.component.then(l,u),r(f.error)&&(t.errorComp=ue(f.error,e)),r(f.loading)&&(t.loadingComp=ue(f.loading,e),0===f.delay?t.loading=!0:setTimeout(function(){i(t.resolved)&&i(t.error)&&(t.loading=!0,h())},f.delay||200)),r(f.timeout)&&setTimeout(function(){i(t.resolved)&&u(null)},f.timeout))),c=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(n)}(u=t,l,o)))return function(t,e,n,i,r){var a=pt();return a.asyncFactory=t,a.asyncMeta={data:e,context:n,children:i,tag:r},a}(u,e,o,c,h);e=e||{},ln(t),r(e.model)&&function(t,e){var n=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(e.props||(e.props={}))[n]=e.model.value;var a=e.on||(e.on={});r(a[i])?a[i]=[e.model.callback].concat(a[i]):a[i]=e.model.callback}(t.options,e);var f=function(t,e,n){var a=e.options.props;if(!i(a)){var o={},s=t.attrs,c=t.props;if(r(s)||r(c))for(var h in a){var l=K(h);ce(o,c,h,l,!0)||ce(o,s,h,l,!1)}return o}}(e,t);if(a(t.options.functional))return function(t,e,i,a,o){var s=t.options,c={},h=s.props;if(r(h))for(var l in h)c[l]=Nt(l,h,e||n);else r(i.attrs)&&en(c,i.attrs),r(i.props)&&en(c,i.props);var u=new Ze(i,c,o,a,t),f=s.render.call(null,u._c,u);if(f instanceof dt)return tn(f,i,u.parent,s);if(Array.isArray(f)){for(var d=he(f)||[],v=new Array(d.length),p=0;p<d.length;p++)v[p]=tn(d[p],i,u.parent,s);return v}}(t,f,e,o,c);var d=e.on;if(e.on=e.nativeOn,a(t.options.abstract)){var v=e.slot;e={},v&&(e.slot=v)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<rn.length;n++){var i=rn[n];e[i]=nn[i]}}(e);var p=t.options.name||h;return new dt("vue-component-"+t.cid+(p?"-"+p:""),e,void 0,void 0,void 0,o,{Ctor:t,propsData:f,listeners:d,tag:h,children:c},u)}}}var on=1,sn=2;function cn(t,e,n,c,h,l){return(Array.isArray(n)||o(n))&&(h=c,c=n,n=void 0),a(l)&&(h=sn),function(t,e,n,o,c){if(r(n)&&r(n.__ob__))return pt();r(n)&&r(n.is)&&(e=n.is);if(!e)return pt();0;Array.isArray(o)&&"function"==typeof o[0]&&((n=n||{}).scopedSlots={default:o[0]},o.length=0);c===sn?o=he(o):c===on&&(o=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(o));var h,l;if("string"==typeof e){var u;l=t.$vnode&&t.$vnode.ns||I.getTagNamespace(e),h=I.isReservedTag(e)?new dt(I.parsePlatformTagName(e),n,o,void 0,void 0,t):r(u=Gt(t.$options,"components",e))?an(u,n,t,o,e):new dt(e,n,o,void 0,void 0,t)}else h=an(e,n,t,o);return Array.isArray(h)?h:r(h)?(r(l)&&function t(e,n,o){e.ns=n;"foreignObject"===e.tag&&(n=void 0,o=!0);if(r(e.children))for(var s=0,c=e.children.length;s<c;s++){var h=e.children[s];r(h.tag)&&(i(h.ns)||a(o)&&"svg"!==h.tag)&&t(h,n,o)}}(h,l),r(n)&&function(t){s(t.style)&&ne(t.style);s(t.class)&&ne(t.class)}(n),h):pt()}(t,e,n,c,h)}var hn=0;function ln(t){var e=t.options;if(t.super){var n=ln(t.super);if(n!==t.superOptions){t.superOptions=n;var i=function(t){var e,n=t.options,i=t.extendOptions,r=t.sealedOptions;for(var a in n)n[a]!==r[a]&&(e||(e={}),e[a]=un(n[a],i[a],r[a]));return e}(t);i&&A(t.extendOptions,i),(e=t.options=Et(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function un(t,e,n){if(Array.isArray(t)){var i=[];n=Array.isArray(n)?n:[n],e=Array.isArray(e)?e:[e];for(var r=0;r<t.length;r++)(e.indexOf(t[r])>=0||n.indexOf(t[r])<0)&&i.push(t[r]);return i}return t}function fn(t){this._init(t)}function dn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,i=n.cid,r=t._Ctor||(t._Ctor={});if(r[i])return r[i];var a=t.name||n.options.name;var o=function(t){this._init(t)};return(o.prototype=Object.create(n.prototype)).constructor=o,o.cid=e++,o.options=Et(n.options,t),o.super=n,o.options.props&&function(t){var e=t.options.props;for(var n in e)Re(t.prototype,"_props",n)}(o),o.options.computed&&function(t){var e=t.options.computed;for(var n in e)Ge(t.prototype,n,e[n])}(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,G.forEach(function(t){o[t]=n[t]}),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=t,o.sealedOptions=A({},o.options),r[i]=o,o}}function vn(t){return t&&(t.Ctor.options.name||t.tag)}function pn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function gn(t,e){var n=t.cache,i=t.keys,r=t._vnode;for(var a in n){var o=n[a];if(o){var s=vn(o.componentOptions);s&&!e(s)&&mn(n,a,i,r)}}}function mn(t,e,n,i){var r=t[e];!r||i&&r.tag===i.tag||r.componentInstance.$destroy(),t[e]=null,m(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=hn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),i=e._parentVnode;n.parent=e.parent,n._parentVnode=i,n._parentElm=e._parentElm,n._refElm=e._refElm;var r=i.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Et(ln(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&ge(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,i=t.$vnode=e._parentVnode,r=i&&i.context;t.$slots=me(e._renderChildren,r),t.$scopedSlots=n,t._c=function(e,n,i,r){return cn(t,e,n,i,r,!1)},t.$createElement=function(e,n,i,r){return cn(t,e,n,i,r,!0)};var a=i&&i.data;kt(t,"$attrs",a&&a.attrs||n,null,!0),kt(t,"$listeners",e._parentListeners||n,null,!0)}(e),we(e,"beforeCreate"),function(t){var e=Ue(t.$options.inject,t);e&&(St(!1),Object.keys(e).forEach(function(n){kt(t,n,e[n])}),St(!0))}(e),De(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),we(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(fn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=At,t.prototype.$delete=Ft,t.prototype.$watch=function(t,e,n){if(h(e))return Ie(this,t,e,n);(n=n||{}).user=!0;var i=new Oe(this,t,e,n);return n.immediate&&e.call(this,i.value),function(){i.teardown()}}}(fn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){if(Array.isArray(t))for(var i=0,r=t.length;i<r;i++)this.$on(t[i],n);else(this._events[t]||(this._events[t]=[])).push(n),e.test(t)&&(this._hasHookEvent=!0);return this},t.prototype.$once=function(t,e){var n=this;function i(){n.$off(t,i),e.apply(n,arguments)}return i.fn=e,n.$on(t,i),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var i=0,r=t.length;i<r;i++)this.$off(t[i],e);return n}var a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;if(e)for(var o,s=a.length;s--;)if((o=a[s])===e||o.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?k(n):n;for(var i=k(arguments,1),r=0,a=n.length;r<a;r++)try{n[r].apply(e,i)}catch(n){jt(n,e,'event handler for "'+t+'"')}}return e}}(fn),function(t){t.prototype._update=function(t,e){var n=this;n._isMounted&&we(n,"beforeUpdate");var i=n.$el,r=n._vnode,a=be;be=n,n._vnode=t,r?n.$el=n.__patch__(r,t):(n.$el=n.__patch__(n.$el,t,e,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),be=a,i&&(i.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){we(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||m(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),we(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(fn),function(t){Qe(t.prototype),t.prototype.$nextTick=function(t){return te(t,this)},t.prototype._render=function(){var t,e=this,i=e.$options,r=i.render,a=i._parentVnode;a&&(e.$scopedSlots=a.data.scopedSlots||n),e.$vnode=a;try{t=r.call(e._renderProxy,e.$createElement)}catch(n){jt(n,e,"render"),t=e._vnode}return t instanceof dt||(t=pt()),t.parent=a,t}}(fn);var yn=[String,RegExp,Array],_n={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:yn,exclude:yn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)mn(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){gn(t,function(t){return pn(e,t)})}),this.$watch("exclude",function(e){gn(t,function(t){return!pn(e,t)})})},render:function(){var t=this.$slots.default,e=de(t),n=e&&e.componentOptions;if(n){var i=vn(n),r=this.include,a=this.exclude;if(r&&(!i||!pn(r,i))||a&&i&&pn(a,i))return e;var o=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;o[c]?(e.componentInstance=o[c].componentInstance,m(s,c),s.push(c)):(o[c]=e,s.push(c),this.max&&s.length>parseInt(this.max)&&mn(o,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return I}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:A,mergeOptions:Et,defineReactive:kt},t.set=At,t.delete=Ft,t.nextTick=te,t.options=Object.create(null),G.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,A(t.options.components,_n),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Et(this.options,t),this}}(t),dn(t),function(t){G.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&h(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}(t)}(fn),Object.defineProperty(fn.prototype,"$isServer",{get:nt}),Object.defineProperty(fn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(fn,"FunctionalRenderContext",{value:Ze}),fn.version="2.5.16";var bn=v("style,class"),xn=v("input,textarea,option,select,progress"),Sn=function(t,e,n){return"value"===n&&xn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},wn=v("contenteditable,draggable,spellcheck"),Cn=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Kn="http://www.w3.org/1999/xlink",Tn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},kn=function(t){return Tn(t)?t.slice(6,t.length):""},An=function(t){return null==t||!1===t};function Fn(t){for(var e=t.data,n=t,i=t;r(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(e=Pn(i.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Pn(e,n.data));return function(t,e){if(r(t)||r(e))return Mn(t,On(e));return""}(e.staticClass,e.class)}function Pn(t,e){return{staticClass:Mn(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Mn(t,e){return t?e?t+" "+e:t:e||""}function On(t){return Array.isArray(t)?function(t){for(var e,n="",i=0,a=t.length;i<a;i++)r(e=On(t[i]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):s(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var Ln={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Rn=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Dn=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),En=function(t){return Rn(t)||Dn(t)};function Gn(t){return Dn(t)?"svg":"math"===t?"math":void 0}var Nn=Object.create(null);var In=v("text,number,password,search,email,tel,url");function Un(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var $n=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(t,e){return document.createElementNS(Ln[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),jn={create:function(t,e){Bn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Bn(t,!0),Bn(e))},destroy:function(t){Bn(t,!0)}};function Bn(t,e){var n=t.data.ref;if(r(n)){var i=t.context,a=t.componentInstance||t.elm,o=i.$refs;e?Array.isArray(o[n])?m(o[n],a):o[n]===a&&(o[n]=void 0):t.data.refInFor?Array.isArray(o[n])?o[n].indexOf(a)<0&&o[n].push(a):o[n]=[a]:o[n]=a}}var Hn=new dt("",{},[]),zn=["create","activate","update","remove","destroy"];function Wn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,i=r(n=t.data)&&r(n=n.attrs)&&n.type,a=r(n=e.data)&&r(n=n.attrs)&&n.type;return i===a||In(i)&&In(a)}(t,e)||a(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&i(e.asyncFactory.error))}function Xn(t,e,n){var i,a,o={};for(i=e;i<=n;++i)r(a=t[i].key)&&(o[a]=i);return o}var qn={create:Yn,update:Yn,destroy:function(t){Yn(t,Hn)}};function Yn(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,i,r,a=t===Hn,o=e===Hn,s=Jn(t.data.directives,t.context),c=Jn(e.data.directives,e.context),h=[],l=[];for(n in c)i=s[n],r=c[n],i?(r.oldValue=i.value,Zn(r,"update",e,t),r.def&&r.def.componentUpdated&&l.push(r)):(Zn(r,"bind",e,t),r.def&&r.def.inserted&&h.push(r));if(h.length){var u=function(){for(var n=0;n<h.length;n++)Zn(h[n],"inserted",e,t)};a?se(e,"insert",u):u()}l.length&&se(e,"postpatch",function(){for(var n=0;n<l.length;n++)Zn(l[n],"componentUpdated",e,t)});if(!a)for(n in s)c[n]||Zn(s[n],"unbind",t,t,o)}(t,e)}var Vn=Object.create(null);function Jn(t,e){var n,i,r=Object.create(null);if(!t)return r;for(n=0;n<t.length;n++)(i=t[n]).modifiers||(i.modifiers=Vn),r[Qn(i)]=i,i.def=Gt(e.$options,"directives",i.name);return r}function Qn(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function Zn(t,e,n,i,r){var a=t.def&&t.def[e];if(a)try{a(n.elm,t,n,i,r)}catch(i){jt(i,n.context,"directive "+t.name+" "+e+" hook")}}var ti=[jn,qn];function ei(t,e){var n=e.componentOptions;if(!(r(n)&&!1===n.Ctor.options.inheritAttrs||i(t.data.attrs)&&i(e.data.attrs))){var a,o,s=e.elm,c=t.data.attrs||{},h=e.data.attrs||{};for(a in r(h.__ob__)&&(h=e.data.attrs=A({},h)),h)o=h[a],c[a]!==o&&ni(s,a,o);for(a in(Y||J)&&h.value!==c.value&&ni(s,"value",h.value),c)i(h[a])&&(Tn(a)?s.removeAttributeNS(Kn,kn(a)):wn(a)||s.removeAttribute(a))}}function ni(t,e,n){t.tagName.indexOf("-")>-1?ii(t,e,n):Cn(e)?An(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):wn(e)?t.setAttribute(e,An(n)||"false"===n?"false":"true"):Tn(e)?An(n)?t.removeAttributeNS(Kn,kn(e)):t.setAttributeNS(Kn,e,n):ii(t,e,n)}function ii(t,e,n){if(An(n))t.removeAttribute(e);else{if(Y&&!V&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var i=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",i)};t.addEventListener("input",i),t.__ieph=!0}t.setAttribute(e,n)}}var ri={create:ei,update:ei};function ai(t,e){var n=e.elm,a=e.data,o=t.data;if(!(i(a.staticClass)&&i(a.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=Fn(e),c=n._transitionClasses;r(c)&&(s=Mn(s,On(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var oi,si,ci,hi,li,ui,fi={create:ai,update:ai},di=/[\w).+\-_$\]]/;function vi(t){var e,n,i,r,a,o=!1,s=!1,c=!1,h=!1,l=0,u=0,f=0,d=0;for(i=0;i<t.length;i++)if(n=e,e=t.charCodeAt(i),o)39===e&&92!==n&&(o=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(h)47===e&&92!==n&&(h=!1);else if(124!==e||124===t.charCodeAt(i+1)||124===t.charCodeAt(i-1)||l||u||f){switch(e){case 34:s=!0;break;case 39:o=!0;break;case 96:c=!0;break;case 40:f++;break;case 41:f--;break;case 91:u++;break;case 93:u--;break;case 123:l++;break;case 125:l--}if(47===e){for(var v=i-1,p=void 0;v>=0&&" "===(p=t.charAt(v));v--);p&&di.test(p)||(h=!0)}}else void 0===r?(d=i+1,r=t.slice(0,i).trim()):g();function g(){(a||(a=[])).push(t.slice(d,i).trim()),d=i+1}if(void 0===r?r=t.slice(0,i).trim():0!==d&&g(),a)for(i=0;i<a.length;i++)r=pi(r,a[i]);return r}function pi(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var i=e.slice(0,n),r=e.slice(n+1);return'_f("'+i+'")('+t+(")"!==r?","+r:r)}function gi(t){console.error("[Vue compiler]: "+t)}function mi(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function yi(t,e,n){(t.props||(t.props=[])).push({name:e,value:n}),t.plain=!1}function _i(t,e,n){(t.attrs||(t.attrs=[])).push({name:e,value:n}),t.plain=!1}function bi(t,e,n){t.attrsMap[e]=n,t.attrsList.push({name:e,value:n})}function xi(t,e,n,i,r,a){(t.directives||(t.directives=[])).push({name:e,rawName:n,value:i,arg:r,modifiers:a}),t.plain=!1}function Si(t,e,i,r,a,o){var s;(r=r||n).capture&&(delete r.capture,e="!"+e),r.once&&(delete r.once,e="~"+e),r.passive&&(delete r.passive,e="&"+e),"click"===e&&(r.right?(e="contextmenu",delete r.right):r.middle&&(e="mouseup")),r.native?(delete r.native,s=t.nativeEvents||(t.nativeEvents={})):s=t.events||(t.events={});var c={value:i.trim()};r!==n&&(c.modifiers=r);var h=s[e];Array.isArray(h)?a?h.unshift(c):h.push(c):s[e]=h?a?[c,h]:[h,c]:c,t.plain=!1}function wi(t,e,n){var i=Ci(t,":"+e)||Ci(t,"v-bind:"+e);if(null!=i)return vi(i);if(!1!==n){var r=Ci(t,e);if(null!=r)return JSON.stringify(r)}}function Ci(t,e,n){var i;if(null!=(i=t.attrsMap[e]))for(var r=t.attrsList,a=0,o=r.length;a<o;a++)if(r[a].name===e){r.splice(a,1);break}return n&&delete t.attrsMap[e],i}function Ki(t,e,n){var i=n||{},r=i.number,a="$$v";i.trim&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),r&&(a="_n("+a+")");var o=Ti(e,a);t.model={value:"("+e+")",expression:'"'+e+'"',callback:"function ($$v) {"+o+"}"}}function Ti(t,e){var n=function(t){if(t=t.trim(),oi=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<oi-1)return(hi=t.lastIndexOf("."))>-1?{exp:t.slice(0,hi),key:'"'+t.slice(hi+1)+'"'}:{exp:t,key:null};si=t,hi=li=ui=0;for(;!Ai();)Fi(ci=ki())?Mi(ci):91===ci&&Pi(ci);return{exp:t.slice(0,li),key:t.slice(li+1,ui)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function ki(){return si.charCodeAt(++hi)}function Ai(){return hi>=oi}function Fi(t){return 34===t||39===t}function Pi(t){var e=1;for(li=hi;!Ai();)if(Fi(t=ki()))Mi(t);else if(91===t&&e++,93===t&&e--,0===e){ui=hi;break}}function Mi(t){for(var e=t;!Ai()&&(t=ki())!==e;);}var Oi,Li="__r",Ri="__c";function Di(t,e,n,i,r){var a;e=(a=e)._withTask||(a._withTask=function(){Vt=!0;var t=a.apply(null,arguments);return Vt=!1,t}),n&&(e=function(t,e,n){var i=Oi;return function r(){null!==t.apply(null,arguments)&&Ei(e,r,n,i)}}(e,t,i)),Oi.addEventListener(t,e,tt?{capture:i,passive:r}:i)}function Ei(t,e,n,i){(i||Oi).removeEventListener(t,e._withTask||e,n)}function Gi(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},a=t.data.on||{};Oi=e.elm,function(t){if(r(t[Li])){var e=Y?"change":"input";t[e]=[].concat(t[Li],t[e]||[]),delete t[Li]}r(t[Ri])&&(t.change=[].concat(t[Ri],t.change||[]),delete t[Ri])}(n),oe(n,a,Di,Ei,e.context),Oi=void 0}}var Ni={create:Gi,update:Gi};function Ii(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,a,o=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in r(c.__ob__)&&(c=e.data.domProps=A({},c)),s)i(c[n])&&(o[n]="");for(n in c){if(a=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),a===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n){o._value=a;var h=i(a)?"":String(a);Ui(o,h)&&(o.value=h)}else o[n]=a}}}function Ui(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,i=t._vModifiers;if(r(i)){if(i.lazy)return!1;if(i.number)return d(n)!==d(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var $i={create:Ii,update:Ii},ji=b(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var i=t.split(n);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e});function Bi(t){var e=Hi(t.style);return t.staticStyle?A(t.staticStyle,e):e}function Hi(t){return Array.isArray(t)?F(t):"string"==typeof t?ji(t):t}var zi,Wi=/^--/,Xi=/\s*!important$/,qi=function(t,e,n){if(Wi.test(e))t.style.setProperty(e,n);else if(Xi.test(n))t.style.setProperty(e,n.replace(Xi,""),"important");else{var i=Vi(e);if(Array.isArray(n))for(var r=0,a=n.length;r<a;r++)t.style[i]=n[r];else t.style[i]=n}},Yi=["Webkit","Moz","ms"],Vi=b(function(t){if(zi=zi||document.createElement("div").style,"filter"!==(t=S(t))&&t in zi)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<Yi.length;n++){var i=Yi[n]+e;if(i in zi)return i}});function Ji(t,e){var n=e.data,a=t.data;if(!(i(n.staticStyle)&&i(n.style)&&i(a.staticStyle)&&i(a.style))){var o,s,c=e.elm,h=a.staticStyle,l=a.normalizedStyle||a.style||{},u=h||l,f=Hi(e.data.style)||{};e.data.normalizedStyle=r(f.__ob__)?A({},f):f;var d=function(t,e){var n,i={};if(e)for(var r=t;r.componentInstance;)(r=r.componentInstance._vnode)&&r.data&&(n=Bi(r.data))&&A(i,n);(n=Bi(t.data))&&A(i,n);for(var a=t;a=a.parent;)a.data&&(n=Bi(a.data))&&A(i,n);return i}(e,!0);for(s in u)i(d[s])&&qi(c,s,"");for(s in d)(o=d[s])!==u[s]&&qi(c,s,null==o?"":o)}}var Qi={create:Ji,update:Ji};function Zi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function tr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function er(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,nr(t.name||"v")),A(e,t),e}return"string"==typeof t?nr(t):void 0}}var nr=b(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),ir=z&&!V,rr="transition",ar="animation",or="transition",sr="transitionend",cr="animation",hr="animationend";ir&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(or="WebkitTransition",sr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(cr="WebkitAnimation",hr="webkitAnimationEnd"));var lr=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function ur(t){lr(function(){lr(t)})}function fr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Zi(t,e))}function dr(t,e){t._transitionClasses&&m(t._transitionClasses,e),tr(t,e)}function vr(t,e,n){var i=gr(t,e),r=i.type,a=i.timeout,o=i.propCount;if(!r)return n();var s=r===rr?sr:hr,c=0,h=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=o&&h()};setTimeout(function(){c<o&&h()},a+1),t.addEventListener(s,l)}var pr=/\b(transform|all)(,|$)/;function gr(t,e){var n,i=window.getComputedStyle(t),r=i[or+"Delay"].split(", "),a=i[or+"Duration"].split(", "),o=mr(r,a),s=i[cr+"Delay"].split(", "),c=i[cr+"Duration"].split(", "),h=mr(s,c),l=0,u=0;return e===rr?o>0&&(n=rr,l=o,u=a.length):e===ar?h>0&&(n=ar,l=h,u=c.length):u=(n=(l=Math.max(o,h))>0?o>h?rr:ar:null)?n===rr?a.length:c.length:0,{type:n,timeout:l,propCount:u,hasTransform:n===rr&&pr.test(i[or+"Property"])}}function mr(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return yr(e)+yr(t[n])}))}function yr(t){return 1e3*Number(t.slice(0,-1))}function _r(t,e){var n=t.elm;r(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var a=er(t.data.transition);if(!i(a)&&!r(n._enterCb)&&1===n.nodeType){for(var o=a.css,c=a.type,h=a.enterClass,l=a.enterToClass,u=a.enterActiveClass,f=a.appearClass,v=a.appearToClass,p=a.appearActiveClass,g=a.beforeEnter,m=a.enter,y=a.afterEnter,_=a.enterCancelled,b=a.beforeAppear,x=a.appear,S=a.afterAppear,w=a.appearCancelled,C=a.duration,K=be,T=be.$vnode;T&&T.parent;)K=(T=T.parent).context;var k=!K._isMounted||!t.isRootInsert;if(!k||x||""===x){var A=k&&f?f:h,F=k&&p?p:u,P=k&&v?v:l,M=k&&b||g,O=k&&"function"==typeof x?x:m,L=k&&S||y,R=k&&w||_,E=d(s(C)?C.enter:C);0;var G=!1!==o&&!V,N=Sr(O),I=n._enterCb=D(function(){G&&(dr(n,P),dr(n,F)),I.cancelled?(G&&dr(n,A),R&&R(n)):L&&L(n),n._enterCb=null});t.data.show||se(t,"insert",function(){var e=n.parentNode,i=e&&e._pending&&e._pending[t.key];i&&i.tag===t.tag&&i.elm._leaveCb&&i.elm._leaveCb(),O&&O(n,I)}),M&&M(n),G&&(fr(n,A),fr(n,F),ur(function(){dr(n,A),I.cancelled||(fr(n,P),N||(xr(E)?setTimeout(I,E):vr(n,c,I)))})),t.data.show&&(e&&e(),O&&O(n,I)),G||N||I()}}}function br(t,e){var n=t.elm;r(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var a=er(t.data.transition);if(i(a)||1!==n.nodeType)return e();if(!r(n._leaveCb)){var o=a.css,c=a.type,h=a.leaveClass,l=a.leaveToClass,u=a.leaveActiveClass,f=a.beforeLeave,v=a.leave,p=a.afterLeave,g=a.leaveCancelled,m=a.delayLeave,y=a.duration,_=!1!==o&&!V,b=Sr(v),x=d(s(y)?y.leave:y);0;var S=n._leaveCb=D(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),_&&(dr(n,l),dr(n,u)),S.cancelled?(_&&dr(n,h),g&&g(n)):(e(),p&&p(n)),n._leaveCb=null});m?m(w):w()}function w(){S.cancelled||(t.data.show||((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),f&&f(n),_&&(fr(n,h),fr(n,u),ur(function(){dr(n,h),S.cancelled||(fr(n,l),b||(xr(x)?setTimeout(S,x):vr(n,c,S)))})),v&&v(n,S),_||b||S())}}function xr(t){return"number"==typeof t&&!isNaN(t)}function Sr(t){if(i(t))return!1;var e=t.fns;return r(e)?Sr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function wr(t,e){!0!==e.data.show&&_r(e)}var Cr=function(t){var e,n,s={},c=t.modules,h=t.nodeOps;for(e=0;e<zn.length;++e)for(s[zn[e]]=[],n=0;n<c.length;++n)r(c[n][zn[e]])&&s[zn[e]].push(c[n][zn[e]]);function l(t){var e=h.parentNode(t);r(e)&&h.removeChild(e,t)}function u(t,e,n,i,o,c,l){if(r(t.elm)&&r(c)&&(t=c[l]=mt(t)),t.isRootInsert=!o,!function(t,e,n,i){var o=t.data;if(r(o)){var c=r(t.componentInstance)&&o.keepAlive;if(r(o=o.hook)&&r(o=o.init)&&o(t,!1,n,i),r(t.componentInstance))return f(t,e),a(c)&&function(t,e,n,i){for(var a,o=t;o.componentInstance;)if(o=o.componentInstance._vnode,r(a=o.data)&&r(a=a.transition)){for(a=0;a<s.activate.length;++a)s.activate[a](Hn,o);e.push(o);break}d(n,t.elm,i)}(t,e,n,i),!0}}(t,e,n,i)){var u=t.data,v=t.children,g=t.tag;r(g)?(t.elm=t.ns?h.createElementNS(t.ns,g):h.createElement(g,t),y(t),p(t,v,e),r(u)&&m(t,e),d(n,t.elm,i)):a(t.isComment)?(t.elm=h.createComment(t.text),d(n,t.elm,i)):(t.elm=h.createTextNode(t.text),d(n,t.elm,i))}}function f(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,g(t)?(m(t,e),y(t)):(Bn(t),e.push(t))}function d(t,e,n){r(t)&&(r(n)?n.parentNode===t&&h.insertBefore(t,e,n):h.appendChild(t,e))}function p(t,e,n){if(Array.isArray(e))for(var i=0;i<e.length;++i)u(e[i],n,t.elm,null,!0,e,i);else o(t.text)&&h.appendChild(t.elm,h.createTextNode(String(t.text)))}function g(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function m(t,n){for(var i=0;i<s.create.length;++i)s.create[i](Hn,t);r(e=t.data.hook)&&(r(e.create)&&e.create(Hn,t),r(e.insert)&&n.push(t))}function y(t){var e;if(r(e=t.fnScopeId))h.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&h.setStyleScope(t.elm,e),n=n.parent;r(e=be)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&h.setStyleScope(t.elm,e)}function _(t,e,n,i,r,a){for(;i<=r;++i)u(n[i],a,t,e,!1,n,i)}function b(t){var e,n,i=t.data;if(r(i))for(r(e=i.hook)&&r(e=e.destroy)&&e(t),e=0;e<s.destroy.length;++e)s.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)b(t.children[n])}function x(t,e,n,i){for(;n<=i;++n){var a=e[n];r(a)&&(r(a.tag)?(S(a),b(a)):l(a.elm))}}function S(t,e){if(r(e)||r(t.data)){var n,i=s.remove.length+1;for(r(e)?e.listeners+=i:e=function(t,e){function n(){0==--n.listeners&&l(t)}return n.listeners=e,n}(t.elm,i),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&S(n,e),n=0;n<s.remove.length;++n)s.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else l(t.elm)}function w(t,e,n,i){for(var a=n;a<i;a++){var o=e[a];if(r(o)&&Wn(t,o))return a}}function C(t,e,n,o){if(t!==e){var c=e.elm=t.elm;if(a(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?k(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(a(e.isStatic)&&a(t.isStatic)&&e.key===t.key&&(a(e.isCloned)||a(e.isOnce)))e.componentInstance=t.componentInstance;else{var l,f=e.data;r(f)&&r(l=f.hook)&&r(l=l.prepatch)&&l(t,e);var d=t.children,v=e.children;if(r(f)&&g(e)){for(l=0;l<s.update.length;++l)s.update[l](t,e);r(l=f.hook)&&r(l=l.update)&&l(t,e)}i(e.text)?r(d)&&r(v)?d!==v&&function(t,e,n,a,o){for(var s,c,l,f=0,d=0,v=e.length-1,p=e[0],g=e[v],m=n.length-1,y=n[0],b=n[m],S=!o;f<=v&&d<=m;)i(p)?p=e[++f]:i(g)?g=e[--v]:Wn(p,y)?(C(p,y,a),p=e[++f],y=n[++d]):Wn(g,b)?(C(g,b,a),g=e[--v],b=n[--m]):Wn(p,b)?(C(p,b,a),S&&h.insertBefore(t,p.elm,h.nextSibling(g.elm)),p=e[++f],b=n[--m]):Wn(g,y)?(C(g,y,a),S&&h.insertBefore(t,g.elm,p.elm),g=e[--v],y=n[++d]):(i(s)&&(s=Xn(e,f,v)),i(c=r(y.key)?s[y.key]:w(y,e,f,v))?u(y,a,t,p.elm,!1,n,d):Wn(l=e[c],y)?(C(l,y,a),e[c]=void 0,S&&h.insertBefore(t,l.elm,p.elm)):u(y,a,t,p.elm,!1,n,d),y=n[++d]);f>v?_(t,i(n[m+1])?null:n[m+1].elm,n,d,m,a):d>m&&x(0,e,f,v)}(c,d,v,n,o):r(v)?(r(t.text)&&h.setTextContent(c,""),_(c,null,v,0,v.length-1,n)):r(d)?x(0,d,0,d.length-1):r(t.text)&&h.setTextContent(c,""):t.text!==e.text&&h.setTextContent(c,e.text),r(f)&&r(l=f.hook)&&r(l=l.postpatch)&&l(t,e)}}}function K(t,e,n){if(a(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var T=v("attrs,class,staticClass,staticStyle,key");function k(t,e,n,i){var o,s=e.tag,c=e.data,h=e.children;if(i=i||c&&c.pre,e.elm=t,a(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(c)&&(r(o=c.hook)&&r(o=o.init)&&o(e,!0),r(o=e.componentInstance)))return f(e,n),!0;if(r(s)){if(r(h))if(t.hasChildNodes())if(r(o=c)&&r(o=o.domProps)&&r(o=o.innerHTML)){if(o!==t.innerHTML)return!1}else{for(var l=!0,u=t.firstChild,d=0;d<h.length;d++){if(!u||!k(u,h[d],n,i)){l=!1;break}u=u.nextSibling}if(!l||u)return!1}else p(e,h,n);if(r(c)){var v=!1;for(var g in c)if(!T(g)){v=!0,m(e,n);break}!v&&c.class&&ne(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,o,c,l){if(!i(e)){var f,d=!1,v=[];if(i(t))d=!0,u(e,v,c,l);else{var p=r(t.nodeType);if(!p&&Wn(t,e))C(t,e,v,o);else{if(p){if(1===t.nodeType&&t.hasAttribute(E)&&(t.removeAttribute(E),n=!0),a(n)&&k(t,e,v))return K(e,v,!0),t;f=t,t=new dt(h.tagName(f).toLowerCase(),{},[],void 0,f)}var m=t.elm,y=h.parentNode(m);if(u(e,v,m._leaveCb?null:y,h.nextSibling(m)),r(e.parent))for(var _=e.parent,S=g(e);_;){for(var w=0;w<s.destroy.length;++w)s.destroy[w](_);if(_.elm=e.elm,S){for(var T=0;T<s.create.length;++T)s.create[T](Hn,_);var A=_.data.hook.insert;if(A.merged)for(var F=1;F<A.fns.length;F++)A.fns[F]()}else Bn(_);_=_.parent}r(y)?x(0,[t],0,0):r(t.tag)&&b(t)}}return K(e,v,d),e.elm}r(t)&&b(t)}}({nodeOps:$n,modules:[ri,fi,Ni,$i,Qi,z?{create:wr,activate:wr,remove:function(t,e){!0!==t.data.show?br(t,e):e()}}:{}].concat(ti)});V&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Or(t,"input")});var Kr={inserted:function(t,e,n,i){"select"===n.tag?(i.elm&&!i.elm._vOptions?se(n,"postpatch",function(){Kr.componentUpdated(t,e,n)}):Tr(t,e,n.context),t._vOptions=[].map.call(t.options,Fr)):("textarea"===n.tag||In(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Pr),t.addEventListener("compositionend",Mr),t.addEventListener("change",Mr),V&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Tr(t,e,n.context);var i=t._vOptions,r=t._vOptions=[].map.call(t.options,Fr);if(r.some(function(t,e){return!L(t,i[e])}))(t.multiple?e.value.some(function(t){return Ar(t,r)}):e.value!==e.oldValue&&Ar(e.value,r))&&Or(t,"change")}}};function Tr(t,e,n){kr(t,e,n),(Y||J)&&setTimeout(function(){kr(t,e,n)},0)}function kr(t,e,n){var i=e.value,r=t.multiple;if(!r||Array.isArray(i)){for(var a,o,s=0,c=t.options.length;s<c;s++)if(o=t.options[s],r)a=R(i,Fr(o))>-1,o.selected!==a&&(o.selected=a);else if(L(Fr(o),i))return void(t.selectedIndex!==s&&(t.selectedIndex=s));r||(t.selectedIndex=-1)}}function Ar(t,e){return e.every(function(e){return!L(e,t)})}function Fr(t){return"_value"in t?t._value:t.value}function Pr(t){t.target.composing=!0}function Mr(t){t.target.composing&&(t.target.composing=!1,Or(t.target,"input"))}function Or(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Lr(t){return!t.componentInstance||t.data&&t.data.transition?t:Lr(t.componentInstance._vnode)}var Rr={model:Kr,show:{bind:function(t,e,n){var i=e.value,r=(n=Lr(n)).data&&n.data.transition,a=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&r?(n.data.show=!0,_r(n,function(){t.style.display=a})):t.style.display=i?a:"none"},update:function(t,e,n){var i=e.value;!i!=!e.oldValue&&((n=Lr(n)).data&&n.data.transition?(n.data.show=!0,i?_r(n,function(){t.style.display=t.__vOriginalDisplay}):br(n,function(){t.style.display="none"})):t.style.display=i?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,i,r){r||(t.style.display=t.__vOriginalDisplay)}}},Dr={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Er(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Er(de(e.children)):t}function Gr(t){var e={},n=t.$options;for(var i in n.propsData)e[i]=t[i];var r=n._parentListeners;for(var a in r)e[S(a)]=r[a];return e}function Nr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Ir={name:"transition",props:Dr,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||fe(t)})).length){0;var i=this.mode;0;var r=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return r;var a=Er(r);if(!a)return r;if(this._leaving)return Nr(t,r);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=Gr(this),h=this._vnode,l=Er(h);if(a.data.directives&&a.data.directives.some(function(t){return"show"===t.name})&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!fe(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var u=l.data.transition=A({},c);if("out-in"===i)return this._leaving=!0,se(u,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Nr(t,r);if("in-out"===i){if(fe(a))return h;var f,d=function(){f()};se(c,"afterEnter",d),se(c,"enterCancelled",d),se(u,"delayLeave",function(t){f=t})}}return r}}},Ur=A({tag:String,moveClass:String},Dr);function $r(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function jr(t){t.data.newPos=t.elm.getBoundingClientRect()}function Br(t){var e=t.data.pos,n=t.data.newPos,i=e.left-n.left,r=e.top-n.top;if(i||r){t.data.moved=!0;var a=t.elm.style;a.transform=a.WebkitTransform="translate("+i+"px,"+r+"px)",a.transitionDuration="0s"}}delete Ur.mode;var Hr={Transition:Ir,TransitionGroup:{props:Ur,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,r=this.$slots.default||[],a=this.children=[],o=Gr(this),s=0;s<r.length;s++){var c=r[s];if(c.tag)if(null!=c.key&&0!==String(c.key).indexOf("__vlist"))a.push(c),n[c.key]=c,(c.data||(c.data={})).transition=o;else;}if(i){for(var h=[],l=[],u=0;u<i.length;u++){var f=i[u];f.data.transition=o,f.data.pos=f.elm.getBoundingClientRect(),n[f.key]?h.push(f):l.push(f)}this.kept=t(e,null,h),this.removed=l}return t(e,null,a)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach($r),t.forEach(jr),t.forEach(Br),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,i=n.style;fr(n,e),i.transform=i.WebkitTransform=i.transitionDuration="",n.addEventListener(sr,n._moveCb=function t(i){i&&!/transform$/.test(i.propertyName)||(n.removeEventListener(sr,t),n._moveCb=null,dr(n,e))})}}))},methods:{hasMove:function(t,e){if(!ir)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){tr(n,t)}),Zi(n,e),n.style.display="none",this.$el.appendChild(n);var i=gr(n);return this.$el.removeChild(n),this._hasMove=i.hasTransform}}}};fn.config.mustUseProp=Sn,fn.config.isReservedTag=En,fn.config.isReservedAttr=bn,fn.config.getTagNamespace=Gn,fn.config.isUnknownElement=function(t){if(!z)return!0;if(En(t))return!1;if(t=t.toLowerCase(),null!=Nn[t])return Nn[t];var e=document.createElement(t);return t.indexOf("-")>-1?Nn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Nn[t]=/HTMLUnknownElement/.test(e.toString())},A(fn.options.directives,Rr),A(fn.options.components,Hr),fn.prototype.__patch__=z?Cr:P,fn.prototype.$mount=function(t,e){return function(t,e,n){return t.$el=e,t.$options.render||(t.$options.render=pt),we(t,"beforeMount"),new Oe(t,function(){t._update(t._render(),n)},P,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,we(t,"mounted")),t}(this,t=t&&z?Un(t):void 0,e)},z&&setTimeout(function(){I.devtools&&it&&it.emit("init",fn)},0);var zr=/\{\{((?:.|\n)+?)\}\}/g,Wr=/[-.*+?^${}()|[\]\/\\]/g,Xr=b(function(t){var e=t[0].replace(Wr,"\\$&"),n=t[1].replace(Wr,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")});function qr(t,e){var n=e?Xr(e):zr;if(n.test(t)){for(var i,r,a,o=[],s=[],c=n.lastIndex=0;i=n.exec(t);){(r=i.index)>c&&(s.push(a=t.slice(c,r)),o.push(JSON.stringify(a)));var h=vi(i[1].trim());o.push("_s("+h+")"),s.push({"@binding":h}),c=r+i[0].length}return c<t.length&&(s.push(a=t.slice(c)),o.push(JSON.stringify(a))),{expression:o.join("+"),tokens:s}}}var Yr={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Ci(t,"class");n&&(t.staticClass=JSON.stringify(n));var i=wi(t,"class",!1);i&&(t.classBinding=i)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var Vr,Jr={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Ci(t,"style");n&&(t.staticStyle=JSON.stringify(ji(n)));var i=wi(t,"style",!1);i&&(t.styleBinding=i)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},Qr=function(t){return(Vr=Vr||document.createElement("div")).innerHTML=t,Vr.textContent},Zr=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ta=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ea=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),na=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ia="[a-zA-Z_][\\w\\-\\.]*",ra="((?:"+ia+"\\:)?"+ia+")",aa=new RegExp("^<"+ra),oa=/^\s*(\/?)>/,sa=new RegExp("^<\\/"+ra+"[^>]*>"),ca=/^<!DOCTYPE [^>]+>/i,ha=/^<!\--/,la=/^<!\[/,ua=!1;"x".replace(/x(.)?/g,function(t,e){ua=""===e});var fa=v("script,style,textarea",!0),da={},va={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t"},pa=/&(?:lt|gt|quot|amp);/g,ga=/&(?:lt|gt|quot|amp|#10|#9);/g,ma=v("pre,textarea",!0),ya=function(t,e){return t&&ma(t)&&"\n"===e[0]};function _a(t,e){var n=e?ga:pa;return t.replace(n,function(t){return va[t]})}var ba,xa,Sa,wa,Ca,Ka,Ta,ka,Aa=/^@|^v-on:/,Fa=/^v-|^@|^:/,Pa=/([^]*?)\s+(?:in|of)\s+([^]*)/,Ma=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Oa=/^\(|\)$/g,La=/:(.*)$/,Ra=/^:|^v-bind:/,Da=/\.[^.]+/g,Ea=b(Qr);function Ga(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,i=t.length;n<i;n++)e[t[n].name]=t[n].value;return e}(e),parent:n,children:[]}}function Na(t,e){ba=e.warn||gi,Ka=e.isPreTag||M,Ta=e.mustUseProp||M,ka=e.getTagNamespace||M,Sa=mi(e.modules,"transformNode"),wa=mi(e.modules,"preTransformNode"),Ca=mi(e.modules,"postTransformNode"),xa=e.delimiters;var n,i,r=[],a=!1!==e.preserveWhitespace,o=!1,s=!1;function c(t){t.pre&&(o=!1),Ka(t.tag)&&(s=!1);for(var n=0;n<Ca.length;n++)Ca[n](t,e)}return function(t,e){for(var n,i,r=[],a=e.expectHTML,o=e.isUnaryTag||M,s=e.canBeLeftOpenTag||M,c=0;t;){if(n=t,i&&fa(i)){var h=0,l=i.toLowerCase(),u=da[l]||(da[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),f=t.replace(u,function(t,n,i){return h=i.length,fa(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),ya(l,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});c+=t.length-f.length,t=f,T(l,c-h,c)}else{var d=t.indexOf("<");if(0===d){if(ha.test(t)){var v=t.indexOf("--\x3e");if(v>=0){e.shouldKeepComment&&e.comment(t.substring(4,v)),w(v+3);continue}}if(la.test(t)){var p=t.indexOf("]>");if(p>=0){w(p+2);continue}}var g=t.match(ca);if(g){w(g[0].length);continue}var m=t.match(sa);if(m){var y=c;w(m[0].length),T(m[1],y,c);continue}var _=C();if(_){K(_),ya(i,t)&&w(1);continue}}var b=void 0,x=void 0,S=void 0;if(d>=0){for(x=t.slice(d);!(sa.test(x)||aa.test(x)||ha.test(x)||la.test(x)||(S=x.indexOf("<",1))<0);)d+=S,x=t.slice(d);b=t.substring(0,d),w(d)}d<0&&(b=t,t=""),e.chars&&b&&e.chars(b)}if(t===n){e.chars&&e.chars(t);break}}function w(e){c+=e,t=t.substring(e)}function C(){var e=t.match(aa);if(e){var n,i,r={tagName:e[1],attrs:[],start:c};for(w(e[0].length);!(n=t.match(oa))&&(i=t.match(na));)w(i[0].length),r.attrs.push(i);if(n)return r.unarySlash=n[1],w(n[0].length),r.end=c,r}}function K(t){var n=t.tagName,c=t.unarySlash;a&&("p"===i&&ea(n)&&T(i),s(n)&&i===n&&T(n));for(var h=o(n)||!!c,l=t.attrs.length,u=new Array(l),f=0;f<l;f++){var d=t.attrs[f];ua&&-1===d[0].indexOf('""')&&(""===d[3]&&delete d[3],""===d[4]&&delete d[4],""===d[5]&&delete d[5]);var v=d[3]||d[4]||d[5]||"",p="a"===n&&"href"===d[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;u[f]={name:d[1],value:_a(v,p)}}h||(r.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:u}),i=n),e.start&&e.start(n,u,h,t.start,t.end)}function T(t,n,a){var o,s;if(null==n&&(n=c),null==a&&(a=c),t&&(s=t.toLowerCase()),t)for(o=r.length-1;o>=0&&r[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var h=r.length-1;h>=o;h--)e.end&&e.end(r[h].tag,n,a);r.length=o,i=o&&r[o-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,a):"p"===s&&(e.start&&e.start(t,[],!1,n,a),e.end&&e.end(t,n,a))}T()}(t,{warn:ba,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,h){var l=i&&i.ns||ka(t);Y&&"svg"===l&&(a=function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];Ba.test(i.name)||(i.name=i.name.replace(Ha,""),e.push(i))}return e}(a));var u,f=Ga(t,a,i);l&&(f.ns=l),"style"!==(u=f).tag&&("script"!==u.tag||u.attrsMap.type&&"text/javascript"!==u.attrsMap.type)||nt()||(f.forbidden=!0);for(var d=0;d<wa.length;d++)f=wa[d](f,e)||f;function v(t){0}if(o||(!function(t){null!=Ci(t,"v-pre")&&(t.pre=!0)}(f),f.pre&&(o=!0)),Ka(f.tag)&&(s=!0),o?function(t){var e=t.attrsList.length;if(e)for(var n=t.attrs=new Array(e),i=0;i<e;i++)n[i]={name:t.attrsList[i].name,value:JSON.stringify(t.attrsList[i].value)};else t.pre||(t.plain=!0)}(f):f.processed||(Ua(f),function(t){var e=Ci(t,"v-if");if(e)t.if=e,$a(t,{exp:e,block:t});else{null!=Ci(t,"v-else")&&(t.else=!0);var n=Ci(t,"v-else-if");n&&(t.elseif=n)}}(f),function(t){null!=Ci(t,"v-once")&&(t.once=!0)}(f),Ia(f,e)),n?r.length||n.if&&(f.elseif||f.else)&&(v(),$a(n,{exp:f.elseif,block:f})):(n=f,v()),i&&!f.forbidden)if(f.elseif||f.else)!function(t,e){var n=function(t){var e=t.length;for(;e--;){if(1===t[e].type)return t[e];t.pop()}}(e.children);n&&n.if&&$a(n,{exp:t.elseif,block:t})}(f,i);else if(f.slotScope){i.plain=!1;var p=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[p]=f}else i.children.push(f),f.parent=i;h?c(f):(i=f,r.push(f))},end:function(){var t=r[r.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!s&&t.children.pop(),r.length-=1,i=r[r.length-1],c(t)},chars:function(t){if(i&&(!Y||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var e,n,r=i.children;if(t=s||t.trim()?"script"===(e=i).tag||"style"===e.tag?t:Ea(t):a&&r.length?" ":"")!o&&" "!==t&&(n=qr(t,xa))?r.push({type:2,expression:n.expression,tokens:n.tokens,text:t}):" "===t&&r.length&&" "===r[r.length-1].text||r.push({type:3,text:t})}},comment:function(t){i.children.push({type:3,text:t,isComment:!0})}}),n}function Ia(t,e){var n,i;(i=wi(n=t,"key"))&&(n.key=i),t.plain=!t.key&&!t.attrsList.length,function(t){var e=wi(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){if("slot"===t.tag)t.slotName=wi(t,"name");else{var e;"template"===t.tag?(e=Ci(t,"scope"),t.slotScope=e||Ci(t,"slot-scope")):(e=Ci(t,"slot-scope"))&&(t.slotScope=e);var n=wi(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,"template"===t.tag||t.slotScope||_i(t,"slot",n))}}(t),function(t){var e;(e=wi(t,"is"))&&(t.component=e);null!=Ci(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var r=0;r<Sa.length;r++)t=Sa[r](t,e)||t;!function(t){var e,n,i,r,a,o,s,c=t.attrsList;for(e=0,n=c.length;e<n;e++){if(i=r=c[e].name,a=c[e].value,Fa.test(i))if(t.hasBindings=!0,(o=ja(i))&&(i=i.replace(Da,"")),Ra.test(i))i=i.replace(Ra,""),a=vi(a),s=!1,o&&(o.prop&&(s=!0,"innerHtml"===(i=S(i))&&(i="innerHTML")),o.camel&&(i=S(i)),o.sync&&Si(t,"update:"+S(i),Ti(a,"$event"))),s||!t.component&&Ta(t.tag,t.attrsMap.type,i)?yi(t,i,a):_i(t,i,a);else if(Aa.test(i))i=i.replace(Aa,""),Si(t,i,a,o,!1);else{var h=(i=i.replace(Fa,"")).match(La),l=h&&h[1];l&&(i=i.slice(0,-(l.length+1))),xi(t,i,r,a,l,o)}else _i(t,i,JSON.stringify(a)),!t.component&&"muted"===i&&Ta(t.tag,t.attrsMap.type,i)&&yi(t,i,"true")}}(t)}function Ua(t){var e;if(e=Ci(t,"v-for")){var n=function(t){var e=t.match(Pa);if(!e)return;var n={};n.for=e[2].trim();var i=e[1].trim().replace(Oa,""),r=i.match(Ma);r?(n.alias=i.replace(Ma,""),n.iterator1=r[1].trim(),r[2]&&(n.iterator2=r[2].trim())):n.alias=i;return n}(e);n&&A(t,n)}}function $a(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function ja(t){var e=t.match(Da);if(e){var n={};return e.forEach(function(t){n[t.slice(1)]=!0}),n}}var Ba=/^xmlns:NS\d+/,Ha=/^NS\d+:/;function za(t){return Ga(t.tag,t.attrsList.slice(),t.parent)}var Wa=[Yr,Jr,{preTransformNode:function(t,e){if("input"===t.tag){var n,i=t.attrsMap;if(!i["v-model"])return;if((i[":type"]||i["v-bind:type"])&&(n=wi(t,"type")),i.type||n||!i["v-bind"]||(n="("+i["v-bind"]+").type"),n){var r=Ci(t,"v-if",!0),a=r?"&&("+r+")":"",o=null!=Ci(t,"v-else",!0),s=Ci(t,"v-else-if",!0),c=za(t);Ua(c),bi(c,"type","checkbox"),Ia(c,e),c.processed=!0,c.if="("+n+")==='checkbox'"+a,$a(c,{exp:c.if,block:c});var h=za(t);Ci(h,"v-for",!0),bi(h,"type","radio"),Ia(h,e),$a(c,{exp:"("+n+")==='radio'"+a,block:h});var l=za(t);return Ci(l,"v-for",!0),bi(l,":type",n),Ia(l,e),$a(c,{exp:r,block:l}),o?c.else=!0:s&&(c.elseif=s),c}}}}];var Xa,qa,Ya={expectHTML:!0,modules:Wa,directives:{model:function(t,e,n){n;var i=e.value,r=e.modifiers,a=t.tag,o=t.attrsMap.type;if(t.component)return Ki(t,i,r),!1;if("select"===a)!function(t,e,n){var i='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";i=i+" "+Ti(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Si(t,"change",i,null,!0)}(t,i,r);else if("input"===a&&"checkbox"===o)!function(t,e,n){var i=n&&n.number,r=wi(t,"value")||"null",a=wi(t,"true-value")||"true",o=wi(t,"false-value")||"false";yi(t,"checked","Array.isArray("+e+")?_i("+e+","+r+")>-1"+("true"===a?":("+e+")":":_q("+e+","+a+")")),Si(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+a+"):("+o+");if(Array.isArray($$a)){var $$v="+(i?"_n("+r+")":r)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Ti(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Ti(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Ti(e,"$$c")+"}",null,!0)}(t,i,r);else if("input"===a&&"radio"===o)!function(t,e,n){var i=n&&n.number,r=wi(t,"value")||"null";yi(t,"checked","_q("+e+","+(r=i?"_n("+r+")":r)+")"),Si(t,"change",Ti(e,r),null,!0)}(t,i,r);else if("input"===a||"textarea"===a)!function(t,e,n){var i=t.attrsMap.type,r=n||{},a=r.lazy,o=r.number,s=r.trim,c=!a&&"range"!==i,h=a?"change":"range"===i?Li:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),o&&(l="_n("+l+")");var u=Ti(e,l);c&&(u="if($event.target.composing)return;"+u),yi(t,"value","("+e+")"),Si(t,h,u,null,!0),(s||o)&&Si(t,"blur","$forceUpdate()")}(t,i,r);else if(!I.isReservedTag(a))return Ki(t,i,r),!1;return!0},text:function(t,e){e.value&&yi(t,"textContent","_s("+e.value+")")},html:function(t,e){e.value&&yi(t,"innerHTML","_s("+e.value+")")}},isPreTag:function(t){return"pre"===t},isUnaryTag:Zr,mustUseProp:Sn,canBeLeftOpenTag:ta,isReservedTag:En,getTagNamespace:Gn,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Wa)},Va=b(function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))});function Ja(t,e){t&&(Xa=Va(e.staticKeys||""),qa=e.isReservedTag||M,function t(e){e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||p(t.tag)||!qa(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Xa)))}(e);if(1===e.type){if(!qa(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,i=e.children.length;n<i;n++){var r=e.children[n];t(r),r.static||(e.static=!1)}if(e.ifConditions)for(var a=1,o=e.ifConditions.length;a<o;a++){var s=e.ifConditions[a].block;t(s),s.static||(e.static=!1)}}}(t),function t(e,n){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=n),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var i=0,r=e.children.length;i<r;i++)t(e.children[i],n||!!e.for);if(e.ifConditions)for(var a=1,o=e.ifConditions.length;a<o;a++)t(e.ifConditions[a].block,n)}}(t,!1))}var Qa=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Za=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,to={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},eo={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},no=function(t){return"if("+t+")return null;"},io={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:no("$event.target !== $event.currentTarget"),ctrl:no("!$event.ctrlKey"),shift:no("!$event.shiftKey"),alt:no("!$event.altKey"),meta:no("!$event.metaKey"),left:no("'button' in $event && $event.button !== 0"),middle:no("'button' in $event && $event.button !== 1"),right:no("'button' in $event && $event.button !== 2")};function ro(t,e,n){var i=e?"nativeOn:{":"on:{";for(var r in t)i+='"'+r+'":'+ao(r,t[r])+",";return i.slice(0,-1)+"}"}function ao(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return ao(t,e)}).join(",")+"]";var n=Za.test(e.value),i=Qa.test(e.value);if(e.modifiers){var r="",a="",o=[];for(var s in e.modifiers)if(io[s])a+=io[s],to[s]&&o.push(s);else if("exact"===s){var c=e.modifiers;a+=no(["ctrl","shift","alt","meta"].filter(function(t){return!c[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else o.push(s);return o.length&&(r+=function(t){return"if(!('button' in $event)&&"+t.map(oo).join("&&")+")return null;"}(o)),a&&(r+=a),"function($event){"+r+(n?"return "+e.value+"($event)":i?"return ("+e.value+")($event)":e.value)+"}"}return n||i?e.value:"function($event){"+e.value+"}"}function oo(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=to[t],i=eo[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(i)+")"}var so={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:P},co=function(t){this.options=t,this.warn=t.warn||gi,this.transforms=mi(t.modules,"transformCode"),this.dataGenFns=mi(t.modules,"genData"),this.directives=A(A({},so),t.directives);var e=t.isReservedTag||M;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]};function ho(t,e){var n=new co(e);return{render:"with(this){return "+(t?lo(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function lo(t,e){if(t.staticRoot&&!t.staticProcessed)return uo(t,e);if(t.once&&!t.onceProcessed)return fo(t,e);if(t.for&&!t.forProcessed)return function(t,e,n,i){var r=t.for,a=t.alias,o=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";0;return t.forProcessed=!0,(i||"_l")+"(("+r+"),function("+a+o+s+"){return "+(n||lo)(t,e)+"})"}(t,e);if(t.if&&!t.ifProcessed)return vo(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',i=mo(t,e),r="_t("+n+(i?","+i:""),a=t.attrs&&"{"+t.attrs.map(function(t){return S(t.name)+":"+t.value}).join(",")+"}",o=t.attrsMap["v-bind"];!a&&!o||i||(r+=",null");a&&(r+=","+a);o&&(r+=(a?"":",null")+","+o);return r+")"}(t,e);var n;if(t.component)n=function(t,e,n){var i=e.inlineTemplate?null:mo(e,n,!0);return"_c("+t+","+po(e,n)+(i?","+i:"")+")"}(t.component,t,e);else{var i=t.plain?void 0:po(t,e),r=t.inlineTemplate?null:mo(t,e,!0);n="_c('"+t.tag+"'"+(i?","+i:"")+(r?","+r:"")+")"}for(var a=0;a<e.transforms.length;a++)n=e.transforms[a](t,n);return n}return mo(t,e)||"void 0"}function uo(t,e){return t.staticProcessed=!0,e.staticRenderFns.push("with(this){return "+lo(t,e)+"}"),"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function fo(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return vo(t,e);if(t.staticInFor){for(var n="",i=t.parent;i;){if(i.for){n=i.key;break}i=i.parent}return n?"_o("+lo(t,e)+","+e.onceId+++","+n+")":lo(t,e)}return uo(t,e)}function vo(t,e,n,i){return t.ifProcessed=!0,function t(e,n,i,r){if(!e.length)return r||"_e()";var a=e.shift();return a.exp?"("+a.exp+")?"+o(a.block)+":"+t(e,n,i,r):""+o(a.block);function o(t){return i?i(t,n):t.once?fo(t,n):lo(t,n)}}(t.ifConditions.slice(),e,n,i)}function po(t,e){var n="{",i=function(t,e){var n=t.directives;if(!n)return;var i,r,a,o,s="directives:[",c=!1;for(i=0,r=n.length;i<r;i++){a=n[i],o=!0;var h=e.directives[a.name];h&&(o=!!h(t,a,e.warn)),o&&(c=!0,s+='{name:"'+a.name+'",rawName:"'+a.rawName+'"'+(a.value?",value:("+a.value+"),expression:"+JSON.stringify(a.value):"")+(a.arg?',arg:"'+a.arg+'"':"")+(a.modifiers?",modifiers:"+JSON.stringify(a.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(t,e);i&&(n+=i+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var r=0;r<e.dataGenFns.length;r++)n+=e.dataGenFns[r](t);if(t.attrs&&(n+="attrs:{"+bo(t.attrs)+"},"),t.props&&(n+="domProps:{"+bo(t.props)+"},"),t.events&&(n+=ro(t.events,!1,e.warn)+","),t.nativeEvents&&(n+=ro(t.nativeEvents,!0,e.warn)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=function(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(n){return go(n,t[n],e)}).join(",")+"])"}(t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var a=function(t,e){var n=t.children[0];0;if(1===n.type){var i=ho(n,e.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}(t,e);a&&(n+=a+",")}return n=n.replace(/,$/,"")+"}",t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function go(t,e,n){return e.for&&!e.forProcessed?function(t,e,n){var i=e.for,r=e.alias,a=e.iterator1?","+e.iterator1:"",o=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+i+"),function("+r+a+o+"){return "+go(t,e,n)+"})"}(t,e,n):"{key:"+t+",fn:"+("function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?e.if+"?"+(mo(e,n)||"undefined")+":undefined":mo(e,n)||"undefined":lo(e,n))+"}")+"}"}function mo(t,e,n,i,r){var a=t.children;if(a.length){var o=a[0];if(1===a.length&&o.for&&"template"!==o.tag&&"slot"!==o.tag)return(i||lo)(o,e);var s=n?function(t,e){for(var n=0,i=0;i<t.length;i++){var r=t[i];if(1===r.type){if(yo(r)||r.ifConditions&&r.ifConditions.some(function(t){return yo(t.block)})){n=2;break}(e(r)||r.ifConditions&&r.ifConditions.some(function(t){return e(t.block)}))&&(n=1)}}return n}(a,e.maybeComponent):0,c=r||_o;return"["+a.map(function(t){return c(t,e)}).join(",")+"]"+(s?","+s:"")}}function yo(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function _o(t,e){return 1===t.type?lo(t,e):3===t.type&&t.isComment?(i=t,"_e("+JSON.stringify(i.text)+")"):"_v("+(2===(n=t).type?n.expression:xo(JSON.stringify(n.text)))+")";var n,i}function bo(t){for(var e="",n=0;n<t.length;n++){var i=t[n];e+='"'+i.name+'":'+xo(i.value)+","}return e.slice(0,-1)}function xo(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function So(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),P}}var wo,Co,Ko=(wo=function(t,e){var n=Na(t.trim(),e);!1!==e.optimize&&Ja(n,e);var i=ho(n,e);return{ast:n,render:i.render,staticRenderFns:i.staticRenderFns}},function(t){function e(e,n){var i=Object.create(t),r=[],a=[];if(i.warn=function(t,e){(e?a:r).push(t)},n)for(var o in n.modules&&(i.modules=(t.modules||[]).concat(n.modules)),n.directives&&(i.directives=A(Object.create(t.directives||null),n.directives)),n)"modules"!==o&&"directives"!==o&&(i[o]=n[o]);var s=wo(e,i);return s.errors=r,s.tips=a,s}return{compile:e,compileToFunctions:function(t){var e=Object.create(null);return function(n,i,r){(i=A({},i)).warn,delete i.warn;var a=i.delimiters?String(i.delimiters)+n:n;if(e[a])return e[a];var o=t(n,i),s={},c=[];return s.render=So(o.render,c),s.staticRenderFns=o.staticRenderFns.map(function(t){return So(t,c)}),e[a]=s}}(e)}})(Ya).compileToFunctions;function To(t){return(Co=Co||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',Co.innerHTML.indexOf(" ")>0}var ko=!!z&&To(!1),Ao=!!z&&To(!0),Fo=b(function(t){var e=Un(t);return e&&e.innerHTML}),Po=fn.prototype.$mount;fn.prototype.$mount=function(t,e){if((t=t&&Un(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var i=n.template;if(i)if("string"==typeof i)"#"===i.charAt(0)&&(i=Fo(i));else{if(!i.nodeType)return this;i=i.innerHTML}else t&&(i=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(i){0;var r=Ko(i,{shouldDecodeNewlines:ko,shouldDecodeNewlinesForHref:Ao,delimiters:n.delimiters,comments:n.comments},this),a=r.render,o=r.staticRenderFns;n.render=a,n.staticRenderFns=o}}return Po.call(this,t,e)},fn.compile=Ko,e.a=fn}).call(e,n("DuR2"))},"77Pl":function(t,e,n){var i=n("EqjI");t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},"7KvD":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)},"82Mu":function(t,e,n){var i=n("7KvD"),r=n("L42u").set,a=i.MutationObserver||i.WebKitMutationObserver,o=i.process,s=i.Promise,c="process"==n("R9M2")(o);t.exports=function(){var t,e,n,h=function(){var i,r;for(c&&(i=o.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(c)n=function(){o.nextTick(h)};else if(!a||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var l=s.resolve();n=function(){l.then(h)}}else n=function(){r.call(i,h)};else{var u=!0,f=document.createTextNode("");new a(h).observe(f,{characterData:!0}),n=function(){f.data=u=!u}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},"880/":function(t,e,n){t.exports=n("hJx8")},"94VQ":function(t,e,n){"use strict";var i=n("Yobk"),r=n("X8DO"),a=n("e6n0"),o={};n("hJx8")(o,n("dSzd")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(o,{next:r(1,n)}),a(t,e+" Iterator")}},"9bBU":function(t,e,n){n("mClu");var i=n("FeBl").Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},C4MV:function(t,e,n){t.exports={default:n("9bBU"),__esModule:!0}},CXw9:function(t,e,n){"use strict";var i,r,a,o,s=n("O4g8"),c=n("7KvD"),h=n("+ZMJ"),l=n("RY/4"),u=n("kM2E"),f=n("EqjI"),d=n("lOnJ"),v=n("2KxR"),p=n("NWt+"),g=n("t8x9"),m=n("L42u").set,y=n("82Mu")(),_=n("qARP"),b=n("dNDb"),x=n("fJUb"),S=c.TypeError,w=c.process,C=c.Promise,K="process"==l(w),T=function(){},k=r=_.f,A=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n("dSzd")("species")]=function(t){t(T,T)};return(K||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e}catch(t){}}(),F=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},P=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var i=t._v,r=1==t._s,a=0,o=function(e){var n,a,o,s=r?e.ok:e.fail,c=e.resolve,h=e.reject,l=e.domain;try{s?(r||(2==t._h&&L(t),t._h=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?h(S("Promise-chain cycle")):(a=F(n))?a.call(n,c,h):c(n)):h(i)}catch(t){l&&!o&&l.exit(),h(t)}};n.length>a;)o(n[a++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){m.call(c,function(){var e,n,i,r=t._v,a=O(t);if(a&&(e=b(function(){K?w.emit("unhandledRejection",r,t):(n=c.onunhandledrejection)?n({promise:t,reason:r}):(i=c.console)&&i.error&&i.error("Unhandled promise rejection",r)}),t._h=K||O(t)?2:1),t._a=void 0,a&&e.e)throw e.v})},O=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){m.call(c,function(){var e;K?w.emit("rejectionHandled",t):(e=c.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()),P(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=F(t))?y(function(){var i={_w:n,_d:!1};try{e.call(t,h(D,i,1),h(R,i,1))}catch(t){R.call(i,t)}}):(n._v=t,n._s=1,P(n,!1))}catch(t){R.call({_w:n,_d:!1},t)}}};A||(C=function(t){v(this,C,"Promise","_h"),d(t),i.call(this);try{t(h(D,this,1),h(R,this,1))}catch(t){R.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("xH/j")(C.prototype,{then:function(t,e){var n=k(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=K?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new i;this.promise=t,this.resolve=h(D,t,1),this.reject=h(R,t,1)},_.f=k=function(t){return t===C||t===o?new a(t):r(t)}),u(u.G+u.W+u.F*!A,{Promise:C}),n("e6n0")(C,"Promise"),n("bRrM")("Promise"),o=n("FeBl").Promise,u(u.S+u.F*!A,"Promise",{reject:function(t){var e=k(this);return(0,e.reject)(t),e.promise}}),u(u.S+u.F*(s||!A),"Promise",{resolve:function(t){return x(s&&this===o?C:this,t)}}),u(u.S+u.F*!(A&&n("dY0y")(function(t){C.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=k(e),i=n.resolve,r=n.reject,a=b(function(){var n=[],a=0,o=1;p(t,!1,function(t){var s=a++,c=!1;n.push(void 0),o++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--o||i(n))},r)}),--o||i(n)});return a.e&&r(a.v),n.promise},race:function(t){var e=this,n=k(e),i=n.reject,r=b(function(){p(t,!1,function(t){e.resolve(t).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},D2L2:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},DuR2: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},EGZi:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},EqBC:function(t,e,n){"use strict";var i=n("kM2E"),r=n("FeBl"),a=n("7KvD"),o=n("t8x9"),s=n("fJUb");i(i.P+i.R,"Promise",{finally:function(t){var e=o(this,r.Promise||a.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},EqjI:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"FZ+f":function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(o=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(a).concat([r]).join("\n")}var o;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(i[a]=!0)}for(r=0;r<t.length;r++){var o=t[r];"number"==typeof o[0]&&i[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},FeBl:function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},Ibhu:function(t,e,n){var i=n("D2L2"),r=n("TcQ7"),a=n("vFc/")(!1),o=n("ax3d")("IE_PROTO");t.exports=function(t,e){var n,s=r(t),c=0,h=[];for(n in s)n!=o&&i(s,n)&&h.push(n);for(;e.length>c;)i(s,n=e[c++])&&(~a(h,n)||h.push(n));return h}},L42u:function(t,e,n){var i,r,a,o=n("+ZMJ"),s=n("knuC"),c=n("RPLV"),h=n("ON07"),l=n("7KvD"),u=l.process,f=l.setImmediate,d=l.clearImmediate,v=l.MessageChannel,p=l.Dispatch,g=0,m={},y=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},_=function(t){y.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++g]=function(){s("function"==typeof t?t:Function(t),e)},i(g),g},d=function(t){delete m[t]},"process"==n("R9M2")(u)?i=function(t){u.nextTick(o(y,t,1))}:p&&p.now?i=function(t){p.now(o(y,t,1))}:v?(a=(r=new v).port2,r.port1.onmessage=_,i=o(a.postMessage,a,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(i=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):i="onreadystatechange"in h("script")?function(t){c.appendChild(h("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(o(y,t,1),0)}),t.exports={set:f,clear:d}},M6a0:function(t,e){},MU5D:function(t,e,n){var i=n("R9M2");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},Mhyx:function(t,e,n){var i=n("/bQp"),r=n("dSzd")("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[r]===t)}},MmMw:function(t,e,n){var i=n("EqjI");t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},"NWt+":function(t,e,n){var i=n("+ZMJ"),r=n("msXi"),a=n("Mhyx"),o=n("77Pl"),s=n("QRG4"),c=n("3fs2"),h={},l={};(e=t.exports=function(t,e,n,u,f){var d,v,p,g,m=f?function(){return t}:c(t),y=i(n,u,e?2:1),_=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(a(m)){for(d=s(t.length);d>_;_++)if((g=e?y(o(v=t[_])[0],v[1]):y(t[_]))===h||g===l)return g}else for(p=m.call(t);!(v=p.next()).done;)if((g=r(p,y,v.value,e))===h||g===l)return g}).BREAK=h,e.RETURN=l},NpIQ:function(t,e){e.f={}.propertyIsEnumerable},O4g8:function(t,e){t.exports=!0},ON07:function(t,e,n){var i=n("EqjI"),r=n("7KvD").document,a=i(r)&&i(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},PzxK:function(t,e,n){var i=n("D2L2"),r=n("sB3e"),a=n("ax3d")("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},QRG4:function(t,e,n){var i=n("UuGF"),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},R4wc:function(t,e,n){var i=n("kM2E");i(i.S+i.F,"Object",{assign:n("To3L")})},R9M2:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},RPLV:function(t,e,n){var i=n("7KvD").document;t.exports=i&&i.documentElement},"RY/4":function(t,e,n){var i=n("R9M2"),r=n("dSzd")("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:a?i(e):"Object"==(o=i(e))&&"function"==typeof e.callee?"Arguments":o}},S82l:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},SfB7:function(t,e,n){t.exports=!n("+E39")&&!n("S82l")(function(){return 7!=Object.defineProperty(n("ON07")("div"),"a",{get:function(){return 7}}).a})},SldL:function(t,e){!function(e){"use strict";var n,i=Object.prototype,r=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",h="object"==typeof t,l=e.regeneratorRuntime;if(l)h&&(t.exports=l);else{(l=e.regeneratorRuntime=h?t.exports:{}).wrap=b;var u="suspendedStart",f="suspendedYield",d="executing",v="completed",p={},g={};g[o]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(M([])));y&&y!==i&&r.call(y,o)&&(g=y);var _=C.prototype=S.prototype=Object.create(g);w.prototype=_.constructor=C,C.constructor=w,C[c]=w.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(_),t},l.awrap=function(t){return{__await:t}},K(T.prototype),T.prototype[s]=function(){return this},l.AsyncIterator=T,l.async=function(t,e,n,i){var r=new T(b(t,e,n,i));return l.isGeneratorFunction(e)?r:r.next().then(function(t){return t.done?t.value:r.next()})},K(_),_[c]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},l.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(i,r){return s.type="throw",s.arg=t,e.next=i,r&&(e.method="next",e.arg=n),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),h=r.call(o,"finallyLoc");if(c&&h){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),F(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;F(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:M(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=n),p}}}function b(t,e,n,i){var r=e&&e.prototype instanceof S?e:S,a=Object.create(r.prototype),o=new P(i||[]);return a._invoke=function(t,e,n){var i=u;return function(r,a){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===r)throw a;return O()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===u)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=x(t,e,n);if("normal"===c.type){if(i=n.done?v:f,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}(t,n,o),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function S(){}function w(){}function C(){}function K(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function T(t){var e;this._invoke=function(n,i){function a(){return new Promise(function(e,a){!function e(n,i,a,o){var s=x(t[n],t,i);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==typeof h&&r.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,a,o)},function(t){e("throw",t,a,o)}):Promise.resolve(h).then(function(t){c.value=t,a(c)},o)}o(s.arg)}(n,i,e,a)})}return e=e?e.then(a,a):a()}}function k(t,e){var i=t.iterator[e.method];if(i===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(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 r=x(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function A(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function M(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 i=-1,a=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:O}}function O(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},TcQ7:function(t,e,n){var i=n("MU5D"),r=n("52gC");t.exports=function(t){return i(r(t))}},To3L:function(t,e,n){"use strict";var i=n("lktj"),r=n("1kS7"),a=n("NpIQ"),o=n("sB3e"),s=n("MU5D"),c=Object.assign;t.exports=!c||n("S82l")(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=i})?function(t,e){for(var n=o(t),c=arguments.length,h=1,l=r.f,u=a.f;c>h;)for(var f,d=s(arguments[h++]),v=l?i(d).concat(l(d)):i(d),p=v.length,g=0;p>g;)u.call(d,f=v[g++])&&(n[f]=d[f]);return n}:c},U5ju:function(t,e,n){n("M6a0"),n("zQR9"),n("+tPU"),n("CXw9"),n("EqBC"),n("jKW+"),t.exports=n("FeBl").Promise},UuGF:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},V3tA:function(t,e,n){n("R4wc"),t.exports=n("FeBl").Object.assign},"VU/8":function(t,e){t.exports=function(t,e,n,i,r,a){var o,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,s=t.default);var h,l="function"==typeof s?s.options:s;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId=r),a?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=h):i&&(h=i),h){var u=l.functional,f=u?l.render:l.beforeCreate;u?(l._injectStyles=h,l.render=function(t,e){return h.call(e),f(t,e)}):l.beforeCreate=f?[].concat(f,h):[h]}return{esModule:o,exports:s,options:l}}},X8DO:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},Xxa5:function(t,e,n){t.exports=n("jyFz")},Yobk:function(t,e,n){var i=n("77Pl"),r=n("qio6"),a=n("xnc9"),o=n("ax3d")("IE_PROTO"),s=function(){},c=function(){var t,e=n("ON07")("iframe"),i=a.length;for(e.style.display="none",n("RPLV").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c.prototype[a[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=i(t),n=new s,s.prototype=null,n[o]=t):n=c(),void 0===e?n:r(n,e)}},Zrlr:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},ax3d:function(t,e,n){var i=n("e8AB")("keys"),r=n("3Eo+");t.exports=function(t){return i[t]||(i[t]=r(t))}},bRrM:function(t,e,n){"use strict";var i=n("7KvD"),r=n("FeBl"),a=n("evD5"),o=n("+E39"),s=n("dSzd")("species");t.exports=function(t){var e="function"==typeof r[t]?r[t]:i[t];o&&e&&!e[s]&&a.f(e,s,{configurable:!0,get:function(){return this}})}},dNDb:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},dSzd:function(t,e,n){var i=n("e8AB")("wks"),r=n("3Eo+"),a=n("7KvD").Symbol,o="function"==typeof a;(t.exports=function(t){return i[t]||(i[t]=o&&a[t]||(o?a:r)("Symbol."+t))}).store=i},dY0y:function(t,e,n){var i=n("dSzd")("iterator"),r=!1;try{var a=[7][i]();a.return=function(){r=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var a=[7],o=a[i]();o.next=function(){return{done:n=!0}},a[i]=function(){return o},t(a)}catch(t){}return n}},e6n0:function(t,e,n){var i=n("evD5").f,r=n("D2L2"),a=n("dSzd")("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,a)&&i(t,a,{configurable:!0,value:e})}},e8AB:function(t,e,n){var i=n("7KvD"),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},evD5:function(t,e,n){var i=n("77Pl"),r=n("SfB7"),a=n("MmMw"),o=Object.defineProperty;e.f=n("+E39")?Object.defineProperty:function(t,e,n){if(i(t),e=a(e,!0),i(n),r)try{return o(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}},exGp:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("//Fk"),a=(i=r)&&i.__esModule?i:{default:i};e.default=function(t){return function(){var e=t.apply(this,arguments);return new a.default(function(t,n){return function i(r,o){try{var s=e[r](o),c=s.value}catch(t){return void n(t)}if(!s.done)return a.default.resolve(c).then(function(t){i("next",t)},function(t){i("throw",t)});t(c)}("next")})}}},fJUb:function(t,e,n){var i=n("77Pl"),r=n("EqjI"),a=n("qARP");t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},fkB2:function(t,e,n){var i=n("UuGF"),r=Math.max,a=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):a(t,e)}},h65t:function(t,e,n){var i=n("UuGF"),r=n("52gC");t.exports=function(t){return function(e,n){var a,o,s=String(r(e)),c=i(n),h=s.length;return c<0||c>=h?t?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===h||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):a:t?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}}},hJx8:function(t,e,n){var i=n("evD5"),r=n("X8DO");t.exports=n("+E39")?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},"jKW+":function(t,e,n){"use strict";var i=n("kM2E"),r=n("qARP"),a=n("dNDb");i(i.S,"Promise",{try:function(t){var e=r.f(this),n=a(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},jyFz:function(t,e,n){var i=function(){return this}()||Function("return this")(),r=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,a=r&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,t.exports=n("SldL"),r)i.regeneratorRuntime=a;else try{delete i.regeneratorRuntime}catch(t){i.regeneratorRuntime=void 0}},kM2E:function(t,e,n){var i=n("7KvD"),r=n("FeBl"),a=n("+ZMJ"),o=n("hJx8"),s=n("D2L2"),c=function(t,e,n){var h,l,u,f=t&c.F,d=t&c.G,v=t&c.S,p=t&c.P,g=t&c.B,m=t&c.W,y=d?r:r[e]||(r[e]={}),_=y.prototype,b=d?i:v?i[e]:(i[e]||{}).prototype;for(h in d&&(n=e),n)(l=!f&&b&&void 0!==b[h])&&s(y,h)||(u=l?b[h]:n[h],y[h]=d&&"function"!=typeof b[h]?n[h]:g&&l?a(u,i):m&&b[h]==u?function(t){var e=function(e,n,i){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,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(u):p&&"function"==typeof u?a(Function.call,u):u,p&&((y.virtual||(y.virtual={}))[h]=u,t&c.R&&_&&!_[h]&&o(_,h,u)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},knuC:function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?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)}},kxFB:function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},lOnJ:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},lktj:function(t,e,n){var i=n("Ibhu"),r=n("xnc9");t.exports=Object.keys||function(t){return i(t,r)}},mClu:function(t,e,n){var i=n("kM2E");i(i.S+i.F*!n("+E39"),"Object",{defineProperty:n("evD5").f})},msXi:function(t,e,n){var i=n("77Pl");t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&i(a.call(t)),e}}},qARP:function(t,e,n){"use strict";var i=n("lOnJ");t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=i(e),this.reject=i(n)}(t)}},qio6:function(t,e,n){var i=n("evD5"),r=n("77Pl"),a=n("lktj");t.exports=n("+E39")?Object.defineProperties:function(t,e){r(t);for(var n,o=a(e),s=o.length,c=0;s>c;)i.f(t,n=o[c++],e[n]);return t}},rjj0:function(t,e,n){var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)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 r=n("tTVk"),a={},o=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,h=!1,l=function(){},u=null,f="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(t){for(var e=0;e<t.length;e++){var n=t[e],i=a[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(g(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var o=[];for(r=0;r<n.parts.length;r++)o.push(g(n.parts[r]));a[n.id]={id:n.id,refs:1,parts:o}}}}function p(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function g(t){var e,n,i=document.querySelector("style["+f+'~="'+t.id+'"]');if(i){if(h)return l;i.parentNode.removeChild(i)}if(d){var r=c++;i=s||(s=p()),e=_.bind(null,i,r,!1),n=_.bind(null,i,r,!0)}else i=p(),e=function(t,e){var n=e.css,i=e.media,r=e.sourceMap;i&&t.setAttribute("media",i);u.ssrId&&t.setAttribute(f,e.id);r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}t.exports=function(t,e,n,i){h=n,u=i||{};var o=r(t,e);return v(o),function(e){for(var n=[],i=0;i<o.length;i++){var s=o[i];(c=a[s.id]).refs--,n.push(c)}e?v(o=r(t,e)):o=[];for(i=0;i<n.length;i++){var c;if(0===(c=n[i]).refs){for(var h=0;h<c.parts.length;h++)c.parts[h]();delete a[c.id]}}}};var m,y=(m=[],function(t,e){return m[t]=e,m.filter(Boolean).join("\n")});function _(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=y(e,r);else{var a=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}},sB3e:function(t,e,n){var i=n("52gC");t.exports=function(t){return Object(i(t))}},t8x9:function(t,e,n){var i=n("77Pl"),r=n("lOnJ"),a=n("dSzd")("species");t.exports=function(t,e){var n,o=i(t).constructor;return void 0===o||void 0==(n=i(o)[a])?e:r(n)}},tTVk:function(t,e){t.exports=function(t,e){for(var n=[],i={},r=0;r<e.length;r++){var a=e[r],o=a[0],s={id:t+":"+r,css:a[1],media:a[2],sourceMap:a[3]};i[o]?i[o].parts.push(s):n.push(i[o]={id:o,parts:[s]})}return n}},"vFc/":function(t,e,n){var i=n("TcQ7"),r=n("QRG4"),a=n("fkB2");t.exports=function(t){return function(e,n,o){var s,c=i(e),h=r(c.length),l=a(o,h);if(t&&n!=n){for(;h>l;)if((s=c[l++])!=s)return!0}else for(;h>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},"vIB/":function(t,e,n){"use strict";var i=n("O4g8"),r=n("kM2E"),a=n("880/"),o=n("hJx8"),s=n("/bQp"),c=n("94VQ"),h=n("e6n0"),l=n("PzxK"),u=n("dSzd")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,p,g,m){c(n,e,v);var y,_,b,x=function(t){if(!f&&t in K)return K[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==p,C=!1,K=t.prototype,T=K[u]||K["@@iterator"]||p&&K[p],k=T||x(p),A=p?w?x("entries"):k:void 0,F="Array"==e&&K.entries||T;if(F&&(b=l(F.call(new t)))!==Object.prototype&&b.next&&(h(b,S,!0),i||"function"==typeof b[u]||o(b,u,d)),w&&T&&"values"!==T.name&&(C=!0,k=function(){return T.call(this)}),i&&!m||!f&&!C&&K[u]||o(K,u,k),s[e]=k,s[S]=d,p)if(y={values:w?k:x("values"),keys:g?k:x("keys"),entries:A},m)for(_ in y)_ in K||a(K,_,y[_]);else r(r.P+r.F*(f||C),e,y);return y}},woOf:function(t,e,n){t.exports={default:n("V3tA"),__esModule:!0}},wxAW:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("C4MV"),a=(i=r)&&i.__esModule?i:{default:i};e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,a.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},xGkn:function(t,e,n){"use strict";var i=n("4mcu"),r=n("EGZi"),a=n("/bQp"),o=n("TcQ7");t.exports=n("vIB/")(Array,"Array",function(t,e){this._t=o(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,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},"xH/j":function(t,e,n){var i=n("hJx8");t.exports=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:i(t,r,e[r]);return t}},xLKd:function(t,e,n){(function(e){
/*
* Konva JavaScript Framework v2.0.2
* http://konvajs.github.io/
* Licensed under the MIT
* Date: Fri Mar 16 2018
*
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
*
* @license
*/
!function(){"use strict";var n=Math.PI/180,i={version:"2.0.2",stages:[],idCounter:0,ids:{},names:{},shapes:{},listenClickTap:!1,inDblClickWindow:!1,isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),enableTrace:!1,traceArrMax:100,dblClickWindow:400,pixelRatio:void 0,dragDistance:3,angleDeg:!0,showWarnings:!0,Filters:{},isDragging:function(){var t=i.DD;return!!t&&t.isDragging},isDragReady:function(){var t=i.DD;return!!t&&!!t.node},_addId:function(t,e){void 0!==e&&(this.ids[e]=t)},_removeId:function(t){void 0!==t&&delete this.ids[t]},_addName:function(t,e){e&&(this.names[e]||(this.names[e]=[]),this.names[e].push(t))},_removeName:function(t,e){if(t){var n=this.names[t];if(n){for(var i=0;i<n.length;i++){n[i]._id===e&&n.splice(i,1)}0===n.length&&delete this.names[t]}}},getAngle:function(t){return this.angleDeg?t*n:t},_detectIE:function(t){var e=t.indexOf("msie ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var i=t.indexOf("edge/");return i>0&&parseInt(t.substring(i+5,t.indexOf(".",i)),10)},_parseUA:function(t){var e=t.toLowerCase(),n=/(chrome)[ /]([\w.]+)/.exec(e)||/(webkit)[ /]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],r=!!t.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i),a=!!t.match(/IEMobile/i);return{browser:n[1]||"",version:n[2]||"0",isIE:i._detectIE(e),mobile:r,ieMobile:a}},UA:void 0},r=void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{};i.UA=i._parseUA(r.navigator&&r.navigator.userAgent||""),r.Konva&&console.error("Konva instance is already exist in current eviroment. Please use only one instance."),r.Konva=i,i.global=r,i.window=r,i.document=r.document,t.exports=i}(),function(){"use strict";Konva.Collection=function(){var t=[].slice.call(arguments),e=t.length,n=0;for(this.length=e;n<e;n++)this[n]=t[n];return this},Konva.Collection.prototype=[],Konva.Collection.prototype.each=function(t){for(var e=0;e<this.length;e++)t(this[e],e)},Konva.Collection.prototype.toArray=function(){var t,e=[],n=this.length;for(t=0;t<n;t++)e.push(this[t]);return e},Konva.Collection.toCollection=function(t){var e,n=new Konva.Collection,i=t.length;for(e=0;e<i;e++)n.push(t[e]);return n},Konva.Collection._mapMethod=function(t){Konva.Collection.prototype[t]=function(){var e,n=this.length,i=[].slice.call(arguments);for(e=0;e<n;e++)this[e][t].apply(this[e],i);return this}},Konva.Collection.mapMethods=function(t){var e=t.prototype;for(var n in e)Konva.Collection._mapMethod(n)},Konva.Transform=function(t){this.m=t&&t.slice()||[1,0,0,1,0,0]},Konva.Transform.prototype={copy:function(){return new Konva.Transform(this.m)},point:function(t){var e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}},translate:function(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this},scale:function(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=this.m[0]*e+this.m[2]*n,r=this.m[1]*e+this.m[3]*n,a=this.m[0]*-n+this.m[2]*e,o=this.m[1]*-n+this.m[3]*e;return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=o,this},getTranslation:function(){return{x:this.m[4],y:this.m[5]}},skew:function(t,e){var n=this.m[0]+this.m[2]*e,i=this.m[1]+this.m[3]*e,r=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=i,this.m[2]=r,this.m[3]=a,this},multiply:function(t){var e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],r=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],o=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this},invert:function(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,i=-this.m[2]*t,r=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this},getMatrix:function(){return this.m},setAbsolutePosition:function(t,e){var n=this.m[0],i=this.m[1],r=this.m[2],a=this.m[3],o=this.m[4],s=(n*(e-this.m[5])-i*(t-o))/(n*a-i*r),c=(t-o-r*s)/n;return this.translate(c,s)}};var t=Math.PI/180,e=180/Math.PI,n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},i=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;Konva.Util={_isElement:function(t){return!(!t||1!=t.nodeType)},_isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isObject:function(t){return!!t&&t.constructor===Object},_isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},_isNumber:function(t){return"[object Number]"===Object.prototype.toString.call(t)},_isString:function(t){return"[object String]"===Object.prototype.toString.call(t)},isValidSelector:function(t){if("string"!=typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},createCanvasElement:function(){var t=Konva.isBrowser?Konva.document.createElement("canvas"):new Konva._nodeCanvas;try{t.style=t.style||{}}catch(t){}return t},_isInDocument:function(t){for(;t=t.parentNode;)if(t==Konva.document)return!0;return!1},_simplifyArray:function(t){var e,n,i=[],r=t.length,a=Konva.Util;for(e=0;e<r;e++)n=t[e],a._isNumber(n)?n=Math.round(1e3*n)/1e3:a._isString(n)||(n=n.toString()),i.push(n);return i},_getImage:function(t,e){var n,i;if(t)if(this._isElement(t))e(t);else if(this._isString(t))(n=new Konva.window.Image).onload=function(){e(n)},n.src=t;else if(t.data){(i=Konva.Util.createCanvasElement()).width=t.width,i.height=t.height,i.getContext("2d").putImageData(t,0,0),this._getImage(i.toDataURL(),e)}else e(null);else e(null)},_getRGBAString:function(t){return["rgba(",t.red||0,",",t.green||0,",",t.blue||0,",",t.alpha||1,")"].join("")},_rgbToHex:function(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb:function(t){t=t.replace("#","");var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor:function(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},get:function(t,e){return void 0===t?e:t},getRGB:function(t){var e;return t in n?{r:(e=n[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=i.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(t){return t=t||"black",Konva.Util._namedColorToRBA(t)||Konva.Util._hex3ColorToRGBA(t)||Konva.Util._hex6ColorToRGBA(t)||Konva.Util._rgbColorToRGBA(t)||Konva.Util._rgbaColorToRGBA(t)},_namedColorToRBA:function(t){var e=n[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA:function(t){if(0===t.indexOf("rgb(")){var e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA:function(t){if(0===t.indexOf("rgba(")){var e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex6ColorToRGBA:function(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA:function(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_merge:function(t,e){var n=this._clone(e);for(var i in t)this._isObject(t[i])?n[i]=this._merge(t[i],n[i]):n[i]=t[i];return n},haveIntersection:function(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject:function(t){var e={};for(var n in t)this._isObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray:function(t){return t.slice(0)},_degToRad:function(e){return e*t},_radToDeg:function(t){return t*e},_capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw:function(t){throw new Error("Konva error: "+t)},error:function(t){console.error("Konva error: "+t)},warn:function(t){Konva.global.console&&console.warn&&Konva.showWarnings&&console.warn("Konva warning: "+t)},extend:function(t,e){function n(){this.constructor=t}n.prototype=e.prototype;var i=t.prototype;for(var r in t.prototype=new n,i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.__super__=e.prototype,t.super=e},addMethods:function(t,e){var n;for(n in e)t.prototype[n]=e[n]},_getControlPoints:function(t,e,n,i,r,a,o){var s=Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2)),c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2)),h=o*s/(s+c),l=o*c/(s+c);return[n-h*(r-t),i-h*(a-e),n+l*(r-t),i+l*(a-e)]},_expandPoints:function(t,e){var n,i,r=t.length,a=[];for(n=2;n<r-2;n+=2)i=Konva.Util._getControlPoints(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),a.push(i[0]),a.push(i[1]),a.push(t[n]),a.push(t[n+1]),a.push(i[2]),a.push(i[3]);return a},_removeLastLetter:function(t){return t.substring(0,t.length-1)},each:function(t,e){for(var n in t)e(n,t[n])},_inRange:function(t,e,n){return e<=t&&t<n},_getProjectionToSegment:function(t,e,n,i,r,a){var o,s,c,h=(t-n)*(t-n)+(e-i)*(e-i);if(0==h)o=t,s=e,c=(r-n)*(r-n)+(a-i)*(a-i);else{var l=((r-t)*(n-t)+(a-e)*(i-e))/h;l<0?(o=t,s=e,c=(t-r)*(t-r)+(e-a)*(e-a)):l>1?(o=n,s=i,c=(n-r)*(n-r)+(i-a)*(i-a)):c=((o=t+l*(n-t))-r)*(o-r)+((s=e+l*(i-e))-a)*(s-a)}return[o,s,c]},_getProjectionToLine:function(t,e,n){var i=Konva.Util.cloneObject(t),r=Number.MAX_VALUE;return e.forEach(function(a,o){if(n||o!==e.length-1){var s=e[(o+1)%e.length],c=Konva.Util._getProjectionToSegment(a.x,a.y,s.x,s.y,t.x,t.y),h=c[0],l=c[1],u=c[2];u<r&&(i.x=h,i.y=l,r=u)}}),i},_prepareArrayForTween:function(t,e,n){var i,r=[],a=[];if(t.length>e.length){var o=e;e=t,t=o}for(i=0;i<t.length;i+=2)r.push({x:t[i],y:t[i+1]});for(i=0;i<e.length;i+=2)a.push({x:e[i],y:e[i+1]});var s=[];return a.forEach(function(t){var e=Konva.Util._getProjectionToLine(t,r,n);s.push(e.x),s.push(e.y)}),s},_prepareToStringify:function(t){var e;for(var n in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(n)&&t[n]&&"object"==typeof t[n])if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||Konva.Util._isElement(t[n])){if(!e.configurable)return null;delete t[n]}else if(null===Konva.Util._prepareToStringify(t[n])){if(!e.configurable)return null;delete t[n]}return delete t.visitedByCircularReferenceRemoval,t}}}(),function(){"use strict";var t;Konva.Canvas=function(t){this.init(t)},Konva.Canvas.prototype={init:function(e){var n=(e||{}).pixelRatio||Konva.pixelRatio||function(){if(t)return t;var e=Konva.Util.createCanvasElement().getContext("2d");return t=(Konva.window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}();this.pixelRatio=n,this._canvas=Konva.Util.createCanvasElement(),this._canvas.style.padding=0,this._canvas.style.margin=0,this._canvas.style.border=0,this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top=0,this._canvas.style.left=0},getContext:function(){return this.context},getPixelRatio:function(){return this.pixelRatio},setPixelRatio:function(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)},setWidth:function(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)},setHeight:function(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)},getWidth:function(){return this.width},getHeight:function(){return this.height},setSize:function(t,e){this.setWidth(t),this.setHeight(e)},toDataURL:function(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return Konva.Util.warn("Unable to get data URL. "+t.message),""}}}},Konva.SceneCanvas=function(t){var e=t||{},n=e.width||0,i=e.height||0;Konva.Canvas.call(this,e),this.context=new Konva.SceneContext(this),this.setSize(n,i)},Konva.Util.extend(Konva.SceneCanvas,Konva.Canvas),Konva.HitCanvas=function(t){var e=t||{},n=e.width||0,i=e.height||0;Konva.Canvas.call(this,e),this.context=new Konva.HitContext(this),this.setSize(n,i),this.hitCanvas=!0},Konva.Util.extend(Konva.HitCanvas,Konva.Canvas)}(),function(){"use strict";var t=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];Konva.Context=function(t){this.init(t)},Konva.Context.prototype={init:function(t){this.canvas=t,this._context=t._canvas.getContext("2d"),Konva.enableTrace&&(this.traceArr=[],this._enableTrace())},fillShape:function(t){t.getFillEnabled()&&this._fill(t)},strokeShape:function(t){t.getStrokeEnabled()&&this._stroke(t)},fillStrokeShape:function(t){t.getFillEnabled()&&this._fill(t),t.getStrokeEnabled()&&this._stroke(t)},getTrace:function(t){var e,n,i,r,a=this.traceArr,o=a.length,s="";for(e=0;e<o;e++)(i=(n=a[e]).method)?(r=n.args,s+=i,t?s+="()":Konva.Util._isArray(r[0])?s+="(["+r.join(",")+"])":s+="("+r.join(",")+")"):(s+=n.property,t||(s+="="+n.val)),s+=";";return s},clearTrace:function(){this.traceArr=[]},_trace:function(t){var e=this.traceArr;e.push(t),e.length>=Konva.traceArrMax&&e.shift()},reset:function(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)},getCanvas:function(){return this.canvas},clear:function(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)},_applyLineCap:function(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)},_applyOpacity:function(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)},_applyLineJoin:function(t){var e=t.getLineJoin();e&&this.setAttr("lineJoin",e)},setAttr:function(t,e){this._context[t]=e},arc:function(){var t=arguments;this._context.arc(t[0],t[1],t[2],t[3],t[4],t[5])},beginPath:function(){this._context.beginPath()},bezierCurveTo:function(){var t=arguments;this._context.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},clearRect:function(){var t=arguments;this._context.clearRect(t[0],t[1],t[2],t[3])},clip:function(){this._context.clip()},closePath:function(){this._context.closePath()},createImageData:function(){var t=arguments;return 2===t.length?this._context.createImageData(t[0],t[1]):1===t.length?this._context.createImageData(t[0]):void 0},createLinearGradient:function(){var t=arguments;return this._context.createLinearGradient(t[0],t[1],t[2],t[3])},createPattern:function(){var t=arguments;return this._context.createPattern(t[0],t[1])},createRadialGradient:function(){var t=arguments;return this._context.createRadialGradient(t[0],t[1],t[2],t[3],t[4],t[5])},drawImage:function(){var t=arguments,e=this._context;3===t.length?e.drawImage(t[0],t[1],t[2]):5===t.length?e.drawImage(t[0],t[1],t[2],t[3],t[4]):9===t.length&&e.drawImage(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},isPointInPath:function(t,e){return this._context.isPointInPath(t,e)},fill:function(){this._context.fill()},fillRect:function(t,e,n,i){this._context.fillRect(t,e,n,i)},strokeRect:function(t,e,n,i){this._context.strokeRect(t,e,n,i)},fillText:function(){var t=arguments;this._context.fillText(t[0],t[1],t[2])},measureText:function(t){return this._context.measureText(t)},getImageData:function(){var t=arguments;return this._context.getImageData(t[0],t[1],t[2],t[3])},lineTo:function(){var t=arguments;this._context.lineTo(t[0],t[1])},moveTo:function(){var t=arguments;this._context.moveTo(t[0],t[1])},rect:function(){var t=arguments;this._context.rect(t[0],t[1],t[2],t[3])},putImageData:function(){var t=arguments;this._context.putImageData(t[0],t[1],t[2])},quadraticCurveTo:function(){var t=arguments;this._context.quadraticCurveTo(t[0],t[1],t[2],t[3])},restore:function(){this._context.restore()},rotate:function(){var t=arguments;this._context.rotate(t[0])},save:function(){this._context.save()},scale:function(){var t=arguments;this._context.scale(t[0],t[1])},setLineDash:function(){var t=arguments,e=this._context;this._context.setLineDash?e.setLineDash(t[0]):"mozDash"in e?e.mozDash=t[0]:"webkitLineDash"in e&&(e.webkitLineDash=t[0])},getLineDash:function(){return this._context.getLineDash()},setTransform:function(){var t=arguments;this._context.setTransform(t[0],t[1],t[2],t[3],t[4],t[5])},stroke:function(){this._context.stroke()},strokeText:function(){var t=arguments;this._context.strokeText(t[0],t[1],t[2])},transform:function(){var t=arguments;this._context.transform(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(){var t=arguments;this._context.translate(t[0],t[1])},_enableTrace:function(){var e,n,i=this,r=t.length,a=Konva.Util._simplifyArray,o=this.setAttr,s=function(t){var e,r=i[t];i[t]=function(){return n=a(Array.prototype.slice.call(arguments,0)),e=r.apply(i,arguments),i._trace({method:t,args:n}),e}};for(e=0;e<r;e++)s(t[e]);i.setAttr=function(){o.apply(i,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),i._trace({property:t,val:e})}}},["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation"].forEach(function(t){Object.defineProperty(Konva.Context.prototype,t,{get:function(){return this._context[t]},set:function(e){this._context[t]=e}})}),Konva.SceneContext=function(t){Konva.Context.call(this,t)},Konva.SceneContext.prototype={_fillColor:function(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)},_fillPattern:function(t){var e=t.getFillPatternX(),n=t.getFillPatternY(),i=t.getFillPatternScale(),r=Konva.getAngle(t.getFillPatternRotation()),a=t.getFillPatternOffset();(e||n)&&this.translate(e||0,n||0),r&&this.rotate(r),i&&this.scale(i.x,i.y),a&&this.translate(-1*a.x,-1*a.y),this.setAttr("fillStyle",this.createPattern(t.getFillPatternImage(),t.getFillPatternRepeat()||"repeat")),this.fill()},_fillLinearGradient:function(t){var e=t.getFillLinearGradientStartPoint(),n=t.getFillLinearGradientEndPoint(),i=t.getFillLinearGradientColorStops(),r=this.createLinearGradient(e.x,e.y,n.x,n.y);if(i){for(var a=0;a<i.length;a+=2)r.addColorStop(i[a],i[a+1]);this.setAttr("fillStyle",r),t._fillFunc(this)}},_fillRadialGradient:function(t){for(var e=t.getFillRadialGradientStartPoint(),n=t.getFillRadialGradientEndPoint(),i=t.getFillRadialGradientStartRadius(),r=t.getFillRadialGradientEndRadius(),a=t.getFillRadialGradientColorStops(),o=this.createRadialGradient(e.x,e.y,i,n.x,n.y,r),s=0;s<a.length;s+=2)o.addColorStop(a[s],a[s+1]);this.setAttr("fillStyle",o),this.fill()},_fill:function(t){var e=t.fill(),n=t.getFillPriority();if(e&&"color"===n)this._fillColor(t);else{var i=t.getFillPatternImage();if(i&&"pattern"===n)this._fillPattern(t);else{var r=t.getFillLinearGradientColorStops();if(r&&"linear-gradient"===n)this._fillLinearGradient(t);else{var a=t.getFillRadialGradientColorStops();a&&"radial-gradient"===n?this._fillRadialGradient(t):e?this._fillColor(t):i?this._fillPattern(t):r?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}}}},_strokeLinearGradient:function(t){var e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),r=this.createLinearGradient(e.x,e.y,n.x,n.y);if(i){for(var a=0;a<i.length;a+=2)r.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",r)}},_stroke:function(t){var e=t.dash(),n=t.getStrokeScaleEnabled()||t instanceof Konva.Text;t.hasStroke()&&(n||(this.save(),this.setTransform(1,0,0,1,0,0)),this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore())},_applyShadow:function(t){var e=Konva.Util,n=e.get(t.getShadowRGBA(),"black"),i=e.get(t.getShadowBlur(),5),r=e.get(t.getShadowOffset(),{x:0,y:0}),a=t.getAbsoluteScale(),o=this.canvas.getPixelRatio(),s=a.x*o,c=a.y*o;this.setAttr("shadowColor",n),this.setAttr("shadowBlur",i*Math.min(Math.abs(s),Math.abs(c))),this.setAttr("shadowOffsetX",r.x*s),this.setAttr("shadowOffsetY",r.y*c)},_applyGlobalCompositeOperation:function(t){var e=t.getGlobalCompositeOperation();"source-over"!==e&&this.setAttr("globalCompositeOperation",e)}},Konva.Util.extend(Konva.SceneContext,Konva.Context),Konva.HitContext=function(t){Konva.Context.call(this,t)},Konva.HitContext.prototype={_fill:function(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()},_stroke:function(t){if(t.hasStroke()&&t.strokeHitEnabled()){var e=t.getStrokeScaleEnabled()||t instanceof Konva.Text;e||(this.save(),this.setTransform(1,0,0,1,0,0)),this._applyLineCap(t),this.setAttr("lineWidth",t.strokeWidth()),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}},Konva.Util.extend(Konva.HitContext,Konva.Context)}(),function(){"use strict";Konva.Factory={addGetterSetter:function(t,e,n,i,r){this.addGetter(t,e,n),this.addSetter(t,e,i,r),this.addOverloadedGetterSetter(t,e)},addGetter:function(t,e,n){var i="get"+Konva.Util._capitalize(e);t.prototype[i]=function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter:function(t,e,n,i){var r="set"+Konva.Util._capitalize(e);t.prototype[r]=function(t){return n&&(t=n.call(this,t)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter:function(t,e,n,i,r){var a,o,s=n.length,c=Konva.Util._capitalize,h="get"+c(e),l="set"+c(e);t.prototype[h]=function(){var t={};for(a=0;a<s;a++)t[o=n[a]]=this.getAttr(e+c(o));return t},t.prototype[l]=function(t){var n,a=this.attrs[e];for(n in i&&(t=i.call(this,t)),t)t.hasOwnProperty(n)&&this._setAttr(e+c(n),t[n]);return this._fireChangeEvent(e,a,t),r&&r.call(this),this},this.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter:function(t,e){var n=Konva.Util._capitalize(e),i="set"+n,r="get"+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[r]()}},addDeprecatedGetterSetter:function(t,e,n,i){Konva.Util.error("Adding deprecated "+e);var r="get"+Konva.Util._capitalize(e),a=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[r]=function(){Konva.Util.error(a);var t=this.attrs[e];return void 0===t?n:t},this.addSetter(t,e,i,function(){Konva.Util.error(a)}),this.addOverloadedGetterSetter(t,e)},backCompat:function(t,e){Konva.Util.each(e,function(e,n){var i=t.prototype[n];t.prototype[e]=function(){i.apply(this,arguments),Konva.Util.error(e+" method is deprecated and will be removed soon. Use "+n+" instead")}})},afterSetFilter:function(){this._filterUpToDate=!1}},Konva.Validators={RGBComponent:function(t){return t>255?255:t<0?0:Math.round(t)},alphaComponent:function(t){return t>1?1:t<1e-4?1e-4:t}}}(),function(t){"use strict";var e="Shape",n=["id"],i=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(" "),r=["scaleXChange.konva","scaleYChange.konva"].join(" ");t.Node=function(t){this._init(t)},t.Util.addMethods(t.Node,{_init:function(e){var n=this;this._id=t.idCounter++,this.eventListeners={},this.attrs={},this._cache={},this._filterUpToDate=!1,this._isUnderCache=!1,this.setAttrs(e),this.on(i,function(){this._clearCache("transform"),n._clearSelfAndDescendantCache("absoluteTransform")}),this.on(r,function(){n._clearSelfAndDescendantCache("absoluteScale")}),this.on("visibleChange.konva",function(){n._clearSelfAndDescendantCache("visible")}),this.on("listeningChange.konva",function(){n._clearSelfAndDescendantCache("listening")}),this.on("opacityChange.konva",function(){n._clearSelfAndDescendantCache("absoluteOpacity")})},_clearCache:function(t){t?delete this._cache[t]:this._cache={}},_getCache:function(t,e){return void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},_clearSelfAndDescendantCache:function(t){this._clearCache(t),this.children&&this.getChildren().each(function(e){e._clearSelfAndDescendantCache(t)})},clearCache:function(){return delete this._cache.canvas,this._filterUpToDate=!1,this},cache:function(e){var n=e||{},i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}),r=n.width||i.width,a=n.height||i.height,o=n.pixelRatio,s=n.x||i.x,c=n.y||i.y,h=n.offset||0,l=n.drawBorder||!1;if(r&&a){r+=2*h,a+=2*h,s-=h,c-=h;var u=new t.SceneCanvas({pixelRatio:o,width:r,height:a}),f=new t.SceneCanvas({pixelRatio:o,width:r,height:a}),d=new t.HitCanvas({pixelRatio:1,width:r,height:a}),v=u.getContext(),p=d.getContext();return d.isCache=!0,this.clearCache(),v.save(),p.save(),v.translate(-s,-c),p.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache("absoluteOpacity"),this._clearSelfAndDescendantCache("absoluteScale"),this.drawScene(u,this,!0),this.drawHit(d,this,!0),this._isUnderCache=!1,v.restore(),p.restore(),l&&(v.save(),v.beginPath(),v.rect(0,0,r,a),v.closePath(),v.setAttr("strokeStyle","red"),v.setAttr("lineWidth",5),v.stroke(),v.restore()),this._cache.canvas={scene:u,filter:f,hit:d,x:s,y:c},this}setTimeout(function(){t.Util.throw("Width or height of caching configuration equals 0. Caching is ignored.")})},getClientRect:function(){throw new Error('abstract "getClientRect" method call')},_transformedRect:function(t,e){var n,i,r,a,o=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=this.getAbsoluteTransform(e);return o.forEach(function(t){var e=s.point(t);void 0===n&&(n=r=e.x,i=a=e.y),n=Math.min(n,e.x),i=Math.min(i,e.y),r=Math.max(r,e.x),a=Math.max(a,e.y)}),{x:n,y:i,width:r-n,height:a-i}},_drawCachedSceneCanvas:function(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this),t.translate(this._cache.canvas.x,this._cache.canvas.y);var e=this._getCachedSceneCanvas(),n=e.pixelRatio;t.drawImage(e._canvas,0,0,e.width/n,e.height/n),t.restore()},_drawCachedHitCanvas:function(t){var e=this._cache.canvas.hit;t.save(),t.translate(this._cache.canvas.x,this._cache.canvas.y),t.drawImage(e._canvas,0,0),t.restore()},_getCachedSceneCanvas:function(){var e,n,i,r,a=this.filters(),o=this._cache.canvas,s=o.scene,c=o.filter,h=c.getContext();if(a){if(!this._filterUpToDate){var l=s.pixelRatio;try{for(e=a.length,h.clear(),h.drawImage(s._canvas,0,0,s.getWidth()/l,s.getHeight()/l),n=h.getImageData(0,0,c.getWidth(),c.getHeight()),i=0;i<e;i++)"function"==typeof(r=a[i])?(r.call(this,n),h.putImageData(n,0,0)):t.Util.error("Filter should be type of function, but got "+typeof r+" insted. Please check correct filters")}catch(e){t.Util.error("Unable to apply filter. "+e.message)}this._filterUpToDate=!0}return c}return s},on:function(t,e){if(3===arguments.length)return this._delegate.apply(this,arguments);var n,i,r,a,o=t.split(" "),s=o.length;for(n=0;n<s;n++)r=(i=o[n].split("."))[0],a=i[1]||"",this.eventListeners[r]||(this.eventListeners[r]=[]),this.eventListeners[r].push({name:a,handler:e});return this},off:function(t,e){var n,i,r,a,o,s=(t||"").split(" "),c=s.length;if(!t)for(i in this.eventListeners)this._off(i);for(n=0;n<c;n++)if(a=(r=s[n].split("."))[0],o=r[1],a)this.eventListeners[a]&&this._off(a,o,e);else for(i in this.eventListeners)this._off(i,o,e);return this},dispatchEvent:function(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this},addEventListener:function(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this},removeEventListener:function(t){return this.off(t),this},_delegate:function(e,n,i){var r=this;this.on(e,function(e){for(var a=e.target.findAncestors(n,!0,r),o=0;o<a.length;o++)(e=t.Util.cloneObject(e)).currentTarget=a[o],i.call(a[o],e)})},remove:function(){var t=this.getParent();return t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),delete this.parent),this._clearSelfAndDescendantCache("stage"),this._clearSelfAndDescendantCache("absoluteTransform"),this._clearSelfAndDescendantCache("visible"),this._clearSelfAndDescendantCache("listening"),this._clearSelfAndDescendantCache("absoluteOpacity"),this},destroy:function(){t._removeId(this.getId());for(var e=(this.getName()||"").split(/\s/g),n=0;n<e.length;n++){var i=e[n];t._removeName(i,this._id)}return this.remove(),this},getAttr:function(e){var n="get"+t.Util._capitalize(e);return t.Util._isFunction(this[n])?this[n]():this.attrs[e]},getAncestors:function(){for(var e=this.getParent(),n=new t.Collection;e;)n.push(e),e=e.getParent();return n},getAttrs:function(){return this.attrs||{}},setAttrs:function(e){var n,i;if(!e)return this;for(n in e)"children"!==n&&(i="set"+t.Util._capitalize(n),t.Util._isFunction(this[i])?this[i](e[n]):this._setAttr(n,e[n]));return this},isListening:function(){return this._getCache("listening",this._isListening)},_isListening:function(){var t=this.getListening(),e=this.getParent();return"inherit"===t?!e||e.isListening():t},isVisible:function(){return this._getCache("visible",this._isVisible)},_isVisible:function(){var t=this.getVisible(),e=this.getParent();return"inherit"===t?!e||e.isVisible():t},shouldDrawHit:function(t){var e=this.getLayer();return t&&t.isCache||e&&e.hitGraphEnabled()&&this.isListening()&&this.isVisible()},show:function(){return this.setVisible(!0),this},hide:function(){return this.setVisible(!1),this},getZIndex:function(){return this.index||0},getAbsoluteZIndex:function(){var t,n,i,r,a=this.getDepth(),o=this,s=0;return"Stage"!==o.nodeType&&function c(h){for(t=[],n=h.length,i=0;i<n;i++)r=h[i],s++,r.nodeType!==e&&(t=t.concat(r.getChildren().toArray())),r._id===o._id&&(i=n);t.length>0&&t[0].getDepth()<=a&&c(t)}(o.getStage().getChildren()),s},getDepth:function(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t},setPosition:function(t){return this.setX(t.x),this.setY(t.y),this},getPosition:function(){return{x:this.getX(),y:this.getY()}},getAbsolutePosition:function(e){var n=this.getAbsoluteTransform(e).getMatrix(),i=new t.Transform,r=this.offset();return i.m=n.slice(),i.translate(r.x,r.y),i.getTranslation()},setAbsolutePosition:function(t){var e,n=this._clearTransform();return this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,(e=this.getAbsoluteTransform()).invert(),e.translate(t.x,t.y),t={x:this.attrs.x+e.getTranslation().x,y:this.attrs.y+e.getTranslation().y},this.setPosition({x:t.x,y:t.y}),this._setTransform(n),this},_setTransform:function(t){var e;for(e in t)this.attrs[e]=t[e];this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")},_clearTransform:function(){var t={x:this.getX(),y:this.getY(),rotation:this.getRotation(),scaleX:this.getScaleX(),scaleY:this.getScaleY(),offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),skewX:this.getSkewX(),skewY:this.getSkewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform"),t},move:function(t){var e=t.x,n=t.y,i=this.getX(),r=this.getY();return void 0!==e&&(i+=e),void 0!==n&&(r+=n),this.setPosition({x:i,y:r}),this},_eachAncestorReverse:function(t,e){var n,i,r=[],a=this.getParent();if(e&&e._id===this._id)return t(this),!0;for(r.unshift(this);a&&(!e||a._id!==e._id);)r.unshift(a),a=a.parent;for(n=r.length,i=0;i<n;i++)t(r[i])},rotate:function(t){return this.setRotation(this.getRotation()+t),this},moveToTop:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0},moveUp:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)},moveDown:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)},moveToBottom:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)},setZIndex:function(e){if(!this.parent)return t.Util.warn("Node has no parent. zIndex parameter is ignored."),!1;var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this},getAbsoluteOpacity:function(){return this._getCache("absoluteOpacity",this._getAbsoluteOpacity)},_getAbsoluteOpacity:function(){var t=this.getOpacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=this.getParent().getAbsoluteOpacity()),t},moveTo:function(t){return this.getParent()!==t&&((this.__originalRemove||this.remove).call(this),t.add(this)),this},toObject:function(){var e,n,i,r,a={},o=this.getAttrs();for(e in a.attrs={},o)n=o[e],i=this[e],delete o[e],r=i?i.call(this):null,o[e]=n,r!==n&&(a.attrs[e]=n);return a.className=this.getClassName(),t.Util._prepareToStringify(a)},toJSON:function(){return JSON.stringify(this.toObject())},getParent:function(){return this.parent},findAncestors:function(t,e,n){var i=[];e&&this._isMatch(t)&&i.push(this);for(var r=this.parent;r;){if(r===n)return i;r._isMatch(t)&&i.push(r),r=r.parent}return i},findAncestor:function(t,e,n){return this.findAncestors(t,e,n)[0]},_isMatch:function(e){if(!e)return!1;var n,i,r=e.replace(/ /g,"").split(","),a=r.length;for(n=0;n<a;n++)if(i=r[n],t.Util.isValidSelector(i)||(t.Util.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),t.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),t.Util.warn("Konva is awesome, right?")),"#"===i.charAt(0)){if(this.id()===i.slice(1))return!0}else if("."===i.charAt(0)){if(this.hasName(i.slice(1)))return!0}else if(0!==this._get(i).length)return!0;return!1},getLayer:function(){var t=this.getParent();return t?t.getLayer():null},getStage:function(){return this._getCache("stage",this._getStage)},_getStage:function(){var t=this.getParent();return t?t.getStage():void 0},fire:function(t,e,n){return(e=e||{}).target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this},getAbsoluteTransform:function(t){return t?this._getAbsoluteTransform(t):this._getCache("absoluteTransform",this._getAbsoluteTransform)},_getAbsoluteTransform:function(e){var n,i,r=new t.Transform;return this._eachAncestorReverse(function(t){n=t.transformsEnabled(),i=t.getTransform(),"all"===n?r.multiply(i):"position"===n&&r.translate(t.x(),t.y())},e),r},getAbsoluteScale:function(t){return t?this._getAbsoluteScale(t):this._getCache("absoluteScale",this._getAbsoluteScale)},_getAbsoluteScale:function(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();var n=1,i=1;return this._eachAncestorReverse(function(t){n*=t.scaleX(),i*=t.scaleY()},t),{x:n,y:i}},getTransform:function(){return this._getCache("transform",this._getTransform)},_getTransform:function(){var e=new t.Transform,n=this.getX(),i=this.getY(),r=t.getAngle(this.getRotation()),a=this.getScaleX(),o=this.getScaleY(),s=this.getSkewX(),c=this.getSkewY(),h=this.getOffsetX(),l=this.getOffsetY();return 0===n&&0===i||e.translate(n,i),0!==r&&e.rotate(r),0===s&&0===c||e.skew(s,c),1===a&&1===o||e.scale(a,o),0===h&&0===l||e.translate(-1*h,-1*l),e},clone:function(e){var i,r,a,o,s,c=t.Util.cloneObject(this.attrs);for(var h in n){delete c[n[h]]}for(i in e)c[i]=e[i];var l=new this.constructor(c);for(i in this.eventListeners)for(a=(r=this.eventListeners[i]).length,o=0;o<a;o++)(s=r[o]).name.indexOf("konva")<0&&(l.eventListeners[i]||(l.eventListeners[i]=[]),l.eventListeners[i].push(s));return l},_toKonvaCanvas:function(e){e=e||{};var n=this.getStage(),i=e.x||0,r=e.y||0,a=e.pixelRatio||1,o=new t.SceneCanvas({width:e.width||this.getWidth()||(n?n.getWidth():0),height:e.height||this.getHeight()||(n?n.getHeight():0),pixelRatio:a}),s=o.getContext();return s.save(),(i||r)&&s.translate(-1*i,-1*r),this.drawScene(o),s.restore(),o},toCanvas:function(t){return this._toKonvaCanvas(t)._canvas},toDataURL:function(t){var e=(t=t||{}).mimeType||null,n=t.quality||null;return this._toKonvaCanvas(t).toDataURL(e,n)},toImage:function(e){if(!e||!e.callback)throw"callback required for toImage method config argument";t.Util._getImage(this.toDataURL(e),function(t){e.callback(t)})},setSize:function(t){return this.setWidth(t.width),this.setHeight(t.height),this},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},getWidth:function(){return this.attrs.width||0},getHeight:function(){return this.attrs.height||0},getClassName:function(){return this.className||this.nodeType},getType:function(){return this.nodeType},getDragDistance:function(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():t.dragDistance},_get:function(t){return this.className===t||this.nodeType===t?[this]:[]},_off:function(t,e,n){var i,r,a,o=this.eventListeners[t];for(i=0;i<o.length;i++)if(r=o[i].name,a=o[i].handler,!("konva"===r&&"konva"!==e||e&&r!==e||n&&n!==a)){if(o.splice(i,1),0===o.length){delete this.eventListeners[t];break}i--}},_fireChangeEvent:function(t,e,n){this._fire(t+"Change",{oldVal:e,newVal:n})},setId:function(e){var n=this.getId();return t._removeId(n),t._addId(this,e),this._setAttr("id",e),this},setName:function(e){var n,i,r=(this.getName()||"").split(/\s/g),a=(e||"").split(/\s/g);for(i=0;i<r.length;i++)n=r[i],-1===a.indexOf(n)&&n&&t._removeName(n,this._id);for(i=0;i<a.length;i++)n=a[i],-1===r.indexOf(n)&&n&&t._addName(this,n);return this._setAttr("name",e),this},addName:function(t){if(!this.hasName(t)){var e=this.name(),n=e?e+" "+t:t;this.setName(n)}return this},hasName:function(t){return-1!==(this.name()||"").split(/\s/g).indexOf(t)},removeName:function(t){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.setName(e.join(" "))),this},setAttr:function(e,n){var i=this["set"+t.Util._capitalize(e)];return t.Util._isFunction(i)?i.call(this,n):this._setAttr(e,n),this},_setAttr:function(t,e){var n;(n=this.attrs[t])!==e&&(void 0===e||null===e?delete this.attrs[t]:this.attrs[t]=e,this._fireChangeEvent(t,n,e))},_setComponentAttr:function(t,e,n){var i;void 0!==n&&((i=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,i,n))},_fireAndBubble:function(t,n,i){var r=!0;if(n&&this.nodeType===e&&(n.target=this),"mouseenter"===t&&i&&(this._id===i._id||this.isAncestorOf&&this.isAncestorOf(i))?r=!1:"mouseleave"===t&&i&&(this._id===i._id||this.isAncestorOf&&this.isAncestorOf(i))&&(r=!1),r){this._fire(t,n);var a=("mouseenter"===t||"mouseleave"===t)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!a&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,n,i.parent):this._fireAndBubble.call(this.parent,t,n))}},_fire:function(t,e){var n,i=this.eventListeners[t];if((e=e||{}).currentTarget=this,e.type=t,i)for(n=0;n<i.length;n++)i[n].handler.call(this,e)},draw:function(){return this.drawScene(),this.drawHit(),this}}),t.Node.create=function(e,n){return t.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)},t.Node._createNode=function(e,n){var i,r,a,o=t.Node.prototype.getClassName.call(e),s=e.children;if(n&&(e.attrs.container=n),i=new t[o](e.attrs),s)for(r=s.length,a=0;a<r;a++)i.add(this._createNode(s[a]));return i},t.Factory.addOverloadedGetterSetter(t.Node,"position"),t.Factory.addGetterSetter(t.Node,"x",0),t.Factory.addGetterSetter(t.Node,"y",0),t.Factory.addGetterSetter(t.Node,"globalCompositeOperation","source-over"),t.Factory.addGetterSetter(t.Node,"opacity",1),t.Factory.addGetter(t.Node,"name"),t.Factory.addOverloadedGetterSetter(t.Node,"name"),t.Factory.addGetter(t.Node,"id"),t.Factory.addOverloadedGetterSetter(t.Node,"id"),t.Factory.addGetterSetter(t.Node,"rotation",0),t.Factory.addComponentsGetterSetter(t.Node,"scale",["x","y"]),t.Factory.addGetterSetter(t.Node,"scaleX",1),t.Factory.addGetterSetter(t.Node,"scaleY",1),t.Factory.addComponentsGetterSetter(t.Node,"skew",["x","y"]),t.Factory.addGetterSetter(t.Node,"skewX",0),t.Factory.addGetterSetter(t.Node,"skewY",0),t.Factory.addComponentsGetterSetter(t.Node,"offset",["x","y"]),t.Factory.addGetterSetter(t.Node,"offsetX",0),t.Factory.addGetterSetter(t.Node,"offsetY",0),t.Factory.addSetter(t.Node,"dragDistance"),t.Factory.addOverloadedGetterSetter(t.Node,"dragDistance"),t.Factory.addSetter(t.Node,"width",0),t.Factory.addOverloadedGetterSetter(t.Node,"width"),t.Factory.addSetter(t.Node,"height",0),t.Factory.addOverloadedGetterSetter(t.Node,"height"),t.Factory.addGetterSetter(t.Node,"listening","inherit"),t.Factory.addGetterSetter(t.Node,"preventDefault",!0),t.Factory.addGetterSetter(t.Node,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),t.Factory.addGetterSetter(t.Node,"visible","inherit"),t.Factory.addGetterSetter(t.Node,"transformsEnabled","all"),t.Factory.addOverloadedGetterSetter(t.Node,"size"),t.Factory.backCompat(t.Node,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),t.Collection.mapMethods(t.Node)}(Konva),function(){"use strict";Konva.Filters.Grayscale=function(t){var e,n,i=t.data,r=i.length;for(e=0;e<r;e+=4)n=.34*i[e]+.5*i[e+1]+.16*i[e+2],i[e]=n,i[e+1]=n,i[e+2]=n}}(),function(t){"use strict";t.Filters.Brighten=function(t){var e,n=255*this.brightness(),i=t.data,r=i.length;for(e=0;e<r;e+=4)i[e]+=n,i[e+1]+=n,i[e+2]+=n},t.Factory.addGetterSetter(t.Node,"brightness",0,null,t.Factory.afterSetFilter)}(Konva),function(){"use strict";Konva.Filters.Invert=function(t){var e,n=t.data,i=n.length;for(e=0;e<i;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]}}(),function(t){"use strict";function e(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var n=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],i=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];t.Filters.Blur=function(t){var r=Math.round(this.blurRadius());r>0&&function(t,r){var a,o,s,c,h,l,u,f,d,v,p,g,m,y,_,b,x,S,w,C,K,T,k,A,F=t.data,P=t.width,M=t.height,O=r+r+1,L=P-1,R=M-1,D=r+1,E=D*(D+1)/2,G=new e,N=null,I=G,U=null,$=null,j=n[r],B=i[r];for(s=1;s<O;s++)I=I.next=new e,s===D&&(N=I);for(I.next=G,u=l=0,o=0;o<M;o++){for(b=x=S=w=f=d=v=p=0,g=D*(C=F[l]),m=D*(K=F[l+1]),y=D*(T=F[l+2]),_=D*(k=F[l+3]),f+=E*C,d+=E*K,v+=E*T,p+=E*k,I=G,s=0;s<D;s++)I.r=C,I.g=K,I.b=T,I.a=k,I=I.next;for(s=1;s<D;s++)c=l+((L<s?L:s)<<2),f+=(I.r=C=F[c])*(A=D-s),d+=(I.g=K=F[c+1])*A,v+=(I.b=T=F[c+2])*A,p+=(I.a=k=F[c+3])*A,b+=C,x+=K,S+=T,w+=k,I=I.next;for(U=G,$=N,a=0;a<P;a++)F[l+3]=k=p*j>>B,0!==k?(k=255/k,F[l]=(f*j>>B)*k,F[l+1]=(d*j>>B)*k,F[l+2]=(v*j>>B)*k):F[l]=F[l+1]=F[l+2]=0,f-=g,d-=m,v-=y,p-=_,g-=U.r,m-=U.g,y-=U.b,_-=U.a,c=u+((c=a+r+1)<L?c:L)<<2,f+=b+=U.r=F[c],d+=x+=U.g=F[c+1],v+=S+=U.b=F[c+2],p+=w+=U.a=F[c+3],U=U.next,g+=C=$.r,m+=K=$.g,y+=T=$.b,_+=k=$.a,b-=C,x-=K,S-=T,w-=k,$=$.next,l+=4;u+=P}for(a=0;a<P;a++){for(x=S=w=b=d=v=p=f=0,g=D*(C=F[l=a<<2]),m=D*(K=F[l+1]),y=D*(T=F[l+2]),_=D*(k=F[l+3]),f+=E*C,d+=E*K,v+=E*T,p+=E*k,I=G,s=0;s<D;s++)I.r=C,I.g=K,I.b=T,I.a=k,I=I.next;for(h=P,s=1;s<=r;s++)l=h+a<<2,f+=(I.r=C=F[l])*(A=D-s),d+=(I.g=K=F[l+1])*A,v+=(I.b=T=F[l+2])*A,p+=(I.a=k=F[l+3])*A,b+=C,x+=K,S+=T,w+=k,I=I.next,s<R&&(h+=P);for(l=a,U=G,$=N,o=0;o<M;o++)F[3+(c=l<<2)]=k=p*j>>B,k>0?(k=255/k,F[c]=(f*j>>B)*k,F[c+1]=(d*j>>B)*k,F[c+2]=(v*j>>B)*k):F[c]=F[c+1]=F[c+2]=0,f-=g,d-=m,v-=y,p-=_,g-=U.r,m-=U.g,y-=U.b,_-=U.a,c=a+((c=o+D)<R?c:R)*P<<2,f+=b+=U.r=F[c],d+=x+=U.g=F[c+1],v+=S+=U.b=F[c+2],p+=w+=U.a=F[c+3],U=U.next,g+=C=$.r,m+=K=$.g,y+=T=$.b,_+=k=$.a,b-=C,x-=K,S-=T,w-=k,$=$.next,l+=P}}(t,r)},t.Factory.addGetterSetter(t.Node,"blurRadius",0,null,t.Factory.afterSetFilter)}(Konva),function(){"use strict";function t(t,e,n){var i=4*(n*t.width+e),r=[];return r.push(t.data[i++],t.data[i++],t.data[i++],t.data[i++]),r}function e(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}Konva.Filters.Mask=function(n){var i=function(n,i){var r=t(n,0,0),a=t(n,n.width-1,0),o=t(n,0,n.height-1),s=t(n,n.width-1,n.height-1),c=i||10;if(e(r,a)<c&&e(a,s)<c&&e(s,o)<c&&e(o,r)<c){for(var h=function(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}([a,r,s,o]),l=[],u=0;u<n.width*n.height;u++){var f=e(h,[n.data[4*u],n.data[4*u+1],n.data[4*u+2]]);l[u]=f<c?0:255}return l}}(n,this.threshold());return i&&function(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}(n,i=function(t,e,n){for(var i=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var h=s*e+c,l=0,u=0;u<r;u++)for(var f=0;f<r;f++){var d=s+u-a,v=c+f-a;if(d>=0&&d<n&&v>=0&&v<e){var p=i[u*r+f];l+=t[d*e+v]*p}}o[h]=l}return o}(i=function(t,e,n){for(var i=[1,1,1,1,1,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var h=s*e+c,l=0,u=0;u<r;u++)for(var f=0;f<r;f++){var d=s+u-a,v=c+f-a;if(d>=0&&d<n&&v>=0&&v<e){var p=i[u*r+f];l+=t[d*e+v]*p}}o[h]=l>=1020?255:0}return o}(i=function(t,e,n){for(var i=[1,1,1,1,0,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var h=s*e+c,l=0,u=0;u<r;u++)for(var f=0;f<r;f++){var d=s+u-a,v=c+f-a;if(d>=0&&d<n&&v>=0&&v<e){var p=i[u*r+f];l+=t[d*e+v]*p}}o[h]=2040===l?255:0}return o}(i,n.width,n.height),n.width,n.height),n.width,n.height)),n},Konva.Factory.addGetterSetter(Konva.Node,"threshold",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGB=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue();for(e=0;e<r;e+=4)n=(.34*i[e]+.5*i[e+1]+.16*i[e+2])/255,i[e]=n*a,i[e+1]=n*o,i[e+2]=n*s,i[e+3]=i[e+3]},Konva.Factory.addGetterSetter(Konva.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGBA=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue(),c=this.alpha();for(e=0;e<r;e+=4)n=1-c,i[e]=a*c+i[e]*n,i[e+1]=o*c+i[e+1]*n,i[e+2]=s*c+i[e+2]*n},Konva.Factory.addGetterSetter(Konva.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t})}(),function(){"use strict";Konva.Filters.HSV=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=Math.pow(2,this.value()),h=Math.pow(2,this.saturation()),l=Math.abs(this.hue()+360)%360,u=c*h*Math.cos(l*Math.PI/180),f=c*h*Math.sin(l*Math.PI/180),d=.299*c+.701*u+.167*f,v=.587*c-.587*u+.33*f,p=.114*c-.114*u-.497*f,g=.299*c-.299*u-.328*f,m=.587*c+.413*u+.035*f,y=.114*c-.114*u+.293*f,_=.299*c-.3*u+1.25*f,b=.587*c-.586*u-1.05*f,x=.114*c+.886*u-.2*f;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=d*n+v*i+p*r,o[e+1]=g*n+m*i+y*r,o[e+2]=_*n+b*i+x*r,o[e+3]=a},Konva.Factory.addGetterSetter(Konva.Node,"hue",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"saturation",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"value",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Factory.addGetterSetter(Konva.Node,"hue",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"saturation",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"luminance",0,null,Konva.Factory.afterSetFilter),Konva.Filters.HSL=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=Math.pow(2,this.saturation()),h=Math.abs(this.hue()+360)%360,l=127*this.luminance(),u=1*c*Math.cos(h*Math.PI/180),f=1*c*Math.sin(h*Math.PI/180),d=.299+.701*u+.167*f,v=.587-.587*u+.33*f,p=.114-.114*u-.497*f,g=.299-.299*u-.328*f,m=.587+.413*u+.035*f,y=.114-.114*u+.293*f,_=.299-.3*u+1.25*f,b=.587-.586*u-1.05*f,x=.114+.886*u-.2*f;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=d*n+v*i+p*r+l,o[e+1]=g*n+m*i+y*r+l,o[e+2]=_*n+b*i+x*r+l,o[e+3]=a}}(),function(){"use strict";Konva.Filters.Emboss=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),i=this.embossDirection(),r=this.embossBlend(),a=0,o=0,s=t.data,c=t.width,h=t.height,l=4*c,u=h;switch(i){case"top-left":a=-1,o=-1;break;case"top":a=-1,o=0;break;case"top-right":a=-1,o=1;break;case"right":a=0,o=1;break;case"bottom-right":a=1,o=1;break;case"bottom":a=1,o=0;break;case"bottom-left":a=1,o=-1;break;case"left":a=0,o=-1;break;default:Konva.Util.error("Unknown emboss direction: "+i)}do{var f=(u-1)*l,d=a;u+d<1&&(d=0),u+d>h&&(d=0);var v=(u-1+d)*c*4,p=c;do{var g=f+4*(p-1),m=o;p+m<1&&(m=0),p+m>c&&(m=0);var y=v+4*(p-1+m),_=s[g]-s[y],b=s[g+1]-s[y+1],x=s[g+2]-s[y+2],S=_,w=S>0?S:-S;if((b>0?b:-b)>w&&(S=b),(x>0?x:-x)>w&&(S=x),S*=e,r){var C=s[g]+S,K=s[g+1]+S,T=s[g+2]+S;s[g]=C>255?255:C<0?0:C,s[g+1]=K>255?255:K<0?0:K,s[g+2]=T>255?255:T<0?0:T}else{var k=n-S;k<0?k=0:k>255&&(k=255),s[g]=s[g+1]=s[g+2]=k}}while(--p)}while(--u)},Konva.Factory.addGetterSetter(Konva.Node,"embossStrength",.5,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossWhiteLevel",.5,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossDirection","top-left",null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossBlend",!1,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";function t(t,e,n,i,r){var a=n-e,o=r-i;return 0===a?i+o/2:0===o?i:o*((t-e)/a)+i}Konva.Filters.Enhance=function(e){var n,i,r,a,o=e.data,s=o.length,c=o[0],h=c,l=o[1],u=l,f=o[2],d=f,v=this.enhance();if(0!==v){for(a=0;a<s;a+=4)(n=o[a+0])<c?c=n:n>h&&(h=n),(i=o[a+1])<l?l=i:i>u&&(u=i),(r=o[a+2])<f?f=r:r>d&&(d=r);var p,g,m,y,_,b,x,S,w;for(h===c&&(h=255,c=0),u===l&&(u=255,l=0),d===f&&(d=255,f=0),v>0?(g=h+v*(255-h),m=c-v*(c-0),_=u+v*(255-u),b=l-v*(l-0),S=d+v*(255-d),w=f-v*(f-0)):(g=h+v*(h-(p=.5*(h+c))),m=c+v*(c-p),_=u+v*(u-(y=.5*(u+l))),b=l+v*(l-y),S=d+v*(d-(x=.5*(d+f))),w=f+v*(f-x)),a=0;a<s;a+=4)o[a+0]=t(o[a+0],c,h,m,g),o[a+1]=t(o[a+1],l,u,b,_),o[a+2]=t(o[a+2],f,d,w,S)}},Konva.Factory.addGetterSetter(Konva.Node,"enhance",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Posterize=function(t){var e,n=Math.round(254*this.levels())+1,i=t.data,r=i.length,a=255/n;for(e=0;e<r;e+=1)i[e]=Math.floor(i[e]/a)*a},Konva.Factory.addGetterSetter(Konva.Node,"levels",.5,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Noise=function(t){var e,n=255*this.noise(),i=t.data,r=i.length,a=n/2;for(e=0;e<r;e+=4)i[e+0]+=a-2*a*Math.random(),i[e+1]+=a-2*a*Math.random(),i[e+2]+=a-2*a*Math.random()},Konva.Factory.addGetterSetter(Konva.Node,"noise",.2,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Pixelate=function(t){var e,n,i,r,a,o,s,c,h,l,u,f,d,v,p=Math.ceil(this.pixelSize()),g=t.width,m=t.height,y=Math.ceil(g/p),_=Math.ceil(m/p);if(t=t.data,p<=0)Konva.Util.error("pixelSize value can not be <= 0");else for(f=0;f<y;f+=1)for(d=0;d<_;d+=1){for(r=0,a=0,o=0,s=0,h=(c=f*p)+p,u=(l=d*p)+p,v=0,e=c;e<h;e+=1)if(!(e>=g))for(n=l;n<u;n+=1)n>=m||(r+=t[(i=4*(g*n+e))+0],a+=t[i+1],o+=t[i+2],s+=t[i+3],v+=1);for(r/=v,a/=v,o/=v,s/=v,e=c;e<h;e+=1)if(!(e>=g))for(n=l;n<u;n+=1)n>=m||(t[(i=4*(g*n+e))+0]=r,t[i+1]=a,t[i+2]=o,t[i+3]=s)}},Konva.Factory.addGetterSetter(Konva.Node,"pixelSize",8,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Threshold=function(t){var e,n=255*this.threshold(),i=t.data,r=i.length;for(e=0;e<r;e+=1)i[e]=i[e]<n?0:255},Konva.Factory.addGetterSetter(Konva.Node,"threshold",.5,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";
/**
* Sepia Filter
* Based on: Pixastic Lib - Sepia filter - v0.1.0
* Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
* @function
* @name Sepia
* @memberof Konva.Filters
* @param {Object} imageData
* @author Jacob Seidelin <jseidelin@nihilogic.dk>
* @license MPL v1.1 [http://www.pixastic.com/lib/license.txt]
* @example
* node.cache();
* node.filters([Konva.Filters.Sepia]);
*/Konva.Filters.Sepia=function(t){var e,n,i,r,a,o,s,c,h,l=t.data,u=t.width,f=t.height,d=4*u;do{e=(f-1)*d,n=u;do{s=.393*(r=l[i=e+4*(n-1)])+.769*(a=l[i+1])+.189*(o=l[i+2]),c=.349*r+.686*a+.168*o,h=.272*r+.534*a+.131*o,l[i]=s>255?255:s,l[i+1]=c>255?255:c,l[i+2]=h>255?255:h,l[i+3]=l[i+3]}while(--n)}while(--f)}}(),function(){"use strict";Konva.Filters.Solarize=function(t){var e=t.data,n=t.width,i=4*n,r=t.height;do{var a=(r-1)*i,o=n;do{var s=a+4*(o-1),c=e[s],h=e[s+1],l=e[s+2];c>127&&(c=255-c),h>127&&(h=255-h),l>127&&(l=255-l),e[s]=c,e[s+1]=h,e[s+2]=l}while(--o)}while(--r)}}(),function(){"use strict";Konva.Filters.Kaleidoscope=function(t){var e,n,i,r,a,o,s,c,h,l=t.width,u=t.height,f=Math.round(this.kaleidoscopePower()),d=Math.round(this.kaleidoscopeAngle()),v=Math.floor(l*(d%360)/360);if(!(f<1)){var p=Konva.Util.createCanvasElement();p.width=l,p.height=u;var g=p.getContext("2d").getImageData(0,0,l,u);!function(t,e,n){var i,r,a,o,s=t.data,c=e.data,h=t.width,l=t.height,u=n.polarCenterX||h/2,f=n.polarCenterY||l/2,d=0,v=0,p=0,g=0,m=Math.sqrt(u*u+f*f);r=h-u,a=l-f,m=(o=Math.sqrt(r*r+a*a))>m?o:m;var y,_,b,x,S=l,w=h,C=360/w*Math.PI/180;for(_=0;_<w;_+=1)for(b=Math.sin(_*C),x=Math.cos(_*C),y=0;y<S;y+=1)r=Math.floor(u+m*y/S*x),d=s[0+(i=4*((a=Math.floor(f+m*y/S*b))*h+r))],v=s[i+1],p=s[i+2],g=s[i+3],c[0+(i=4*(_+y*h))]=d,c[i+1]=v,c[i+2]=p,c[i+3]=g}(t,g,{polarCenterX:l/2,polarCenterY:u/2});for(var m=l/Math.pow(2,f);m<=8;)m*=2,f-=1;var y=m=Math.ceil(m),_=0,b=y,x=1;for(v+m>l&&(_=y,b=0,x=-1),n=0;n<u;n+=1)for(e=_;e!==b;e+=x)c=4*(l*n+Math.round(e+v)%l),r=g.data[c+0],a=g.data[c+1],o=g.data[c+2],s=g.data[c+3],h=4*(l*n+e),g.data[h+0]=r,g.data[h+1]=a,g.data[h+2]=o,g.data[h+3]=s;for(n=0;n<u;n+=1)for(y=Math.floor(m),i=0;i<f;i+=1){for(e=0;e<y+1;e+=1)c=4*(l*n+e),r=g.data[c+0],a=g.data[c+1],o=g.data[c+2],s=g.data[c+3],h=4*(l*n+2*y-e-1),g.data[h+0]=r,g.data[h+1]=a,g.data[h+2]=o,g.data[h+3]=s;y*=2}!function(t,e,n){var i,r,a,o,s,c,h=t.data,l=e.data,u=t.width,f=t.height,d=n.polarCenterX||u/2,v=n.polarCenterY||f/2,p=0,g=0,m=0,y=0,_=Math.sqrt(d*d+v*v);r=u-d,a=f-v,_=(c=Math.sqrt(r*r+a*a))>_?c:_;var b,x,S,w=f,C=u,K=n.polarRotation||0;for(r=0;r<u;r+=1)for(a=0;a<f;a+=1)o=r-d,s=a-v,b=Math.sqrt(o*o+s*s)*w/_,x=(x=(180*Math.atan2(s,o)/Math.PI+360+K)%360)*C/360,S=Math.floor(x),p=h[0+(i=4*(Math.floor(b)*u+S))],g=h[i+1],m=h[i+2],y=h[i+3],l[0+(i=4*(a*u+r))]=p,l[i+1]=g,l[i+2]=m,l[i+3]=y}(g,t,{polarRotation:0})}},Konva.Factory.addGetterSetter(Konva.Node,"kaleidoscopePower",2,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"kaleidoscopeAngle",0,null,Konva.Factory.afterSetFilter)}(),function(t){"use strict";t.Filters.Contrast=function(t){var e,n=Math.pow((parseInt(this.contrast())+100)/100,2),i=t.data,r=i.length,a=150,o=150,s=150;for(e=0;e<r;e+=4)a=i[e],o=i[e+1],s=i[e+2],a/=255,a-=.5,a*=n,a+=.5,o/=255,o-=.5,o*=n,o+=.5,o*=255,s/=255,s-=.5,s*=n,s+=.5,s*=255,a=(a*=255)<0?0:a>255?255:a,o=o<0?0:o>255?255:o,s=s<0?0:s>255?255:s,i[e]=a,i[e+1]=o,i[e+2]=s},t.Factory.addGetterSetter(t.Node,"contrast",0,null,t.Factory.afterSetFilter)}(Konva),function(){"use strict";Konva.Container=function(t){this.__init(t)},Konva.Util.addMethods(Konva.Container,{__init:function(t){this.children=new Konva.Collection,Konva.Node.call(this,t)},getChildren:function(t){if(!t)return this.children;var e=new Konva.Collection;return this.children.each(function(n){t(n)&&e.push(n)}),e},hasChildren:function(){return this.getChildren().length>0},removeChildren:function(){for(var t,e=Konva.Collection.toCollection(this.children),n=0;n<e.length;n++)delete(t=e[n]).parent,t.index=0,t.remove();return e=null,this.children=new Konva.Collection,this},destroyChildren:function(){for(var t,e=Konva.Collection.toCollection(this.children),n=0;n<e.length;n++)delete(t=e[n]).parent,t.index=0,t.destroy();return e=null,this.children=new Konva.Collection,this},add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}if(t.getParent())return t.moveTo(this),this;var n=this.children;return this._validateAdd(t),t.index=n.length,t.parent=this,n.push(t),this._fire("add",{child:t}),Konva.DD&&t.isDragging()&&Konva.DD.anim.setLayers(t.getLayer()),this},destroy:function(){return this.hasChildren()&&this.destroyChildren(),Konva.Node.prototype.destroy.call(this),this},find:function(t){var e,n,i,r,a,o,s,c=[],h=t.replace(/ /g,"").split(","),l=h.length;for(e=0;e<l;e++)if(i=h[e],Konva.Util.isValidSelector(i)||(Konva.Util.warn('Selector "'+i+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Konva.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Konva.Util.warn("Konva is awesome, right?")),"#"===i.charAt(0))(a=this._getNodeById(i.slice(1)))&&c.push(a);else if("."===i.charAt(0))r=this._getNodesByName(i.slice(1)),c=c.concat(r);else for(s=(o=this.getChildren()).length,n=0;n<s;n++)c=c.concat(o[n]._get(i));return Konva.Collection.toCollection(c)},findOne:function(t){return this.find(t)[0]},_getNodeById:function(t){var e=Konva.ids[t];return void 0!==e&&this.isAncestorOf(e)?e:null},_getNodesByName:function(t){var e=Konva.names[t]||[];return this._getDescendants(e)},_get:function(t){for(var e=Konva.Node.prototype._get.call(this,t),n=this.getChildren(),i=n.length,r=0;r<i;r++)e=e.concat(n[r]._get(t));return e},toObject:function(){var t=Konva.Node.prototype.toObject.call(this);t.children=[];for(var e=this.getChildren(),n=e.length,i=0;i<n;i++){var r=e[i];t.children.push(r.toObject())}return t},_getDescendants:function(t){for(var e=[],n=t.length,i=0;i<n;i++){var r=t[i];this.isAncestorOf(r)&&e.push(r)}return e},isAncestorOf:function(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1},clone:function(t){var e=Konva.Node.prototype.clone.call(this,t);return this.getChildren().each(function(t){e.add(t.clone())}),e},getAllIntersections:function(t){var e=[];return this.find("Shape").each(function(n){n.isVisible()&&n.intersects(t)&&e.push(n)}),e},_setChildrenIndices:function(){this.children.each(function(t,e){t.index=e})},drawScene:function(t,e,n){var i=this.getLayer(),r=t||i&&i.getCanvas(),a=r&&r.getContext(),o=this._cache.canvas,s=o&&o.scene;return this.isVisible()&&(!n&&s?(a.save(),i._applyTransform(this,a,e),this._drawCachedSceneCanvas(a),a.restore()):this._drawChildren(r,"drawScene",e,!1,n)),this},drawHit:function(t,e,n){var i=this.getLayer(),r=t||i&&i.hitCanvas,a=r&&r.getContext(),o=this._cache.canvas,s=o&&o.hit;return this.shouldDrawHit(r)&&(i&&i.clearHitCache(),!n&&s?(a.save(),i._applyTransform(this,a,e),this._drawCachedHitCanvas(a),a.restore()):this._drawChildren(r,"drawHit",e)),this},_drawChildren:function(t,e,n,i,r){var a,o,s=this.getLayer(),c=t&&t.getContext(),h=this.getClipWidth(),l=this.getClipHeight(),u=this.getClipFunc(),f=h&&l||u;if(f&&s){c.save();var d=this.getAbsoluteTransform(n),v=d.getMatrix();c.transform(v[0],v[1],v[2],v[3],v[4],v[5]),c.beginPath(),u?u.call(this,c,this):(a=this.getClipX(),o=this.getClipY(),c.rect(a,o,h,l)),c.clip(),v=d.copy().invert().getMatrix(),c.transform(v[0],v[1],v[2],v[3],v[4],v[5])}this.children.each(function(a){a[e](t,n,i,r)}),f&&c.restore()},shouldDrawHit:function(t){var e=this.getLayer(),n=Konva.DD&&Konva.isDragging()&&-1!==Konva.DD.anim.getLayers().indexOf(e);return t&&t.isCache||e&&e.hitGraphEnabled()&&this.isVisible()&&!n},getClientRect:function(t){var e,n,i,r,a=(t=t||{}).skipTransform,o=t.relativeTo,s={x:0,y:0,width:0,height:0},c=this;return this.children.each(function(t){if(t.isVisible()){var a=t.getClientRect({relativeTo:c});void 0===e?(e=a.x,n=a.y,i=a.x+a.width,r=a.y+a.height):(e=Math.min(e,a.x),n=Math.min(n,a.y),i=Math.max(i,a.x+a.width),r=Math.max(r,a.y+a.height))}}),0!==this.children.length&&(s={x:e,y:n,width:i-e,height:r-n}),a?s:this._transformedRect(s,o)}}),Konva.Util.extend(Konva.Container,Konva.Node),Konva.Container.prototype.get=Konva.Container.prototype.find,Konva.Factory.addComponentsGetterSetter(Konva.Container,"clip",["x","y","width","height"]),Konva.Factory.addGetterSetter(Konva.Container,"clipX"),Konva.Factory.addGetterSetter(Konva.Container,"clipY"),Konva.Factory.addGetterSetter(Konva.Container,"clipWidth"),Konva.Factory.addGetterSetter(Konva.Container,"clipHeight"),Konva.Factory.addGetterSetter(Konva.Container,"clipFunc"),Konva.Collection.mapMethods(Konva.Container)}(),function(t){"use strict";var e="hasShadow",n="shadowRGBA";function i(t){t.fill()}function r(t){t.stroke()}function a(t){t.fill()}function o(t){t.stroke()}function s(){this._clearCache(e)}function c(){this._clearCache(n)}t.Shape=function(t){this.__init(t)},t.Util.addMethods(t.Shape,{__init:function(e){this.nodeType="Shape",this._fillFunc=i,this._strokeFunc=r,this._fillFuncHit=a,this._strokeFuncHit=o;for(var n,h=t.shapes;!(n=t.Util.getRandomColor())||n in h;);this.colorKey=n,h[n]=this,t.Node.call(this,e),this.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",s),this.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",c)},hasChildren:function(){return!1},getChildren:function(){return[]},getContext:function(){return this.getLayer().getContext()},getCanvas:function(){return this.getLayer().getCanvas()},hasShadow:function(){return this._getCache(e,this._hasShadow)},_hasShadow:function(){return this.getShadowEnabled()&&0!==this.getShadowOpacity()&&!!(this.getShadowColor()||this.getShadowBlur()||this.getShadowOffsetX()||this.getShadowOffsetY())},getShadowRGBA:function(){return this._getCache(n,this._getShadowRGBA)},_getShadowRGBA:function(){if(this.hasShadow()){var e=t.Util.colorToRGBA(this.shadowColor());return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.getShadowOpacity()||1)+")"}},hasFill:function(){return!!(this.getFill()||this.getFillPatternImage()||this.getFillLinearGradientColorStops()||this.getFillRadialGradientColorStops())},hasStroke:function(){return this.strokeEnabled()&&!(!this.stroke()&&!this.getStrokeLinearGradientColorStops())},intersects:function(t){var e=this.getStage().bufferHitCanvas;return e.getContext().clear(),this.drawHit(e),e.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0},destroy:function(){return t.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],this},_useBufferCanvas:function(t){return!t&&this.perfectDrawEnabled()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()||this.perfectDrawEnabled()&&this.hasShadow()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()},getSelfRect:function(){var t=this.getSize();return{x:this._centroid?Math.round(-t.width/2):0,y:this._centroid?Math.round(-t.height/2):0,width:t.width,height:t.height}},getClientRect:function(t){var e=(t=t||{}).skipTransform,n=t.relativeTo,i=this.getSelfRect(),r=this.hasStroke()&&this.strokeWidth()||0,a=i.width+r,o=i.height+r,s=this.hasShadow()?this.shadowOffsetX():0,c=this.hasShadow()?this.shadowOffsetY():0,h=a+Math.abs(s),l=o+Math.abs(c),u=this.hasShadow()&&this.shadowBlur()||0,f=h+2*u,d=l+2*u,v=0;Math.round(r/2)!==r/2&&(v=1);var p={width:f+v,height:d+v,x:-Math.round(r/2+u)+Math.min(s,0)+i.x,y:-Math.round(r/2+u)+Math.min(c,0)+i.y};return e?p:this._transformedRect(p,n)},drawScene:function(t,e,n,i){var r,a,o=this.getLayer(),s=t||o.getCanvas(),c=s.getContext(),h=this._cache.canvas,l=this.sceneFunc(),u=this.hasShadow(),f=this.hasStroke();if(!this.isVisible())return this;if(h)return c.save(),o._applyTransform(this,c,e),this._drawCachedSceneCanvas(c),c.restore(),this;if(!l)return this;if(c.save(),this._useBufferCanvas(n)&&!i){if((a=(r=this.getStage().bufferCanvas).getContext()).clear(),a.save(),a._applyLineJoin(this),!n)if(o)o._applyTransform(this,a,e);else{var d=this.getAbsoluteTransform(e).getMatrix();c.transform(d[0],d[1],d[2],d[3],d[4],d[5])}l.call(this,a),a.restore();var v=r.pixelRatio;u&&!s.hitCanvas?(c.save(),c._applyShadow(this),c._applyOpacity(this),c._applyGlobalCompositeOperation(this),c.drawImage(r._canvas,0,0,r.width/v,r.height/v),c.restore()):(c._applyOpacity(this),c._applyGlobalCompositeOperation(this),c.drawImage(r._canvas,0,0,r.width/v,r.height/v))}else{if(c._applyLineJoin(this),!n)if(o)o._applyTransform(this,c,e);else{var p=this.getAbsoluteTransform(e).getMatrix();c.transform(p[0],p[1],p[2],p[3],p[4],p[5])}u&&f&&!s.hitCanvas?(c.save(),n||(c._applyOpacity(this),c._applyGlobalCompositeOperation(this)),c._applyShadow(this),l.call(this,c),c.restore(),this.hasFill()&&this.getShadowForStrokeEnabled()&&l.call(this,c)):u&&!s.hitCanvas?(c.save(),n||(c._applyOpacity(this),c._applyGlobalCompositeOperation(this)),c._applyShadow(this),l.call(this,c),c.restore()):(n||(c._applyOpacity(this),c._applyGlobalCompositeOperation(this)),l.call(this,c))}return c.restore(),this},drawHit:function(t,e,n){var i=this.getLayer(),r=t||i.hitCanvas,a=r.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._cache.canvas,c=s&&s.hit;if(!this.shouldDrawHit(r))return this;if(i&&i.clearHitCache(),c)return a.save(),i._applyTransform(this,a,e),this._drawCachedHitCanvas(a),a.restore(),this;if(!o)return this;if(a.save(),a._applyLineJoin(this),!n)if(i)i._applyTransform(this,a,e);else{var h=this.getAbsoluteTransform(e).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}return o.call(this,a),a.restore(),this},drawHitFromCache:function(e){var n,i,r,a,o,s=e||0,c=this._cache.canvas,h=this._getCachedSceneCanvas(),l=c.hit,u=l.getContext(),f=l.getWidth(),d=l.getHeight();u.clear(),u.drawImage(h._canvas,0,0,f,d);try{for(r=(i=(n=u.getImageData(0,0,f,d)).data).length,a=t.Util._hexToRgb(this.colorKey),o=0;o<r;o+=4)i[o+3]>s?(i[o]=a.r,i[o+1]=a.g,i[o+2]=a.b,i[o+3]=255):i[o+3]=0;u.putImageData(n,0,0)}catch(e){t.Util.error("Unable to draw hit graph from cached scene canvas. "+e.message)}return this}}),t.Util.extend(t.Shape,t.Node),t.Factory.addGetterSetter(t.Shape,"stroke"),t.Factory.addGetterSetter(t.Shape,"strokeWidth",2),t.Factory.addGetterSetter(t.Shape,"strokeHitEnabled",!0),t.Factory.addGetterSetter(t.Shape,"perfectDrawEnabled",!0),t.Factory.addGetterSetter(t.Shape,"shadowForStrokeEnabled",!0),t.Factory.addGetterSetter(t.Shape,"lineJoin"),t.Factory.addGetterSetter(t.Shape,"lineCap"),t.Factory.addGetterSetter(t.Shape,"sceneFunc"),t.Factory.addGetterSetter(t.Shape,"hitFunc"),t.Factory.addGetterSetter(t.Shape,"dash"),t.Factory.addGetterSetter(t.Shape,"dashOffset",0),t.Factory.addGetterSetter(t.Shape,"shadowColor"),t.Factory.addGetterSetter(t.Shape,"shadowBlur"),t.Factory.addGetterSetter(t.Shape,"shadowOpacity"),t.Factory.addComponentsGetterSetter(t.Shape,"shadowOffset",["x","y"]),t.Factory.addGetterSetter(t.Shape,"shadowOffsetX",0),t.Factory.addGetterSetter(t.Shape,"shadowOffsetY",0),t.Factory.addGetterSetter(t.Shape,"fillPatternImage"),t.Factory.addGetterSetter(t.Shape,"fill"),t.Factory.addGetterSetter(t.Shape,"fillPatternX",0),t.Factory.addGetterSetter(t.Shape,"fillPatternY",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientColorStops"),t.Factory.addGetterSetter(t.Shape,"strokeLinearGradientColorStops"),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartRadius",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndRadius",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientColorStops"),t.Factory.addGetterSetter(t.Shape,"fillPatternRepeat","repeat"),t.Factory.addGetterSetter(t.Shape,"fillEnabled",!0),t.Factory.addGetterSetter(t.Shape,"strokeEnabled",!0),t.Factory.addGetterSetter(t.Shape,"shadowEnabled",!0),t.Factory.addGetterSetter(t.Shape,"dashEnabled",!0),t.Factory.addGetterSetter(t.Shape,"strokeScaleEnabled",!0),t.Factory.addGetterSetter(t.Shape,"fillPriority","color"),t.Factory.addComponentsGetterSetter(t.Shape,"fillPatternOffset",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillPatternOffsetX",0),t.Factory.addGetterSetter(t.Shape,"fillPatternOffsetY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillPatternScale",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillPatternScaleX",1),t.Factory.addGetterSetter(t.Shape,"fillPatternScaleY",1),t.Factory.addComponentsGetterSetter(t.Shape,"fillLinearGradientStartPoint",["x","y"]),t.Factory.addComponentsGetterSetter(t.Shape,"strokeLinearGradientStartPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientStartPointX",0),t.Factory.addGetterSetter(t.Shape,"strokeLinearGradientStartPointX",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientStartPointY",0),t.Factory.addGetterSetter(t.Shape,"strokeLinearGradientStartPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillLinearGradientEndPoint",["x","y"]),t.Factory.addComponentsGetterSetter(t.Shape,"strokeLinearGradientEndPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientEndPointX",0),t.Factory.addGetterSetter(t.Shape,"strokeLinearGradientEndPointX",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientEndPointY",0),t.Factory.addGetterSetter(t.Shape,"strokeLinearGradientEndPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillRadialGradientStartPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartPointX",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillRadialGradientEndPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndPointX",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndPointY",0),t.Factory.addGetterSetter(t.Shape,"fillPatternRotation",0),t.Factory.backCompat(t.Shape,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"}),t.Collection.mapMethods(t.Shape)}(Konva),function(){"use strict";var t="_",e=["mousedown","mousemove","mouseup","mouseout","touchstart","touchmove","touchend","mouseover","wheel","contextmenu"],n=e.length;function i(e,n){e.content.addEventListener(n,function(i){e[t+n](i)},!1)}Konva.Stage=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Stage,{___init:function(t){this.nodeType="Stage",Konva.Container.call(this,t),this._id=Konva.idCounter++,this._buildDOM(),this._bindContentEvents(),this._enableNestedTransforms=!1,Konva.stages.push(this)},_validateAdd:function(t){"Layer"!==t.getType()&&Konva.Util.throw("You may only add layers to the stage.")},setContainer:function(t){if("string"==typeof t){if("."===t.charAt(0)){var e=t.slice(1);t=Konva.document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=Konva.document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}return this._setAttr("container",t),this},shouldDrawHit:function(){return!0},draw:function(){return Konva.Node.prototype.draw.call(this),this},setHeight:function(t){return Konva.Node.prototype.setHeight.call(this,t),this._resizeDOM(),this},setWidth:function(t){return Konva.Node.prototype.setWidth.call(this,t),this._resizeDOM(),this},clear:function(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].clear();return this},clone:function(t){return t||(t={}),t.container=Konva.document.createElement("div"),Konva.Container.prototype.clone.call(this,t)},destroy:function(){var t=this.content;Konva.Container.prototype.destroy.call(this),t&&Konva.Util._isInDocument(t)&&this.getContainer().removeChild(t);var e=Konva.stages.indexOf(this);return e>-1&&Konva.stages.splice(e,1),this},getPointerPosition:function(){return this.pointerPos},getStage:function(){return this},getContent:function(){return this.content},toDataURL:function(t){var e=(t=t||{}).mimeType||null,n=t.quality||null,i=t.x||0,r=t.y||0,a=new Konva.SceneCanvas({width:t.width||this.getWidth(),height:t.height||this.getHeight(),pixelRatio:t.pixelRatio}),o=a.getContext()._context,s=this.children;(i||r)&&o.translate(-1*i,-1*r),s.each(function(t){var e=t.getCanvas().getWidth(),n=t.getCanvas().getHeight(),i=t.getCanvas().getPixelRatio();o.drawImage(t.getCanvas()._canvas,0,0,e/i,n/i)});var c=a.toDataURL(e,n);return t.callback&&t.callback(c),c},toImage:function(t){var e=t.callback;t.callback=function(t){Konva.Util._getImage(t,function(t){e(t)})},this.toDataURL(t)},getIntersection:function(t,e){var n,i,r=this.getChildren();for(n=r.length-1;n>=0;n--)if(i=r[n].getIntersection(t,e))return i;return null},_resizeDOM:function(){if(this.content){var t,e,n=this.getWidth(),i=this.getHeight(),r=this.getChildren(),a=r.length;for(this.content.style.width=n+"px",this.content.style.height=i+"px",this.bufferCanvas.setSize(n,i),this.bufferHitCanvas.setSize(n,i),t=0;t<a;t++)(e=r[t]).setSize(n,i),e.draw()}},add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return Konva.Container.prototype.add.call(this,t),t._setCanvasSize(this.width(),this.height()),t.draw(),Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this},getParent:function(){return null},getLayer:function(){return null},getLayers:function(){return this.getChildren()},_bindContentEvents:function(){if(Konva.isBrowser)for(var t=0;t<n;t++)i(this,e[t])},_mouseover:function(t){Konva.UA.mobile||(this._setPointerPosition(t),this._fire("contentMouseover",{evt:t}))},_mouseout:function(t){if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.targetShape;e&&!Konva.isDragging()&&(e._fireAndBubble("mouseout",{evt:t}),e._fireAndBubble("mouseleave",{evt:t}),this.targetShape=null),this.pointerPos=void 0,this._fire("contentMouseout",{evt:t})}},_mousemove:function(t){return Konva.UA.ieMobile?this._touchmove(t):void 0===t.movementX&&void 0===t.movementY||0!==t.movementY||0!==t.movementX?Konva.UA.mobile?null:(this._setPointerPosition(t),Konva.isDragging()||((e=this.getIntersection(this.getPointerPosition()))&&e.isListening()?Konva.isDragging()||this.targetShape&&this.targetShape._id===e._id?e._fireAndBubble("mousemove",{evt:t}):(this.targetShape&&(this.targetShape._fireAndBubble("mouseout",{evt:t},e),this.targetShape._fireAndBubble("mouseleave",{evt:t},e)),e._fireAndBubble("mouseover",{evt:t},this.targetShape),e._fireAndBubble("mouseenter",{evt:t},this.targetShape),this.targetShape=e):(this.targetShape&&!Konva.isDragging()&&(this.targetShape._fireAndBubble("mouseout",{evt:t}),this.targetShape._fireAndBubble("mouseleave",{evt:t}),this.targetShape=null),this._fire("mousemove",{evt:t,target:this,currentTarget:this})),this._fire("contentMousemove",{evt:t})),void(t.cancelable&&t.preventDefault())):null;var e},_mousedown:function(t){if(Konva.UA.ieMobile)return this._touchstart(t);if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());Konva.listenClickTap=!0,e&&e.isListening()?(this.clickStartShape=e,e._fireAndBubble("mousedown",{evt:t})):this._fire("mousedown",{evt:t,target:this,currentTarget:this}),this._fire("contentMousedown",{evt:t})}t.cancelable&&t.preventDefault()},_mouseup:function(t){if(Konva.UA.ieMobile)return this._touchend(t);if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition()),n=this.clickStartShape,i=this.clickEndShape,r=!1,a=Konva.DD;Konva.inDblClickWindow?(r=!0,Konva.inDblClickWindow=!1):a&&a.justDragged?a&&(a.justDragged=!1):Konva.inDblClickWindow=!0,setTimeout(function(){Konva.inDblClickWindow=!1},Konva.dblClickWindow),e&&e.isListening()?(this.clickEndShape=e,e._fireAndBubble("mouseup",{evt:t}),Konva.listenClickTap&&n&&n._id===e._id&&(e._fireAndBubble("click",{evt:t}),r&&i&&i._id===e._id&&e._fireAndBubble("dblclick",{evt:t}))):(this._fire("mouseup",{evt:t,target:this,currentTarget:this}),this._fire("click",{evt:t,target:this,currentTarget:this}),r&&this._fire("dblclick",{evt:t,target:this,currentTarget:this})),this._fire("contentMouseup",{evt:t}),Konva.listenClickTap&&(this._fire("contentClick",{evt:t}),r&&this._fire("contentDblclick",{evt:t})),Konva.listenClickTap=!1}t.cancelable&&t.preventDefault()},_contextmenu:function(t){this._fire("contentContextmenu",{evt:t})},_touchstart:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());Konva.listenClickTap=!0,e&&e.isListening()?(this.tapStartShape=e,e._fireAndBubble("touchstart",{evt:t}),e.isListening()&&e.preventDefault()&&t.cancelable&&t.preventDefault()):this._fire("touchstart",{evt:t,target:this,currentTarget:this}),this._fire("contentTouchstart",{evt:t})},_touchend:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition()),n=!1;Konva.inDblClickWindow?(n=!0,Konva.inDblClickWindow=!1):Konva.inDblClickWindow=!0,setTimeout(function(){Konva.inDblClickWindow=!1},Konva.dblClickWindow),e&&e.isListening()?(e._fireAndBubble("touchend",{evt:t}),Konva.listenClickTap&&this.tapStartShape&&e._id===this.tapStartShape._id&&(e._fireAndBubble("tap",{evt:t}),n&&e._fireAndBubble("dbltap",{evt:t})),e.isListening()&&e.preventDefault()&&t.cancelable&&t.preventDefault()):(this._fire("touchend",{evt:t,target:this,currentTarget:this}),this._fire("tap",{evt:t,target:this,currentTarget:this}),n&&this._fire("dbltap",{evt:t,target:this,currentTarget:this})),this._fire("contentTouchend",{evt:t}),Konva.listenClickTap&&(this._fire("contentTap",{evt:t}),n&&this._fire("contentDbltap",{evt:t})),Konva.listenClickTap=!1},_touchmove:function(t){this._setPointerPosition(t);var e,n=Konva.DD;Konva.isDragging()||((e=this.getIntersection(this.getPointerPosition()))&&e.isListening()?(e._fireAndBubble("touchmove",{evt:t}),e.isListening()&&e.preventDefault()&&t.cancelable&&t.preventDefault()):this._fire("touchmove",{evt:t,target:this,currentTarget:this}),this._fire("contentTouchmove",{evt:t})),n&&Konva.isDragging()&&Konva.DD.node.preventDefault()&&t.cancelable&&t.preventDefault()},_wheel:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble("wheel",{evt:t}):this._fire("wheel",{evt:t,target:this,currentTarget:this}),this._fire("contentWheel",{evt:t})},_setPointerPosition:function(t){var e=this._getContentPosition(),n=null,i=null;if(void 0!==(t=t||window.event).touches){if(t.touches.length>0){var r=t.touches[0];n=r.clientX-e.left,i=r.clientY-e.top}}else n=t.clientX-e.left,i=t.clientY-e.top;null!==n&&null!==i&&(this.pointerPos={x:n,y:i})},_getContentPosition:function(){var t=this.content.getBoundingClientRect?this.content.getBoundingClientRect():{top:0,left:0};return{top:t.top,left:t.left}},_buildDOM:function(){if(this.bufferCanvas=new Konva.SceneCanvas,this.bufferHitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.isBrowser){var t=this.getContainer();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=Konva.document.createElement("div"),this.content.style.position="relative",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}},_onContent:function(t,e){var n,i,r=t.split(" "),a=r.length;for(n=0;n<a;n++)i=r[n],this.content.addEventListener(i,e,!1)},cache:function(){Konva.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.")},clearCache:function(){}}),Konva.Util.extend(Konva.Stage,Konva.Container),Konva.Factory.addGetter(Konva.Stage,"container"),Konva.Factory.addOverloadedGetterSetter(Konva.Stage,"container")}(),function(t){"use strict";t.BaseLayer=function(t){this.___init(t)},t.Util.addMethods(t.BaseLayer,{___init:function(e){this.nodeType="Layer",t.Container.call(this,e)},createPNGStream:function(){return this.canvas._canvas.createPNGStream()},getCanvas:function(){return this.canvas},getHitCanvas:function(){return this.hitCanvas},getContext:function(){return this.getCanvas().getContext()},clear:function(t){return this.getContext().clear(t),this},clearHitCache:function(){this._hitImageData=void 0},setZIndex:function(e){t.Node.prototype.setZIndex.call(this,e);var n=this.getStage();return n&&(n.content.removeChild(this.getCanvas()._canvas),e<n.getChildren().length-1?n.content.insertBefore(this.getCanvas()._canvas,n.getChildren()[e+1].getCanvas()._canvas):n.content.appendChild(this.getCanvas()._canvas)),this},moveToTop:function(){t.Node.prototype.moveToTop.call(this);var e=this.getStage();return e&&(e.content.removeChild(this.getCanvas()._canvas),e.content.appendChild(this.getCanvas()._canvas)),this},moveUp:function(){if(!t.Node.prototype.moveUp.call(this))return this;var e=this.getStage();return e?(e.content.removeChild(this.getCanvas()._canvas),this.index<e.getChildren().length-1?e.content.insertBefore(this.getCanvas()._canvas,e.getChildren()[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getCanvas()._canvas),this):this},moveDown:function(){if(t.Node.prototype.moveDown.call(this)){var e=this.getStage();if(e){var n=e.getChildren();e.content.removeChild(this.getCanvas()._canvas),e.content.insertBefore(this.getCanvas()._canvas,n[this.index+1].getCanvas()._canvas)}}return this},moveToBottom:function(){if(t.Node.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var n=e.getChildren();e.content.removeChild(this.getCanvas()._canvas),e.content.insertBefore(this.getCanvas()._canvas,n[1].getCanvas()._canvas)}}return this},getLayer:function(){return this},remove:function(){var e=this.getCanvas()._canvas;return t.Node.prototype.remove.call(this),e&&e.parentNode&&t.Util._isInDocument(e)&&e.parentNode.removeChild(e),this},getStage:function(){return this.parent},setSize:function(t,e){return this.canvas.setSize(t,e),this},getWidth:function(){if(this.parent)return this.parent.getWidth()},setWidth:function(){t.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')},getHeight:function(){if(this.parent)return this.parent.getHeight()},setHeight:function(){t.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')},_applyTransform:function(t,e,n){var i=t.getAbsoluteTransform(n).getMatrix();e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}}),t.Util.extend(t.BaseLayer,t.Container),t.Factory.addGetterSetter(t.BaseLayer,"clearBeforeDraw",!0),t.Collection.mapMethods(t.BaseLayer)}(Konva),function(){"use strict";var t=[{x:0,y:0},{x:-1,y:0},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:-1,y:1}],e=t.length;Konva.Layer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.Layer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,this.hitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.BaseLayer.call(this,t)},_setCanvasSize:function(t,e){this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e)},_validateAdd:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&Konva.Util.throw("You may only add groups and shapes to a layer.")},getIntersection:function(n,i){var r,a,o,s;if(!this.hitGraphEnabled()||!this.isVisible())return null;for(var c=1,h=!1;;){for(a=0;a<e;a++){if(o=t[a],(s=(r=this._getIntersection({x:n.x+o.x*c,y:n.y+o.y*c})).shape)&&i)return s.findAncestor(i,!0);if(s)return s;if(h=!!r.antialiased,!r.antialiased)break}if(!h)return null;c+=1}},_getImageData:function(t,e){var n=this.hitCanvas.width||1,i=this.hitCanvas.height||1,r=Math.round(e)*n+Math.round(t);return this._hitImageData||(this._hitImageData=this.hitCanvas.context.getImageData(0,0,n,i)),[this._hitImageData.data[4*r+0],this._hitImageData.data[4*r+1],this._hitImageData.data[4*r+2],this._hitImageData.data[4*r+3]]},_getIntersection:function(t){var e,n,i=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,a=r[3];return 255===a?(e=Konva.Util._rgbToHex(r[0],r[1],r[2]),(n=Konva.shapes["#"+e])?{shape:n}:{antialiased:!0}):a>0?{antialiased:!0}:{}},drawScene:function(t,e){var n=this.getLayer(),i=t||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.getClearBeforeDraw()&&i.getContext().clear(),Konva.Container.prototype.drawScene.call(this,i,e),this._fire("draw",{node:this}),this},drawHit:function(t,e){var n=this.getLayer(),i=t||n&&n.hitCanvas;return n&&n.getClearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Konva.Container.prototype.drawHit.call(this,i,e),this.imageData=null,this},clear:function(t){return Konva.BaseLayer.prototype.clear.call(this,t),this.getHitCanvas().getContext().clear(t),this.imageData=null,this},setVisible:function(t){return Konva.Node.prototype.setVisible.call(this,t),t?(this.getCanvas()._canvas.style.display="block",this.hitCanvas._canvas.style.display="block"):(this.getCanvas()._canvas.style.display="none",this.hitCanvas._canvas.style.display="none"),this},enableHitGraph:function(){return this.setHitGraphEnabled(!0),this},disableHitGraph:function(){return this.setHitGraphEnabled(!1),this},setSize:function(t,e){return Konva.BaseLayer.prototype.setSize.call(this,t,e),this.hitCanvas.setSize(t,e),this}}),Konva.Util.extend(Konva.Layer,Konva.BaseLayer),Konva.Factory.addGetterSetter(Konva.Layer,"hitGraphEnabled",!0),Konva.Collection.mapMethods(Konva.Layer)}(),function(){"use strict";Konva.FastLayer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.FastLayer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,Konva.BaseLayer.call(this,t)},_validateAdd:function(t){"Shape"!==t.getType()&&Konva.Util.throw("You may only add shapes to a fast layer.")},_setCanvasSize:function(t,e){this.canvas.setSize(t,e)},hitGraphEnabled:function(){return!1},getIntersection:function(){return null},drawScene:function(t){var e=this.getLayer(),n=t||e&&e.getCanvas();return this.getClearBeforeDraw()&&n.getContext().clear(),Konva.Container.prototype.drawScene.call(this,n),this},draw:function(){return this.drawScene(),this},setVisible:function(t){return Konva.Node.prototype.setVisible.call(this,t),this.getCanvas()._canvas.style.display=t?"block":"none",this}}),Konva.Util.extend(Konva.FastLayer,Konva.BaseLayer),Konva.Collection.mapMethods(Konva.FastLayer)}(),function(){"use strict";Konva.Group=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Group,{___init:function(t){this.nodeType="Group",Konva.Container.call(this,t)},_validateAdd:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&Konva.Util.throw("You may only add groups and shapes to groups.")}}),Konva.Util.extend(Konva.Group,Konva.Container),Konva.Collection.mapMethods(Konva.Group)}(),function(t){"use strict";var e=t.global.performance&&t.global.performance.now?function(){return t.global.performance.now()}:function(){return(new Date).getTime()};function n(t){setTimeout(t,1e3/60)}var i=t.global.requestAnimationFrame||t.global.webkitRequestAnimationFrame||t.global.mozRequestAnimationFrame||t.global.oRequestAnimationFrame||t.global.msRequestAnimationFrame||n;function r(){return i.apply(t.global,arguments)}t.Animation=function(n,i){var r=t.Animation;this.func=n,this.setLayers(i),this.id=r.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:e()}},t.Animation.prototype={setLayers:function(t){var e=[];return e=t?t.length>0?t:[t]:[],this.layers=e,this},getLayers:function(){return this.layers},addLayer:function(t){var e,n=this.layers,i=n.length;for(e=0;e<i;e++)if(n[e]._id===t._id)return!1;return this.layers.push(t),!0},isRunning:function(){var e,n=t.Animation.animations,i=n.length;for(e=0;e<i;e++)if(n[e].id===this.id)return!0;return!1},start:function(){var n=t.Animation;return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=e(),n._addAnimation(this),this},stop:function(){return t.Animation._removeAnimation(this),this},_updateFrameObject:function(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}},t.Animation.animations=[],t.Animation.animIdCounter=0,t.Animation.animRunning=!1,t.Animation._addAnimation=function(t){this.animations.push(t),this._handleAnimation()},t.Animation._removeAnimation=function(t){var e,n=t.id,i=this.animations,r=i.length;for(e=0;e<r;e++)if(i[e].id===n){this.animations.splice(e,1);break}},t.Animation._runFrames=function(){var t,n,i,r,a,o,s,c,h={},l=this.animations;for(r=0;r<l.length;r++)if(n=(t=l[r]).layers,i=t.func,t._updateFrameObject(e()),o=n.length,!i||!1!==i.call(t,t.frame))for(a=0;a<o;a++)void 0!==(s=n[a])._id&&(h[s._id]=s);for(c in h)h.hasOwnProperty(c)&&h[c].draw()},t.Animation._animationLoop=function(){var e=t.Animation;e.animations.length?(e._runFrames(),r(e._animationLoop)):e.animRunning=!1},t.Animation._handleAnimation=function(){this.animRunning||(this.animRunning=!0,r(this._animationLoop))},t.BaseLayer.prototype.batchDraw=function(){var e=this,n=t.Animation;return this.batchAnim||(this.batchAnim=new n(function(){e.batchAnim.stop()},this)),this.batchAnim.isRunning()||this.batchAnim.start(),this},t.Stage.prototype.batchDraw=function(){return this.getChildren().each(function(t){t.batchDraw()}),this}}(Konva),function(){"use strict";var t={node:1,duration:1,easing:1,onFinish:1,yoyo:1},e=0,n=["fill","stroke","shadowColor"],i=function(t,e,n,i,r,a,o){this.prop=t,this.propFunc=e,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=r-this.begin,this.pause()};i.prototype={fire:function(t){var e=this[t];e&&e()},setTime:function(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())},getTime:function(){return this._time},setPosition:function(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t},getPosition:function(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)},play:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)},pause:function(){this.state=1,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Konva.Tween=function(n){var r,a,o=this,s=n.node,c=s._id,h=n.easing||Konva.Easings.Linear,l=!!n.yoyo;r=void 0===n.duration?1:0===n.duration?.001:n.duration,this.node=s,this._id=e++;var u=s.getLayer()||(s instanceof Konva.Stage?s.getLayers():null);for(a in u||Konva.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Konva.Animation(function(){o.tween.onEnterFrame()},u),this.tween=new i(a,function(t){o._tweenFunc(t)},h,0,1,1e3*r,l),this._addListeners(),Konva.Tween.attrs[c]||(Konva.Tween.attrs[c]={}),Konva.Tween.attrs[c][this._id]||(Konva.Tween.attrs[c][this._id]={}),Konva.Tween.tweens[c]||(Konva.Tween.tweens[c]={}),n)void 0===t[a]&&this._addAttr(a,n[a]);this.reset(),this.onFinish=n.onFinish,this.onReset=n.onReset},Konva.Tween.attrs={},Konva.Tween.tweens={},Konva.Tween.prototype={_addAttr:function(t,e){var i,r,a,o,s,c,h,l=this.node,u=l._id;if((a=Konva.Tween.tweens[u][t])&&delete Konva.Tween.attrs[u][a][t],i=l.getAttr(t),Konva.Util._isArray(e))for(r=[],s=Math.max(e.length,i.length),"points"===t&&e.length!==i.length&&(e.length>i.length?(h=i,i=Konva.Util._prepareArrayForTween(i,e,l.closed())):(c=e,e=Konva.Util._prepareArrayForTween(e,i,l.closed()))),o=0;o<s;o++)r.push(e[o]-i[o]);else if(-1!==n.indexOf(t)){i=Konva.Util.colorToRGBA(i);var f=Konva.Util.colorToRGBA(e);r={r:f.r-i.r,g:f.g-i.g,b:f.b-i.b,a:f.a-i.a}}else r=e-i;Konva.Tween.attrs[u][this._id][t]={start:i,diff:r,end:e,trueEnd:c,trueStart:h},Konva.Tween.tweens[u][t]=this._id},_tweenFunc:function(t){var e,i,r,a,o,s,c,h,l=this.node,u=Konva.Tween.attrs[l._id][this._id];for(e in u){if(r=(i=u[e]).start,a=i.diff,h=i.end,Konva.Util._isArray(r))for(o=[],c=Math.max(r.length,h.length),s=0;s<c;s++)o.push((r[s]||0)+a[s]*t);else o=-1!==n.indexOf(e)?"rgba("+Math.round(r.r+a.r*t)+","+Math.round(r.g+a.g*t)+","+Math.round(r.b+a.b*t)+","+(r.a+a.a*t)+")":r+a*t;l.setAttr(e,o)}},_addListeners:function(){var t=this;this.tween.onPlay=function(){t.anim.start()},this.tween.onReverse=function(){t.anim.start()},this.tween.onPause=function(){t.anim.stop()},this.tween.onFinish=function(){var e=t.node,n=Konva.Tween.attrs[e._id][t._id];n.points&&n.points.trueEnd&&e.points(n.points.trueEnd),t.onFinish&&t.onFinish.call(t)},this.tween.onReset=function(){var e=t.node,n=Konva.Tween.attrs[e._id][t._id];n.points&&n.points.trueStart&&e.points(n.points.trueStart),t.onReset&&t.onReset()}},play:function(){return this.tween.play(),this},reverse:function(){return this.tween.reverse(),this},reset:function(){return this.tween.reset(),this},seek:function(t){return this.tween.seek(1e3*t),this},pause:function(){return this.tween.pause(),this},finish:function(){return this.tween.finish(),this},destroy:function(){var t,e=this.node._id,n=this._id,i=Konva.Tween.tweens[e];for(t in this.pause(),i)delete Konva.Tween.tweens[e][t];delete Konva.Tween.attrs[e][n]}},Konva.Node.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new Konva.Tween(t).play()},Konva.Easings={BackEaseIn:function(t,e,n,i){var r=1.70158;return n*(t/=i)*t*((r+1)*t-r)+e},BackEaseOut:function(t,e,n,i){var r=1.70158;return n*((t=t/i-1)*t*((r+1)*t+r)+1)+e},BackEaseInOut:function(t,e,n,i){var r=1.70158;return(t/=i/2)<1?n/2*(t*t*((1+(r*=1.525))*t-r))+e:n/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},ElasticEaseIn:function(t,e,n,i,r,a){var o=0;return 0===t?e:1==(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)+e)},ElasticEaseOut:function(t,e,n,i,r,a){var o=0;return 0===t?e:1==(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),r*Math.pow(2,-10*t)*Math.sin((t*i-o)*(2*Math.PI)/a)+n+e)},ElasticEaseInOut:function(t,e,n,i,r,a){var o=0;return 0===t?e:2==(t/=i/2)?e+n:(a||(a=i*(.3*1.5)),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*-.5+e:r*Math.pow(2,-10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*.5+n+e)},BounceEaseOut:function(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn:function(t,e,n,i){return n-Konva.Easings.BounceEaseOut(i-t,0,n,i)+e},BounceEaseInOut:function(t,e,n,i){return t<i/2?.5*Konva.Easings.BounceEaseIn(2*t,0,n,i)+e:.5*Konva.Easings.BounceEaseOut(2*t-i,0,n,i)+.5*n+e},EaseIn:function(t,e,n,i){return n*(t/=i)*t+e},EaseOut:function(t,e,n,i){return-n*(t/=i)*(t-2)+e},EaseInOut:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn:function(t,e,n,i){return n*(t/=i)*t*t*t*t+e},StrongEaseOut:function(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},StrongEaseInOut:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear:function(t,e,n,i){return n*t/i+e}}}(),function(){"use strict";Konva.DD={anim:new Konva.Animation(function(){var t=this.dirty;return this.dirty=!1,t}),isDragging:!1,justDragged:!1,offset:{x:0,y:0},node:null,_drag:function(t){var e=Konva.DD,n=e.node;if(n){if(!e.isDragging){var i=n.getStage().getPointerPosition();i||(n.getStage()._setPointerPosition(t),i=n.getStage().getPointerPosition());var r=n.dragDistance();if(Math.max(Math.abs(i.x-e.startPointerPos.x),Math.abs(i.y-e.startPointerPos.y))<r)return}n.getStage()._setPointerPosition(t),n._setDragPosition(t),e.isDragging||(e.isDragging=!0,n.fire("dragstart",{type:"dragstart",target:n,evt:t},!0)),n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)}},_endDragBefore:function(t){var e,n=Konva.DD,i=n.node;i&&(e=i.getLayer(),n.anim.stop(),n.isDragging&&(n.isDragging=!1,n.justDragged=!0,Konva.listenClickTap=!1,t&&(t.dragEndNode=i)),delete n.node,(i.getLayer()||e||i instanceof Konva.Stage)&&(e||i).draw())},_endDragAfter:function(t){var e=(t=t||{}).dragEndNode;t&&e&&e.fire("dragend",{type:"dragend",target:e,evt:t},!0)}},Konva.Node.prototype.startDrag=function(){var t=Konva.DD,e=this.getStage(),n=this.getLayer(),i=e.getPointerPosition(),r=this.getAbsolutePosition();i&&(t.node&&t.node.stopDrag(),t.node=this,t.startPointerPos=i,t.offset.x=i.x-r.x,t.offset.y=i.y-r.y,t.anim.setLayers(n||this.getLayers()),t.anim.start(),this._setDragPosition())},Konva.Node.prototype._setDragPosition=function(t){var e=Konva.DD,n=this.getStage().getPointerPosition(),i=this.getDragBoundFunc();if(n){var r={x:n.x-e.offset.x,y:n.y-e.offset.y};void 0!==i&&(r=i.call(this,r,t)),this.setAbsolutePosition(r),this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(e.anim.dirty=!0),this._lastPos=r}},Konva.Node.prototype.stopDrag=function(){var t=Konva.DD,e={};t._endDragBefore(e),t._endDragAfter(e)},Konva.Node.prototype.setDraggable=function(t){this._setAttr("draggable",t),this._dragChange()};var t=Konva.Node.prototype.remove;if(Konva.Node.prototype.__originalRemove=t,Konva.Node.prototype.remove=function(){var e=Konva.DD;e.node&&e.node._id===this._id&&this.stopDrag(),t.call(this)},Konva.Node.prototype.isDragging=function(){var t=Konva.DD;return!(!t.node||t.node._id!==this._id||!t.isDragging)},Konva.Node.prototype._listenDrag=function(){var t=this;this._dragCleanup(),"Stage"===this.getClassName()?this.on("contentMousedown.konva contentTouchstart.konva",function(e){Konva.DD.node||t.startDrag(e)}):this.on("mousedown.konva touchstart.konva",function(e){1!==e.evt.button&&2!==e.evt.button&&(Konva.DD.node||t.startDrag(e))})},Konva.Node.prototype._dragChange=function(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage(),e=Konva.DD;t&&e.node&&e.node._id===this._id&&e.node.stopDrag()}},Konva.Node.prototype._dragCleanup=function(){"Stage"===this.getClassName()?(this.off("contentMousedown.konva"),this.off("contentTouchstart.konva")):(this.off("mousedown.konva"),this.off("touchstart.konva"))},Konva.Factory.addGetterSetter(Konva.Node,"dragBoundFunc"),Konva.Factory.addGetter(Konva.Node,"draggable",!1),Konva.Factory.addOverloadedGetterSetter(Konva.Node,"draggable"),Konva.isBrowser){var e=Konva.document.documentElement;e.addEventListener("mouseup",Konva.DD._endDragBefore,!0),e.addEventListener("touchend",Konva.DD._endDragBefore,!0),e.addEventListener("mousemove",Konva.DD._drag),e.addEventListener("touchmove",Konva.DD._drag),e.addEventListener("mouseup",Konva.DD._endDragAfter,!1),e.addEventListener("touchend",Konva.DD._endDragAfter,!1)}}(),function(){"use strict";Konva.Rect=function(t){this.___init(t)},Konva.Rect.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Rect",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.getCornerRadius(),n=this.getWidth(),i=this.getHeight();t.beginPath(),e?(e=Math.min(e,n/2,i/2),t.moveTo(e,0),t.lineTo(n-e,0),t.arc(n-e,e,e,3*Math.PI/2,0,!1),t.lineTo(n,i-e),t.arc(n-e,i-e,e,0,Math.PI/2,!1),t.lineTo(e,i),t.arc(e,i-e,e,Math.PI/2,Math.PI,!1),t.lineTo(0,e),t.arc(e,e,e,Math.PI,3*Math.PI/2,!1)):t.rect(0,0,n,i),t.closePath(),t.fillStrokeShape(this)}},Konva.Util.extend(Konva.Rect,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Rect,"cornerRadius",0),Konva.Collection.mapMethods(Konva.Rect)}(),function(t){"use strict";var e=2*Math.PI-1e-4;t.Circle=function(t){this.___init(t)},t.Circle.prototype={_centroid:!0,___init:function(e){t.Shape.call(this,e),this.className="Circle",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){t.beginPath(),t.arc(0,0,this.getRadius(),0,e,!1),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(e){t.Node.prototype.setWidth.call(this,e),this.radius()!==e/2&&this.setRadius(e/2)},setHeight:function(e){t.Node.prototype.setHeight.call(this,e),this.radius()!==e/2&&this.setRadius(e/2)}},t.Util.extend(t.Circle,t.Shape),t.Factory.addGetterSetter(t.Circle,"radius",0),t.Factory.addOverloadedGetterSetter(t.Circle,"radius"),t.Collection.mapMethods(t.Circle)}(Konva),function(){"use strict";var t=2*Math.PI-1e-4;Konva.Ellipse=function(t){this.___init(t)},Konva.Ellipse.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Ellipse",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){var n=this.getRadiusX(),i=this.getRadiusY();e.beginPath(),e.save(),n!==i&&e.scale(1,i/n),e.arc(0,0,n,0,t,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadiusX()},getHeight:function(){return 2*this.getRadiusY()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.setRadius({x:t/2})},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.setRadius({y:t/2})}},Konva.Util.extend(Konva.Ellipse,Konva.Shape),Konva.Factory.addComponentsGetterSetter(Konva.Ellipse,"radius",["x","y"]),Konva.Factory.addGetterSetter(Konva.Ellipse,"radiusX",0),Konva.Factory.addGetterSetter(Konva.Ellipse,"radiusY",0),Konva.Collection.mapMethods(Konva.Ellipse)}(),function(){"use strict";var t=2*Math.PI-1e-4;Konva.Ring=function(t){this.___init(t)},Konva.Ring.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Ring",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){e.beginPath(),e.arc(0,0,this.getInnerRadius(),0,t,!1),e.moveTo(this.getOuterRadius(),0),e.arc(0,0,this.getOuterRadius(),t,0,!0),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setOuterRadius:function(t){this._setAttr("outerRadius",t),this.setWidth(2*t),this.setHeight(2*t)}},Konva.Util.extend(Konva.Ring,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Ring,"innerRadius",0),Konva.Factory.addGetter(Konva.Ring,"outerRadius",0),Konva.Factory.addOverloadedGetterSetter(Konva.Ring,"outerRadius"),Konva.Collection.mapMethods(Konva.Ring)}(),function(){"use strict";Konva.Wedge=function(t){this.___init(t)},Konva.Wedge.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Wedge",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){t.beginPath(),t.arc(0,0,this.getRadius(),0,Konva.getAngle(this.getAngle()),this.getClockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)}},Konva.Util.extend(Konva.Wedge,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Wedge,"radius",0),Konva.Factory.addGetterSetter(Konva.Wedge,"angle",0),Konva.Factory.addGetterSetter(Konva.Wedge,"clockwise",!1),Konva.Factory.backCompat(Konva.Wedge,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),Konva.Collection.mapMethods(Konva.Wedge)}(),function(t){"use strict";t.Arc=function(t){this.___init(t)},t.Arc.prototype={_centroid:!0,___init:function(e){t.Shape.call(this,e),this.className="Arc",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){var n=t.getAngle(this.angle()),i=this.clockwise();e.beginPath(),e.arc(0,0,this.getOuterRadius(),0,n,i),e.arc(0,0,this.getInnerRadius(),n,0,!i),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(e){t.Node.prototype.setWidth.call(this,e),this.getOuterRadius()!==e/2&&this.setOuterRadius(e/2)},setHeight:function(e){t.Node.prototype.setHeight.call(this,e),this.getOuterRadius()!==e/2&&this.setOuterRadius(e/2)}},t.Util.extend(t.Arc,t.Shape),t.Factory.addGetterSetter(t.Arc,"innerRadius",0),t.Factory.addGetterSetter(t.Arc,"outerRadius",0),t.Factory.addGetterSetter(t.Arc,"angle",0),t.Factory.addGetterSetter(t.Arc,"clockwise",!1),t.Collection.mapMethods(t.Arc)}(Konva),function(){"use strict";Konva.Image=function(t){this.___init(t)},Konva.Image.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Image",this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_useBufferCanvas:function(){return(this.hasShadow()||1!==this.getAbsoluteOpacity())&&this.hasStroke()&&this.getStage()},_sceneFunc:function(t){var e,n,i,r=this.getWidth(),a=this.getHeight(),o=this.getImage();o&&(e=this.getCropWidth(),n=this.getCropHeight(),i=e&&n?[o,this.getCropX(),this.getCropY(),e,n,0,0,r,a]:[o,0,0,r,a]),(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,r,a),t.closePath(),t.fillStrokeShape(this)),o&&t.drawImage.apply(t,i)},_hitFunc:function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){var t=this.getImage();return this.attrs.width||(t?t.width:0)},getHeight:function(){var t=this.getImage();return this.attrs.height||(t?t.height:0)}},Konva.Util.extend(Konva.Image,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Image,"image"),Konva.Factory.addComponentsGetterSetter(Konva.Image,"crop",["x","y","width","height"]),Konva.Factory.addGetterSetter(Konva.Image,"cropX",0),Konva.Factory.addGetterSetter(Konva.Image,"cropY",0),Konva.Factory.addGetterSetter(Konva.Image,"cropWidth",0),Konva.Factory.addGetterSetter(Konva.Image,"cropHeight",0),Konva.Collection.mapMethods(Konva.Image),Konva.Image.fromURL=function(t,e){var n=new Image;n.onload=function(){var t=new Konva.Image({image:n});e(t)},n.src=t}}(),function(){"use strict";var t,e="2d",n=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],i=n.length;function r(){return t||(t=Konva.Util.createCanvasElement().getContext(e))}function a(t){t.fillText(this.partialText,0,0)}function o(t){t.strokeText(this.partialText,0,0)}Konva.Text=function(t){this.___init(t)},Konva.Text.prototype={___init:function(t){(t=t||{}).fillLinearGradientColorStops||t.fillRadialGradientColorStops||(t.fill=t.fill||"black"),Konva.Shape.call(this,t),this._fillFunc=a,this._strokeFunc=o,this.className="Text";for(var e=0;e<i;e++)this.on(n[e]+"Change.konva",this._setTextData);this._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){var e,n=this.getPadding(),i=this.getTextHeight(),r=this.getLineHeight()*i,a=this.textArr,o=a.length,s=this.getAlign(),c=this.getWidth(),h=this.getLetterSpacing(),l=this.textDecoration(),u=this.fill(),f=this.fontSize();for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline","middle"),t.setAttr("textAlign","left"),t.save(),n?(t.translate(n,0),t.translate(0,n+i/2)):t.translate(0,i/2),e=0;e<o;e++){var d=a[e],v=d.text,p=d.width;if(t.save(),"right"===s?t.translate(c-p-2*n,0):"center"===s&&t.translate((c-p-2*n)/2,0),-1!==l.indexOf("underline")&&(t.save(),t.beginPath(),t.moveTo(0,Math.round(r/2)),t.lineTo(Math.round(p),Math.round(r/2)),t.lineWidth=f/15,t.strokeStyle=u,t.stroke(),t.restore()),-1!==l.indexOf("line-through")&&(t.save(),t.beginPath(),t.moveTo(0,0),t.lineTo(Math.round(p),0),t.lineWidth=f/15,t.strokeStyle=u,t.stroke(),t.restore()),0!==h||"justify"===s)for(var g=v.split(" ").length-1,m=0;m<v.length;m++){var y=v[m];" "===y&&e!==o-1&&"justify"===s&&t.translate(Math.floor((c-p)/g),0),this.partialText=y,t.fillStrokeShape(this),t.translate(Math.round(this._getTextSize(y).width)+h,0)}else this.partialText=v,t.fillStrokeShape(this);t.restore(),t.translate(0,r)}t.restore()},_hitFunc:function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)},setText:function(t){var e=Konva.Util._isString(t)?t:(t||"").toString();return this._setAttr("text",e),this},getWidth:function(){return"auto"===this.attrs.width||void 0===this.attrs.width?this.getTextWidth()+2*this.getPadding():this.attrs.width},getHeight:function(){return"auto"===this.attrs.height||void 0===this.attrs.height?this.getTextHeight()*this.textArr.length*this.getLineHeight()+2*this.getPadding():this.attrs.height},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},_getTextSize:function(t){var e,n=r(),i=this.getFontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:parseInt(i,10)}},_getContextFont:function(){return Konva.UA.isIE?this.getFontStyle()+" "+this.getFontSize()+"px "+this.getFontFamily():this.getFontStyle()+" "+this.getFontVariant()+" "+this.getFontSize()+"px "+this.getFontFamily()},_addTextLine:function(t){"justify"===this.align()&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e})},_getTextWidth:function(t){var e=this.getLetterSpacing(),n=t.length;return r().measureText(t).width+(n?e*(n-1):0)},_setTextData:function(){var t=this.getText().split("\n"),e=+this.getFontSize(),n=0,i=this.getLineHeight()*e,a=this.attrs.width,o=this.attrs.height,s="auto"!==a,c="auto"!==o,h=this.getPadding(),l=a-2*h,u=o-2*h,f=0,d=this.getWrap(),v="none"!==d,p="char"!==d&&v,g=this.getEllipsis()&&!v;this.textArr=[],r().save(),r().font=this._getContextFont();for(var m=0,y=t.length;m<y;++m){var _=t[m],b=g?this._getTextWidth("…"):0,x=this._getTextWidth(_);if(s&&x>l)for(;_.length>0;){for(var S=0,w=_.length,C="",K=0;S<w;){var T=S+w>>>1,k=_.slice(0,T+1),A=this._getTextWidth(k)+b;A<=l?(S=T+1,C=k+(g?"…":""),K=A):w=T}if(!C)break;if(p){var F=Math.max(C.lastIndexOf(" "),C.lastIndexOf("-"))+1;F>0&&(S=F,C=C.slice(0,S),K=this._getTextWidth(C))}if(this._addTextLine(C),n=Math.max(n,K),f+=i,!v||c&&f+i>u)break;if((_=_.slice(S)).length>0&&(x=this._getTextWidth(_))<=l){this._addTextLine(_),f+=i,n=Math.max(n,x);break}}else this._addTextLine(_),f+=i,n=Math.max(n,x);if(c&&f+i>u)break}r().restore(),this.textHeight=e,this.textWidth=n}},Konva.Util.extend(Konva.Text,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Text,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.Text,"fontSize",12),Konva.Factory.addGetterSetter(Konva.Text,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.Text,"fontVariant","normal"),Konva.Factory.addGetterSetter(Konva.Text,"padding",0),Konva.Factory.addGetterSetter(Konva.Text,"align","left"),Konva.Factory.addGetterSetter(Konva.Text,"lineHeight",1),Konva.Factory.addGetterSetter(Konva.Text,"wrap","word"),Konva.Factory.addGetterSetter(Konva.Text,"ellipsis",!1),Konva.Factory.addGetterSetter(Konva.Text,"letterSpacing",0),Konva.Factory.addGetter(Konva.Text,"text",""),Konva.Factory.addOverloadedGetterSetter(Konva.Text,"text"),Konva.Factory.addGetterSetter(Konva.Text,"textDecoration",""),Konva.Collection.mapMethods(Konva.Text)}(),function(){"use strict";Konva.Line=function(t){this.___init(t)},Konva.Line.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Line",this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e,n,i,r=this.getPoints(),a=r.length,o=this.getTension(),s=this.getClosed(),c=this.getBezier();if(a){if(t.beginPath(),t.moveTo(r[0],r[1]),0!==o&&a>4){for(n=(e=this.getTensionPoints()).length,i=s?0:4,s||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);i<n-2;)t.bezierCurveTo(e[i++],e[i++],e[i++],e[i++],e[i++],e[i++]);s||t.quadraticCurveTo(e[n-2],e[n-1],r[a-2],r[a-1])}else if(c)for(i=2;i<a;)t.bezierCurveTo(r[i++],r[i++],r[i++],r[i++],r[i++],r[i++]);else for(i=2;i<a;i+=2)t.lineTo(r[i],r[i+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}},getTensionPoints:function(){return this._getCache("tensionPoints",this._getTensionPoints)},_getTensionPoints:function(){return this.getClosed()?this._getTensionPointsClosed():Konva.Util._expandPoints(this.getPoints(),this.getTension())},_getTensionPointsClosed:function(){var t=this.getPoints(),e=t.length,n=this.getTension(),i=Konva.Util,r=i._getControlPoints(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),a=i._getControlPoints(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),o=Konva.Util._expandPoints(t,n);return[r[2],r[3]].concat(o).concat([a[0],a[1],t[e-2],t[e-1],a[2],a[3],r[0],r[1],t[0],t[1]])},getWidth:function(){return this.getSelfRect().width},getHeight:function(){return this.getSelfRect().height},getSelfRect:function(){for(var t,e,n,i=(t=0!==this.getTension()?this._getTensionPoints():this.getPoints())[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);return{x:Math.round(i),y:Math.round(a),width:Math.round(r-i),height:Math.round(o-a)}}},Konva.Util.extend(Konva.Line,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Line,"closed",!1),Konva.Factory.addGetterSetter(Konva.Line,"bezier",!1),Konva.Factory.addGetterSetter(Konva.Line,"tension",0),Konva.Factory.addGetterSetter(Konva.Line,"points",[]),Konva.Collection.mapMethods(Konva.Line)}(),function(){"use strict";Konva.Sprite=function(t){this.___init(t)},Konva.Sprite.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Sprite",this._updated=!0;var e=this;this.anim=new Konva.Animation(function(){var t=e._updated;return e._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){var e=this.getAnimation(),n=this.frameIndex(),i=4*n,r=this.getAnimations()[e],a=this.frameOffsets(),o=r[i+0],s=r[i+1],c=r[i+2],h=r[i+3],l=this.getImage();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,h),t.closePath(),t.fillStrokeShape(this)),l)if(a){var u=a[e],f=2*n;t.drawImage(l,o,s,c,h,u[f+0],u[f+1],c,h)}else t.drawImage(l,o,s,c,h,0,0,c,h)},_hitFunc:function(t){var e=this.getAnimation(),n=this.frameIndex(),i=4*n,r=this.getAnimations()[e],a=this.frameOffsets(),o=r[i+2],s=r[i+3];if(t.beginPath(),a){var c=a[e],h=2*n;t.rect(c[h+0],c[h+1],o,s)}else t.rect(0,0,o,s);t.closePath(),t.fillShape(this)},_useBufferCanvas:function(){return(this.hasShadow()||1!==this.getAbsoluteOpacity())&&this.hasStroke()},_setInterval:function(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.getFrameRate())},start:function(){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()},stop:function(){this.anim.stop(),clearInterval(this.interval)},isRunning:function(){return this.anim.isRunning()},_updateIndex:function(){var t=this.frameIndex(),e=this.getAnimation();t<this.getAnimations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}},Konva.Util.extend(Konva.Sprite,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Sprite,"animation"),Konva.Factory.addGetterSetter(Konva.Sprite,"animations"),Konva.Factory.addGetterSetter(Konva.Sprite,"frameOffsets"),Konva.Factory.addGetterSetter(Konva.Sprite,"image"),Konva.Factory.addGetterSetter(Konva.Sprite,"frameIndex",0),Konva.Factory.addGetterSetter(Konva.Sprite,"frameRate",17),Konva.Factory.backCompat(Konva.Sprite,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),Konva.Collection.mapMethods(Konva.Sprite)}(),function(){"use strict";Konva.Path=function(t){this.___init(t)},Konva.Path.prototype={___init:function(t){this.dataArray=[];var e=this;Konva.Shape.call(this,t),this.className="Path",this.dataArray=Konva.Path.parsePathData(this.getData()),this.on("dataChange.konva",function(){e.dataArray=Konva.Path.parsePathData(this.getData())}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.dataArray;t.beginPath();for(var n=0;n<e.length;n++){var i=e[n].command,r=e[n].points;switch(i){case"L":t.lineTo(r[0],r[1]);break;case"M":t.moveTo(r[0],r[1]);break;case"C":t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case"Q":t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case"A":var a=r[0],o=r[1],s=r[2],c=r[3],h=r[4],l=r[5],u=r[6],f=r[7],d=s>c?s:c,v=s>c?1:s/c,p=s>c?c/s:1;t.translate(a,o),t.rotate(u),t.scale(v,p),t.arc(0,0,d,h,h+l,1-f),t.scale(1/v,1/p),t.rotate(-u),t.translate(-a,-o);break;case"z":t.closePath()}}t.fillStrokeShape(this)},getSelfRect:function(){var t=[];this.dataArray.forEach(function(e){t=t.concat(e.points)});for(var e,n,i=t[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);return{x:Math.round(i),y:Math.round(a),width:Math.round(r-i),height:Math.round(o-a)}}},Konva.Util.extend(Konva.Path,Konva.Shape),Konva.Path.getLineLength=function(t,e,n,i){return Math.sqrt((n-t)*(n-t)+(i-e)*(i-e))},Konva.Path.getPointOnLine=function(t,e,n,i,r,a,o){void 0===a&&(a=e),void 0===o&&(o=n);var s=(r-n)/(i-e+1e-8),c=Math.sqrt(t*t/(1+s*s));i<e&&(c*=-1);var h,l=s*c;if(i===e)h={x:a,y:o+l};else if((o-n)/(a-e+1e-8)===s)h={x:a+c,y:o+l};else{var u,f,d=this.getLineLength(e,n,i,r);if(d<1e-8)return;var v=(a-e)*(i-e)+(o-n)*(r-n);u=e+(v/=d*d)*(i-e),f=n+v*(r-n);var p=this.getLineLength(a,o,u,f),g=Math.sqrt(t*t-p*p);c=Math.sqrt(g*g/(1+s*s)),i<e&&(c*=-1),h={x:u+c,y:f+(l=s*c)}}return h},Konva.Path.getPointOnCubicBezier=function(t,e,n,i,r,a,o,s,c){function h(t){return t*t*t}function l(t){return 3*t*t*(1-t)}function u(t){return 3*t*(1-t)*(1-t)}function f(t){return(1-t)*(1-t)*(1-t)}return{x:s*h(t)+a*l(t)+i*u(t)+e*f(t),y:c*h(t)+o*l(t)+r*u(t)+n*f(t)}},Konva.Path.getPointOnQuadraticBezier=function(t,e,n,i,r,a,o){function s(t){return t*t}function c(t){return 2*t*(1-t)}function h(t){return(1-t)*(1-t)}return{x:a*s(t)+i*c(t)+e*h(t),y:o*s(t)+r*c(t)+n*h(t)}},Konva.Path.getPointOnEllipticalArc=function(t,e,n,i,r,a){var o=Math.cos(a),s=Math.sin(a),c=n*Math.cos(r),h=i*Math.sin(r);return{x:t+(c*o-h*s),y:e+(c*s+h*o)}},Konva.Path.parsePathData=function(t){if(!t)return[];var e=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)e=e.replace(new RegExp(n[i],"g"),"|"+n[i]);var r,a=e.split("|"),o=[],s=[],c=0,h=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(i=1;i<a.length;i++){var u=a[i],f=u.charAt(0);for(u=u.slice(1),s.length=0;r=l.exec(u);)s.push(r[0]);for(var d=[],v=0,p=s.length;v<p;v++){var g=parseFloat(s[v]);isNaN(g)||d.push(g)}for(;d.length>0&&!isNaN(d[0]);){var m,y,_,b,x,S,w,C,K,T,k=null,A=[],F=c,P=h;switch(f){case"l":c+=d.shift(),h+=d.shift(),k="L",A.push(c,h);break;case"L":c=d.shift(),h=d.shift(),A.push(c,h);break;case"m":var M=d.shift(),O=d.shift();if(c+=M,h+=O,k="M",o.length>2&&"z"===o[o.length-1].command)for(var L=o.length-2;L>=0;L--)if("M"===o[L].command){c=o[L].points[0]+M,h=o[L].points[1]+O;break}A.push(c,h),f="l";break;case"M":c=d.shift(),h=d.shift(),k="M",A.push(c,h),f="L";break;case"h":c+=d.shift(),k="L",A.push(c,h);break;case"H":c=d.shift(),k="L",A.push(c,h);break;case"v":h+=d.shift(),k="L",A.push(c,h);break;case"V":h=d.shift(),k="L",A.push(c,h);break;case"C":A.push(d.shift(),d.shift(),d.shift(),d.shift()),c=d.shift(),h=d.shift(),A.push(c,h);break;case"c":A.push(c+d.shift(),h+d.shift(),c+d.shift(),h+d.shift()),c+=d.shift(),h+=d.shift(),k="C",A.push(c,h);break;case"S":y=c,_=h,"C"===(m=o[o.length-1]).command&&(y=c+(c-m.points[2]),_=h+(h-m.points[3])),A.push(y,_,d.shift(),d.shift()),c=d.shift(),h=d.shift(),k="C",A.push(c,h);break;case"s":y=c,_=h,"C"===(m=o[o.length-1]).command&&(y=c+(c-m.points[2]),_=h+(h-m.points[3])),A.push(y,_,c+d.shift(),h+d.shift()),c+=d.shift(),h+=d.shift(),k="C",A.push(c,h);break;case"Q":A.push(d.shift(),d.shift()),c=d.shift(),h=d.shift(),A.push(c,h);break;case"q":A.push(c+d.shift(),h+d.shift()),c+=d.shift(),h+=d.shift(),k="Q",A.push(c,h);break;case"T":y=c,_=h,"Q"===(m=o[o.length-1]).command&&(y=c+(c-m.points[0]),_=h+(h-m.points[1])),c=d.shift(),h=d.shift(),k="Q",A.push(y,_,c,h);break;case"t":y=c,_=h,"Q"===(m=o[o.length-1]).command&&(y=c+(c-m.points[0]),_=h+(h-m.points[1])),c+=d.shift(),h+=d.shift(),k="Q",A.push(y,_,c,h);break;case"A":b=d.shift(),x=d.shift(),S=d.shift(),w=d.shift(),C=d.shift(),K=c,T=h,c=d.shift(),h=d.shift(),k="A",A=this.convertEndpointToCenterParameterization(K,T,c,h,w,C,b,x,S);break;case"a":b=d.shift(),x=d.shift(),S=d.shift(),w=d.shift(),C=d.shift(),K=c,T=h,c+=d.shift(),h+=d.shift(),k="A",A=this.convertEndpointToCenterParameterization(K,T,c,h,w,C,b,x,S)}o.push({command:k||f,points:A,start:{x:F,y:P},pathLength:this.calcLength(F,P,k||f,A)})}"z"!==f&&"Z"!==f||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o},Konva.Path.calcLength=function(t,e,n,i){var r,a,o,s,c=Konva.Path;switch(n){case"L":return c.getLineLength(t,e,i[0],i[1]);case"C":for(r=0,a=c.getPointOnCubicBezier(0,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),s=.01;s<=1;s+=.01)o=c.getPointOnCubicBezier(s,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"Q":for(r=0,a=c.getPointOnQuadraticBezier(0,t,e,i[0],i[1],i[2],i[3]),s=.01;s<=1;s+=.01)o=c.getPointOnQuadraticBezier(s,t,e,i[0],i[1],i[2],i[3]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"A":r=0;var h=i[4],l=i[5],u=i[4]+l,f=Math.PI/180;if(Math.abs(h-u)<f&&(f=Math.abs(h-u)),a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),l<0)for(s=h-f;s>u;s-=f)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(s=h+f;s<u;s+=f)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),r+=c.getLineLength(a.x,a.y,o.x,o.y)}return 0},Konva.Path.convertEndpointToCenterParameterization=function(t,e,n,i,r,a,o,s,c){var h=c*(Math.PI/180),l=Math.cos(h)*(t-n)/2+Math.sin(h)*(e-i)/2,u=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(e-i)/2,f=l*l/(o*o)+u*u/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));var d=Math.sqrt((o*o*(s*s)-o*o*(u*u)-s*s*(l*l))/(o*o*(u*u)+s*s*(l*l)));r===a&&(d*=-1),isNaN(d)&&(d=0);var v=d*o*u/s,p=d*-s*l/o,g=(t+n)/2+Math.cos(h)*v-Math.sin(h)*p,m=(e+i)/2+Math.sin(h)*v+Math.cos(h)*p,y=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},_=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(y(t)*y(e))},b=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(_(t,e))},x=b([1,0],[(l-v)/o,(u-p)/s]),S=[(l-v)/o,(u-p)/s],w=[(-1*l-v)/o,(-1*u-p)/s],C=b(S,w);return _(S,w)<=-1&&(C=Math.PI),_(S,w)>=1&&(C=0),0===a&&C>0&&(C-=2*Math.PI),1===a&&C<0&&(C+=2*Math.PI),[g,m,o,s,x,C,h,a]},Konva.Factory.addGetterSetter(Konva.Path,"data"),Konva.Collection.mapMethods(Konva.Path)}(),function(){"use strict";function t(t){t.fillText(this.partialText,0,0)}function e(t){t.strokeText(this.partialText,0,0)}Konva.TextPath=function(t){this.___init(t)},Konva.TextPath.prototype={___init:function(n){var i=this;this.dummyCanvas=Konva.Util.createCanvasElement(),this.dataArray=[],this.getKerning=n&&n.getKerning,Konva.Shape.call(this,n),this._fillFunc=t,this._strokeFunc=e,this._fillFuncHit=t,this._strokeFuncHit=e,this.className="TextPath",this.dataArray=Konva.Path.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){i.dataArray=Konva.Path.parsePathData(this.attrs.data),i._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva",i._setTextData),i._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.getTextBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),i=this.fontSize(),r=this.glyphInfo;"underline"===e&&t.beginPath();for(var a=0;a<r.length;a++){t.save();var o=r[a].p0;t.translate(o.x,o.y),t.rotate(r[a].rotation),this.partialText=r[a].text,t.fillStrokeShape(this),"underline"===e&&(0===a&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=i/20,t.stroke()),t.restore()},_hitFunc:function(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var i=0;i<e.length;i++){var r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.getFontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},setText:function(t){Konva.Text.prototype.setText.call(this,t)},_getTextSize:function(t){var e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();var n=e.measureText(t);return e.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}},_setTextData:function(){var t=this,e=this._getTextSize(this.attrs.text),n=this.getLetterSpacing(),i=this.align();this.textWidth=e.width,this.textHeight=e.height;var r=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var a=0,o=0;o<t.dataArray.length;o++)t.dataArray[o].pathLength>0&&(a+=t.dataArray[o].pathLength);var s=0;"center"===i&&(s=Math.max(0,a/2-r/2)),"right"===i&&(s=Math.max(0,a-r));for(var c,h,l,u=this.getText().split(""),f=this.getText().split(" ").length-1,d=-1,v=0,p=function(){v=0;for(var e=t.dataArray,n=d+1;n<e.length;n++){if(e[n].pathLength>0)return d=n,e[n];"M"===e[n].command&&(c={x:e[n].points[0],y:e[n].points[1]})}return{}},g=function(e){var o=t._getTextSize(e).width+n;" "===e&&"justify"===i&&(o+=(a-r)/f);var s=0,u=0;for(h=void 0;Math.abs(o-s)/o>.01&&u<25;){u++;for(var d=s;void 0===l;)(l=p())&&d+l.pathLength<o&&(d+=l.pathLength,l=void 0);if(l==={}||void 0===c)return;var g=!1;switch(l.command){case"L":Konva.Path.getLineLength(c.x,c.y,l.points[0],l.points[1])>o?h=Konva.Path.getPointOnLine(o,c.x,c.y,l.points[0],l.points[1],c.x,c.y):l=void 0;break;case"A":var m=l.points[4],y=l.points[5],_=l.points[4]+y;0===v?v=m+1e-8:o>s?v+=Math.PI/180*y/Math.abs(y):v-=Math.PI/360*y/Math.abs(y),(y<0&&v<_||y>=0&&v>_)&&(v=_,g=!0),h=Konva.Path.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],v,l.points[6]);break;case"C":0===v?v=o>l.pathLength?1e-8:o/l.pathLength:o>s?v+=(o-s)/l.pathLength:v-=(s-o)/l.pathLength,v>1&&(v=1,g=!0),h=Konva.Path.getPointOnCubicBezier(v,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case"Q":0===v?v=o/l.pathLength:o>s?v+=(o-s)/l.pathLength:v-=(s-o)/l.pathLength,v>1&&(v=1,g=!0),h=Konva.Path.getPointOnQuadraticBezier(v,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3])}void 0!==h&&(s=Konva.Path.getLineLength(c.x,c.y,h.x,h.y)),g&&(g=!1,l=void 0)}},m=t._getTextSize("C").width+n,y=0;y<s/m&&(g("C"),void 0!==c&&void 0!==h);y++)c=h;for(var _=0;_<u.length&&(g(u[_]),void 0!==c&&void 0!==h);_++){var b=Konva.Path.getLineLength(c.x,c.y,h.x,h.y),x=0;if(this.getKerning)try{x=this.getKerning(u[_-1],u[_])*this.fontSize()}catch(t){x=0}c.x+=x,h.x+=x,this.textWidth+=x;var S=Konva.Path.getPointOnLine(x+b/2,c.x,c.y,h.x,h.y),w=Math.atan2(h.y-c.y,h.x-c.x);this.glyphInfo.push({transposeX:S.x,transposeY:S.y,text:u[_],rotation:w,p0:c,p1:h}),c=h}},getSelfRect:function(){var t=[];this.glyphInfo.forEach(function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)});for(var e,n,i=t[0],r=t[0],a=t[0],o=t[0],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);var c=this.fontSize();return{x:Math.round(i)-c/2,y:Math.round(a)-c/2,width:Math.round(r-i)+c,height:Math.round(o-a)+c}}},Konva.TextPath.prototype._getContextFont=Konva.Text.prototype._getContextFont,Konva.Util.extend(Konva.TextPath,Konva.Shape),Konva.Factory.addGetterSetter(Konva.TextPath,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.TextPath,"fontSize",12),Konva.Factory.addGetterSetter(Konva.TextPath,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.TextPath,"align","left"),Konva.Factory.addGetterSetter(Konva.TextPath,"letterSpacing",0),Konva.Factory.addGetterSetter(Konva.TextPath,"textBaseline","middle"),Konva.Factory.addGetterSetter(Konva.TextPath,"fontVariant","normal"),Konva.Factory.addGetter(Konva.TextPath,"text",""),Konva.Factory.addGetterSetter(Konva.TextPath,"textDecoration",null),Konva.Collection.mapMethods(Konva.TextPath)}(),function(){"use strict";Konva.RegularPolygon=function(t){this.___init(t)},Konva.RegularPolygon.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="RegularPolygon",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e,n,i,r=this.attrs.sides,a=this.attrs.radius;for(t.beginPath(),t.moveTo(0,0-a),e=1;e<r;e++)n=a*Math.sin(2*e*Math.PI/r),i=-1*a*Math.cos(2*e*Math.PI/r),t.lineTo(n,i);t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)}},Konva.Util.extend(Konva.RegularPolygon,Konva.Shape),Konva.Factory.addGetterSetter(Konva.RegularPolygon,"radius",0),Konva.Factory.addGetterSetter(Konva.RegularPolygon,"sides",0),Konva.Collection.mapMethods(Konva.RegularPolygon)}(),function(){"use strict";Konva.Star=function(t){this.___init(t)},Konva.Star.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Star",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var r=1;r<2*i;r++){var a=r%2==0?n:e,o=a*Math.sin(r*Math.PI/i),s=-1*a*Math.cos(r*Math.PI/i);t.lineTo(o,s)}t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)}},Konva.Util.extend(Konva.Star,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Star,"numPoints",5),Konva.Factory.addGetterSetter(Konva.Star,"innerRadius",0),Konva.Factory.addGetterSetter(Konva.Star,"outerRadius",0),Konva.Collection.mapMethods(Konva.Star)}(),function(){"use strict";var t=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width"],e=t.length;Konva.Label=function(t){this.____init(t)},Konva.Label.prototype={____init:function(t){var e=this;Konva.Group.call(this,t),this.className="Label",this.on("add.konva",function(t){e._addListeners(t.child),e._sync()})},getText:function(){return this.find("Text")[0]},getTag:function(){return this.find("Tag")[0]},_addListeners:function(n){var i,r=this,a=function(){r._sync()};for(i=0;i<e;i++)n.on(t[i]+"Change.konva",a)},getWidth:function(){return this.getText().getWidth()},getHeight:function(){return this.getText().getHeight()},_sync:function(){var t,e,n,i,r,a,o,s=this.getText(),c=this.getTag();if(s&&c){switch(t=s.getWidth(),e=s.getHeight(),n=c.getPointerDirection(),i=c.getPointerWidth(),o=c.getPointerHeight(),r=0,a=0,n){case"up":r=t/2,a=-1*o;break;case"right":r=t+i,a=e/2;break;case"down":r=t/2,a=e+o;break;case"left":r=-1*i,a=e/2}c.setAttrs({x:-1*r,y:-1*a,width:t,height:e}),s.setAttrs({x:-1*r,y:-1*a})}}},Konva.Util.extend(Konva.Label,Konva.Group),Konva.Collection.mapMethods(Konva.Label),Konva.Tag=function(t){this.___init(t)},Konva.Tag.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Tag",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.getWidth(),n=this.getHeight(),i=this.getPointerDirection(),r=this.getPointerWidth(),a=this.getPointerHeight(),o=Math.min(this.getCornerRadius(),e/2,n/2);t.beginPath(),o?t.moveTo(o,0):t.moveTo(0,0),"up"===i&&(t.lineTo((e-r)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+r)/2,0)),o?(t.lineTo(e-o,0),t.arc(e-o,o,o,3*Math.PI/2,0,!1)):t.lineTo(e,0),"right"===i&&(t.lineTo(e,(n-a)/2),t.lineTo(e+r,n/2),t.lineTo(e,(n+a)/2)),o?(t.lineTo(e,n-o),t.arc(e-o,n-o,o,0,Math.PI/2,!1)):t.lineTo(e,n),"down"===i&&(t.lineTo((e+r)/2,n),t.lineTo(e/2,n+a),t.lineTo((e-r)/2,n)),o?(t.lineTo(o,n),t.arc(o,n-o,o,Math.PI/2,Math.PI,!1)):t.lineTo(0,n),"left"===i&&(t.lineTo(0,(n+a)/2),t.lineTo(-1*r,n/2),t.lineTo(0,(n-a)/2)),o&&(t.lineTo(0,o),t.arc(o,o,o,Math.PI,3*Math.PI/2,!1)),t.closePath(),t.fillStrokeShape(this)},getSelfRect:function(){var t=0,e=0,n=this.getPointerWidth(),i=this.getPointerHeight(),r=this.pointerDirection(),a=this.getWidth(),o=this.getHeight();return"up"===r?(e-=i,o+=i):"down"===r?o+=i:"left"===r?(t-=1.5*n,a+=n):"right"===r&&(a+=1.5*n),{x:t,y:e,width:a,height:o}}},Konva.Util.extend(Konva.Tag,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Tag,"pointerDirection","none"),Konva.Factory.addGetterSetter(Konva.Tag,"pointerWidth",0),Konva.Factory.addGetterSetter(Konva.Tag,"pointerHeight",0),Konva.Factory.addGetterSetter(Konva.Tag,"cornerRadius",0),Konva.Collection.mapMethods(Konva.Tag)}(),function(t){"use strict";t.Arrow=function(t){this.____init(t)},t.Arrow.prototype={____init:function(e){t.Line.call(this,e),this.className="Arrow"},_sceneFunc:function(e){t.Line.prototype._sceneFunc.apply(this,arguments);var n=2*Math.PI,i=this.points(),r=i.length,a=i[r-2]-i[r-4],o=i[r-1]-i[r-3],s=(Math.atan2(o,a)+n)%n,c=this.pointerLength(),h=this.pointerWidth();e.save(),e.beginPath(),e.translate(i[r-2],i[r-1]),e.rotate(s),e.moveTo(0,0),e.lineTo(-c,h/2),e.lineTo(-c,-h/2),e.closePath(),e.restore(),this.pointerAtBeginning()&&(e.save(),e.translate(i[0],i[1]),a=i[2]-i[0],o=i[3]-i[1],e.rotate((Math.atan2(-o,-a)+n)%n),e.moveTo(0,0),e.lineTo(-c,h/2),e.lineTo(-c,-h/2),e.closePath(),e.restore()),e.fillStrokeShape(this)}},t.Util.extend(t.Arrow,t.Line),t.Factory.addGetterSetter(t.Arrow,"pointerLength",10),t.Factory.addGetterSetter(t.Arrow,"pointerWidth",10),t.Factory.addGetterSetter(t.Arrow,"pointerAtBeginning",!1),t.Collection.mapMethods(t.Arrow)}(Konva),function(t){"use strict";var e=["resizeEnabledChange","rotateHandlerOffsetChange"].join(" "),n=["xChange.resizer","yChange.resizer","widthChange.resizer","heightChange.resizer","scaleXChange.resizer","scaleYChange.resizer","skewXChange.resizer","skewYChange.resizer","rotationChange.resizer","offsetXChange.resizer","offsetYChange.resizer","transformsEnabledChange.resizer"].join(" ");t.Transformer=function(t){this.____init(t)};var i=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],r=!1;t.Transformer.prototype={_centroid:!1,____init:function(n){t.Group.call(this,n),this.className="Transformer",this._createElements(),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(e,this.update),r||(t.Util.warn("Konva.Transformer is currently experimental and may have bugs. Please report any issues to GitHub repo."),r=!0),this.getNode()&&this.update()},attachTo:function(t){this.setNode(t)},setNode:function(t){this._node&&this.detach(),this._node=t,this._clearCache("nodeRect"),t.on(n,function(){this._clearCache("nodeRect")}.bind(this)),t.on(n,this.requestUpdate.bind(this)),t.on("dragmove.resizer",this.requestUpdate.bind(this)),!!this.findOne(".top-left")&&this.update()},getNode:function(){return this._node},detach:function(){this.getNode()&&this.getNode().off(".resizer")},_getNodeRect:function(){return this._getCache("nodeRect",this.__getNodeRect)},__getNodeRect:function(){var e=this.getNode();if(!e)return{x:-Number.MAX_SAFE_INTEGER,y:-Number.MAX_SAFE_INTEGER,width:0,height:0,rotation:0};var n=e.getClientRect({skipTransform:!0}),i=t.getAngle(e.rotation()),r=n.x*e.scaleX()-e.offsetX(),a=n.y*e.scaleY()-e.offsetY();return{x:e.x()+r*Math.cos(i)+a*Math.sin(-i),y:e.y()+a*Math.cos(i)+r*Math.sin(i),width:n.width*e.scaleX(),height:n.height*e.scaleY(),rotation:e.rotation()}},getX:function(){return this._getNodeRect().x},getY:function(){return this._getNodeRect().y},getRotation:function(){return this._getNodeRect().rotation},getWidth:function(){return this._getNodeRect().width},getHeight:function(){return this._getNodeRect().height},_createElements:function(){this._createBack(),i.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")},_createAnchor:function(e){var n=new t.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e,width:10,height:10,offsetX:5,offsetY:5,draggable:!0,dragDistance:0}),i=this;n.on("mousedown touchstart",function(t){i.handleResizerMouseDown(t)}),n.on("mouseenter",function(){var i=this.getLayer(),r=t.getAngle(this.getParent().rotation()),a=function(e,n){return"rotater"===e?"crosshair":(i=((i="top-left"===e||"bottom-right"===e?-45:"top-right"===e||"bottom-left"===e?45:"top-center"===e||"bottom-center"===e?0:"middle-left"===e||"middle-right"===e?90:0)+t.Util._radToDeg(n)+360)%360,t.Util._inRange(i,337.5,360)||t.Util._inRange(i,0,22.5)?"ns-resize":t.Util._inRange(i,22.5,67.5)?"nesw-resize":t.Util._inRange(i,67.5,112.5)?"ew-resize":t.Util._inRange(i,112.5,157.5)?"nwse-resize":t.Util._inRange(i,157.5,202.5)?"ns-resize":t.Util._inRange(i,202.5,247.5)?"nesw-resize":t.Util._inRange(i,247.5,292.5)?"ew-resize":t.Util._inRange(i,292.5,337.5)?"nwse-resize":"pointer");var i}(e,r);n.getStage().getContainer().style.cursor=a,this.fill("lightgrey"),i.batchDraw()}),n.on("mouseout",function(){var t=this.getLayer();t&&(n.getStage().getContainer().style.cursor="",this.fill("white"),t.batchDraw())}),this.add(n)},_createBack:function(){var e=new t.Shape({stroke:"rgb(0, 161, 255)",name:"back",width:0,height:0,listening:!1,sceneFunc:function(t){var e=this.getParent(),n=e.getPadding();t.beginPath(),t.rect(-n,-n,this.width()+2*n,this.height()+2*n),t.moveTo(this.width()/2,-n),e.rotateEnabled()&&t.lineTo(this.width()/2,-e.rotateHandlerOffset()),t.fillStrokeShape(this)}});this.add(e)},handleResizerMouseDown:function(t){this.movingResizer=t.target.name();var e=this._getNodeRect(),n=e.width,i=e.height,r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=i/r,this.cos=n/r,window.addEventListener("mousemove",this.handleMouseMove),window.addEventListener("touchmove",this.handleMouseMove),window.addEventListener("mouseup",this.handleMouseUp),window.addEventListener("touchend",this.handleMouseUp),this._transforming=!0,this.fire("transformstart"),this.getNode().fire("transformstart")},handleMouseMove:function(e){var n,i,r,a=this.findOne("."+this.movingResizer),o=a.getStage().getContent().getBoundingClientRect(),s=o.left,c=o.top,h={x:(void 0!==e.clientX?e.clientX:e.touches[0].clientX)-s,y:(void 0!==e.clientX?e.clientY:e.touches[0].clientY)-c};a.setAbsolutePosition(h);var l=this.keepRatio()||e.shiftKey;if("top-left"===this.movingResizer)l&&(n=(r=Math.sqrt(Math.pow(this.findOne(".bottom-right").x()-a.x(),2)+Math.pow(this.findOne(".bottom-right").y()-a.y(),2)))*this.cos,i=r*this.sin,this.findOne(".top-left").x(this.findOne(".bottom-right").x()-n),this.findOne(".top-left").y(this.findOne(".bottom-right").y()-i));else if("top-center"===this.movingResizer)this.findOne(".top-left").y(a.y());else if("top-right"===this.movingResizer){l&&(n=(r=Math.sqrt(Math.pow(this.findOne(".bottom-left").x()-a.x(),2)+Math.pow(this.findOne(".bottom-left").y()-a.y(),2)))*this.cos,i=r*this.sin,this.findOne(".top-right").x(n),this.findOne(".top-right").y(this.findOne(".bottom-left").y()-i));var u=a.position();this.findOne(".top-left").y(u.y),this.findOne(".bottom-right").x(u.x)}else if("middle-left"===this.movingResizer)this.findOne(".top-left").x(a.x());else if("middle-right"===this.movingResizer)this.findOne(".bottom-right").x(a.x());else if("bottom-left"===this.movingResizer)l&&(n=(r=Math.sqrt(Math.pow(this.findOne(".top-right").x()-a.x(),2)+Math.pow(this.findOne(".top-right").y()-a.y(),2)))*this.cos,i=r*this.sin,this.findOne(".bottom-left").x(this.findOne(".top-right").x()-n),this.findOne(".bottom-left").y(i)),u=a.position(),this.findOne(".top-left").x(u.x),this.findOne(".bottom-right").y(u.y);else if("bottom-center"===this.movingResizer)this.findOne(".bottom-right").y(a.y());else if("bottom-right"===this.movingResizer)l&&(n=(r=Math.sqrt(Math.pow(this.findOne(".bottom-right").x(),2)+Math.pow(this.findOne(".bottom-right").y(),2)))*this.cos,i=r*this.sin,this.findOne(".bottom-right").x(n),this.findOne(".bottom-right").y(i));else if("rotater"===this.movingResizer){var f=this.getPadding(),d=this._getNodeRect();n=a.x()-d.width/2,i=-a.y()+d.height/2;for(var v=Math.atan2(-i,n)+Math.PI/2,p=t.getAngle(this.rotation()),g=t.Util._radToDeg(p)+t.Util._radToDeg(v),m=t.getAngle(this.getNode().rotation()),y=t.Util._degToRad(g),_=this.rotationSnaps(),b=0;b<_.length;b++){var x=t.getAngle(_[b]);Math.abs(x-t.Util._degToRad(g))%(2*Math.PI)<.1&&(g=t.Util._radToDeg(x),y=t.Util._degToRad(g))}var S=f,w=f;this._fitNodeInto(Object.assign(d,{rotation:t.angleDeg?g:t.Util._degToRad(g),x:d.x+(d.width/2+f)*(Math.cos(m)-Math.cos(y))+(d.height/2+f)*(Math.sin(-m)-Math.sin(-y))-(S*Math.cos(p)+w*Math.sin(-p)),y:d.y+(d.height/2+f)*(Math.cos(m)-Math.cos(y))+(d.width/2+f)*(Math.sin(m)-Math.sin(y))-(w*Math.cos(p)+S*Math.sin(p)),width:d.width+2*f,height:d.height+2*f}))}else console.error(new Error("Wrong position argument of selection resizer: ",this.movingResizer));if("rotater"!==this.movingResizer){var C=this.findOne(".top-left").getAbsolutePosition(this.getParent());n=C.x,i=C.y;var K=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),T=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodeInto({x:n+this.offsetX(),y:i+this.offsetY(),width:K,height:T})}},handleMouseUp:function(){this._removeEvents()},_removeEvents:function(){this._transforming&&(this._transforming=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("touchmove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseUp),window.removeEventListener("touchend",this.handleMouseUp),this.fire("transformend"),this.getNode().fire("transformend"))},_fitNodeInto:function(e){this._settings=!0;var n=this.getNode();void 0!==e.rotation&&this.getNode().rotation(e.rotation);var i=n.getClientRect({skipTransform:!0}),r=this.getPadding(),a=(e.width-2*r)/i.width,o=(e.height-2*r)/i.height,s=t.getAngle(n.getRotation()),c=i.x*a-r,h=i.y*o-r;this.getNode().setAttrs({scaleX:a,scaleY:o,x:e.x-(c*Math.cos(s)+h*Math.sin(-s)),y:e.y-(h*Math.cos(s)+c*Math.sin(s))}),this._settings=!1,this.fire("transform"),this.getNode().fire("transform"),this.update(),this.getLayer().batchDraw()},requestUpdate:function(){this.timeout||(this.timeout=setTimeout(function(){this.timeout=null,this.update()}.bind(this)))},forceUpdate:function(){this._clearCache("nodeRect"),this.update()},update:function(){var t=this._getNodeRect(),e=t.x,n=t.y,i=t.width,r=t.height;this.x(e),this.y(n),this.rotation(t.rotation);var a=this.enabledHandlers(),o=this.resizeEnabled(),s=this.getPadding();this.findOne(".top-left").setAttrs({x:-s,y:-s,visible:o&&a.indexOf("top-left")>=0}),this.findOne(".top-center").setAttrs({x:i/2,y:-s,visible:o&&a.indexOf("top-center")>=0}),this.findOne(".top-right").setAttrs({x:i+s,y:-s,visible:o&&a.indexOf("top-right")>=0}),this.findOne(".middle-left").setAttrs({x:-s,y:r/2,visible:o&&a.indexOf("middle-left")>=0}),this.findOne(".middle-right").setAttrs({x:i+s,y:r/2,visible:o&&a.indexOf("middle-right")>=0}),this.findOne(".bottom-left").setAttrs({x:-s,y:r+s,visible:o&&a.indexOf("bottom-left")>=0}),this.findOne(".bottom-center").setAttrs({x:i/2,y:r+s,visible:o&&a.indexOf("bottom-center")>=0}),this.findOne(".bottom-right").setAttrs({x:i+s,y:r+s,visible:o&&a.indexOf("bottom-right")>=0}),this.findOne(".rotater").setAttrs({x:i/2,y:-this.rotateHandlerOffset(),visible:this.rotateEnabled()}),this.findOne(".back").setAttrs({width:i,height:r,visible:this.lineEnabled()})},destroy:function(){t.Group.prototype.destroy.call(this),this.detach(),this._removeEvents()},toObject:function(){return t.Node.prototype.toObject.call(this)}},t.Util.extend(t.Transformer,t.Group),t.Factory.addGetterSetter(t.Transformer,"enabledHandlers",i,function(e){return e instanceof Array||t.Util.warn("enabledHandlers value should be an array"),e instanceof Array&&e.forEach(function(e){-1===i.indexOf(e)&&t.Util.warn("Unknown resizer name: "+e+". Available names are: "+i.join(", "))}),e||[]}),t.Factory.addGetterSetter(t.Transformer,"resizeEnabled",!0),t.Factory.addGetterSetter(t.Transformer,"rotateEnabled",!0),t.Factory.addGetterSetter(t.Transformer,"rotationSnaps",[]),t.Factory.addGetterSetter(t.Transformer,"rotateHandlerOffset",50),t.Factory.addGetterSetter(t.Transformer,"lineEnabled",!0),t.Factory.addGetterSetter(t.Transformer,"keepRatio",!0),t.Factory.addGetterSetter(t.Transformer,"padding",0),t.Factory.addOverloadedGetterSetter(t.Transformer,"node"),t.Collection.mapMethods(t.Transformer)}(Konva)}).call(e,n("DuR2"))},xnc9:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},zQR9:function(t,e,n){"use strict";var i=n("h65t")(!0);n("vIB/")(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=i(e,n),this._i+=t.length,{value:t,done:!1})})}});