UNPKG

claude-code-templates

Version:

Component templates and tracking system for Claude Code

14 lines (12 loc) 615 kB
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Du=function(r,t){return Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Du(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Du(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var $0=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),q0=(function(){function r(){this.browser=new $0,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),K=new q0;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(K.wxa=!0,K.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?K.worker=!0:!K.hasGlobalWindow||"Deno"in window?(K.node=!0,K.svgSupported=!0):K0(navigator.userAgent,K);function K0(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Rh=12,Q0="sans-serif",di=Rh+"px "+Q0,J0=20,j0=100,t_="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function e_(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-J0)/j0;t[i]=n}return t}var r_=e_(t_),Pr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,i){if(!r){var n=Pr.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||di),r.measureText(e);e=e||"",i=i||di;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||Rh,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=r_[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}},tg=Rr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),eg=Rr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Ta=Object.prototype.toString,ys=Array.prototype,i_=ys.forEach,n_=ys.filter,Eh=ys.slice,a_=ys.map,Hf=function(){}.constructor,Ea=Hf?Hf.prototype:null,kh="__proto__",o_=2311;function rg(){return o_++}function Oh(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function Z(r){if(r==null||typeof r!="object")return r;var t=r,e=Ta.call(r);if(e==="[object Array]"){if(!Kn(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=Z(r[i])}}else if(eg[e]){if(!Kn(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!tg[e]&&!Kn(r)&&!ua(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==kh&&(t[o]=Z(r[o]))}return t}function rt(r,t,e){if(!Y(t)||!Y(r))return e?Z(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==kh){var n=r[i],a=t[i];Y(a)&&Y(n)&&!z(a)&&!z(n)&&!ua(a)&&!ua(n)&&!Gf(a)&&!Gf(n)&&!Kn(a)&&!Kn(n)?rt(n,a,e):(e||!(i in r))&&(r[i]=Z(t[i]))}return r}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==kh&&(r[e]=t[e]);return r}function at(r,t,e){for(var i=gt(t),n=0,a=i.length;n<a;n++){var o=i[n];r[o]==null&&(r[o]=t[o])}return r}function lt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function s_(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function $e(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&r[a]==null&&(r[a]=t[a])}else at(r,t)}function Qt(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function C(r,t,e){if(r&&t)if(r.forEach&&r.forEach===i_)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function W(r,t,e){if(!r)return[];if(!t)return Bh(r);if(r.map&&r.map===a_)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function Rr(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function Lt(r,t,e){if(!r)return[];if(!t)return Bh(r);if(r.filter&&r.filter===n_)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function gt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function l_(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(Eh.call(arguments)))}}var G=Ea&&J(Ea.bind)?Ea.call.bind(Ea.bind):l_;function mt(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Eh.call(arguments)))}}function z(r){return Array.isArray?Array.isArray(r):Ta.call(r)==="[object Array]"}function J(r){return typeof r=="function"}function H(r){return typeof r=="string"}function Au(r){return Ta.call(r)==="[object String]"}function dt(r){return typeof r=="number"}function Y(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Gf(r){return!!tg[Ta.call(r)]}function Jt(r){return!!eg[Ta.call(r)]}function ua(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function ms(r){return r.colorStops!=null}function u_(r){return r.image!=null}function Bo(r){return r!==r}function an(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function j(r,t){return r??t}function qn(r,t,e){return r??t??e}function Bh(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Eh.apply(r,t)}function ig(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function Ue(r,t){if(!r)throw new Error(t)}function Ge(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ng="__ec_primitive__";function Iu(r){r[ng]=!0}function Kn(r){return r[ng]}var h_=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return gt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r})(),ag=typeof Map=="function";function f_(){return ag?new Map:new h_}var v_=(function(){function r(t){var e=z(t);this.data=f_();var i=this;t instanceof r?t.each(n):t&&C(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return ag?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function Q(r){return new v_(r)}function c_(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function _s(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&B(e,t),e}function og(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function pi(r,t){return r.hasOwnProperty(t)}function Nt(){}var d_=180/Math.PI;function un(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function p_(r){return[r[0],r[1]]}function Wf(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function g_(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function y_(r){return Math.sqrt(m_(r))}function m_(r){return r[0]*r[0]+r[1]*r[1]}function qs(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function __(r,t){var e=y_(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Lu(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var Pu=Lu;function S_(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Ki=S_;function Ks(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function ge(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function Yi(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Xi(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Mi=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),w_=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Mi(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new Mi(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Mi(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Mi(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Mi(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Mi(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),Pe=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,h=a[t][u];return h&&h.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var h=n[u];if(!(a&&a.filter&&h.query!=null&&!a.filter(t,h.query)))switch(o){case 0:h.h.call(s);break;case 1:h.h.call(s,e[0]);break;case 2:h.h.call(s,e[0],e[1]);break;default:h.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),b_=Math.log(2);function Ru(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/b_);return r[e][l]}for(var u=i|1<<e,h=e+1;i&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var d=1<<c;d&n||(f+=(v%2?-1:1)*r[e][c]*Ru(r,t-1,h,u,n|d,a),v++)}return a[o]=f,f}function Uf(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=Ru(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ru(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,h){var f=u*a[6]+h*a[7]+1;l[0]=(u*a[0]+h*a[1]+a[2])/f,l[1]=(u*a[3]+h*a[4]+a[5])/f}}}var Yf="___zrEVENTSAVED",Qs=[];function x_(r,t,e,i,n){return Eu(Qs,t,i,n,!0)&&Eu(r,e,Qs[0],Qs[1])}function Eu(r,t,e,i,n){if(t.getBoundingClientRect&&K.domSupported&&!sg(t)){var a=t[Yf]||(t[Yf]={}),o=T_(t,a),s=M_(o,a,n);if(s)return s(r,e,i),!0}return!1}function T_(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function M_(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;o.push(c,v),l=l&&a&&c===a[f]&&v===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Uf(s,o):Uf(o,s))}function sg(r){return r.nodeName.toUpperCase()==="CANVAS"}var C_=/([&<>"'])/g,D_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Xt(r){return r==null?"":(r+"").replace(C_,function(t,e){return D_[e]})}var A_=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Js=[],I_=K.browser.firefox&&+K.browser.version.split(".")[0]<39;function ku(r,t,e,i){return e=e||{},i?Xf(r,t,e):I_&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Xf(r,t,e),e}function Xf(r,t,e){if(K.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(sg(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Eu(Js,r,i,n)){e.zrX=Js[0],e.zrY=Js[1];return}}e.zrX=e.zrY=0}function Nh(r){return r||window.event}function ue(r,t,e){if(t=Nh(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&ku(r,o,t,e)}else{ku(r,t,t,e);var a=L_(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&A_.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function L_(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function P_(r,t,e,i){r.addEventListener(t,e,i)}function R_(r,t,e,i){r.removeEventListener(t,e,i)}var sr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Zf(r){return r.which===2||r.which===3}var E_=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=ku(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in js)if(js.hasOwnProperty(e)){var i=js[e](this._track,t);if(i)return i}},r})();function $f(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function k_(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var js={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=$f(i)/$f(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=k_(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Qi(){return[1,0,0,1,0,0]}function zh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function O_(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Ji(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Ou(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Fh(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],h=Math.sin(e),f=Math.cos(e);return r[0]=n*f+s*h,r[1]=-n*h+s*f,r[2]=a*f+l*h,r[3]=-a*h+f*l,r[4]=f*(o-i[0])+h*(u-i[1])+i[0],r[5]=f*(u-i[1])-h*(o-i[0])+i[1],r}function B_(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Vh(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}var q=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r})(),ka=Math.min,Oa=Math.max,Or=new q,Br=new q,Nr=new q,zr=new q,mn=new q,_n=new q,ut=(function(){function r(t,e,i,n){i<0&&(t=t+i,i=-i),n<0&&(e=e+n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return r.prototype.union=function(t){var e=ka(t.x,this.x),i=ka(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Oa(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Oa(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=Qi();return Ou(a,a,[-e.x,-e.y]),B_(a,a,[i,n]),Ou(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,h=t.y,f=t.y+t.height,c=!(a<l||u<n||s<h||f<o);if(e){var v=1/0,d=0,g=Math.abs(a-l),p=Math.abs(u-n),y=Math.abs(s-h),m=Math.abs(f-o),_=Math.min(g,p),S=Math.min(y,m);a<l||u<n?_>d&&(d=_,g<p?q.set(_n,-g,0):q.set(_n,p,0)):_<v&&(v=_,g<p?q.set(mn,g,0):q.set(mn,-p,0)),s<h||f<o?S>d&&(d=S,y<m?q.set(_n,0,-y):q.set(_n,0,m)):_<v&&(v=_,y<m?q.set(mn,0,y):q.set(mn,0,-m))}return e&&q.copy(e,c?mn:_n),c},r.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Or.x=Nr.x=e.x,Or.y=zr.y=e.y,Br.x=zr.x=e.x+e.width,Br.y=Nr.y=e.y+e.height,Or.transform(i),zr.transform(i),Br.transform(i),Nr.transform(i),t.x=ka(Or.x,Br.x,Nr.x,zr.x),t.y=ka(Or.y,Br.y,Nr.y,zr.y);var l=Oa(Or.x,Br.x,Nr.x,zr.x),u=Oa(Or.y,Br.y,Nr.y,zr.y);t.width=l-t.x,t.height=u-t.y},r})(),lg="silent";function N_(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:z_}}function z_(){sr(this.event)}var F_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(Pe),Sn=(function(){function r(t,e){this.x=t,this.y=e}return r})(),V_=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tl=new ut(0,0,0,0),ug=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new Sn(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new F_,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new w_(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(C(V_,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=hg(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Sn(i,n):this.findHover(i,n),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Sn(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=N_(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new Sn(e,i);if(qf(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new ut(e-u,i-u,l,l),f=a.length-1;f>=0;f--){var c=a[f];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(tl.copy(c.getBoundingRect()),c.transform&&tl.applyTransform(c.transform),tl.intersect(h)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,g=Math.PI*2,p=0;p<u;p+=v)for(var y=0;y<g;y+=d){var m=e+p*Math.cos(y),_=i+p*Math.sin(y);if(qf(s,o,m,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new E_);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new Sn;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(Pe);C(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){ug.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=hg(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Pu(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function H_(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?lg:!0}return!1}function qf(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=H_(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==lg)){t.target=o;break}}}function hg(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var fg=32,wn=7;function G_(r){for(var t=0;r>=fg;)t|=r&1,r>>=1;return r+t}function Kf(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;W_(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function W_(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function Qf(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function el(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])>0?o=h+1:l=h}return l}function rl(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])<0?l=h:o=h+1}return l}function U_(r,t){var e=wn,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]<n[v+1]&&v--;else if(n[v]>n[v+1])break;h(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]<n[v+1]&&v--,h(v)}}function h(v){var d=i[v],g=n[v],p=i[v+1],y=n[v+1];n[v]=g+y,v===a-3&&(i[v+1]=i[v+2],n[v+1]=n[v+2]),a--;var m=rl(r[p],r,d,g,0,t);d+=m,g-=m,g!==0&&(y=el(r[d+g-1],r,p,y,y-1,t),y!==0&&(g<=y?f(d,g,p,y):c(d,g,p,y)))}function f(v,d,g,p){var y=0;for(y=0;y<d;y++)o[y]=r[v+y];var m=0,_=g,S=v;if(r[S++]=r[_++],--p===0){for(y=0;y<d;y++)r[S+y]=o[m+y];return}if(d===1){for(y=0;y<p;y++)r[S+y]=r[_+y];r[S+p]=o[m];return}for(var b=e,w,x,T;;){w=0,x=0,T=!1;do if(t(r[_],o[m])<0){if(r[S++]=r[_++],x++,w=0,--p===0){T=!0;break}}else if(r[S++]=o[m++],w++,x=0,--d===1){T=!0;break}while((w|x)<b);if(T)break;do{if(w=rl(r[_],o,m,d,0,t),w!==0){for(y=0;y<w;y++)r[S+y]=o[m+y];if(S+=w,m+=w,d-=w,d<=1){T=!0;break}}if(r[S++]=r[_++],--p===0){T=!0;break}if(x=el(o[m],r,_,p,0,t),x!==0){for(y=0;y<x;y++)r[S+y]=r[_+y];if(S+=x,_+=x,p-=x,p===0){T=!0;break}}if(r[S++]=o[m++],--d===1){T=!0;break}b--}while(w>=wn||x>=wn);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(y=0;y<p;y++)r[S+y]=r[_+y];r[S+p]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[S+y]=o[m+y]}}function c(v,d,g,p){var y=0;for(y=0;y<p;y++)o[y]=r[g+y];var m=v+d-1,_=p-1,S=g+p-1,b=0,w=0;if(r[S--]=r[m--],--d===0){for(b=S-(p-1),y=0;y<p;y++)r[b+y]=o[y];return}if(p===1){for(S-=d,m-=d,w=S+1,b=m+1,y=d-1;y>=0;y--)r[w+y]=r[b+y];r[S]=o[_];return}for(var x=e;;){var T=0,D=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,D=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],D++,T=0,--p===1){A=!0;break}while((T|D)<x);if(A)break;do{if(T=d-rl(o[_],r,v,d,d-1,t),T!==0){for(S-=T,m-=T,d-=T,w=S+1,b=m+1,y=T-1;y>=0;y--)r[w+y]=r[b+y];if(d===0){A=!0;break}}if(r[S--]=o[_--],--p===1){A=!0;break}if(D=p-el(r[m],o,0,p,p-1,t),D!==0){for(S-=D,_-=D,p-=D,w=S+1,b=_+1,y=0;y<D;y++)r[w+y]=o[b+y];if(p<=1){A=!0;break}}if(r[S--]=r[m--],--d===0){A=!0;break}x--}while(T>=wn||D>=wn);if(A)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),p===1){for(S-=d,m-=d,w=S+1,b=m+1,y=d-1;y>=0;y--)r[w+y]=r[b+y];r[S]=o[_]}else{if(p===0)throw new Error;for(b=S-(p-1),y=0;y<p;y++)r[b+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function wo(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<fg){a=Kf(r,e,i,t),Qf(r,e,i,e+a,t);return}var o=U_(r,t),s=G_(n);do{if(a=Kf(r,e,i,t),a<s){var l=n;l>s&&(l=s),Qf(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var re=1,Hn=2,Gi=4,Jf=!1;function il(){Jf||(Jf=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function jf(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var Y_=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jf}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,wo(i,jf)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e?e=e.slice():e=[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=re),this._updateAndAddDisplayable(u,e,i)}t.__dirty=0}else{var h=t;e&&e.length?h.__clipPaths=e:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(il(),h.z=0),isNaN(h.z2)&&(il(),h.z2=0),isNaN(h.zlevel)&&(il(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=lt(this._roots,t);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),No;No=K.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Qn={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Qn.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Qn.bounceIn(r*2)*.5:Qn.bounceOut(r*2-1)*.5+.5}},Ba=Math.pow,Dr=Math.sqrt,zo=1e-8,vg=1e-4,tv=Dr(3),Na=1/3,Ve=un(),ve=un(),ji=un();function wr(r){return r>-zo&&r<zo}function cg(r){return r>zo||r<-zo}function Pt(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function ev(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function Fo(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(wr(h)&&wr(f))if(wr(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var g=f*f-4*h*c;if(wr(g)){var p=f/h,d=-s/o+p,y=-p/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var m=Dr(g),_=h*s+1.5*o*(-f+m),S=h*s+1.5*o*(-f-m);_<0?_=-Ba(-_,Na):_=Ba(_,Na),S<0?S=-Ba(-S,Na):S=Ba(S,Na);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*h*s-3*o*f)/(2*Dr(h*h*h)),w=Math.acos(b)/3,x=Dr(h),T=Math.cos(w),d=(-s-2*x*T)/(3*o),y=(-s+x*(T+tv*Math.sin(w)))/(3*o),D=(-s+x*(T-tv*Math.sin(w)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),D>=0&&D<=1&&(a[v++]=D)}}return v}function dg(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(wr(o)){if(cg(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var h=a*a-4*o*s;if(wr(h))n[0]=-a/(2*o);else if(h>0){var f=Dr(h),u=(-a+f)/(2*o),c=(-a-f)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function Vo(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,h=(l-s)*n+s,f=(h-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=h,a[6]=l,a[7]=i}function X_(r,t,e,i,n,a,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,y;Ve[0]=l,Ve[1]=u;for(var m=0;m<1;m+=.05)ve[0]=Pt(r,e,n,o,m),ve[1]=Pt(t,i,a,s,m),p=Ki(Ve,ve),p<v&&(f=m,v=p);v=1/0;for(var _=0;_<32&&!(c<vg);_++)d=f-c,g=f+c,ve[0]=Pt(r,e,n,o,d),ve[1]=Pt(t,i,a,s,d),p=Ki(ve,Ve),d>=0&&p<v?(f=d,v=p):(ji[0]=Pt(r,e,n,o,g),ji[1]=Pt(t,i,a,s,g),y=Ki(ji,Ve),g<=1&&y<v?(f=g,v=y):c*=.5);return Dr(v)}function Z_(r,t,e,i,n,a,o,s,l){for(var u=r,h=t,f=0,c=1/l,v=1;v<=l;v++){var d=v*c,g=Pt(r,e,n,o,d),p=Pt(t,i,a,s,d),y=g-u,m=p-h;f+=Math.sqrt(y*y+m*m),u=g,h=p}return f}function Zt(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function rv(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function $_(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(wr(a)){if(cg(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var h=o*o-4*a*s;if(wr(h)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(h>0){var f=Dr(h),u=(-o+f)/(2*a),c=(-o-f)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function pg(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function Ho(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function q_(r,t,e,i,n,a,o,s,l){var u,h=.005,f=1/0;Ve[0]=o,Ve[1]=s;for(var c=0;c<1;c+=.05){ve[0]=Zt(r,e,n,c),ve[1]=Zt(t,i,a,c);var v=Ki(Ve,ve);v<f&&(u=c,f=v)}f=1/0;for(var d=0;d<32&&!(h<vg);d++){var g=u-h,p=u+h;ve[0]=Zt(r,e,n,g),ve[1]=Zt(t,i,a,g);var v=Ki(ve,Ve);if(g>=0&&v<f)u=g,f=v;else{ji[0]=Zt(r,e,n,p),ji[1]=Zt(t,i,a,p);var y=Ki(ji,Ve);p<=1&&y<f?(u=p,f=y):h*=.5}}return Dr(f)}function K_(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,h=1/o,f=1;f<=o;f++){var c=f*h,v=Zt(r,e,n,c),d=Zt(t,i,a,c),g=v-s,p=d-l;u+=Math.sqrt(g*g+p*p),s=v,l=d}return u}var Q_=/cubic-bezier\(([0-9,\.e ]+)\)/;function gg(r){var t=r&&Q_.exec(r);if(t){var e=t[1].split(","),i=+Ge(e[0]),n=+Ge(e[1]),a=+Ge(e[2]),o=+Ge(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Fo(0,i,a,1,l,s)&&Pt(0,n,o,1,s[0])}}}var J_=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Nt,this.ondestroy=t.ondestroy||Nt,this.onrestart=t.onrestart||Nt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=J(t)?t:Qn[t]||gg(t)},r})(),yg=(function(){function r(t){this.value=t}return r})(),j_=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new yg(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Ma=(function(){function r(t){this._list=new j_,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new yg(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),iv={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ae(r){return r=Math.round(r),r<0?0:r>255?255:r}function t1(r){return r=Math.round(r),r<0?0:r>360?360:r}function ha(r){return r<0?0:r>1?1:r}function nl(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ae(parseFloat(t)/100*255):Ae(parseInt(t,10))}function hi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ha(parseFloat(t)/100):ha(parseFloat(t))}function al(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function br(r,t,e){return r+(t-r)*e}function le(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function Bu(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var mg=new Ma(20),za=null;function Ci(r,t){za&&Bu(za,t),za=mg.put(r,za||t.slice())}function ye(r,t){if(r){t=t||[];var e=mg.get(r);if(e)return Bu(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in iv)return Bu(t,iv[i]),Ci(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){le(t,0,0,0,1);return}return le(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Ci(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){le(t,0,0,0,1);return}return le(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Ci(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?le(t,+u[0],+u[1],+u[2],1):le(t,0,0,0,1);h=hi(u.pop());case"rgb":if(u.length>=3)return le(t,nl(u[0]),nl(u[1]),nl(u[2]),u.length===3?h:hi(u[3])),Ci(r,t),t;le(t,0,0,0,1);return;case"hsla":if(u.length!==4){le(t,0,0,0,1);return}return u[3]=hi(u[3]),Nu(u,t),Ci(r,t),t;case"hsl":if(u.length!==3){le(t,0,0,0,1);return}return Nu(u,t),Ci(r,t),t;default:return}}le(t,0,0,0,1)}}function Nu(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=hi(r[1]),n=hi(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],le(t,Ae(al(o,a,e+1/3)*255),Ae(al(o,a,e)*255),Ae(al(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function e1(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var h=((a-t)/6+o/2)/o,f=((a-e)/6+o/2)/o,c=((a-i)/6+o/2)/o;t===a?l=c-f:e===a?l=1/3+h-c:i===a&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function nv(r,t){var e=ye(r);if(e){for(var i=0;i<3;i++)e[i]=e[i]*(1-t)|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return ar(e,e.length===4?"rgba":"rgb")}}function ol(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=Ae(br(o[0],s[0],l)),e[1]=Ae(br(o[1],s[1],l)),e[2]=Ae(br(o[2],s[2],l)),e[3]=ha(br(o[3],s[3],l)),e}}function r1(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=ye(t[n]),s=ye(t[a]),l=i-n,u=ar([Ae(br(o[0],s[0],l)),Ae(br(o[1],s[1],l)),Ae(br(o[2],s[2],l)),ha(br(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function sl(r,t,e,i){var n=ye(r);if(r)return n=e1(n),t!=null&&(n[0]=t1(t)),e!=null&&(n[1]=hi(e)),i!=null&&(n[2]=hi(i)),ar(Nu(n),"rgba")}function i1(r,t){var e=ye(r);if(e&&t!=null)return e[3]=ha(t),ar(e,"rgba")}function ar(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Go(r,t){var e=ye(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var av=new Ma(100);function ov(r){if(H(r)){var t=av.get(r);return t||(t=nv(r,-.1),av.put(r,t)),t}else if(ms(r)){var e=B({},r);return e.colorStops=W(r.colorStops,function(i){return{offset:i.offset,color:nv(i.color,-.1)}}),e}return r}function n1(r){return r.type==="linear"}function a1(r){return r.type==="radial"}(function(){return K.hasGlobalWindow&&J(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var zu=Array.prototype.slice;function er(r,t,e){return(t-r)*e+r}function ll(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=er(t[a],e[a],i);return r}function o1(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=er(t[o][s],e[o][s],i)}return r}function Fa(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function sv(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o]