UNPKG

@senx/discovery-plugin-marauder

Version:

Discovery plugin - Marauder's map

30 lines (26 loc) 2.1 MB
var __awaiter=this&&this.__awaiter||function(t,e,r,i){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{u(i.next(t))}catch(t){a(t)}}function s(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):n(t.value).then(o,s)}u((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return u([t,e])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(i=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];n=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,a;i<n;i++){if(a||!(i in e)){if(!a)a=Array.prototype.slice.call(e,0,i);a[i]=e[i]}}return t.concat(a||Array.prototype.slice.call(e))};System.register(["./p-54266c9e.system.js","./p-df61f0da.system.js","./p-bd1c239e.system.js","./p-fb64dbc4.system.js","./p-37b7b786.system.js","./p-0e226de5.system.js","./p-51f5dd56.system.js","./p-9f9942e4.system.js","./p-6a3d974f.system.js"],(function(t){"use strict";var e,r,i,n,a,o,s,u,l,f,h,v,c,d,m,p,_,y,g,b,w,M,k,x,S,Y;return{setters:[function(t){e=t.r;r=t.c;i=t.h;n=t.H;a=t.g},function(t){o=t.a},function(t){s=t.P;u=t._;l=t.G;f=t.U;h=t.L;v=t.v;c=t.c;d=t.d;m=t.a;p=t.l;_=t.J;y=t.b},function(t){g=t.g},function(t){b=t.C},function(t){w=t.d;M=t.l;k=t.L},function(t){x=t.L},function(t){S=t.M},function(t){Y=t.a}],execute:function(){ /*! ***************************************************************************** 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 T=function(t,e){T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return T(t,e)};function D(t,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");T(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var A=function(){function t(){this.firefox=false;this.ie=false;this.edge=false;this.newEdge=false;this.weChat=false}return t}();var O=function(){function t(){this.browser=new A;this.node=false;this.wxa=false;this.worker=false;this.svgSupported=false;this.touchEventsSupported=false;this.pointerEventsSupported=false;this.domSupported=false;this.transformSupported=false;this.transform3dSupported=false;this.hasGlobalWindow=typeof window!=="undefined"}return t}();var j=new O;if(typeof wx==="object"&&typeof wx.getSystemInfoSync==="function"){j.wxa=true;j.touchEventsSupported=true}else if(typeof document==="undefined"&&typeof self!=="undefined"){j.worker=true}else if(!j.hasGlobalWindow||"Deno"in window){j.node=true;j.svgSupported=true}else{N(navigator.userAgent,j)}function N(t,e){var r=e.browser;var i=t.match(/Firefox\/([\d.]+)/);var n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/);var a=t.match(/Edge?\/([\d.]+)/);var o=/micromessenger/i.test(t);if(i){r.firefox=true;r.version=i[1]}if(n){r.ie=true;r.version=n[1]}if(a){r.edge=true;r.version=a[1];r.newEdge=+a[1].split(".")[0]>18}if(o){r.weChat=true}e.svgSupported=typeof SVGRect!=="undefined";e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge;e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);e.domSupported=typeof document!=="undefined";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s);e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}var z=j;var I=12;var H="sans-serif";var C=I+"px "+H;var E=20;var P=100;var W="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function F(t){var e={};if(typeof JSON==="undefined"){return e}for(var r=0;r<t.length;r++){var i=String.fromCharCode(r+32);var n=(t.charCodeAt(r)-E)/P;e[i]=n}return e}var R=F(W);var B={createCanvas:function(){return typeof document!=="undefined"&&document.createElement("canvas")},measureText:function(){var t;var e;return function(r,i){if(!t){var n=B.createCanvas();t=n&&n.getContext("2d")}if(t){if(e!==i){e=t.font=i||C}return t.measureText(r)}else{r=r||"";i=i||C;var a=/((?:\d+)?\.?\d*)px/.exec(i);var o=a&&+a[1]||I;var s=0;if(i.indexOf("mono")>=0){s=o*r.length}else{for(var u=0;u<r.length;u++){var l=R[r[u]];s+=l==null?o:l*o}}return{width:s}}}}(),loadImage:function(t,e,r){var i=new Image;i.onload=e;i.onerror=r;i.src=t;return i}};var J=mt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){t["[object "+e+"]"]=true;return t}),{});var U=mt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){t["[object "+e+"Array]"]=true;return t}),{});var V=Object.prototype.toString;var G=Array.prototype;var Z=G.forEach;var q=G.filter;var K=G.slice;var X=G.map;var $=function(){}.constructor;var Q=$?$.prototype:null;var tt="__proto__";var et=2311;function rt(){return et++}function it(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}if(typeof console!=="undefined"){console.error.apply(console,t)}}function nt(t){if(t==null||typeof t!=="object"){return t}var e=t;var r=V.call(t);if(r==="[object Array]"){if(!Jt(t)){e=[];for(var i=0,n=t.length;i<n;i++){e[i]=nt(t[i])}}}else if(U[r]){if(!Jt(t)){var a=t.constructor;if(a.from){e=a.from(t)}else{e=new a(t.length);for(var i=0,n=t.length;i<n;i++){e[i]=t[i]}}}}else if(!J[r]&&!Jt(t)&&!At(t)){e={};for(var o in t){if(t.hasOwnProperty(o)&&o!==tt){e[o]=nt(t[o])}}}return e}function at(t,e,r){if(!Yt(e)||!Yt(t)){return r?nt(e):t}for(var i in e){if(e.hasOwnProperty(i)&&i!==tt){var n=t[i];var a=e[i];if(Yt(a)&&Yt(n)&&!Mt(a)&&!Mt(n)&&!At(a)&&!At(n)&&!Tt(a)&&!Tt(n)&&!Jt(a)&&!Jt(n)){at(n,a,r)}else if(r||!(i in t)){t[i]=nt(e[i])}}}return t}function ot(t,e){var r=t[0];for(var i=1,n=t.length;i<n;i++){r=at(r,t[i],e)}return r}function st(t,e){if(Object.assign){Object.assign(t,e)}else{for(var r in e){if(e.hasOwnProperty(r)&&r!==tt){t[r]=e[r]}}}return t}function ut(t,e,r){var i=yt(e);for(var n=0,a=i.length;n<a;n++){var o=i[n];if(r?e[o]!=null:t[o]==null){t[o]=e[o]}}return t}function lt(t,e){if(t){if(t.indexOf){return t.indexOf(e)}for(var r=0,i=t.length;r<i;r++){if(t[r]===e){return r}}}return-1}function ft(t,e){var r=t.prototype;function i(){}i.prototype=e.prototype;t.prototype=new i;for(var n in r){if(r.hasOwnProperty(n)){t.prototype[n]=r[n]}}t.prototype.constructor=t;t.superClass=e}function ht(t,e,r){t="prototype"in t?t.prototype:t;e="prototype"in e?e.prototype:e;if(Object.getOwnPropertyNames){var i=Object.getOwnPropertyNames(e);for(var n=0;n<i.length;n++){var a=i[n];if(a!=="constructor"){if(r?e[a]!=null:t[a]==null){t[a]=e[a]}}}}else{ut(t,e,r)}}function vt(t){if(!t){return false}if(typeof t==="string"){return false}return typeof t.length==="number"}function ct(t,e,r){if(!(t&&e)){return}if(t.forEach&&t.forEach===Z){t.forEach(e,r)}else if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++){e.call(r,t[i],i,t)}}else{for(var a in t){if(t.hasOwnProperty(a)){e.call(r,t[a],a,t)}}}}function dt(t,e,r){if(!t){return[]}if(!e){return Et(t)}if(t.map&&t.map===X){return t.map(e,r)}else{var i=[];for(var n=0,a=t.length;n<a;n++){i.push(e.call(r,t[n],n,t))}return i}}function mt(t,e,r,i){if(!(t&&e)){return}for(var n=0,a=t.length;n<a;n++){r=e.call(i,r,t[n],n,t)}return r}function pt(t,e,r){if(!t){return[]}if(!e){return Et(t)}if(t.filter&&t.filter===q){return t.filter(e,r)}else{var i=[];for(var n=0,a=t.length;n<a;n++){if(e.call(r,t[n],n,t)){i.push(t[n])}}return i}}function _t(t,e,r){if(!(t&&e)){return}for(var i=0,n=t.length;i<n;i++){if(e.call(r,t[i],i,t)){return t[i]}}}function yt(t){if(!t){return[]}if(Object.keys){return Object.keys(t)}var e=[];for(var r in t){if(t.hasOwnProperty(r)){e.push(r)}}return e}function gt(t,e){var r=[];for(var i=2;i<arguments.length;i++){r[i-2]=arguments[i]}return function(){return t.apply(e,r.concat(K.call(arguments)))}}var bt=Q&&kt(Q.bind)?Q.call.bind(Q.bind):gt;function wt(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}return function(){return t.apply(this,e.concat(K.call(arguments)))}}function Mt(t){if(Array.isArray){return Array.isArray(t)}return V.call(t)==="[object Array]"}function kt(t){return typeof t==="function"}function xt(t){return typeof t==="string"}function Lt(t){return V.call(t)==="[object String]"}function St(t){return typeof t==="number"}function Yt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function Tt(t){return!!J[V.call(t)]}function Dt(t){return!!U[V.call(t)]}function At(t){return typeof t==="object"&&typeof t.nodeType==="number"&&typeof t.ownerDocument==="object"}function Ot(t){return t.colorStops!=null}function jt(t){return t.image!=null}function Nt(t){return V.call(t)==="[object RegExp]"}function zt(t){return t!==t}function It(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}for(var r=0,i=t.length;r<i;r++){if(t[r]!=null){return t[r]}}}function Ht(t,e){return t!=null?t:e}function Ct(t,e,r){return t!=null?t:e!=null?e:r}function Et(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}return K.apply(t,e)}function Pt(t){if(typeof t==="number"){return[t,t,t,t]}var e=t.length;if(e===2){return[t[0],t[1],t[0],t[1]]}else if(e===3){return[t[0],t[1],t[2],t[1]]}return t}function Wt(t,e){if(!t){throw new Error(e)}}function Ft(t){if(t==null){return null}else if(typeof t.trim==="function"){return t.trim()}else{return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}var Rt="__ec_primitive__";function Bt(t){t[Rt]=true}function Jt(t){return t[Rt]}var Ut=function(){function t(){this.data={}}t.prototype["delete"]=function(t){var e=this.has(t);if(e){delete this.data[t]}return e};t.prototype.has=function(t){return this.data.hasOwnProperty(t)};t.prototype.get=function(t){return this.data[t]};t.prototype.set=function(t,e){this.data[t]=e;return this};t.prototype.keys=function(){return yt(this.data)};t.prototype.forEach=function(t){var e=this.data;for(var r in e){if(e.hasOwnProperty(r)){t(e[r],r)}}};return t}();var Vt=typeof Map==="function";function Gt(){return Vt?new Map:new Ut}var Zt=function(){function t(e){var r=Mt(e);this.data=Gt();var i=this;e instanceof t?e.each(n):e&&ct(e,n);function n(t,e){r?i.set(t,e):i.set(e,t)}}t.prototype.hasKey=function(t){return this.data.has(t)};t.prototype.get=function(t){return this.data.get(t)};t.prototype.set=function(t,e){this.data.set(t,e);return e};t.prototype.each=function(t,e){this.data.forEach((function(r,i){t.call(e,r,i)}))};t.prototype.keys=function(){var t=this.data.keys();return Vt?Array.from(t):t};t.prototype.removeKey=function(t){this.data["delete"](t)};return t}();function qt(t){return new Zt(t)}function Kt(t,e){var r=new t.constructor(t.length+e.length);for(var i=0;i<t.length;i++){r[i]=t[i]}var n=t.length;for(var i=0;i<e.length;i++){r[i+n]=e[i]}return r}function Xt(t,e){var r;if(Object.create){r=Object.create(t)}else{var i=function(){};i.prototype=t;r=new i}if(e){st(r,e)}return r}function $t(t){var e=t.style;e.webkitUserSelect="none";e.userSelect="none";e.webkitTapHighlightColor="rgba(0,0,0,0)";e["-webkit-touch-callout"]="none"}function Qt(t,e){return t.hasOwnProperty(e)}function te(){}var ee=180/Math.PI; /*! ***************************************************************************** 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 re=function(t,e){re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return re(t,e)};function ie(t,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");re(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function ne(t,e){if(t==null){t=0}if(e==null){e=0}return[t,e]}function ae(t,e){t[0]=e[0];t[1]=e[1];return t}function oe(t){return[t[0],t[1]]}function se(t,e,r){t[0]=e;t[1]=r;return t}function ue(t,e,r){t[0]=e[0]+r[0];t[1]=e[1]+r[1];return t}function le(t,e,r,i){t[0]=e[0]+r[0]*i;t[1]=e[1]+r[1]*i;return t}function fe(t,e,r){t[0]=e[0]-r[0];t[1]=e[1]-r[1];return t}function he(t){return Math.sqrt(ve(t))}function ve(t){return t[0]*t[0]+t[1]*t[1]}function ce(t,e,r){t[0]=e[0]*r;t[1]=e[1]*r;return t}function de(t,e){var r=he(e);if(r===0){t[0]=0;t[1]=0}else{t[0]=e[0]/r;t[1]=e[1]/r}return t}function me(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var pe=me;function _e(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ye=_e;function ge(t,e,r,i){t[0]=e[0]+i*(r[0]-e[0]);t[1]=e[1]+i*(r[1]-e[1]);return t}function be(t,e,r){var i=e[0];var n=e[1];t[0]=r[0]*i+r[2]*n+r[4];t[1]=r[1]*i+r[3]*n+r[5];return t}function we(t,e,r){t[0]=Math.min(e[0],r[0]);t[1]=Math.min(e[1],r[1]);return t}function Me(t,e,r){t[0]=Math.max(e[0],r[0]);t[1]=Math.max(e[1],r[1]);return t}var ke=function(){function t(t,e){this.target=t;this.topTarget=e&&e.topTarget}return t}();var xe=function(){function t(t){this.handler=t;t.on("mousedown",this._dragStart,this);t.on("mousemove",this._drag,this);t.on("mouseup",this._dragEnd,this)}t.prototype._dragStart=function(t){var e=t.target;while(e&&!e.draggable){e=e.parent||e.__hostTarget}if(e){this._draggingTarget=e;e.dragging=true;this._x=t.offsetX;this._y=t.offsetY;this.handler.dispatchToElement(new ke(e,t),"dragstart",t.event)}};t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var r=t.offsetX;var i=t.offsetY;var n=r-this._x;var a=i-this._y;this._x=r;this._y=i;e.drift(n,a,t);this.handler.dispatchToElement(new ke(e,t),"drag",t.event);var o=this.handler.findHover(r,i,e).target;var s=this._dropTarget;this._dropTarget=o;if(e!==o){if(s&&o!==s){this.handler.dispatchToElement(new ke(s,t),"dragleave",t.event)}if(o&&o!==s){this.handler.dispatchToElement(new ke(o,t),"dragenter",t.event)}}}};t.prototype._dragEnd=function(t){var e=this._draggingTarget;if(e){e.dragging=false}this.handler.dispatchToElement(new ke(e,t),"dragend",t.event);if(this._dropTarget){this.handler.dispatchToElement(new ke(this._dropTarget,t),"drop",t.event)}this._draggingTarget=null;this._dropTarget=null};return t}();var Le=xe;var Se=function(){function t(t){if(t){this._$eventProcessor=t}}t.prototype.on=function(t,e,r,i){if(!this._$handlers){this._$handlers={}}var n=this._$handlers;if(typeof e==="function"){i=r;r=e;e=null}if(!r||!t){return this}var a=this._$eventProcessor;if(e!=null&&a&&a.normalizeQuery){e=a.normalizeQuery(e)}if(!n[t]){n[t]=[]}for(var o=0;o<n[t].length;o++){if(n[t][o].h===r){return this}}var s={h:r,query:e,ctx:i||this,callAtLast:r.zrEventfulCallAtLast};var u=n[t].length-1;var l=n[t][u];l&&l.callAtLast?n[t].splice(u,0,s):n[t].push(s);return this};t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length};t.prototype.off=function(t,e){var r=this._$handlers;if(!r){return this}if(!t){this._$handlers={};return this}if(e){if(r[t]){var i=[];for(var n=0,a=r[t].length;n<a;n++){if(r[t][n].h!==e){i.push(r[t][n])}}r[t]=i}if(r[t]&&r[t].length===0){delete r[t]}}else{delete r[t]}return this};t.prototype.trigger=function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}if(!this._$handlers){return this}var i=this._$handlers[t];var n=this._$eventProcessor;if(i){var a=e.length;var o=i.length;for(var s=0;s<o;s++){var u=i[s];if(n&&n.filter&&u.query!=null&&!n.filter(t,u.query)){continue}switch(a){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}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};t.prototype.triggerWithContext=function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}if(!this._$handlers){return this}var i=this._$handlers[t];var n=this._$eventProcessor;if(i){var a=e.length;var o=e[a-1];var s=i.length;for(var u=0;u<s;u++){var l=i[u];if(n&&n.filter&&l.query!=null&&!n.filter(t,l.query)){continue}switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,e[0]);break;case 2:l.h.call(o,e[0],e[1]);break;default:l.h.apply(o,e.slice(1,a-1));break}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};return t}();var Ye=Se;var Te=Math.log(2);function De(t,e,r,i,n,a){var o=i+"-"+n;var s=t.length;if(a.hasOwnProperty(o)){return a[o]}if(e===1){var u=Math.round(Math.log((1<<s)-1&~n)/Te);return t[r][u]}var l=i|1<<r;var f=r+1;while(i&1<<f){f++}var h=0;for(var v=0,c=0;v<s;v++){var d=1<<v;if(!(d&n)){h+=(c%2?-1:1)*t[r][v]*De(t,e-1,f,l,n|d,a);c++}}a[o]=h;return h}function Ae(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]];var i={};var n=De(r,8,0,0,0,i);if(n===0){return}var a=[];for(var 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)*De(r,7,o===0?1:0,1<<o,1<<s,i)/n*e[o]}}return function(t,e,r){var i=e*a[6]+r*a[7]+1;t[0]=(e*a[0]+r*a[1]+a[2])/i;t[1]=(e*a[3]+r*a[4]+a[5])/i}}var Oe="___zrEVENTSAVED";var je=[];function Ne(t,e,r,i,n){return ze(je,e,i,n,true)&&ze(t,r,je[0],je[1])}function ze(t,e,r,i,n){if(e.getBoundingClientRect&&z.domSupported&&!Ce(e)){var a=e[Oe]||(e[Oe]={});var o=Ie(e,a);var s=He(o,a,n);if(s){s(t,r,i);return true}}return false}function Ie(t,e){var r=e.markers;if(r){return r}r=e.markers=[];var i=["left","right"];var n=["top","bottom"];for(var a=0;a<4;a++){var o=document.createElement("div");var s=o.style;var u=a%2;var l=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[u]+":0",n[l]+":0",i[1-u]+":auto",n[1-l]+":auto",""].join("!important;");t.appendChild(o);r.push(o)}return r}function He(t,e,r){var i=r?"invTrans":"trans";var n=e[i];var a=e.srcCoords;var o=[];var s=[];var u=true;for(var l=0;l<4;l++){var f=t[l].getBoundingClientRect();var h=2*l;var v=f.left;var c=f.top;o.push(v,c);u=u&&a&&v===a[h]&&c===a[h+1];s.push(t[l].offsetLeft,t[l].offsetTop)}return u&&n?n:(e.srcCoords=o,e[i]=r?Ae(s,o):Ae(o,s))}function Ce(t){return t.nodeName.toUpperCase()==="CANVAS"}var Ee=/([&<>"'])/g;var Pe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function We(t){return t==null?"":(t+"").replace(Ee,(function(t,e){return Pe[e]}))}var Fe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;var Re=[];var Be=z.browser.firefox&&+z.browser.version.split(".")[0]<39;function Je(t,e,r,i){r=r||{};if(i){Ue(t,e,r)}else if(Be&&e.layerX!=null&&e.layerX!==e.offsetX){r.zrX=e.layerX;r.zrY=e.layerY}else if(e.offsetX!=null){r.zrX=e.offsetX;r.zrY=e.offsetY}else{Ue(t,e,r)}return r}function Ue(t,e,r){if(z.domSupported&&t.getBoundingClientRect){var i=e.clientX;var n=e.clientY;if(Ce(t)){var a=t.getBoundingClientRect();r.zrX=i-a.left;r.zrY=n-a.top;return}else{if(ze(Re,t,i,n)){r.zrX=Re[0];r.zrY=Re[1];return}}}r.zrX=r.zrY=0}function Ve(t){return t||window.event}function Ge(t,e,r){e=Ve(e);if(e.zrX!=null){return e}var i=e.type;var n=i&&i.indexOf("touch")>=0;if(!n){Je(t,e,e,r);var a=Ze(e);e.zrDelta=a?a/120:-(e.detail||0)/3}else{var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Je(t,o,e,r)}var s=e.button;if(e.which==null&&s!==undefined&&Fe.test(e.type)){e.which=s&1?1:s&2?3:s&4?2:0}return e}function Ze(t){var e=t.wheelDelta;if(e){return e}var r=t.deltaX;var i=t.deltaY;if(r==null||i==null){return e}var n=i!==0?Math.abs(i):Math.abs(r);var a=i>0?-1:i<0?1:r>0?-1:1;return 3*n*a}function qe(t,e,r,i){t.addEventListener(e,r,i)}function Ke(t,e,r,i){t.removeEventListener(e,r,i)}var Xe=function(t){t.preventDefault();t.stopPropagation();t.cancelBubble=true};function $e(t){return t.which===2||t.which===3}var Qe=function(){function t(){this._track=[]}t.prototype.recognize=function(t,e,r){this._doTrack(t,e,r);return this._recognize(t)};t.prototype.clear=function(){this._track.length=0;return this};t.prototype._doTrack=function(t,e,r){var i=t.touches;if(!i){return}var n={points:[],touches:[],target:e,event:t};for(var a=0,o=i.length;a<o;a++){var s=i[a];var u=Je(r,s,{});n.points.push([u.zrX,u.zrY]);n.touches.push(s)}this._track.push(n)};t.prototype._recognize=function(t){for(var e in rr){if(rr.hasOwnProperty(e)){var r=rr[e](this._track,t);if(r){return r}}}};return t}();function tr(t){var e=t[1][0]-t[0][0];var r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function er(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var rr={pinch:function(t,e){var r=t.length;if(!r){return}var i=(t[r-1]||{}).points;var n=(t[r-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=tr(i)/tr(n);!isFinite(a)&&(a=1);e.pinchScale=a;var o=er(i);e.pinchX=o[0];e.pinchY=o[1];return{type:"pinch",target:t[0].target,event:e}}}};function ir(){return[1,0,0,1,0,0]}function nr(t){t[0]=1;t[1]=0;t[2]=0;t[3]=1;t[4]=0;t[5]=0;return t}function ar(t,e){t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[4];t[5]=e[5];return t}function or(t,e,r){var i=e[0]*r[0]+e[2]*r[1];var n=e[1]*r[0]+e[3]*r[1];var a=e[0]*r[2]+e[2]*r[3];var o=e[1]*r[2]+e[3]*r[3];var s=e[0]*r[4]+e[2]*r[5]+e[4];var u=e[1]*r[4]+e[3]*r[5]+e[5];t[0]=i;t[1]=n;t[2]=a;t[3]=o;t[4]=s;t[5]=u;return t}function sr(t,e,r){t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[4]+r[0];t[5]=e[5]+r[1];return t}function ur(t,e,r,i){if(i===void 0){i=[0,0]}var n=e[0];var a=e[2];var o=e[4];var s=e[1];var u=e[3];var l=e[5];var f=Math.sin(r);var h=Math.cos(r);t[0]=n*h+s*f;t[1]=-n*f+s*h;t[2]=a*h+u*f;t[3]=-a*f+h*u;t[4]=h*(o-i[0])+f*(l-i[1])+i[0];t[5]=h*(l-i[1])-f*(o-i[0])+i[1];return t}function lr(t,e,r){var i=r[0];var n=r[1];t[0]=e[0]*i;t[1]=e[1]*n;t[2]=e[2]*i;t[3]=e[3]*n;t[4]=e[4]*i;t[5]=e[5]*n;return t}function fr(t,e){var r=e[0];var i=e[2];var n=e[4];var a=e[1];var o=e[3];var s=e[5];var u=r*o-a*i;if(!u){return null}u=1/u;t[0]=o*u;t[1]=-a*u;t[2]=-i*u;t[3]=r*u;t[4]=(i*s-o*n)*u;t[5]=(a*n-r*s)*u;return t}function hr(t){var e=ir();ar(e,t);return e}var vr=function(){function t(t,e){this.x=t||0;this.y=e||0}t.prototype.copy=function(t){this.x=t.x;this.y=t.y;return this};t.prototype.clone=function(){return new t(this.x,this.y)};t.prototype.set=function(t,e){this.x=t;this.y=e;return this};t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y};t.prototype.add=function(t){this.x+=t.x;this.y+=t.y;return this};t.prototype.scale=function(t){this.x*=t;this.y*=t};t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e;this.y+=t.y*e};t.prototype.sub=function(t){this.x-=t.x;this.y-=t.y;return this};t.prototype.dot=function(t){return this.x*t.x+this.y*t.y};t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y};t.prototype.normalize=function(){var t=this.len();this.x/=t;this.y/=t;return this};t.prototype.distance=function(t){var e=this.x-t.x;var r=this.y-t.y;return Math.sqrt(e*e+r*r)};t.prototype.distanceSquare=function(t){var e=this.x-t.x;var r=this.y-t.y;return e*e+r*r};t.prototype.negate=function(){this.x=-this.x;this.y=-this.y;return this};t.prototype.transform=function(t){if(!t){return}var e=this.x;var r=this.y;this.x=t[0]*e+t[2]*r+t[4];this.y=t[1]*e+t[3]*r+t[5];return this};t.prototype.toArray=function(t){t[0]=this.x;t[1]=this.y;return t};t.prototype.fromArray=function(t){this.x=t[0];this.y=t[1]};t.set=function(t,e,r){t.x=e;t.y=r};t.copy=function(t,e){t.x=e.x;t.y=e.y};t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};t.lenSquare=function(t){return t.x*t.x+t.y*t.y};t.dot=function(t,e){return t.x*e.x+t.y*e.y};t.add=function(t,e,r){t.x=e.x+r.x;t.y=e.y+r.y};t.sub=function(t,e,r){t.x=e.x-r.x;t.y=e.y-r.y};t.scale=function(t,e,r){t.x=e.x*r;t.y=e.y*r};t.scaleAndAdd=function(t,e,r,i){t.x=e.x+r.x*i;t.y=e.y+r.y*i};t.lerp=function(t,e,r,i){var n=1-i;t.x=n*e.x+i*r.x;t.y=n*e.y+i*r.y};return t}();var cr=vr;var dr=Math.min;var mr=Math.max;var pr=new cr;var _r=new cr;var yr=new cr;var gr=new cr;var br=new cr;var wr=new cr;var Mr=function(){function t(t,e,r,i){if(r<0){t=t+r;r=-r}if(i<0){e=e+i;i=-i}this.x=t;this.y=e;this.width=r;this.height=i}t.prototype.union=function(t){var e=dr(t.x,this.x);var r=dr(t.y,this.y);if(isFinite(this.x)&&isFinite(this.width)){this.width=mr(t.x+t.width,this.x+this.width)-e}else{this.width=t.width}if(isFinite(this.y)&&isFinite(this.height)){this.height=mr(t.y+t.height,this.y+this.height)-r}else{this.height=t.height}this.x=e;this.y=r};t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)};t.prototype.calculateTransform=function(t){var e=this;var r=t.width/e.width;var i=t.height/e.height;var n=ir();sr(n,n,[-e.x,-e.y]);lr(n,n,[r,i]);sr(n,n,[t.x,t.y]);return n};t.prototype.intersect=function(e,r){if(!e){return false}if(!(e instanceof t)){e=t.create(e)}var i=this;var n=i.x;var a=i.x+i.width;var o=i.y;var s=i.y+i.height;var u=e.x;var l=e.x+e.width;var f=e.y;var h=e.y+e.height;var v=!(a<u||l<n||s<f||h<o);if(r){var c=Infinity;var d=0;var m=Math.abs(a-u);var p=Math.abs(l-n);var _=Math.abs(s-f);var y=Math.abs(h-o);var g=Math.min(m,p);var b=Math.min(_,y);if(a<u||l<n){if(g>d){d=g;if(m<p){cr.set(wr,-m,0)}else{cr.set(wr,p,0)}}}else{if(g<c){c=g;if(m<p){cr.set(br,m,0)}else{cr.set(br,-p,0)}}}if(s<f||h<o){if(b>d){d=b;if(_<y){cr.set(wr,0,-_)}else{cr.set(wr,0,y)}}}else{if(g<c){c=g;if(_<y){cr.set(br,0,_)}else{cr.set(br,0,-y)}}}}if(r){cr.copy(r,v?br:wr)}return v};t.prototype.contain=function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height};t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)};t.prototype.copy=function(e){t.copy(this,e)};t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}};t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.prototype.isZero=function(){return this.width===0||this.height===0};t.create=function(e){return new t(e.x,e.y,e.width,e.height)};t.copy=function(t,e){t.x=e.x;t.y=e.y;t.width=e.width;t.height=e.height};t.applyTransform=function(e,r,i){if(!i){if(e!==r){t.copy(e,r)}return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0];var a=i[3];var o=i[4];var s=i[5];e.x=r.x*n+o;e.y=r.y*a+s;e.width=r.width*n;e.height=r.height*a;if(e.width<0){e.x+=e.width;e.width=-e.width}if(e.height<0){e.y+=e.height;e.height=-e.height}return}pr.x=yr.x=r.x;pr.y=gr.y=r.y;_r.x=gr.x=r.x+r.width;_r.y=yr.y=r.y+r.height;pr.transform(i);gr.transform(i);_r.transform(i);yr.transform(i);e.x=dr(pr.x,_r.x,yr.x,gr.x);e.y=dr(pr.y,_r.y,yr.y,gr.y);var u=mr(pr.x,_r.x,yr.x,gr.x);var l=mr(pr.y,_r.y,yr.y,gr.y);e.width=u-e.x;e.height=l-e.y};return t}();var kr=Mr;var xr="silent";function Lr(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:false,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Sr}}function Sr(){Xe(this.event)}var Yr=function(t){ie(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.handler=null;return e}e.prototype.dispose=function(){};e.prototype.setCursor=function(){};return e}(Ye);var Tr=function(){function t(t,e){this.x=t;this.y=e}return t}();var Dr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];var Ar=new kr(0,0,0,0);var Or=function(t){ie(e,t);function e(e,r,i,n,a){var o=t.call(this)||this;o._hovered=new Tr(0,0);o.storage=e;o.painter=r;o.painterRoot=n;o._pointerSize=a;i=i||new Yr;o.proxy=null;o.setHandlerProxy(i);o._draggingMgr=new Le(o);return o}e.prototype.setHandlerProxy=function(t){if(this.proxy){this.proxy.dispose()}if(t){ct(Dr,(function(e){t.on&&t.on(e,this[e],this)}),this);t.handler=this}this.proxy=t};e.prototype.mousemove=function(t){var e=t.zrX;var r=t.zrY;var i=zr(this,e,r);var n=this._hovered;var a=n.target;if(a&&!a.__zr){n=this.findHover(n.x,n.y);a=n.target}var o=this._hovered=i?new Tr(e,r):this.findHover(e,r);var s=o.target;var u=this.proxy;u.setCursor&&u.setCursor(s?s.cursor:"default");if(a&&s!==a){this.dispatchToElement(n,"mouseout",t)}this.dispatchToElement(o,"mousemove",t);if(s&&s!==a){this.dispatchToElement(o,"mouseover",t)}};e.prototype.mouseout=function(t){var e=t.zrEventControl;if(e!=="only_globalout"){this.dispatchToElement(this._hovered,"mouseout",t)}if(e!=="no_globalout"){this.trigger("globalout",{type:"globalout",event:t})}};e.prototype.resize=function(){this._hovered=new Tr(0,0)};e.prototype.dispatch=function(t,e){var r=this[t];r&&r.call(this,e)};e.prototype.dispose=function(){this.proxy.dispose();this.storage=null;this.proxy=null;this.painter=null};e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)};e.prototype.dispatchToElement=function(t,e,r){t=t||{};var i=t.target;if(i&&i.silent){return}var n="on"+e;var a=Lr(e,t,r);while(i){i[n]&&(a.cancelBubble=!!i[n].call(i,a));i.trigger(e,a);i=i.__hostTarget?i.__hostTarget:i.parent;if(a.cancelBubble){break}}if(!a.cancelBubble){this.trigger(e,a);if(this.painter&&this.painter.eachOtherLayer){this.painter.eachOtherLayer((function(t){if(typeof t[n]==="function"){t[n].call(t,a)}if(t.trigger){t.trigger(e,a)}}))}}};e.prototype.findHover=function(t,e,r){var i=this.storage.getDisplayList();var n=new Tr(t,e);Nr(i,n,t,e,r);if(this._pointerSize&&!n.target){var a=[];var o=this._pointerSize;var s=o/2;var u=new kr(t-s,e-s,o,o);for(var l=i.length-1;l>=0;l--){var f=i[l];if(f!==r&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)){Ar.copy(f.getBoundingRect());if(f.transform){Ar.applyTransform(f.transform)}if(Ar.intersect(u)){a.push(f)}}}if(a.length){var h=4;var v=Math.PI/12;var c=Math.PI*2;for(var d=0;d<s;d+=h){for(var m=0;m<c;m+=v){var p=t+d*Math.cos(m);var _=e+d*Math.sin(m);Nr(a,n,p,_,r);if(n.target){return n}}}}}return n};e.prototype.processGesture=function(t,e){if(!this._gestureMgr){this._gestureMgr=new Qe}var r=this._gestureMgr;e==="start"&&r.clear();var i=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);e==="end"&&r.clear();if(i){var n=i.type;t.gestureEvent=n;var a=new Tr;a.target=i.target;this.dispatchToElement(a,n,i.event)}};return e}(Ye);ct(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Or.prototype[t]=function(e){var r=e.zrX;var i=e.zrY;var n=zr(this,r,i);var a;var o;if(t!=="mouseup"||!n){a=this.findHover(r,i);o=a.target}if(t==="mousedown"){this._downEl=o;this._downPoint=[e.zrX,e.zrY];this._upEl=o}else if(t==="mouseup"){this._upEl=o}else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||pe(this._downPoint,[e.zrX,e.zrY])>4){return}this._downPoint=null}this.dispatchToElement(a,t,e)}}));function jr(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){var i=t;var n=void 0;var a=false;while(i){if(i.ignoreClip){a=true}if(!a){var o=i.getClipPath();if(o&&!o.contain(e,r)){return false}}if(i.silent){n=true}var s=i.__hostTarget;i=s?s:i.parent}return n?xr:true}return false}function Nr(t,e,r,i,n){for(var a=t.length-1;a>=0;a--){var o=t[a];var s=void 0;if(o!==n&&!o.ignore&&(s=jr(o,r,i))){!e.topTarget&&(e.topTarget=o);if(s!==xr){e.target=o;break}}}}function zr(t,e,r){var i=t.painter;return e<0||e>i.getWidth()||r<0||r>i.getHeight()}var Ir=Or;var Hr=32;var Cr=7;function Er(t){var e=0;while(t>=Hr){e|=t&1;t>>=1}return t+e}function Pr(t,e,r,i){var n=e+1;if(n===r){return 1}if(i(t[n++],t[e])<0){while(n<r&&i(t[n],t[n-1])<0){n++}Wr(t,e,n)}else{while(n<r&&i(t[n],t[n-1])>=0){n++}}return n-e}function Wr(t,e,r){r--;while(e<r){var i=t[e];t[e++]=t[r];t[r--]=i}}function Fr(t,e,r,i,n){if(i===e){i++}for(;i<r;i++){var a=t[i];var o=e;var s=i;var u;while(o<s){u=o+s>>>1;if(n(a,t[u])<0){s=u}else{o=u+1}}var l=i-o;switch(l){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:while(l>0){t[o+l]=t[o+l-1];l--}}t[o]=a}}function Rr(t,e,r,i,n,a){var o=0;var s=0;var u=1;if(a(t,e[r+n])>0){s=i-n;while(u<s&&a(t,e[r+n+u])>0){o=u;u=(u<<1)+1;if(u<=0){u=s}}if(u>s){u=s}o+=n;u+=n}else{s=n+1;while(u<s&&a(t,e[r+n-u])<=0){o=u;u=(u<<1)+1;if(u<=0){u=s}}if(u>s){u=s}var l=o;o=n-u;u=n-l}o++;while(o<u){var f=o+(u-o>>>1);if(a(t,e[r+f])>0){o=f+1}else{u=f}}return u}function Br(t,e,r,i,n,a){var o=0;var s=0;var u=1;if(a(t,e[r+n])<0){s=n+1;while(u<s&&a(t,e[r+n-u])<0){o=u;u=(u<<1)+1;if(u<=0){u=s}}if(u>s){u=s}var l=o;o=n-u;u=n-l}else{s=i-n;while(u<s&&a(t,e[r+n+u])>=0){o=u;u=(u<<1)+1;if(u<=0){u=s}}if(u>s){u=s}o+=n;u+=n}o++;while(o<u){var f=o+(u-o>>>1);if(a(t,e[r+f])<0){u=f}else{o=f+1}}return u}function Jr(t,e){var r=Cr;var i;var n;var a=0;var o=[];i=[];n=[];function s(t,e){i[a]=t;n[a]=e;a+=1}function u(){while(a>1){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1]){if(n[t-1]<n[t+1]){t--}}else if(n[t]>n[t+1]){break}f(t)}}function l(){while(a>1){var t=a-2;if(t>0&&n[t-1]<n[t+1]){t--}f(t)}}function f(r){var o=i[r];var s=n[r];var u=i[r+1];var l=n[r+1];n[r]=s+l;if(r===a-3){i[r+1]=i[r+2];n[r+1]=n[r+2]}a--;var f=Br(t[u],t,o,s,0,e);o+=f;s-=f;if(s===0){return}l=Rr(t[o+s-1],t,u,l,l-1,e);if(l===0){return}if(s<=l){h(o,s,u,l)}else{v(o,s,u,l)}}function h(i,n,a,s){var u=0;for(u=0;u<n;u++){o[u]=t[i+u]}var l=0;var f=a;var h=i;t[h++]=t[f++];if(--s===0){for(u=0;u<n;u++){t[h+u]=o[l+u]}return}if(n===1){for(u=0;u<s;u++){t[h+u]=t[f+u]}t[h+s]=o[l];return}var v=r;var c;var d;var m;while(1){c=0;d=0;m=false;do{if(e(t[f],o[l])<0){t[h++]=t[f++];d++;c=0;if(--s===0){m=true;break}}else{t[h++]=o[l++];c++;d=0;if(--n===1){m=true;break}}}while((c|d)<v);if(m){break}do{c=Br(t[f],o,l,n,0,e);if(c!==0){for(u=0;u<c;u++){t[h+u]=o[l+u]}h+=c;l+=c;n-=c;if(n<=1){m=true;break}}t[h++]=t[f++];if(--s===0){m=true;break}d=Rr(o[l],t,f,s,0,e);if(d!==0){for(u=0;u<d;u++){t[h+u]=t[f+u]}h+=d;f+=d;s-=d;if(s===0){m=true;break}}t[h++]=o[l++];if(--n===1){m=true;break}v--}while(c>=Cr||d>=Cr);if(m){break}if(v<0){v=0}v+=2}r=v;r<1&&(r=1);if(n===1){for(u=0;u<s;u++){t[h+u]=t[f+u]}t[h+s]=o[l]}else if(n===0){throw new Error}else{for(u=0;u<n;u++){t[h+u]=o[l+u]}}}function v(i,n,a,s){var u=0;for(u=0;u<s;u++){o[u]=t[a+u]}var l=i+n-1;var f=s-1;var h=a+s-1;var v=0;var c=0;t[h--]=t[l--];if(--n===0){v=h-(s-1);for(u=0;u<s;u++){t[v+u]=o[u]}return}if(s===1){h-=n;l-=n;c=h+1;v=l+1;for(u=n-1;u>=0;u--){t[c+u]=t[v+u]}t[h]=o[f];return}var d=r;while(true){var m=0;var p=0;var _=false;do{if(e(o[f],t[l])<0){t[h--]=t[l--];m++;p=0;if(--n===0){_=true;break}}else{t[h--]=o[f--];p++;m=0;if(--s===1){_=true;break}}}while((m|p)<d);if(_){break}do{m=n-Br(o[f],t,i,n,n-1,e);if(m!==0){h-=m;l-=m;n-=m;c=h+1;v=l+1;for(u=m-1;u>=0;u--){t[c+u]=t[v+u]}if(n===0){_=true;break}}t[h--]=o[f--];if(--s===1){_=true;break}p=s-Rr(t[l],o,0,s,s-1,e);if(p!==0){h-=p;f-=p;s-=p;c=h+1;v=f+1;for(u=0;u<p;u++){t[c+u]=o[v+u]}if(s<=1){_=true;break}}t[h--]=t[l--];if(--n===0){_=true;break}d--}while(m>=Cr||p>=Cr);if(_){break}if(d<0){d=0}d+=2}r=d;if(r<1){r=1}if(s===1){h-=n;l-=n;c=h+1;v=l+1;for(u=n-1;u>=0;u--){t[c+u]=t[v+u]}t[h]=o[f]}else if(s===0){throw new Error}else{v=h-(s-1);for(u=0;u<s;u++){t[v+u]=o[u]}}}return{mergeRuns:u,forceMergeRuns:l,pushRun:s}}function Ur(t,e,r,i){if(!r){r=0}if(!i){i=t.length}var n=i-r;if(n<2){return}var a=0;if(n<Hr){a=Pr(t,r,i,e);Fr(t,r,i,r+a,e);return}var o=Jr(t,e);var s=Er(n);do{a=Pr(t,r,i,e);if(a<s){var u=n;if(u>s){u=s}Fr(t,r,r+u,r+a,e);a=u}o.pushRun(r,a);o.mergeRuns();n-=a;r+=a}while(n!==0);o.forceMergeRuns()}var Vr=1;var Gr=2;var Zr=4;var qr=false;function Kr(){if(qr){return}qr=true;console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors")}function Xr(t,e){if(t.zlevel===e.zlevel){if(t.z===e.z){return t.z2-e.z2}return t.z-e.z}return t.zlevel-e.zlevel}var $r=function(){function t(){this._roots=[];this._displayList=[];this._displayListLen=0;this.displayableSortFunc=Xr}t.prototype.traverse=function(t,e){for(var r=0;r<this._roots.length;r++){this._roots[r].traverse(t,e)}};t.prototype.getDisplayList=function(t,e){e=e||false;var r=this._displayList;if(t||!r.length){this.updateDisplayList(e)}return r};t.prototype.updateDisplayList=function(t){this._displayListLen=0;var e=this._roots;var r=this._displayList;for(var i=0,n=e.length;i<n;i++){this._updateAndAddDisplayable(e[i],null,t)}r.length=this._displayListLen;Ur(r,Xr)};t.prototype._updateAndAddDisplayable=function(t,e,r){if(t.ignore&&!r){return}t.beforeUpdate();t.update();t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip){e=null}else if(i){if(e){e=e.slice()}else{e=[]}var n=i;var a=t;while(n){n.parent=a;n.updateTransform();e.push(n);a=n;n=n.getClipPath()}}if(t.childrenRef){var o=t.childrenRef();for(var s=0;s<o.length;s++){var u=o[s];if(t.__dirty){u.__dirty|=Vr}this._updateAndAddDisplayable(u,e,r)}t.__dirty=0}else{var l=t;if(e&&e.length){l.__clipPaths=e}else if(l.__clipPaths&&l.__clipPaths.length>0){l.__clipPaths=[]}if(isNaN(l.z)){Kr();l.z=0}if(isNaN(l.z2)){Kr();l.z2=0}if(isNaN(l.zlevel)){Kr();l.zlevel=0}this._displayList[this._displayListLen++]=l}var f=t.getDecalElement&&t.getDecalElement();if(f){this._updateAndAddDisplayable(f,e,r)}var h=t.getTextGuideLine();if(h){this._updateAndAddDisplayable(h,e,r)}var v=t.getTextContent();if(v){this._updateAndAddDisplayable(v,e,r)}};t.prototype.addRoot=function(t){if(t.__zr&&t.__zr.storage===this){return}this._roots.push(t)};t.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,r=t.length;e<r;e++){this.delRoot(t[e])}return}var i=lt(this._roots,t);if(i>=0){this._roots.splice(i,1)}};t.prototype.delAllRoots=function(){this._roots=[];this._displayList=[];this._displayListLen=0;return};t.prototype.getRoots=function(){return this._roots};t.prototype.dispose=function(){this._displayList=null;this._roots=null};return t}();var Qr=$r;var ti;ti=z.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var ei=ti;var ri={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){if((t*=2)<1){return.5*t*t}return-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){if((t*=2)<1){return.5*t*t*t}return.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){if((t*=2)<1){return.5*t*t*t*t}return-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){if((t*=2)<1){return.5*t*t*t*t*t}return.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){if(t===0){return 0}if(t===1){return 1}if((t*=2)<1){return.5*Math.pow(1024,t-1)}return.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){if((t*=2)<1){return-.5*(Math.sqrt(1-t*t)-1)}return.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}return-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},elasticOut:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}return r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1},elasticInOut:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}if((t*=2)<1){return-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))}return r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=1.70158*1.525;if((t*=2)<1){return.5*(t*t*((e+1)*t-e))}return.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-ri.bounceOut(1-t)},bounceOut:function(t){if(t<1/2.75){return 7.5625*t*t}else if(t<2/2.75){return 7.5625*(t-=1.5/2.75)*t+.75}else if(t<2.5/2.75){return 7.5625*(t-=2.25/2.75)*t+.9375}else{return 7.5625*(t-=2.625/2.75)*t+.984375}},bounceInOut:function(t){if(t<.5){return ri.bounceIn(t*2)*.5}return ri.bounceOut(t*2-1)*.5+.5}};var ii=ri;var ni=Math.pow;var ai=Math.sqrt;var oi=1e-8;var si=1e-4;var ui=ai(3);var li=1/3;var fi=ne();var hi=ne();var vi=ne();function ci(t){return t>-oi&&t<oi}function di(t){return t>oi||t<-oi}function mi(t,e,r,i,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*i+3*a*r)}function pi(t,e,r,i,n){var a=1-n;return 3*(((e-t)*a+2*(r-e)*n)*a+(i-r)*n*n)}function _i(t,e,r,i,n,a){var o=i+3*(e-r)-t;var s=3*(r-e*2+t);var u=3*(e-t);var l=t-n;var f=s*s-3*o*u;var h=s*u-9*o*l;var v=u*u-3*s*l;var c=0;if(ci(f)&&ci(h)){if(ci(s)){a[0]=0}else{var d=-u/s;if(d>=0&&d<=1){a[c++]=d}}}else{var m=h*h-4*f*v;if(ci(m)){var p=h/f;var d=-s/o+p;var _=-p/2;if(d>=0&&d<=1){a[c++]=d}if(_>=0&&_<=1){a[c++]=_}}else if(m>0){var y=ai(m);var g=f*s+1.5*o*(-h+y);var b=f*s+1.5*o*(-h-y);if(g<0){g=-ni(-g,li)}else{g=ni(g,li)}if(b<0){b=-ni(-b,li)}else{b=ni(b,li)}var d=(-s-(g+b))/(3*o);if(d>=0&&d<=1){a[c++]=d}}else{var w=(2*f*s-3*o*h)/(2*ai(f*f*f));var M=Math.acos(w)/3;var k=ai(f);var x=Math.cos(M);var d=(-s-2*k*x)/(3*o);var _=(-s+k*(x+ui*Math.sin(M)))/(3*o);var L=(-s+k*(x-ui*Math.sin(M)))/(3*o);if(d>=0&&d<=1){a[c++]=d}if(_>=0&&_<=1){a[c++]=_}if(L>=0&&L<=1){a[c++]=L}}}return c}function yi(t,e,r,i,n){var a=6*r-12*e+6*t;var o=9*e+3*i-3*t-9*r;var s=3*e-3*t;var u=0;if(ci(o)){if(di(a)){var l=-s/a;if(l>=0&&l<=1){n[u++]=l}}}else{var f=a*a-4*o*s;if(ci(f)){n[0]=-a/(2*o)}else if(f>0){var h=ai(f);var l=(-a+h)/(2*o);var v=(-a-h)/(2*o);if(l>=0&&l<=1){n[u++]=l}if(v>=0&&v<=1){n[u++]=v}}}return u}function gi(t,e,r,i,n,a){var o=(e-t)*n+t;var s=(r-e)*n+e;var u=(i-r)*n+r;var l=(s-o)*n+o;var f=(u-s)*n+s;var h=(f-l)*n+l;a[0]=t;a[1]=o;a[2]=l;a[3]=h;a[4]=h;a[5]=f;a[6]=u;a[7]=i}function bi(t,e,r,i,n,a,o,s,u,l,f){var h;var v=.005;var c=Infinity;var d;var m;var p;var _;fi[0]=u;fi[1]=l;for(var y=0;y<1;y+=.05){hi[0]=mi(t,r,n,o,y);hi[1]=mi(e,i,a,s,y);p=ye(fi,hi);if(p<c){h=y;c=p}}c=Infinity;for(var g=0;g<32;g++){if(v<si){break}d=h-v;m=h+v;hi[0]=mi(t,r,n,o,d);hi[1]=mi(e,i,a,s,d);p=ye(hi,fi);if(d>=0&&p<c){h=d;c=p}else{vi[0]=mi(t,r,n,o,m);vi[1]=mi(e,i,a,s,m);_=ye(vi,fi);if(m<=1&&_<c){h=m;c=_}else{v*=.5}}}if(f){f[0]=mi(t,r,n,o,h);f[1]=mi(e,i,a,s,h)}return ai(c)}function wi(t,e,r,i,n,a,o,s,u){var l=t;var f=e;var h=0;var v=1/u;for(var c=1;c<=u;c++){var d=c*v;var m=mi(t,r,n,o,d);var p=mi(e,i,a,s,d);var _=m-l;var y=p-f;h+=Math.sqrt(_*_+y*y);l=m;f=p}return h}function Mi(t,e,r,i){var n=1-i;return n*(n*t+2*i*e)+i*i*r}function ki(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function xi(t,e,r,i,n){var a=t-2*e+r;var o=2*(e-t);var s=t-i;var u=0;if(ci(a)){if(di(o)){var l=-s/o;if(l>=0&&l<=1){n[u++]=l}}}else{var f=o*o-4*a*s;if(ci(f)){var l=-o/(2*a);if(l>=0&&l<=1){n[u++]=l}}else if(f>0){var h=ai(f);var l=(-o+h)/(2*a);var v=(-o-h)/(2*a);if(l>=0&&l<=1){n[u++]=l}if(v>=0&&v<=1){n[u++]=v}}}return u}function Li(t,e,r){var i=t+r-2*e;if(i===0){return.5}else{return(t-e)/i}}function Si(t,e,r,i,n){var a=(e-t)*i+t;var o=(r-e)*i+e;var s=(o-a)*i+a;n[0]=t;n[1]=a;n[2]=s;n[3]=s;n[4]=o;n[5]=r}function Yi(t,e,r,i,n,a,o,s,u){var l;var f=.005;var h=Infinity;fi[0]=o;fi[1]=s;for(var v=0;v<1;v+=.05){hi[0]=Mi(t,r,n,v);hi[1]=Mi(e,i,a,v);var c=ye(fi,hi);if(c<h){l=v;h=c}}h=Infinity;for(var d=0;d<32;d++){if(f<si){break}var m=l-f;var p=l+f;hi[0]=Mi(t,r,n,m);hi[1]=Mi(e,i,a,m);var c=ye(hi,fi);if(m>=0&&c<h){l=m;h=c}else{vi[0]=Mi(t,r,n,p);vi[1]=Mi(e,i,a,p);var _=ye(vi,fi);if(p<=1&&_<h){l=p;h=_}else{f*=.5}}}if(u){u[0]=Mi(t,r,n,l);u[1]=Mi(e,i,a,l)}return ai(h)}function Ti(t,e,r,i,n,a,o){var s=t;var u=e;var l=0;var f=1/o;for(var h=1;h<=o;h++){var v=h*f;var c=Mi(t,r,n,v);var d=Mi(e,i,a,v);var m=c-s;var p=d-u;l+=Math.sqrt(m*m+p*p);s=c;u=d}return l}var Di=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ai(t){var e=t&&Di.exec(t);if(e){var r=e[1].split(",");var i=+Ft(r[0]);var n=+Ft(r[1]);var a=+Ft(r[2]);var o=+Ft(r[3]);if(isNaN(i+n+a+o)){return}var s=[];return function(t){return t<=0?0:t>=1?1:_i(0,i,a,1,t,s)&&mi(0,n,o,1,s[0])}}}var Oi=function(){function t(t){this._inited=false;this._startTime=0;this._pausedTime=0;this._paused=false;this._life=t.life||1e3;this._delay=t.delay||0;this.loop=t.loop||false;this.onframe=t.onframe||te;this.ondestroy=t.ondestroy||te;this.onrestart=t.onrestart||te;t.easing&&this.setEasing(t.easing)}t.prototype.step=function(t,e){if(!this._inited){this._startTime=t+this._delay;this._inited=true}if(this._paused){this._pausedTime+=e;return}var r=this._life;var i=t-this._startTime-this._pausedTime;var n=i/r;if(n<0){n=0}n=Math.min(n,1);var a=this.easingFunc;var o=a?a(n):n;this.onframe(o);if(n===1){if(this.loop){var s=i%r;this._startTime=t-s;this._pausedTime=0;this.onrestart()}else{return true}}return false};t.prototype.pause=function(){this._paused=true};t.prototype.resume=function(){this._paused=false};t.prototype.setEasing=function(t){this.easing=t;this.easingFunc=kt(t)?t:ii[t]||Ai(t)};return t}();var ji=Oi;var Ni=function(){function t(t){this.value=t}return t}();var zi=function(){function t(){this._len=0}t.prototype.insert=function(t){var e=new Ni(t);this.insertEntry(e);return e};t.prototype.insertEntry=function(t){if(!this.head){this.head=this.tail=t}else{this.tail.next=t;t.prev=this.tail;t.next=null;this.tail=t}this._len++};t.prototype.remove=function(t){var e=t.prev;var r=t.next;if(e){e.next=r}else{this.head=r}if(r){r.prev=e}else{this.tail=e}t.next=t.prev=null;this._len--};t.prototype.len=function(){return this._len};t.prototype.clear=function(){this.head=this.tail=null;this._len=0};return t}();var Ii=function(){function t(t){this._list=new zi;this._maxSize=10;this._map={};this._maxSize=t}t.prototype.put=function(t,e){var r=this._list;var i=this._map;var n=null;if(i[t]==null){var a=r.len();var o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=r.head;r.remove(s);delete i[s.key];n=s.value;this._lastRemovedEntry=s}if(o){o.value=e}else{o=new Ni(e)}o.key=t;r.insertEntry(o);i[t]=o}return n};t.prototype.get=function(t){var e=this._map[t];var r=this._list;if(e!=null){if(e!==r.tail){r.remove(e);r.insertEntry(e)}return e.value}};t.prototype.clear=function(){this._list.clear();this._map={}};t.prototype.len=function(){return this._list.len()};return t}();var Hi=Ii;var Ci={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,7